@economic/agents-playground 1.4.4 → 1.5.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 (741) hide show
  1. package/dist/assets/{angular-html-B06431FV.js → angular-html-C2U28d7I.js} +1 -1
  2. package/dist/assets/{angular-html-BifGfUDK.js → angular-html-uJ7b1CnK.js} +1 -1
  3. package/dist/assets/{angular-ts-CcYMzyqx.js → angular-ts-D88ijnYb.js} +1 -1
  4. package/dist/assets/{angular-ts-CzIQj4-u.js → angular-ts-JFeCGW_v.js} +1 -1
  5. package/dist/assets/{apl-BcrM26_y.js → apl-BpebQNmD.js} +1 -1
  6. package/dist/assets/{apl-D_R6U_uP.js → apl-C6AWXEwk.js} +1 -1
  7. package/dist/assets/arc-BIBvaAF-.js +1 -0
  8. package/dist/assets/architecture-YZFGNWBL-hlnF2B1a.js +1 -0
  9. package/dist/assets/architectureDiagram-Q4EWVU46-DcS6A3Mg.js +36 -0
  10. package/dist/assets/{astro-BNjpRs2m.js → astro-CRpHIgIU.js} +1 -1
  11. package/dist/assets/{astro-Dw13DNWz.js → astro-Ukc-k5AJ.js} +1 -1
  12. package/dist/assets/{blade-BEHJPIyA.js → blade-0jpZTnSR.js} +1 -1
  13. package/dist/assets/{blade-KG6BMavt.js → blade-DhbbzlNo.js} +1 -1
  14. package/dist/assets/blockDiagram-DXYQGD6D-Z6Y3BGVg.js +132 -0
  15. package/dist/assets/{bsl-PUJNLfnh.js → bsl-B54i21_P.js} +1 -1
  16. package/dist/assets/{bsl-PcWk1JU1.js → bsl-D3T-XG_R.js} +1 -1
  17. package/dist/assets/{c4Diagram-AHTNJAMY-DKZcqNL3.js → c4Diagram-AHTNJAMY-DekoM4-h.js} +7 -7
  18. package/dist/assets/{cairo-B-pXE3Ec.js → cairo-JaUDbVYo.js} +1 -1
  19. package/dist/assets/{cairo-DEdGKjYj.js → cairo-Q_T2FuvI.js} +1 -1
  20. package/dist/assets/channel-BL-54IZi.js +1 -0
  21. package/dist/assets/{chunk-2KRD3SAO-CptP36Yz.js → chunk-2KRD3SAO-CzvOU1cB.js} +1 -1
  22. package/dist/assets/chunk-4BX2VUAB-b52x3Bdl.js +1 -0
  23. package/dist/assets/{chunk-4TB4RGXK-B91CdIwo.js → chunk-4TB4RGXK--uznt3wP.js} +7 -7
  24. package/dist/assets/chunk-55IACEB6-D-96as2q.js +1 -0
  25. package/dist/assets/chunk-5FUZZQ4R-BkjLQcGk.js +62 -0
  26. package/dist/assets/chunk-5PVQY5BW-5xQJ1V0h.js +2 -0
  27. package/dist/assets/{chunk-67CJDMHE-425cyOLX.js → chunk-67CJDMHE-Dhe-2lGN.js} +1 -1
  28. package/dist/assets/{chunk-7N4EOEYR-B7FY5R4w.js → chunk-7N4EOEYR-CUj6-RNp.js} +1 -1
  29. package/dist/assets/{chunk-AA7GKIK3-bMuNVbHa.js → chunk-AA7GKIK3-6A7FbvAM.js} +1 -1
  30. package/dist/assets/chunk-BSJP7CBP-YyA7eZXL.js +1 -0
  31. package/dist/assets/{chunk-CIAEETIT-B9XTKNVK.js → chunk-CIAEETIT-D0SgWMsl.js} +1 -1
  32. package/dist/assets/chunk-EDXVE4YY-cBzrRjBV.js +1 -0
  33. package/dist/assets/chunk-ENJZ2VHE-BX61UO09.js +10 -0
  34. package/dist/assets/{chunk-FMBD7UC4-Cnxwot8A.js → chunk-FMBD7UC4-BiW50_vE.js} +1 -1
  35. package/dist/assets/{chunk-FOC6F5B3-DjYxhIou.js → chunk-FOC6F5B3-BTf-o2m7.js} +1 -1
  36. package/dist/assets/chunk-ICPOFSXX-DhSKCi44.js +123 -0
  37. package/dist/assets/{chunk-K5T4RW27-CLqBrkaF.js → chunk-K5T4RW27-CHk5PJuP.js} +1 -1
  38. package/dist/assets/{chunk-KGLVRYIC-DecxHaTH.js → chunk-KGLVRYIC-C3oIfxi2.js} +1 -1
  39. package/dist/assets/{chunk-LIHQZDEY-nKTWMmF2.js → chunk-LIHQZDEY-DxHBJKk1.js} +1 -1
  40. package/dist/assets/{chunk-ORNJ4GCN-Def2oPkH.js → chunk-ORNJ4GCN-CVUx7szq.js} +1 -1
  41. package/dist/assets/{chunk-OYMX7WX6-BjqgzXLJ.js → chunk-OYMX7WX6-V5XYDHy6.js} +5 -5
  42. package/dist/assets/chunk-QZHKN3VN-6leYLibG.js +1 -0
  43. package/dist/assets/chunk-U2HBQHQK-DZcOXz0k.js +70 -0
  44. package/dist/assets/chunk-X2U36JSP-A88HrmUK.js +1 -0
  45. package/dist/assets/chunk-YZCP3GAM-D4YvlLgj.js +1 -0
  46. package/dist/assets/chunk-ZZ45TVLE-Qm-AMNbA.js +1 -0
  47. package/dist/assets/classDiagram-6PBFFD2Q-DJG5iG41.js +1 -0
  48. package/dist/assets/classDiagram-v2-HSJHXN6E-Bb0dA9zB.js +1 -0
  49. package/dist/assets/clone-6tntRHBM.js +1 -0
  50. package/dist/assets/{cobol-DmnI1Iz_.js → cobol-DHTCqGzR.js} +1 -1
  51. package/dist/assets/{cobol-40eU52Hp.js → cobol-DffwYkFi.js} +1 -1
  52. package/dist/assets/{coffee-BtiuyHS6.js → coffee-DolKeCzx.js} +1 -1
  53. package/dist/assets/{coffee-Hi7SBfHY.js → coffee-TSM3EVZg.js} +1 -1
  54. package/dist/assets/cose-bilkent-S5V4N54A-DX__-T-O.js +1 -0
  55. package/dist/assets/{cpp-CPXXM2Zt.js → cpp-CXq4pIDO.js} +1 -1
  56. package/dist/assets/{cpp-Cf9HhJhN.js → cpp-dQzhxFcr.js} +1 -1
  57. package/dist/assets/{crystal-VckmDqv-.js → crystal-CFQjs88Q.js} +1 -1
  58. package/dist/assets/{crystal-4p5RVzNF.js → crystal-Cy1QxX5g.js} +1 -1
  59. package/dist/assets/dagre-KV5264BT-D-09dDzP.js +4 -0
  60. package/dist/assets/dagre-MfJlB_AO.js +1 -0
  61. package/dist/assets/diagram-5BDNPKRD-CV0UxZuv.js +10 -0
  62. package/dist/assets/diagram-G4DWMVQ6-Diej41n9.js +24 -0
  63. package/dist/assets/diagram-MMDJMWI5-DQVh8vi4.js +43 -0
  64. package/dist/assets/diagram-TYMM5635-BpoWQOZz.js +24 -0
  65. package/dist/assets/dist-ya5h1mP3.js +1 -0
  66. package/dist/assets/{edge-DOP2QK6v.js → edge-Ce8ETtVJ.js} +1 -1
  67. package/dist/assets/{edge-DfOnSJKl.js → edge-Ct1vgnBt.js} +1 -1
  68. package/dist/assets/{elixir-CT9X8_03.js → elixir-D8kTd5f6.js} +1 -1
  69. package/dist/assets/{elixir-Dh80uoMz.js → elixir-DWgbHRG4.js} +1 -1
  70. package/dist/assets/{elm-BKFJqoT_.js → elm-1nE2xrL_.js} +1 -1
  71. package/dist/assets/{elm-D5Oi-KhN.js → elm-Cj38Buk6.js} +1 -1
  72. package/dist/assets/erDiagram-SMLLAGMA-ByIgp8Eo.js +85 -0
  73. package/dist/assets/{erb-BqYDXTF_.js → erb-B8WAiN7n.js} +1 -1
  74. package/dist/assets/{erb-BzIOhhbO.js → erb-CEK5dUqj.js} +1 -1
  75. package/dist/assets/{erlang-CN54P7Mw.js → erlang-9bZkvgha.js} +1 -1
  76. package/dist/assets/{erlang-BQL5IloL.js → erlang-R9i3kMP5.js} +1 -1
  77. package/dist/assets/{flatten-BfgG9LYW.js → flatten-By5LjgHe.js} +1 -1
  78. package/dist/assets/flowDiagram-DWJPFMVM-BzNKfuB7.js +162 -0
  79. package/dist/assets/{fortran-fixed-form-CfaOPgTl.js → fortran-fixed-form-BVlcY82S.js} +1 -1
  80. package/dist/assets/{fortran-fixed-form-zl_EYMZk.js → fortran-fixed-form-CHZzH8CX.js} +1 -1
  81. package/dist/assets/{fsharp-B9Rf51re.js → fsharp-Bh8uGiJv.js} +1 -1
  82. package/dist/assets/{fsharp-CNg37U2K.js → fsharp-D4PGOmrZ.js} +1 -1
  83. package/dist/assets/ganttDiagram-T4ZO3ILL-DlhOhzIY.js +292 -0
  84. package/dist/assets/{gdresource-CTArbRj8.js → gdresource-BMHd1vI1.js} +1 -1
  85. package/dist/assets/{gdresource-DAImCfo8.js → gdresource-zogYIbMs.js} +1 -1
  86. package/dist/assets/{git-commit-BPdlTbd6.js → git-commit-BOtit0B7.js} +1 -1
  87. package/dist/assets/{git-commit-CoDqjDoq.js → git-commit-CAgaRK7M.js} +1 -1
  88. package/dist/assets/{git-rebase-Df_QWEmJ.js → git-rebase-Dz4G9beD.js} +1 -1
  89. package/dist/assets/{git-rebase-SWXB1eSF.js → git-rebase-lAV3NdsY.js} +1 -1
  90. package/dist/assets/gitGraph-7Q5UKJZL-DQewGqLh.js +1 -0
  91. package/dist/assets/gitGraphDiagram-UUTBAWPF-BsxSqc1_.js +106 -0
  92. package/dist/assets/{glimmer-js-BVmr87iD.js → glimmer-js-D8Ts9DvD.js} +1 -1
  93. package/dist/assets/{glimmer-js-dp4YtKhY.js → glimmer-js-uTQdEYVu.js} +1 -1
  94. package/dist/assets/{glimmer-ts-BJx2qjM7.js → glimmer-ts-BZRip_b-.js} +1 -1
  95. package/dist/assets/{glimmer-ts-BWIHfG-b.js → glimmer-ts-y7nzn0ID.js} +1 -1
  96. package/dist/assets/{glsl-BcSWK78a.js → glsl-DJmvQUze.js} +1 -1
  97. package/dist/assets/{glsl-CzkH7fKT.js → glsl-Df_EGTfW.js} +1 -1
  98. package/dist/assets/graphlib-BUpMknsW.js +1 -0
  99. package/dist/assets/{graphql-BDpxgMxL.js → graphql-DQZ2ti5C.js} +1 -1
  100. package/dist/assets/{graphql-BUvVVHDA.js → graphql-Hv4rukMG.js} +1 -1
  101. package/dist/assets/{hack-BzdvO_15.js → hack-CBuct2_L.js} +1 -1
  102. package/dist/assets/{hack-i_NCIde8.js → hack-cEAjOsDW.js} +1 -1
  103. package/dist/assets/{haml-CMzzOXTc.js → haml-DmHNVaVz.js} +1 -1
  104. package/dist/assets/{haml-Dd0B1EFS.js → haml-Z6fBk1Nn.js} +1 -1
  105. package/dist/assets/{handlebars-D4KV8kux.js → handlebars-B0-Og-pC.js} +1 -1
  106. package/dist/assets/{handlebars-DMuguRIC.js → handlebars-RSx4FtJn.js} +1 -1
  107. package/dist/assets/highlighted-body-OFNGDK62-C49FzMo3.js +1 -0
  108. package/dist/assets/{html-DzsHfxbD.js → html-BovkiBbn.js} +1 -1
  109. package/dist/assets/{html-9TpcV9v7.js → html-IDCAcWPz.js} +1 -1
  110. package/dist/assets/{html-derivative-D59M5vuP.js → html-derivative-CLqUdpRr.js} +1 -1
  111. package/dist/assets/{html-derivative-DKVLMg7f.js → html-derivative-CRfvxyYX.js} +1 -1
  112. package/dist/assets/{http-DugK8a30.js → http-B_4Eeybg.js} +1 -1
  113. package/dist/assets/{http-N6lXfK7t.js → http-Dp7zj0d8.js} +1 -1
  114. package/dist/assets/{hurl-B5Dlr1bd.js → hurl-_1c_0_Wc.js} +1 -1
  115. package/dist/assets/{hurl-DMlhe3IO.js → hurl-kTt4HYJA.js} +1 -1
  116. package/dist/assets/{hxml-MYESmkVz.js → hxml-CBLoPFJn.js} +1 -1
  117. package/dist/assets/{hxml-annJil5c.js → hxml-QnJ9WbXI.js} +1 -1
  118. package/dist/assets/index-BuqrFx_1.js +525 -0
  119. package/dist/assets/info-OMHHGYJF-BNpN7drp.js +1 -0
  120. package/dist/assets/infoDiagram-42DDH7IO-D3DzEWgU.js +2 -0
  121. package/dist/assets/{ishikawaDiagram-UXIWVN3A-BDHgSJ7s.js → ishikawaDiagram-UXIWVN3A-epPQ8zog.js} +6 -6
  122. package/dist/assets/{jinja-3Xah5-51.js → jinja-BYrs-9sw.js} +1 -1
  123. package/dist/assets/{jinja-ErbFhRLI.js → jinja-D29CiUKc.js} +1 -1
  124. package/dist/assets/{jison-DjSJUWl5.js → jison-CrnyBoqW.js} +1 -1
  125. package/dist/assets/{jison-mSBlbI4J.js → jison-_g2Qrf-2.js} +1 -1
  126. package/dist/assets/{journeyDiagram-VCZTEJTY-BZU8RBmr.js → journeyDiagram-VCZTEJTY-BW4urxP0.js} +6 -6
  127. package/dist/assets/{julia-0FJ3EW7a.js → julia-BNcC4e--.js} +1 -1
  128. package/dist/assets/{julia-DnomsZDA.js → julia-Dww0yICA.js} +1 -1
  129. package/dist/assets/{just-Dlgc_L4r.js → just-B5-X6go-.js} +1 -1
  130. package/dist/assets/{just-CHPwws5a.js → just-DmI2dcWN.js} +1 -1
  131. package/dist/assets/kanban-definition-6JOO6SKY-HE7NzVUF.js +89 -0
  132. package/dist/assets/{latex-CD6h9RQG.js → latex-290GCwIn.js} +1 -1
  133. package/dist/assets/{latex-DFGeiPF6.js → latex-C14mcCCR.js} +1 -1
  134. package/dist/assets/line-0lkZ_Ak7.js +1 -0
  135. package/dist/assets/linear-DMPU7_iu.js +1 -0
  136. package/dist/assets/{liquid-90HtVGNH.js → liquid-BeEBtHlP.js} +1 -1
  137. package/dist/assets/{liquid-C1YZGM0V.js → liquid-CvTrx5Vc.js} +1 -1
  138. package/dist/assets/{lua-CpY6VAIt.js → lua-8BMmASPg.js} +1 -1
  139. package/dist/assets/{lua-CHxPPnRP.js → lua-CfrLAckd.js} +1 -1
  140. package/dist/assets/{marko-CzlWlBrS.js → marko-DvCuxMAY.js} +1 -1
  141. package/dist/assets/{marko-DJ4EH0Ew.js → marko-eKiBW8WW.js} +1 -1
  142. package/dist/assets/{mdc-C228-Zkx.js → mdc-B0Wqmpvj.js} +1 -1
  143. package/dist/assets/{mdc-CV5HpJR5.js → mdc-CUwzVnlt.js} +1 -1
  144. package/dist/assets/mermaid-GHXKKRXX-CSA8__nD.js +1 -0
  145. package/dist/assets/mermaid-parser.core-KO1ISlkr.js +4 -0
  146. package/dist/assets/{mindmap-definition-QFDTVHPH-DmV6XAmo.js → mindmap-definition-QFDTVHPH-BYxkj8M5.js} +28 -28
  147. package/dist/assets/{nextflow-BgL7DOws.js → nextflow-DaMHJyv-.js} +1 -1
  148. package/dist/assets/{nextflow-zZdgtPjs.js → nextflow-iKg2KdJ3.js} +1 -1
  149. package/dist/assets/{nginx-DJgcVOEE.js → nginx-DLlifRTt.js} +1 -1
  150. package/dist/assets/{nginx-d3jRDTo9.js → nginx-TG5RBkWS.js} +1 -1
  151. package/dist/assets/{nim-CWdKfhVy.js → nim-CNs9dAJo.js} +1 -1
  152. package/dist/assets/{nim-Cb4tr6rC.js → nim-D5ig7v3l.js} +1 -1
  153. package/dist/assets/{ordinal-BDTCIhXR.js → ordinal-t_ha_BUo.js} +1 -1
  154. package/dist/assets/packet-4T2RLAQJ-_IS5vUvb.js +1 -0
  155. package/dist/assets/{perl-Bp5BaNX4.js → perl-BBy9cgaT.js} +1 -1
  156. package/dist/assets/{perl-DTRBSdPj.js → perl-DYtcpUn_.js} +1 -1
  157. package/dist/assets/{php-DEAB9BlF.js → php-CY2BFAJ3.js} +1 -1
  158. package/dist/assets/{php-ww2WiEWQ.js → php-DuBxjQDx.js} +1 -1
  159. package/dist/assets/pie-ZZUOXDRM-DSDEG3jq.js +1 -0
  160. package/dist/assets/pieDiagram-DEJITSTG-loypmzPR.js +30 -0
  161. package/dist/assets/{pug-C2Pvo2nk.js → pug-CeUn-RsL.js} +1 -1
  162. package/dist/assets/{pug-BIr7cf_q.js → pug-O_iDttis.js} +1 -1
  163. package/dist/assets/{qml-1bQ-qttF.js → qml-CxI8kE-p.js} +1 -1
  164. package/dist/assets/{qml-BUwWPlBs.js → qml-DidK4YIl.js} +1 -1
  165. package/dist/assets/{quadrantDiagram-34T5L4WZ-DZC17t_A.js → quadrantDiagram-34T5L4WZ-DZ4KpC1p.js} +7 -7
  166. package/dist/assets/radar-PYXPWWZC-Bnttjq-U.js +1 -0
  167. package/dist/assets/{razor-BUaoKKlS.js → razor-BG9tcYbl.js} +1 -1
  168. package/dist/assets/{razor-CSKIcVbo.js → razor-uD0Mg1wE.js} +1 -1
  169. package/dist/assets/{reduce-6LTm5bAo.js → reduce-5uzJj95g.js} +1 -1
  170. package/dist/assets/requirementDiagram-MS252O5E-g6mOII2w.js +84 -0
  171. package/dist/assets/{rst-DdTeCkEn.js → rst-B43mac11.js} +1 -1
  172. package/dist/assets/{rst-7vesjyk1.js → rst-BQRiWr_Y.js} +1 -1
  173. package/dist/assets/{ruby-DXgg7HMs.js → ruby-Avb9jgNg.js} +1 -1
  174. package/dist/assets/{ruby-5wEVW9Sd.js → ruby-vXaFb4jN.js} +1 -1
  175. package/dist/assets/sankeyDiagram-XADWPNL6-DTcXqWic.js +10 -0
  176. package/dist/assets/{sas-BoT0Cu6D.js → sas-DSyoyZG-.js} +1 -1
  177. package/dist/assets/{sas-CHOVsPgQ.js → sas-XM_MUfXH.js} +1 -1
  178. package/dist/assets/{scss-B02sunCg.js → scss-CbYD1uQt.js} +1 -1
  179. package/dist/assets/{scss-fMzZRuW1.js → scss-DXZ2YRPX.js} +1 -1
  180. package/dist/assets/sequenceDiagram-FGHM5R23-DdcFzOps.js +157 -0
  181. package/dist/assets/{shaderlab-BICcO3P4.js → shaderlab-B3KmLsfH.js} +1 -1
  182. package/dist/assets/{shaderlab-DbQKAzlS.js → shaderlab-B__viSd1.js} +1 -1
  183. package/dist/assets/{shellsession-BE79FNm2.js → shellsession-BXYbv0ko.js} +1 -1
  184. package/dist/assets/{shellsession-Bn2_n-uu.js → shellsession-DDTE6nt1.js} +1 -1
  185. package/dist/assets/{soy-C7hguLxi.js → soy-8qbhbHdk.js} +1 -1
  186. package/dist/assets/{soy-C_jcznB2.js → soy-BjBoAgvY.js} +1 -1
  187. package/dist/assets/{sparql-CJy81xWo.js → sparql-B7pQSNyT.js} +1 -1
  188. package/dist/assets/{sparql-D7JyfU0H.js → sparql-P3fQ_Jok.js} +1 -1
  189. package/dist/assets/src-yS7GtxRa.js +1 -0
  190. package/dist/assets/{stata-CAcbMa3F.js → stata-CHe_USAa.js} +1 -1
  191. package/dist/assets/{stata-D-ebmqBE.js → stata-T5FYSu1-.js} +1 -1
  192. package/dist/assets/stateDiagram-FHFEXIEX-aPTzDIYk.js +1 -0
  193. package/dist/assets/stateDiagram-v2-QKLJ7IA2-FcVD5MeB.js +1 -0
  194. package/dist/assets/{surrealql-BrTkv7CN.js → surrealql-CKeJQu5O.js} +1 -1
  195. package/dist/assets/{surrealql-DAJI2S1F.js → surrealql-Dx7bR3iH.js} +1 -1
  196. package/dist/assets/{svelte-CLJEmKIy.js → svelte-CnPpq295.js} +1 -1
  197. package/dist/assets/{svelte-DwzVBmrL.js → svelte-DDotzggB.js} +1 -1
  198. package/dist/assets/{templ-DK3OqRgg.js → templ-BintcxtH.js} +1 -1
  199. package/dist/assets/{templ-BGYss1Ds.js → templ-Hyv8wlyY.js} +1 -1
  200. package/dist/assets/{tex-CbqXtJcj.js → tex-DHFUYOEI.js} +1 -1
  201. package/dist/assets/{tex-Cdh8h1Hd.js → tex-Dw3zOkcW.js} +1 -1
  202. package/dist/assets/timeline-definition-GMOUNBTQ-Dv0o3bm2.js +120 -0
  203. package/dist/assets/treeView-SZITEDCU-Bt9Xkh2R.js +1 -0
  204. package/dist/assets/treemap-W4RFUUIX-BWJDofWj.js +1 -0
  205. package/dist/assets/{ts-tags-eaICWHXA.js → ts-tags-C5sBTDbR.js} +1 -1
  206. package/dist/assets/{ts-tags-YJL4ZBV_.js → ts-tags-aQrlJJF3.js} +1 -1
  207. package/dist/assets/{twig-Q9jmhSGd.js → twig-BiDIhIq9.js} +1 -1
  208. package/dist/assets/{twig-c-voBkXK.js → twig-BqTJC7Z5.js} +1 -1
  209. package/dist/assets/vennDiagram-DHZGUBPP-CQgHNv55.js +34 -0
  210. package/dist/assets/{vue-B-Ha2unx.js → vue-CKOPxhtK.js} +1 -1
  211. package/dist/assets/{vue-Ca-hPRMt.js → vue-DtdqQCVt.js} +1 -1
  212. package/dist/assets/{vue-html-DB_HG3A_.js → vue-html-ByGXx9rV.js} +1 -1
  213. package/dist/assets/{vue-html-SeqbV7YW.js → vue-html-aqjMLUT8.js} +1 -1
  214. package/dist/assets/{vue-vine-BUVe7fi_.js → vue-vine-CHhnfXci.js} +1 -1
  215. package/dist/assets/{vue-vine-e0jwxBzi.js → vue-vine-DaWwjEPF.js} +1 -1
  216. package/dist/assets/wardley-RL74JXVD-3jCCZCil.js +1 -0
  217. package/dist/assets/{wardleyDiagram-NUSXRM2D-DDksLYD3.js → wardleyDiagram-NUSXRM2D-BlGX5hGO.js} +3 -3
  218. package/dist/assets/{xml-BhlBuIFP.js → xml-CaOAAu6Y.js} +1 -1
  219. package/dist/assets/{xml-DYl0sTfD.js → xml-CkFha01Y.js} +1 -1
  220. package/dist/assets/{xsl-C1PoNDZ6.js → xsl-Bie8MQNk.js} +1 -1
  221. package/dist/assets/{xsl-XYKERMTl.js → xsl-CEdS8bNO.js} +1 -1
  222. package/dist/assets/{xychartDiagram-5P7HB3ND-D3o5WLZc.js → xychartDiagram-5P7HB3ND-BciTYgBN.js} +7 -7
  223. package/dist/index.html +16 -5
  224. package/package.json +5 -5
  225. package/dist/assets/arc-8qvnjIG8.js +0 -1
  226. package/dist/assets/architecture-YZFGNWBL-D8US8e9g.js +0 -1
  227. package/dist/assets/architectureDiagram-Q4EWVU46-CIY9R-oh.js +0 -36
  228. package/dist/assets/blockDiagram-DXYQGD6D-CFvY_yqk.js +0 -132
  229. package/dist/assets/channel-tbg45L7A.js +0 -1
  230. package/dist/assets/chunk-4BX2VUAB-9YJQIz9Q.js +0 -1
  231. package/dist/assets/chunk-55IACEB6-BVdPdg1q.js +0 -1
  232. package/dist/assets/chunk-EDXVE4YY-CXhS9dz3.js +0 -1
  233. package/dist/assets/chunk-QZHKN3VN-C1yVqisb.js +0 -1
  234. package/dist/assets/chunk-YZCP3GAM-DRlLPYxV.js +0 -1
  235. package/dist/assets/classDiagram-6PBFFD2Q-D1ZuKv9F.js +0 -1
  236. package/dist/assets/classDiagram-v2-HSJHXN6E-G7sHlWgZ.js +0 -1
  237. package/dist/assets/clone-DdU2OYhS.js +0 -1
  238. package/dist/assets/cose-bilkent-S5V4N54A-CqfZgkYm.js +0 -1
  239. package/dist/assets/dagre-CvpXEd1k.js +0 -1
  240. package/dist/assets/dagre-KV5264BT-M-zCQNL1.js +0 -4
  241. package/dist/assets/diagram-5BDNPKRD-DbIA0Lk5.js +0 -10
  242. package/dist/assets/diagram-G4DWMVQ6-DXFzSSRK.js +0 -24
  243. package/dist/assets/diagram-MMDJMWI5-Cv-cFrk3.js +0 -43
  244. package/dist/assets/diagram-TYMM5635-BtC979Ne.js +0 -24
  245. package/dist/assets/erDiagram-SMLLAGMA-CNjXUfso.js +0 -85
  246. package/dist/assets/flowDiagram-DWJPFMVM-3qJ3aU0Y.js +0 -162
  247. package/dist/assets/ganttDiagram-T4ZO3ILL-tHXG5xxW.js +0 -292
  248. package/dist/assets/gitGraph-7Q5UKJZL-CIQb84k4.js +0 -1
  249. package/dist/assets/gitGraphDiagram-UUTBAWPF-BQPeR5qq.js +0 -106
  250. package/dist/assets/graphlib-ZLzjV5f2.js +0 -1
  251. package/dist/assets/highlighted-body-OFNGDK62-BDuHC7fi.js +0 -1
  252. package/dist/assets/index-Dq46HdTT.js +0 -780
  253. package/dist/assets/info-OMHHGYJF-B9-gCREV.js +0 -1
  254. package/dist/assets/infoDiagram-42DDH7IO-t30vm-eQ.js +0 -2
  255. package/dist/assets/kanban-definition-6JOO6SKY-Dq4nnszC.js +0 -89
  256. package/dist/assets/linear-B17c8_ZA.js +0 -1
  257. package/dist/assets/mermaid-GHXKKRXX-Baf4hImz.js +0 -1
  258. package/dist/assets/mermaid-parser.core-CAtyNvKe.js +0 -4
  259. package/dist/assets/packet-4T2RLAQJ-ByEG0RPc.js +0 -1
  260. package/dist/assets/pie-ZZUOXDRM-ccrXiK73.js +0 -1
  261. package/dist/assets/pieDiagram-DEJITSTG-M6H9O1Zx.js +0 -30
  262. package/dist/assets/radar-PYXPWWZC-D7zp6UFs.js +0 -1
  263. package/dist/assets/requirementDiagram-MS252O5E-CCrcik-n.js +0 -84
  264. package/dist/assets/sankeyDiagram-XADWPNL6-CRNv1awY.js +0 -10
  265. package/dist/assets/sequenceDiagram-FGHM5R23-lC2Xvi8e.js +0 -157
  266. package/dist/assets/stateDiagram-FHFEXIEX-BsT4r6v5.js +0 -1
  267. package/dist/assets/stateDiagram-v2-QKLJ7IA2-CKlxNo2v.js +0 -1
  268. package/dist/assets/timeline-definition-GMOUNBTQ-w_cR4g7m.js +0 -120
  269. package/dist/assets/treeView-SZITEDCU-HfzfaKhD.js +0 -1
  270. package/dist/assets/treemap-W4RFUUIX-BpYgVlT-.js +0 -1
  271. package/dist/assets/vennDiagram-DHZGUBPP-U8CN8IqB.js +0 -34
  272. package/dist/assets/wardley-RL74JXVD-C8I8sBuP.js +0 -1
  273. /package/dist/assets/{abap-BQSJSaZX.js → abap-MtXtrFp7.js} +0 -0
  274. /package/dist/assets/{abap-BwCvd_uv.js → abap-ZLdNE4Wj.js} +0 -0
  275. /package/dist/assets/{actionscript-3-CenfO-Jd.js → actionscript-3-BgNL0N1E.js} +0 -0
  276. /package/dist/assets/{actionscript-3-gHnZj_IX.js → actionscript-3-D4-vnRcI.js} +0 -0
  277. /package/dist/assets/{ada-C7LrH42H.js → ada-DXyBB0vJ.js} +0 -0
  278. /package/dist/assets/{ada-DGxzVDkQ.js → ada-DiRrRLS1.js} +0 -0
  279. /package/dist/assets/{andromeeda-BTUIr0mF.js → andromeeda-BBjKapps.js} +0 -0
  280. /package/dist/assets/{andromeeda-DSfgr5BX.js → andromeeda-vlJuqx_V.js} +0 -0
  281. /package/dist/assets/{apache-Bda3TqP6.js → apache-DLa6jFkS.js} +0 -0
  282. /package/dist/assets/{apache-D4u-omvp.js → apache-gaN-z7fa.js} +0 -0
  283. /package/dist/assets/{apex-AXKMPC1c.js → apex-CrhOo5CX.js} +0 -0
  284. /package/dist/assets/{apex-B0OXI1Ad.js → apex-Dpz-K4fb.js} +0 -0
  285. /package/dist/assets/{applescript-B6gWfyuK.js → applescript-C3rOV--1.js} +0 -0
  286. /package/dist/assets/{applescript-CVdEJqwJ.js → applescript-Cch61kU6.js} +0 -0
  287. /package/dist/assets/{ara-DwdP-FLf.js → ara-1z5kqg59.js} +0 -0
  288. /package/dist/assets/{ara-s7N21HYq.js → ara-ApwnWgO5.js} +0 -0
  289. /package/dist/assets/{array-B4O_ir3H.js → array-CYHT4lxU.js} +0 -0
  290. /package/dist/assets/{asciidoc-CASlmAAL.js → asciidoc-B-d6QnM2.js} +0 -0
  291. /package/dist/assets/{asciidoc-CxNLWMIT.js → asciidoc-DUQrwBgw.js} +0 -0
  292. /package/dist/assets/{asm-D1jSRTux.js → asm-Dm_lGFVw.js} +0 -0
  293. /package/dist/assets/{asm-OgC0tEuN.js → asm-rZD_19Wt.js} +0 -0
  294. /package/dist/assets/{aurora-x-Bp-8fXXj.js → aurora-x-BgStcHuo.js} +0 -0
  295. /package/dist/assets/{aurora-x-jSbaUjc-.js → aurora-x-pm_q1nsw.js} +0 -0
  296. /package/dist/assets/{awk-B41z4NGF.js → awk-B31vgP_8.js} +0 -0
  297. /package/dist/assets/{awk-CTnUhAeh.js → awk-BYgN-2ag.js} +0 -0
  298. /package/dist/assets/{ayu-dark-BRnT49co.js → ayu-dark-BzkKG4Sv.js} +0 -0
  299. /package/dist/assets/{ayu-dark-Dhapk7DG.js → ayu-dark-CzyDS4QL.js} +0 -0
  300. /package/dist/assets/{ayu-light-C3ut6S78.js → ayu-light-DdcqvO4T.js} +0 -0
  301. /package/dist/assets/{ayu-light-Rwg3X_QU.js → ayu-light-DmcmeFik.js} +0 -0
  302. /package/dist/assets/{ayu-mirage-CIhOaH6Q.js → ayu-mirage-CbIAqGv7.js} +0 -0
  303. /package/dist/assets/{ayu-mirage-LPBT8Hgr.js → ayu-mirage-J8giD7N2.js} +0 -0
  304. /package/dist/assets/{ballerina-D_dzLP2s.js → ballerina-CqWqtH8L.js} +0 -0
  305. /package/dist/assets/{ballerina-DmZamt2o.js → ballerina-POmyawgi.js} +0 -0
  306. /package/dist/assets/{bat-9Gr_zjda.js → bat-B6x_YHGG.js} +0 -0
  307. /package/dist/assets/{bat-BB3g37KZ.js → bat-qvjOTSvm.js} +0 -0
  308. /package/dist/assets/{beancount-DC8FvDPc.js → beancount-BEtieIDL.js} +0 -0
  309. /package/dist/assets/{beancount-wlzN2iTs.js → beancount-boLq-aT1.js} +0 -0
  310. /package/dist/assets/{berry-D8YyDloy.js → berry-BQrxWGfv.js} +0 -0
  311. /package/dist/assets/{berry-DiThExsQ.js → berry-BT1qbF1v.js} +0 -0
  312. /package/dist/assets/{bibtex-BNnXAEMi.js → bibtex-CWZmTJZ-.js} +0 -0
  313. /package/dist/assets/{bibtex-Og3IC7_E.js → bibtex-ncm3UjMC.js} +0 -0
  314. /package/dist/assets/{bicep-CzxXgJOH.js → bicep-DHUsSEkK.js} +0 -0
  315. /package/dist/assets/{bicep-Dhp4nbZf.js → bicep-DSO2VMUk.js} +0 -0
  316. /package/dist/assets/{bird2-CjJSmk68.js → bird2-COKvQMnx.js} +0 -0
  317. /package/dist/assets/{bird2-CImpTPgW.js → bird2-zNhXi_V-.js} +0 -0
  318. /package/dist/assets/{c-DA9ij3Yk.js → c-Cs0TSLm9.js} +0 -0
  319. /package/dist/assets/{c-Dqp35VxV.js → c-ZW765ZQI.js} +0 -0
  320. /package/dist/assets/{c3-DF0PLqbQ.js → c3-BVii1B9E.js} +0 -0
  321. /package/dist/assets/{c3-yRkNQH6S.js → c3-yuHhF9ON.js} +0 -0
  322. /package/dist/assets/{cadence-C6u1ajKt.js → cadence-BGk63-xQ.js} +0 -0
  323. /package/dist/assets/{cadence-DrM0mta4.js → cadence-BmsmHR8j.js} +0 -0
  324. /package/dist/assets/{catppuccin-frappe-DbfuXhWQ.js → catppuccin-frappe-CBk4LMuH.js} +0 -0
  325. /package/dist/assets/{catppuccin-frappe-wT-1oucM.js → catppuccin-frappe-DAOuYvzF.js} +0 -0
  326. /package/dist/assets/{catppuccin-latte-CKmzwagN.js → catppuccin-latte-AEEn_CxR.js} +0 -0
  327. /package/dist/assets/{catppuccin-latte-ClZdBKFk.js → catppuccin-latte-BwY8mtP2.js} +0 -0
  328. /package/dist/assets/{catppuccin-macchiato-0yTLOyQZ.js → catppuccin-macchiato-CQCcuUkT.js} +0 -0
  329. /package/dist/assets/{catppuccin-macchiato-agTVRa4-.js → catppuccin-macchiato-QZaRqe7n.js} +0 -0
  330. /package/dist/assets/{catppuccin-mocha-CvTnwmmQ.js → catppuccin-mocha-BBso-pxM.js} +0 -0
  331. /package/dist/assets/{catppuccin-mocha-DrqTQNGm.js → catppuccin-mocha-D6O32F3G.js} +0 -0
  332. /package/dist/assets/{clarity-BogpVWMq.js → clarity-Bz5rv1b0.js} +0 -0
  333. /package/dist/assets/{clarity-D4kXnOMF.js → clarity-_ZPS1UeA.js} +0 -0
  334. /package/dist/assets/{clojure-BXJI7MiU.js → clojure-BlfqDAxm.js} +0 -0
  335. /package/dist/assets/{clojure-CU1H5w97.js → clojure-yH1w6xR_.js} +0 -0
  336. /package/dist/assets/{cmake-BVF4QCKz.js → cmake-8InvLTn8.js} +0 -0
  337. /package/dist/assets/{cmake-DZmsFBtw.js → cmake-t9HbbaOy.js} +0 -0
  338. /package/dist/assets/{codeowners-Cdm6A9S3.js → codeowners-BUWzLKU_.js} +0 -0
  339. /package/dist/assets/{codeowners-DQaHtuJn.js → codeowners-CKIekHiG.js} +0 -0
  340. /package/dist/assets/{codeql-Vg2fFERB.js → codeql-CVrAnje1.js} +0 -0
  341. /package/dist/assets/{codeql-YVfDDodE.js → codeql-lIqjuzSV.js} +0 -0
  342. /package/dist/assets/{common-lisp-y44MWfG4.js → common-lisp-CwR7w7Mc.js} +0 -0
  343. /package/dist/assets/{common-lisp-y5hJ4jel.js → common-lisp-cIdwln0b.js} +0 -0
  344. /package/dist/assets/{coq-BMVjG743.js → coq-C2KdWVYe.js} +0 -0
  345. /package/dist/assets/{coq-DCi2D2rg.js → coq-CLaeVPd3.js} +0 -0
  346. /package/dist/assets/{csharp-BKDxX35Q.js → csharp-BVUqvcsv.js} +0 -0
  347. /package/dist/assets/{csharp-DHD49jcs.js → csharp-CiH7oTou.js} +0 -0
  348. /package/dist/assets/{css-i-HF6YIR.js → css-BNlbTijp.js} +0 -0
  349. /package/dist/assets/{css-DSF0HP5o.js → css-Bh2hm8bY.js} +0 -0
  350. /package/dist/assets/{csv-BX6okKA1.js → csv-BxO9mTca.js} +0 -0
  351. /package/dist/assets/{csv-nspFkDje.js → csv-CCnBNHSl.js} +0 -0
  352. /package/dist/assets/{cue-BBLYZHtk.js → cue-BTN5NZzf.js} +0 -0
  353. /package/dist/assets/{cue-D_SS4EtJ.js → cue-C-YX4DPo.js} +0 -0
  354. /package/dist/assets/{cypher-Brm-hpZF.js → cypher-37ZxORU9.js} +0 -0
  355. /package/dist/assets/{cypher-CelXvXKB.js → cypher-BFDPHm6j.js} +0 -0
  356. /package/dist/assets/{cytoscape.esm-BG6denMW.js → cytoscape.esm-DBshAXnz.js} +0 -0
  357. /package/dist/assets/{d-BEceXlO5.js → d-C9JWWN1n.js} +0 -0
  358. /package/dist/assets/{d-FyBdlCfG.js → d-CtFxtofm.js} +0 -0
  359. /package/dist/assets/{dark-plus-Bqm0-PLZ.js → dark-plus-Bbc19rIk.js} +0 -0
  360. /package/dist/assets/{dark-plus-CvQR6rTQ.js → dark-plus-Bj4JdSwp.js} +0 -0
  361. /package/dist/assets/{dart-Bml_P2jJ.js → dart-DXMuKonb.js} +0 -0
  362. /package/dist/assets/{dart-Cj1ClNiI.js → dart-DjTbWqyx.js} +0 -0
  363. /package/dist/assets/{dax-BeL-DnCZ.js → dax-eFeXdw2Y.js} +0 -0
  364. /package/dist/assets/{dax-illQyZvt.js → dax-v-cczdVz.js} +0 -0
  365. /package/dist/assets/{defaultLocale-CIS5GEjP.js → defaultLocale-DL4ssfbz.js} +0 -0
  366. /package/dist/assets/{desktop-CCGLJyll.js → desktop-DSalTQLu.js} +0 -0
  367. /package/dist/assets/{desktop-p2MzGAk1.js → desktop-vaRnhEHO.js} +0 -0
  368. /package/dist/assets/{diff-C_38Vv76.js → diff-9DLIDTu5.js} +0 -0
  369. /package/dist/assets/{diff-CrTv-5ZI.js → diff-BfcdpccF.js} +0 -0
  370. /package/dist/assets/{docker-CzKKu1de.js → docker-BfFZ8pW1.js} +0 -0
  371. /package/dist/assets/{docker-ZNL1zfeB.js → docker-CK1MATXl.js} +0 -0
  372. /package/dist/assets/{dotenv-C4ffPvMM.js → dotenv-6it1OykX.js} +0 -0
  373. /package/dist/assets/{dotenv-CBx-BxJu.js → dotenv-D5ku5y9e.js} +0 -0
  374. /package/dist/assets/{dracula-2Ni-IQfs.js → dracula-2ybYu6DR.js} +0 -0
  375. /package/dist/assets/{dracula-yChQ6UOm.js → dracula-oMeeHvzF.js} +0 -0
  376. /package/dist/assets/{dracula-soft-CwDCDhcT.js → dracula-soft-BOwF8T1o.js} +0 -0
  377. /package/dist/assets/{dracula-soft-_jcLxeK3.js → dracula-soft-DGAeH-LM.js} +0 -0
  378. /package/dist/assets/{dream-maker-Cc-WdbTe.js → dream-maker-BxUVYfId.js} +0 -0
  379. /package/dist/assets/{dream-maker-DOMn4RTb.js → dream-maker-DTyjEDlz.js} +0 -0
  380. /package/dist/assets/{emacs-lisp-Cr61IKeh.js → emacs-lisp-RCv_OPrX.js} +0 -0
  381. /package/dist/assets/{emacs-lisp-BqdimkUU.js → emacs-lisp-_PEL2UBn.js} +0 -0
  382. /package/dist/assets/{everforest-dark-CVBXDQVt.js → everforest-dark-BgfA4HUZ.js} +0 -0
  383. /package/dist/assets/{everforest-dark-Dmg1ilvk.js → everforest-dark-DrLyOUiK.js} +0 -0
  384. /package/dist/assets/{everforest-light-BebU8T7A.js → everforest-light-DnhbePvt.js} +0 -0
  385. /package/dist/assets/{everforest-light-CJWgO6Pe.js → everforest-light-VqyzUity.js} +0 -0
  386. /package/dist/assets/{fennel-DBaD-LQY.js → fennel-Tx9N_cxJ.js} +0 -0
  387. /package/dist/assets/{fennel-DIi8VOKN.js → fennel-o7i3YIOB.js} +0 -0
  388. /package/dist/assets/{fish-CE4UgAo-.js → fish-D_tzRFwx.js} +0 -0
  389. /package/dist/assets/{fish-nrxmmhV2.js → fish-jXqpL1U6.js} +0 -0
  390. /package/dist/assets/{fluent-Crxy1oTG.js → fluent-BJgigJ4-.js} +0 -0
  391. /package/dist/assets/{fluent-D1_8CMit.js → fluent-BTAopAVA.js} +0 -0
  392. /package/dist/assets/{fortran-free-form-DTSMyoB0.js → fortran-free-form-DQ6cnx5P.js} +0 -0
  393. /package/dist/assets/{fortran-free-form-Da5Qfzcl.js → fortran-free-form-T246OFmF.js} +0 -0
  394. /package/dist/assets/{gdscript-BHfiaxNA.js → gdscript-0eY0tghO.js} +0 -0
  395. /package/dist/assets/{gdscript-DkoEHsBI.js → gdscript-DilHUO6X.js} +0 -0
  396. /package/dist/assets/{gdshader-CQI7WXDk.js → gdshader-CVkSEAIh.js} +0 -0
  397. /package/dist/assets/{gdshader-Dnfm_G79.js → gdshader-qIQewyec.js} +0 -0
  398. /package/dist/assets/{genie-Bi5DRb3T.js → genie-BcwRv1XQ.js} +0 -0
  399. /package/dist/assets/{genie-C9WBboso.js → genie-C-OMPysf.js} +0 -0
  400. /package/dist/assets/{gherkin-98i24tAt.js → gherkin-D_M7YAKW.js} +0 -0
  401. /package/dist/assets/{gherkin-wRt97Rus.js → gherkin-NKgd_wpf.js} +0 -0
  402. /package/dist/assets/{github-dark-DBFTiEVa.js → github-dark-CzXQPWMH.js} +0 -0
  403. /package/dist/assets/{github-dark-XjHrXRLx.js → github-dark-DbG-K_ZU.js} +0 -0
  404. /package/dist/assets/{github-dark-default-BlHFW1Xq.js → github-dark-default-CQdxcuqA.js} +0 -0
  405. /package/dist/assets/{github-dark-default-zI3UD-l6.js → github-dark-default-NK7CxJCj.js} +0 -0
  406. /package/dist/assets/{github-dark-dimmed-COR7qLnn.js → github-dark-dimmed-Bpt5af_M.js} +0 -0
  407. /package/dist/assets/{github-dark-dimmed-DPLMJENw.js → github-dark-dimmed-BwMfzXHj.js} +0 -0
  408. /package/dist/assets/{github-dark-high-contrast-CCMJR-ST.js → github-dark-high-contrast-CLrESmNC.js} +0 -0
  409. /package/dist/assets/{github-dark-high-contrast-CEcpgbBl.js → github-dark-high-contrast-QJMvve25.js} +0 -0
  410. /package/dist/assets/{github-light-BohLdSAq.js → github-light-DoByupBO.js} +0 -0
  411. /package/dist/assets/{github-light-Kxa0z9ZJ.js → github-light-ZFz5Gc4p.js} +0 -0
  412. /package/dist/assets/{github-light-default-CsZtxnoI.js → github-light-default-Bm9VN_9a.js} +0 -0
  413. /package/dist/assets/{github-light-default-Du4mw56Q.js → github-light-default-CcMn0PC1.js} +0 -0
  414. /package/dist/assets/{github-light-high-contrast-9h8CIxoq.js → github-light-high-contrast-B7VTK3vM.js} +0 -0
  415. /package/dist/assets/{github-light-high-contrast-CkEwIfeF.js → github-light-high-contrast-CLOKWgO3.js} +0 -0
  416. /package/dist/assets/{gleam-BNJW6w14.js → gleam-BN8kD6xw.js} +0 -0
  417. /package/dist/assets/{gleam-DC6qyUWr.js → gleam-DWfIuUJE.js} +0 -0
  418. /package/dist/assets/{gn-CKPzOGdu.js → gn-v6v3PdnZ.js} +0 -0
  419. /package/dist/assets/{gn-DW8I8wGD.js → gn-wPomIxaL.js} +0 -0
  420. /package/dist/assets/{gnuplot-DXrZZ0B1.js → gnuplot-BdAdoyPd.js} +0 -0
  421. /package/dist/assets/{gnuplot-qVZW10eR.js → gnuplot-D3ERsOCN.js} +0 -0
  422. /package/dist/assets/{go-B3K3pzKB.js → go-BT4oYldF.js} +0 -0
  423. /package/dist/assets/{go-zV9XyGK9.js → go-CH_yyiUM.js} +0 -0
  424. /package/dist/assets/{groovy-CFK_l87v.js → groovy-BWwYHWp6.js} +0 -0
  425. /package/dist/assets/{groovy-Cp3UPZ1h.js → groovy-Ck8ECyM4.js} +0 -0
  426. /package/dist/assets/{gruvbox-dark-hard-C017QOkx.js → gruvbox-dark-hard-B48OGn6k.js} +0 -0
  427. /package/dist/assets/{gruvbox-dark-hard-Dy5IHzVs.js → gruvbox-dark-hard-CfmxcH2s.js} +0 -0
  428. /package/dist/assets/{gruvbox-dark-medium-2q68e0g8.js → gruvbox-dark-medium-9B3ggi3D.js} +0 -0
  429. /package/dist/assets/{gruvbox-dark-medium-B6kX073l.js → gruvbox-dark-medium-CyI-gkeO.js} +0 -0
  430. /package/dist/assets/{gruvbox-dark-soft-BsaphPHn.js → gruvbox-dark-soft-CnZ219w7.js} +0 -0
  431. /package/dist/assets/{gruvbox-dark-soft-C7KOyvzK.js → gruvbox-dark-soft-MWW5ZECQ.js} +0 -0
  432. /package/dist/assets/{gruvbox-light-hard-DPX6w85R.js → gruvbox-light-hard-B1BBClrb.js} +0 -0
  433. /package/dist/assets/{gruvbox-light-hard-DjldCZsz.js → gruvbox-light-hard-DrrkQubH.js} +0 -0
  434. /package/dist/assets/{gruvbox-light-medium-ASEoIYoS.js → gruvbox-light-medium-CR-qzlYD.js} +0 -0
  435. /package/dist/assets/{gruvbox-light-medium-W711xcAO.js → gruvbox-light-medium-Pa9PDKzo.js} +0 -0
  436. /package/dist/assets/{gruvbox-light-soft-BFlYdu_s.js → gruvbox-light-soft-CYX1WuHx.js} +0 -0
  437. /package/dist/assets/{gruvbox-light-soft-Rywo9bQr.js → gruvbox-light-soft-fK-V_Y0Y.js} +0 -0
  438. /package/dist/assets/{haskell-Bk58mJX8.js → haskell-BcuBlHQQ.js} +0 -0
  439. /package/dist/assets/{haskell-Cz2AnJCp.js → haskell-DNn76bqX.js} +0 -0
  440. /package/dist/assets/{haxe-BLSkUO2J.js → haxe-BClgBASn.js} +0 -0
  441. /package/dist/assets/{haxe-DQvYuVEX.js → haxe-Ds6BbIFI.js} +0 -0
  442. /package/dist/assets/{hcl-BBC2sXbk.js → hcl-Di6Zf7fX.js} +0 -0
  443. /package/dist/assets/{hcl-DZMmt-W-.js → hcl-ksSK2xk_.js} +0 -0
  444. /package/dist/assets/{hjson-B7870c_m.js → hjson-d9HL_Ztd.js} +0 -0
  445. /package/dist/assets/{hjson-COfn3JUd.js → hjson-n846ZK_5.js} +0 -0
  446. /package/dist/assets/{hlsl--Ch9_HUK.js → hlsl-Cn4xOp4H.js} +0 -0
  447. /package/dist/assets/{hlsl-D20YAbFy.js → hlsl-D0j01cr3.js} +0 -0
  448. /package/dist/assets/{horizon-BI3Sb14Y.js → horizon-CCCJ-JGr.js} +0 -0
  449. /package/dist/assets/{horizon-CY3vNEfk.js → horizon-ZVnuzBNV.js} +0 -0
  450. /package/dist/assets/{horizon-bright-C6pcnjyI.js → horizon-bright-B91if1Xb.js} +0 -0
  451. /package/dist/assets/{horizon-bright-CLpvwMHu.js → horizon-bright-Bl30OTfI.js} +0 -0
  452. /package/dist/assets/{houston--uhXSm8Z.js → houston-DURek53E.js} +0 -0
  453. /package/dist/assets/{houston-Dpm9OQMa.js → houston-Dm4pMJIX.js} +0 -0
  454. /package/dist/assets/{hy-3wwgVe3W.js → hy-BEBfvakU.js} +0 -0
  455. /package/dist/assets/{hy-Mbig2yDy.js → hy-DcRnuAnA.js} +0 -0
  456. /package/dist/assets/{identity-DGWmmQ1S.js → identity-BhK8cfbX.js} +0 -0
  457. /package/dist/assets/{imba--85IRScg.js → imba-DLi_4ppD.js} +0 -0
  458. /package/dist/assets/{imba-Dzto8QMk.js → imba-YxfLfDV5.js} +0 -0
  459. /package/dist/assets/{ini-LHZfr0Qw.js → ini-CyDQDxVk.js} +0 -0
  460. /package/dist/assets/{ini-vQ4hppLg.js → ini-DNM4EV4o.js} +0 -0
  461. /package/dist/assets/{init-BMBYmmUa.js → init-D0iKTvvc.js} +0 -0
  462. /package/dist/assets/{java-BBm2DxNa.js → java-CRBbboP-.js} +0 -0
  463. /package/dist/assets/{java-D9Vrbh9B.js → java-Cqg8bFY1.js} +0 -0
  464. /package/dist/assets/{javascript-jqgRGiFH.js → javascript-Cpa2yoQT.js} +0 -0
  465. /package/dist/assets/{javascript-v7Ro8pz9.js → javascript-DVxWqGdi.js} +0 -0
  466. /package/dist/assets/{json-DeDMUw4y.js → json-BkAcrDlM.js} +0 -0
  467. /package/dist/assets/{json-Dnhc0lKB.js → json-C4I52NpI.js} +0 -0
  468. /package/dist/assets/{json5-CUP0e6TD.js → json5-BavpNaDy.js} +0 -0
  469. /package/dist/assets/{json5-CgfO1yS0.js → json5-CHSDHNOs.js} +0 -0
  470. /package/dist/assets/{jsonc-B8EWaY_Q.js → jsonc-CQmNCDvv.js} +0 -0
  471. /package/dist/assets/{jsonc-Cp4AkhDv.js → jsonc-DnNY0bkA.js} +0 -0
  472. /package/dist/assets/{jsonl-B0SVJuXv.js → jsonl-DQ2x8clB.js} +0 -0
  473. /package/dist/assets/{jsonl-B5lZoOLs.js → jsonl-FKTLVwIK.js} +0 -0
  474. /package/dist/assets/{jsonnet-B46GN184.js → jsonnet-DbkyzC45.js} +0 -0
  475. /package/dist/assets/{jsonnet-Dje4rQrI.js → jsonnet-oWXNYF5Y.js} +0 -0
  476. /package/dist/assets/{jssm-Cgn5dsq3.js → jssm-CCMzEkXE.js} +0 -0
  477. /package/dist/assets/{jssm-Dma6K69O.js → jssm-CSQu3gIK.js} +0 -0
  478. /package/dist/assets/{jsx-Cjomne9D.js → jsx-Dp7se6LN.js} +0 -0
  479. /package/dist/assets/{jsx-Cpsejucb.js → jsx-lCxDgY3T.js} +0 -0
  480. /package/dist/assets/{kanagawa-dragon--V-emyaL.js → kanagawa-dragon-D47Y3CEJ.js} +0 -0
  481. /package/dist/assets/{kanagawa-dragon-Das9cNEK.js → kanagawa-dragon-q3IZG2mU.js} +0 -0
  482. /package/dist/assets/{kanagawa-lotus-BX39N2DS.js → kanagawa-lotus-BbU5dcfH.js} +0 -0
  483. /package/dist/assets/{kanagawa-lotus-DnK956dh.js → kanagawa-lotus-BeBFMub7.js} +0 -0
  484. /package/dist/assets/{kanagawa-wave-AsK-yss-.js → kanagawa-wave-Bi3j39e9.js} +0 -0
  485. /package/dist/assets/{kanagawa-wave-BkFi7GNe.js → kanagawa-wave-CpRC9T--.js} +0 -0
  486. /package/dist/assets/{kdl-4DIEU_TT.js → kdl-C0UIj31o.js} +0 -0
  487. /package/dist/assets/{kdl-COC76yGu.js → kdl-DR3WxD61.js} +0 -0
  488. /package/dist/assets/{kotlin-haPzc6L0.js → kotlin-DIske9EE.js} +0 -0
  489. /package/dist/assets/{kotlin-wSEtV-le.js → kotlin-vffgfDNS.js} +0 -0
  490. /package/dist/assets/{kusto-BwxItrR3.js → kusto-BeoGbFy9.js} +0 -0
  491. /package/dist/assets/{kusto-ZsTk552z.js → kusto-DSJENqrG.js} +0 -0
  492. /package/dist/assets/{laserwave-B1nHkdY2.js → laserwave-B4XktGfw.js} +0 -0
  493. /package/dist/assets/{laserwave-DLJSlbaX.js → laserwave-BzEYA8sS.js} +0 -0
  494. /package/dist/assets/{lean-CKeU2wUH.js → lean-C617-iIr.js} +0 -0
  495. /package/dist/assets/{lean-cebbF46q.js → lean-gMq75vwe.js} +0 -0
  496. /package/dist/assets/{less-BPKrdIth.js → less-CmMf7Yt5.js} +0 -0
  497. /package/dist/assets/{less-BexGDpL8.js → less-Cmnr-ah1.js} +0 -0
  498. /package/dist/assets/{light-plus-CMSqk0eR.js → light-plus-CjS5UTgi.js} +0 -0
  499. /package/dist/assets/{light-plus-COIM7_7O.js → light-plus-Dri-25vh.js} +0 -0
  500. /package/dist/assets/{llvm-CLyh4spG.js → llvm-CCYPHon7.js} +0 -0
  501. /package/dist/assets/{llvm-Cm9WosMq.js → llvm-C_5WH3kq.js} +0 -0
  502. /package/dist/assets/{log-BKQJGAOJ.js → log-B9ffk1py.js} +0 -0
  503. /package/dist/assets/{log-CF8UZB5_.js → log-DU60H7d_.js} +0 -0
  504. /package/dist/assets/{logo-Bn63hqkk.js → logo-BI4DfCc4.js} +0 -0
  505. /package/dist/assets/{logo-Cc1MEMd5.js → logo-CLmtY5PB.js} +0 -0
  506. /package/dist/assets/{luau-Dydru0Wn.js → luau-3JXtmgrW.js} +0 -0
  507. /package/dist/assets/{luau-aTVxW7Mo.js → luau-BvW230Dm.js} +0 -0
  508. /package/dist/assets/{make-B8ArqYTm.js → make-B9Qs4agE.js} +0 -0
  509. /package/dist/assets/{make-DdQe0zL5.js → make-CqOmBS7l.js} +0 -0
  510. /package/dist/assets/{markdown-AoFvLs70.js → markdown-dkut3LZ0.js} +0 -0
  511. /package/dist/assets/{markdown-CgjteJQd.js → markdown-pW8niWsW.js} +0 -0
  512. /package/dist/assets/{material-theme-BLGYdMNu.js → material-theme-B0GuAxhl.js} +0 -0
  513. /package/dist/assets/{material-theme-CQe8rLl5.js → material-theme-I9fgbTwI.js} +0 -0
  514. /package/dist/assets/{material-theme-darker-CvIzURMQ.js → material-theme-darker-CRuWVyXJ.js} +0 -0
  515. /package/dist/assets/{material-theme-darker-DCxBZL1v.js → material-theme-darker-CZbc7JwZ.js} +0 -0
  516. /package/dist/assets/{material-theme-lighter-BtNu4ZdT.js → material-theme-lighter-Burc_UpA.js} +0 -0
  517. /package/dist/assets/{material-theme-lighter-DLmWh0jT.js → material-theme-lighter-Buu8zUqH.js} +0 -0
  518. /package/dist/assets/{material-theme-ocean-BTlWEKbE.js → material-theme-ocean-B_2uOeYL.js} +0 -0
  519. /package/dist/assets/{material-theme-ocean-BmwScvzx.js → material-theme-ocean-DoxNB3O5.js} +0 -0
  520. /package/dist/assets/{material-theme-palenight-B2DVgBkx.js → material-theme-palenight-Byy4sFv9.js} +0 -0
  521. /package/dist/assets/{material-theme-palenight-CyQefFkN.js → material-theme-palenight-DUlHLk8V.js} +0 -0
  522. /package/dist/assets/{matlab-BsLqHNCR.js → matlab-CpQqW4hd.js} +0 -0
  523. /package/dist/assets/{matlab-DIvSJyAl.js → matlab-rI_w2MXu.js} +0 -0
  524. /package/dist/assets/{mdx-D-FrgNFk.js → mdx-BudPzR5G.js} +0 -0
  525. /package/dist/assets/{mdx-x4I_JW9U.js → mdx-sBdGCLwW.js} +0 -0
  526. /package/dist/assets/{mermaid-BqXGU_vL.js → mermaid-DGJIAvIh.js} +0 -0
  527. /package/dist/assets/{mermaid-dfahgFMB.js → mermaid-b44tA5S7.js} +0 -0
  528. /package/dist/assets/{min-dark-CcnhzGsG.js → min-dark-CGxIF4RX.js} +0 -0
  529. /package/dist/assets/{min-dark-DXngBN1W.js → min-dark-dyk1cWlJ.js} +0 -0
  530. /package/dist/assets/{min-light-Cnxol0f_.js → min-light-BwzTB6MR.js} +0 -0
  531. /package/dist/assets/{min-light-DeuKU4qG.js → min-light-qP5B9k9w.js} +0 -0
  532. /package/dist/assets/{mipsasm-BSP3INHl.js → mipsasm-COPi-7Vq.js} +0 -0
  533. /package/dist/assets/{mipsasm-Be2o0EDm.js → mipsasm-Dqxe8ApN.js} +0 -0
  534. /package/dist/assets/{mojo-DXHRIjd8.js → mojo-BNXa2_jf.js} +0 -0
  535. /package/dist/assets/{mojo-Di-caRXQ.js → mojo-DFNqigHG.js} +0 -0
  536. /package/dist/assets/{monokai-DZBBLZOj.js → monokai-6LF27W_4.js} +0 -0
  537. /package/dist/assets/{monokai-jBoVve0U.js → monokai-CJZeHyQI.js} +0 -0
  538. /package/dist/assets/{moonbit-DNIaaQo3.js → moonbit-BX9X9-tQ.js} +0 -0
  539. /package/dist/assets/{moonbit-DtrYYLXT.js → moonbit-ctcXZvn9.js} +0 -0
  540. /package/dist/assets/{move-BQMxt9qX.js → move-DO38Bgkl.js} +0 -0
  541. /package/dist/assets/{move-D0yDcecw.js → move-zLcwbUqu.js} +0 -0
  542. /package/dist/assets/{narrat-CFZydt86.js → narrat-DH1CsyUX.js} +0 -0
  543. /package/dist/assets/{narrat-CL9fRxrD.js → narrat-f1lpVZJf.js} +0 -0
  544. /package/dist/assets/{nextflow-groovy-DDxErILq.js → nextflow-groovy-BCzh_nVB.js} +0 -0
  545. /package/dist/assets/{nextflow-groovy-B3frOg_u.js → nextflow-groovy-DfRCsnXR.js} +0 -0
  546. /package/dist/assets/{night-owl-BtYu8rbc.js → night-owl-B6f2CW1l.js} +0 -0
  547. /package/dist/assets/{night-owl-DcjMXnnd.js → night-owl-B6yGOYAO.js} +0 -0
  548. /package/dist/assets/{night-owl-light-BR4Znsy8.js → night-owl-light-CScKiob4.js} +0 -0
  549. /package/dist/assets/{night-owl-light-DX7sOrh4.js → night-owl-light-Ckjy6rgf.js} +0 -0
  550. /package/dist/assets/{nix-Bj5h9ymh.js → nix-BhbhL18q.js} +0 -0
  551. /package/dist/assets/{nix-Cx9v3J8J.js → nix-Cifu1uDG.js} +0 -0
  552. /package/dist/assets/{nord-By42GHyo.js → nord-CLLrVCCc.js} +0 -0
  553. /package/dist/assets/{nord-CzGMyUS4.js → nord-CmoF6O1F.js} +0 -0
  554. /package/dist/assets/{nushell-DtrJAjIh.js → nushell-CdgXx64m.js} +0 -0
  555. /package/dist/assets/{nushell-uk5X0HXe.js → nushell-DDVwI-D5.js} +0 -0
  556. /package/dist/assets/{objective-c-B6wCWWn6.js → objective-c-CF3DCpbI.js} +0 -0
  557. /package/dist/assets/{objective-c-DxPCEIlf.js → objective-c-ChyETAB0.js} +0 -0
  558. /package/dist/assets/{objective-cpp-Bpt7G3rp.js → objective-cpp-BcqP6Aic.js} +0 -0
  559. /package/dist/assets/{objective-cpp-D0nqzpMQ.js → objective-cpp-r08tqKW0.js} +0 -0
  560. /package/dist/assets/{ocaml-CsAHT8CF.js → ocaml-BKHAcOrO.js} +0 -0
  561. /package/dist/assets/{ocaml-Dh4edwPm.js → ocaml-DxnUKbTf.js} +0 -0
  562. /package/dist/assets/{odin-C0pYeR92.js → odin-CflY3BWK.js} +0 -0
  563. /package/dist/assets/{odin-D8DdX0UG.js → odin-D2DKZf1q.js} +0 -0
  564. /package/dist/assets/{one-dark-pro-CNnDppIa.js → one-dark-pro-Ch15I4-0.js} +0 -0
  565. /package/dist/assets/{one-dark-pro-DnsuSyt8.js → one-dark-pro-Dc1N-T5Q.js} +0 -0
  566. /package/dist/assets/{one-light-DF9RpSDy.js → one-light-BAzy_jBP.js} +0 -0
  567. /package/dist/assets/{one-light-DMQK5gnC.js → one-light-DpX7NQM7.js} +0 -0
  568. /package/dist/assets/{openscad-BkDRtc32.js → openscad-BMusln0G.js} +0 -0
  569. /package/dist/assets/{openscad-D5S34z6z.js → openscad-B_zRpkpM.js} +0 -0
  570. /package/dist/assets/{pascal-BpgIIeBb.js → pascal-BKuCIWM_.js} +0 -0
  571. /package/dist/assets/{pascal-ChK6lVWl.js → pascal-Ps2K_AdE.js} +0 -0
  572. /package/dist/assets/{path-CIRGLb_6.js → path-BoFZ_ZCz.js} +0 -0
  573. /package/dist/assets/{pkl-CM9vhRUe.js → pkl-DenWThyC.js} +0 -0
  574. /package/dist/assets/{pkl-D5xyX8T6.js → pkl-LEYeyt_p.js} +0 -0
  575. /package/dist/assets/{plastic-BG6M8IKY.js → plastic-CVy4QXig.js} +0 -0
  576. /package/dist/assets/{plastic-BiAertzB.js → plastic-CYMS6aya.js} +0 -0
  577. /package/dist/assets/{plsql-C0x0IDqn.js → plsql-ZRlYPQAy.js} +0 -0
  578. /package/dist/assets/{plsql-DqqD55I5.js → plsql-fI9PIVwT.js} +0 -0
  579. /package/dist/assets/{po-DIOZo1o6.js → po-CibsDrvS.js} +0 -0
  580. /package/dist/assets/{po-DzP5bUaW.js → po-DLTWlrqV.js} +0 -0
  581. /package/dist/assets/{poimandres-BB7Xgbz9.js → poimandres-DdbhRq91.js} +0 -0
  582. /package/dist/assets/{poimandres-BneX-j6K.js → poimandres-Ke3o9EOF.js} +0 -0
  583. /package/dist/assets/{polar-C9-kPm48.js → polar-DUoF5U0u.js} +0 -0
  584. /package/dist/assets/{polar-D0s86RFn.js → polar-Gl7ZfGca.js} +0 -0
  585. /package/dist/assets/{postcss-BnulIUEb.js → postcss-BaPK48jz.js} +0 -0
  586. /package/dist/assets/{postcss-CYTRCHTb.js → postcss-_4KnAWK8.js} +0 -0
  587. /package/dist/assets/{powerquery-1Gu8n5el.js → powerquery-CA_b7ahr.js} +0 -0
  588. /package/dist/assets/{powerquery-BwfF_TPi.js → powerquery-DFoWq5qH.js} +0 -0
  589. /package/dist/assets/{powershell-BqpKqCHf.js → powershell-DFwmRix9.js} +0 -0
  590. /package/dist/assets/{powershell-DiTOAvVG.js → powershell-sGr19NH7.js} +0 -0
  591. /package/dist/assets/{prisma-BbbZNPx8.js → prisma-CnzQ94tG.js} +0 -0
  592. /package/dist/assets/{prisma-Dy7-6TlJ.js → prisma-DT2bTtrZ.js} +0 -0
  593. /package/dist/assets/{prolog-B3alvaUl.js → prolog-DDGG773D.js} +0 -0
  594. /package/dist/assets/{prolog-JdUWr9ZQ.js → prolog-DtQ9yJfT.js} +0 -0
  595. /package/dist/assets/{proto-CM8RhGzT.js → proto--IqZrpkn.js} +0 -0
  596. /package/dist/assets/{proto-CO1DRfgi.js → proto-DwM9UHil.js} +0 -0
  597. /package/dist/assets/{puppet-Qm1lNYMI.js → puppet-DsEuO1X7.js} +0 -0
  598. /package/dist/assets/{puppet-fRMJ-zLB.js → puppet-DtkUwgDf.js} +0 -0
  599. /package/dist/assets/{purescript-Cu0D-Scy.js → purescript-BTSir1Xo.js} +0 -0
  600. /package/dist/assets/{purescript-Cu4kitCA.js → purescript-mdEb8r99.js} +0 -0
  601. /package/dist/assets/{python-Dsd_U2d1.js → python-BGHBflPa.js} +0 -0
  602. /package/dist/assets/{python-SQ8pU-oY.js → python-CiZjse7V.js} +0 -0
  603. /package/dist/assets/{qmldir-BA3N_LQW.js → qmldir-CtYPMSE3.js} +0 -0
  604. /package/dist/assets/{qmldir-vfRNLzib.js → qmldir-DbCRoHE3.js} +0 -0
  605. /package/dist/assets/{qss-BXElExJX.js → qss-DRMNzZ59.js} +0 -0
  606. /package/dist/assets/{qss-BdE4W2sJ.js → qss-FArcs841.js} +0 -0
  607. /package/dist/assets/{r-Bujb26Sh.js → r-8LjuGvrb.js} +0 -0
  608. /package/dist/assets/{r-DLlxWALz.js → r-CUg6wo0X.js} +0 -0
  609. /package/dist/assets/{racket-Bha5tuot.js → racket-B-AgENGF.js} +0 -0
  610. /package/dist/assets/{racket-Cj02nSiY.js → racket-D_QPqTKn.js} +0 -0
  611. /package/dist/assets/{raku-BY3_s-iN.js → raku-BMtsu35y.js} +0 -0
  612. /package/dist/assets/{raku-D1qVpxZS.js → raku-DBZIRFvi.js} +0 -0
  613. /package/dist/assets/{red-Cz5T5SwU.js → red-BVkkvqT5.js} +0 -0
  614. /package/dist/assets/{red-MpbIVJ0c.js → red-Cqqi2Qmm.js} +0 -0
  615. /package/dist/assets/{reg-D3bRiRc7.js → reg-BC-LA5Qp.js} +0 -0
  616. /package/dist/assets/{reg-WQqsAsHR.js → reg-BbXDLMPW.js} +0 -0
  617. /package/dist/assets/{regexp-Bnm8NSJK.js → regexp-BfXnO9Ht.js} +0 -0
  618. /package/dist/assets/{regexp-D1UnLH6r.js → regexp-Cs5_e8GY.js} +0 -0
  619. /package/dist/assets/{rel-BD3aoAJw.js → rel-CKAqwkdL.js} +0 -0
  620. /package/dist/assets/{rel-CAwAgMdi.js → rel-mxvjU_x3.js} +0 -0
  621. /package/dist/assets/{riscv-B9G6bPaw.js → riscv-BlvsE9dl.js} +0 -0
  622. /package/dist/assets/{riscv-Bwb6jJnE.js → riscv-Cm2iwgmF.js} +0 -0
  623. /package/dist/assets/{ron-CC_Kwbs9.js → ron-52n37KMa.js} +0 -0
  624. /package/dist/assets/{ron-rOkazm9k.js → ron-DQFiPKpI.js} +0 -0
  625. /package/dist/assets/{rose-pine-BfBjCvoK.js → rose-pine-BQZdLH9g.js} +0 -0
  626. /package/dist/assets/{rose-pine-CFCPMKym.js → rose-pine-BW5RU-re.js} +0 -0
  627. /package/dist/assets/{rose-pine-dawn-CGOYpx8p.js → rose-pine-dawn-D64bZARe.js} +0 -0
  628. /package/dist/assets/{rose-pine-dawn-DTZ_4mM_.js → rose-pine-dawn-DoqeeC3U.js} +0 -0
  629. /package/dist/assets/{rose-pine-moon-BScMTKX3.js → rose-pine-moon-BV6GNRHj.js} +0 -0
  630. /package/dist/assets/{rose-pine-moon-BYLemN81.js → rose-pine-moon-Dur094mG.js} +0 -0
  631. /package/dist/assets/{rosmsg-BLdte67e.js → rosmsg-UyrZIIwN.js} +0 -0
  632. /package/dist/assets/{rosmsg-Bpip8CZU.js → rosmsg-pUGfa73B.js} +0 -0
  633. /package/dist/assets/{rough.esm-QubteJ5L.js → rough.esm-DEh6Frf9.js} +0 -0
  634. /package/dist/assets/{rust-B5LMfvre.js → rust-DyDpj5Wl.js} +0 -0
  635. /package/dist/assets/{rust-BK81pYaw.js → rust-gKoOtISS.js} +0 -0
  636. /package/dist/assets/{sass-B3GwF4Z0.js → sass-BWkm3LsR.js} +0 -0
  637. /package/dist/assets/{sass-DO2aR_QP.js → sass-D_gdEHBM.js} +0 -0
  638. /package/dist/assets/{scala-D5C3WRl3.js → scala-C-5pJ0y_.js} +0 -0
  639. /package/dist/assets/{scala-DiywPrKz.js → scala-DNT7BEHY.js} +0 -0
  640. /package/dist/assets/{scheme-Bbzlb71Z.js → scheme-CPm_ASX9.js} +0 -0
  641. /package/dist/assets/{scheme-Czt4LJMz.js → scheme-nljwiTX7.js} +0 -0
  642. /package/dist/assets/{sdbl-BuDeRTaJ.js → sdbl-DWnO-pW9.js} +0 -0
  643. /package/dist/assets/{sdbl-DQyyYnfn.js → sdbl-f-RzDkID.js} +0 -0
  644. /package/dist/assets/{shellscript-BA71SJiB.js → shellscript-246l_CV_.js} +0 -0
  645. /package/dist/assets/{shellscript-YA0ieink.js → shellscript-MtXESoVu.js} +0 -0
  646. /package/dist/assets/{slack-dark-Bp1vS2dR.js → slack-dark-D5PCG6zY.js} +0 -0
  647. /package/dist/assets/{slack-dark-C6vv525O.js → slack-dark-Dmkpgw8l.js} +0 -0
  648. /package/dist/assets/{slack-ochin-BPyKK9TW.js → slack-ochin-C8_tFsxN.js} +0 -0
  649. /package/dist/assets/{slack-ochin-CN4_HV-c.js → slack-ochin-CJhhkdEa.js} +0 -0
  650. /package/dist/assets/{smalltalk-CbTRqW77.js → smalltalk-CX8rf-Mk.js} +0 -0
  651. /package/dist/assets/{smalltalk-Ch3eZDor.js → smalltalk-CdlSHLiV.js} +0 -0
  652. /package/dist/assets/{snazzy-light-Ba3rl8Js.js → snazzy-light-Cr_XMyAN.js} +0 -0
  653. /package/dist/assets/{snazzy-light-DG3IMMeE.js → snazzy-light-D_MqmPzn.js} +0 -0
  654. /package/dist/assets/{solarized-dark-Bpp-CZv7.js → solarized-dark-BjTykVMl.js} +0 -0
  655. /package/dist/assets/{solarized-dark-DbzG1qZn.js → solarized-dark-DgYuRXKz.js} +0 -0
  656. /package/dist/assets/{solarized-light-B89ZUJWi.js → solarized-light-BZLLgGyu.js} +0 -0
  657. /package/dist/assets/{solarized-light-DiocsXOc.js → solarized-light-DPet7_cZ.js} +0 -0
  658. /package/dist/assets/{solidity-B1c98SFg.js → solidity--IaVYjFZ.js} +0 -0
  659. /package/dist/assets/{solidity-DjI3Nuy7.js → solidity-CixyQr8o.js} +0 -0
  660. /package/dist/assets/{splunk-DCRTZo6Q.js → splunk-Dxrj7cOP.js} +0 -0
  661. /package/dist/assets/{splunk-Du9N1_aH.js → splunk-_QwQse06.js} +0 -0
  662. /package/dist/assets/{sql-1ctExOkD.js → sql-B_MmwxVm.js} +0 -0
  663. /package/dist/assets/{sql-Cd8AeqtG.js → sql-KWw2ixyZ.js} +0 -0
  664. /package/dist/assets/{ssh-config-BlbD09fK.js → ssh-config-BPyiTEhv.js} +0 -0
  665. /package/dist/assets/{ssh-config-DTAWL9NO.js → ssh-config-Bw6i1uGR.js} +0 -0
  666. /package/dist/assets/{stylus-DS906K8K.js → stylus-B5_eVOG1.js} +0 -0
  667. /package/dist/assets/{stylus-DWikgy2L.js → stylus-BRjIdNaI.js} +0 -0
  668. /package/dist/assets/{swift-D6PmPuO4.js → swift-BKjGZ3kI.js} +0 -0
  669. /package/dist/assets/{swift-fEeXotsN.js → swift-D_GPHzVt.js} +0 -0
  670. /package/dist/assets/{synthwave-84-CqVLrvQo.js → synthwave-84-BpimzZ_P.js} +0 -0
  671. /package/dist/assets/{synthwave-84-Ed0f9nWO.js → synthwave-84-DxdsujTN.js} +0 -0
  672. /package/dist/assets/{system-verilog-6HhXtm2m.js → system-verilog-CoT3sy6B.js} +0 -0
  673. /package/dist/assets/{system-verilog-Dojc_OTO.js → system-verilog-Cp5krGt2.js} +0 -0
  674. /package/dist/assets/{systemd-Dh47pgM3.js → systemd-Boj767kS.js} +0 -0
  675. /package/dist/assets/{systemd-mWxTHLP1.js → systemd-iFzXOqMs.js} +0 -0
  676. /package/dist/assets/{talonscript-b6WcfuKK.js → talonscript-C2y347NZ.js} +0 -0
  677. /package/dist/assets/{talonscript-oETycVSN.js → talonscript-DnvENotk.js} +0 -0
  678. /package/dist/assets/{tasl-B5djyne2.js → tasl-DFfKKGR2.js} +0 -0
  679. /package/dist/assets/{tasl-CGfAJNMw.js → tasl-UM_bHGae.js} +0 -0
  680. /package/dist/assets/{tcl-BmX4yLLy.js → tcl-CzfTkjZ6.js} +0 -0
  681. /package/dist/assets/{tcl-CFQGWgeT.js → tcl-DRFkBEze.js} +0 -0
  682. /package/dist/assets/{terraform-BNGWnOpF.js → terraform-Cr8TpTov.js} +0 -0
  683. /package/dist/assets/{terraform-BaoXmPva.js → terraform-Dse-iQ9t.js} +0 -0
  684. /package/dist/assets/{tokyo-night-Dpc-y5OW.js → tokyo-night-C0H6ztgq.js} +0 -0
  685. /package/dist/assets/{tokyo-night-KcaZ3xD-.js → tokyo-night-CxWOuYuq.js} +0 -0
  686. /package/dist/assets/{toml-BnUUIhKD.js → toml-B6YYqquZ.js} +0 -0
  687. /package/dist/assets/{toml-C52MiYDy.js → toml-X_n1S02q.js} +0 -0
  688. /package/dist/assets/{tsv-CSh8pY9l.js → tsv-BUpjchxv.js} +0 -0
  689. /package/dist/assets/{tsv-Dnz5BvrE.js → tsv-CJMvFGxb.js} +0 -0
  690. /package/dist/assets/{tsx-BVt-WMkV.js → tsx-3_QbaL3X.js} +0 -0
  691. /package/dist/assets/{tsx-y12Me8ah.js → tsx-Cw6jWh37.js} +0 -0
  692. /package/dist/assets/{turtle-CYE1FbKL.js → turtle-C4YJmC8S.js} +0 -0
  693. /package/dist/assets/{turtle-DzQT7XRo.js → turtle-DMmncelR.js} +0 -0
  694. /package/dist/assets/{typescript-C7SunSQO.js → typescript-C-73D8Co.js} +0 -0
  695. /package/dist/assets/{typescript-Cjc6tpxZ.js → typescript-CHh8HHl_.js} +0 -0
  696. /package/dist/assets/{typespec-DI9Mb7XW.js → typespec-0sYIIYUy.js} +0 -0
  697. /package/dist/assets/{typespec-WJ72L-Cw.js → typespec-7Vsz_oqm.js} +0 -0
  698. /package/dist/assets/{typst-COv9_EMJ.js → typst-BS7CNecZ.js} +0 -0
  699. /package/dist/assets/{typst-D6FTjC6U.js → typst-DBjhjUQY.js} +0 -0
  700. /package/dist/assets/{v-D9kKD3_v.js → v-BmVHErHK.js} +0 -0
  701. /package/dist/assets/{v-zbK5e4PP.js → v-CHLUYMRH.js} +0 -0
  702. /package/dist/assets/{vala-DF_gjYg8.js → vala-BL8YlVFd.js} +0 -0
  703. /package/dist/assets/{vala-DORh_0S1.js → vala-CxdhiNPt.js} +0 -0
  704. /package/dist/assets/{vb-5D2F0MlC.js → vb-CBy7ZYkb.js} +0 -0
  705. /package/dist/assets/{vb-CPiub6Ea.js → vb-D9e8cAb_.js} +0 -0
  706. /package/dist/assets/{verilog-BWY4WnOt.js → verilog-DKdoVc_A.js} +0 -0
  707. /package/dist/assets/{verilog-C_Qq7f2t.js → verilog-DPTVOhF5.js} +0 -0
  708. /package/dist/assets/{vesper-DLPvfyKe.js → vesper-BqMPbytQ.js} +0 -0
  709. /package/dist/assets/{vesper-OxOvAEOt.js → vesper-CmalT_e3.js} +0 -0
  710. /package/dist/assets/{vhdl-BDRxB2lX.js → vhdl-BDo0Xa_C.js} +0 -0
  711. /package/dist/assets/{vhdl-wAVlER_Y.js → vhdl-DtzVbXzj.js} +0 -0
  712. /package/dist/assets/{viml-DWBq_0An.js → viml-Bb1fLIgL.js} +0 -0
  713. /package/dist/assets/{viml-ONpIynY0.js → viml-kDNnOCg0.js} +0 -0
  714. /package/dist/assets/{vitesse-black-BMOET0gL.js → vitesse-black-CBEogNRC.js} +0 -0
  715. /package/dist/assets/{vitesse-black-BRI8rp3D.js → vitesse-black-_bPfYgrC.js} +0 -0
  716. /package/dist/assets/{vitesse-dark-BQoqdCVu.js → vitesse-dark-6l4x90Kr.js} +0 -0
  717. /package/dist/assets/{vitesse-dark-DH3BM7f3.js → vitesse-dark-McvxqdrO.js} +0 -0
  718. /package/dist/assets/{vitesse-light-CuVenzCI.js → vitesse-light-CWGgRCvr.js} +0 -0
  719. /package/dist/assets/{vitesse-light-Dewn6hMB.js → vitesse-light-D5vTabxg.js} +0 -0
  720. /package/dist/assets/{vyper-CveV04hJ.js → vyper-BoicJa8D.js} +0 -0
  721. /package/dist/assets/{vyper-p76nPEcZ.js → vyper-D2QCq6gX.js} +0 -0
  722. /package/dist/assets/{wasm-B8HgtRtc.js → wasm-BOH38yL_.js} +0 -0
  723. /package/dist/assets/{wasm-DsvvwBWh.js → wasm-Bnwmaszn.js} +0 -0
  724. /package/dist/assets/{wasm-g64TIOl0.js → wasm-DLQZzE1s.js} +0 -0
  725. /package/dist/assets/{wasm-DvSqnd5u.js → wasm-EnzO1wOY.js} +0 -0
  726. /package/dist/assets/{wenyan-CjH0hx9E.js → wenyan-Cy_mxU5q.js} +0 -0
  727. /package/dist/assets/{wenyan-D-B3MPMZ.js → wenyan-ygG9GT-L.js} +0 -0
  728. /package/dist/assets/{wgsl-B9qNelbr.js → wgsl-DCrqhD_Q.js} +0 -0
  729. /package/dist/assets/{wgsl-BuQmsbqC.js → wgsl-DWYw-pSW.js} +0 -0
  730. /package/dist/assets/{wikitext-7ZJ4E8Mh.js → wikitext-C7YKi9IK.js} +0 -0
  731. /package/dist/assets/{wikitext-C_fcZWrL.js → wikitext-Chtc_mLq.js} +0 -0
  732. /package/dist/assets/{wit-BsTMXInE.js → wit-BJAZQUwN.js} +0 -0
  733. /package/dist/assets/{wit-qaEU24Lo.js → wit-BX2jNrWD.js} +0 -0
  734. /package/dist/assets/{wolfram-B1FZMVpP.js → wolfram-BMFNjnaU.js} +0 -0
  735. /package/dist/assets/{wolfram-CDfXlYNm.js → wolfram-Cm14xWVi.js} +0 -0
  736. /package/dist/assets/{yaml-ByH0tLZI.js → yaml-ddhg4MZJ.js} +0 -0
  737. /package/dist/assets/{yaml-D6mSj_of.js → yaml-oqPcGiBF.js} +0 -0
  738. /package/dist/assets/{zenscript-DXa5pGDJ.js → zenscript-Br1JV4jg.js} +0 -0
  739. /package/dist/assets/{zenscript-R82HG39L.js → zenscript-CE8gYYue.js} +0 -0
  740. /package/dist/assets/{zig-BGgPwBL8.js → zig-CBzbITnn.js} +0 -0
  741. /package/dist/assets/{zig-DyyRGi-g.js → zig-CerxHNjg.js} +0 -0
@@ -0,0 +1,525 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-uJ7b1CnK.js","assets/chunk-Dlc7tRH4.js","assets/html-BovkiBbn.js","assets/css-Bh2hm8bY.js","assets/javascript-DVxWqGdi.js","assets/angular-ts-D88ijnYb.js","assets/scss-CbYD1uQt.js","assets/apl-C6AWXEwk.js","assets/json-C4I52NpI.js","assets/xml-CaOAAu6Y.js","assets/java-Cqg8bFY1.js","assets/astro-Ukc-k5AJ.js","assets/postcss-BaPK48jz.js","assets/tsx-3_QbaL3X.js","assets/typescript-C-73D8Co.js","assets/blade-0jpZTnSR.js","assets/html-derivative-CRfvxyYX.js","assets/sql-KWw2ixyZ.js","assets/bsl-D3T-XG_R.js","assets/sdbl-DWnO-pW9.js","assets/c-ZW765ZQI.js","assets/cairo-Q_T2FuvI.js","assets/python-BGHBflPa.js","assets/cobol-DHTCqGzR.js","assets/coffee-TSM3EVZg.js","assets/cpp-dQzhxFcr.js","assets/glsl-DJmvQUze.js","assets/regexp-BfXnO9Ht.js","assets/crystal-Cy1QxX5g.js","assets/shellscript-MtXESoVu.js","assets/edge-Ct1vgnBt.js","assets/elixir-D8kTd5f6.js","assets/elm-1nE2xrL_.js","assets/erb-CEK5dUqj.js","assets/ruby-Avb9jgNg.js","assets/graphql-Hv4rukMG.js","assets/jsx-lCxDgY3T.js","assets/haml-DmHNVaVz.js","assets/lua-CfrLAckd.js","assets/yaml-ddhg4MZJ.js","assets/erlang-R9i3kMP5.js","assets/markdown-pW8niWsW.js","assets/fortran-fixed-form-CHZzH8CX.js","assets/fortran-free-form-DQ6cnx5P.js","assets/fsharp-Bh8uGiJv.js","assets/gdresource-BMHd1vI1.js","assets/gdscript-0eY0tghO.js","assets/gdshader-qIQewyec.js","assets/git-commit-CAgaRK7M.js","assets/diff-9DLIDTu5.js","assets/git-rebase-lAV3NdsY.js","assets/glimmer-js-uTQdEYVu.js","assets/glimmer-ts-BZRip_b-.js","assets/hack-CBuct2_L.js","assets/handlebars-RSx4FtJn.js","assets/http-Dp7zj0d8.js","assets/hurl-kTt4HYJA.js","assets/csv-CCnBNHSl.js","assets/hxml-QnJ9WbXI.js","assets/haxe-BClgBASn.js","assets/jinja-D29CiUKc.js","assets/jison-CrnyBoqW.js","assets/julia-BNcC4e--.js","assets/r-8LjuGvrb.js","assets/just-B5-X6go-.js","assets/perl-DYtcpUn_.js","assets/latex-C14mcCCR.js","assets/tex-Dw3zOkcW.js","assets/liquid-BeEBtHlP.js","assets/marko-DvCuxMAY.js","assets/less-CmMf7Yt5.js","assets/mdc-CUwzVnlt.js","assets/nextflow-iKg2KdJ3.js","assets/nextflow-groovy-DfRCsnXR.js","assets/nginx-TG5RBkWS.js","assets/nim-CNs9dAJo.js","assets/php-CY2BFAJ3.js","assets/pug-O_iDttis.js","assets/qml-DidK4YIl.js","assets/razor-BG9tcYbl.js","assets/csharp-BVUqvcsv.js","assets/rst-B43mac11.js","assets/cmake-8InvLTn8.js","assets/sas-XM_MUfXH.js","assets/shaderlab-B3KmLsfH.js","assets/hlsl-D0j01cr3.js","assets/shellsession-BXYbv0ko.js","assets/soy-8qbhbHdk.js","assets/sparql-B7pQSNyT.js","assets/turtle-DMmncelR.js","assets/stata-CHe_USAa.js","assets/surrealql-CKeJQu5O.js","assets/svelte-CnPpq295.js","assets/templ-Hyv8wlyY.js","assets/go-CH_yyiUM.js","assets/ts-tags-C5sBTDbR.js","assets/twig-BqTJC7Z5.js","assets/vue-DtdqQCVt.js","assets/vue-html-aqjMLUT8.js","assets/vue-vine-DaWwjEPF.js","assets/stylus-B5_eVOG1.js","assets/xsl-Bie8MQNk.js","assets/dagre-KV5264BT-D-09dDzP.js","assets/chunk-U2HBQHQK-DZcOXz0k.js","assets/src-yS7GtxRa.js","assets/chunk-5PVQY5BW-5xQJ1V0h.js","assets/dist-ya5h1mP3.js","assets/chunk-ICPOFSXX-DhSKCi44.js","assets/preload-helper-DSXbuxSR.js","assets/identity-BhK8cfbX.js","assets/dagre-MfJlB_AO.js","assets/graphlib-BUpMknsW.js","assets/reduce-5uzJj95g.js","assets/flatten-By5LjgHe.js","assets/clone-6tntRHBM.js","assets/chunk-5FUZZQ4R-BkjLQcGk.js","assets/chunk-X2U36JSP-A88HrmUK.js","assets/chunk-ZZ45TVLE-Qm-AMNbA.js","assets/rough.esm-DEh6Frf9.js","assets/chunk-BSJP7CBP-YyA7eZXL.js","assets/chunk-ENJZ2VHE-BX61UO09.js","assets/line-0lkZ_Ak7.js","assets/path-BoFZ_ZCz.js","assets/array-CYHT4lxU.js","assets/cose-bilkent-S5V4N54A-DX__-T-O.js","assets/cytoscape.esm-DBshAXnz.js","assets/c4Diagram-AHTNJAMY-DekoM4-h.js","assets/chunk-YZCP3GAM-D4YvlLgj.js","assets/flowDiagram-DWJPFMVM-BzNKfuB7.js","assets/channel-BL-54IZi.js","assets/chunk-55IACEB6-D-96as2q.js","assets/chunk-EDXVE4YY-cBzrRjBV.js","assets/chunk-FMBD7UC4-BiW50_vE.js","assets/erDiagram-SMLLAGMA-ByIgp8Eo.js","assets/gitGraphDiagram-UUTBAWPF-BsxSqc1_.js","assets/mermaid-parser.core-KO1ISlkr.js","assets/chunk-K5T4RW27-CHk5PJuP.js","assets/chunk-2KRD3SAO-CzvOU1cB.js","assets/chunk-67CJDMHE-Dhe-2lGN.js","assets/chunk-7N4EOEYR-CUj6-RNp.js","assets/chunk-AA7GKIK3-6A7FbvAM.js","assets/chunk-CIAEETIT-D0SgWMsl.js","assets/chunk-FOC6F5B3-BTf-o2m7.js","assets/chunk-KGLVRYIC-C3oIfxi2.js","assets/chunk-LIHQZDEY-DxHBJKk1.js","assets/chunk-ORNJ4GCN-CVUx7szq.js","assets/chunk-4BX2VUAB-b52x3Bdl.js","assets/chunk-QZHKN3VN-6leYLibG.js","assets/ganttDiagram-T4ZO3ILL-DlhOhzIY.js","assets/linear-DMPU7_iu.js","assets/defaultLocale-DL4ssfbz.js","assets/init-D0iKTvvc.js","assets/infoDiagram-42DDH7IO-D3DzEWgU.js","assets/pieDiagram-DEJITSTG-loypmzPR.js","assets/ordinal-t_ha_BUo.js","assets/arc-BIBvaAF-.js","assets/quadrantDiagram-34T5L4WZ-DZ4KpC1p.js","assets/xychartDiagram-5P7HB3ND-BciTYgBN.js","assets/requirementDiagram-MS252O5E-g6mOII2w.js","assets/sequenceDiagram-FGHM5R23-DdcFzOps.js","assets/classDiagram-6PBFFD2Q-DJG5iG41.js","assets/chunk-4TB4RGXK--uznt3wP.js","assets/classDiagram-v2-HSJHXN6E-Bb0dA9zB.js","assets/stateDiagram-FHFEXIEX-aPTzDIYk.js","assets/chunk-OYMX7WX6-V5XYDHy6.js","assets/stateDiagram-v2-QKLJ7IA2-FcVD5MeB.js","assets/journeyDiagram-VCZTEJTY-BW4urxP0.js","assets/timeline-definition-GMOUNBTQ-Dv0o3bm2.js","assets/mindmap-definition-QFDTVHPH-BYxkj8M5.js","assets/kanban-definition-6JOO6SKY-HE7NzVUF.js","assets/sankeyDiagram-XADWPNL6-DTcXqWic.js","assets/diagram-TYMM5635-BpoWQOZz.js","assets/diagram-MMDJMWI5-DQVh8vi4.js","assets/blockDiagram-DXYQGD6D-Z6Y3BGVg.js","assets/diagram-5BDNPKRD-CV0UxZuv.js","assets/architectureDiagram-Q4EWVU46-DcS6A3Mg.js","assets/ishikawaDiagram-UXIWVN3A-epPQ8zog.js","assets/vennDiagram-DHZGUBPP-CQgHNv55.js","assets/diagram-G4DWMVQ6-Diej41n9.js","assets/wardleyDiagram-NUSXRM2D-BlGX5hGO.js","assets/highlighted-body-OFNGDK62-C49FzMo3.js","assets/angular-html-C2U28d7I.js","assets/html-IDCAcWPz.js","assets/css-BNlbTijp.js","assets/javascript-Cpa2yoQT.js","assets/angular-ts-JFeCGW_v.js","assets/scss-DXZ2YRPX.js","assets/apl-BpebQNmD.js","assets/json-BkAcrDlM.js","assets/xml-CkFha01Y.js","assets/java-CRBbboP-.js","assets/astro-CRpHIgIU.js","assets/postcss-_4KnAWK8.js","assets/tsx-Cw6jWh37.js","assets/typescript-CHh8HHl_.js","assets/blade-DhbbzlNo.js","assets/html-derivative-CLqUdpRr.js","assets/sql-B_MmwxVm.js","assets/bsl-B54i21_P.js","assets/sdbl-f-RzDkID.js","assets/c-Cs0TSLm9.js","assets/cairo-JaUDbVYo.js","assets/python-CiZjse7V.js","assets/cobol-DffwYkFi.js","assets/coffee-DolKeCzx.js","assets/cpp-CXq4pIDO.js","assets/glsl-Df_EGTfW.js","assets/regexp-Cs5_e8GY.js","assets/crystal-CFQjs88Q.js","assets/shellscript-246l_CV_.js","assets/edge-Ce8ETtVJ.js","assets/elixir-DWgbHRG4.js","assets/elm-Cj38Buk6.js","assets/erb-B8WAiN7n.js","assets/ruby-vXaFb4jN.js","assets/graphql-DQZ2ti5C.js","assets/jsx-Dp7se6LN.js","assets/haml-Z6fBk1Nn.js","assets/lua-8BMmASPg.js","assets/yaml-oqPcGiBF.js","assets/erlang-9bZkvgha.js","assets/markdown-dkut3LZ0.js","assets/fortran-fixed-form-BVlcY82S.js","assets/fortran-free-form-T246OFmF.js","assets/fsharp-D4PGOmrZ.js","assets/gdresource-zogYIbMs.js","assets/gdscript-DilHUO6X.js","assets/gdshader-CVkSEAIh.js","assets/git-commit-BOtit0B7.js","assets/diff-BfcdpccF.js","assets/git-rebase-Dz4G9beD.js","assets/glimmer-js-D8Ts9DvD.js","assets/glimmer-ts-y7nzn0ID.js","assets/hack-cEAjOsDW.js","assets/handlebars-B0-Og-pC.js","assets/http-B_4Eeybg.js","assets/hurl-_1c_0_Wc.js","assets/csv-BxO9mTca.js","assets/hxml-CBLoPFJn.js","assets/haxe-Ds6BbIFI.js","assets/jinja-BYrs-9sw.js","assets/jison-_g2Qrf-2.js","assets/julia-Dww0yICA.js","assets/r-CUg6wo0X.js","assets/just-DmI2dcWN.js","assets/perl-BBy9cgaT.js","assets/latex-290GCwIn.js","assets/tex-DHFUYOEI.js","assets/liquid-CvTrx5Vc.js","assets/marko-eKiBW8WW.js","assets/less-Cmnr-ah1.js","assets/mdc-B0Wqmpvj.js","assets/nextflow-DaMHJyv-.js","assets/nextflow-groovy-BCzh_nVB.js","assets/nginx-DLlifRTt.js","assets/nim-D5ig7v3l.js","assets/php-DuBxjQDx.js","assets/pug-CeUn-RsL.js","assets/qml-CxI8kE-p.js","assets/razor-uD0Mg1wE.js","assets/csharp-CiH7oTou.js","assets/rst-BQRiWr_Y.js","assets/cmake-t9HbbaOy.js","assets/sas-DSyoyZG-.js","assets/shaderlab-B__viSd1.js","assets/hlsl-Cn4xOp4H.js","assets/shellsession-DDTE6nt1.js","assets/soy-BjBoAgvY.js","assets/sparql-P3fQ_Jok.js","assets/turtle-C4YJmC8S.js","assets/stata-T5FYSu1-.js","assets/surrealql-Dx7bR3iH.js","assets/svelte-DDotzggB.js","assets/templ-BintcxtH.js","assets/go-BT4oYldF.js","assets/ts-tags-aQrlJJF3.js","assets/twig-BiDIhIq9.js","assets/vue-CKOPxhtK.js","assets/vue-html-ByGXx9rV.js","assets/vue-vine-CHhnfXci.js","assets/stylus-BRjIdNaI.js","assets/xsl-CEdS8bNO.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,n as t,o as n,r,t as i}from"./chunk-Dlc7tRH4.js";import{t as a}from"./preload-helper-DSXbuxSR.js";import{t as o}from"./katex-bhLIJZGA.js";import{_ as s,g as c,h as l,p as u}from"./src-yS7GtxRa.js";import{F as d,G as f,H as p,J as m,M as h,N as g,S as _,T as v,X as y,Y as b,Z as x,b as S,c as C,f as w,g as T,h as E,l as D,n as O,p as k,r as ee,s as A,t as j,w as M,x as N,y as P,z as F}from"./chunk-ICPOFSXX-DhSKCi44.js";import{a as te,d as ne,h as re,i as ie,m as ae,r as oe,u as se}from"./chunk-5PVQY5BW-5xQJ1V0h.js";import"./chunk-BSJP7CBP-YyA7eZXL.js";import{C as I,E as ce,O as le,S as ue,b as de,c as fe,d as pe,i as me,m as he,p as ge,s as _e,u as ve}from"./identity-BhK8cfbX.js";import"./chunk-ZZ45TVLE-Qm-AMNbA.js";import"./chunk-X2U36JSP-A88HrmUK.js";import{i as ye,o as be}from"./chunk-U2HBQHQK-DZcOXz0k.js";import{a as xe,i as Se,s as Ce}from"./chunk-5FUZZQ4R-BkjLQcGk.js";import{a as we,i as Te,n as Ee,r as De}from"./chunk-ENJZ2VHE-BX61UO09.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Oe=i((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ee=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ee,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ee,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function N(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function P(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},te={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=te,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:P}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),ke=i(((e,t)=>{t.exports=Oe()})),Ae=i((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),je=i(((e,t)=>{t.exports=Ae()})),Me=i((e=>{var t=ke();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),Ne=i(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Me()})),Pe=i((e=>{var t=je(),n=ke(),r=Ne();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for(`react.element`),m=Symbol.for(`react.transitional.element`),h=Symbol.for(`react.portal`),g=Symbol.for(`react.fragment`),_=Symbol.for(`react.strict_mode`),v=Symbol.for(`react.profiler`),y=Symbol.for(`react.consumer`),b=Symbol.for(`react.context`),x=Symbol.for(`react.forward_ref`),S=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),w=Symbol.for(`react.memo`),T=Symbol.for(`react.lazy`),E=Symbol.for(`react.activity`),D=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function k(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var ee=Symbol.for(`react.client.reference`);function A(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ee?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case g:return`Fragment`;case v:return`Profiler`;case _:return`StrictMode`;case S:return`Suspense`;case C:return`SuspenseList`;case E:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case h:return`Portal`;case b:return e.displayName||`Context`;case y:return(e._context.displayName||`Context`)+`.Consumer`;case x:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case w:return t=e.displayName||null,t===null?A(e.type)||`Memo`:t;case T:t=e._payload,e=e._init;try{return A(e(t))}catch{}}return null}var j=Array.isArray,M=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},F=[],te=-1;function ne(e){return{current:e}}function re(e){0>te||(e.current=F[te],F[te]=null,te--)}function ie(e,t){te++,F[te]=e.current,e.current=t}var ae=ne(null),oe=ne(null),se=ne(null),I=ne(null);function ce(e,t){switch(ie(se,t),ie(oe,e),ie(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}re(ae),ie(ae,e)}function le(){re(ae),re(oe),re(se)}function ue(e){e.memoizedState!==null&&ie(I,e);var t=ae.current,n=tf(t,e.type);t!==n&&(ie(oe,e),ie(ae,n))}function de(e){oe.current===e&&(re(ae),re(oe)),I.current===e&&(re(I),dp._currentValue=P)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
+ `),l=s.split(`
6
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,Ce=t.unstable_requestPaint,we=t.unstable_now,Te=t.unstable_getCurrentPriorityLevel,Ee=t.unstable_ImmediatePriority,De=t.unstable_UserBlockingPriority,Oe=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,L=null,Ie=null;function Le(e){if(typeof Pe==`function`&&Fe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(L,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ke(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Re(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=N.p;return e===0?(e=window.event,e===void 0?32:Dp(e.type)):e}function at(e,t){var n=N.p;try{return N.p=e,t()}finally{N.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wf(e);e!==null;){if(n=e[st])return n;e=wf(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Et={},Dt={};function Ot(e){return ye.call(Dt,e)?!0:ye.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function At(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Mt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Mt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(j(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function R(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function qt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Kt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Jt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&qt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&qt(e,o,t[o])}function Yt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Xt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Zt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Qt(e){return Zt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function $t(){}var en=null;function tn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nn=null,rn=null;function an(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[ct]||null;if(!a)throw Error(i(90));Bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var on=!1;function sn(e,t,n){if(on)return e(t,n);on=!0;try{return e(t)}finally{if(on=!1,(nn!==null||rn!==null)&&(Au(),nn&&(t=nn,e=rn,rn=nn=null,an(t),e)))for(t=0;t<e.length;t++)an(e[t])}}function cn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var ln=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),un=!1;if(ln)try{var dn={};Object.defineProperty(dn,`passive`,{get:function(){un=!0}}),window.addEventListener(`test`,dn,dn),window.removeEventListener(`test`,dn,dn)}catch{un=!1}var fn=null,pn=null,mn=null;function hn(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return mn=i.slice(e,1<r?1-r:void 0)}function gn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function _n(){return!0}function vn(){return!1}function yn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?_n:vn,this.isPropagationStopped=vn,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=_n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=_n)},persist:function(){},isPersistent:_n}),t}var bn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xn=yn(bn),Sn=f({},bn,{view:0,detail:0}),Cn=yn(Sn),wn,Tn,En,Dn=f({},Sn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==En&&(En&&e.type===`mousemove`?(wn=e.screenX-En.screenX,Tn=e.screenY-En.screenY):Tn=wn=0,En=e),wn)},movementY:function(e){return`movementY`in e?e.movementY:Tn}}),On=yn(Dn),kn=yn(f({},Dn,{dataTransfer:0})),An=yn(f({},Sn,{relatedTarget:0})),jn=yn(f({},bn,{animationName:0,elapsedTime:0,pseudoElement:0})),Mn=yn(f({},bn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Nn=yn(f({},bn,{data:0})),Pn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Fn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},In={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Ln(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=In[e])?!!t[e]:!1}function Rn(){return Ln}var zn=yn(f({},Sn,{key:function(e){if(e.key){var t=Pn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=gn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Fn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rn,charCode:function(e){return e.type===`keypress`?gn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?gn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Bn=yn(f({},Dn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Vn=yn(f({},Sn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rn})),Hn=yn(f({},bn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Un=yn(f({},Dn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Wn=yn(f({},bn,{newState:0,oldState:0})),Gn=[9,13,27,32],Kn=ln&&`CompositionEvent`in window,qn=null;ln&&`documentMode`in document&&(qn=document.documentMode);var Jn=ln&&`TextEvent`in window&&!qn,Yn=ln&&(!Kn||qn&&8<qn&&11>=qn),Xn=` `,Zn=!1;function Qn(e,t){switch(e){case`keyup`:return Gn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function $n(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var er=!1;function tr(e,t){switch(e){case`compositionend`:return $n(t);case`keypress`:return t.which===32?(Zn=!0,Xn):null;case`textInput`:return e=t.data,e===Xn&&Zn?null:e;default:return null}}function nr(e,t){if(er)return e===`compositionend`||!Kn&&Qn(e,t)?(e=hn(),mn=pn=fn=null,er=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Yn&&t.locale!==`ko`?null:t.data;default:return null}}var rr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!rr[e.type]:t===`textarea`}function ar(e,t,n,r){nn?rn?rn.push(r):rn=[r]:nn=r,t=Rd(t,`onChange`),0<t.length&&(n=new xn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var or=null,sr=null;function cr(e){Ad(e,0)}function lr(e){if(It(vt(e)))return e}function ur(e,t){if(e===`change`)return t}var dr=!1;if(ln){var fr;if(ln){var pr=`oninput`in document;if(!pr){var mr=document.createElement(`div`);mr.setAttribute(`oninput`,`return;`),pr=typeof mr.oninput==`function`}fr=pr}else fr=!1;dr=fr&&(!document.documentMode||9<document.documentMode)}function hr(){or&&(or.detachEvent(`onpropertychange`,gr),sr=or=null)}function gr(e){if(e.propertyName===`value`&&lr(sr)){var t=[];ar(t,sr,e,tn(e)),sn(cr,t)}}function _r(e,t,n){e===`focusin`?(hr(),or=t,sr=n,or.attachEvent(`onpropertychange`,gr)):e===`focusout`&&hr()}function vr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return lr(sr)}function yr(e,t){if(e===`click`)return lr(t)}function br(e,t){if(e===`input`||e===`change`)return lr(t)}function xr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Sr=typeof Object.is==`function`?Object.is:xr;function Cr(e,t){if(Sr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ye.call(t,i)||!Sr(e[i],t[i]))return!1}return!0}function wr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tr(e,t){var n=wr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=wr(n)}}function Er(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Er(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function Or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var kr=ln&&`documentMode`in document&&11>=document.documentMode,Ar=null,jr=null,Mr=null,Nr=!1;function Pr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nr||Ar==null||Ar!==Lt(r)||(r=Ar,`selectionStart`in r&&Or(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Mr&&Cr(Mr,r)||(Mr=r,r=Rd(jr,`onSelect`),0<r.length&&(t=new xn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ar)))}function Fr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Ir={animationend:Fr(`Animation`,`AnimationEnd`),animationiteration:Fr(`Animation`,`AnimationIteration`),animationstart:Fr(`Animation`,`AnimationStart`),transitionrun:Fr(`Transition`,`TransitionRun`),transitionstart:Fr(`Transition`,`TransitionStart`),transitioncancel:Fr(`Transition`,`TransitionCancel`),transitionend:Fr(`Transition`,`TransitionEnd`)},Lr={},Rr={};ln&&(Rr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Ir.animationend.animation,delete Ir.animationiteration.animation,delete Ir.animationstart.animation),`TransitionEvent`in window||delete Ir.transitionend.transition);function zr(e){if(Lr[e])return Lr[e];if(!Ir[e])return e;var t=Ir[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Rr)return Lr[e]=t[n];return e}var Br=zr(`animationend`),Vr=zr(`animationiteration`),Hr=zr(`animationstart`),Ur=zr(`transitionrun`),Wr=zr(`transitionstart`),Gr=zr(`transitioncancel`),Kr=zr(`transitionend`),qr=new Map,Jr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Jr.push(`scrollEnd`);function Yr(e,t){qr.set(e,t),Ct(t,[e])}var Xr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Zr=[],Qr=0,$r=0;function ei(){for(var e=Qr,t=$r=Qr=0;t<e;){var n=Zr[t];Zr[t++]=null;var r=Zr[t];Zr[t++]=null;var i=Zr[t];Zr[t++]=null;var a=Zr[t];if(Zr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ii(n,i,a)}}function ti(e,t,n,r){Zr[Qr++]=e,Zr[Qr++]=t,Zr[Qr++]=n,Zr[Qr++]=r,$r|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ni(e,t,n,r){return ti(e,t,n,r),ai(e)}function ri(e,t){return ti(e,null,null,t),ai(e)}function ii(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ai(e){if(50<xu)throw xu=0,Su=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var oi={};function si(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ci(e,t,n,r){return new si(e,t,n,r)}function li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ui(e,t){var n=e.alternate;return n===null?(n=ci(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function di(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)li(e)&&(s=1);else if(typeof e==`string`)s=np(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case E:return e=ci(31,n,t,a),e.elementType=E,e.lanes=o,e;case g:return pi(n.children,a,o,t);case _:s=8,a|=24;break;case v:return e=ci(12,n,t,a|2),e.elementType=v,e.lanes=o,e;case S:return e=ci(13,n,t,a),e.elementType=S,e.lanes=o,e;case C:return e=ci(19,n,t,a),e.elementType=C,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case b:s=10;break a;case y:s=9;break a;case x:s=11;break a;case w:s=14;break a;case T:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ci(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function pi(e,t,n,r){return e=ci(7,e,r,t),e.lanes=n,e}function mi(e,t,n){return e=ci(6,e,null,t),e.lanes=n,e}function hi(e){var t=ci(18,null,null,0);return t.stateNode=e,t}function gi(e,t,n){return t=ci(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _i=new WeakMap;function vi(e,t){if(typeof e==`object`&&e){var n=_i.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},_i.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var z=[],yi=0,bi=null,xi=0,Si=[],Ci=0,wi=null,Ti=1,Ei=``;function Di(e,t){z[yi++]=xi,z[yi++]=bi,bi=e,xi=t}function Oi(e,t,n){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,wi=e;var r=Ti;e=Ei;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ti=1<<32-Re(t)+i|n<<i|r,Ei=a+e}else Ti=1<<a|n<<i|r,Ei=e}function ki(e){e.return!==null&&(Di(e,1),Oi(e,1,0))}function Ai(e){for(;e===bi;)bi=z[--yi],z[yi]=null,xi=z[--yi],z[yi]=null;for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ei=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null}function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=Ei,Si[Ci++]=wi,Ti=t.id,Ei=t.overflow,wi=e}var Mi=null,Ni=null,Pi=!1,Fi=null,Ii=!1,Li=Error(i(519));function Ri(e){throw Wi(vi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Li}function zi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:jd(`cancel`,t),jd(`close`,t);break;case`iframe`:case`object`:case`embed`:jd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Od.length;n++)jd(Od[n],t);break;case`source`:jd(`error`,t);break;case`img`:case`image`:case`link`:jd(`error`,t),jd(`load`,t);break;case`details`:jd(`toggle`,t);break;case`input`:jd(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:jd(`invalid`,t);break;case`textarea`:jd(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Wd(t.textContent,n)?(r.popover!=null&&(jd(`beforetoggle`,t),jd(`toggle`,t)),r.onScroll!=null&&jd(`scroll`,t),r.onScrollEnd!=null&&jd(`scrollend`,t),r.onClick!=null&&(t.onclick=$t),t=!0):t=!1,t||Ri(e,!0)}function Bi(e){for(Mi=e.return;Mi;)switch(Mi.tag){case 5:case 31:case 13:Ii=!1;return;case 27:case 3:Ii=!0;return;default:Mi=Mi.return}}function Vi(e){if(e!==Mi)return!1;if(!Pi)return Bi(e),Pi=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||nf(e.type,e.memoizedProps)),n=!n),n&&Ni&&Ri(e),Bi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=Cf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ni=Cf(e)}else t===27?(t=Ni,df(e.type)?(e=Sf,Sf=null,Ni=e):Ni=t):Ni=Mi?xf(e.stateNode.nextSibling):null;return!0}function Hi(){Ni=Mi=null,Pi=!1}function Ui(){var e=Fi;return e!==null&&(su===null?su=e:su.push.apply(su,e),Fi=null),e}function Wi(e){Fi===null?Fi=[e]:Fi.push(e)}var Gi=ne(null),Ki=null,qi=null;function Ji(e,t,n){ie(Gi,t._currentValue),t._currentValue=n}function Yi(e){e._currentValue=Gi.current,re(Gi)}function Xi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Zi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Xi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Xi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Qi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Sr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===I.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[dp]:e.push(dp))}a=a.return}e!==null&&Zi(t,e,n,r),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!Sr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ea(e){Ki=e,qi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ta(e){return ra(Ki,e)}function na(e,t){return Ki===null&&ea(e),ra(e,t)}function ra(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},qi===null){if(e===null)throw Error(i(308));qi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qi=qi.next=t;return n}var ia=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},aa=t.unstable_scheduleCallback,oa=t.unstable_NormalPriority,sa={$$typeof:b,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ca(){return{controller:new ia,data:new Map,refCount:0}}function la(e){e.refCount--,e.refCount===0&&aa(oa,function(){e.controller.abort()})}var ua=null,da=0,fa=0,pa=null;function ma(e,t){if(ua===null){var n=ua=[];da=0,fa=Sd(),pa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return da++,t.then(ha,ha),t}function ha(){if(--da===0&&ua!==null){pa!==null&&(pa.status=`fulfilled`);var e=ua;ua=null,fa=0,pa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ga(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var _a=M.S;M.S=function(e,t){uu=we(),typeof t==`object`&&t&&typeof t.then==`function`&&ma(e,t),_a!==null&&_a(e,t)};var va=ne(null);function ya(){var e=va.current;return e===null?Gl.pooledCache:e}function ba(e,t){t===null?ie(va,va.current):ie(va,t.pool)}function xa(){var e=ya();return e===null?null:{parent:sa._currentValue,pool:e}}var Sa=Error(i(460)),Ca=Error(i(474)),wa=Error(i(542)),Ta={then:function(){}};function Ea(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Da(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then($t,$t),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e;default:if(typeof t.status==`string`)t.then($t,$t);else{if(e=Gl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ja(e),e}throw ka=t,Sa}}function Oa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ka=e,Sa):e}}var ka=null;function Aa(){if(ka===null)throw Error(i(459));var e=ka;return ka=null,e}function ja(e){if(e===Sa||e===wa)throw Error(i(483))}var Ma=null,Na=0;function Pa(e){var t=Na;return Na+=1,Ma===null&&(Ma=[]),Da(Ma,e,t)}function Fa(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ia(e,t){throw t.$$typeof===p?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function La(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ui(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=mi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===g?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===T&&Oa(i)===t.type)?(t=a(t,n.props),Fa(t,n),t.return=e,t):(t=fi(n.type,n.key,n.props,null,e.mode,r),Fa(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=gi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=pi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=mi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case m:return n=fi(t.type,t.key,t.props,null,e.mode,n),Fa(n,t),n.return=e,n;case h:return t=gi(t,e.mode,n),t.return=e,t;case T:return t=Oa(t),f(e,t,n)}if(j(t)||k(t))return t=pi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Pa(t),n);if(t.$$typeof===b)return f(e,na(e,t),n);Ia(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case m:return n.key===i?l(e,t,n,r):null;case h:return n.key===i?u(e,t,n,r):null;case T:return n=Oa(n),p(e,t,n,r)}if(j(n)||k(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Pa(n),r);if(n.$$typeof===b)return p(e,t,na(e,n),r);Ia(e,n)}return null}function _(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case m:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case h:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case T:return r=Oa(r),_(e,t,n,r,i)}if(j(r)||k(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return _(e,t,n,Pa(r),i);if(r.$$typeof===b)return _(e,t,n,na(t,r),i);Ia(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,m=a=0,h=null;d!==null&&m<s.length;m++){d.index>m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Pi&&Di(i,m),l;if(d===null){for(;m<s.length;m++)d=f(i,s[m],c),d!==null&&(a=o(d,a,m),u===null?l=d:u.sibling=d,u=d);return Pi&&Di(i,m),l}for(d=r(d);m<s.length;m++)h=_(d,i,m,s[m],c),h!==null&&(e&&h.alternate!==null&&d.delete(h.key===null?m:h.key),a=o(h,a,m),u===null?l=h:u.sibling=h,u=h);return e&&d.forEach(function(e){return t(i,e)}),Pi&&Di(i,m),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,m=s,h=s=0,g=null,v=c.next();m!==null&&!v.done;h++,v=c.next()){m.index>h?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Pi&&Di(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Pi&&Di(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Pi&&Di(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Oa(l)===r.type){n(e,r.sibling),c=a(r,o.props),Fa(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===g?(c=pi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=fi(o.type,o.key,o.props,null,e.mode,c),Fa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=gi(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Oa(o),x(e,r,o,c)}if(j(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Pa(o),c);if(o.$$typeof===b)return x(e,r,na(e,o),c);Ia(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=mi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Na=0;var i=x(e,t,n,r);return Ma=null,i}catch(t){if(t===Sa||t===wa)throw t;var a=ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ra=La(!0),za=La(!1),Ba=!1;function Va(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ha(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Wl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ai(e),ii(e,null,n),t}return ti(e,r,t,n),ai(e)}function Ga(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function Ka(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var qa=!1;function Ja(){if(qa){var e=pa;if(e!==null)throw e}}function Ya(e,t,n,r){qa=!1;var i=e.updateQueue;Ba=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(ql&p)===p:(r&p)===p){p!==0&&p===fa&&(qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ba=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),tu|=o,e.lanes=o,e.memoizedState=d}}function Xa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Xa(n[e],t)}var Qa=ne(null),$a=ne(0);function eo(e,t){e=$l,ie($a,e),ie(Qa,t),$l=e|t.baseLanes}function to(){ie($a,$l),ie(Qa,Qa.current)}function no(){$l=$a.current,re(Qa),re($a)}var ro=ne(null),io=null;function ao(e){var t=e.alternate;ie(uo,uo.current&1),ie(ro,e),io===null&&(t===null||Qa.current!==null||t.memoizedState!==null)&&(io=e)}function oo(e){ie(uo,uo.current),ie(ro,e),io===null&&(io=e)}function so(e){e.tag===22?(ie(uo,uo.current),ie(ro,e),io===null&&(io=e)):co(e)}function co(){ie(uo,uo.current),ie(ro,ro.current)}function lo(e){re(ro),io===e&&(io=null),re(uo)}var uo=ne(0);function fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||vf(n)||yf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var po=0,mo=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return po=a,mo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,M.H=e===null||e.memoizedState===null?Us:Ws,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){M.H=Hs;var t=ho!==null&&ho.next!==null;if(po=0,go=ho=mo=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&$i(e)&&(sc=!0))}function Oo(e,t,n,r){mo=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}M.H=Gs,o=t(n,r)}while(vo);return o}function ko(){var e=M.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(mo.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}po=0,go=ho=mo=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?mo.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=mo.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?mo.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw mo.alternate===null?Error(i(467)):Error(i(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?mo.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Da(So,e,t),t=mo,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,M.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===b)return ta(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=mo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=mo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),mo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=D;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(po&f)===f:(ql&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===fa&&(d=!0);else if((po&p)===p){u=u.next,p===fa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,mo.lanes|=p,tu|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,mo.lanes|=f,tu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Sr(o,e.memoizedState)&&(sc=!0,d&&(n=pa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Sr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=mo,a=Po(),o=Pi;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Sr((ho||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),Gl===null)throw Error(i(349));o||po&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=mo.updateQueue,t===null?(t=Fo(),mo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sr(e,n)}catch{return!0}}function Jo(e){var t=ri(e,2);t!==null&&Tu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};M.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=M.T,o={};M.T=o;try{var s=n(i,r),c=M.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),M.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(Pi){var n=Gl.formState;if(n!==null){a:{var r=mo;if(Pi){if(Ni){b:{for(var i=Ni,a=Ii;i.nodeType!==8;){if(!a){i=null;break b}if(i=xf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ni=xf(i.nextSibling),r=i.data===`F!`;break a}}Ri(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,mo,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,mo,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,mo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),ho,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Sa?wa:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(mo.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=ho;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=mo.updateQueue,t===null&&(t=Fo(),mo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();mo.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(mo.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){mo.flags|=4;var t=mo.updateQueue;if(t===null)t=Fo(),mo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(Wl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||po&1073741824&&!(ql&261930)?e.memoizedState=t:(e.memoizedState=n,e=wu(),mo.lanes|=e,tu|=e,n)}function Ts(e,t,n,r){return Sr(n,t)?n:Qa.current===null?!(po&42)||po&1073741824&&!(ql&261930)?(sc=!0,e.memoizedState=n):(e=wu(),mo.lanes|=e,tu|=e,t):(e=ws(e,n,r),Sr(e,t)||(sc=!0),e)}function Es(e,t,n,r,i){var a=N.p;N.p=a!==0&&8>a?a:8;var o=M.T,s={};M.T=s,Rs(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,ga(c,r),Cu(e)):Ls(e,t,r,Cu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},Cu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,P,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:P},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},Cu())}function js(){return ta(dp)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Cu();e=Ua(n);var r=Wa(t,e,n);r!==null&&(Tu(r,t,n),Ga(r,t,n)),t={cache:ca()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=Cu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ni(e,t,n,r),n!==null&&(Tu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,Cu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Sr(s,o))return ti(e,t,i,0),Gl===null&&ei(),!1}catch{}if(n=ni(e,t,i,r),n!==null)return Tu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:Sd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=ni(e,n,r,2),t!==null&&Tu(t,e,2)}function zs(e){var t=e.alternate;return e===mo||t!==null&&t===mo}function Bs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Hs={readContext:ta,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Hs.useEffectEvent=wo;var Us={readContext:ta,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:ta,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){Le(!0);try{n(t)}finally{Le(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,mo,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,mo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,mo,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=mo,a=No();if(Pi){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Gl===null)throw Error(i(349));ql&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Gl.identifierPrefix;if(Pi){var n=Ei,r=Ti;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,mo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,mo)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(Wl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:ta,use:Lo,useCallback:Ss,useContext:ta,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:ta,use:Lo,useCallback:Ss,useContext:ta,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return ho===null?ws(n,e,t):Ts(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:f({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ua(r);i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Tu(t,e,r),Ga(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Cu(),i=Ua(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Wa(e,i,r),t!==null&&(Tu(t,e,r),Ga(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Cu(),r=Ua(n);r.tag=2,t!=null&&(r.callback=t),t=Wa(e,r,n),t!==null&&(Tu(t,e,n),Ga(t,e,n))}};function Js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Cr(n,r)||!Cr(i,a):!0}function Ys(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qs.enqueueReplaceState(t,t.state,null)}function Xs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=f({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){Xr(e)}function Qs(e){console.error(e)}function $s(e){Xr(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=Ua(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Ua(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(pu===null?pu=new Set([this]):pu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Qi(t,n,a,!0),n=ro.current,n!==null){switch(n.tag){case 31:case 13:return io===null?Lu():n.alternate===null&&eu===0&&(eu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),nd(e,r,a)),!1;case 22:return n.flags|=65536,r===Ta?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),nd(e,r,a)),!1}throw Error(i(435,n.tag))}return nd(e,r,a),Lu(),!1}if(Pi)return t=ro.current,t===null?(r!==Li&&(t=Error(i(423),{cause:r}),Wi(vi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=vi(r,n),a=nc(e.stateNode,r,a),Ka(e,a),eu!==4&&(eu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Li&&(e=Error(i(422),{cause:r}),Wi(vi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=vi(o,n),ou===null?ou=[o]:ou.push(o),eu!==4&&(eu=2),t===null)return!0;r=vi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),Ka(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(pu===null||!pu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),Ka(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?za(t,null,n,r):Ra(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ea(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(Pi&&s&&ki(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!li(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=fi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Cr:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=ui(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Cr(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ba(t,a===null?null:a.cachePool),a===null?to():eo(t,a),so(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ba(t,null),to(),co(t)):(ba(t,a.cachePool),eo(t,a),co(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=ya();return a=a===null?null:{parent:sa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ba(t,null),to(),so(t),e!==null&&Qi(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ra(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,lo(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Pi){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(oo(t),(e=Ni)?(e=_f(e,Ii),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=hi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(oo(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||Qi(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=Gl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ri(e,s),Tu(r,e,s),oc;Lu(),t=gc(e,t,n)}else e=o.treeContext,Ni=xf(s.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=hc(t,r),t.flags|=4096;return t}return e=ui(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return ea(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(Pi&&r&&ki(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return ea(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Nc(e,t,a)):(Pi&&r&&ki(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(ea(t),t.stateNode===null){var a=oi,o=n.contextType;typeof o==`object`&&o&&(a=ta(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Va(t),o=n.contextType,a.context=typeof o==`object`&&o?ta(o):oi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&qs.enqueueReplaceState(a,a.state,null),Ya(t,r,a,i),Ja(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=oi,typeof u==`object`&&u&&(o=ta(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ys(t,a,r,o),Ba=!1;var f=t.memoizedState;a.state=f,Ya(t,r,a,i),Ja(),l=t.memoizedState,s||f!==l||Ba?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Ba||Js(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ha(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=oi,typeof l==`object`&&l&&(c=ta(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ys(t,a,r,c),Ba=!1,f=t.memoizedState,a.state=f,Ya(t,r,a,i),Ja();var p=t.memoizedState;o!==d||f!==p||Ba||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Ba||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&$i(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ra(t,e.child,null,i),t.child=Ra(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return Hi(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:xa()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=iu),e}function Ec(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(uo.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Pi){if(a?ao(t):co(t),(e=Ni)?(e=_f(e,Ii),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi===null?null:{id:Ti,overflow:Ei},retryLane:536870912,hydrationErrors:null},n=hi(e),n.return=t,t.child=n,Mi=t,Ni=null)):e=null,e===null)throw Ri(t);return yf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(co(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=pi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(ao(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(ao(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(co(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=pi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ra(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(co(t),t.child=e.child,t.flags|=128,t=null);else if(ao(t),yf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Wi({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(sc||Qi(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=Gl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ri(e,r),Tu(s,e,r),oc;vf(c)||Lu(),t=kc(e,t,n)}else vf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ni=xf(c.nextSibling),Mi=t,Pi=!0,Fi=null,Ii=!1,e!==null&&ji(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return a?(co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ui(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=pi(c,a,n,null),c.flags|=2):c=ui(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=xa():(l=sa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(ao(t),n=e.child,e=n.sibling,n=ui(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=ci(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ra(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xi(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=uo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,ie(uo,o),cc(e,t,r,n),r=Pi?xi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&fo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Qi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ui(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ui(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&$i(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Ji(t,sa,e.memoizedState.cache),Hi();break;case 27:case 5:ue(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ao(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(ao(t),t.flags|=128,null);ao(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Qi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ie(uo,uo.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Ji(t,sa,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return sc=!1,Fc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,Pi&&t.flags&1048576&&Oi(t,xi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Oa(t.elementType),t.type=e,typeof e==`function`)li(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===x){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===w){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=A(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Ha(e,t),Ya(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ji(t,sa,r),r!==o.cache&&Zi(t,[sa],n,!0),Ja(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==a){a=vi(Error(i(424)),t),Wi(a),t=Sc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ni=xf(e.firstChild),Mi=t,Pi=!0,Fi=null,Ii=!0,n=za(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Hi(),r===a){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=Hf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Pi||(n=t.type,e=t.pendingProps,r=$d(se.current).createElement(n),r[st]=t,r[ct]=e,qd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=Hf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&Pi&&(r=t.stateNode=Tf(t.type,t.pendingProps,se.current),Mi=t,Ii=!0,a=Ni,df(t.type)?(Sf=a,Ni=xf(r.firstChild)):Ni=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pi&&((a=r=Ni)&&(r=hf(r,t.type,t.pendingProps,Ii),r===null?a=!1:(t.stateNode=r,Mi=t,Ni=xf(r.firstChild),Ii=!1,a=!0)),a||Ri(t)),ue(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,nf(a,o)?r=null:s!==null&&nf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),dp._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&Pi&&((e=n=Ni)&&(n=gf(n,t.pendingProps,Ii),n===null?e=!1:(t.stateNode=n,Mi=t,Ni=null,e=!0)),e||Ri(t)),null;case 13:return Ec(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ra(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ji(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ea(t),a=ta(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return ea(t),r=ta(sa),e===null?(a=ya(),a===null&&(a=Gl,o=ca(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Va(t),Ji(t,sa,a)):((e.lanes&n)!==0&&(Ha(e,t),Ya(t,null,null,n),Ja()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ji(t,sa,r),r!==a.cache&&Zi(t,[sa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ji(t,sa,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Pu())e.flags|=8192;else throw ka=Ta,Ca}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!rp(t))if(Pu())e.flags|=8192;else throw ka=Ta,Ca}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,au|=t)}function Vc(e,t){if(!Pi)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Hc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Uc(e,t,n){var r=t.pendingProps;switch(Ai(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hc(t),null;case 1:return Hc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Yi(sa),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Vi(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ui())),Hc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(Hc(t),Rc(t,a,null,r,n)):(Hc(t),zc(t,o))):o?o===e.memoizedState?(Hc(t),t.flags&=-16777217):(Lc(t),Hc(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),Hc(t),Rc(t,a,e,r,n)),null;case 27:if(de(t),n=se.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}e=ae.current,Vi(t)?zi(t,e):(e=Tf(a,r,n),t.stateNode=e,Lc(t))}return Hc(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Hc(t),null}if(o=ae.current,Vi(t))zi(t,o);else{var s=$d(se.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[st]=t,o[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(qd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return Hc(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=se.current,Vi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Mi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Wd(e.nodeValue,n)),e||Ri(t,!0)}else e=$d(e).createTextNode(r),e[st]=t,t.stateNode=e}return Hc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Vi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[st]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),e=!1}else n=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(lo(t),t):(lo(t),null);if(t.flags&128)throw Error(i(558))}return Hc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Vi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[st]=t}else Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Hc(t),a=!1}else a=Ui(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(lo(t),t):(lo(t),null)}return lo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),Hc(t),null);case 4:return le(),e===null&&Pd(t.stateNode.containerInfo),Hc(t),null;case 10:return Yi(t.type),Hc(t),null;case 19:if(re(uo),r=t.memoizedState,r===null)return Hc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Vc(r,!1);else{if(eu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=fo(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)di(n,e),n=n.sibling;return ie(uo,uo.current&1|2),Pi&&Di(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&we()>du&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Pi)return Hc(t),null}else 2*we()-r.renderingStartTime>du&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Hc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=we(),e.sibling=null,n=uo.current,ie(uo,a?n&1|2:n&1),Pi&&Di(t,r.treeForkCount),e);case 22:case 23:return lo(t),no(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Hc(t),t.subtreeFlags&6&&(t.flags|=8192)):Hc(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&re(va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yi(sa),Hc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Wc(e,t){switch(Ai(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yi(sa),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(lo(t),t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(lo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(uo),null;case 4:return le(),null;case 10:return Yi(t.type),null;case 22:case 23:return lo(t),no(),e!==null&&re(va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yi(sa),null;case 25:return null;default:return null}}function Gc(e,t){switch(Ai(t),t.tag){case 3:Yi(sa),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&lo(t);break;case 13:lo(t);break;case 19:re(uo);break;case 10:Yi(t.type);break;case 22:case 23:lo(t),no(),e!==null&&re(va);break;case 24:Yi(sa)}}function Kc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){td(t,t.return,e)}}function qc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){td(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){td(t,t.return,e)}}function Jc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Za(t,n)}catch(t){td(e,e.return,t)}}}function Yc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){td(e,t,n)}}function Xc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){td(e,t,n)}}function Zc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){td(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){td(e,t,n)}else n.current=null}function Qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){td(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;Jd(r,e.type,n,t),r[ct]=t}catch(t){td(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&df(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&df(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=$t));else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);qd(t,r,n),t[st]=e,t[ct]=n}catch(t){td(e,e.return,t)}}var al=!1,ol=!1,sl=!1,cl=typeof WeakSet==`function`?WeakSet:Set,ll=null;function ul(e,t){if(e=e.containerInfo,Zd=bp,e=Dr(e),Or(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Qd={focusedElem:e,selectionRange:n},bp=!1,ll=t;ll!==null;)if(t=ll,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ll=e;else for(;ll!==null;){switch(t=ll,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){td(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)mf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:mf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ll=e;break}ll=t.return}}function dl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Tl(e,n),r&4&&Kc(5,n);break;case 1:if(Tl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){td(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){td(n,n.return,e)}}r&64&&Jc(n),r&512&&Xc(n,n.return);break;case 3:if(Tl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Za(e,t)}catch(e){td(n,n.return,e)}}break;case 27:t===null&&r&4&&il(n);case 26:case 5:Tl(e,n),t===null&&r&4&&Qc(n),r&512&&Xc(n,n.return);break;case 12:Tl(e,n);break;case 31:Tl(e,n),r&4&&gl(e,n);break;case 13:Tl(e,n),r&4&&_l(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ad.bind(null,n),bf(e,n))));break;case 22:if(r=n.memoizedState!==null||al,!r){t=t!==null&&t.memoizedState!==null||ol,i=al;var a=ol;al=r,(ol=t)&&!a?Dl(e,n,(n.subtreeFlags&8772)!=0):Tl(e,n),al=i,ol=a}break;case 30:break;default:Tl(e,n)}}function fl(e){var t=e.alternate;t!==null&&(e.alternate=null,fl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pl=null,ml=!1;function B(e,t,n){for(n=n.child;n!==null;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(L,n)}catch{}switch(n.tag){case 26:ol||Zc(n,t),B(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ol||Zc(n,t);var r=pl,i=ml;df(n.type)&&(pl=n.stateNode,ml=!1),B(e,t,n),Ef(n.stateNode),pl=r,ml=i;break;case 5:ol||Zc(n,t);case 6:if(r=pl,i=ml,pl=null,B(e,t,n),pl=r,ml=i,pl!==null)if(ml)try{(pl.nodeType===9?pl.body:pl.nodeName===`HTML`?pl.ownerDocument.body:pl).removeChild(n.stateNode)}catch(e){td(n,t,e)}else try{pl.removeChild(n.stateNode)}catch(e){td(n,t,e)}break;case 18:pl!==null&&(ml?(e=pl,ff(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kp(e)):ff(pl,n.stateNode));break;case 4:r=pl,i=ml,pl=n.stateNode.containerInfo,ml=!0,B(e,t,n),pl=r,ml=i;break;case 0:case 11:case 14:case 15:qc(2,n,t),ol||qc(4,n,t),B(e,t,n);break;case 1:ol||(Zc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Yc(n,t,r)),B(e,t,n);break;case 21:B(e,t,n);break;case 22:ol=(r=ol)||n.memoizedState!==null,B(e,t,n),ol=r;break;default:B(e,t,n)}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kp(e)}catch(e){td(t,t.return,e)}}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kp(e)}catch(e){td(t,t.return,e)}}function vl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new cl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new cl),t;default:throw Error(i(435,e.tag))}}function yl(e,t){var n=vl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=od.bind(null,e,t);t.then(r,r)}})}function bl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(df(c.type)){pl=c.stateNode,ml=!1;break a}break;case 5:pl=c.stateNode,ml=!1;break a;case 3:case 4:pl=c.stateNode.containerInfo,ml=!0;break a}c=c.return}if(pl===null)throw Error(i(160));hl(o,s,a),pl=null,ml=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sl(t,e),t=t.sibling}var xl=null;function Sl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bl(t,e),Cl(e),r&4&&(qc(3,e,e.return),Kc(3,e),qc(5,e,e.return));break;case 1:bl(t,e),Cl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&64&&al&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=xl;if(bl(t,e),Cl(e),r&512&&(ol||n===null||Zc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),qd(o,r,n),o[st]=e,bt(o),r=o;break a;case`link`:var s=ep(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),qd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=ep(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),qd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[st]=e,bt(o),r=o}e.stateNode=r}else tp(a,e.type,e.stateNode);else e.stateNode=Yf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&$c(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?tp(a,e.type,e.stateNode):Yf(a,r,e.memoizedProps))}break;case 27:bl(t,e),Cl(e),r&512&&(ol||n===null||Zc(n,n.return)),n!==null&&r&4&&$c(e,e.memoizedProps,n.memoizedProps);break;case 5:if(bl(t,e),Cl(e),r&512&&(ol||n===null||Zc(n,n.return)),e.flags&32){a=e.stateNode;try{R(a,``)}catch(t){td(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,$c(e,a,n===null?a:n.memoizedProps)),r&1024&&(sl=!0);break;case 6:if(bl(t,e),Cl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){td(e,e.return,t)}}break;case 3:if($f=null,a=xl,xl=kf(t.containerInfo),bl(t,e),xl=a,Cl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kp(t.containerInfo)}catch(t){td(e,e.return,t)}sl&&(sl=!1,wl(e));break;case 4:r=xl,xl=kf(e.stateNode.containerInfo),bl(t,e),Cl(e),xl=r;break;case 12:bl(t,e),Cl(e);break;case 31:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 13:bl(t,e),Cl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(lu=we()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=al,d=ol;if(al=u||a,ol=d||l,bl(t,e),ol=d,al=u,Cl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||al||ol||El(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){td(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){td(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?pf(m,!0):pf(l.stateNode,!1)}catch(e){td(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,yl(e,n))));break;case 19:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 30:break;case 21:break;default:bl(t,e),Cl(e)}}function Cl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(el(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;rl(e,tl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(R(o,``),n.flags&=-33),rl(e,tl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;nl(e,tl(e),s);break;default:throw Error(i(161))}}catch(t){td(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Tl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)dl(e,t.alternate,t),t=t.sibling}function El(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:qc(4,t,t.return),El(t);break;case 1:Zc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Yc(t,t.return,n),El(t);break;case 27:Ef(t.stateNode);case 26:case 5:Zc(t,t.return),El(t);break;case 22:t.memoizedState===null&&El(t);break;case 30:El(t);break;default:El(t)}e=e.sibling}}function Dl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Dl(i,a,n),Kc(4,a);break;case 1:if(Dl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){td(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Xa(c[i],s)}catch(e){td(r,r.return,e)}}n&&o&64&&Jc(a),Xc(a,a.return);break;case 27:il(a);case 26:case 5:Dl(i,a,n),n&&r===null&&o&4&&Qc(a),Xc(a,a.return);break;case 12:Dl(i,a,n);break;case 31:Dl(i,a,n),n&&o&4&&gl(i,a);break;case 13:Dl(i,a,n),n&&o&4&&_l(i,a);break;case 22:a.memoizedState===null&&Dl(i,a,n),Xc(a,a.return);break;case 30:break;default:Dl(i,a,n)}t=t.sibling}}function Ol(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&la(n))}function kl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e))}function Al(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jl(e,t,n,r),t=t.sibling}function jl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Al(e,t,n,r),i&2048&&Kc(9,t);break;case 1:Al(e,t,n,r);break;case 3:Al(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&la(e)));break;case 12:if(i&2048){Al(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){td(t,t.return,e)}}else Al(e,t,n,r);break;case 31:Al(e,t,n,r);break;case 13:Al(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Al(e,t,n,r):(a._visibility|=2,Ml(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Al(e,t,n,r):Nl(e,t),i&2048&&Ol(o,t);break;case 24:Al(e,t,n,r),i&2048&&kl(t.alternate,t);break;default:Al(e,t,n,r)}}function Ml(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ml(a,o,s,c,i),Kc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ml(a,o,s,c,i)):u._visibility&2?Ml(a,o,s,c,i):Nl(a,o),i&&l&2048&&Ol(o.alternate,o);break;case 24:Ml(a,o,s,c,i),i&&l&2048&&kl(o.alternate,o);break;default:Ml(a,o,s,c,i)}t=t.sibling}}function Nl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Nl(n,r),i&2048&&Ol(r.alternate,r);break;case 24:Nl(n,r),i&2048&&kl(r.alternate,r);break;default:Nl(n,r)}t=t.sibling}}var Pl=8192;function Fl(e,t,n){if(e.subtreeFlags&Pl)for(e=e.child;e!==null;)Il(e,t,n),e=e.sibling}function Il(e,t,n){switch(e.tag){case 26:Fl(e,t,n),e.flags&Pl&&e.memoizedState!==null&&ip(n,xl,e.memoizedState,e.memoizedProps);break;case 5:Fl(e,t,n);break;case 3:case 4:var r=xl;xl=kf(e.stateNode.containerInfo),Fl(e,t,n),xl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Pl,Pl=16777216,Fl(e,t,n),Pl=r):Fl(e,t,n));break;default:Fl(e,t,n)}}function Ll(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Rl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Vl(r,e)}Ll(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)zl(e),e=e.sibling}function zl(e){switch(e.tag){case 0:case 11:case 15:Rl(e),e.flags&2048&&qc(9,e,e.return);break;case 3:Rl(e);break;case 12:Rl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bl(e)):Rl(e);break;default:Rl(e)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ll=r,Vl(r,e)}Ll(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:qc(8,t,t.return),Bl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Bl(t));break;default:Bl(t)}e=e.sibling}}function Vl(e,t){for(;ll!==null;){var n=ll;switch(n.tag){case 0:case 11:case 15:qc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:la(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ll=r;else a:for(n=e;ll!==null;){r=ll;var i=r.sibling,a=r.return;if(fl(r),r===n){ll=null;break a}if(i!==null){i.return=a,ll=i;break a}ll=a}}}var Hl={getCacheForType:function(e){var t=ta(sa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ta(sa).controller.signal}},Ul=typeof WeakMap==`function`?WeakMap:Map,Wl=0,Gl=null,Kl=null,ql=0,Jl=0,Yl=null,Xl=!1,Zl=!1,Ql=!1,$l=0,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=null,su=null,cu=!1,lu=0,uu=0,du=1/0,fu=null,pu=null,mu=0,hu=null,gu=null,_u=0,vu=0,yu=null,bu=null,xu=0,Su=null;function Cu(){return Wl&2&&ql!==0?ql&-ql:M.T===null?it():Sd()}function wu(){if(iu===0)if(!(ql&536870912)||Pi){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),iu=e}else iu=536870912;return e=ro.current,e!==null&&(e.flags|=32),iu}function Tu(e,t,n){(e===Gl&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)&&(Mu(e,0),ku(e,ql,iu,!1)),Ze(e,n),(!(Wl&2)||e!==Gl)&&(e===Gl&&(!(Wl&2)&&(nu|=n),eu===4&&ku(e,ql,iu,!1)),md(e))}function Eu(e,t,n){if(Wl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||qe(e,t),a=r?Bu(e,t):Ru(e,t,!0),o=r;do{if(a===0){Zl&&!r&&ku(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!Ou(n)){a=Ru(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ou;var l=c.current.memoizedState.isDehydrated;if(l&&(Mu(c,s).flags|=256),s=Ru(c,s,!1),s!==2){if(Ql&&!l){c.errorRecoveryDisabledLanes|=o,nu|=o,a=4;break a}o=su,su=a,o!==null&&(su===null?su=o:su.push.apply(su,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Mu(e,0),ku(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:ku(r,t,iu,!Xl);break a;case 2:su=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=lu+300-we(),10<a)){if(ku(r,t,iu,!Xl),Ke(r,0,!0)!==0)break a;_u=t,r.timeoutHandle=of(Du.bind(null,r,n,su,fu,cu,t,iu,nu,au,Xl,o,`Throttled`,-0,0),a);break a}Du(r,n,su,fu,cu,t,iu,nu,au,Xl,o,null,-0,0)}}break}while(1);md(e)}function Du(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$t},Il(t,a,d);var m=(a&62914560)===a?lu-we():(a&4194048)===a?uu-we():0;if(m=op(d,m),m!==null){_u=a,e.cancelPendingCommit=m(qu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ku(e,a,o,!l);return}}qu(e,t,a,n,r,i,o,s,c)}function Ou(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Sr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ku(e,t,n,r){t&=~ru,t&=~nu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function Au(){return Wl&6?!0:(hd(0,!1),!1)}function ju(){if(Kl!==null){if(Jl===0)var e=Kl.return;else e=Kl,qi=Ki=null,Mo(e),Ma=null,Na=0,e=Kl;for(;e!==null;)Gc(e.alternate,e),e=e.return;Kl=null}}function Mu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,sf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),_u=0,ju(),Gl=e,Kl=n=ui(e.current,null),ql=t,Jl=0,Yl=null,Xl=!1,Zl=qe(e,t),Ql=!1,au=iu=ru=nu=tu=eu=0,su=ou=null,cu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return $l=t,ei(),n}function Nu(e,t){mo=null,M.H=Hs,t===Sa||t===wa?(t=Aa(),Jl=3):t===Ca?(t=Aa(),Jl=4):Jl=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Yl=t,Kl===null&&(eu=1,ec(e,vi(t,e.current)))}function Pu(){var e=ro.current;return e===null?!0:(ql&4194048)===ql?io===null:(ql&62914560)===ql||ql&536870912?e===io:!1}function Fu(){var e=M.H;return M.H=Hs,e===null?Hs:e}function Iu(){var e=M.A;return M.A=Hl,e}function Lu(){eu=4,Xl||(ql&4194048)!==ql&&ro.current!==null||(Zl=!0),!(tu&134217727)&&!(nu&134217727)||Gl===null||ku(Gl,ql,iu,!1)}function Ru(e,t,n){var r=Wl;Wl|=2;var i=Fu(),a=Iu();(Gl!==e||ql!==t)&&(fu=null,Mu(e,t)),t=!1;var o=eu;a:do try{if(Jl!==0&&Kl!==null){var s=Kl,c=Yl;switch(Jl){case 8:ju(),o=6;break a;case 3:case 2:case 9:case 6:ro.current===null&&(t=!0);var l=Jl;if(Jl=0,Yl=null,Wu(e,s,c,l),n&&Zl){o=0;break a}break;default:l=Jl,Jl=0,Yl=null,Wu(e,s,c,l)}}zu(),o=eu;break}catch(t){Nu(e,t)}while(1);return t&&e.shellSuspendCounter++,qi=Ki=null,Wl=r,M.H=i,M.A=a,Kl===null&&(Gl=null,ql=0,ei()),o}function zu(){for(;Kl!==null;)Hu(Kl)}function Bu(e,t){var n=Wl;Wl|=2;var r=Fu(),a=Iu();Gl!==e||ql!==t?(fu=null,du=we()+500,Mu(e,t)):Zl=qe(e,t);a:do try{if(Jl!==0&&Kl!==null){t=Kl;var o=Yl;b:switch(Jl){case 1:Jl=0,Yl=null,Wu(e,t,o,1);break;case 2:case 9:if(Ea(o)){Jl=0,Yl=null,Uu(t);break}t=function(){Jl!==2&&Jl!==9||Gl!==e||(Jl=7),md(e)},o.then(t,t);break a;case 3:Jl=7;break a;case 4:Jl=5;break a;case 7:Ea(o)?(Jl=0,Yl=null,Uu(t)):(Jl=0,Yl=null,Wu(e,t,o,7));break;case 5:var s=null;switch(Kl.tag){case 26:s=Kl.memoizedState;case 5:case 27:var c=Kl;if(s?rp(s):c.stateNode.complete){Jl=0,Yl=null;var l=c.sibling;if(l!==null)Kl=l;else{var u=c.return;u===null?Kl=null:(Kl=u,Gu(u))}break b}}Jl=0,Yl=null,Wu(e,t,o,5);break;case 6:Jl=0,Yl=null,Wu(e,t,o,6);break;case 8:ju(),eu=6;break a;default:throw Error(i(462))}}Vu();break}catch(t){Nu(e,t)}while(1);return qi=Ki=null,M.H=r,M.A=a,Wl=n,Kl===null?(Gl=null,ql=0,ei(),eu):0}function Vu(){for(;Kl!==null&&!Se();)Hu(Kl)}function Hu(e){var t=Ic(e.alternate,e,$l);e.memoizedProps=e.pendingProps,t===null?Gu(e):Kl=t}function Uu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,ql);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,ql);break;case 5:Mo(t);default:Gc(n,t),t=Kl=di(t,$l),t=Ic(n,t,$l)}e.memoizedProps=e.pendingProps,t===null?Gu(e):Kl=t}function Wu(e,t,n,r){qi=Ki=null,Mo(t),Ma=null,Na=0;var i=t.return;try{if(ac(e,i,t,n,ql)){eu=1,ec(e,vi(n,e.current)),Kl=null;return}}catch(t){if(i!==null)throw Kl=i,t;eu=1,ec(e,vi(n,e.current)),Kl=null;return}t.flags&32768?(Pi||r===1?e=!0:Zl||ql&536870912?e=!1:(Xl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ro.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ku(t,e)):Gu(t)}function Gu(e){var t=e;do{if(t.flags&32768){Ku(t,Xl);return}e=t.return;var n=Uc(t.alternate,t,$l);if(n!==null){Kl=n;return}if(t=t.sibling,t!==null){Kl=t;return}Kl=t=e}while(t!==null);eu===0&&(eu=5)}function Ku(e,t){do{var n=Wc(e.alternate,e);if(n!==null){n.flags&=32767,Kl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Kl=e;return}Kl=e=n}while(e!==null);eu=6,Kl=null}function qu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Qu();while(mu!==0);if(Wl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=$r,Qe(e,n,o,s,c,l),e===Gl&&(Kl=Gl=null,ql=0),gu=t,hu=e,_u=n,vu=o,yu=a,bu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,sd(Oe,function(){return $u(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=M.T,M.T=null,a=N.p,N.p=2,s=Wl,Wl|=4;try{ul(e,t,n)}finally{Wl=s,N.p=a,M.T=r}}mu=1,Ju(),Yu(),Xu()}}function Ju(){if(mu===1){mu=0;var e=hu,t=gu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Wl;Wl|=4;try{Sl(t,e);var a=Qd,o=Dr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Er(s.ownerDocument.documentElement,s)){if(c!==null&&Or(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Tr(s,h),v=Tr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}bp=!!Zd,Qd=Zd=null}finally{Wl=i,N.p=r,M.T=n}}e.current=t,mu=2}}function Yu(){if(mu===2){mu=0;var e=hu,t=gu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=M.T,M.T=null;var r=N.p;N.p=2;var i=Wl;Wl|=4;try{dl(e,t.alternate,t)}finally{Wl=i,N.p=r,M.T=n}}mu=3}}function Xu(){if(mu===4||mu===3){mu=0,Ce();var e=hu,t=gu,n=_u,r=bu;t.subtreeFlags&10256||t.flags&10256?mu=5:(mu=0,gu=hu=null,Zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(pu=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(L,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=M.T,i=N.p,N.p=2,M.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{M.T=t,N.p=i}}_u&3&&Qu(),md(e),i=e.pendingLanes,n&261930&&i&42?e===Su?xu++:(xu=0,Su=e):xu=0,hd(0,!1)}}function Zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,la(t)))}function Qu(){return Ju(),Yu(),Xu(),$u()}function $u(){if(mu!==5)return!1;var e=hu,t=vu;vu=0;var n=rt(_u),r=M.T,a=N.p;try{N.p=32>n?32:n,M.T=null,n=yu,yu=null;var o=hu,s=_u;if(mu=0,gu=hu=null,_u=0,Wl&6)throw Error(i(331));var c=Wl;if(Wl|=4,zl(o.current),jl(o,o.current,s,n),Wl=c,hd(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(L,o)}catch{}return!0}finally{N.p=a,M.T=r,Zu(e,t)}}function ed(e,t,n){t=vi(n,t),t=nc(e.stateNode,t,2),e=Wa(e,t,2),e!==null&&(Ze(e,2),md(e))}function td(e,t,n){if(e.tag===3)ed(e,e,n);else for(;t!==null;){if(t.tag===3){ed(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(pu===null||!pu.has(r))){e=vi(n,e),n=rc(2),r=Wa(t,n,2),r!==null&&(ic(n,r,t,e),Ze(r,2),md(r));break}}t=t.return}}function nd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ul;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ql=!0,i.add(n),e=rd.bind(null,e,t,n),t.then(e,e))}function rd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Gl===e&&(ql&n)===n&&(eu===4||eu===3&&(ql&62914560)===ql&&300>we()-lu?!(Wl&2)&&Mu(e,0):ru|=n,au===ql&&(au=0)),md(e)}function id(e,t){t===0&&(t=Ye()),e=ri(e,t),e!==null&&(Ze(e,t),md(e))}function ad(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function od(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),id(e,n)}function sd(e,t){return be(e,t)}var cd=null,ld=null,ud=!1,dd=!1,fd=!1,pd=0;function md(e){e!==ld&&e.next===null&&(ld===null?cd=ld=e:ld=ld.next=e),dd=!0,ud||(ud=!0,xd())}function hd(e,t){if(!fd&&dd){fd=!0;do for(var n=!1,r=cd;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=ql,a=Ke(r,r===Gl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,bd(r,a));r=r.next}while(n);fd=!1}}function gd(){_d()}function _d(){dd=ud=!1;var e=0;pd!==0&&af()&&(e=pd);for(var t=we(),n=null,r=cd;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?cd=i:n.next=i,i===null&&(ld=n)):(n=r,(e!==0||a&3)&&(dd=!0)),r=i}mu!==0&&mu!==5||hd(e,!1),pd!==0&&(pd=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Gl,n=ql,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Jl===2||Jl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),rt(n)){case 2:case 8:n=De;break;case 32:n=Oe;break;case 268435456:n=Me;break;default:n=Oe}return r=yd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function yd(e,t){if(mu!==0&&mu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Qu()&&e.callbackNode!==n)return null;var r=ql;return r=Ke(e,e===Gl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Eu(e,r,t),vd(e,we()),e.callbackNode!=null&&e.callbackNode===n?yd.bind(null,e):null)}function bd(e,t){if(Qu())return null;Eu(e,t,!0)}function xd(){lf(function(){Wl&6?be(Ee,gd):_d()})}function Sd(){if(pd===0){var e=fa;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),pd=e}return pd}function Cd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Qt(``+e)}function wd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Td(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Cd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?Cd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new xn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(pd!==0){var e=o?wd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?wd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Ed=0;Ed<Jr.length;Ed++){var Dd=Jr[Ed];Yr(Dd.toLowerCase(),`on`+(Dd[0].toUpperCase()+Dd.slice(1)))}Yr(Br,`onAnimationEnd`),Yr(Vr,`onAnimationIteration`),Yr(Hr,`onAnimationStart`),Yr(`dblclick`,`onDoubleClick`),Yr(`focusin`,`onFocus`),Yr(`focusout`,`onBlur`),Yr(Ur,`onTransitionRun`),Yr(Wr,`onTransitionStart`),Yr(Gr,`onTransitionCancel`),Yr(Kr,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Od=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),kd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Od));function Ad(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Xr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Xr(e)}i.currentTarget=null,a=c}}}}function jd(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Fd(t,e,2,!1),n.add(r))}function Md(e,t,n){var r=0;t&&(r|=4),Fd(n,e,r,t)}var Nd=`_reactListening`+Math.random().toString(36).slice(2);function Pd(e){if(!e[Nd]){e[Nd]=!0,xt.forEach(function(t){t!==`selectionchange`&&(kd.has(t)||Md(t,!1,e),Md(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nd]||(t[Nd]=!0,Md(`selectionchange`,!1,t))}}function Fd(e,t,n,r){switch(Dp(t)){case 2:var i=xp;break;case 8:i=Sp;break;default:i=Cp}n=i.bind(null,t,n,e),i=void 0,!un||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Id(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=gt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}sn(function(){var r=a,i=tn(n),s=[];a:{var c=qr.get(e);if(c!==void 0){var l=xn,u=e;switch(e){case`keypress`:if(gn(n)===0)break a;case`keydown`:case`keyup`:l=zn;break;case`focusin`:u=`focus`,l=An;break;case`focusout`:u=`blur`,l=An;break;case`beforeblur`:case`afterblur`:l=An;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=On;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Vn;break;case Br:case Vr:case Hr:l=jn;break;case Kr:l=Hn;break;case`scroll`:case`scrollend`:l=Cn;break;case`wheel`:l=Un;break;case`copy`:case`cut`:case`paste`:l=Mn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Bn;break;case`toggle`:case`beforetoggle`:l=Wn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=cn(m,p),g!=null&&d.push(Ld(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==en&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?gt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=On,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Bn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:vt(l),h=u==null?c:vt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,gt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=zd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Bd(s,c,l,d,!1),u!==null&&f!==null&&Bd(s,f,u,d,!0)}}a:{if(c=r?vt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=ur;else if(ir(c))if(dr)v=br;else{v=vr;var y=_r}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Yt(r.elementType)&&(v=ur):v=yr;if(v&&=v(e,r)){ar(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ht(c,`number`,c.value)}switch(y=r?vt(r):window,e){case`focusin`:(ir(y)||y.contentEditable===`true`)&&(Ar=y,jr=r,Mr=null);break;case`focusout`:Mr=jr=Ar=null;break;case`mousedown`:Nr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Nr=!1,Pr(s,n,i);break;case`selectionchange`:if(kr)break;case`keydown`:case`keyup`:Pr(s,n,i)}var b;if(Kn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else er?Qn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Yn&&n.locale!==`ko`&&(er||x!==`onCompositionStart`?x===`onCompositionEnd`&&er&&(b=hn()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,er=!0)),y=Rd(r,x),0<y.length&&(x=new Nn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=$n(n),b!==null&&(x.data=b)))),(b=Jn?tr(e,n):nr(e,n))&&(x=Rd(r,`onBeforeInput`),0<x.length&&(y=new Nn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Td(s,e,r,n,i)}Ad(s,t)})}function Ld(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=cn(e,n),i!=null&&r.unshift(Ld(e,i,a)),i=cn(e,t),i!=null&&r.push(Ld(e,i,a))),e.tag===3)return r;e=e.return}return[]}function zd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Bd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=cn(n,a),l!=null&&o.unshift(Ld(n,l,c))):i||(l=cn(n,a),l!=null&&o.push(Ld(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Vd=/\r\n?/g,Hd=/\u0000|\uFFFD/g;function Ud(e){return(typeof e==`string`?e:``+e).replace(Vd,`
10
+ `).replace(Hd,``)}function Wd(e,t){return t=Ud(t),Ud(e)===t}function Gd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||R(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&R(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Jt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Gd(e,t,`name`,a.name,a,null),Gd(e,t,`formEncType`,a.formEncType,a,null),Gd(e,t,`formMethod`,a.formMethod,a,null),Gd(e,t,`formTarget`,a.formTarget,a,null)):(Gd(e,t,`encType`,a.encType,a,null),Gd(e,t,`method`,a.method,a,null),Gd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Qt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:jd(`beforetoggle`,e),jd(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Xt.get(n)||n,kt(e,n,r))}}function Kd(e,t,n,r,a,o){switch(n){case`style`:Jt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?R(e,r):(typeof r==`number`||typeof r==`bigint`)&&R(e,``+r);break;case`onScroll`:r!=null&&jd(`scroll`,e);break;case`onScrollEnd`:r!=null&&jd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=$t);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[ct]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function qd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:jd(`error`,e),jd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Gd(e,t,o,s,n,null)}}a&&Gd(e,t,`srcSet`,n.srcSet,n,null),r&&Gd(e,t,`src`,n.src,n,null);return;case`input`:jd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Gd(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in jd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Gd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in jd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Gd(e,t,s,c,n,null)}Gt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Gd(e,t,l,r,n,null)}return;case`dialog`:jd(`beforetoggle`,e),jd(`toggle`,e),jd(`cancel`,e),jd(`close`,e);break;case`iframe`:case`object`:jd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Od.length;r++)jd(Od[r],e);break;case`image`:jd(`error`,e),jd(`load`,e);break;case`details`:jd(`toggle`,e);break;case`embed`:case`source`:case`link`:jd(`error`,e),jd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Gd(e,t,u,r,n,null)}return;default:if(Yt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Kd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Gd(e,t,c,r,n,null))}function Jd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Gd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Gd(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Gd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Gd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Gd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Gd(e,t,s,a,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Gd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Gd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Gd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Gd(e,t,u,p,r,m)}return;default:if(Yt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Kd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Kd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Gd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Gd(e,t,f,p,r,m)}function Yd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Xd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Yd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Yd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Zd=null,Qd=null;function $d(e){return e.nodeType===9?e:e.ownerDocument}function ef(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function tf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function nf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var rf=null;function af(){var e=window.event;return e&&e.type===`popstate`?e===rf?!1:(rf=e,!0):(rf=null,!1)}var of=typeof setTimeout==`function`?setTimeout:void 0,sf=typeof clearTimeout==`function`?clearTimeout:void 0,cf=typeof Promise==`function`?Promise:void 0,lf=typeof queueMicrotask==`function`?queueMicrotask:cf===void 0?of:function(e){return cf.resolve(null).then(e).catch(uf)};function uf(e){setTimeout(function(){throw e})}function df(e){return e===`head`}function ff(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Kp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Ef(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Ef(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Ef(e.ownerDocument.body);n=i}while(n);Kp(t)}function pf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function mf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:mf(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function hf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=xf(e.nextSibling),e===null)break}return null}function gf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=xf(e.nextSibling),e===null))return null;return e}function _f(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=xf(e.nextSibling),e===null))return null;return e}function vf(e){return e.data===`$?`||e.data===`$~`}function yf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function bf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function xf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Sf=null;function Cf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return xf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function wf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Tf(e,t,n){switch(t=$d(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Ef(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var Df=new Map,Of=new Set;function kf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Af=N.d;N.d={f:jf,r:Mf,D:Ff,C:If,L:Lf,m:Rf,X:Bf,S:zf,M:Vf};function jf(){var e=Af.f(),t=Au();return e||t}function Mf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?As(t):Af.r(e)}var Nf=typeof document>`u`?null:document;function Pf(e,t,n){var r=Nf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Of.has(i)||(Of.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),qd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Ff(e){Af.D(e),Pf(`dns-prefetch`,e,null)}function If(e,t){Af.C(e,t),Pf(`preconnect`,e,t)}function Lf(e,t,n){Af.L(e,t,n);var r=Nf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Uf(e);break;case`script`:a=qf(e)}Df.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Df.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Wf(a))||t===`script`&&r.querySelector(Jf(a))||(t=r.createElement(`link`),qd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Rf(e,t){Af.m(e,t);var n=Nf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=qf(e)}if(!Df.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Df.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Jf(a)))return}r=n.createElement(`link`),qd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function zf(e,t,n){Af.S(e,t,n);var r=Nf;if(r&&e){var i=yt(r).hoistableStyles,a=Uf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Wf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Df.get(a))&&Zf(e,n);var c=o=r.createElement(`link`);bt(c),qd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Xf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Bf(e,t){Af.X(e,t);var n=Nf;if(n&&e){var r=yt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=f({src:e,async:!0},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),bt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Vf(e,t){Af.M(e,t);var n=Nf;if(n&&e){var r=yt(n).hoistableScripts,i=qf(e),a=r.get(i);a||(a=n.querySelector(Jf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Df.get(i))&&Qf(e,t),a=n.createElement(`script`),bt(a),qd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t,n,r){var a=(a=se.current)?kf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Uf(n.href),n=yt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Uf(n.href);var o=yt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Wf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Df.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Df.set(e,n),o||Kf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=qf(n),n=yt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Uf(e){return`href="`+zt(e)+`"`}function Wf(e){return`link[rel="stylesheet"][`+e+`]`}function Gf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Kf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),qd(t,`link`,n),bt(t),e.head.appendChild(t))}function qf(e){return`[src="`+zt(e)+`"]`}function Jf(e){return`script[async]`+e}function Yf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),qd(r,`style`,a),Xf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Uf(n.href);var o=e.querySelector(Wf(a));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;r=Gf(n),(a=Df.get(a))&&Zf(r,a),o=(e.ownerDocument||e).createElement(`link`),bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),qd(o,`link`,r),t.state.loading|=4,Xf(o,n.precedence,e),t.instance=o;case`script`:return o=qf(n.src),(a=e.querySelector(Jf(o)))?(t.instance=a,bt(a),a):(r=n,(a=Df.get(o))&&(r=f({},n),Qf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),bt(a),qd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Xf(r,n.precedence,e));return t.instance}function Xf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var $f=null;function ep(e,t,n){if($f===null){var r=new Map,i=$f=new Map;i.set(n,r)}else i=$f,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function tp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function np(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function rp(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ip(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Uf(r.href),a=t.querySelector(Wf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=sp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Gf(r),(i=Df.get(i))&&Zf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),qd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=sp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ap=0;function op(e,t){return e.stylesheets&&e.count===0&&lp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ap===0&&(ap=62500*Xd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ap?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function sp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cp=null;function lp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cp=new Map,t.forEach(up,e),cp=null,sp.call(e))}function up(e,t){if(!(t.state.loading&4)){var n=cp.get(e);if(n)var r=n.get(null);else{n=new Map,cp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=sp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var dp={$$typeof:b,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function fp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function pp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new fp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ci(3,null,null,t),e.current=a,a.stateNode=e,t=ca(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Va(a),e}function mp(e){return e?(e=oi,e):oi}function hp(e,t,n,r,i,a){i=mp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ua(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Wa(e,r,t),n!==null&&(Tu(n,e,t),Ga(n,e,t))}function gp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _p(e,t){gp(e,t),(e=e.alternate)&&gp(e,t)}function vp(e){if(e.tag===13||e.tag===31){var t=ri(e,67108864);t!==null&&Tu(t,e,67108864),_p(e,67108864)}}function yp(e){if(e.tag===13||e.tag===31){var t=Cu();t=nt(t);var n=ri(e,t);n!==null&&Tu(n,e,t),_p(e,t)}}var bp=!0;function xp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=2,Cp(e,t,n,r)}finally{N.p=a,M.T=i}}function Sp(e,t,n,r){var i=M.T;M.T=null;var a=N.p;try{N.p=8,Cp(e,t,n,r)}finally{N.p=a,M.T=i}}function Cp(e,t,n,r){if(bp){var i=wp(r);if(i===null)Id(e,t,r,Tp,n),Ip(e,r);else if(Rp(i,e,t,n,r))r.stopPropagation();else if(Ip(e,r),t&4&&-1<Fp.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}md(a),!(Wl&6)&&(du=we()+500,hd(0,!1))}}break;case 31:case 13:s=ri(a,2),s!==null&&Tu(s,a,2),Au(),_p(a,2)}if(a=wp(r),a===null&&Id(e,t,r,Tp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Id(e,t,r,null,n)}}function wp(e){return e=tn(e),Ep(e)}var Tp=null;function Ep(e){if(Tp=null,e=gt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Tp=e,null}function Dp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Te()){case Ee:return 2;case De:return 8;case Oe:case Ae:return 32;case Me:return 268435456;default:return 32}default:return 32}}var Op=!1,kp=null,Ap=null,jp=null,Mp=new Map,Np=new Map,Pp=[],Fp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Ip(e,t){switch(e){case`focusin`:case`focusout`:kp=null;break;case`dragenter`:case`dragleave`:Ap=null;break;case`mouseover`:case`mouseout`:jp=null;break;case`pointerover`:case`pointerout`:Mp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Np.delete(t.pointerId)}}function Lp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_t(t),t!==null&&vp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Rp(e,t,n,r,i){switch(t){case`focusin`:return kp=Lp(kp,e,t,n,r,i),!0;case`dragenter`:return Ap=Lp(Ap,e,t,n,r,i),!0;case`mouseover`:return jp=Lp(jp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Mp.set(a,Lp(Mp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Np.set(a,Lp(Np.get(a)||null,e,t,n,r,i)),!0}return!1}function zp(e){var t=gt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,at(e.priority,function(){yp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,at(e.priority,function(){yp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=wp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);en=r,n.target.dispatchEvent(r),en=null}else return t=_t(n),t!==null&&vp(t),e.blockedOn=n,!1;t.shift()}return!0}function Vp(e,t,n){Bp(e)&&n.delete(t)}function Hp(){Op=!1,kp!==null&&Bp(kp)&&(kp=null),Ap!==null&&Bp(Ap)&&(Ap=null),jp!==null&&Bp(jp)&&(jp=null),Mp.forEach(Vp),Np.forEach(Vp)}function Up(e,n){e.blockedOn===n&&(e.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hp)))}var Wp=null;function Gp(e){Wp!==e&&(Wp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wp===e&&(Wp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Ep(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kp(e){function t(t){return Up(t,e)}kp!==null&&Up(kp,e),Ap!==null&&Up(Ap,e),jp!==null&&Up(jp,e),Mp.forEach(t),Np.forEach(t);for(var n=0;n<Pp.length;n++){var r=Pp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Pp.length&&(n=Pp[0],n.blockedOn===null);)zp(n),n.blockedOn===null&&Pp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Gp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(Ep(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gp(n)}}}function qp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Jp(e){this._internalRoot=e}Yp.prototype.render=Jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;hp(n,Cu(),e,t,null,null)},Yp.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hp(e.current,2,null,e,null,null),Au(),t[lt]=null}};function Yp(e){this._internalRoot=e}Yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Pp.length&&t!==0&&t<Pp[n].priority;n++);Pp.splice(n,0,e),n===0&&zp(e)}};var Xp=n.version;if(Xp!==`19.2.6`)throw Error(i(527,Xp,`19.2.6`));N.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Zp={bundleType:0,version:`19.2.6`,rendererPackageName:`react-dom`,currentDispatcherRef:M,reconcilerVersion:`19.2.6`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qp.isDisabled&&Qp.supportsFiber)try{L=Qp.inject(Zp),Ie=Qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=pp(e,1,!1,null,null,n,r,null,o,s,c,qp),e[lt]=t.current,Pd(e),new Jp(t)}})),Fe=i(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Pe()}))(),L=n(ke(),1),Ie=n(Ne(),1);function Le(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Re=e=>{switch(e){case`success`:return Ve;case`info`:return Ue;case`warning`:return He;case`error`:return We;default:return null}},ze=Array(12).fill(0),Be=({visible:e,className:t})=>L.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},L.createElement(`div`,{className:`sonner-spinner`},ze.map((e,t)=>L.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Ve=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),He=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Ue=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),We=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},L.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Ge=L.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},L.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),L.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),Ke=()=>{let[e,t]=L.useState(document.hidden);return L.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},qe=1,Je=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:qe++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],L.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(Xe(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!L.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!L.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!L.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!L.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||qe++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ye=(e,t)=>{let n=t?.id||qe++;return Je.addToast({title:e,...t,id:n}),n},Xe=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Ze=Object.assign(Ye,{success:Je.success,info:Je.info,warning:Je.warning,error:Je.error,custom:Je.custom,message:Je.message,promise:Je.promise,dismiss:Je.dismiss,loading:Je.loading},{getHistory:()=>Je.toasts,getToasts:()=>Je.getActiveToasts()});Le(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function Qe(e){return e.label!==void 0}var $e=3,et=`24px`,tt=`16px`,nt=4e3,rt=356,it=14,at=45,ot=200;function st(...e){return e.filter(Boolean).join(` `)}function ct(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var lt=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=L.useState(null),[O,k]=L.useState(null),[ee,A]=L.useState(!1),[j,M]=L.useState(!1),[N,P]=L.useState(!1),[F,te]=L.useState(!1),[ne,re]=L.useState(!1),[ie,ae]=L.useState(0),[oe,se]=L.useState(0),I=L.useRef(n.duration||y||nt),ce=L.useRef(null),le=L.useRef(null),ue=c===0,de=c+1<=o,fe=n.type,pe=n.dismissible!==!1,me=n.className||``,he=n.descriptionClassName||``,ge=L.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),_e=L.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ve=L.useMemo(()=>n.duration||y||nt,[n.duration,y]),ye=L.useRef(0),be=L.useRef(0),xe=L.useRef(0),Se=L.useRef(null),[Ce,we]=b.split(`-`),Te=L.useMemo(()=>s.reduce((e,t,n)=>n>=ge?e:e+t.height,0),[s,ge]),Ee=Ke(),De=n.invert||t,Oe=fe===`loading`;be.current=L.useMemo(()=>ge*x+Te,[ge,Te]),L.useEffect(()=>{I.current=ve},[ve]),L.useEffect(()=>{A(!0)},[]),L.useEffect(()=>{let e=le.current;if(e){let t=e.getBoundingClientRect().height;return se(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),L.useLayoutEffect(()=>{if(!ee)return;let e=le.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,se(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[ee,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let ke=L.useCallback(()=>{M(!0),ae(be.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},ot)},[n,d,a,be]);L.useEffect(()=>{if(n.promise&&fe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Ee?(()=>{if(xe.current<ye.current){let e=new Date().getTime()-ye.current;I.current-=e}xe.current=new Date().getTime()})():I.current!==1/0&&(ye.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),ke()},I.current)),()=>clearTimeout(e)},[u,i,n,fe,Ee,ke]),L.useEffect(()=>{n.delete&&(ke(),n.onDismiss==null||n.onDismiss.call(n,n))},[ke,n.delete]);function Ae(){return w?.loading?L.createElement(`div`,{className:st(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":fe===`loading`},w.loading):L.createElement(Be,{className:st(C?.loader,n?.classNames?.loader),visible:fe===`loading`})}let je=n.icon||w?.[fe]||Re(fe);return L.createElement(`li`,{tabIndex:0,ref:le,className:st(_,me,C?.toast,n?.classNames?.toast,C?.default,C?.[fe],n?.classNames?.[fe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":ee,"data-promise":!!n.promise,"data-swiped":ne,"data-removed":j,"data-visible":de,"data-y-position":Ce,"data-x-position":we,"data-index":c,"data-front":ue,"data-swiping":N,"data-dismissible":pe,"data-type":fe,"data-invert":De,"data-swipe-out":F,"data-swipe-direction":O,"data-expanded":!!(u||S&&ee),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${j?ie:be.current}px`,"--initial-height":S?`auto`:`${oe}px`,...m,...n.style},onDragEnd:()=>{P(!1),D(null),Se.current=null},onPointerDown:e=>{e.button!==2&&(Oe||!pe||(ce.current=new Date,ae(be.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(P(!0),Se.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(F||!pe)return;Se.current=null;let e=Number(le.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(le.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ce.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=at||a>.11){ae(be.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),ke(),te(!0);return}else{var o,s;(o=le.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=le.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}re(!1),P(!1),D(null)},onPointerMove:t=>{var n,r;if(!Se.current||!pe||window.getSelection()?.toString().length>0)return;let i=t.clientY-Se.current.y,a=t.clientX-Se.current.x,o=e.swipeDirections??ct(b);!E&&(Math.abs(a)>1||Math.abs(i)>1)&&D(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(E===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&re(!0),(n=le.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=le.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},_e&&!n.jsx&&fe!==`loading`?L.createElement(`button`,{"aria-label":T,"data-disabled":Oe,"data-close-button":!0,onClick:Oe||!pe?()=>{}:()=>{ke(),n.onDismiss==null||n.onDismiss.call(n,n)},className:st(C?.closeButton,n?.classNames?.closeButton)},w?.close??Ge):null,(fe||n.icon||n.promise)&&n.icon!==null&&(w?.[fe]!==null||n.icon)?L.createElement(`div`,{"data-icon":``,className:st(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ae():null,n.type===`loading`?null:je):null,L.createElement(`div`,{"data-content":``,className:st(C?.content,n?.classNames?.content)},L.createElement(`div`,{"data-title":``,className:st(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?L.createElement(`div`,{"data-description":``,className:st(v,he,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),L.isValidElement(n.cancel)?n.cancel:n.cancel&&Qe(n.cancel)?L.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{Qe(n.cancel)&&pe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),ke())},className:st(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,L.isValidElement(n.action)?n.action:n.action&&Qe(n.action)?L.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{Qe(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&ke())},className:st(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function ut(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function dt(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?tt:et;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var ft=L.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=$e,toastOptions:g,dir:_=ut(),gap:v=it,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=L.useState([]),C=L.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=L.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[T,E]=L.useState([]),[D,O]=L.useState(!1),[k,ee]=L.useState(!1),[A,j]=L.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),M=L.useRef(null),N=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),P=L.useRef(null),F=L.useRef(!1),te=L.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||Je.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return L.useEffect(()=>Je.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{Ie.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),L.useEffect(()=>{if(d!==`system`){j(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?j(`dark`):j(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{j(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{j(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),L.useEffect(()=>{x.length<=1&&O(!1)},[x]),L.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=M.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===M.current||M.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),L.useEffect(()=>{if(M.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,F.current=!1)}},[M.current]),L.createElement(`section`,{ref:t,"aria-label":`${b} ${N}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?L.createElement(`ol`,{key:t,dir:_===`auto`?ut():_,tabIndex:-1,ref:M,className:c,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${rt}px`,"--gap":`${v}px`,...m,...dt(l,u)},onBlur:e=>{F.current&&!e.currentTarget.contains(e.relatedTarget)&&(F.current=!1,P.current&&=(P.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||F.current||(F.current=!0,P.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{k||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ee(!0)},onPointerUp:()=>ee(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>L.createElement(lt,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:k,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:te,toasts:C.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:o,gap:v,expanded:D,swipeDirections:e.swipeDirections}))):null}))});function pt(){return typeof window<`u`}function mt(e){return _t(e)?(e.nodeName||``).toLowerCase():`#document`}function ht(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gt(e){return((_t(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function _t(e){return pt()?e instanceof Node||e instanceof ht(e).Node:!1}function vt(e){return pt()?e instanceof Element||e instanceof ht(e).Element:!1}function yt(e){return pt()?e instanceof HTMLElement||e instanceof ht(e).HTMLElement:!1}function bt(e){return!pt()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ht(e).ShadowRoot}function xt(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Mt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function St(e){return/^(table|td|th)$/.test(mt(e))}function Ct(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var wt=/transform|translate|scale|rotate|perspective|filter/,Tt=/paint|layout|strict|content/,Et=e=>!!e&&e!==`none`,Dt;function Ot(e){let t=vt(e)?Mt(e):e;return Et(t.transform)||Et(t.translate)||Et(t.scale)||Et(t.rotate)||Et(t.perspective)||!At()&&(Et(t.backdropFilter)||Et(t.filter))||wt.test(t.willChange||``)||Tt.test(t.contain||``)}function kt(e){let t=Pt(e);for(;yt(t)&&!jt(t);){if(Ot(t))return t;if(Ct(t))return null;t=Pt(t)}return null}function At(){return Dt??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Dt}function jt(e){return/^(html|body|#document)$/.test(mt(e))}function Mt(e){return ht(e).getComputedStyle(e)}function Nt(e){return vt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pt(e){if(mt(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||bt(e)&&e.host||gt(e);return bt(t)?t.host:t}function Ft(e){let t=Pt(e);return jt(t)?e.ownerDocument?e.ownerDocument.body:e.body:yt(t)&&xt(t)?t:Ft(t)}function It(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Ft(e),i=r===e.ownerDocument?.body,a=ht(r);if(i){let e=Lt(a);return t.concat(a,a.visualViewport||[],xt(r)?r:[],e&&n?It(e):[])}else return t.concat(r,It(r,[],n))}function Lt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Rt={};function zt(e,t){let n=L.useRef(Rt);return n.current===Rt&&(n.current=e(t)),n}var Bt=L[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Vt=Bt&&Bt!==L.useLayoutEffect?Bt:e=>e();function Ht(e){let t=zt(Ut).current;return t.next=e,Vt(t.effect),t.trampoline}function Ut(){let e={next:void 0,callback:Wt,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Wt(){}var Gt={...L},R=typeof document<`u`?L.useLayoutEffect:()=>{};function Kt(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}var qt={};function Jt(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Xt(t);let a=Xt(e);return t&&(a=Zt(a,t)),n&&(a=Zt(a,n)),r&&(a=Zt(a,r)),i&&(a=Zt(a,i)),a}function Yt(e){if(e.length===0)return qt;if(e.length===1)return Xt(e[0]);let t=Xt(e[0]);for(let n=1;n<e.length;n+=1)t=Zt(t,e[n]);return t}function Xt(e){return tn(e)?{...nn(e,qt)}:Qt(e)}function Zt(e,t){return tn(t)?nn(t,e):$t(e,t)}function Qt(e){let t={...e};for(let e in t){let n=t[e];en(e,n)&&(t[e]=an(n))}return t}function $t(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Kt(e.style,r);break;case`className`:e[n]=sn(e.className,r);break;default:en(n,r)?e[n]=rn(e[n],r):e[n]=r}}return e}function en(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function tn(e){return typeof e==`function`}function nn(e,t){return tn(e)?e(t):e??qt}function rn(e,t){return t?e?(...n)=>{let r=n[0];if(cn(r)){let i=r;on(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:an(t):e}function an(e){return e&&((...t)=>{let n=t[0];return cn(n)&&on(n),e(...t)})}function on(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function sn(e,t){return t?e?t+` `+e:t:e}function cn(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function ln(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var un=ln(`https://base-ui.com/production-error`,`Base UI`),dn=L.createContext(void 0);function fn(e=!1){let t=L.useContext(dn);if(t===void 0&&!e)throw Error(un(16));return t}function pn(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:L.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function mn(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=L.useRef(null),s=fn(!0),c=a??s!==void 0,{props:l}=pn({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=L.useCallback(()=>{let e=o.current;hn(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return R(u,[u]),{getButtonProps:L.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return Jt({type:i?`button`:void 0,onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(on(e),o?.(e),e.baseUIHandlerPrevented))return;let r=e.target===e.currentTarget,a=e.currentTarget,s=hn(a),l=!i&&gn(a),u=r&&(i?s:!l),d=e.key===`Enter`,f=e.key===` `,p=a.getAttribute(`role`),m=p?.startsWith(`menuitem`)||p===`option`||p===`gridcell`;if(r&&c&&f){if(e.defaultPrevented&&m)return;e.preventDefault(),l||i&&s?(a.click(),e.preventBaseUIHandler()):u&&(n?.(e),e.preventBaseUIHandler());return}u&&(!i&&(f||d)&&e.preventDefault(),!i&&d&&n?.(e))},onKeyUp(e){if(!t){if(on(e),a?.(e),e.target===e.currentTarget&&i&&c&&hn(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&e.key===` `&&n?.(e)}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?void 0:{role:`button`},l,u)},[t,l,c,i]),buttonRef:Ht(e=>{o.current=e,u()})}}function hn(e){return yt(e)&&e.tagName===`BUTTON`}function gn(e){return!!(e?.tagName===`A`&&e?.href)}function _n(e,t,n,r){let i=zt(yn).current;return bn(i,e,t,n,r)&&Sn(i,[e,t,n,r]),i.callback}function vn(e){let t=zt(yn).current;return xn(t,e)&&Sn(t,e),t.callback}function yn(){return{callback:null,cleanup:null,refs:[]}}function bn(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function xn(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Sn(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}var Cn=19;function wn(e){return Cn>=e}function Tn(e){if(!L.isValidElement(e))return null;let t=e,n=t.props;return(wn(19)?n?.ref:t.ref)??null}function En(){}var Dn=Object.freeze([]),On=Object.freeze({});function kn(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function An(e,t){return typeof e==`function`?e(t):e}function jn(e,t){return typeof e==`function`?e(t):e}function Mn(e,t,n={}){let r=t.render,i=Nn(t,n);return n.enabled===!1?null:In(e,r,i,n.state??On)}function Nn(e,t={}){let{className:n,style:r,render:i}=e,{state:a=On,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?An(n,a):void 0,d=l?jn(r,a):void 0,f=l?kn(a,c):On,p=l&&s?Pn(s):void 0,m=l?Kt(f,p)??{}:On;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=vn([m.ref,Tn(i),...o]):m.ref=_n(m.ref,Tn(i),o):_n(null,null)),l?(u!==void 0&&(m.className=sn(m.className,u)),d!==void 0&&(m.style=Kt(m.style,d)),m):On}function Pn(e){return Array.isArray(e)?Yt(e):Jt(void 0,e)}var Fn=Symbol.for(`react.lazy`);function In(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Jt(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===Fn&&(i=L.Children.toArray(t)[0]),L.cloneElement(i,e)}if(e&&typeof e==`string`)return Ln(e,n);throw Error(un(8))}function Ln(e,t){return e===`button`?(0,L.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,L.createElement)(`img`,{alt:``,...t,key:t.key}):L.createElement(e,t)}var Rn=L.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=mn({disabled:i,focusableWhenDisabled:a,native:o});return Mn(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})});function zn(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=zn(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Bn(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=zn(e))&&(r&&(r+=` `),r+=t);return r}var Vn=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Hn=Bn,Un=(e,t)=>n=>{if(t?.variants==null)return Hn(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Vn(t)||Vn(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Hn(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Wn=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Gn=(e,t)=>({classGroupId:e,validator:t}),Kn=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),qn=`-`,Jn=[],Yn=`arbitrary..`,Xn=e=>{let t=$n(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Qn(e);let n=e.split(qn);return Zn(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?Wn(i,t):t:i||Jn}return n[e]||Jn}}},Zn=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=Zn(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(qn):e.slice(t).join(qn),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Qn=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Yn+r:void 0})(),$n=e=>{let{theme:t,classGroups:n}=e;return er(n,t)},er=(e,t)=>{let n=Kn();for(let r in e){let i=e[r];tr(i,n,r,t)}return n},tr=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];nr(i,t,n,r)}},nr=(e,t,n,r)=>{if(typeof e==`string`){rr(e,t,n);return}if(typeof e==`function`){ir(e,t,n,r);return}ar(e,t,n,r)},rr=(e,t,n)=>{let r=e===``?t:or(t,e);r.classGroupId=n},ir=(e,t,n,r)=>{if(sr(e)){tr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Gn(n,e))},ar=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];tr(o,or(t,a),n,r)}},or=(e,t)=>{let n=e,r=t.split(qn),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=Kn(),n.nextPart.set(t,i)),n=i}return n},sr=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,cr=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},lr=`!`,ur=`:`,dr=[],fr=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),pr=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ur){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(lr)?(c=s.slice(0,-1),l=!0):s.startsWith(lr)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return fr(t,l,c,u)};if(t){let e=t+ur,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):fr(dr,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},mr=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},hr=e=>({cache:cr(e.cacheSize),parseClassName:pr(e),sortModifiers:mr(e),...Xn(e)}),gr=/\s+/,_r=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(gr),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+lr:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},vr=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=yr(n))&&(i&&(i+=` `),i+=r);return i},yr=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=yr(e[r]))&&(n&&(n+=` `),n+=t);return n},br=(e,...t)=>{let n,r,i,a,o=o=>(n=hr(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=_r(e,n);return i(e,a),a};return a=o,(...e)=>a(vr(...e))},xr=[],Sr=e=>{let t=t=>t[e]||xr;return t.isThemeGetter=!0,t},Cr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,wr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Er=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Dr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Or=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ar=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jr=e=>Tr.test(e),Mr=e=>!!e&&!Number.isNaN(Number(e)),Nr=e=>!!e&&Number.isInteger(Number(e)),Pr=e=>e.endsWith(`%`)&&Mr(e.slice(0,-1)),Fr=e=>Er.test(e),Ir=()=>!0,Lr=e=>Dr.test(e)&&!Or.test(e),Rr=()=>!1,zr=e=>kr.test(e),Br=e=>Ar.test(e),Vr=e=>!Ur(e)&&!Zr(e),Hr=e=>ai(e,li,Rr),Ur=e=>Cr.test(e),Wr=e=>ai(e,ui,Lr),Gr=e=>ai(e,di,Mr),Kr=e=>ai(e,pi,Ir),qr=e=>ai(e,fi,Rr),Jr=e=>ai(e,si,Rr),Yr=e=>ai(e,ci,Br),Xr=e=>ai(e,mi,zr),Zr=e=>wr.test(e),Qr=e=>oi(e,ui),$r=e=>oi(e,fi),ei=e=>oi(e,si),ti=e=>oi(e,li),ni=e=>oi(e,ci),ri=e=>oi(e,mi,!0),ii=e=>oi(e,pi,!0),ai=(e,t,n)=>{let r=Cr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},oi=(e,t,n=!1)=>{let r=wr.exec(e);return r?r[1]?t(r[1]):n:!1},si=e=>e===`position`||e===`percentage`,ci=e=>e===`image`||e===`url`,li=e=>e===`length`||e===`size`||e===`bg-size`,ui=e=>e===`length`,di=e=>e===`number`,fi=e=>e===`family-name`,pi=e=>e===`number`||e===`weight`,mi=e=>e===`shadow`,hi=br(()=>{let e=Sr(`color`),t=Sr(`font`),n=Sr(`text`),r=Sr(`font-weight`),i=Sr(`tracking`),a=Sr(`leading`),o=Sr(`breakpoint`),s=Sr(`container`),c=Sr(`spacing`),l=Sr(`radius`),u=Sr(`shadow`),d=Sr(`inset-shadow`),f=Sr(`text-shadow`),p=Sr(`drop-shadow`),m=Sr(`blur`),h=Sr(`perspective`),g=Sr(`aspect`),_=Sr(`ease`),v=Sr(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Zr,Ur],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Zr,Ur,c],T=()=>[jr,`full`,`auto`,...w()],E=()=>[Nr,`none`,`subgrid`,Zr,Ur],D=()=>[`auto`,{span:[`full`,Nr,Zr,Ur]},Nr,Zr,Ur],O=()=>[Nr,`auto`,Zr,Ur],k=()=>[`auto`,`min`,`max`,`fr`,Zr,Ur],ee=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[jr,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[jr,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[jr,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,Zr,Ur],te=()=>[...b(),ei,Jr,{position:[Zr,Ur]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,ti,Hr,{size:[Zr,Ur]}],ie=()=>[Pr,Qr,Wr],ae=()=>[``,`none`,`full`,l,Zr,Ur],oe=()=>[``,Mr,Qr,Wr],se=()=>[`solid`,`dashed`,`dotted`,`double`],I=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[Mr,Pr,ei,Jr],le=()=>[``,`none`,m,Zr,Ur],ue=()=>[`none`,Mr,Zr,Ur],de=()=>[`none`,Mr,Zr,Ur],fe=()=>[Mr,Zr,Ur],pe=()=>[jr,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Fr],breakpoint:[Fr],color:[Ir],container:[Fr],"drop-shadow":[Fr],ease:[`in`,`out`,`in-out`],font:[Vr],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Fr],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Fr],shadow:[Fr],spacing:[`px`,Mr],text:[Fr],"text-shadow":[Fr],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,jr,Ur,Zr,g]}],container:[`container`],columns:[{columns:[Mr,Ur,Zr,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Nr,`auto`,Zr,Ur]}],basis:[{basis:[jr,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Mr,jr,`auto`,`initial`,`none`,Ur]}],grow:[{grow:[``,Mr,Zr,Ur]}],shrink:[{shrink:[``,Mr,Zr,Ur]}],order:[{order:[Nr,`first`,`last`,`none`,Zr,Ur]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...ee(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...ee()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...N()]}],"min-inline-size":[{"min-inline":[`auto`,...N()]}],"max-inline-size":[{"max-inline":[`none`,...N()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,...M()]}],"font-size":[{text:[`base`,n,Qr,Wr]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ii,Kr]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Pr,Ur]}],"font-family":[{font:[$r,qr,t]}],"font-features":[{"font-features":[Ur]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Zr,Ur]}],"line-clamp":[{"line-clamp":[Mr,`none`,Zr,Gr]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Zr,Ur]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Zr,Ur]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[Mr,`from-font`,`auto`,Zr,Wr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[Mr,`auto`,Zr,Ur]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Zr,Ur]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Zr,Ur]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Nr,Zr,Ur],radial:[``,Zr,Ur],conic:[Nr,Zr,Ur]},ni,Yr]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Mr,Zr,Ur]}],"outline-w":[{outline:[``,Mr,Qr,Wr]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`none`,u,ri,Xr]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,ri,Xr]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:oe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[Mr,Wr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,ri,Xr]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[Mr,Zr,Ur]}],"mix-blend":[{"mix-blend":[...I(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":I()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Mr]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Zr,Ur]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Mr]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Zr,Ur]}],filter:[{filter:[``,`none`,Zr,Ur]}],blur:[{blur:le()}],brightness:[{brightness:[Mr,Zr,Ur]}],contrast:[{contrast:[Mr,Zr,Ur]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ri,Xr]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,Mr,Zr,Ur]}],"hue-rotate":[{"hue-rotate":[Mr,Zr,Ur]}],invert:[{invert:[``,Mr,Zr,Ur]}],saturate:[{saturate:[Mr,Zr,Ur]}],sepia:[{sepia:[``,Mr,Zr,Ur]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Zr,Ur]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Mr,Zr,Ur]}],"backdrop-contrast":[{"backdrop-contrast":[Mr,Zr,Ur]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Mr,Zr,Ur]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Mr,Zr,Ur]}],"backdrop-invert":[{"backdrop-invert":[``,Mr,Zr,Ur]}],"backdrop-opacity":[{"backdrop-opacity":[Mr,Zr,Ur]}],"backdrop-saturate":[{"backdrop-saturate":[Mr,Zr,Ur]}],"backdrop-sepia":[{"backdrop-sepia":[``,Mr,Zr,Ur]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Zr,Ur]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Mr,`initial`,Zr,Ur]}],ease:[{ease:[`linear`,`initial`,_,Zr,Ur]}],delay:[{delay:[Mr,Zr,Ur]}],animate:[{animate:[`none`,v,Zr,Ur]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Zr,Ur]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[Zr,Ur,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Zr,Ur]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Zr,Ur]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[Mr,Qr,Wr,Gr]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function gi(...e){return hi(Bn(e))}var _i=i((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),vi=i(((e,t)=>{t.exports=_i()})),z=vi(),yi=Un(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function bi({className:e,variant:t=`default`,size:n=`default`,...r}){return(0,z.jsx)(Rn,{"data-slot":`button`,className:gi(yi({variant:t,size:n,className:e})),...r})}function xi(e){let t=L.useRef(!0);t.current&&(t.current=!1,e())}var Si=[];function Ci(e){L.useEffect(e,Si)}var wi=0,Ti=class e{static create(){return new e}currentId=wi;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=wi,t()},e)}isStarted(){return this.currentId!==wi}clear=()=>{this.currentId!==wi&&(clearTimeout(this.currentId),this.currentId=wi)};disposeEffect=()=>this.clear};function Ei(){let e=zt(Ti.create).current;return Ci(e.disposeEffect),e}var Di=typeof navigator<`u`,Oi=Li(),ki=zi(),Ai=Ri(),ji=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),Mi=Oi.platform===`MacIntel`&&Oi.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Oi.platform);Di&&/firefox/i.test(Ai);var Ni=Di&&/apple/i.test(navigator.vendor);Di&&/Edg/i.test(Ai);var Pi=Di&&/android/i.test(ki)||/android/i.test(Ai),Fi=Di&&ki.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,Ii=Ai.includes(`jsdom/`);function Li(){if(!Di)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function Ri(){if(!Di)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function zi(){if(!Di)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}function Bi(e){e.preventDefault(),e.stopPropagation()}function Vi(e){return`nativeEvent`in e}function Hi(e){return e.pointerType===``&&e.isTrusted?!0:Pi&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ui(e){return Ii?!1:!Pi&&e.width===0&&e.height===0||Pi&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Wi(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Gi(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Ki(e,t){return t!=null&&!Wi(t)?0:typeof e==`function`?e():e}function qi(e,t,n){let r=Ki(e,n);return typeof r==`number`?r:r?.[t]}function Ji(e){return typeof e==`function`?e():e}function Yi(e,t){return t||e===`click`||e===`mousedown`}var Xi=`none`,Zi=`trigger-press`,Qi=`trigger-hover`,$i=`trigger-focus`,ea=`outside-press`,ta=`item-press`,na=`close-press`,ra=`focus-out`,ia=`escape-key`,aa=`list-navigation`,oa=`cancel-open`,sa=`sibling-open`,ca=`disabled`,la=`imperative-action`;function ua(e,t,n,r){let i=!1,a=!1,o=r??On;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var da=L.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ti,currentIdRef:{current:null},currentContextRef:{current:null}});function fa(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=L.useRef(n),a=L.useRef(n),o=L.useRef(null),s=L.useRef(null),c=Ei();return(0,z.jsx)(da.Provider,{value:L.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function pa(e,t={open:!1}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`floatingId`),{open:i}=t,{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=L.useContext(da),[f,p]=L.useState(!1);return R(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!i&&a.current===r){if(p(!1),s){let t=r;return d.start(s,()=>{n.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[i,r,a,o,s,c,l,d,n]),R(()=>{if(!i)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:n.setOpen,setIsInstantPhase:p},a.current=r,o.current={open:0,close:qi(c.current,`close`)},t!==null&&t!==r?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,ua(Xi))):(p(!1),e?.setIsInstantPhase(!1))},[i,r,n,a,o,s,c,l,d]),R(()=>()=>{l.current=null},[l]),L.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function ma(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function ha(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function ga(e){let t=zt(_a,e).current;return t.next=e,R(t.effect),t}function _a(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var va=null;globalThis.requestAnimationFrame;var ya=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},ba=class e{static create(){return new e}static request(e){return ya.request(e)}static cancel(e){return ya.cancel(e)}currentId=va;request(e){this.cancel(),this.currentId=ya.request(()=>{this.currentId=va,e()})}cancel=()=>{this.currentId!==va&&(ya.cancel(this.currentId),this.currentId=va)};disposeEffect=()=>this.cancel};function xa(){let e=zt(ba.create).current;return Ci(e.disposeEffect),e}function Sa(e){return e?.ownerDocument||document}var Ca={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},wa={...Ca,position:`fixed`,top:0,left:0},Ta={...Ca,position:`absolute`},Ea=L.forwardRef(function(e,t){let[n,r]=L.useState();R(()=>{Ni&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,z.jsx)(`span`,{...e,ref:t,style:wa,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})}),Da=`data-base-ui-focusable`,Oa=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,ka=`ArrowLeft`,Aa=`ArrowRight`,ja=`ArrowUp`,Ma=`ArrowDown`;function Na(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Pa(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&bt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Fa(e){return`composedPath`in e?e.composedPath()[0]:e.target}function Ia(e,t){if(!vt(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(Pa(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function La(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ra(e){return e.matches(`html,body`)}function za(e){return yt(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Ba(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Oa}`)!=null}function Va(e){return e?e.getAttribute(`role`)===`combobox`&&za(e):!1}function Ha(e){if(!e||Ii)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Ua(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}var Wa=[`top`,`right`,`bottom`,`left`],Ga=Math.min,Ka=Math.max,qa=Math.round,Ja=Math.floor,Ya=e=>({x:e,y:e}),Xa={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Za(e,t,n){return Ka(e,Ga(t,n))}function Qa(e,t){return typeof e==`function`?e(t):e}function $a(e){return e.split(`-`)[0]}function eo(e){return e.split(`-`)[1]}function to(e){return e===`x`?`y`:`x`}function no(e){return e===`y`?`height`:`width`}function ro(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function io(e){return to(ro(e))}function ao(e,t,n){n===void 0&&(n=!1);let r=eo(e),i=io(e),a=no(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ho(o)),[o,ho(o)]}function oo(e){let t=ho(e);return[so(e),t,so(t)]}function so(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var co=[`left`,`right`],lo=[`right`,`left`],uo=[`top`,`bottom`],fo=[`bottom`,`top`];function po(e,t,n){switch(e){case`top`:case`bottom`:return n?t?lo:co:t?co:lo;case`left`:case`right`:return t?uo:fo;default:return[]}}function mo(e,t,n,r){let i=eo(e),a=po($a(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(so)))),a}function ho(e){let t=$a(e);return Xa[t]+e.slice(t.length)}function go(e){return{top:0,right:0,bottom:0,left:0,...e}}function _o(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:go(e)}function vo(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function yo(e,t,n){return Math.floor(e/t)!==n}function bo(e,t){return t<0||t>=e.length}function xo(e,t){return Co(e.current,{disabledIndices:t})}function So(e,t){return Co(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Co(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Oo(e,a,r));return a}function wo(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!Oo(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Ja(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!Oo(e,r,s))return r}};d&&Bi(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=Co(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=Co(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}bo(e,f)&&(f=u)}if(n===`both`){let n=Ja(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&Bi(t),u%o===o-1?r&&(f=Co(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Co(e,{startingIndex:u,disabledIndices:s}),r&&yo(f,o,n)&&(f=Co(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),yo(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&Bi(t),u%o===0?r&&(f=Co(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=Co(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&yo(f,o,n)&&(f=Co(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),yo(f,o,n)&&(f=u));let c=Ja(l/o)===n;bo(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:Co(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function To(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function Eo(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function Do(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Oo(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?Ao(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function ko(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Ao(e,t=e?Mt(e):null){return!e||!e.isConnected||!t||ko(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var jo=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Mo(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return bt(n)?n.host:null}function No(e){for(let t of Array.from(e.children))if(mt(t)===`summary`)return t;return null}function Po(e,t){let n=No(t);return!!n&&(e===n||Pa(n,e))}function Fo(e){let t=e?mt(e):``;return e!=null&&e.matches(jo)&&(t!==`summary`||e.parentElement!=null&&mt(e.parentElement)===`details`&&No(e.parentElement)===e)&&(t!==`details`||No(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Io(e){if(!Fo(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Mo(t)){let n=t!==e,r=mt(t)===`slot`;if(t.hasAttribute(`inert`)||n&&mt(t)===`details`&&!t.open&&!Po(e,t)||t.hasAttribute(`hidden`)||!r&&!Lo(t,n))return!1}return!0}function Lo(e,t){let n=Mt(e);return t?n.display!==`none`:Ao(e,n)}function Ro(e){let t=e.tabIndex;if(t<0){let t=mt(e);if(t===`details`||t===`audio`||t===`video`||yt(e)&&e.isContentEditable)return 0}return t}function zo(e){if(mt(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Bo(e,t){let n=zo(e);if(!n)return!0;let r=t.find(e=>{let t=zo(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=zo(e);return t?.name===n.name&&t.form===n.form})===n}function Vo(e){if(yt(e)&&mt(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return yt(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Ho(e,t){Vo(e).forEach(e=>{Fo(e)&&t.push(e),Ho(e,t)})}function Uo(e,t,n){Vo(e).forEach(e=>{yt(e)&&e.matches(t)&&n.push(e),Uo(e,t,n)})}function Wo(e){return Io(e)&&Ro(e)>=0}function Go(e){let t=[];return Ho(e,t),t.filter(Io)}function Ko(e){let t=Go(e);return t.filter(e=>Ro(e)>=0&&Bo(e,t))}function qo(e,t){let n=Ko(e),r=n.length;if(r===0)return;let i=Na(Sa(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Jo(e){return qo(Sa(e).body,1)||e}function Yo(e){return qo(Sa(e).body,-1)||e}function Xo(e,t){if(!e)return null;let n=Ko(Sa(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Zo(e){return Xo(e,1)}function Qo(e){return Xo(e,-1)}function $o(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Pa(n,r)}function es(e){Ko(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ts(e){let t=[];Uo(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function ns(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...ns(e,t.id,n)])}function rs(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function is(e){return`data-base-ui-${e}`}var as=0;function os(e,t={}){let{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(as);let a=()=>e?.focus({preventScroll:n});if(i)return a(),En;let o=requestAnimationFrame(a);return as=o,()=>{as===o&&(cancelAnimationFrame(o),as=0)}}var ss={inert:new WeakMap,"aria-hidden":new WeakMap},cs=`data-base-ui-inert`,ls={inert:new WeakSet,"aria-hidden":new WeakSet},us=new WeakMap,ds=0;function fs(e){return ls[e]}function ps(e){return e?bt(e)?e.host:ps(e.parentNode):null}var ms=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=ps(t);return e.contains(n)?n:null}).filter(e=>e!=null),hs=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},gs=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{mt(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function _s(e,t,n,r,{mark:i=!0,markerIgnoreElements:a=[]}){let o=r?`inert`:n?`aria-hidden`:null,s=null,c=null,l=ms(t,e),u=i?ms(t,a):[],d=new Set(u),f=i?gs(t,hs(l),new Set(l)).filter(e=>!d.has(e)):[],p=[],m=[];if(o){let e=ss[o],n=fs(o);c=n,s=e;let r=ms(t,Array.from(t.querySelectorAll(`[aria-live]`))),i=l.concat(r);gs(t,hs(i),new Set(i)).forEach(t=>{let r=t.getAttribute(o),i=r!==null&&r!==`false`,a=(e.get(t)||0)+1;e.set(t,a),p.push(t),a===1&&i&&n.add(t),i||t.setAttribute(o,o===`inert`?``:`true`)})}return i&&f.forEach(e=>{let t=(us.get(e)||0)+1;us.set(e,t),m.push(e),t===1&&e.setAttribute(cs,``)}),ds+=1,()=>{s&&p.forEach(e=>{let t=(s.get(e)||0)-1;s.set(e,t),t||(!c?.has(e)&&o&&e.removeAttribute(o),c?.delete(e))}),i&&m.forEach(e=>{let t=(us.get(e)||0)-1;us.set(e,t),t||e.removeAttribute(cs)}),--ds,ds||(ss.inert=new WeakMap,ss[`aria-hidden`]=new WeakMap,ls.inert=new WeakSet,ls[`aria-hidden`]=new WeakSet,us=new WeakMap)}}function vs(e,t={}){let{ariaHidden:n=!1,inert:r=!1,mark:i=!0,markerIgnoreElements:a=[]}=t,o=Sa(e[0]).body;return _s(e,o,n,r,{mark:i,markerIgnoreElements:a})}var ys=0;function bs(e,t=`mui`){let[n,r]=L.useState(e),i=e||n;return L.useEffect(()=>{n??(ys+=1,r(`${t}-${ys}`))},[n,t]),i}var xs=Gt.useId;function Ss(e,t){if(xs!==void 0){let n=xs();return e??(t?`${t}-${n}`:n)}return bs(e,t)}var Cs={style:{transition:`none`}},ws=`data-base-ui-click-trigger`,Ts={fallbackAxisSide:`none`},Es={fallbackAxisSide:`end`},Ds={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},Os=L.createContext(null),ks=()=>L.useContext(Os),As=is(`portal`);function js(e={}){let{ref:t,container:n,componentProps:r=On,elementProps:i}=e,a=Ss(),o=ks()?.portalNode,[s,c]=L.useState(null),[l,u]=L.useState(null),d=Ht(e=>{e!==null&&u(e)}),f=L.useRef(null);R(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(_t(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=Mn(`div`,r,{ref:[t,d],props:[{id:a,[As]:``},i]});return{portalNode:l,portalSubtree:s&&p?Ie.createPortal(p,s):null}}var Ms=L.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,style:s,...c}=e,{portalNode:l,portalSubtree:u}=js({container:r,ref:t,componentProps:e,elementProps:c}),d=L.useRef(null),f=L.useRef(null),p=L.useRef(null),m=L.useRef(null),[h,g]=L.useState(null),_=L.useRef(!1),v=h?.modal,y=h?.open,b=typeof o==`boolean`?o:!!h&&!h.modal&&h.open&&!!l;L.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&$o(e)&&(e.type===`focusin`?_.current&&=(ts(l),!1):(es(l),_.current=!0))}return ha(ma(l,`focusin`,e,!0),ma(l,`focusout`,e,!0))},[l,v]),L.useEffect(()=>{!l||y!==!1||(ts(l),_.current=!1)},[y,l]);let x=L.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,z.jsxs)(L.Fragment,{children:[u,(0,z.jsxs)(Os.Provider,{value:x,children:[b&&l&&(0,z.jsx)(Ea,{"data-type":`outside`,ref:d,onFocus:e=>{$o(e,l)?p.current?.focus():Yo(h?h.domReference:null)?.focus()}}),b&&l&&(0,z.jsx)(`span`,{"aria-owns":l.id,style:Ds}),l&&Ie.createPortal(n,l),b&&l&&(0,z.jsx)(Ea,{"data-type":`outside`,ref:f,onFocus:e=>{$o(e,l)?m.current?.focus():(Jo(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,ua(`focus-out`,e.nativeEvent)))}})]})]})});function Ns(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Ps=class{nodesRef={current:[]};events=Ns();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Fs=L.createContext(null),Is=L.createContext(null),Ls=()=>L.useContext(Fs)?.id||null,Rs=e=>{let t=L.useContext(Is);return e??t};function zs(e){let t=Ss(),n=Rs(e),r=Ls();return R(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Bs(e){let{children:t,id:n}=e,r=Ls();return(0,z.jsx)(Fs.Provider,{value:L.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Vs(e){let{children:t,externalTree:n}=e,r=zt(()=>n??new Ps).current;return(0,z.jsx)(Is.Provider,{value:r,children:t})}function Hs(e){return e==null?e:`current`in e?e.current:e}function Us(e,t){let n=ht(Fa(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||`keyboard`:`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Ws=20,Gs=[];function Ks(){Gs=Gs.filter(e=>e.deref()?.isConnected)}function qs(e){Ks(),e&&mt(e)!==`body`&&(Gs.push(new WeakRef(e)),Gs.length>Ws&&(Gs=Gs.slice(-Ws)))}function Js(){return Ks(),Gs[Gs.length-1]?.deref()}function Ys(e){return e?Wo(e)?e:Ko(e)[0]||e:null}function Xs(e,t){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!t.current.includes(`floating`)&&!e.getAttribute(`role`)?.includes(`dialog`))return;let n=Go(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Wo(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),r=e.getAttribute(`tabindex`);t.current.includes(`floating`)||n.length===0?r!==`0`&&e.setAttribute(`tabindex`,`0`):(r!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Zs(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:o=!1,modal:s=!0,closeOnFocusOut:c=!0,openInteractionType:l=``,nextFocusableElement:u,previousFocusableElement:d,beforeContentFocusGuardRef:f,externalTree:p,getInsideElements:m}=e,h=`rootStore`in t?t.rootStore:t,g=h.useState(`open`),_=h.useState(`domReferenceElement`),v=h.useState(`floatingElement`),{events:y,dataRef:b}=h.context,x=Ht(()=>b.current.floatingContext?.nodeId),S=i===!1,C=Va(_)&&S,w=L.useRef([`content`]),T=ga(i),E=ga(a),D=ga(l),O=Rs(p),k=ks(),ee=L.useRef(!1),A=L.useRef(!1),j=L.useRef(!1),M=L.useRef(null),N=L.useRef(``),P=L.useRef(``),F=L.useRef(null),te=L.useRef(null),ne=_n(F,f,k?.beforeInsideRef),re=_n(te,k?.afterInsideRef),ie=Ei(),ae=Ei(),oe=xa(),se=k!=null,I=Ua(v),ce=Ht((e=I)=>e?Ko(e):[]),le=Ht(()=>m?.().filter(e=>e!=null)??[]);L.useEffect(()=>{if(r||!s)return;function e(e){e.key===`Tab`&&Pa(I,Na(Sa(I)))&&ce().length===0&&!C&&Bi(e)}return ma(Sa(I),`keydown`,e)},[r,_,I,s,w,C,ce]),L.useEffect(()=>{if(r||!g)return;let e=Sa(I);function t(){j.current=!1}function n(e){let t=Fa(e),n=le();j.current=!(Pa(v,t)||Pa(_,t)||Pa(k?.portalNode,t)||n.some(e=>e===t||Pa(e,t))),P.current=e.pointerType||`keyboard`,t?.closest(`[data-base-ui-click-trigger]`)&&(A.current=!0)}function i(){P.current=`keyboard`}return ha(ma(e,`pointerdown`,n,!0),ma(e,`pointerup`,t,!0),ma(e,`pointercancel`,t,!0),ma(e,`keydown`,i,!0))},[r,v,_,I,g,k,le]),L.useEffect(()=>{if(r||!c)return;let e=Sa(I);function t(){A.current=!0,ae.start(0,()=>{A.current=!1})}function n(e){let t=Fa(e);Wo(t)&&(M.current=t)}function i(t){let n=t.relatedTarget,r=t.currentTarget,i=Fa(t);queueMicrotask(()=>{let a=x(),c=h.context.triggerElements,l=le(),f=n?.hasAttribute(is(`focus-guard`))&&[F.current,te.current,k?.beforeInsideRef.current,k?.afterInsideRef.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,Hs(d),Hs(u)].includes(n),p=!(Pa(_,n)||Pa(v,n)||Pa(n,v)||Pa(k?.portalNode,n)||l.some(e=>e===n||Pa(e,n))||n!=null&&c.hasElement(n)||c.hasMatchingElement(e=>Pa(e,n))||f||O&&(ns(O.nodesRef.current,a).find(e=>Pa(e.context?.elements.floating,n)||Pa(e.context?.elements.domReference,n))||rs(O.nodesRef.current,a).find(e=>[e.context?.elements.floating,Ua(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===_&&I&&Xs(I,w),o&&r!==_&&!Ao(i)&&Na(e)===e.body){if(yt(I)&&(I.focus(),o===`popup`)){oe.request(()=>{I.focus()});return}let e=ce(),t=M.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||I;yt(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!s)&&n&&p&&!A.current&&(C||n!==Js())&&(ee.current=!0,h.setOpen(!1,ua(ra,t)))})}function a(){j.current||(b.current.insideReactTree=!0,ie.start(0,()=>{b.current.insideReactTree=!1}))}let l=yt(_)?_:null;if(!(!v&&!l))return ha(l&&ma(l,`focusout`,i),l&&ma(l,`pointerdown`,t),v&&ma(v,`focusin`,n),v&&ma(v,`focusout`,i),v&&k&&ma(v,`focusout`,a,!0))},[r,_,v,I,s,O,k,h,c,o,ce,C,x,w,b,ie,ae,oe,u,d,le]),L.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(k?.portalNode?.querySelectorAll(`[${is(`portal`)}]`)||[]),t=(O?rs(O.nodesRef.current,x()):[]).find(e=>Va(e.context?.elements.domReference||null))?.context?.elements.domReference,n=vs([v,...e,F.current,te.current,k?.beforeOutsideRef.current,k?.afterOutsideRef.current,...le(),t,Hs(d),Hs(u),C?_:null].filter(e=>e!=null),{ariaHidden:s||C,mark:!1}),i=vs([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,s,w,k,C,O,x,u,d,le]),R(()=>{if(!g||r||!yt(I))return;let e=Na(Sa(I));queueMicrotask(()=>{let t=T.current,n=typeof t==`function`?t(D.current||``):t;if(n===void 0||n===!1||Pa(I,e))return;let r=null,i=()=>(r??=ce(I),r[0]||I),a;a=n===!0||n===null?i():Hs(n),a||=i(),os(a,{preventScroll:a===I})})},[r,g,I,S,ce,T,D]),R(()=>{if(r||!I)return;let e=Sa(I);qs(Na(e));function t(e){if(e.open||(N.current=Us(e.nativeEvent,P.current)),e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`&&(ee.current=!0),e.reason===`outside-press`)if(e.nested)ee.current=!1;else if(Hi(e.nativeEvent)||Ui(e.nativeEvent))ee.current=!1;else{let e=!1;Sa(I).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?ee.current=!1:ee.current=!0}}y.on(`openchange`,t);function n(){let e=E.current,t=typeof e==`function`?e(N.current):e;if(t===void 0||t===!1)return null;if(t===null&&(t=!0),typeof t==`boolean`){let e=_||Js();return e&&e.isConnected?e:null}let n=_||Js();return Hs(t)||n||null}return()=>{y.off(`openchange`,t);let r=Na(e),i=le(),a=Pa(v,r)||i.some(e=>e===r||Pa(e,r))||O&&ns(O.nodesRef.current,x(),!1).some(e=>Pa(e.context?.elements.floating,r)),o=E.current,s=n();queueMicrotask(()=>{let t=Ys(s),n=typeof o!=`boolean`;o&&!ee.current&&yt(t)&&(!(!n&&t!==r&&r!==e.body)||a)&&t.focus({preventScroll:!0}),ee.current=!1})}},[r,v,I,E,b,y,O,_,x,le]),R(()=>{if(!ji||g||!v)return;let e=Na(Sa(v));!yt(e)||!za(e)||Pa(v,e)&&e.blur()},[g,v]),R(()=>{if(!(r||!k))return k.setFocusManagerState({modal:s,closeOnFocusOut:c,open:g,onOpenChange:h.setOpen,domReference:_}),()=>{k.setFocusManagerState(null)}},[r,k,s,g,h,c,_]),R(()=>{if(!(r||!I))return Xs(I,w),()=>{queueMicrotask(Ks)}},[r,I,w]);let ue=!r&&(s?!C:!0)&&(se||s);return(0,z.jsxs)(L.Fragment,{children:[ue&&(0,z.jsx)(Ea,{"data-type":`inside`,ref:ne,onFocus:e=>{if(s){let e=ce();os(e[e.length-1])}else k?.portalNode&&(ee.current=!1,$o(e,k.portalNode)?Jo(_)?.focus():Hs(d??k.beforeOutsideRef)?.focus())}}),n,ue&&(0,z.jsx)(Ea,{"data-type":`inside`,ref:re,onFocus:e=>{s?os(ce()[0]):k?.portalNode&&(c&&(ee.current=!0),$o(e,k.portalNode)?Yo(_)?.focus():Hs(u??k.afterOutsideRef)?.focus())}})]})}function Qs(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:a=`click`,toggle:o=!0,ignoreMouse:s=!1,stickIfOpen:c=!0,touchOpenDelay:l=0,reason:u=Zi}=t,d=L.useRef(void 0),f=xa(),p=Ei(),m=L.useMemo(()=>({onPointerDown(e){d.current=e.pointerType},onMouseDown(e){let t=d.current,i=e.nativeEvent,m=n.select(`open`);if(e.button!==0||a===`click`||Wi(t,!0)&&s)return;let h=r.current.openEvent,g=h?.type,_=n.select(`domReferenceElement`)!==e.currentTarget,v=m&&_||!(m&&o&&(!(h&&c)||g===`click`||g===`mousedown`)),y=Fa(i);if(za(y)){let e=ua(u,i,y);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e);return}let b=e.currentTarget;f.request(()=>{let e=ua(u,i,b);v&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,e)}):n.setOpen(v,e)})},onClick(e){if(a===`mousedown-only`)return;let t=d.current;if(a===`mousedown`&&t){d.current=void 0;return}if(Wi(t,!0)&&s)return;let i=n.select(`open`),f=r.current.openEvent,m=n.select(`domReferenceElement`)!==e.currentTarget,h=i&&m||!(i&&o&&(!(f&&c)||Gi(f))),g=ua(u,e.nativeEvent,e.currentTarget);h&&t===`touch`&&l>0?p.start(l,()=>{n.setOpen(!0,g)}):n.setOpen(h,g)},onKeyDown(){d.current=void 0}}),[r,a,s,n,c,o,f,p,l,u]);return L.useMemo(()=>i?{reference:m}:On,[i,m])}function $s(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function ec(e){return e!=null&&e.clientX!=null}function tc(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{enabled:s=!0,axis:c=`both`}=t,l=L.useRef(!1),u=L.useRef(null),[d,f]=L.useState(),[p,m]=L.useState([]),h=Ht((e,t,r)=>{l.current||o.current.openEvent&&!ec(o.current.openEvent)||n.set(`positionReference`,$s(r??a,{x:e,y:t,axis:c,dataRef:o,pointerType:d}))}),g=Ht(e=>{r?u.current||m([]):h(e.clientX,e.clientY,e.currentTarget)}),_=Wi(d)?i:r,v=L.useCallback(()=>{if(!_||!s)return;let e=ht(i);function t(e){Pa(i,Fa(e))?(u.current?.(),u.current=null):h(e.clientX,e.clientY)}if(!o.current.openEvent||ec(o.current.openEvent))return u.current=ma(e,`mousemove`,t),()=>{u.current?.(),u.current=null};n.set(`positionReference`,a)},[_,s,i,o,a,n,h]);L.useEffect(()=>v(),[v,p]),L.useEffect(()=>{s&&!i&&(l.current=!1)},[s,i]),L.useEffect(()=>{!s&&r&&(l.current=!0)},[s,r]);let y=L.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return L.useMemo(()=>s?{reference:y,trigger:y}:{},[s,y])}var nc={intentional:`onClick`,sloppy:`onPointerDown`};function rc(){return!1}function ic(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function ac(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=rc,referencePressEvent:d=`sloppy`,bubbles:f,externalTree:p}=t,m=Rs(p),h=Ht(typeof c==`function`?c:()=>!1),g=typeof c==`function`?h:c,_=g!==!1,v=Ht(()=>l),y=L.useRef(!1),b=L.useRef(!1),x=L.useRef(!1),{escapeKey:S,outsidePress:C}=ic(f),w=L.useRef(null),T=Ei(),E=Ei(),D=Ht(()=>{E.clear(),a.current.insideReactTree=!1}),O=L.useRef(!1),k=L.useRef(``),ee=Ht(u),A=Ht(e=>{if(!r||!o||!s||e.key!==`Escape`||O.current)return;let t=a.current.floatingContext?.nodeId,i=m?ns(m.nodesRef.current,t):[];if(!S&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=ua(ia,Vi(e)?e.nativeEvent:e);n.setOpen(!1,c),!S&&!c.isPropagationAllowed&&e.stopPropagation()}),j=Ht(()=>{a.current.insideReactTree=!0,E.start(0,D)});L.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=S,a.current.__outsidePressBubbles=C;let e=new Ti,t=new Ti;function c(){e.clear(),O.current=!0}function l(){e.start(At()?5:0,()=>{O.current=!1})}function u(){x.current=!0,t.start(0,()=>{x.current=!1})}function d(){y.current=!1,b.current=!1}function f(){let e=k.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=a.current.floatingContext?.nodeId,r=m&&ns(m.nodesRef.current,t).some(t=>La(e,t.context?.elements.floating));return La(e,n.select(`floatingElement`))||La(e,n.select(`domReferenceElement`))||r}function E(e){if(p(e)){D();return}if(a.current.insideReactTree){D();return}let r=Fa(e),i=`[${is(`inert`)}]`,o=vt(r)?r.getRootNode():null,s=Array.from((bt(o)?o:Sa(n.select(`floatingElement`))).querySelectorAll(i)),c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>Pa(e,r))))return;let l=vt(r)?r:null;for(;l&&!jt(l);){let e=Pt(l);if(jt(e)||!vt(e))break;l=e}if(s.length&&vt(r)&&!Ra(r)&&!Pa(r,n.select(`floatingElement`))&&s.every(e=>!Pa(l,e)))return;if(yt(r)&&!(`touches`in e)){let t=jt(r),n=Mt(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(h(e))return;if(f()===`intentional`&&x.current){t.clear(),x.current=!1;return}if(typeof g==`function`&&!g(e))return;let u=a.current.floatingContext?.nodeId,d=m?ns(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,ua(ea,e)),D()}function ee(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||La(e,n.select(`floatingElement`))||La(e,n.select(`domReferenceElement`))||E(e)}function j(e){if(f()!==`sloppy`||!n.select(`open`)||!o||La(e,n.select(`floatingElement`))||La(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(w.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},T.start(1e3,()=>{w.current&&(w.current.dismissOnTouchEnd=!1,w.current.dismissOnMouseDown=!1)}))}function M(e,t){let n=Fa(e);if(!n)return;let r=ma(n,e.type,()=>{t(e),r()})}function N(e){k.current=`touch`,M(e,j)}function P(e){T.clear(),e.type===`pointerdown`&&(k.current=e.pointerType),!(e.type===`mousedown`&&w.current&&!w.current.dismissOnMouseDown)&&M(e,e=>{e.type===`pointerdown`?ee(e):E(e)})}function F(e){if(!y.current)return;let n=b.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!h(e)){if(n){u();return}typeof g==`function`&&!g(e)||(t.clear(),x.current=!0,D())}}}function te(e){if(f()!==`sloppy`||!w.current||La(e,n.select(`floatingElement`))||La(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-w.current.startX),i=Math.abs(t.clientY-w.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(w.current.dismissOnTouchEnd=!0),a>10&&(E(e),T.clear(),w.current=null)}function ne(e){M(e,te)}function re(e){f()!==`sloppy`||!w.current||La(e,n.select(`floatingElement`))||La(e,n.select(`domReferenceElement`))||(w.current.dismissOnTouchEnd&&E(e),T.clear(),w.current=null)}function ie(e){M(e,re)}let ae=Sa(i),oe=ha(s&&ha(ma(ae,`keydown`,A),ma(ae,`compositionstart`,c),ma(ae,`compositionend`,l)),_&&ha(ma(ae,`click`,P,!0),ma(ae,`pointerdown`,P,!0),ma(ae,`pointerup`,F,!0),ma(ae,`pointercancel`,F,!0),ma(ae,`mousedown`,P,!0),ma(ae,`mouseup`,F,!0),ma(ae,`touchstart`,N,!0),ma(ae,`touchmove`,ne,!0),ma(ae,`touchend`,ie,!0)));return()=>{oe(),e.clear(),t.clear(),d(),x.current=!1}},[a,i,s,_,g,r,o,S,C,A,D,v,m,n,T]),L.useEffect(D,[g,D]);let M=L.useMemo(()=>({onKeyDown:A,[nc[d]]:e=>{ee()&&n.setOpen(!1,ua(Zi,e.nativeEvent))},...d!==`intentional`&&{onClick(e){ee()&&n.setOpen(!1,ua(`trigger-press`,e.nativeEvent))}}}),[A,n,d,ee]),N=Ht(e=>{if(!r||!o||e.button!==0)return;let t=Fa(e.nativeEvent);Pa(n.select(`floatingElement`),t)&&(y.current||(y.current=!0,b.current=!1))}),P=Ht(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(b.current=!0)}),F=L.useMemo(()=>({onKeyDown:A,onPointerDown:P,onMouseDown:P,onClickCapture:j,onMouseDownCapture(e){j(),N(e)},onPointerDownCapture(e){j(),N(e)},onMouseUpCapture:j,onTouchEndCapture:j,onTouchMoveCapture:j}),[A,j,N,P]);return L.useMemo(()=>o?{reference:M,floating:F,trigger:M}:{},[o,M,F])}function oc(e,t,n){let{reference:r,floating:i}=e,a=ro(t),o=io(t),s=no(o),c=$a(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(eo(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function sc(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Qa(t,e),p=_o(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=vo(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=vo(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var cc=50,lc=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:sc},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=oc(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<cc&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=oc(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},uc=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Qa(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=$a(r),_=ro(o),v=$a(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ho(o)]:oo(o)),x=p!==`none`;!d&&x&&b.push(...mo(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ao(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==ro(t))||T.every(e=>ro(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ro(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function dc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fc(e){return Wa.some(t=>e[t]>=0)}var pc=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Qa(e,t);switch(i){case`referenceHidden`:{let e=dc(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:fc(e)}}}case`escaped`:{let e=dc(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:fc(e)}}}default:return{}}}}},mc=new Set([`left`,`top`]);async function hc(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=$a(n),s=eo(n),c=ro(n)===`y`,l=mc.has(o)?-1:1,u=a&&c?-1:1,d=Qa(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var gc=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await hc(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_c=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Qa(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ro($a(i)),p=to(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Za(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Za(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},vc=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Qa(e,t),u={x:n,y:r},d=ro(i),f=to(d),p=u[f],m=u[d],h=Qa(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=mc.has($a(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},yc=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Qa(e,t),u=await o.detectOverflow(t,l),d=$a(i),f=eo(i),p=ro(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Ga(h-u[g],v),x=Ga(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Ka(u.left,0),t=Ka(u.right,0),n=Ka(u.top,0),r=Ka(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Ka(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Ka(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function bc(e){let t=Mt(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=yt(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=qa(n)!==a||qa(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function xc(e){return vt(e)?e:e.contextElement}function Sc(e){let t=xc(e);if(!yt(t))return Ya(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=bc(t),o=(a?qa(n.width):n.width)/r,s=(a?qa(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Cc=Ya(0);function wc(e){let t=ht(e);return!At()||!t.visualViewport?Cc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tc(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ht(e)?!1:t}function Ec(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=xc(e),o=Ya(1);t&&(r?vt(r)&&(o=Sc(r)):o=Sc(e));let s=Tc(a,n,r)?wc(a):Ya(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=ht(a),t=r&&vt(r)?ht(r):r,n=e,i=Lt(n);for(;i&&r&&t!==n;){let e=Sc(i),t=i.getBoundingClientRect(),r=Mt(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ht(i),i=Lt(n)}}return vo({width:u,height:d,x:c,y:l})}function Dc(e,t){let n=Nt(e).scrollLeft;return t?t.left+n:Ec(gt(e)).left+n}function Oc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Dc(e,n),y:n.top+t.scrollTop}}function kc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=gt(r),s=t?Ct(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Ya(1),u=Ya(0),d=yt(r);if((d||!d&&!a)&&((mt(r)!==`body`||xt(o))&&(c=Nt(r)),d)){let e=Ec(r);l=Sc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Oc(o,c):Ya(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ac(e){return Array.from(e.getClientRects())}function jc(e){let t=gt(e),n=Nt(e),r=e.ownerDocument.body,i=Ka(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ka(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Dc(e),s=-n.scrollTop;return Mt(r).direction===`rtl`&&(o+=Ka(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Mc=25;function Nc(e,t){let n=ht(e),r=gt(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=At();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Dc(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Mc&&(a-=o)}else l<=Mc&&(a+=l);return{width:a,height:o,x:s,y:c}}function Pc(e,t){let n=Ec(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=yt(e)?Sc(e):Ya(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Fc(e,t,n){let r;if(t===`viewport`)r=Nc(e,n);else if(t===`document`)r=jc(gt(e));else if(vt(t))r=Pc(t,n);else{let n=wc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return vo(r)}function Ic(e,t){let n=Pt(e);return n===t||!vt(n)||jt(n)?!1:Mt(n).position===`fixed`||Ic(n,t)}function Lc(e,t){let n=t.get(e);if(n)return n;let r=It(e,[],!1).filter(e=>vt(e)&&mt(e)!==`body`),i=null,a=Mt(e).position===`fixed`,o=a?Pt(e):e;for(;vt(o)&&!jt(o);){let t=Mt(o),n=Ot(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||xt(o)&&!n&&Ic(e,o))?r=r.filter(e=>e!==o):i=t,o=Pt(o)}return t.set(e,r),r}function Rc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ct(t)?[]:Lc(t,this._c):[].concat(n),r],o=Fc(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Fc(t,a[e],i);s=Ka(n.top,s),c=Ga(n.right,c),l=Ga(n.bottom,l),u=Ka(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function zc(e){let{width:t,height:n}=bc(e);return{width:t,height:n}}function Bc(e,t,n){let r=yt(t),i=gt(t),a=n===`fixed`,o=Ec(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Ya(0);function l(){c.x=Dc(i)}if(r||!r&&!a)if((mt(t)!==`body`||xt(i))&&(s=Nt(t)),r){let e=Ec(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Oc(i,s):Ya(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Vc(e){return Mt(e).position===`static`}function Hc(e,t){if(!yt(e)||Mt(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return gt(e)===n&&(n=n.ownerDocument.body),n}function Uc(e,t){let n=ht(e);if(Ct(e))return n;if(!yt(e)){let t=Pt(e);for(;t&&!jt(t);){if(vt(t)&&!Vc(t))return t;t=Pt(t)}return n}let r=Hc(e,t);for(;r&&St(r)&&Vc(r);)r=Hc(r,t);return r&&jt(r)&&Vc(r)&&!Ot(r)?n:r||kt(e)||n}var Wc=async function(e){let t=this.getOffsetParent||Uc,n=this.getDimensions,r=await n(e.floating);return{reference:Bc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Gc(e){return Mt(e).direction===`rtl`}var Kc={convertOffsetParentRelativeRectToViewportRelativeRect:kc,getDocumentElement:gt,getClippingRect:Rc,getOffsetParent:Uc,getElementRects:Wc,getClientRects:Ac,getDimensions:zc,getScale:Sc,isElement:vt,isRTL:Gc};function qc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Jc(e,t){let n=null,r,i=gt(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Ja(d),h=Ja(i.clientWidth-(u+f)),g=Ja(i.clientHeight-(d+p)),_=Ja(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Ka(0,Ga(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!qc(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Yc(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=xc(e),u=i||a?[...l?It(l):[],...t?It(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Jc(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Ec(e):null;c&&g();function g(){let t=Ec(e);h&&!qc(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Xc=gc,Zc=_c,Qc=uc,$c=yc,el=pc,tl=vc,nl=(e,t,n)=>{let r=new Map,i={platform:Kc,...n},a={...i.platform,_c:r};return lc(e,t,{...i,platform:a})},rl=typeof document<`u`?L.useLayoutEffect:function(){};function il(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!il(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!il(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function al(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ol(e,t){let n=al(e);return Math.round(t*n)/n}function sl(e){let t=L.useRef(e);return rl(()=>{t.current=e}),t}function cl(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=L.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=L.useState(r);il(f,r)||p(r);let[m,h]=L.useState(null),[g,_]=L.useState(null),v=L.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=L.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=L.useRef(null),C=L.useRef(null),w=L.useRef(u),T=c!=null,E=sl(c),D=sl(i),O=sl(l),k=L.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),nl(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};ee.current&&!il(w.current,t)&&(w.current=t,Ie.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);rl(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let ee=L.useRef(!1);rl(()=>(ee.current=!0,()=>{ee.current=!1}),[]),rl(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let A=L.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),j=L.useMemo(()=>({reference:b,floating:x}),[b,x]),M=L.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=ol(j.floating,u.x),r=ol(j.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...al(j.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,j.floating,u.x,u.y]);return L.useMemo(()=>({...u,update:k,refs:A,elements:j,floatingStyles:M}),[u,k,A,j,M])}var ll=(e,t)=>{let n=Xc(e);return{name:n.name,fn:n.fn,options:[e,t]}},ul=(e,t)=>{let n=Zc(e);return{name:n.name,fn:n.fn,options:[e,t]}},dl=(e,t)=>({fn:tl(e).fn,options:[e,t]}),fl=(e,t)=>{let n=Qc(e);return{name:n.name,fn:n.fn,options:[e,t]}},pl=(e,t)=>{let n=$c(e);return{name:n.name,fn:n.fn,options:[e,t]}},ml=(e,t)=>{let n=el(e);return{name:n.name,fn:n.fn,options:[e,t]}},B=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(un(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},hl=i((e=>{var t=ke();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),gl=i(((e,t)=>{t.exports=hl()})),_l=i((e=>{var t=ke(),n=gl();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),vl=i(((e,t)=>{t.exports=_l()})),yl=[],bl=void 0;function xl(){return bl}function Sl(e){yl.push(e)}function Cl(e){let t=(t,n)=>{let r=zt(Tl).current,i;try{bl=r;for(let e of yl)e.before(r);i=e(t,n);for(let e of yl)e.after(r);r.didInitialize=!0}finally{bl=void 0}return i};return t.displayName=e.displayName||e.name,t}function wl(e){return L.forwardRef(Cl(e))}function Tl(){return{didInitialize:!1}}var El=gl(),Dl=vl(),Ol=wn(19)?jl:Ml;function kl(e,t,n,r,i){return Ol(e,t,n,r,i)}function Al(e,t,n,r,i){let a=L.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,El.useSyncExternalStore)(e.subscribe,a,a)}Sl({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,El.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function jl(e,t,n,r,i){let a=xl();if(!a)return Al(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function Ml(e,t,n,r,i){return(0,Dl.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Nl=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return kl(this,e,t,n,r)}},Pl=class extends Nl{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){L.useDebugValue(e),R(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;R(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;R(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){L.useDebugValue(e);let n=t!==void 0;R(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return L.useDebugValue(e),kl(this,this.selectors[e],t,n,r)}useContextCallback(e,t){L.useDebugValue(e);let n=Ht(t??En);this.context[e]=n}useStateSetter(e){let t=L.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},Fl={open:B(e=>e.open),transitionStatus:B(e=>e.transitionStatus),domReferenceElement:B(e=>e.domReferenceElement),referenceElement:B(e=>e.positionReference??e.referenceElement),floatingElement:B(e=>e.floatingElement),floatingId:B(e=>e.floatingId)},Il=class extends Pl{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Ns(),nested:n,triggerElements:i},Fl),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Gi(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Ll(e,t=!1,n=!1){let[r,i]=L.useState(e&&t?`idle`:void 0),[a,o]=L.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),R(()=>{if(!e&&a&&r!==`ending`&&n){let e=ba.request(()=>{i(`ending`)});return()=>{ba.cancel(e)}}},[e,a,r,n]),R(()=>{if(!e||t)return;let n=ba.request(()=>{i(void 0)});return()=>{ba.cancel(n)}},[t,e]),R(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=ba.request(()=>{i(`idle`)});return()=>{ba.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}var Rl=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),zl={[Rl.startingStyle]:``},Bl={[Rl.endingStyle]:``},Vl={transitionStatus(e){return e===`starting`?zl:e===`ending`?Bl:null}};function Hl(e,t=!1,n=!0){let r=xa();return Ht((i,a=null)=>{r.cancel();let o=Hs(e);if(o==null)return;let s=o,c=()=>{Ie.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=Rl.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function Ul(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=Ht(i),o=Hl(r,n,!1);L.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function Wl(e,t){let n=L.useRef(null),r=L.useRef(null);return L.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Gl(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=Wl(e,n),o=Ht(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return R(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function Kl(e){let t=e.useState(`open`);R(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function ql(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=Ll(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=Ht(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return Ul({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var Jl=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Yl(){return new Il({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Jl,floatingId:``,syncOnly:!1,nested:!1,onOpenChange:void 0})}function Xl(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:Yl(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:On,inactiveTriggerProps:On,popupProps:On}}var Zl=B(e=>e.triggerIdProp??e.activeTriggerId),Ql={open:B(e=>e.openProp??e.open),mounted:B(e=>e.mounted),transitionStatus:B(e=>e.transitionStatus),floatingRootContext:B(e=>e.floatingRootContext),preventUnmountingOnClose:B(e=>e.preventUnmountingOnClose),payload:B(e=>e.payload),activeTriggerId:Zl,activeTriggerElement:B(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:B((e,t)=>t!==void 0&&Zl(e)===t),isOpenedByTrigger:B((e,t)=>t!==void 0&&Zl(e)===t&&e.open),isMountedByTrigger:B((e,t)=>t!==void 0&&Zl(e)===t&&e.mounted),triggerProps:B((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:B(e=>e.popupProps),popupElement:B(e=>e.popupElement),positionerElement:B(e=>e.positionerElement)};function $l(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Ss(),a=Ls()!=null,o=zt(()=>new Il({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Jl,floatingId:i,syncOnly:!1,nested:a})).current;return R(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=vt(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function eu(e={}){let{nodeId:t,externalTree:n}=e,r=$l(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=L.useState(null),c=L.useRef(null),l=Rs(n);R(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=cl({...e,elements:{...a,...o&&{reference:o}}}),d=L.useCallback(e=>{let t=vt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=L.useState(void 0),[m,h]=L.useState(null);i.useSyncedValue(`referenceElement`,f??null);let g=vt(f)?f:null;i.useSyncedValue(`domReferenceElement`,f===void 0?a.domReference:g),i.useSyncedValue(`floatingElement`,m);let _=L.useCallback(e=>{(vt(e)||e===null)&&(c.current=e,p(e)),(vt(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!vt(e))&&u.refs.setReference(e)},[u.refs,p]),v=L.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),y=L.useMemo(()=>({...u.refs,setReference:_,setFloating:v,setPositionReference:d,domReference:c}),[u.refs,_,v,d]),b=L.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),x=i.useState(`open`),S=i.useState(`floatingId`),C=L.useMemo(()=>({...u,dataRef:i.context.dataRef,open:x,onOpenChange:i.setOpen,events:i.context.events,floatingId:S,refs:y,elements:b,nodeId:t,rootStore:i}),[u,y,b,t,i,x,S]);return R(()=>{i.context.dataRef.current.floatingContext=C;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),L.useMemo(()=>({...u,context:C,refs:y,elements:b,rootStore:i}),[u,y,b,C,i])}function tu(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,i=Ss(),a=Ls()!=null,o=t.useState(`open`),s=t.useState(`activeTriggerElement`),c=t.useState(n?`popupElement`:`positionerElement`),l=t.context.triggerElements,u=zt(()=>new Il({open:o,transitionStatus:void 0,referenceElement:s,floatingElement:c,triggerElements:l,onOpenChange:r,floatingId:i,syncOnly:!0,nested:a})).current;return R(()=>{let e={open:o,floatingId:i,referenceElement:s,floatingElement:c};vt(s)&&(e.domReferenceElement=s),u.state.positionReference===u.state.referenceElement&&(e.positionReference=s),u.update(e)},[o,i,s,c,u]),u.context.onOpenChange=r,u.context.nested=a,u}var nu=Fi&&Ni;function ru(e,t={}){let n=`rootStore`in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:a=!0,delay:o}=t,s=L.useRef(!1),c=L.useRef(null),l=Ei(),u=L.useRef(!0);L.useEffect(()=>{let e=n.select(`domReferenceElement`);if(!a)return;let t=ht(e);function r(){let e=n.select(`domReferenceElement`);!n.select(`open`)&&yt(e)&&e===Na(Sa(e))&&(s.current=!0)}function i(){u.current=!0}function o(){u.current=!1}return ha(ma(t,`blur`,r),nu&&ma(t,`keydown`,i,!0),nu&&ma(t,`pointerdown`,o,!0))},[n,a]),L.useEffect(()=>{if(!a)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=n.select(`domReferenceElement`);vt(e)&&(c.current=e,s.current=!0)}}return r.on(`openchange`,e),()=>{r.off(`openchange`,e)}},[r,a,n]);let d=L.useMemo(()=>({onMouseLeave(){s.current=!1,c.current=null},onFocus(e){let t=e.currentTarget;if(s.current){if(c.current===t)return;s.current=!1,c.current=null}let r=Fa(e.nativeEvent);if(vt(r)){if(nu&&!e.relatedTarget){if(!u.current&&!za(r))return}else if(!Ha(r))return}let i=Ia(e.relatedTarget,n.context.triggerElements),{nativeEvent:a,currentTarget:d}=e,f=typeof o==`function`?o():o;if(n.select(`open`)&&i||f===0||f===void 0){n.setOpen(!0,ua($i,a,d));return}l.start(f,()=>{s.current||n.setOpen(!0,ua($i,a,d))})},onBlur(e){s.current=!1,c.current=null;let t=e.relatedTarget,r=e.nativeEvent,a=vt(t)&&t.hasAttribute(is(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let e=n.select(`domReferenceElement`),o=Na(Sa(e));!t&&o===e||Pa(i.current.floatingContext?.refs.floating.current,o)||Pa(e,o)||a||Ia(t??o,n.context.triggerElements)||n.setOpen(!1,ua($i,r))})}}),[i,n,l,o]);return L.useMemo(()=>a?{reference:d,trigger:d}:{},[a,d])}var iu=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ti,this.restTimeout=new Ti,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},au=new WeakMap;function ou(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&au.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),au.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function su(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=au.get(n);a&&a!==e&&ou(a),ou(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,au.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function cu(e){let t=zt(iu.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,Ci(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function lu(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0,nodeId:l}=t,u=cu(n),d=Rs(),f=Ls(),p=Ht(()=>Yi(o.current.openEvent?.type,u.interactedInside)),m=Ht(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),h=Ht(e=>Ia(e,n.context.triggerElements)),g=L.useCallback(e=>{let t=qi(c,`close`,u.pointerType),r=()=>{n.setOpen(!1,ua(Qi,e)),d?.events.emit(`floating.closed`,e)};t?u.openChangeTimeout.start(t,r):(u.openChangeTimeout.clear(),r())},[c,n,u,d]),_=Ht(()=>{ou(u)}),v=Ht(e=>{let t=Fa(e);if(!Ba(t)){u.interactedInside=!1;return}u.interactedInside=t?.closest(`[aria-haspopup]`)!=null});R(()=>{r||(u.pointerType=void 0,u.restTimeoutPending=!1,u.interactedInside=!1,_())},[r,u,_]),L.useEffect(()=>_,[_]),R(()=>{if(s&&r&&u.handleCloseOptions?.blockPointerEvents&&m()&&vt(a)&&i){let e=a,t=i,n=Sa(i),r=d?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),su(u,{scopeElement:u.handleCloseOptions?.getScope?.()??u.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{_()}}},[s,r,a,i,u,m,d,f,_]);let y=Ei();L.useEffect(()=>{if(!s)return;function e(){u.openChangeTimeout.clear(),y.clear(),d?.events.off(`floating.closed`,r),_()}function t(e){if(d&&f&&ns(d.nodesRef.current,f).length>0){d.events.on(`floating.closed`,r);return}if(h(e.relatedTarget))return;let t=o.current.floatingContext?.nodeId??l,n=e.relatedTarget;if(!(d&&t&&vt(n)&&ns(d.nodesRef.current,t,!1).some(e=>Pa(e.context?.elements.floating,n)))){if(u.handler){u.handler(e);return}_(),p()||g(e)}}function r(e){!d||!f||ns(d.nodesRef.current,f).length>0||y.start(0,()=>{d.events.off(`floating.closed`,r),n.setOpen(!1,ua(Qi,e)),d.events.emit(`floating.closed`,e)})}let a=i;return ha(a&&ma(a,`mouseenter`,e),a&&ma(a,`mouseleave`,t),a&&ma(a,`pointerdown`,v,!0),()=>{d?.events.off(`floating.closed`,r)})},[s,i,n,o,l,p,h,g,_,v,u,d,f,y])}var uu={current:null};function du(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:d=uu,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m,isClosing:h}=t,g=Rs(f),_=cu(n),v=L.useRef(!1),y=ga(s),b=ga(o),x=ga(l),S=ga(a),C=ga(h);p&&(_.handleCloseOptions=y.current?.__options);let w=Ht(()=>Yi(r.current.openEvent?.type,_.interactedInside)),T=Ht(e=>Ia(e,n.context.triggerElements)),E=Ht((e,t,r)=>{let i=n.context.triggerElements;if(i.hasElement(t))return!e||!Pa(e,t);if(!vt(r))return!1;let a=r;return i.hasMatchingElement(e=>Pa(e,a))&&(!e||!Pa(e,a))}),D=Ht((e,t=!0)=>{let r=qi(b.current,`close`,_.pointerType);r?_.openChangeTimeout.start(r,()=>{n.setOpen(!1,ua(Qi,e)),g?.events.emit(`floating.closed`,e)}):t&&(_.openChangeTimeout.clear(),n.setOpen(!1,ua(Qi,e)),g?.events.emit(`floating.closed`,e))}),O=Ht(()=>{_.handler&&=(Sa(n.select(`domReferenceElement`)).removeEventListener(`mousemove`,_.handler),void 0)}),k=Ht(()=>{ou(_)});return L.useEffect(()=>O,[O]),L.useEffect(()=>{if(!a)return;function e(e){e.open?v.current=!1:(v.current=e.reason===Qi,O(),_.openChangeTimeout.clear(),_.restTimeout.clear(),_.blockMouseMove=!0,_.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,_,O]),L.useEffect(()=>{if(!a)return;let e=d.current??(p?n.select(`domReferenceElement`):null);if(!vt(e))return;function t(e){if(_.openChangeTimeout.clear(),_.blockMouseMove=!1,c&&!Wi(_.pointerType))return;let t=Ji(x.current),r=qi(b.current,`open`,_.pointerType),i=Fa(e),a=e.currentTarget??null,o=n.select(`domReferenceElement`),s=a;if(vt(i)&&!n.context.triggerElements.hasElement(i)){for(let e of n.context.triggerElements.elements())if(Pa(e,i)){s=e;break}}vt(a)&&vt(o)&&!n.context.triggerElements.hasElement(a)&&Pa(a,o)&&(s=o);let l=s==null?!1:E(o,s,i),u=n.select(`open`),d=C.current?.()??n.select(`transitionStatus`)===`ending`,f=!u&&d&&v.current,p=!l&&vt(s)&&vt(o)&&Pa(o,s)&&f,m=t>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){n.setOpen(!0,ua(Qi,e,s));return}m||(r?_.openChangeTimeout.start(r,()=>{g&&n.setOpen(!0,ua(Qi,e,s))}):g&&n.setOpen(!0,ua(Qi,e,s)))}function i(e){if(w()){k();return}O();let t=Sa(n.select(`domReferenceElement`));_.restTimeout.clear(),_.restTimeoutPending=!1;let i=r.current.floatingContext??m?.();if(!T(e.relatedTarget)){if(y.current&&i){n.select(`open`)||_.openChangeTimeout.clear();let r=d.current;_.handler=y.current({...i,tree:g,x:e.clientX,y:e.clientY,onClose(){k(),O(),S.current&&!w()&&r===n.select(`domReferenceElement`)&&D(e,!0)}}),t.addEventListener(`mousemove`,_.handler),_.handler(e);return}(_.pointerType!==`touch`||!Pa(n.select(`floatingElement`),e.relatedTarget))&&D(e)}}return u?ha(ma(e,`mousemove`,t,{once:!0}),ma(e,`mouseenter`,t),ma(e,`mouseleave`,i)):ha(ma(e,`mouseenter`,t),ma(e,`mouseleave`,i))},[O,k,r,b,D,n,a,y,_,p,E,w,T,c,u,x,d,g,S,m,C]),L.useMemo(()=>{if(!a)return;function e(e){_.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.select(`open`),o=E(i,r,e.target);if(c&&!Wi(_.pointerType))return;if(a&&o&&_.handleCloseOptions?.blockPointerEvents){let e=n.select(`floatingElement`);e&&su(_,{scopeElement:_.handleCloseOptions?.getScope?.()??r.ownerDocument.body,referenceElement:r,floatingElement:e})}let s=Ji(x.current);if(a&&!o||s===0||!o&&_.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;_.restTimeout.clear();function l(){if(_.restTimeoutPending=!1,w())return;let e=n.select(`open`);!_.blockMouseMove&&(!e||o)&&n.setOpen(!0,ua(Qi,t,r))}_.pointerType===`touch`?Ie.flushSync(()=>{l()}):o&&a?l():(_.restTimeoutPending=!0,_.restTimeout.start(s,l))}}},[a,_,w,E,c,n,x])}function fu(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=L.useCallback(t=>pu(t,e,`reference`),t),o=L.useCallback(t=>pu(t,e,`floating`),n),s=L.useCallback(t=>pu(t,e,`item`),r),c=L.useCallback(t=>pu(t,e,`trigger`),i);return L.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function pu(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[Da]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&mu(a,s,i,r)}return mu(a,e,i,r),a}function mu(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var hu=`Escape`;function gu(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function _u(e,t){return gu(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function vu(e,t,n){return gu(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function yu(e,t,n){return gu(t,n?e===ka:e===Aa,e===Ma)}function bu(e,t,n,r){return t===`both`||t===`horizontal`&&r&&r>1?e===hu:gu(t,n?e===Aa:e===ka,e===ja)}function xu(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:f=!1,loopFocus:p=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:_=`auto`,focusItemOnHover:v=!0,openOnArrowKeyDown:y=!0,disabledIndices:b=void 0,orientation:x=`vertical`,parentOrientation:S,cols:C=1,id:w,resetOnPointerLeave:T=!0,externalTree:E}=t,D=ga(Ua(i)),O=Ls(),k=Rs(E);R(()=>{o.current.orientation=x},[o,x]);let ee=Va(a),A=L.useRef(_),j=L.useRef(d??-1),M=L.useRef(null),N=L.useRef(!0),P=Ht(e=>{l(j.current===-1?null:j.current,e)}),F=L.useRef(P),te=L.useRef(!!i),ne=L.useRef(r),re=L.useRef(!1),ie=L.useRef(!1),ae=L.useRef(null),oe=ga(b),se=ga(r),I=ga(d),ce=ga(T),le=Ht(()=>{function e(e){g?k?.events.emit(`virtualfocus`,e):ae.current=os(e,{sync:re.current,preventScroll:!0})}let t=s.current[j.current],n=ie.current;t&&e(t),(re.current?e=>e():requestAnimationFrame)(()=>{let r=s.current[j.current]||t;r&&(t||e(r),fe&&(n||!N.current)&&r.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});R(()=>{u&&(r&&i?(j.current=d??-1,A.current&&d!=null&&(ie.current=!0,P())):te.current&&(j.current=-1,F.current()))},[u,r,i,d,P]),R(()=>{if(u){if(!r){re.current=!1;return}if(i)if(c==null){if(re.current=!1,I.current!=null)return;if(te.current&&(j.current=-1,le()),(!ne.current||!te.current)&&A.current&&(M.current!=null||A.current===!0&&M.current==null)){let e=0,t=()=>{s.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(j.current=M.current==null||vu(M.current,x,h)||m?xo(s):So(s),M.current=null,P())};t()}}else bo(s.current,c)||(j.current=c,le(),ie.current=!1)}},[u,r,i,c,I,m,s,x,h,P,le,oe]),R(()=>{if(!u||i||!k||g||!te.current)return;let e=k.nodesRef.current,t=e.find(e=>e.id===O)?.context?.elements.floating,n=Na(Sa(i)),r=e.some(e=>e.context&&Pa(e.context.elements.floating,n));t&&!r&&N.current&&t.focus({preventScroll:!0})},[u,i,k,O,g]),R(()=>{F.current=P,ne.current=r,te.current=!!i}),R(()=>{r||(M.current=null,A.current=_)},[r,_]);let ue=c!=null,de=Ht(e=>{if(!se.current)return;let t=s.current.indexOf(e.currentTarget);t!==-1&&(j.current!==t||c!==t)&&(j.current=t,P(e))}),fe=L.useMemo(()=>({onFocus(e){re.current=!0,de(e)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(e){re.current=!0,ie.current=!1,v&&de(e)},onPointerLeave(e){if(!se.current||!N.current||e.pointerType===`touch`)return;re.current=!0;let t=e.relatedTarget;if(!(!v||s.current.includes(t))&&ce.current&&(ae.current?.(),ae.current=null,j.current=-1,P(e),!g)){let e=D.current,t=Na(Sa(e));e&&Pa(e,t)&&e.focus({preventScroll:!0})}}}),[de,se,D,v,s,P,ce,g]),pe=L.useCallback(()=>S??k?.nodesRef.current.find(e=>e.id===O)?.context?.dataRef?.current.orientation,[O,k,S]),me=Ht(e=>{if(N.current=!1,re.current=!0,e.which===229||!se.current&&e.currentTarget===D.current)return;if(m&&bu(e.key,x,h,C)){_u(e.key,pe())||Bi(e),n.setOpen(!1,ua(aa,e.nativeEvent)),yt(a)&&(g?k?.events.emit(`virtualfocus`,a):a.focus());return}let t=j.current,i=xo(s,b),o=So(s,b);if(ee||(e.key===`Home`&&(Bi(e),j.current=i,P(e)),e.key===`End`&&(Bi(e),j.current=o,P(e))),C>1){let t=Array.from({length:s.current.length},()=>({width:1,height:1})),n=To(t,C,!1),r=n.findIndex(e=>e!=null&&!Oo(s.current,e,b)),a=n.reduce((e,t,n)=>t!=null&&!Oo(s.current,t,b)?n:e,-1),c=n[wo(n.map(e=>e==null?null:s.current[e]),{event:e,orientation:x,loopFocus:p,rtl:h,cols:C,disabledIndices:Do([...(typeof b==`function`?null:b)||s.current.map((e,t)=>Oo(s.current,t,b)?t:void 0),void 0],n),minIndex:r,maxIndex:a,prevIndex:Eo(j.current>o?i:j.current,t,n,C,e.key===`ArrowDown`?`bl`:e.key===(h?`ArrowLeft`:`ArrowRight`)?`tr`:`tl`),stopEvent:!0})];if(c!=null&&(j.current=c,P(e)),x===`both`)return}if(_u(e.key,x)){if(Bi(e),r&&!g&&Na(e.currentTarget.ownerDocument)===e.currentTarget){j.current=vu(e.key,x,h)?i:o,P(e);return}vu(e.key,x,h)?p?t>=o?f&&t!==s.current.length?j.current=-1:(re.current=!1,j.current=i):j.current=Co(s.current,{startingIndex:t,disabledIndices:b}):j.current=Math.min(o,Co(s.current,{startingIndex:t,disabledIndices:b})):p?t<=i?f&&t!==-1?j.current=s.current.length:(re.current=!1,j.current=o):j.current=Co(s.current,{startingIndex:t,decrement:!0,disabledIndices:b}):j.current=Math.max(i,Co(s.current,{startingIndex:t,decrement:!0,disabledIndices:b})),bo(s.current,j.current)&&(j.current=-1),P(e)}}),he=L.useMemo(()=>g&&r&&ue&&{"aria-activedescendant":`${w}-${c}`},[g,r,ue,w,c]),ge=L.useMemo(()=>({"aria-orientation":x===`both`?void 0:x,...ee?{}:he,onKeyDown(e){if(e.key===`Tab`&&e.shiftKey&&r&&!g){let t=Fa(e.nativeEvent);if(t&&!Pa(D.current,t))return;Bi(e),n.setOpen(!1,ua(ra,e.nativeEvent)),yt(a)&&a.focus();return}me(e)},onPointerMove(){N.current=!0}}),[he,me,D,x,ee,n,r,g,a]),_e=L.useMemo(()=>{function e(e){_===`auto`&&Hi(e.nativeEvent)&&(A.current=!g)}function t(e){A.current=_,_===`auto`&&Ui(e.nativeEvent)&&(A.current=!0)}return{onKeyDown(e){let t=n.select(`open`);N.current=!1;let r=e.key.startsWith(`Arrow`),i=yu(e.key,pe(),h),a=_u(e.key,x),o=(m?i:a)||e.key===`Enter`||e.key.trim()===``;if(g&&t)return me(e);if(!(!t&&!y&&r)){if(o){let t=_u(e.key,pe());M.current=m&&t?null:e.key}if(m){i&&(Bi(e),t?(j.current=xo(s,oe.current),P(e)):n.setOpen(!0,ua(aa,e.nativeEvent,e.currentTarget)));return}a&&(I.current!=null&&(j.current=I.current),Bi(e),!t&&y?n.setOpen(!0,ua(aa,e.nativeEvent,e.currentTarget)):me(e),t&&P(e))}},onFocus(e){n.select(`open`)&&!g&&(j.current=-1,P(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[me,oe,_,s,m,P,n,y,x,pe,h,I,g]),ve=L.useMemo(()=>({...he,..._e}),[he,_e]);return L.useMemo(()=>u?{reference:ve,floating:ge,item:fe,trigger:_e}:{},[u,ve,ge,_e,fe])}var Su=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function Cu(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingId`),a=n.useState(`domReferenceElement`),o=n.useState(`floatingElement`),{role:s=`dialog`}=t,c=Ss(),l=a?.id||c,u=L.useMemo(()=>Ua(o)?.id||i,[o,i]),d=Su.get(s)??s,f=Ls()!=null,p=L.useMemo(()=>d===`tooltip`||s===`label`?On:{"aria-haspopup":d===`alertdialog`?`dialog`:d,"aria-expanded":`false`,...d===`listbox`&&{role:`combobox`},...d===`menu`&&f&&{role:`menuitem`},...s===`select`&&{"aria-autocomplete":`none`},...s===`combobox`&&{"aria-autocomplete":`list`}},[d,f,s]),m=L.useMemo(()=>d===`tooltip`||s===`label`?{[`aria-${s===`label`?`labelledby`:`describedby`}`]:r?u:void 0}:{...p,"aria-expanded":r?`true`:`false`,"aria-controls":r?u:void 0,...d===`menu`&&{id:l}},[d,u,r,l,s,p]),h=L.useMemo(()=>{let e={id:u,...d&&{role:d}};return d===`tooltip`||s===`label`?e:{...e,...d===`menu`&&{"aria-labelledby":l}}},[d,u,l,s]),g=L.useCallback(({active:e,selected:t})=>{let n={role:`option`,...e&&{id:`${u}-fui-option`}};switch(s){case`select`:case`combobox`:return{...n,"aria-selected":t};default:}return{}},[u,s]);return L.useMemo(()=>({reference:m,floating:h,item:g,trigger:p}),[m,h,p,g])}function wu(e,t){let n=`rootStore`in e?e.rootStore:e,r=n.context.dataRef,i=n.useState(`open`),{listRef:a,elementsRef:o,activeIndex:s,onMatch:c,onTypingChange:l,enabled:u=!0,resetMs:d=750,selectedIndex:f=null}=t,p=Ei(),m=L.useRef(``),h=L.useRef(f??s??-1),g=L.useRef(null);R(()=>{!i&&f!==null||(p.clear(),g.current=null,m.current!==``&&(m.current=``))},[i,f,p]),R(()=>{i&&m.current===``&&(h.current=f??s??-1)},[i,f,s]);let _=Ht(e=>{e?r.current.typing||(r.current.typing=e,l?.(e)):r.current.typing&&(r.current.typing=e,l?.(e))}),v=Ht(e=>{function t(e){let t=o?.current[e];return!t||Ao(t)}function n(e,n,r=0){if(e.length===0)return-1;let i=(r%e.length+e.length)%e.length,a=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){let r=(i+n)%e.length;if(!(!e[r]?.toLocaleLowerCase().startsWith(a)||!t(r)))return r}return-1}let r=a.current;if(m.current.length>0&&e.key===` `&&(Bi(e),_(!0)),m.current.length>0&&m.current[0]!==` `&&n(r,m.current)===-1&&e.key!==` `&&_(!1),r==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;i&&e.key!==` `&&(Bi(e),_(!0));let l=m.current===``;l&&(h.current=f??s??-1),r.every(e=>e?e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(d,()=>{m.current=``,h.current=g.current,_(!1)});let u=((l?f??s??-1:h.current)??0)+1,v=n(r,m.current,u);v===-1?e.key!==` `&&(m.current=``,_(!1)):(c?.(v),g.current=v)}),y=Ht(e=>{let t=e.relatedTarget,r=n.select(`domReferenceElement`),i=n.select(`floatingElement`),a=Pa(r,t),o=Pa(i,t);a||o||(p.clear(),m.current=``,h.current=g.current,_(!1))}),b=L.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]),x=L.useMemo(()=>({onKeyDown:v,onBlur:y}),[v,y]);return L.useMemo(()=>u?{reference:b,floating:x}:{},[u,b,x])}var Tu=.1,Eu=Tu*Tu,Du=.5;function Ou(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function ku(e,t,n,r,i,a,o,s,c,l){let u=!1;return Ou(e,t,n,r,i,a)&&(u=!u),Ou(e,t,i,a,o,s)&&(u=!u),Ou(e,t,o,s,c,l)&&(u=!u),Ou(e,t,c,l,n,r)&&(u=!u),u}function Au(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function ju(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Mu(e={}){let{blockPointerEvents:t=!1}=e,n=new Ti,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Eu;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Fa(r),g=r.type===`mouseleave`,_=Pa(u,h),v=Pa(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&vt(r.relatedTarget)&&Pa(u,r.relatedTarget))return;function y(){return!!(s&&ns(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,ee=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let A=!1;switch(c){case`top`:A=ju(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:A=ju(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:A=ju(d,f,S.right-1,ee,x.left+1,k);break;case`right`:A=ju(d,f,x.right-1,ee,S.left+1,k);break;default:}if(A)return;if(l&&!Au(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let j=!1;switch(c){case`top`:{let n=T?Du/2:Du*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+Du+1,o=C||T?S.bottom-Du:S.top,s=C?T?S.bottom-Du:S.top:S.bottom-Du;j=ku(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?Du/2:Du*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-Du,o=C||T?S.top+Du:S.bottom,s=C?T?S.top+Du:S.bottom:S.top+Du;j=ku(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?Du/2:Du*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+Du+1,o=w||E?S.right-Du:S.left,s=w?E?S.right-Du:S.left:S.right-Du;j=ku(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?Du/2:Du*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-Du,o=w||E?S.left+Du:S.right,s=w?E?S.left+Du:S.right:S.left+Du;j=ku(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}j?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var Nu=L.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=js({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,z.jsxs)(L.Fragment,{children:[l,c&&Ie.createPortal(n,c)]})}),Pu=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Rl.startingStyle]=`startingStyle`,e[e.endingStyle=Rl.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),Fu=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),Iu={[Fu.popupOpen]:``},Lu={[Fu.popupOpen]:``,[Fu.pressed]:``},Ru={[Pu.open]:``},zu={[Pu.closed]:``},Bu={[Pu.anchorHidden]:``},Vu={open(e){return e?Iu:null}},Hu={open(e){return e?Lu:null}},Uu={open(e){return e?Ru:zu},anchorHidden(e){return e?Bu:null}};function Wu(e){return Ss(e,`base-ui`)}var Gu=L.createContext(void 0);function Ku(){return L.useContext(Gu)?.direction??`ltr`}var qu=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Qa(e,t)||{};if(l==null)return{};let f=_o(u),p={x:n,y:r},m=io(i),h=no(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let T=x/2-S/2,E=w/2-g[h]/2-1,D=Math.min(f[v],E),O=Math.min(f[y],E),k=D,ee=w-g[h]-O,A=w/2-g[h]/2+T,j=Za(k,A,ee),M=!c.arrow&&eo(i)!=null&&A!==j&&a.reference[h]/2-(A<k?D:O)-g[h]/2<0,N=M?A<k?A-k:A-ee:0;return{[m]:p[m]+N,data:{[m]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Ju=(e,t)=>({...qu(e),options:[e,t]}),Yu={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await ml().fn(e)).data?.referenceHidden||a}}}},Xu={sideX:`left`,sideY:`top`},Zu={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=ht(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:Xu};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=Sa(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=$a(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:Xu.sideX,g=f===`top`?`bottom`:Xu.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function Qu(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function $u(e,t,n){let{rects:r,placement:i}=e;return{side:Qu(t,$a(i),n),align:eo(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function ed(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:m,collisionAvoidance:h,shiftCrossAxis:g=!1,nodeId:_,adaptiveOrigin:v,lazyFlip:y=!1,externalTree:b}=e,[x,S]=L.useState(null);!m&&x!==null&&S(null);let C=h.side||`flip`,w=h.align||`flip`,T=h.fallbackAxisSide||`end`,E=typeof t==`function`?t:void 0,D=Ht(E),O=E?D:t,k=ga(t),ee=ga(m),A=Ku()===`rtl`,j=x||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":A?`left`:`right`,"inline-start":A?`right`:`left`}[r],M=a===`center`?j:`${j}-${a}`,N=c,P=+(r===`bottom`),F=+(r===`top`),te=+(r===`right`),ne=+(r===`left`);typeof N==`number`?N={top:N+P,right:N+ne,bottom:N+F,left:N+te}:N&&={top:(N.top||0)+P,right:(N.right||0)+ne,bottom:(N.bottom||0)+F,left:(N.left||0)+te};let re={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:N},ie=L.useRef(null),ae=ga(i),oe=ga(o),se=[ll(e=>{let t=$u(e,r,A),n=typeof ae.current==`function`?ae.current(t):ae.current,i=typeof oe.current==`function`?oe.current(t):oe.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,A,r])],I=w===`none`&&C!==`shift`,ce=!I&&(l||g||C===`shift`),le=C===`none`?null:fl({...re,padding:{top:N.top+1,right:N.right+1,bottom:N.bottom+1,left:N.left+1},mainAxis:!g&&C===`flip`,crossAxis:w===`flip`?`alignment`:!1,fallbackAxisSideDirection:T}),ue=I?null:ul(e=>{let t=Sa(e.elements.floating).documentElement;return{...re,rootBoundary:g?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:w!==`none`,crossAxis:ce,limiter:l||g?void 0:dl(e=>{if(!ie.current)return{};let{width:t,height:n}=ie.current.getBoundingClientRect(),r=ro($a(e.placement)),i=r===`y`?t:n,a=r===`y`?N.left+N.right:N.top+N.bottom;return{offset:i/2+a/2}})}},[re,l,g,N,w]);C===`shift`||w===`shift`||a===`center`?se.push(ue,le):se.push(le,ue),se.push(pl({...re,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!ee.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=ht(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),Ju(()=>({element:ie.current||Sa(ie.current).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=$a(a),l=ro(c),u=ie.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i($u(e,r,A)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,ce&&l===`y`&&b?S:x),{}}},Yu,v),R(()=>{!m&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[m,p]);let de=L.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:fe,elements:pe,x:me,y:he,middlewareData:ge,update:_e,placement:ve,context:ye,isPositioned:be,floatingStyles:xe}=eu({rootContext:p,open:f?m:void 0,placement:M,middleware:se,strategy:n,whileElementsMounted:f?void 0:(...e)=>Yc(...e,de),nodeId:_,externalTree:b}),{sideX:Se,sideY:Ce}=ge.adaptiveOrigin||Xu,we=be?n:`fixed`,Te=L.useMemo(()=>{let e=v?{position:we,[Se]:me,[Ce]:he}:{position:we,...xe};return be||(e.opacity=0),e},[v,we,Se,me,Ce,he,xe,be]),Ee=L.useRef(null);R(()=>{if(!m)return;let e=k.current,t=typeof e==`function`?e():e,n=(td(t)?t.current:t)||null;n!==Ee.current&&(fe.setPositionReference(n),Ee.current=n)},[m,fe,O,k]),L.useEffect(()=>{if(!m)return;let e=k.current;typeof e!=`function`&&td(e)&&e.current!==Ee.current&&(fe.setPositionReference(e.current),Ee.current=e.current)},[m,fe,O,k]),L.useEffect(()=>{if(f&&m&&pe.domReference&&pe.floating)return Yc(pe.domReference,pe.floating,_e,de)},[f,m,pe,_e,de]);let De=$a(ve),Oe=Qu(r,De,A),ke=eo(ve)||`center`,Ae=!!ge.hide?.referenceHidden;R(()=>{y&&m&&be&&S(De)},[y,m,be,De]);let je=L.useMemo(()=>({position:`absolute`,top:ge.arrow?.y,left:ge.arrow?.x}),[ge.arrow]),Me=ge.arrow?.centerOffset!==0;return L.useMemo(()=>({positionerStyles:Te,arrowStyles:je,arrowRef:ie,arrowUncentered:Me,side:Oe,align:ke,physicalSide:De,anchorHidden:Ae,refs:fe,context:ye,isPositioned:be,update:_e}),[Te,je,ie,Me,Oe,ke,De,Ae,fe,ye,be,_e])}function td(e){return e!=null&&`current`in e}function nd(e){return e===`starting`?Cs:On}function rd(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),Mn(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},nd(r),i],stateAttributesMapping:Uu})}function id(e){return wn(19)?e:e?`true`:void 0}var ad=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),od=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),sd=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),cd=e=>{let t=sd(e);return t.charAt(0).toUpperCase()+t.slice(1)},ld={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},ud=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},dd=(0,L.createContext)({}),fd=()=>(0,L.useContext)(dd),pd=(0,L.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=fd()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,L.createElement)(`svg`,{ref:c,...ld,width:t??l??ld.width,height:t??l??ld.height,stroke:e??f,strokeWidth:m,className:ad(`lucide`,p,i),...!a&&!ud(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,L.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),md=(e,t)=>{let n=(0,L.forwardRef)(({className:n,...r},i)=>(0,L.createElement)(pd,{ref:i,iconNode:t,className:ad(`lucide-${od(cd(e))}`,`lucide-${e}`,n),...r}));return n.displayName=cd(e),n},hd=md(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),gd=md(`book`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}]]),_d=md(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),vd=md(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),yd=md(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),bd=md(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),xd=md(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Sd=md(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),Cd=md(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),wd=md(`corner-down-left`,[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]),Td=md(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ed=md(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Dd=md(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Od=md(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),kd=md(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Ad=md(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),jd=md(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Md=md(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),Nd=md(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),Pd=md(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),Fd=md(`music-2`,[[`circle`,{cx:`8`,cy:`18`,r:`4`,key:`1fc0mg`}],[`path`,{d:`M12 18V2l7 4`,key:`g04rme`}]]),Id=md(`paperclip`,[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]),Ld=md(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Rd=md(`refresh-ccw`,[[`path`,{d:`M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`14sxne`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}],[`path`,{d:`M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16`,key:`1hlbsb`}],[`path`,{d:`M16 16h5v5`,key:`ccwih5`}]]),zd=md(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Bd=md(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Vd=md(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Hd=md(`thumbs-down`,[[`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`,key:`m61m77`}],[`path`,{d:`M17 14V2`,key:`8ymqnk`}]]),Ud=md(`thumbs-up`,[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]),Wd=md(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Gd=md(`video`,[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]),Kd=md(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),qd=md(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Jd={audio:Fd,document:Dd,image:kd,source:Od,unknown:Id,video:Gd},Yd=e=>{if(e.type===`source-document`)return`source`;let t=e.mediaType??``;return t.startsWith(`image/`)?`image`:t.startsWith(`video/`)?`video`:t.startsWith(`audio/`)?`audio`:t.startsWith(`application/`)||t.startsWith(`text/`)?`document`:`unknown`},Xd=(e,t,n)=>n?(0,z.jsx)(`img`,{alt:t||`Image`,className:`size-full object-cover`,height:96,src:e,width:96}):(0,z.jsx)(`img`,{alt:t||`Image`,className:`size-full rounded object-cover`,height:20,src:e,width:20}),Zd=(0,L.createContext)(null),Qd=(0,L.createContext)(null),$d=()=>(0,L.useContext)(Zd)??{variant:`grid`},ef=()=>{let e=(0,L.useContext)(Qd);if(!e)throw Error(`Attachment components must be used within <Attachment>`);return e},tf=({variant:e=`grid`,className:t,children:n,...r})=>{let i=(0,L.useMemo)(()=>({variant:e}),[e]);return(0,z.jsx)(Zd.Provider,{value:i,children:(0,z.jsx)(`div`,{className:gi(`flex items-start`,e===`list`?`flex-col gap-2`:`flex-wrap gap-2`,e===`grid`&&`ml-auto w-fit`,t),...r,children:n})})},nf=({data:e,onRemove:t,className:n,children:r,...i})=>{let{variant:a}=$d(),o=Yd(e),s=(0,L.useMemo)(()=>({data:e,mediaCategory:o,onRemove:t,variant:a}),[e,o,t,a]);return(0,z.jsx)(Qd.Provider,{value:s,children:(0,z.jsx)(`div`,{className:gi(`group relative`,a===`grid`&&`size-24 overflow-hidden rounded-lg`,a===`inline`&&[`flex h-8 cursor-pointer select-none items-center gap-1.5`,`rounded-md border border-border px-1.5`,`font-medium text-sm transition-all`,`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`],a===`list`&&[`flex w-full items-center gap-3 rounded-lg border p-3`,`hover:bg-accent/50`],n),...i,children:r})})},rf=({fallbackIcon:e,className:t,...n})=>{let{data:r,mediaCategory:i,variant:a}=ef(),o=a===`inline`?`size-3`:`size-4`,s=e=>(0,z.jsx)(e,{className:gi(o,`text-muted-foreground`)}),c=()=>{if(i===`image`&&r.type===`file`&&r.url)return Xd(r.url,r.filename,a===`grid`);if(i===`video`&&r.type===`file`&&r.url)return(0,z.jsx)(`video`,{className:`size-full object-cover`,muted:!0,src:r.url});let t=Jd[i];return e??s(t)};return(0,z.jsx)(`div`,{className:gi(`flex shrink-0 items-center justify-center overflow-hidden`,a===`grid`&&`size-full bg-muted`,a===`inline`&&`size-5 rounded bg-background`,a===`list`&&`size-12 rounded bg-muted`,t),...n,children:c()})},af=({label:e=`Remove`,className:t,children:n,...r})=>{let{onRemove:i,variant:a}=ef(),o=(0,L.useCallback)(e=>{e.stopPropagation(),i?.()},[i]);return i?(0,z.jsxs)(bi,{"aria-label":e,className:gi(a===`grid`&&[`absolute top-2 right-2 size-6 rounded-full p-0`,`bg-background/80 backdrop-blur-sm`,`opacity-0 transition-opacity group-hover:opacity-100`,`hover:bg-background`,`[&>svg]:size-3`],a===`inline`&&[`size-5 rounded p-0`,`opacity-0 transition-opacity group-hover:opacity-100`,`[&>svg]:size-2.5`],a===`list`&&[`size-8 shrink-0 rounded p-0`,`[&>svg]:size-4`],t),onClick:o,type:`button`,variant:`ghost`,...r,children:[n??(0,z.jsx)(qd,{}),(0,z.jsx)(`span`,{className:`sr-only`,children:e})]}):null},of={damping:.7,stiffness:.05,mass:1.25},sf=70,cf=1e3/60,lf=350,uf=!1;globalThis.document?.addEventListener(`mousedown`,()=>{uf=!0}),globalThis.document?.addEventListener(`mouseup`,()=>{uf=!1}),globalThis.document?.addEventListener(`click`,()=>{uf=!1});var df=(e={})=>{let[t,n]=(0,L.useState)(!1),[r,i]=(0,L.useState)(e.initial!==!1),[a,o]=(0,L.useState)(!1),s=(0,L.useRef)(null);s.current=e;let c=(0,L.useCallback)(()=>{if(!uf)return!1;let e=window.getSelection();if(!e||!e.rangeCount)return!1;let t=e.getRangeAt(0);return t.commonAncestorContainer.contains(g.current)||g.current?.contains(t.commonAncestorContainer)},[]),l=(0,L.useCallback)(e=>{d.isAtBottom=e,i(e)},[]),u=(0,L.useCallback)(e=>{d.escapedFromLock=e,n(e)},[]),d=(0,L.useMemo)(()=>{let n;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return g.current?.scrollTop??0},set scrollTop(e){if(g.current){let{scrollBehavior:t}=getComputedStyle(g.current);t!==`auto`&&(g.current.style.scrollBehavior=`auto`),g.current.scrollTop=e,d.ignoreScrollToTop=g.current.scrollTop,t!==`auto`&&(g.current.style.scrollBehavior=t)}},get targetScrollTop(){return!g.current||!_.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!_.current)return 0;let{targetScrollTop:t}=this;if(!e.targetScrollTop)return t;if(n?.targetScrollTop===t)return n.calculatedScrollTop;let r=Math.max(Math.min(e.targetScrollTop(t,{scrollElement:g.current,contentElement:_.current}),t),0);return n={targetScrollTop:t,calculatedScrollTop:r},requestAnimationFrame(()=>{n=void 0}),r},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=sf}}},[]),f=(0,L.useCallback)((e={})=>{typeof e==`string`&&(e={animation:e}),e.preserveScrollPosition||l(!0);let t=Date.now()+(Number(e.wait)||0),n=mf(s.current,e.animation),{ignoreEscapes:r=!1}=e,i,a=d.calculatedTargetScrollTop;e.duration instanceof Promise?e.duration.finally(()=>{i=Date.now()}):i=t+(e.duration??0);let o=async()=>{let e=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;let{scrollTop:l}=d,u=performance.now(),p=(u-(d.lastTick??u))/cf;if(d.animation||={behavior:n,promise:e,ignoreEscapes:r},d.animation.behavior===n&&(d.lastTick=u),c()||t>Date.now())return o();if(l<Math.min(a,d.calculatedTargetScrollTop)){if(d.animation?.behavior===n){if(n===`instant`)return d.scrollTop=d.calculatedTargetScrollTop,o();d.velocity=(n.damping*d.velocity+n.stiffness*d.scrollDifference)/n.mass,d.accumulated+=d.velocity*p,d.scrollTop+=d.accumulated,d.scrollTop!==l&&(d.accumulated=0)}return o()}return i>Date.now()?(a=d.calculatedTargetScrollTop,o()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?f({animation:mf(s.current,s.current.resize),ignoreEscapes:r,duration:Math.max(0,i-Date.now())||void 0}):d.isAtBottom)});return e.then(e=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),e))};return e.wait!==!0&&(d.animation=void 0),d.animation?.behavior===n?d.animation.promise:o()},[l,c,d]),p=(0,L.useCallback)(()=>{u(!0),l(!1)},[u,l]),m=(0,L.useCallback)(({target:e})=>{if(e!==g.current)return;let{scrollTop:t,ignoreScrollToTop:n}=d,{lastScrollTop:r=t}=d;d.lastScrollTop=t,d.ignoreScrollToTop=void 0,n&&n>t&&(r=n),o(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||t===n)return;if(c()){u(!0),l(!1);return}let e=t>r,i=t<r;if(d.animation?.ignoreEscapes){d.scrollTop=r;return}i&&(u(!0),l(!1)),e&&u(!1),!d.escapedFromLock&&d.isNearBottom&&l(!0)},1)},[u,l,c,d]),h=(0,L.useCallback)(({target:e,deltaY:t})=>{let n=e;for(;![`scroll`,`auto`].includes(getComputedStyle(n).overflow);){if(!n.parentElement)return;n=n.parentElement}n===g.current&&t<0&&g.current.scrollHeight>g.current.clientHeight&&!d.animation?.ignoreEscapes&&(u(!0),l(!1))},[u,l,d]),g=ff(e=>{g.current?.removeEventListener(`scroll`,m),g.current?.removeEventListener(`wheel`,h),e?.addEventListener(`scroll`,m,{passive:!0}),e?.addEventListener(`wheel`,h,{passive:!0})},[]),_=ff(e=>{if(d.resizeObserver?.disconnect(),!e)return;let t;d.resizeObserver=new ResizeObserver(([e])=>{let{height:n}=e.contentRect,r=n-(t??n);if(d.resizeDifference=r,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),o(d.isNearBottom),r>=0){let e=mf(s.current,t?s.current.resize:s.current.initial);f({animation:e,wait:!0,preserveScrollPosition:!0,duration:e===`instant`?void 0:lf})}else d.isNearBottom&&(u(!1),l(!0));t=n,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===r&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(e)},[]);return{contentRef:_,scrollRef:g,scrollToBottom:f,stopScroll:p,isAtBottom:r||a,isNearBottom:a,escapedFromLock:t,state:d}};function ff(e,t){let n=(0,L.useCallback)(t=>(n.current=t,e(t)),t);return n}var pf=new Map;function mf(...e){let t={...of},n=!1;for(let r of e){if(r===`instant`){n=!0;continue}typeof r==`object`&&(n=!1,t.damping=r.damping??t.damping,t.stiffness=r.stiffness??t.stiffness,t.mass=r.mass??t.mass)}let r=JSON.stringify(t);return pf.has(r)||pf.set(r,Object.freeze(t)),n?`instant`:pf.get(r)}var hf=(0,L.createContext)(null),gf=typeof window<`u`?L.useLayoutEffect:L.useEffect;function _f({instance:e,children:t,resize:n,initial:r,mass:i,damping:a,stiffness:o,targetScrollTop:s,contextRef:c,...l}){let u=(0,L.useRef)(null),d=df({mass:i,damping:a,stiffness:o,resize:n,initial:r,targetScrollTop:L.useCallback((e,t)=>(y?.targetScrollTop??s)?.(e,t)??e,[s])}),{scrollRef:f,contentRef:p,scrollToBottom:m,stopScroll:h,isAtBottom:g,escapedFromLock:_,state:v}=e??d,y=(0,L.useMemo)(()=>({scrollToBottom:m,stopScroll:h,scrollRef:f,isAtBottom:g,escapedFromLock:_,contentRef:p,state:v,get targetScrollTop(){return u.current},set targetScrollTop(e){u.current=e}}),[m,g,p,f,h,_,v]);return(0,L.useImperativeHandle)(c,()=>y,[y]),gf(()=>{f.current&&getComputedStyle(f.current).overflow===`visible`&&(f.current.style.overflow=`auto`)},[]),L.createElement(hf.Provider,{value:y},L.createElement(`div`,{...l},typeof t==`function`?t(y):t))}(function(e){function t({children:e,scrollClassName:t,...n}){let r=vf();return L.createElement(`div`,{ref:r.scrollRef,style:{height:`100%`,width:`100%`,scrollbarGutter:`stable both-edges`},className:t},L.createElement(`div`,{...n,ref:r.contentRef},typeof e==`function`?e(r):e))}e.Content=t})(_f||={});function vf(){let e=(0,L.useContext)(hf);if(!e)throw Error(`use-stick-to-bottom component context must be used within a StickToBottom component`);return e}var yf=({className:e,...t})=>(0,z.jsx)(_f,{className:gi(`relative flex-1 overflow-y-hidden`,e),initial:`smooth`,resize:`smooth`,role:`log`,...t}),bf=({className:e,...t})=>(0,z.jsx)(_f.Content,{className:gi(`flex flex-col gap-8 p-4`,e),...t}),xf=({className:e,...t})=>{let{isAtBottom:n,scrollToBottom:r}=vf(),i=(0,L.useCallback)(()=>{r()},[r]);return!n&&(0,z.jsx)(bi,{className:gi(`absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full dark:bg-background dark:hover:bg-muted`,e),onClick:i,size:`icon`,type:`button`,variant:`outline`,...t,children:(0,z.jsx)(hd,{className:`size-4`})})};function Sf(e){return Mn(e.defaultTagName??`div`,e,e)}var Cf=L.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return Mn(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function wf({className:e,orientation:t=`horizontal`,...n}){return(0,z.jsx)(Cf,{"data-slot":`separator`,orientation:t,className:gi(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...n})}var Tf=L.createContext(void 0);function Ef(e){let t=L.useContext(Tf);if(t===void 0&&!e)throw Error(un(72));return t}var Df={...Ql,disabled:B(e=>e.disabled),instantType:B(e=>e.instantType),isInstantPhase:B(e=>e.isInstantPhase),trackCursorAxis:B(e=>e.trackCursorAxis),disableHoverablePopup:B(e=>e.disableHoverablePopup),lastOpenChangeReason:B(e=>e.openChangeReason),closeOnClick:B(e=>e.closeOnClick),closeDelay:B(e=>e.closeDelay),hasViewport:B(e=>e.hasViewport)},Of=class e extends Pl{constructor(e){super({...kf(),...e},{popupRef:L.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Jl},Df)}setOpen=(e,t)=>{let n=t.reason,r=n===Qi,i=e&&n===`trigger-focus`,a=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0);let o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)};r?Ie.flushSync(o):o()};static useStore(t,n){let r=zt(()=>new e(n)).current,i=t??r,a=tu({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=a,i}};function kf(){return{...Xl(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var Af=Cl(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Of.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});xi(()=>{r===void 0&&p.state.open===!1&&n===!0&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),R(()=>{m&&t&&p.setOpen(!1,ua(ca))},[m,t,p]),p.useSyncedValue(`disabled`,t),Kl(p);let{forceUnmount:v,transitionStatus:y}=ql(h,p),b=p.select(`floatingRootContext`),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=L.useRef(null);R(()=>{y===`ending`&&C===`none`||y!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[y,x,C,S,p]),R(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]);let T=L.useCallback(()=>{p.setOpen(!1,ua(la))},[p]);L.useImperativeHandle(o,()=>({unmount:v,close:T}),[v,T]);let{getReferenceProps:E,getFloatingProps:D,getTriggerProps:O}=fu([ac(b,{enabled:!t,referencePress:()=>p.select(`closeOnClick`)}),tc(b,{enabled:!t&&a!==`none`,axis:a===`none`?void 0:a})]),k=L.useMemo(()=>E(),[E]),ee=L.useMemo(()=>O(),[O]),A=L.useMemo(()=>D(),[D]);return p.useSyncedValues({activeTriggerProps:k,inactiveTriggerProps:ee,popupProps:A}),(0,z.jsx)(Tf.Provider,{value:p,children:typeof f==`function`?f({payload:_}):f})}),jf=L.createContext(void 0);function Mf(){return L.useContext(jf)}var Nf=function(e){return e[e.popupOpen=Fu.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),Pf=wl(function(e,t){let{className:n,render:r,handle:i,payload:a,disabled:o,delay:s,closeOnClick:c=!0,closeDelay:l,id:u,style:d,...f}=e,p=Ef(!0),m=i?.store??p;if(!m)throw Error(un(82));let h=Wu(u),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=L.useRef(null),b=s??600,x=l??0,{registerTrigger:S,isMountedByThisTrigger:C}=Gl(h,y,m,{payload:a,closeOnClick:c,closeDelay:x}),w=Mf(),{delayRef:T,isInstantPhase:E,hasProvider:D}=pa(v,{open:_});m.useSyncedValue(`isInstantPhase`,E);let O=m.useState(`disabled`),k=o??O,ee=m.useState(`trackCursorAxis`),A=m.useState(`disableHoverablePopup`),j=du(v,{enabled:!k,mouseOnly:!0,move:!1,handleClose:!A&&ee!==`both`?Mu():null,restMs(){let e=w?.delay,t=typeof T.current==`object`?T.current.open:void 0,n=b;return D&&(n=t===0?0:s??e??b),n},delay(){let e=typeof T.current==`object`?T.current.close:void 0,t=x;return l==null&&D&&(t=e),{close:t}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`}),M=ru(v,{enabled:!k}).reference,N={open:_},P=m.useState(`triggerProps`,C);return Mn(`button`,e,{state:N,ref:[t,S,y],props:[j,M,P,{onPointerDown(){m.set(`closeOnClick`,c)},id:h,[Nf.triggerDisabled]:k?``:void 0},f],stateAttributesMapping:Vu})}),Ff=L.createContext(void 0);function If(){let e=L.useContext(Ff);if(e===void 0)throw Error(un(70));return e}var Lf=L.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Ef().useState(`mounted`)||n?(0,z.jsx)(Ff.Provider,{value:n,children:(0,z.jsx)(Nu,{ref:t,...r})}):null}),Rf=L.createContext(void 0);function zf(){let e=L.useContext(Rf);if(e===void 0)throw Error(un(71));return e}var Bf=L.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Es,style:g,..._}=e,v=Ef(),y=If(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=ed({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?Zu:void 0}),O=rd(e,L.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,z.jsx)(Rf.Provider,{value:D,children:O})}),Vf={...Uu,...Vl},Hf=L.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=Ef(),{side:s,align:c}=zf(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`);Ul({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}});let m=o.useState(`disabled`),h=o.useState(`closeDelay`);return lu(p,{enabled:!m,closeDelay:h}),Mn(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,o.useStateSetter(`popupElement`)],props:[f,nd(d),a],stateAttributesMapping:Vf})}),Uf=L.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=Ef(),s=o.useState(`open`),c=o.useState(`instantType`),{arrowRef:l,side:u,align:d,arrowUncentered:f,arrowStyles:p}=zf();return Mn(`div`,e,{state:{open:s,side:u,align:d,uncentered:f,instant:c},ref:[t,l],props:[{style:p,"aria-hidden":!0},a],stateAttributesMapping:Uu})}),Wf=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=L.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=L.useMemo(()=>({open:t,close:n}),[t,n]);return(0,z.jsx)(jf.Provider,{value:i,children:(0,z.jsx)(fa,{delay:a,timeoutMs:r,children:e.children})})};function Gf({delay:e=0,...t}){return(0,z.jsx)(Wf,{"data-slot":`tooltip-provider`,delay:e,...t})}function Kf({...e}){return(0,z.jsx)(Af,{"data-slot":`tooltip`,...e})}function qf({...e}){return(0,z.jsx)(Pf,{"data-slot":`tooltip-trigger`,...e})}function Jf({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,z.jsx)(Lf,{children:(0,z.jsx)(Bf,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,z.jsxs)(Hf,{"data-slot":`tooltip-content`,className:gi(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[a,(0,z.jsx)(Uf,{className:`z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5`})]})})})}var Yf={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,soh:1,stx:2,etx:3,eot:4,enq:5,ack:6,bel:7,bs:8,ht:9,lf:10,vt:11,ff:12,cr:13,so:14,si:15,dle:16,dc1:17,dc2:18,dc3:19,dc4:20,nak:21,syn:22,etb:23,can:24,em:25,sub:26,esc:27,fs:28,gs:29,rs:30,us:31,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},Xf={attentionSideAfter:2,attentionSideBefore:1,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:`CDATA[`,characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:`content`,contentTypeDocument:`document`,contentTypeFlow:`flow`,contentTypeString:`string`,contentTypeText:`text`,hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},Zf={data:`data`,whitespace:`whitespace`,lineEnding:`lineEnding`,lineEndingBlank:`lineEndingBlank`,linePrefix:`linePrefix`,lineSuffix:`lineSuffix`,atxHeading:`atxHeading`,atxHeadingSequence:`atxHeadingSequence`,atxHeadingText:`atxHeadingText`,autolink:`autolink`,autolinkEmail:`autolinkEmail`,autolinkMarker:`autolinkMarker`,autolinkProtocol:`autolinkProtocol`,characterEscape:`characterEscape`,characterEscapeValue:`characterEscapeValue`,characterReference:`characterReference`,characterReferenceMarker:`characterReferenceMarker`,characterReferenceMarkerNumeric:`characterReferenceMarkerNumeric`,characterReferenceMarkerHexadecimal:`characterReferenceMarkerHexadecimal`,characterReferenceValue:`characterReferenceValue`,codeFenced:`codeFenced`,codeFencedFence:`codeFencedFence`,codeFencedFenceSequence:`codeFencedFenceSequence`,codeFencedFenceInfo:`codeFencedFenceInfo`,codeFencedFenceMeta:`codeFencedFenceMeta`,codeFlowValue:`codeFlowValue`,codeIndented:`codeIndented`,codeText:`codeText`,codeTextData:`codeTextData`,codeTextPadding:`codeTextPadding`,codeTextSequence:`codeTextSequence`,content:`content`,definition:`definition`,definitionDestination:`definitionDestination`,definitionDestinationLiteral:`definitionDestinationLiteral`,definitionDestinationLiteralMarker:`definitionDestinationLiteralMarker`,definitionDestinationRaw:`definitionDestinationRaw`,definitionDestinationString:`definitionDestinationString`,definitionLabel:`definitionLabel`,definitionLabelMarker:`definitionLabelMarker`,definitionLabelString:`definitionLabelString`,definitionMarker:`definitionMarker`,definitionTitle:`definitionTitle`,definitionTitleMarker:`definitionTitleMarker`,definitionTitleString:`definitionTitleString`,emphasis:`emphasis`,emphasisSequence:`emphasisSequence`,emphasisText:`emphasisText`,escapeMarker:`escapeMarker`,hardBreakEscape:`hardBreakEscape`,hardBreakTrailing:`hardBreakTrailing`,htmlFlow:`htmlFlow`,htmlFlowData:`htmlFlowData`,htmlText:`htmlText`,htmlTextData:`htmlTextData`,image:`image`,label:`label`,labelText:`labelText`,labelLink:`labelLink`,labelImage:`labelImage`,labelMarker:`labelMarker`,labelImageMarker:`labelImageMarker`,labelEnd:`labelEnd`,link:`link`,paragraph:`paragraph`,reference:`reference`,referenceMarker:`referenceMarker`,referenceString:`referenceString`,resource:`resource`,resourceDestination:`resourceDestination`,resourceDestinationLiteral:`resourceDestinationLiteral`,resourceDestinationLiteralMarker:`resourceDestinationLiteralMarker`,resourceDestinationRaw:`resourceDestinationRaw`,resourceDestinationString:`resourceDestinationString`,resourceMarker:`resourceMarker`,resourceTitle:`resourceTitle`,resourceTitleMarker:`resourceTitleMarker`,resourceTitleString:`resourceTitleString`,setextHeading:`setextHeading`,setextHeadingText:`setextHeadingText`,setextHeadingLine:`setextHeadingLine`,setextHeadingLineSequence:`setextHeadingLineSequence`,strong:`strong`,strongSequence:`strongSequence`,strongText:`strongText`,thematicBreak:`thematicBreak`,thematicBreakSequence:`thematicBreakSequence`,blockQuote:`blockQuote`,blockQuotePrefix:`blockQuotePrefix`,blockQuoteMarker:`blockQuoteMarker`,blockQuotePrefixWhitespace:`blockQuotePrefixWhitespace`,listOrdered:`listOrdered`,listUnordered:`listUnordered`,listItemIndent:`listItemIndent`,listItemMarker:`listItemMarker`,listItemPrefix:`listItemPrefix`,listItemPrefixWhitespace:`listItemPrefixWhitespace`,listItemValue:`listItemValue`,chunkDocument:`chunkDocument`,chunkContent:`chunkContent`,chunkFlow:`chunkFlow`,chunkText:`chunkText`,chunkString:`chunkString`},Qf=[161,161,164,164,167,168,170,170,173,174,176,180,182,186,188,191,198,198,208,208,215,216,222,225,230,230,232,234,236,237,240,240,242,243,247,250,252,252,254,254,257,257,273,273,275,275,283,283,294,295,299,299,305,307,312,312,319,322,324,324,328,331,333,333,338,339,358,359,363,363,462,462,464,464,466,466,468,468,470,470,472,472,474,474,476,476,593,593,609,609,708,708,711,711,713,715,717,717,720,720,728,731,733,733,735,735,768,879,913,929,931,937,945,961,963,969,1025,1025,1040,1103,1105,1105,8208,8208,8211,8214,8216,8217,8220,8221,8224,8226,8228,8231,8240,8240,8242,8243,8245,8245,8251,8251,8254,8254,8308,8308,8319,8319,8321,8324,8364,8364,8451,8451,8453,8453,8457,8457,8467,8467,8470,8470,8481,8482,8486,8486,8491,8491,8531,8532,8539,8542,8544,8555,8560,8569,8585,8585,8592,8601,8632,8633,8658,8658,8660,8660,8679,8679,8704,8704,8706,8707,8711,8712,8715,8715,8719,8719,8721,8721,8725,8725,8730,8730,8733,8736,8739,8739,8741,8741,8743,8748,8750,8750,8756,8759,8764,8765,8776,8776,8780,8780,8786,8786,8800,8801,8804,8807,8810,8811,8814,8815,8834,8835,8838,8839,8853,8853,8857,8857,8869,8869,8895,8895,8978,8978,9312,9449,9451,9547,9552,9587,9600,9615,9618,9621,9632,9633,9635,9641,9650,9651,9654,9655,9660,9661,9664,9665,9670,9672,9675,9675,9678,9681,9698,9701,9711,9711,9733,9734,9737,9737,9742,9743,9756,9756,9758,9758,9792,9792,9794,9794,9824,9825,9827,9829,9831,9834,9836,9837,9839,9839,9886,9887,9919,9919,9926,9933,9935,9939,9941,9953,9955,9955,9960,9961,9963,9969,9972,9972,9974,9977,9979,9980,9982,9983,10045,10045,10102,10111,11094,11097,12872,12879,57344,63743,65024,65039,65533,65533,127232,127242,127248,127277,127280,127337,127344,127373,127375,127376,127387,127404,917760,917999,983040,1048573,1048576,1114109],$f=[12288,12288,65281,65376,65504,65510],ep=[8361,8361,65377,65470,65474,65479,65482,65487,65490,65495,65498,65500,65512,65518],tp=[32,126,162,163,165,166,172,172,175,175,10214,10221,10629,10630],np=[4352,4447,8986,8987,9001,9002,9193,9196,9200,9200,9203,9203,9725,9726,9748,9749,9776,9783,9800,9811,9855,9855,9866,9871,9875,9875,9889,9889,9898,9899,9917,9918,9924,9925,9934,9934,9940,9940,9962,9962,9970,9971,9973,9973,9978,9978,9981,9981,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10133,10135,10160,10160,10175,10175,11035,11036,11088,11088,11093,11093,11904,11929,11931,12019,12032,12245,12272,12287,12289,12350,12353,12438,12441,12543,12549,12591,12593,12686,12688,12773,12783,12830,12832,12871,12880,42124,42128,42182,43360,43388,44032,55203,63744,64255,65040,65049,65072,65106,65108,65126,65128,65131,94176,94180,94192,94198,94208,101589,101631,101662,101760,101874,110576,110579,110581,110587,110589,110590,110592,110882,110898,110898,110928,110930,110933,110933,110948,110951,110960,111355,119552,119638,119648,119670,126980,126980,127183,127183,127374,127374,127377,127386,127488,127490,127504,127547,127552,127560,127568,127569,127584,127589,127744,127776,127789,127797,127799,127868,127870,127891,127904,127946,127951,127955,127968,127984,127988,127988,127992,128062,128064,128064,128066,128252,128255,128317,128331,128334,128336,128359,128378,128378,128405,128406,128420,128420,128507,128591,128640,128709,128716,128716,128720,128722,128725,128728,128732,128735,128747,128748,128756,128764,128992,129003,129008,129008,129292,129338,129340,129349,129351,129535,129648,129660,129664,129674,129678,129734,129736,129736,129741,129756,129759,129770,129775,129784,131072,196605,196608,262141],rp=(e,t)=>{let n=0,r=Math.floor(e.length/2)-1;for(;n<=r;){let i=Math.floor((n+r)/2),a=i*2;if(t<e[a])r=i-1;else if(t>e[a+1])n=i+1;else return!0}return!1},ip=19968,[ap,op]=sp(np);function sp(e){let t=e[0],n=e[1];for(let r=0;r<e.length;r+=2){let i=e[r],a=e[r+1];if(ip>=i&&ip<=a)return[i,a];a-i>n-t&&(t=i,n=a)}return[t,n]}var cp=e=>e<161||e>1114109?!1:rp(Qf,e),lp=e=>e<12288||e>65510?!1:rp($f,e),up=e=>e<8361||e>65518?!1:rp(ep,e),dp=e=>e<32||e>10630?!1:rp(tp,e),fp=e=>e>=ap&&e<=op?!0:e<4352||e>262141?!1:rp(np,e);function pp(e){return cp(e)?`ambiguous`:lp(e)?`fullwidth`:up(e)?`halfwidth`:dp(e)?`narrow`:fp(e)?`wide`:`neutral`}function mp(e){if(!Number.isSafeInteger(e))throw TypeError(`Expected a code point, got \`${typeof e}\`.`)}function hp(e){return mp(e),pp(e)}function gp(e){return/^\p{Emoji_Presentation}/u.test(String.fromCodePoint(e))}function _p(e){if(!e||e<4352)return!1;switch(hp(e)){case`fullwidth`:case`halfwidth`:return!0;case`wide`:return!gp(e);case`narrow`:return!1;case`ambiguous`:return 917760<=e&&e<=917999?null:!1;case`neutral`:return/^\p{sc=Hangul}/u.test(String.fromCodePoint(e))}}function vp(e,t){return t!==65025||!e||e<8216?!1:e===8216||e===8217||e===8220||e===8221}function yp(e){return e!==null&&e>=65024&&e<=65038}var bp=Sp(/\p{P}|\p{S}/u),xp=Sp(/\s/);function Sp(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCodePoint(t))}}function Cp(e){return!!(e&Xf.characterGroupWhitespace)}function wp(e){return(e&Up.cjkPunctuation)===Xf.characterGroupPunctuation}function Tp(e){return!!(e&Up.cjk)}function Ep(e){return e===Up.ivs}function Dp(e){return!!(e&Up.cjkOrIvs)}function Op(e){return e===Up.nonEmojiGeneralUseVS}function kp(e){return!!(e&Up.spaceOrPunctuation)}var Ap=Hp(/[A-Za-z]/),jp=Hp(/[\dA-Za-z]/),Mp=Hp(/[#-'*+\--9=?A-Z^-~]/);function Np(e){return e!==null&&(e<32||e===127)}var Pp=Hp(/\d/),Fp=Hp(/[\dA-Fa-f]/),Ip=Hp(/[!-/:-@[-`{-~]/);function Lp(e){return e!==null&&e<-2}function Rp(e){return e!==null&&(e<0||e===32)}function zp(e){return e===-2||e===-1||e===32}var Bp=Hp(/\p{P}|\p{S}/u),Vp=Hp(/\s/);function Hp(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}var Up;(function(e){e.spaceOrPunctuation=3,e.cjk=4096,e.cjkPunctuation=4098,e.ivs=8192,e.cjkOrIvs=12288,e.nonEmojiGeneralUseVS=16384,e.variationSelector=24576,e.ivsToCjkRightShift=1})(Up||={});function Wp(e){if(e===Yf.eof||Rp(e)||xp(e))return Xf.characterGroupWhitespace;let t=0;if(e>=4352){if(yp(e))return Up.nonEmojiGeneralUseVS;switch(_p(e)){case null:return Up.ivs;case!0:t|=Up.cjk;break}}return bp(e)&&(t|=Xf.characterGroupPunctuation),t}function Gp(e,t,n){if(!Op(e))return e;let r=t(),i=Wp(r);return!r||Cp(i)?e:vp(r,n)?Up.cjkPunctuation:Kp(i)}function Kp(e){return e&~Up.ivs}function qp(e){return!!(e&&e>=55296&&e<=56319)}function Jp(e){return!!(e&&e>=56320&&e<=57343)}function Yp(e,t,n){if(t._bufferIndex<2)return e;let r=n({start:{...t,_bufferIndex:t._bufferIndex-2},end:t}).codePointAt(0);return r&&r>=65536?r:e}function Xp(e,t,n){let r=e>=65536?2:1;if(t._bufferIndex<1+r)return null;let i=t._bufferIndex-r-2,a=n({start:{...t,_bufferIndex:i>=0?i:0},end:{...t,_bufferIndex:t._bufferIndex-r}}),o=a.charCodeAt(a.length-1);if(Number.isNaN(o))return null;if(a.length<2||o<56320||57343<o)return o;let s=a.codePointAt(0);return s&&s>=65536?s:o}var Zp=class{cachedValue=void 0;constructor(e,t,n){this.previousCode=e,this.nowPoint=t,this.sliceSerialize=n}value(){return this.cachedValue===void 0&&(this.cachedValue=Xp(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function Qp(e,t,n){let r=n({start:t,end:{...t,_bufferIndex:t._bufferIndex+2}}).codePointAt(0);return r&&r>=65536?r:e}function $p(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function em(e,t){return e.length>0?($p(e,e.length,0,t),e):t}function tm(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var nm={name:`attention`,resolveAll:eee,tokenize:rm};function eee(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};im(d,-c),im(f,c),o={type:c>1?Zf.strongSequence:Zf.emphasisSequence,start:d,end:{...e[r][1].end}},s={type:c>1?Zf.strongSequence:Zf.emphasisSequence,start:{...e[n][1].start},end:f},a={type:c>1?Zf.strongText:Zf.emphasisText,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?Zf.strong:Zf.emphasis,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=em(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=em(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),t.parser.constructs.insideSpan.null,l=em(l,tm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=em(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=em(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,$p(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function rm(e,t){let n=this.parser.constructs.attentionMarkers.null,{now:r,sliceSerialize:i,previous:a}=this,o=Jp(a)?Yp(a,r(),i):a,s=Wp(o),c=new Zp(o,r(),i),l=Gp(s,c.value.bind(c),o),u;return d;function d(t){return t===Yf.asterisk||Yf.underscore,u=t,e.enter(`attentionSequence`),f(t)}function f(a){if(a===u)return e.consume(a),f;let s=e.exit(`attentionSequence`),c=Wp(qp(a)?Qp(a,r(),i):a),d=wp(l),p=d||Cp(l),m=wp(c),h=m||Cp(c),g=Dp(l),_=!h||m&&(p||g)||n.includes(a),v=!p||d&&(h||Tp(c))||n.includes(o);return s._open=!!(u===Yf.asterisk?_:_&&(kp(l)||!v)),s._close=!!(u===Yf.asterisk?v:v&&(kp(c)||!_)),t(a)}}function im(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}function am(){return{text:{[Yf.asterisk]:nm,[Yf.underscore]:nm},insideSpan:{null:[nm]}}}function om(){let e=this.data();(e.micromarkExtensions||=[]).push(am())}function sm(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{[Yf.tilde]:n},insideSpan:{null:[n]},attentionMarkers:{null:[Yf.tilde]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&$p(o,o.length,0,tm(s,e.slice(r+1,n),t)),$p(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),$p(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=Zf.data);return e}function i(e,n,r){let{now:i,sliceSerialize:a,previous:o}=this,s=Jp(o)?Yp(o,i(),a):o,c=Wp(s),l=new Zp(s,i(),a),u=Gp(c,l.value.bind(l),s),d=this.events,f=0;return p;function p(t){return Yf.tilde,s===Yf.tilde&&d[d.length-1][1].type!==Zf.characterEscape?r(t):(e.enter(`strikethroughSequenceTemporary`),m(t))}function m(o){let c=Wp(s);if(o===Yf.tilde)return f>1?r(o):(e.consume(o),f++,m);if(f<2&&!t)return r(o);let l=e.exit(`strikethroughSequenceTemporary`),d=Wp(qp(o)?Qp(o,i(),a):o),p=wp(u)||Cp(u),h=wp(d)||Cp(d),g=Tp(u)||Ep(c);return l._open=!h||d===Xf.attentionSideAfter&&(p||g),l._close=!p||c===Xf.attentionSideAfter&&(h||Tp(d)),n(o)}}}function cm(e){let t=this.data();(t.micromarkExtensions||=[]).push(sm(e))}var lm=(function(e){if(e==null)return mm;if(typeof e==`function`)return pm(e);if(typeof e==`object`)return Array.isArray(e)?um(e):dm(e);if(typeof e==`string`)return fm(e);throw Error(`Expected function, string, or object as test`)});function um(e){let t=[],n=-1;for(;++n<e.length;)t[n]=lm(e[n]);return pm(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function dm(e){let t=e;return pm(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function fm(e){return pm(t);function t(t){return t&&t.type===e}}function pm(e){return t;function t(t,n,r){return!!(hm(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function mm(){return!0}function hm(e){return typeof e==`object`&&!!e&&`type`in e}function gm(e){return e}var _m=[],vm=`skip`;function ym(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=lm(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+gm(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=_m,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=tee(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function tee(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?_m:[e]}function bm(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),ym(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var nee=new Set([`。`,`.`,`,`,`、`,`?`,`!`,`:`,`;`,`(`,`)`,`【`,`】`,`「`,`」`,`『`,`』`,`〈`,`〉`,`《`,`》`]),ree=/^(https?:\/\/|mailto:|www\.)/i,iee=e=>{if(e.children.length!==1)return!1;let t=e.children[0];return t.type===`text`&&t.value===e.url},aee=e=>{let t=0;for(let n of e){if(nee.has(n))return t;t+=n.length}return null},oee=(e,t)=>({...t,url:e,children:[{type:`text`,value:e}]}),xm=e=>({type:`text`,value:e}),Sm=()=>e=>{bm(e,`link`,(e,t,n)=>{if(!n||typeof t!=`number`||!iee(e)||!ree.test(e.url))return;let r=aee(e.url);if(r===null||r===0)return;let i=e.url.slice(0,r),a=e.url.slice(r),o=oee(i,e),s=xm(a);return n.children.splice(t,1,o,s),t+1})};function Cm(){let e=[om],t=[Sm,cm];return{name:`cjk`,type:`cjk`,remarkPluginsBefore:e,remarkPluginsAfter:t,remarkPlugins:[...e,...t]}}var wm=Cm(),Tm=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Em(e){return Dm(e)}function Dm(e){return Array.isArray(e)?Om(e):e instanceof RegExp?e:typeof e==`object`?km(e):e}function Om(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Dm(e[n]);return t}function km(e){let t={};for(let n in e)t[n]=Dm(e[n]);return t}function Am(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function jm(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?jm(e.substring(0,e.length-1)):e.substr(~t+1)}var Mm=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Nm=class{static hasCaptures(e){return e===null?!1:(Mm.lastIndex=0,Mm.test(e))}static replaceCaptures(e,t,n){return e.replace(Mm,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Pm(e,t){return e<t?-1:+(e>t)}function Fm(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Pm(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Im(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Lm(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Rm=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},zm=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Wm(e),t)}static createFromParsedTheme(e,t){return qm(e,t)}_cachedMatchRoot=new Rm(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Vm(e.parent,t.parentScopes));return n?new Um(n.fontStyle,n.foreground,n.background):null}},Bm=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Vm(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Hm(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Hm(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Um=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Wm(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Im(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Im(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Gm(l,u,e,o,s,c)}}return n}var Gm=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},Km=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(Km||{});function qm(e,t){e.sort((e,t)=>{let n=Pm(e.scope,t.scope);return n!==0||(n=Fm(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Jm(t),o=new Um(n,a.getId(r),a.getId(i)),s=new Zm(new Xm(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new zm(a,o,s)}var Jm=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Ym=Object.freeze([]),Xm=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Ym,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Zm=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Xm.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Fm(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Xm(e,t,n,r,i))}},Qm=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=eh(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function $m(e){return e}function eh(e){return e}function th(e,t){let n=[],r=rh(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(nh(i)){let e=[];do e.push(i),i=r.next();while(nh(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function nh(e){return!!e&&!!e.match(/[\w\.:]+/)}function rh(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function ih(e){typeof e.dispose==`function`&&e.dispose()}var ah=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},oh=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},sh=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ch=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ah(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new sh;for(let n of e)lh(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof ah){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function lh(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof ah?dh({baseGrammar:a,selfGrammar:i},r):uh(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new ah(e))}function uh(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];fh([r],t,n)}}function dh(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&fh(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&fh(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function fh(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Am({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&fh(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=vh(i);switch(a.kind){case 0:dh({...t,selfGrammar:t.baseGrammar},n);break;case 1:dh(t,n);break;case 2:uh(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?uh(a.ruleName,i,n):dh(i,n)}else a.kind===4?n.add(new oh(a.scopeName,a.ruleName)):n.add(new ah(a.scopeName));break}}}var ph=class{kind=0},mh=class{kind=1},hh=class{constructor(e){this.ruleName=e}kind=2},gh=class{constructor(e){this.scopeName=e}kind=3},_h=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function vh(e){if(e===`$base`)return new ph;if(e===`$self`)return new mh;let t=e.indexOf(`#`);return t===-1?new gh(e):t===0?new hh(e.substring(1)):new _h(e.substring(0,t),e.substring(t+1))}var yh=/\\(\d+)/,bh=/\\(\d+)/g,xh=-1,Sh=-2;function Ch(e){return e}function wh(e){return e}var Th=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Nm.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Nm.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${jm(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Nm.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Nm.replaceCaptures(this._contentName,e,t)}},see=class extends Th{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},cee=class extends Th{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Ah(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new jh,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Eh=class extends Th{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new jh,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Dh=class extends Th{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new Ah(i,this.id),this.beginCaptures=a,this._end=new Ah(o||`￿`,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new jh;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Oh=class extends Th{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new Ah(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new Ah(o,Sh),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new jh;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new jh,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},kh=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new see(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new cee(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Am({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new Eh(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new Oh(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new Dh(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=vh(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof Eh||e instanceof Dh||e instanceof Oh)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Ah=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=yh.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return bh.lastIndex=0,this.source.replace(bh,(e,t)=>Lm(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=`￿`,t[i+1]=`￿`,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=`￿`,t[i+1]=`G`,n[i+1]=`￿`,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},jh=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new Mh(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new Mh(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},Mh=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
11
+ `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Nh=class{constructor(e,t){this.languageId=e,this.tokenType=t}},lee=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new Nh(e,8),this._embeddedLanguagesMatcher=new uee(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Nh(0,0);_getBasicScopeAttributes=new Rm(e=>new Nh(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},uee=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Lm(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var Ph=!1,Fh=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Ih(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=dee(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Fh(i,!0);f()}return new Fh(i,!1);function f(){let o=fee(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===xh){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),zh(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof Dh){let r=o;zh(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof Oh){let r=o;zh(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(zh(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function dee(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof Oh&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=hee(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==Sh){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),zh(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function fee(e,t,n,r,i,a){let o=pee(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=mee(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function pee(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Lh(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function mee(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Lh(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Lh(e,t,n,r,i){return Ph?{ruleScanner:e.compile(t,n),findOptions:Rh(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function hee(e,t,n,r,i){return Ph?{ruleScanner:e.compileWhile(t,n),findOptions:Rh(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Rh(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function zh(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Ih(e,p,n&&d.start===0,d.start,f,i,!1,0),ih(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new gee(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var gee=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function _ee(e,t,n,r,i,a,o,s){return new yee(e,t,n,r,i,a,o,s)}function Bh(e,t,n,r,i){let a=th(t,Vh),o=kh.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Vh(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(vee(t[r],e))return n=r+1,!0;return!1})}function vee(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var yee=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new lee(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Hh(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=th(e,Vh);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Bh(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Bh(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(Ch(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[wh(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Hh(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=kh.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Wh.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=Qm.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?Uh.createRootAndLookUpScopeName(a,r,this):Uh.createRoot(`unknown`,r),t=new Wh(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
12
+ `;let a=this.createOnigString(e),o=a.content.length,s=new xee(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Ih(this,a,i,0,t,s,!0,r);return ih(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Hh(e,t){return e=Em(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Uh=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Bm.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Bm(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Bm(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),Qm.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Wh=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?Uh.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:wh(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=Uh.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,Ch(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Uh.fromExtension(r,n.contentNameScopesList))}},bee=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):th(e,Vh).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>th(e,Vh).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},xee=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Qm.set(n,0,$m(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Qm.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},See=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,_ee(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Gh=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new See(zm.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(zm.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new bee(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new ch(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Kh=Wh.NULL,qh=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Jh=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Jh.prototype.normal={},Jh.prototype.property={},Jh.prototype.space=void 0;function Yh(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Jh(n,r,t)}function Xh(e){return e.toLowerCase()}var Zh=class{constructor(e,t){this.attribute=t,this.property=e}};Zh.prototype.attribute=``,Zh.prototype.booleanish=!1,Zh.prototype.boolean=!1,Zh.prototype.commaOrSpaceSeparated=!1,Zh.prototype.commaSeparated=!1,Zh.prototype.defined=!1,Zh.prototype.mustUseProperty=!1,Zh.prototype.number=!1,Zh.prototype.overloadedBoolean=!1,Zh.prototype.property=``,Zh.prototype.spaceSeparated=!1,Zh.prototype.space=void 0;var Qh=r({boolean:()=>$h,booleanish:()=>eg,commaOrSpaceSeparated:()=>ig,commaSeparated:()=>rg,number:()=>V,overloadedBoolean:()=>tg,spaceSeparated:()=>ng}),Cee=0,$h=ag(),eg=ag(),tg=ag(),V=ag(),ng=ag(),rg=ag(),ig=ag();function ag(){return 2**++Cee}var og=Object.keys(Qh),sg=class extends Zh{constructor(e,t,n,r){let i=-1;if(super(e,t),cg(this,`space`,r),typeof n==`number`)for(;++i<og.length;){let e=og[i];cg(this,og[i],(n&Qh[e])===Qh[e])}}};sg.prototype.defined=!0;function cg(e,t,n){n&&(e[t]=n)}function lg(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new sg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Xh(r)]=r,n[Xh(a.attribute)]=r}return new Jh(t,n,e.space)}var ug=lg({properties:{ariaActiveDescendant:null,ariaAtomic:eg,ariaAutoComplete:null,ariaBusy:eg,ariaChecked:eg,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:ng,ariaCurrent:null,ariaDescribedBy:ng,ariaDetails:null,ariaDisabled:eg,ariaDropEffect:ng,ariaErrorMessage:null,ariaExpanded:eg,ariaFlowTo:ng,ariaGrabbed:eg,ariaHasPopup:null,ariaHidden:eg,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ng,ariaLevel:V,ariaLive:null,ariaModal:eg,ariaMultiLine:eg,ariaMultiSelectable:eg,ariaOrientation:null,ariaOwns:ng,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:eg,ariaReadOnly:eg,ariaRelevant:null,ariaRequired:eg,ariaRoleDescription:ng,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:eg,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function dg(e,t){return t in e?e[t]:t}function fg(e,t){return dg(e,t.toLowerCase())}var pg=lg({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:rg,acceptCharset:ng,accessKey:ng,action:null,allow:null,allowFullScreen:$h,allowPaymentRequest:$h,allowUserMedia:$h,alt:null,as:null,async:$h,autoCapitalize:null,autoComplete:ng,autoFocus:$h,autoPlay:$h,blocking:ng,capture:null,charSet:null,checked:$h,cite:null,className:ng,cols:V,colSpan:null,content:null,contentEditable:eg,controls:$h,controlsList:ng,coords:V|rg,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$h,defer:$h,dir:null,dirName:null,disabled:$h,download:tg,draggable:eg,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$h,formTarget:null,headers:ng,height:V,hidden:tg,high:V,href:null,hrefLang:null,htmlFor:ng,httpEquiv:ng,id:null,imageSizes:null,imageSrcSet:null,inert:$h,inputMode:null,integrity:null,is:null,isMap:$h,itemId:null,itemProp:ng,itemRef:ng,itemScope:$h,itemType:ng,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$h,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:$h,muted:$h,name:null,nonce:null,noModule:$h,noValidate:$h,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:$h,optimum:V,pattern:null,ping:ng,placeholder:null,playsInline:$h,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$h,referrerPolicy:null,rel:ng,required:$h,reversed:$h,rows:V,rowSpan:V,sandbox:ng,scope:null,scoped:$h,seamless:$h,selected:$h,shadowRootClonable:$h,shadowRootDelegatesFocus:$h,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:eg,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:$h,useMap:null,value:eg,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ng,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$h,declare:$h,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:$h,noHref:$h,noShade:$h,noWrap:$h,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:eg,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$h,disableRemotePlayback:$h,prefix:null,property:null,results:V,security:null,unselectable:null},space:`html`,transform:fg}),mg=lg({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:ig,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:ng,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:$h,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:rg,g2:rg,glyphName:rg,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:ig,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:V,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ng,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ig,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ig,rev:ig,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ig,requiredFeatures:ig,requiredFonts:ig,requiredFormats:ig,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:ig,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ig,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ig,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:dg}),hg=lg({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),gg=lg({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:fg}),_g=lg({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),wee={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},vg=/[A-Z]/g,yg=/-[a-z]/g,bg=/^data[-\w.:]+$/i;function xg(e,t){let n=Xh(t),r=t,i=Zh;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&bg.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(yg,Eee);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!yg.test(e)){let n=e.replace(vg,Tee);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=sg}return new i(r,t)}function Tee(e){return`-`+e.toLowerCase()}function Eee(e){return e.charAt(1).toUpperCase()}var Sg=Yh([ug,pg,hg,gg,_g],`html`),Cg=Yh([ug,mg,hg,gg,_g],`svg`),wg={}.hasOwnProperty;function Tg(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&wg.call(t,e)){let n=String(t[e]);i=wg.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Eg=/["&'<>`]/g,Dg=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Og=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,kg=/[|\\{}()[\]^$+*?.]/g,Ag=new WeakMap;function jg(e,t){if(e=e.replace(t.subset?Mg(t.subset):Eg,r),t.subset||t.escapeOnly)return e;return e.replace(Dg,n).replace(Og,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function Mg(e){let t=Ag.get(e);return t||(t=Ng(e),Ag.set(e,t)),t}function Ng(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(kg,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var Pg=/[\dA-Fa-f]/;function Fg(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!Pg.test(String.fromCharCode(t))?r:r+`;`}var Ig=/\d/;function Lg(e,t,n){let r=`&#`+String(e);return n&&t&&!Ig.test(String.fromCharCode(t))?r:r+`;`}var Rg=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),zg={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:`­`,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:`‌`,zwj:`‍`,lrm:`‎`,rlm:`‏`,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},Bg=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],Vg={}.hasOwnProperty,Hg={},Ug;for(Ug in zg)Vg.call(zg,Ug)&&(Hg[zg[Ug]]=Ug);var Dee=/[^\dA-Za-z]/;function Oee(e,t,n,r){let i=String.fromCharCode(e);if(Vg.call(Hg,i)){let e=Hg[i],a=`&`+e;return n&&Rg.includes(e)&&!Bg.includes(e)&&(!r||t&&t!==61&&Dee.test(String.fromCharCode(t)))?a:a+`;`}return``}function kee(e,t,n){let r=Fg(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Oee(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=Lg(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Wg(e,t){return jg(e,Object.assign({format:kee},t))}var Aee=/^>|^->|<!--|-->|--!>|<!-$/g,Gg=[`>`],Kg=[`<`,`>`];function jee(e,t,n,r){return r.settings.bogusComments?`<?`+Wg(e.value,Object.assign({},r.settings.characterReferences,{subset:Gg}))+`>`:`<!--`+e.value.replace(Aee,i)+`-->`;function i(e){return Wg(e,Object.assign({},r.settings.characterReferences,{subset:Kg}))}}function Mee(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function qg(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Jg(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Yg(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function Xg(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Zg(e){return e.join(` `).trim()}var Nee=/[ \t\n\f\r]/g;function Qg(e){return typeof e==`object`?e.type===`text`?$g(e.value):!1:$g(e)}function $g(e){return e.replace(Nee,``)===``}var e_=n_(1),t_=n_(-1),Pee=[];function n_(e){return t;function t(t,n,r){let i=t?t.children:Pee,a=(n||0)+e,o=i[a];if(!r)for(;o&&Qg(o);)a+=e,o=i[a];return o}}var r_={}.hasOwnProperty;function i_(e){return t;function t(t,n,r){return r_.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var a_=i_({body:c_,caption:o_,colgroup:o_,dd:f_,dt:d_,head:o_,html:s_,li:u_,optgroup:m_,option:h_,p:l_,rp:p_,rt:p_,tbody:__,td:b_,tfoot:v_,th:b_,thead:g_,tr:y_});function o_(e,t,n){let r=e_(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Qg(r.value.charAt(0)))}function s_(e,t,n){let r=e_(n,t);return!r||r.type!==`comment`}function c_(e,t,n){let r=e_(n,t);return!r||r.type!==`comment`}function l_(e,t,n){let r=e_(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function u_(e,t,n){let r=e_(n,t);return!r||r.type===`element`&&r.tagName===`li`}function d_(e,t,n){let r=e_(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function f_(e,t,n){let r=e_(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function p_(e,t,n){let r=e_(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function m_(e,t,n){let r=e_(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function h_(e,t,n){let r=e_(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function g_(e,t,n){let r=e_(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function __(e,t,n){let r=e_(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function v_(e,t,n){return!e_(n,t)}function y_(e,t,n){let r=e_(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function b_(e,t,n){let r=e_(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var x_=i_({body:w_,colgroup:T_,head:C_,html:S_,tbody:E_});function S_(e){let t=e_(e,-1);return!t||t.type!==`comment`}function C_(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function w_(e){let t=e_(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Qg(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function T_(e,t,n){let r=t_(n,t),i=e_(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&a_(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function E_(e,t,n){let r=t_(n,t),i=e_(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&a_(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var D_={name:[[`
13
+ \f\r &/=>`.split(``),`
14
+ \f\r "&'/=>\``.split(``)],[`\0
15
+ \f\r "&'/<=>`.split(``),`\0
16
+ \f\r "&'/<=>\``.split(``)]],unquoted:[[`
17
+ \f\r &>`.split(``),`\0
18
+ \f\r "&'<=>\``.split(``)],[`\0
19
+ \f\r "&'<=>\``.split(``),`\0
20
+ \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function O_(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Cg);let l=k_(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!x_(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!a_(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function k_(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=A_(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function A_(e,t,n){let r=xg(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Wg(r.attribute,Object.assign({},e.settings.characterReferences,{subset:D_.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Yg:Zg)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Wg(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:D_.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&qg(n,o)>qg(n,e.alternative)&&(o=e.alternative),s=o+Wg(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?D_.single:D_.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var j_=[`<`,`&`];function M_(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Wg(e.value,Object.assign({},r.settings.characterReferences,{subset:j_}))}function N_(e,t,n,r){return r.settings.allowDangerousHtml?e.value:M_(e,t,n,r)}function P_(e,t,n,r){return r.all(e)}var F_=Tg(`type`,{invalid:I_,unknown:L_,handlers:{comment:jee,doctype:Mee,element:O_,raw:N_,root:P_,text:M_}});function I_(e){throw Error("Expected node, not `"+e+"`")}function L_(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var R_={},z_={},B_=[];function V_(e,t){let n=t||R_,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:H_,all:U_,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||qh,characterReferences:n.characterReferences||z_,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Cg:Sg,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function H_(e,t,n){return F_(e,t,n,this)}function U_(e){let t=[],n=e&&e.children||B_,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function W_(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function G_(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function K_(e){return Array.isArray(e)?e:[e]}async function q_(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function J_(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Y_(e){return e===`ansi`||J_(e)}function X_(e){return e===`none`}function Z_(e){return X_(e)}function Q_(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function $_(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function ev(e){let t=$_(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function tv(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var nv=`light-dark()`,rv=[`color`,`background-color`];function iv(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function av(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?iv(e,t):e})):e}function ov(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>sv(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&rv.includes(a))if(r===nv&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new Tm('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function sv(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Km.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Km.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Km.Underline&&n.push(`underline`),e.fontStyle&Km.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function cv(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}var lv=new WeakMap;function uv(e,t){lv.set(e,t)}function dv(e){return lv.get(e)}var fv=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(K_(n).map(e=>[e,Kh])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return pv(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function pv(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function mv(e,t){if(!(e instanceof fv))throw new Tm(`Invalid grammar state`);return e.getInternalStack(t)}function hv(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new Tm(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}else{let t=r.lines[e.line];if(t===void 0)throw new Tm(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new Tm(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=ev(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));gv(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return av(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new Tm(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=_v(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new Tm(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new Tm(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&Q_(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function gv(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new Tm(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new Tm(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function _v(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(_v).join(``):``}var vv=[hv()];function yv(e){let t=bv(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...vv]}function bv(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var xv=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Sv={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Fee(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Cv(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Iee(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Sv[r]&&t.push({type:`setDecoration`,value:Sv[r]});else if(r<=29){let e=Sv[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:xv[r-30]}});else if(r===38){let n=Cv(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:xv[r-40]}});else if(r===48){let n=Cv(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:xv[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:xv[r-100+8]}})}return t}function Lee(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Fee(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Iee(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Ree={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function zee(e=Ree){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<xv.length;e++)r.push(t(xv[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Bee={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function Vee(e,t,n){let r=W_(e,n),i=$_(t),a=zee(Object.fromEntries(xv.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Bee[t]]}))),o=Lee();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=G_(i,r),o=G_(o,r),n.decorations.has(`dim`)&&(i=Hee(i));let s=Km.None;return n.decorations.has(`bold`)&&(s|=Km.Bold),n.decorations.has(`italic`)&&(s|=Km.Italic),n.decorations.has(`underline`)&&(s|=Km.Underline),n.decorations.has(`strikethrough`)&&(s|=Km.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function Hee(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function wv(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||`text`);if(J_(i)||X_(r))return $_(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:a,colorMap:o}=e.setTheme(r);if(i===`ansi`)return Vee(a,t,n);let s=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==s.name)throw new Tm(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${s.name}"`);if(!n.grammarState.themes.includes(a.name))throw new Tm(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return Wee(t,s,a,o,n)}function Uee(...e){if(e.length===2)return dv(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(J_(i)||X_(a))throw new Tm(`Plain language does not have grammar state`);if(i===`ansi`)throw new Tm(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new fv(Tv(n,c,o,s,r).stateStack,c.name,o.name)}function Wee(e,t,n,r,i){let a=Tv(e,t,n,r,i),o=new fv(a.stateStack,t.name,n.name);return uv(a.tokens,o),a.tokens}function Tv(e,t,n,r,i){let a=W_(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=$_(e),l=i.grammarState?mv(i.grammarState,n.name)??Kh:i.grammarContextCode==null?Kh:Tv(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=G_(r[Qm.getForeground(s)],a),l=Qm.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Gee(t.scopes):Kee(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Gee(e){return e.map(e=>({scopeName:e}))}function Kee(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:Jee(e,i,t.slice(0,r))}}return n}function Ev(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function qee(e,t,n){if(!Ev(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Ev(e[r],n[i])&&--r,--i;return r===-1}function Jee(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(qee(e,t,n)){r.push(a);break}return r}function Dv(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=wv(e,t,{...n,theme:r.theme});return{tokens:i,state:dv(i),theme:typeof r.theme==`string`?r.theme:r.theme.name}}),a=Yee(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:c,...l}=e[t][i];o.variants[r[n].color]=l}),o})),s=i[0].state?new fv(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return s&&uv(o,s),o}function Yee(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function Ov(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new Tm("`themes` option must not be empty");let p=Dv(e,t,n);if(c=dv(p),l&&nv!==l&&!f.find(e=>e.color===l))throw new Tm(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>ov(e,h,u,l,d))),c&&uv(a,c);let g=f.map(e=>W_(e.theme,n));i=kv(f,m,g,u,l,`fg`,d),r=kv(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=W_(n.theme,n);a=wv(e,t,n);let l=e.getTheme(n.theme);r=G_(l.bg,s),i=G_(l.fg,s),o=l.name,c=dv(a)}else throw new Tm("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function kv(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=G_(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===nv&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new Tm('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${G_(t[r][a],n[r])||`inherit`}, ${G_(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function Av(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Av(e,t,n),codeToTokens:(t,n)=>Ov(e,t,n)}){let i=t;for(let e of yv(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Ov(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Zee(a):d===`never`&&(a=Qee(a)),f&&(a=$ee(a));let p={...r,get source(){return i}};for(let e of yv(n))a=e.tokens?.call(p,a)||a;return Xee(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Xee(e,t,n,r=dv(e)){let i=yv(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:Q_,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
21
+ `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=cv(a.htmlStyle||sv(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&uv(m,r),m}function Zee(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Km.Underline||i.fontStyle&Km.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Qee(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function $ee(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=cv(e.htmlStyle||sv(e)),i=cv(n.htmlStyle||sv(n)),a=e.fontStyle&&(e.fontStyle&Km.Underline||e.fontStyle&Km.Strikethrough),o=n.fontStyle&&(n.fontStyle&Km.Underline||n.fontStyle&Km.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var ete=V_;function tte(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Av(e,t,n),codeToTokens:(t,n)=>Ov(e,t,n)},i=ete(Av(e,t,n,r));for(let e of yv(n))i=e.postprocess?.call(r,i,n)||i;return i}var jv={light:`#333333`,dark:`#bbbbbb`},Mv={light:`#fffffe`,dark:`#1e1e1e`},Nv=`__shiki_resolved`;function Pv(e){if(e?.[Nv])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?jv.light:jv.dark,n||=t.type===`light`?Mv.light:Mv.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Nv,{enumerable:!1,writable:!1,value:!0}),t}async function Fv(e){return Array.from(new Set((await Promise.all(e.filter(e=>!Y_(e)).map(async e=>await q_(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function Iv(e){return(await Promise.all(e.map(async e=>Z_(e)?null:Pv(await q_(e))))).filter(e=>!!e)}var Lv=3,nte=!1;function rte(e,t=3){if(Lv&&!(typeof Lv==`number`&&t>Lv)){if(nte)throw Error(`[SHIKI DEPRECATE]: ${e}`);console.trace(`[SHIKI DEPRECATE]: ${e}`)}}var Rv=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function zv(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Rv(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Bv=class extends Gh{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Pv(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=zm.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=zv(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new Rv(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Vv=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},Hv=0;function Uv(e){Hv+=1,e.warnings!==!1&&Hv>=10&&Hv%10==0&&console.warn(`[Shiki] ${Hv} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Rv("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Pv),i=new Bv(new Vv(e.engine,n),r,n,e.langAlias),a;function o(t){return zv(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Rv(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new Rv(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Fv(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Iv(e))}function g(){if(t)throw new Rv(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Hv)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Wv(e){e.engine||rte("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Iv(e.themes||[]),Fv(e.langs||[]),e.engine]);return Uv({...e,themes:t,langs:n,engine:r})}async function Gv(e){let t=await Wv(e);return{getLastGrammarState:(...e)=>Uee(t,...e),codeToTokensBase:(e,n)=>wv(t,e,n),codeToTokensWithThemes:(e,n)=>Dv(t,e,n),codeToTokens:(e,n)=>Ov(t,e,n),codeToHast:(e,n)=>Av(t,e,n),codeToHtml:(e,n)=>tte(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Kv(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,Y_(n))return[];let r=t[n];if(!r)throw new Tm(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(Z_(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Tm(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await Gv({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function qv(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function Jv(e,t){let n=qv(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var Yv=[{id:`abap`,name:`ABAP`,import:(()=>a(()=>import(`./abap-ZLdNE4Wj.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>a(()=>import(`./actionscript-3-D4-vnRcI.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>a(()=>import(`./ada-DXyBB0vJ.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>a(()=>import(`./angular-html-uJ7b1CnK.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>a(()=>import(`./angular-ts-D88ijnYb.js`),__vite__mapDeps([5,0,1,2,3,4,6])))},{id:`apache`,name:`Apache Conf`,import:(()=>a(()=>import(`./apache-gaN-z7fa.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>a(()=>import(`./apex-CrhOo5CX.js`),[]))},{id:`apl`,name:`APL`,import:(()=>a(()=>import(`./apl-C6AWXEwk.js`),__vite__mapDeps([7,3,1,2,4,8,9,10])))},{id:`applescript`,name:`AppleScript`,import:(()=>a(()=>import(`./applescript-Cch61kU6.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>a(()=>import(`./ara-1z5kqg59.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>a(()=>import(`./asciidoc-B-d6QnM2.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>a(()=>import(`./asm-Dm_lGFVw.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>a(()=>import(`./astro-Ukc-k5AJ.js`),__vite__mapDeps([11,3,1,4,8,12,13,14])))},{id:`awk`,name:`AWK`,import:(()=>a(()=>import(`./awk-B31vgP_8.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>a(()=>import(`./ballerina-CqWqtH8L.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>a(()=>import(`./bat-qvjOTSvm.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>a(()=>import(`./beancount-BEtieIDL.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>a(()=>import(`./berry-BQrxWGfv.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>a(()=>import(`./bibtex-ncm3UjMC.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>a(()=>import(`./bicep-DHUsSEkK.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>a(()=>import(`./bird2-COKvQMnx.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>a(()=>import(`./blade-0jpZTnSR.js`),__vite__mapDeps([15,3,1,16,2,4,8,17,9,10])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>a(()=>import(`./bsl-D3T-XG_R.js`),__vite__mapDeps([18,19])))},{id:`c`,name:`C`,import:(()=>a(()=>import(`./c-ZW765ZQI.js`).then(e=>e.n),__vite__mapDeps([20,1])))},{id:`c3`,name:`C3`,import:(()=>a(()=>import(`./c3-BVii1B9E.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>a(()=>import(`./cadence-BGk63-xQ.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>a(()=>import(`./cairo-Q_T2FuvI.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>a(()=>import(`./clarity-_ZPS1UeA.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>a(()=>import(`./clojure-yH1w6xR_.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>a(()=>import(`./cmake-8InvLTn8.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>a(()=>import(`./cobol-DHTCqGzR.js`),__vite__mapDeps([23,2,1,3,4,10])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>a(()=>import(`./codeowners-CKIekHiG.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>a(()=>import(`./codeql-CVrAnje1.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>a(()=>import(`./coffee-TSM3EVZg.js`),__vite__mapDeps([24,4,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>a(()=>import(`./common-lisp-cIdwln0b.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>a(()=>import(`./coq-C2KdWVYe.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>a(()=>import(`./cpp-dQzhxFcr.js`).then(e=>e.n),__vite__mapDeps([25,1,26,20,27,17])))},{id:`crystal`,name:`Crystal`,import:(()=>a(()=>import(`./crystal-Cy1QxX5g.js`),__vite__mapDeps([28,20,1,3,2,4,29,17])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>a(()=>import(`./csharp-BVUqvcsv.js`),[]))},{id:`css`,name:`CSS`,import:(()=>a(()=>import(`./css-Bh2hm8bY.js`).then(e=>e.n),__vite__mapDeps([3,1])))},{id:`csv`,name:`CSV`,import:(()=>a(()=>import(`./csv-CCnBNHSl.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>a(()=>import(`./cue-C-YX4DPo.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>a(()=>import(`./cypher-37ZxORU9.js`),[]))},{id:`d`,name:`D`,import:(()=>a(()=>import(`./d-CtFxtofm.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>a(()=>import(`./dart-DjTbWqyx.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>a(()=>import(`./dax-v-cczdVz.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>a(()=>import(`./desktop-DSalTQLu.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>a(()=>import(`./diff-9DLIDTu5.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>a(()=>import(`./docker-CK1MATXl.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>a(()=>import(`./dotenv-D5ku5y9e.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>a(()=>import(`./dream-maker-BxUVYfId.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>a(()=>import(`./edge-Ct1vgnBt.js`),__vite__mapDeps([30,16,2,1,3,4,14])))},{id:`elixir`,name:`Elixir`,import:(()=>a(()=>import(`./elixir-D8kTd5f6.js`),__vite__mapDeps([31,2,1,3,4])))},{id:`elm`,name:`Elm`,import:(()=>a(()=>import(`./elm-1nE2xrL_.js`),__vite__mapDeps([32,26,1,20])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>a(()=>import(`./emacs-lisp-_PEL2UBn.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>a(()=>import(`./erb-CEK5dUqj.js`),__vite__mapDeps([33,2,1,3,4,34,20,25,26,27,17,35,36,13,14,37,38,29,9,10,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>a(()=>import(`./erlang-R9i3kMP5.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>a(()=>import(`./fennel-Tx9N_cxJ.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>a(()=>import(`./fish-D_tzRFwx.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>a(()=>import(`./fluent-BTAopAVA.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>a(()=>import(`./fortran-fixed-form-CHZzH8CX.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>a(()=>import(`./fortran-free-form-DQ6cnx5P.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>a(()=>import(`./fsharp-Bh8uGiJv.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>a(()=>import(`./gdresource-BMHd1vI1.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>a(()=>import(`./gdscript-0eY0tghO.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>a(()=>import(`./gdshader-qIQewyec.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>a(()=>import(`./genie-C-OMPysf.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>a(()=>import(`./gherkin-D_M7YAKW.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>a(()=>import(`./git-commit-CAgaRK7M.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>a(()=>import(`./git-rebase-lAV3NdsY.js`),__vite__mapDeps([50,29,1])))},{id:`gleam`,name:`Gleam`,import:(()=>a(()=>import(`./gleam-BN8kD6xw.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>a(()=>import(`./glimmer-js-uTQdEYVu.js`),__vite__mapDeps([51,3,1,2,4,14])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>a(()=>import(`./glimmer-ts-BZRip_b-.js`),__vite__mapDeps([52,3,1,2,4,14])))},{id:`glsl`,name:`GLSL`,import:(()=>a(()=>import(`./glsl-DJmvQUze.js`).then(e=>e.n),__vite__mapDeps([26,1,20])))},{id:`gn`,name:`GN`,import:(()=>a(()=>import(`./gn-wPomIxaL.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>a(()=>import(`./gnuplot-BdAdoyPd.js`),[]))},{id:`go`,name:`Go`,import:(()=>a(()=>import(`./go-CH_yyiUM.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>a(()=>import(`./graphql-Hv4rukMG.js`).then(e=>e.n),__vite__mapDeps([35,1,4,36,13,14])))},{id:`groovy`,name:`Groovy`,import:(()=>a(()=>import(`./groovy-BWwYHWp6.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>a(()=>import(`./hack-CBuct2_L.js`),__vite__mapDeps([53,2,1,3,4,17])))},{id:`haml`,name:`Ruby Haml`,import:(()=>a(()=>import(`./haml-DmHNVaVz.js`).then(e=>e.n),__vite__mapDeps([37,1,3,4])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>a(()=>import(`./handlebars-RSx4FtJn.js`),__vite__mapDeps([54,3,1,2,4,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>a(()=>import(`./haskell-DNn76bqX.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>a(()=>import(`./haxe-BClgBASn.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>a(()=>import(`./hcl-ksSK2xk_.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>a(()=>import(`./hjson-d9HL_Ztd.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>a(()=>import(`./hlsl-D0j01cr3.js`),[]))},{id:`html`,name:`HTML`,import:(()=>a(()=>import(`./html-BovkiBbn.js`).then(e=>e.n),__vite__mapDeps([2,1,3,4])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>a(()=>import(`./html-derivative-CRfvxyYX.js`),__vite__mapDeps([16,2,1,3,4])))},{id:`http`,name:`HTTP`,import:(()=>a(()=>import(`./http-Dp7zj0d8.js`),__vite__mapDeps([55,35,1,4,36,13,14,8,29,9,10])))},{id:`hurl`,name:`Hurl`,import:(()=>a(()=>import(`./hurl-kTt4HYJA.js`),__vite__mapDeps([56,57,35,1,4,36,13,14,9,10])))},{id:`hxml`,name:`HXML`,import:(()=>a(()=>import(`./hxml-QnJ9WbXI.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>a(()=>import(`./hy-DcRnuAnA.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>a(()=>import(`./imba-DLi_4ppD.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>a(()=>import(`./ini-CyDQDxVk.js`),[]))},{id:`java`,name:`Java`,import:(()=>a(()=>import(`./java-Cqg8bFY1.js`).then(e=>e.n),__vite__mapDeps([10,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>a(()=>import(`./javascript-DVxWqGdi.js`).then(e=>e.n),__vite__mapDeps([4,1])))},{id:`jinja`,name:`Jinja`,import:(()=>a(()=>import(`./jinja-D29CiUKc.js`),__vite__mapDeps([60,2,1,3,4])))},{id:`jison`,name:`Jison`,import:(()=>a(()=>import(`./jison-CrnyBoqW.js`),__vite__mapDeps([61,4,1])))},{id:`json`,name:`JSON`,import:(()=>a(()=>import(`./json-C4I52NpI.js`).then(e=>e.n),__vite__mapDeps([8,1])))},{id:`json5`,name:`JSON5`,import:(()=>a(()=>import(`./json5-CHSDHNOs.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>a(()=>import(`./jsonc-CQmNCDvv.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>a(()=>import(`./jsonl-DQ2x8clB.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>a(()=>import(`./jsonnet-oWXNYF5Y.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>a(()=>import(`./jssm-CCMzEkXE.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>a(()=>import(`./jsx-lCxDgY3T.js`).then(e=>e.n),__vite__mapDeps([36,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>a(()=>import(`./julia-BNcC4e--.js`),__vite__mapDeps([62,25,1,26,20,27,17,4,22,63])))},{id:`just`,name:`Just`,import:(()=>a(()=>import(`./just-B5-X6go-.js`),__vite__mapDeps([64,4,1,65,3,2,17,9,10,22,34,20,25,26,27,35,36,13,14,37,38,29,39])))},{id:`kdl`,name:`KDL`,import:(()=>a(()=>import(`./kdl-DR3WxD61.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>a(()=>import(`./kotlin-DIske9EE.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>a(()=>import(`./kusto-BeoGbFy9.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>a(()=>import(`./latex-C14mcCCR.js`),__vite__mapDeps([66,67,63,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>a(()=>import(`./lean-C617-iIr.js`),[]))},{id:`less`,name:`Less`,import:(()=>a(()=>import(`./less-CmMf7Yt5.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>a(()=>import(`./liquid-BeEBtHlP.js`),__vite__mapDeps([68,3,1,2,4,8])))},{id:`llvm`,name:`LLVM IR`,import:(()=>a(()=>import(`./llvm-CCYPHon7.js`),[]))},{id:`log`,name:`Log file`,import:(()=>a(()=>import(`./log-B9ffk1py.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>a(()=>import(`./logo-BI4DfCc4.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>a(()=>import(`./lua-CfrLAckd.js`).then(e=>e.n),__vite__mapDeps([38,1,20])))},{id:`luau`,name:`Luau`,import:(()=>a(()=>import(`./luau-3JXtmgrW.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>a(()=>import(`./make-CqOmBS7l.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>a(()=>import(`./markdown-pW8niWsW.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>a(()=>import(`./marko-DvCuxMAY.js`),__vite__mapDeps([69,3,1,70,6,14])))},{id:`matlab`,name:`MATLAB`,import:(()=>a(()=>import(`./matlab-rI_w2MXu.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>a(()=>import(`./mdc-CUwzVnlt.js`),__vite__mapDeps([71,16,2,1,3,4,41,39])))},{id:`mdx`,name:`MDX`,import:(()=>a(()=>import(`./mdx-BudPzR5G.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>a(()=>import(`./mermaid-DGJIAvIh.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>a(()=>import(`./mipsasm-COPi-7Vq.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>a(()=>import(`./mojo-BNXa2_jf.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>a(()=>import(`./moonbit-BX9X9-tQ.js`),[]))},{id:`move`,name:`Move`,import:(()=>a(()=>import(`./move-DO38Bgkl.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>a(()=>import(`./narrat-DH1CsyUX.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>a(()=>import(`./nextflow-iKg2KdJ3.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`nextflow-groovy`,import:(()=>a(()=>import(`./nextflow-groovy-DfRCsnXR.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>a(()=>import(`./nginx-TG5RBkWS.js`),__vite__mapDeps([74,38,1,20])))},{id:`nim`,name:`Nim`,import:(()=>a(()=>import(`./nim-CNs9dAJo.js`),__vite__mapDeps([75,20,1,3,26,2,4,41,9,10])))},{id:`nix`,name:`Nix`,import:(()=>a(()=>import(`./nix-Cifu1uDG.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>a(()=>import(`./nushell-CdgXx64m.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>a(()=>import(`./objective-c-CF3DCpbI.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>a(()=>import(`./objective-cpp-r08tqKW0.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>a(()=>import(`./ocaml-DxnUKbTf.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>a(()=>import(`./odin-CflY3BWK.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>a(()=>import(`./openscad-BMusln0G.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>a(()=>import(`./pascal-Ps2K_AdE.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>a(()=>import(`./perl-DYtcpUn_.js`),__vite__mapDeps([65,3,1,2,4,17,9,10])))},{id:`php`,name:`PHP`,import:(()=>a(()=>import(`./php-CY2BFAJ3.js`),__vite__mapDeps([76,3,1,2,4,8,17,9,10])))},{id:`pkl`,name:`Pkl`,import:(()=>a(()=>import(`./pkl-DenWThyC.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>a(()=>import(`./plsql-ZRlYPQAy.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>a(()=>import(`./po-CibsDrvS.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>a(()=>import(`./polar-Gl7ZfGca.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>a(()=>import(`./postcss-BaPK48jz.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>a(()=>import(`./powerquery-CA_b7ahr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>a(()=>import(`./powershell-sGr19NH7.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>a(()=>import(`./prisma-DT2bTtrZ.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>a(()=>import(`./prolog-DDGG773D.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>a(()=>import(`./proto--IqZrpkn.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>a(()=>import(`./pug-O_iDttis.js`),__vite__mapDeps([77,3,1,2,4])))},{id:`puppet`,name:`Puppet`,import:(()=>a(()=>import(`./puppet-DtkUwgDf.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>a(()=>import(`./purescript-mdEb8r99.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>a(()=>import(`./python-BGHBflPa.js`),[]))},{id:`qml`,name:`QML`,import:(()=>a(()=>import(`./qml-DidK4YIl.js`),__vite__mapDeps([78,4,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>a(()=>import(`./qmldir-DbCRoHE3.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>a(()=>import(`./qss-FArcs841.js`),[]))},{id:`r`,name:`R`,import:(()=>a(()=>import(`./r-8LjuGvrb.js`).then(e=>e.n),__vite__mapDeps([63,1])))},{id:`racket`,name:`Racket`,import:(()=>a(()=>import(`./racket-B-AgENGF.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>a(()=>import(`./raku-BMtsu35y.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>a(()=>import(`./razor-BG9tcYbl.js`),__vite__mapDeps([79,80,2,1,3,4])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>a(()=>import(`./reg-BbXDLMPW.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>a(()=>import(`./regexp-BfXnO9Ht.js`).then(e=>e.n),__vite__mapDeps([27,1])))},{id:`rel`,name:`Rel`,import:(()=>a(()=>import(`./rel-mxvjU_x3.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>a(()=>import(`./riscv-Cm2iwgmF.js`),[]))},{id:`ron`,name:`RON`,import:(()=>a(()=>import(`./ron-DQFiPKpI.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>a(()=>import(`./rosmsg-pUGfa73B.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>a(()=>import(`./rst-B43mac11.js`),__vite__mapDeps([81,82,25,1,26,20,27,17,16,2,3,4,22,34,35,36,13,14,37,38,29,9,10,39])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>a(()=>import(`./ruby-Avb9jgNg.js`),__vite__mapDeps([34,20,1,25,26,27,17,3,35,4,36,13,14,37,2,38,29,9,10,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>a(()=>import(`./rust-DyDpj5Wl.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>a(()=>import(`./sas-XM_MUfXH.js`),__vite__mapDeps([83,17,1])))},{id:`sass`,name:`Sass`,import:(()=>a(()=>import(`./sass-BWkm3LsR.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>a(()=>import(`./scala-C-5pJ0y_.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>a(()=>import(`./scheme-CPm_ASX9.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>a(()=>import(`./scss-CbYD1uQt.js`).then(e=>e.n),__vite__mapDeps([6,1,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>a(()=>import(`./sdbl-DWnO-pW9.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>a(()=>import(`./shaderlab-B3KmLsfH.js`),__vite__mapDeps([84,85])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>a(()=>import(`./shellscript-MtXESoVu.js`).then(e=>e.n),__vite__mapDeps([29,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>a(()=>import(`./shellsession-BXYbv0ko.js`),__vite__mapDeps([86,29,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>a(()=>import(`./smalltalk-CX8rf-Mk.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>a(()=>import(`./solidity-CixyQr8o.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>a(()=>import(`./soy-8qbhbHdk.js`),__vite__mapDeps([87,2,1,3,4])))},{id:`sparql`,name:`SPARQL`,import:(()=>a(()=>import(`./sparql-B7pQSNyT.js`),__vite__mapDeps([88,89])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>a(()=>import(`./splunk-_QwQse06.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>a(()=>import(`./sql-KWw2ixyZ.js`).then(e=>e.n),__vite__mapDeps([17,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>a(()=>import(`./ssh-config-Bw6i1uGR.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>a(()=>import(`./stata-CHe_USAa.js`),__vite__mapDeps([90,17,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>a(()=>import(`./stylus-B5_eVOG1.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>a(()=>import(`./surrealql-CKeJQu5O.js`),__vite__mapDeps([91,4,1])))},{id:`svelte`,name:`Svelte`,import:(()=>a(()=>import(`./svelte-CnPpq295.js`),__vite__mapDeps([92,3,1,4,12,14])))},{id:`swift`,name:`Swift`,import:(()=>a(()=>import(`./swift-D_GPHzVt.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>a(()=>import(`./system-verilog-CoT3sy6B.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>a(()=>import(`./systemd-iFzXOqMs.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>a(()=>import(`./talonscript-C2y347NZ.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>a(()=>import(`./tasl-DFfKKGR2.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>a(()=>import(`./tcl-DRFkBEze.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>a(()=>import(`./templ-Hyv8wlyY.js`),__vite__mapDeps([93,3,1,94,4])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>a(()=>import(`./terraform-Cr8TpTov.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>a(()=>import(`./tex-Dw3zOkcW.js`),__vite__mapDeps([67,63,1])))},{id:`toml`,name:`TOML`,import:(()=>a(()=>import(`./toml-X_n1S02q.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>a(()=>import(`./ts-tags-C5sBTDbR.js`),__vite__mapDeps([95,3,1,26,20,2,4,17,14,9,10])))},{id:`tsv`,name:`TSV`,import:(()=>a(()=>import(`./tsv-BUpjchxv.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>a(()=>import(`./tsx-3_QbaL3X.js`).then(e=>e.n),__vite__mapDeps([13,1])))},{id:`turtle`,name:`Turtle`,import:(()=>a(()=>import(`./turtle-DMmncelR.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>a(()=>import(`./twig-BqTJC7Z5.js`),__vite__mapDeps([96,3,1,4,76,2,8,17,9,10,22,34,20,25,26,27,35,36,13,14,37,38,29,39,6])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>a(()=>import(`./typescript-C-73D8Co.js`).then(e=>e.n),__vite__mapDeps([14,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>a(()=>import(`./typespec-7Vsz_oqm.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>a(()=>import(`./typst-BS7CNecZ.js`),[]))},{id:`v`,name:`V`,import:(()=>a(()=>import(`./v-CHLUYMRH.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>a(()=>import(`./vala-CxdhiNPt.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>a(()=>import(`./vb-D9e8cAb_.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>a(()=>import(`./verilog-DKdoVc_A.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>a(()=>import(`./vhdl-BDo0Xa_C.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>a(()=>import(`./viml-Bb1fLIgL.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>a(()=>import(`./vue-DtdqQCVt.js`),__vite__mapDeps([97,3,1,16,2,4,8,14])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>a(()=>import(`./vue-html-aqjMLUT8.js`),__vite__mapDeps([98,4,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>a(()=>import(`./vue-vine-DaWwjEPF.js`),__vite__mapDeps([99,3,1,4,70,12,6,100])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>a(()=>import(`./vyper-D2QCq6gX.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>a(()=>import(`./wasm-EnzO1wOY.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>a(()=>import(`./wenyan-Cy_mxU5q.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>a(()=>import(`./wgsl-DCrqhD_Q.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>a(()=>import(`./wikitext-Chtc_mLq.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>a(()=>import(`./wit-BJAZQUwN.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>a(()=>import(`./wolfram-Cm14xWVi.js`),[]))},{id:`xml`,name:`XML`,import:(()=>a(()=>import(`./xml-CaOAAu6Y.js`).then(e=>e.n),__vite__mapDeps([9,1,10])))},{id:`xsl`,name:`XSL`,import:(()=>a(()=>import(`./xsl-Bie8MQNk.js`),__vite__mapDeps([101,9,1,10])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>a(()=>import(`./yaml-ddhg4MZJ.js`).then(e=>e.n),__vite__mapDeps([39,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>a(()=>import(`./zenscript-Br1JV4jg.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>a(()=>import(`./zig-CerxHNjg.js`),[]))}],Xv=Object.fromEntries(Yv.map(e=>[e.id,e.import])),Zv=Object.fromEntries(Yv.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),Qv={...Xv,...Zv},$v=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>a(()=>import(`./andromeeda-vlJuqx_V.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>a(()=>import(`./aurora-x-pm_q1nsw.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>a(()=>import(`./ayu-dark-CzyDS4QL.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>a(()=>import(`./ayu-light-DmcmeFik.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>a(()=>import(`./ayu-mirage-CbIAqGv7.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>a(()=>import(`./catppuccin-frappe-CBk4LMuH.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>a(()=>import(`./catppuccin-latte-AEEn_CxR.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>a(()=>import(`./catppuccin-macchiato-CQCcuUkT.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>a(()=>import(`./catppuccin-mocha-D6O32F3G.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>a(()=>import(`./dark-plus-Bj4JdSwp.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>a(()=>import(`./dracula-oMeeHvzF.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>a(()=>import(`./dracula-soft-BOwF8T1o.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>a(()=>import(`./everforest-dark-BgfA4HUZ.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>a(()=>import(`./everforest-light-DnhbePvt.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>a(()=>import(`./github-dark-CzXQPWMH.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>a(()=>import(`./github-dark-default-CQdxcuqA.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>a(()=>import(`./github-dark-dimmed-BwMfzXHj.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>a(()=>import(`./github-dark-high-contrast-CLrESmNC.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>a(()=>import(`./github-light-DoByupBO.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>a(()=>import(`./github-light-default-Bm9VN_9a.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>a(()=>import(`./github-light-high-contrast-CLOKWgO3.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>a(()=>import(`./gruvbox-dark-hard-CfmxcH2s.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>a(()=>import(`./gruvbox-dark-medium-CyI-gkeO.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>a(()=>import(`./gruvbox-dark-soft-MWW5ZECQ.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>a(()=>import(`./gruvbox-light-hard-B1BBClrb.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>a(()=>import(`./gruvbox-light-medium-Pa9PDKzo.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>a(()=>import(`./gruvbox-light-soft-fK-V_Y0Y.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>a(()=>import(`./horizon-CCCJ-JGr.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`dark`,import:(()=>a(()=>import(`./horizon-bright-Bl30OTfI.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>a(()=>import(`./houston-DURek53E.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>a(()=>import(`./kanagawa-dragon-D47Y3CEJ.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>a(()=>import(`./kanagawa-lotus-BeBFMub7.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>a(()=>import(`./kanagawa-wave-CpRC9T--.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>a(()=>import(`./laserwave-BzEYA8sS.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>a(()=>import(`./light-plus-Dri-25vh.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>a(()=>import(`./material-theme-I9fgbTwI.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>a(()=>import(`./material-theme-darker-CRuWVyXJ.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>a(()=>import(`./material-theme-lighter-Buu8zUqH.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>a(()=>import(`./material-theme-ocean-DoxNB3O5.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>a(()=>import(`./material-theme-palenight-DUlHLk8V.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>a(()=>import(`./min-dark-CGxIF4RX.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>a(()=>import(`./min-light-BwzTB6MR.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>a(()=>import(`./monokai-CJZeHyQI.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>a(()=>import(`./night-owl-B6yGOYAO.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>a(()=>import(`./night-owl-light-Ckjy6rgf.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>a(()=>import(`./nord-CLLrVCCc.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>a(()=>import(`./one-dark-pro-Ch15I4-0.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>a(()=>import(`./one-light-BAzy_jBP.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>a(()=>import(`./plastic-CVy4QXig.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>a(()=>import(`./poimandres-Ke3o9EOF.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>a(()=>import(`./red-Cqqi2Qmm.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>a(()=>import(`./rose-pine-BW5RU-re.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>a(()=>import(`./rose-pine-dawn-DoqeeC3U.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>a(()=>import(`./rose-pine-moon-BV6GNRHj.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>a(()=>import(`./slack-dark-Dmkpgw8l.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>a(()=>import(`./slack-ochin-CJhhkdEa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>a(()=>import(`./snazzy-light-Cr_XMyAN.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>a(()=>import(`./solarized-dark-BjTykVMl.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>a(()=>import(`./solarized-light-DPet7_cZ.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>a(()=>import(`./synthwave-84-DxdsujTN.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>a(()=>import(`./tokyo-night-C0H6ztgq.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>a(()=>import(`./vesper-BqMPbytQ.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>a(()=>import(`./vitesse-black-_bPfYgrC.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>a(()=>import(`./vitesse-dark-McvxqdrO.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>a(()=>import(`./vitesse-light-D5vTabxg.js`),[]))}].map(e=>[e.id,e.import])),ey=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function ty(){return 2147483648}function ny(){return typeof performance<`u`?performance.now():Date.now()}var ry=(e,t)=>e+(t-e%t)%t;async function iy(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=ty();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,ry(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:ny,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var ay=Object.defineProperty,oy=(e,t,n)=>t in e?ay(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,sy=(e,t,n)=>oy(e,typeof t==`symbol`?t:t+``,n),cy=null;function ly(e){throw new ey(e.UTF8ToString(e.getLastOnigError()))}var uy=class e{constructor(t){sy(this,`utf16Length`),sy(this,`utf8Length`),sy(this,`utf16Value`),sy(this,`utf8Value`),sy(this,`utf16OffsetToUtf8`),sy(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},dy=class e{constructor(t){if(sy(this,`id`,++e.LAST_ID),sy(this,`_onigBinding`),sy(this,`content`),sy(this,`utf16Length`),sy(this,`utf8Length`),sy(this,`utf16OffsetToUtf8`),sy(this,`utf8OffsetToUtf16`),sy(this,`ptr`),!cy)throw new ey(`Must invoke loadWasm first.`);this._onigBinding=cy,this.content=t;let n=new uy(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=cy.omalloc(1e4),e._sharedPtrInUse=!0,cy.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(cy)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};sy(dy,`LAST_ID`,0),sy(dy,`_sharedPtr`,0),sy(dy,`_sharedPtrInUse`,!1);var fy=dy,py=class{constructor(e){if(sy(this,`_onigBinding`),sy(this,`_ptr`),!cy)throw new ey(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new uy(e[r]);t[r]=i.createString(cy),n[r]=i.utf8Length}let r=cy.omalloc(4*e.length);cy.HEAPU32.set(t,r/4);let i=cy.omalloc(4*e.length);cy.HEAPU32.set(n,i/4);let a=cy.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)cy.ofree(t[n]);cy.ofree(i),cy.ofree(r),a===0&&ly(cy),this._onigBinding=cy,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new fy(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function my(e){return typeof e.instantiator==`function`}function hy(e){return typeof e.default==`function`}function gy(e){return e.data!==void 0}function _y(e){return typeof Response<`u`&&e instanceof Response}function vy(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var yy;function by(e){if(yy)return yy;async function t(){cy=await iy(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),my(n)?n=await n.instantiator(t):hy(n)?n=await n.default(t):(gy(n)&&(n=n.data),_y(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Sy(n)(t):await Cy(n)(t):vy(n)||n instanceof WebAssembly.Module?n=await xy(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await xy(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return yy=t(),yy}function xy(e){return t=>WebAssembly.instantiate(e,t)}function Sy(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Cy(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function wy(e){return e&&await by(e),{createScanner(e){return new py(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new fy(e)}}}var Ty=Kv({langs:Qv,themes:$v,engine:()=>wy(a(()=>import(`./wasm-DLQZzE1s.js`),[]))}),{codeToHtml:ite,codeToHast:ate,codeToTokens:ote,codeToTokensBase:ste,codeToTokensWithThemes:cte,getSingletonHighlighter:lte,getLastGrammarState:ute}=Jv(Ty,{guessEmbeddedLanguages:tv});function Ey(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Dy(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var Oy=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),ky=String.raw;function Ay(e,t){if(e==null)throw Error(t??`Value expected`);return e}var jy=ky`\[\^?`,My=`c.? | C(?:-.?)?|${ky`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${ky`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${ky`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${ky`o\{[^\}]*\}?`}|${ky`\d{1,3}`}`,Ny=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Py=new RegExp(ky`
22
+ \\ (?:
23
+ ${My}
24
+ | [gk]<[^>]*>?
25
+ | [gk]'[^']*'?
26
+ | .
27
+ )
28
+ | \( (?:
29
+ \? (?:
30
+ [:=!>({]
31
+ | <[=!]
32
+ | <[^>]*>
33
+ | '[^']*'
34
+ | ~\|?
35
+ | #(?:[^)\\]|\\.?)*
36
+ | [^:)]*[:)]
37
+ )?
38
+ | \*[^\)]*\)?
39
+ )?
40
+ | (?:${Ny.source})+
41
+ | ${jy}
42
+ | .
43
+ `.replace(/\s+/g,``),`gsu`),Fy=new RegExp(ky`
44
+ \\ (?:
45
+ ${My}
46
+ | .
47
+ )
48
+ | \[:(?:\^?\p{Alpha}+|\^):\]
49
+ | ${jy}
50
+ | &&
51
+ | .
52
+ `.replace(/\s+/g,``),`gsu`);function Iy(e,t={}){let n={flags:``,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!=`string`)throw Error(`String expected as pattern`);let r=fb(n.flags),i=[r.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(e){i.push(e)},replaceCurrentModX(e){i[i.length-1]=e},singleline:n.rules.singleline},o=[],s;for(Py.lastIndex=0;s=Py.exec(e);){let t=Ly(a,e,s[0],Py.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(Py.lastIndex=t.lastIndex)}let c=[],l=0;o.filter(e=>e.type===`GroupOpen`).forEach(e=>{e.kind===`capturing`?e.number=++l:e.raw===`(`&&c.push(e)}),l||c.forEach((e,t)=>{e.kind=`capturing`,e.number=t+1});let u=l||c.length;return{tokens:o.map(e=>e.type===`EscapedNumber`?mb(e,u):e).flat(),flags:r}}function Ly(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=Ry(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:Hy(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:nb(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Uy(n)}}if(a===`K`)return{token:Xy(`keep`,n)};if(a===`N`||a===`R`)return{token:Yy(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:Yy(`any`,n)};if(a===`X`)return{token:Yy(`text_segment`,n)};let e=By(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:sb(n)};if(n===`(?{`)throw Error(`Unsupported callout "${n}"`);if(n.startsWith(`(?#`)){if(t[r]!==`)`)throw Error(`Unclosed comment group "(?#"`);return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:ob(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:$y(`group`,n)};if(n===`(?>`)return{token:$y(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:$y(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:$y(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:$y(`absence_repeater`,n)}}throw Error(n===`(?(`?`Unsupported conditional "${n}"`:`Invalid or unsupported group option "${n}"`)}if(n===`)`){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error(`Unmatched ")"`);return{token:Qy(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
53
+ `,r);return{lastIndex:e===-1?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=r,{lastIndex:e.exec(t)?e.lastIndex:r}}}return n===`.`?{token:Yy(`dot`,n)}:n===`^`||n===`$`?{token:Hy(e.singleline?{"^":ky`\A`,$:ky`\Z`}[n]:n,n)}:n===`|`?{token:Vy(n)}:Ny.test(n)?{tokens:hb(n)}:{token:Wy(Ey(n),n)}}function Ry(e,t,n){let r=[Jy(t[1]===`^`,t)],i=1,a;for(Fy.lastIndex=n;a=Fy.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(Jy(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(Wy(93,e));else if(i--,r.push(Gy(e)),!i)break}else{let t=zy(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:Fy.lastIndex||e.length}}function zy(e){if(e[0]===`\\`)return By(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!Oy.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return Yy(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?Ky(e):e===`&&`?qy(e):Wy(Ey(e),e)}function By(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return ab(e);if(`dDhHsSwW`.includes(n))return lb(e);if(e.startsWith(ky`\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 ub(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),r=new TextEncoder;return[...n].map(e=>{let t=[...r.encode(e)].map(e=>`\\x${e.toString(16)}`).join(``);return Wy(Ey(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return Wy(pb(e),e);if(ib.has(n))return Wy(ib.get(n),e);if(/\d/.test(n))return Zy(t,e);if(e===`\\`)throw Error(ky`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return Wy(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function Vy(e){return{type:`Alternator`,raw:e}}function Hy(e,t){return{type:`Assertion`,kind:e,raw:t}}function Uy(e){return{type:`Backreference`,raw:e}}function Wy(e,t){return{type:`Character`,value:e,raw:t}}function Gy(e){return{type:`CharacterClassClose`,raw:e}}function Ky(e){return{type:`CharacterClassHyphen`,raw:e}}function qy(e){return{type:`CharacterClassIntersector`,raw:e}}function Jy(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function Yy(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function Xy(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:Ay(n.flags),raw:t}}function Zy(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function Qy(e){return{type:`GroupClose`,raw:e}}function $y(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function eb(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function tb(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function nb(e){return{type:`Subroutine`,raw:e}}var rb=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),ib=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function ab(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return Wy(Ey(t.toUpperCase())-64,e)}function ob(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??=``;let i=(t.getCurrentModX()||n.includes(`x`))&&!r.includes(`x`),a=db(n),o=db(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),Xy(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,$y(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function sb(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:n,tag:r,args:i}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(r===``)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=i?i.split(`,`).filter(e=>e!==``).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,c]=a,l=rb.has(n)?n.toLowerCase():`custom`;switch(l){case`fail`:case`mismatch`:case`skip`:if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case`error`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(typeof o==`string`)throw Error(`Named callout argument must be a number "${o}"`);break;case`max`:if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if(typeof o==`string`&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(a.length===2&&(typeof s==`number`||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case`count`:case`total_count`:if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(a.length===1&&(typeof o==`number`||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case`cmp`:if(a.length!==3)throw Error(`Named callout must have three arguments "${a}"`);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 s==`number`||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if(typeof c==`string`&&!/^[A-Za-z_]\w*$/.test(c))throw Error(`Named callout argument three must be a tag or number "${c}"`);break;case`custom`:throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${l}"`)}return eb(l,r??null,i?.split(`,`)??null,e)}function cb(e){let t=null,n,r;if(e[0]===`{`){let{minStr:i,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,o=1e5;if(+i>o||a&&+a>o)throw Error(`Quantifier value unsupported in Oniguruma`);if(n=+i,r=a===void 0?+i:a===``?1/0:+a,n>r&&(t=`possessive`,[n,r]=[r,n]),e.endsWith(`?`)){if(t===`possessive`)throw Error(`Unsupported possessive interval quantifier chain with "?"`);t=`lazy`}else t||=`greedy`}else n=+(e[0]===`+`),r=e[0]===`?`?1:1/0,t=e[1]===`+`?`possessive`:e[1]===`?`?`lazy`:`greedy`;return tb(t,n,r,e)}function lb(e){let t=e[1].toLowerCase();return Yy({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function ub(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Yy(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function db(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 fb(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let r=e[n];if(!`imxDPSWy`.includes(r))throw Error(`Invalid flag "${r}"`);if(r===`y`){if(!/^y{[gw]}/.test(e.slice(n)))throw Error(`Invalid or unspecified flag "y" mode`);t.textSegmentMode=e[n+2]===`g`?`grapheme`:`word`,n+=3;continue}t[{i:`ignoreCase`,m:`dotAll`,x:`extended`,D:`digitIsAscii`,P:`posixIsAscii`,S:`spaceIsAscii`,W:`wordIsAscii`}[r]]=!0}return t}function pb(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 mb(e,t){let{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!==`0`&&i.length===1||i[0]!==`0`&&+i<=t))return[Uy(n)];let a=[],o=i.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t=o[e],r;if(e===0&&t!==`8`&&t!==`9`){if(r=parseInt(t,8),r>127)throw Error(ky`Octal encoded byte above 177 unsupported "${n}"`)}else r=Ey(t);a.push(Wy(r,(e===0?`\\`:``)+t))}return a}function hb(e){let t=[],n=new RegExp(Ny,`gy`),r;for(;r=n.exec(e);){let e=r[0];if(e[0]===`{`){let r=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(r){let{min:i,max:a}=r.groups;if(+i>+a&&e.endsWith(`?`)){n.lastIndex--,t.push(cb(e.slice(0,-1)));continue}}}t.push(cb(e))}return t}function gb(e,t){if(!Array.isArray(e.body))throw Error(`Expected node with body array`);if(e.body.length!==1)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}function _b(e){return vb.has(e.type)}var vb=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function yb(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Iy(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(e,t)=>{let n=r.tokens[a.nextIndex];switch(a.parent=e,a.nextIndex++,n.type){case`Alternator`:return kb();case`Assertion`:return bb(n);case`Backreference`:return xb(n,a);case`Character`:return Nb(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return Sb(n,a,t);case`CharacterClassOpen`:return Cb(n,a,t);case`CharacterSet`:return wb(n,a);case`Directive`:return Lb(n.kind,{flags:n.flags});case`GroupOpen`:return Tb(n,a,t);case`NamedCallout`:return Vb(n.kind,n.tag,n.arguments);case`Quantifier`:return Eb(n,a);case`Subroutine`:return Db(n,a);default:throw Error(`Unexpected token type "${n.type}"`)}},a={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},o=Wb(Rb(r.flags)),s=o.body[0];for(;a.nextIndex<r.tokens.length;){let e=i(s,{});e.type===`Alternative`?(o.body.push(e),s=e):s.body.push(e)}let{capturingGroups:c,hasNumberedRef:l,namedGroupsByName:u,subroutines:d}=a;if(l&&u.size&&!n.rules.captureGroup)throw Error(`Numbered backref/subroutine not allowed when using named capture`);for(let{ref:e}of d)if(typeof e==`number`){if(e>c.length)throw Error(`Subroutine uses a group number that's not defined`);e&&(c[e-1].isSubroutined=!0)}else if(u.has(e)){if(u.get(e).length>1)throw Error(ky`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(ky`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function bb({kind:e}){return Ab(Ay({"^":`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===ky`\B`||e===ky`\Y`})}function xb({raw:e},t){let n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(n,r=!1)=>{let i=t.capturingGroups.length,a=!1;if(n>i)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,jb(r?i+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(n)return i(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(r))throw Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw Error(`Group name not defined to the left "${e}"`);return jb(r)}return i(+r)}function Sb(e,t,n){let{tokens:r,walk:i}=t,a=t.parent,o=a.body.at(-1),s=r[t.nextIndex];if(!n.isCheckingRangeEnd&&o&&o.type!==`CharacterClass`&&o.type!==`CharacterClassRange`&&s&&s.type!==`CharacterClassOpen`&&s.type!==`CharacterClassClose`&&s.type!==`CharacterClassIntersector`){let e=i(a,{...n,isCheckingRangeEnd:!0});if(o.type===`Character`&&e.type===`Character`)return a.body.pop(),Fb(o,e);throw Error(`Invalid character class range`)}return Nb(Ey(`-`))}function Cb({negate:e},t,n){let{tokens:r,walk:i}=t,a=[Pb()],o=r[t.nextIndex],s=tx(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(Pb()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=tx(r[t.nextIndex],o)}let c=Pb({negate:e});return a.length===1?c.body=a[0].body:(c.kind=`intersection`,c.body=a.map(e=>e.body.length===1?e.body[0]:e)),t.nextIndex++,c}function wb({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=ex(n);if(Oy.has(r)&&!o?.has(r))e=`posix`,n=r;else return Kb(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?Hb(n,{negate:t}):Ib(e,{negate:t})}function Tb(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=qb(e),l=c.type===`AbsenceFunction`,u=Zb(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&Dy(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=nx(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(kb()),t.nextIndex++;else{let e=c.body.at(-1),t=s(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||l,isInLookbehind:n.isInLookbehind||u,isInNegLookbehind:n.isInNegLookbehind||d});if(e.body.push(t),(u||n.isInLookbehind)&&!o){let e=`Lookbehind includes a pattern not allowed by Oniguruma`;if(d||n.isInNegLookbehind){if(Xb(t)||t.type===`CapturingGroup`)throw Error(e)}else if(Xb(t)||Zb(t)&&t.negate)throw Error(e)}}f=nx(r[t.nextIndex])}return t.nextIndex++,c}function Eb({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!_b(a))throw Error(`Quantifier requires a repeatable token`);let o=Ub(e,t,n,a);return i.body.pop(),o}function Db({raw:e},t){let{capturingGroups:n,subroutines:r}=t,i=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(a){let e=+a.groups.num,r=n.length;if(t.hasNumberedRef=!0,i={"":e,"+":r+e,"-":r+1-e}[a.groups.sign],i<1)throw Error(`Invalid subroutine number`)}else i===`0`&&(i=0);let o=Gb(i);return r.push(o),o}function Ob(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:Jb(t?.body)}}function kb(e){return{type:`Alternative`,body:Yb(e?.body)}}function Ab(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function jb(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function Mb(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Qb(n.name))throw Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:`CapturingGroup`,number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Jb(t?.body)}}function Nb(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw Error(e>1310719?`Invalid code point out of range "\\x{${t}}"`:`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:`Character`,value:e}}function Pb(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:Yb(e?.body)}}function Fb(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function Ib(e,t){let n=!!t?.negate,r={type:`CharacterSet`,kind:e};return(e===`digit`||e===`hex`||e===`newline`||e===`space`||e===`word`)&&(r.negate=n),(e===`text_segment`||e===`newline`&&!n)&&(r.variableLength=!0),r}function Lb(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:Ay(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function Rb(e){return{type:`Flags`,...e}}function zb(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error(`Atomic group cannot have flags`);return{type:`Group`,...t&&{atomic:t},...n&&{flags:n},body:Jb(e?.body)}}function Bb(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:Jb(e?.body)}}function Vb(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function Hb(e,t){let n=!!t?.negate;if(!Oy.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function Ub(e,t,n,r){if(t>n)throw Error(`Invalid reversed quantifier range`);return{type:`Quantifier`,kind:e,min:t,max:n,body:r}}function Wb(e,t){return{type:`Regex`,body:Jb(t?.body),flags:e}}function Gb(e){return{type:`Subroutine`,ref:e}}function Kb(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(ex(e));if(!r){if(n.normalizeUnknownPropertyNames)r=$b(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(ky`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function qb({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return Ob(`repeater`);case`atomic`:return zb({atomic:!0});case`capturing`:return Mb(i,{name:n});case`group`:return zb({flags:e});case`lookahead`:case`lookbehind`:return Bb({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function Jb(e){if(e===void 0)e=[kb()];else if(!Array.isArray(e)||!e.length||!e.every(e=>e.type===`Alternative`))throw Error(`Invalid body; expected array of one or more Alternative nodes`);return e}function Yb(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error(`Invalid body; expected array of nodes`);return e}function Xb(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function Zb(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function Qb(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function $b(e){return e.trim().replace(/[- _]+/g,`_`).replace(/[A-Z][a-z]+(?=[A-Z])/g,`$&_`).replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase())}function ex(e){return e.replace(/[- _]+/g,``).toLowerCase()}function tx(e,t){let n=t;return Ay(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function nx(e){return Ay(e,`Unclosed group`)}function rx(e,t,n=null){function r(e,t){for(let n=0;n<e.length;n++){let r=i(e[n],t,n,e);n=Math.max(-1,n+r)}}function i(a,o=null,s=null,c=null){let l=0,u=!1,d={node:a,parent:o,key:s,container:c,root:e,remove(){ix(c).splice(Math.max(0,ax(s)+l),1),l--,u=!0},removeAllNextSiblings(){return ix(c).splice(ax(s)+1)},removeAllPrevSiblings(){let e=ax(s)+l;return l-=e,ix(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,ax(s)+l)]=e:Ay(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(ix(c).splice(Math.max(0,ax(s)+l),1,...e),l+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=i(e[n],o,ax(s)+n+t,c)}u=!0},skip(){u=!0}},{type:f}=a,p=t[`*`],m=t[f],h=typeof p==`function`?p:p?.enter,g=typeof m==`function`?m:m?.enter;if(h?.(d,n),g?.(d,n),!u)switch(f){case`AbsenceFunction`:case`Alternative`:case`CapturingGroup`:case`CharacterClass`:case`Group`:case`LookaroundAssertion`:r(a.body,a);break;case`Assertion`:case`Backreference`:case`Character`:case`CharacterSet`:case`Directive`:case`Flags`:case`NamedCallout`:case`Subroutine`:break;case`CharacterClassRange`:i(a.min,a,`min`),i(a.max,a,`max`);break;case`Quantifier`:i(a.body,a,`body`);break;case`Regex`:r(a.body,a),i(a.flags,a,`flags`);break;default:throw Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),p?.exit?.(d,n),l}return i(e),e}function ix(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function ax(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var ox=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function sx(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function cx(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var lx=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function ux(e,t,n,r){let i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,`gsu`),a=[!1],o=0,s=``;for(let t of e.matchAll(i)){let{0:e,groups:{$skip:i}}=t;if(!i&&(!r||r===lx.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?lx.CHAR_CLASS:lx.DEFAULT,negated:a[a.length-1]}):s+=n;continue}e[0]===`[`?(o++,a.push(e[1]===`^`)):e===`]`&&o&&(o--,a.pop()),s+=e}return s}function dx(e,t,n,r){ux(e,t,n,r)}function fx(e,t,n=0,r){if(!new RegExp(t,`su`).test(e))return null;let i=RegExp(`${t}|(?<$skip>\\\\?.)`,`gsu`);i.lastIndex=n;let a=0,o;for(;o=i.exec(e);){let{0:e,groups:{$skip:t}}=o;if(!t&&(!r||r===lx.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function px(e,t,n){return!!fx(e,t,0,n)}function mx(e,t){let n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,a=1,o;for(;o=n.exec(e);){let[e]=o;if(e===`[`)i++;else if(i)e===`]`&&i--;else if(e===`(`)a++;else if(e===`)`&&(a--,!a)){r=o.index;break}}return e.slice(t,r)}var hx=new RegExp(String.raw`(?<noncapturingStart>${ox})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function gx(e,t){let n=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};let i=[0],a=[],o=0,s=0,c=NaN,l;do{l=!1;let t=0,u=0,d=!1,f;for(hx.lastIndex=Number.isNaN(c)?0:c+7;f=hx.exec(e);){let{0:p,index:m,groups:{capturingStart:h,noncapturingStart:g}}=f;if(p===`[`)t++;else if(t)p===`]`&&t--;else if(p===`(?>`&&!d)c=m,d=!0;else if(d&&g)u++;else if(h)d?u++:(o++,i.push(o+s));else if(p===`)`&&d){if(!u){s++;let t=o+s;if(e=`${e.slice(0,c)}(?:(?=(${e.slice(c+3,m)}))<$$${t}>)${e.slice(m+1)}`,l=!0,a.push(t),sx(n,t),r.size){let e=new Map;r.forEach((n,r)=>{e.set(r>=t?r+1:r,n.map(e=>e>=t?e+1:e))}),r=e}break}u--}}}while(l);return n.push(...a),e=ux(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>i.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${i[n]}`}return`\\${n}`},lx.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var _x=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,vx=new RegExp(String.raw`
54
+ \\(?: \d+
55
+ | c[A-Za-z]
56
+ | [gk]<[^>]+>
57
+ | [pPu]\{[^\}]+\}
58
+ | u[A-Fa-f\d]{4}
59
+ | x[A-Fa-f\d]{2}
60
+ )
61
+ | \((?: \? (?: [:=!>]
62
+ | <(?:[=!]|[^>]+>)
63
+ | [A-Za-z\-]+:
64
+ | \(DEFINE\)
65
+ ))?
66
+ | (?<qBase>${_x})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
67
+ | \\?.
68
+ `.replace(/\s+/g,``),`gsu`);function yx(e){if(!RegExp(`${_x}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(vx.lastIndex=0;o=vx.exec(e);){let{0:s,index:c,groups:{qBase:l,qMod:u,invalidQ:d}}=o;if(s===`[`)a||(r=c),a++;else if(s===`]`)a?a--:r=null;else if(!a)if(u===`+`&&i&&!i.startsWith(`(`)){if(d)throw Error(`Invalid quantifier "${s}"`);let t=-1;if(/^\{\d+\}$/.test(l))e=cx(e,c+l.length,u,``);else{if(i===`)`||i===`]`){let t=i===`)`?n:r;if(t===null)throw Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,t)}(?>${e.slice(t,c)}${l})${e.slice(c+s.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${l})${e.slice(c+s.length)}`;t+=4}vx.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null);i=s}return{pattern:e}}var bx=String.raw,xx=bx`\(\?R=(?<rDepth>[^\)]+)\)|${bx`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,Sx=bx`\(\?<(?![=!])(?<captureName>[^>]+)>`,Cx=bx`${Sx}|(?<unnamed>\()(?!\?)`,wx=new RegExp(bx`${Sx}|${xx}|\(\?|\\?.`,`gsu`),Tx=`Cannot use multiple overlapping recursions`;function Ex(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(xx,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&px(e,bx`\(\?\(DEFINE\)`,lx.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=px(e,bx`\\[1-9]`,lx.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(wx.lastIndex=0;f=wx.exec(e);){let{0:t,groups:{captureName:p,rDepth:m,gRNameOrNum:h,gRDepth:g}}=f;if(t===`[`)u++;else if(u)t===`]`&&u--;else if(m){if(Dx(m),l)throw Error(Tx);if(o)throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with global recursion`);let t=e.slice(0,f.index),s=e.slice(wx.lastIndex);if(px(s,xx,lx.DEFAULT))throw Error(Tx);let c=m-1;e=Ox(t,s,c,!1,n,a,d),i=jx(i,t,c,a.length,0,d);break}else if(h){Dx(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(Tx);break}if(!u)throw Error(bx`Recursive \g cannot be used outside the referenced group "${r===`external`?h:bx`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=mx(e,p);if(o&&px(m,bx`${Sx}|\((?!\?)`,lx.DEFAULT))throw Error(`${r===`external`?`Backrefs`:`Numbered backrefs`} cannot be used with recursion of capturing groups`);let _=e.slice(p,f.index),v=m.slice(_.length+t.length),y=a.length,b=g-1,x=Ox(_,v,b,!0,n,a,d);i=jx(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,wx.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),wx.lastIndex),s.set(p,wx.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),wx.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function Dx(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e=+e,e<2||e>100))throw Error(t)}function Ox(e,t,n,r,i,a,o){let s=new Set;r&&dx(e+t,Sx,({groups:{captureName:e}})=>{s.add(e)},lx.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${kx(`(?:${e}`,`forward`,...c)}(?:)${kx(`${t})`,`backward`,...c)}${t}`}function kx(e,t,n,r,i,a,o){let s=e=>t===`forward`?e+2:n-e+2-1,c=``;for(let t=0;t<n;t++){let n=s(t);c+=ux(e,bx`${Cx}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:c}})=>{if(c&&r&&!r.has(c))return e;let l=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),Ax(i,n),s?e:`(?<${t}${l}>`}return bx`\k<${c}${l}>`},lx.DEFAULT)}return c}function Ax(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function jx(e,t,n,r,i,a){if(e.size&&r){let o=0;dx(t,Cx,()=>o++,lx.DEFAULT);let s=a-o+i,c=new Map;return e.forEach((e,t)=>{let i=(r-o*n)/n,a=o*n,l=t>s+o?t+r:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+i)u.push(t+r);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+i*e);c.set(l,u)}),c}return e}var Mx=String.fromCodePoint,Nx=String.raw,Px={},Fx=globalThis.RegExp;Px.flagGroups=(()=>{try{new Fx(`(?i:)`)}catch{return!1}return!0})(),Px.unicodeSets=(()=>{try{new Fx(`[[]]`,`v`)}catch{return!1}return!0})(),Px.bugFlagVLiteralHyphenIsRange=Px.unicodeSets?(()=>{try{new Fx(Nx`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,Px.bugNestedClassIgnoresNegation=Px.unicodeSets&&new Fx(`[[^a]]`,`v`).test(`a`);function Ix(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Lx(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function Rx(e,t){return Bx[e]>=Bx[t]}function zx(e,t){if(e==null)throw Error(t??`Value expected`);return e}var Bx={ES2025:2025,ES2024:2024,ES2018:2018},Vx={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function Hx(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!Vx[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}};return t.target===`auto`&&(t.target=Px.flagGroups?`ES2025`:Px.unicodeSets?`ES2024`:`ES2018`),t}var Ux=`[ -\r ]`,Wx=new Set([Mx(304),Mx(305)]),Gx=Nx`[\p{L}\p{M}\p{N}\p{Pc}]`;function Kx(e){if(Wx.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Xx.get(n),a=Jx.get(n),o=Yx.get(n);return[...r].length===1&&t.add(r),o&&t.add(o),i&&t.add(i),t.add(n),a&&t.add(a),[...t]}var qx=new Map(`C Other
69
+ Cc Control cntrl
70
+ Cf Format
71
+ Cn Unassigned
72
+ Co Private_Use
73
+ Cs Surrogate
74
+ L Letter
75
+ LC Cased_Letter
76
+ Ll Lowercase_Letter
77
+ Lm Modifier_Letter
78
+ Lo Other_Letter
79
+ Lt Titlecase_Letter
80
+ Lu Uppercase_Letter
81
+ M Mark Combining_Mark
82
+ Mc Spacing_Mark
83
+ Me Enclosing_Mark
84
+ Mn Nonspacing_Mark
85
+ N Number
86
+ Nd Decimal_Number digit
87
+ Nl Letter_Number
88
+ No Other_Number
89
+ P Punctuation punct
90
+ Pc Connector_Punctuation
91
+ Pd Dash_Punctuation
92
+ Pe Close_Punctuation
93
+ Pf Final_Punctuation
94
+ Pi Initial_Punctuation
95
+ Po Other_Punctuation
96
+ Ps Open_Punctuation
97
+ S Symbol
98
+ Sc Currency_Symbol
99
+ Sk Modifier_Symbol
100
+ Sm Math_Symbol
101
+ So Other_Symbol
102
+ Z Separator
103
+ Zl Line_Separator
104
+ Zp Paragraph_Separator
105
+ Zs Space_Separator
106
+ ASCII
107
+ ASCII_Hex_Digit AHex
108
+ Alphabetic Alpha
109
+ Any
110
+ Assigned
111
+ Bidi_Control Bidi_C
112
+ Bidi_Mirrored Bidi_M
113
+ Case_Ignorable CI
114
+ Cased
115
+ Changes_When_Casefolded CWCF
116
+ Changes_When_Casemapped CWCM
117
+ Changes_When_Lowercased CWL
118
+ Changes_When_NFKC_Casefolded CWKCF
119
+ Changes_When_Titlecased CWT
120
+ Changes_When_Uppercased CWU
121
+ Dash
122
+ Default_Ignorable_Code_Point DI
123
+ Deprecated Dep
124
+ Diacritic Dia
125
+ Emoji
126
+ Emoji_Component EComp
127
+ Emoji_Modifier EMod
128
+ Emoji_Modifier_Base EBase
129
+ Emoji_Presentation EPres
130
+ Extended_Pictographic ExtPict
131
+ Extender Ext
132
+ Grapheme_Base Gr_Base
133
+ Grapheme_Extend Gr_Ext
134
+ Hex_Digit Hex
135
+ IDS_Binary_Operator IDSB
136
+ IDS_Trinary_Operator IDST
137
+ ID_Continue IDC
138
+ ID_Start IDS
139
+ Ideographic Ideo
140
+ Join_Control Join_C
141
+ Logical_Order_Exception LOE
142
+ Lowercase Lower
143
+ Math
144
+ Noncharacter_Code_Point NChar
145
+ Pattern_Syntax Pat_Syn
146
+ Pattern_White_Space Pat_WS
147
+ Quotation_Mark QMark
148
+ Radical
149
+ Regional_Indicator RI
150
+ Sentence_Terminal STerm
151
+ Soft_Dotted SD
152
+ Terminal_Punctuation Term
153
+ Unified_Ideograph UIdeo
154
+ Uppercase Upper
155
+ Variation_Selector VS
156
+ White_Space space
157
+ XID_Continue XIDC
158
+ XID_Start XIDS`.split(/\s/).map(e=>[ex(e),e])),Jx=new Map([[`s`,Mx(383)],[Mx(383),`s`]]),Yx=new Map([[Mx(223),Mx(7838)],[Mx(107),Mx(8490)],[Mx(229),Mx(8491)],[Mx(969),Mx(8486)]]),Xx=new Map([$x(453),$x(456),$x(459),$x(498),...eS(8072,8079),...eS(8088,8095),...eS(8104,8111),$x(8124),$x(8140),$x(8188)]),Zx=new Map([[`alnum`,Nx`[\p{Alpha}\p{Nd}]`],[`alpha`,Nx`\p{Alpha}`],[`ascii`,Nx`\p{ASCII}`],[`blank`,Nx`[\p{Zs}\t]`],[`cntrl`,Nx`\p{Cc}`],[`digit`,Nx`\p{Nd}`],[`graph`,Nx`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,Nx`\p{Lower}`],[`print`,Nx`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,Nx`[\p{P}\p{S}]`],[`space`,Nx`\p{space}`],[`upper`,Nx`\p{Upper}`],[`word`,Nx`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,Nx`\p{AHex}`]]);function Qx(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function $x(e){let t=Mx(e);return[t.toLowerCase(),t]}function eS(e,t){return Qx(e,t).map(e=>$x(e))}var tS=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function nS(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};oS(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:Rx(n.bestEffortTarget,`ES2024`),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};rx(e,rS,r);let i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},a={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};return rx(e,iS,a),rx(e,aS,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var rS={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=zb();e.body[0].body.push(Bb({negate:!0,body:r}),Kb(`Any`));let i=zb();i.body[0].body.push(Ub(`greedy`,0,1/0,e)),n(TS(i,t),{traverse:!0})}else throw Error(`Unsupported absence function "(?~|"`)},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){let i=e.body.filter(e=>e.kind===`flags`);for(let e=n+1;e<t.body.length;e++){let n=t.body[e];Lx(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=pS(t.get(e));if(n){let t=zb({flags:n});t.body[0].body=e.body,e.body=[TS(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:a,replaceWith:o},s){let{kind:c,negate:l}=e,{asciiWordBoundaries:u,avoidSubclass:d,supportedGNodes:f,wordIsAscii:p}=s;if(c===`text_segment_boundary`)throw Error(`Unsupported text segment boundary "\\${l?`Y`:`y`}"`);if(c===`line_end`)o(TS(Bb({body:[kb({body:[Ab(`string_end`)]}),kb({body:[Nb(10)]})]}),t));else if(c===`line_start`)o(TS(SS(Nx`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c===`search_start`)if(f.has(e))i.flags.sticky=!0,a();else{let e=r[n-1];if(e&&yS(e))o(TS(Bb({negate:!0}),t));else if(d)throw Error(Nx`Uses "\G" in a way that requires a subclass`);else o(wS(Ab(`string_start`),t)),s.strategy=`clip_search`}else if(!(c===`string_end`||c===`string_start`))if(c===`string_end_newline`)o(TS(SS(Nx`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${Gx})(?!${Gx})|(?<!${Gx})(?=${Gx}))`,n=`(?:(?<=${Gx})(?=${Gx})|(?<!${Gx})(?!${Gx}))`;o(TS(SS(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!xS(n)&&(n=fS(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!xS(r)&&(r=fS(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){t.kind===`intersection`&&n(TS(Pb({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:c,negate:l,value:u}=e;if(a&&(c===`digit`||u===`digit`)){n(wS(Ib(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(TS(CS(SS(Ux),l),t));return}if(s&&(c===`word`||u===`word`)){n(wS(Ib(`word`,{negate:l}),t));return}if(c===`any`)n(wS(Kb(`Any`),t));else if(c===`digit`)n(wS(Kb(`Nd`,{negate:l}),t));else if(c!==`dot`)if(c===`text_segment`){if(r===`strict`)throw Error(Nx`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=Nx`\p{RI}{2}|${e}(?:\u200D${e})*`;n(TS(SS(Nx`(?>\r\n|${i?Nx`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(wS(Kb(`AHex`,{negate:l}),t));else if(c===`newline`)n(TS(SS(l?`[^
159
+ ]`:`(?>\r
160
+ ?|[
161
+ \v\f…\u2028\u2029])`),t));else if(c===`posix`)if(!i&&(u===`graph`||u===`print`)){if(r===`strict`)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:`!-~`,print:` -~`}[u];l&&(e=`\0-${Mx(e.codePointAt(0)-1)}${Mx(e.codePointAt(2)+1)}-\u{10FFFF}`),n(TS(SS(`[${e}]`),t))}else n(TS(CS(SS(Zx.get(u)),l),t));else if(c===`property`)qx.has(ex(u))||(e.key=`sc`);else if(c===`space`)n(wS(Kb(`space`,{negate:l}),t));else if(c===`word`)n(TS(CS(SS(Gx),l),t));else throw Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:c}=e;if(s===`flags`)if(!c.enable&&!c.disable)r();else{let e=zb({flags:c});e.body[0].body=o(),i(TS(e,t),{traverse:!0})}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&gb(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(Nx`Uses "\K" in a way that's unsupported`);let o=Bb({behind:!0});o.body[0].body=a(),i(TS(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},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(t=>delete e[t]),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:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;n===`lookbehind`&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:r}=e;if(r===`fail`)n(TS(Bb({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=zb();t.body[0].body.push(e.body),e.body=TS(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],r=!1,i=!1;for(let t of e.body)if(t.body.length===1&&t.body[0].kind===`search_start`)t.body.pop();else{let e=gS(t.body);e?(r=!0,Array.isArray(e)?n.push(...e):n.push(e)):i=!0}r&&!i&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t===`strict`&&n&&r)throw Error(Nx`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!xS(n)&&(n=fS(n,t),e.ref=n)}},iS={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:c}){let l=i.get(e);if(l&&s.has(e.number)){let r=wS(uS(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&Lx(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(l===n.node||l&&l===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:l}),e.name&&o.get(e.name).push({node:e,origin:l}),e.name){let t=Lx(a,e.name,new Map),n=!1;if(l)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Ix(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){let{isRecursive:i,ref:a}=e;if(i){let n=t;for(;(n=n.parent)&&!(n.type===`CapturingGroup`&&(n.name===a||n.number===a)););r.reffedNodesByReferencer.set(e,n);return}let o=r.subroutineRefMap.get(a),s=a===0,c=s?uS(0):lS(o,r.groupOriginByCopy,null),l=c;if(!s){let e=pS(dS(o,e=>e.type===`Group`&&!!e.flags)),t=e?Ix(r.globalFlags,e):r.globalFlags;sS(t,r.currentFlags)||(l=zb({flags:mS(t)}),l.body[0].body.push(c))}n(TS(l,t),{traverse:!s})}},aS={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}let i=r.reffedNodesByReferencer.get(e).filter(t=>cS(t,e));i.length?i.length>1?n(TS(zb({atomic:!0,body:i.reverse().map(e=>kb({body:[jb(e.number)]}))}),t)):e.ref=i[0].number:n(TS(Bb({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=Mb();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function oS(e){rx(e,{"*"({node:e,parent:t}){e.parent=t}})}function sS(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function cS(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=hS(n.parent);for(let r of t){if(r===n)break;if(r===e||_S(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function lS(e,t,n,r){let i=Array.isArray(e)?[]:{};for(let[a,o]of Object.entries(e))a===`parent`?i.parent=Array.isArray(n)?r:n:o&&typeof o==`object`?i[a]=lS(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function uS(e){let t=Gb(e);return t.isRecursive=!0,t}function dS(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function fS(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/gu,`_`)}`;return t.set(e,n),n}function pS(e){let t=[`dotAll`,`ignoreCase`],n={enable:{},disable:{}};return e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function mS({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function hS(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function gS(e){let t=e.find(e=>e.kind===`search_start`||bS(e,{negate:!1})||!vS(e));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 e=[];for(let n of t.body){let t=gS(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function _S(e,t){let n=hS(e)??[];for(let e of n)if(e===t||_S(e,t))return!0;return!1}function vS({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function yS(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function bS(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&gb(e.body[0],{type:`Assertion`,kind:`search_start`})}function xS(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function SS(e,t){let n=yb(e,{...t,unicodePropertyMap:qx}).body;return n.length>1||n[0].body.length>1?zb({body:n}):n[0].body[0]}function CS(e,t){return e.negate=t,e}function wS(e,t){return e.parent=t,e}function TS(e,t){return oS(e),e.parent=t,e}function ES(e,t){let n=Hx(t),r=Rx(n.target,`ES2024`),i=Rx(n.target,`ES2025`),a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error(`Invalid recursionLimit; use 2-20`);let o=null,s=null;if(!i){let t=[e.flags.ignoreCase];rx(e,DS,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},l=e,u={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:l,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!i&&o&&s),useFlagMods:i,useFlagV:r,verbose:n.verbose};function d(e){return u.lastNode=l,l=e,zx(OS[e.type],`Unexpected node type "${e.type}"`)(e,u,d)}let f={pattern:e.body.map(d).join(`|`),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&f._hiddenCaptures.push(t),e.transferTo&&Lx(f._captureTransfers,e.transferTo,[]).push(t)}),f}var DS={"*":{enter({node:e},t){if(BS(e)){let n=t.getCurrentModI();t.pushModI(e.flags?Ix({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){BS(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){PS(Mx(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),FS(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&tS.has(e.value)&&t.setHasCasedChar()}},OS={Alternative({body:e},t,n){return e.map(n).join(``)},Assertion({kind:e,negate:t}){if(e===`string_end`)return`$`;if(e===`string_start`)return`^`;if(e===`word_boundary`)return t?Nx`\B`:Nx`\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,n){let{body:r,name:i,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${i?`?<${i}>`:``}${r.map(n).join(`|`)})`},Character({value:e},t){let n=Mx(e),r=IS(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&PS(n)){let e=Kx(n);return t.inCharClass?e.join(``):e.length>1?`[${e.join(``)}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:r,negate:i,parent:a}=e,{body:o}=e;if(r===`intersection`&&!t.useFlagV)throw Error(`Use of character class intersection requires min target ES2024`);Px.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(VS)&&(o=[Nb(45),...o.filter(e=>!VS(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||Px.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=zb(),i=r.body[0];return r.parent=a,i.parent=r,o=o.filter(e=>!t.includes(e)),e.body=o,o.length?(e.parent=i,i.body.push(e)):r.body.pop(),t.forEach(e=>{let t=kb({body:[e]});e.parent=t,t.parent=r,r.body.push(t)}),n(r)}}t.inCharClass=!0;let r=s();return t.inCharClass=!1,r}let c=o[0];if(r===`union`&&!i&&c&&((!t.useFlagV||!t.verbose)&&a.kind===`union`&&!(Px.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&a.kind===`intersection`&&o.length===1&&c.type!==`CharacterClassRange`))return o.map(n).join(``);if(!t.useFlagV&&a.type===`CharacterClass`)throw Error(`Uses nested character class in a way that requires min target ES2024`);return s()},CharacterClassRange(e,t){let n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=IS(n,i),o=IS(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&LS(FS(e)).forEach(e=>{s.add(Array.isArray(e)?`${IS(e[0],i)}-${IS(e[1],i)}`:IS(e,i))}),`${a}-${o}${[...s].join(``)}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e===`dot`)return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?`.`:`[^]`:Nx`[^\n]`;if(e===`digit`)return t?Nx`\D`:Nx`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&tS.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Nx`\P`:Nx`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?Nx`\W`:Nx`\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:n,parent:r},i,a){let o=i.currentFlags;n&&(i.currentFlags=Ix(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${RS(e,n,i.useFlagMods)}${s})`;return i.currentFlags=o,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t===`lookahead`?``:`<`}${n?`!`:`=`}`}${e.map(i).join(`|`)})`},Quantifier(e,t,n){return n(e.body)+zS(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error(`Unexpected non-recursive subroutine in transformed AST`);let r=n.recursionLimit;return t===0?`(?R=${r})`:Nx`\g<${t}&R=${r}>`}},kS=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),AS=new Set([`-`,`\\`,`]`,`^`,`[`]),jS=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),MS=new Map([[9,Nx`\t`],[10,Nx`\n`],[11,Nx`\v`],[12,Nx`\f`],[13,Nx`\r`],[8232,Nx`\u2028`],[8233,Nx`\u2029`],[65279,Nx`\uFEFF`]]),NS=/^\p{Cased}$/u;function PS(e){return NS.test(e)}function FS(e,t){let n=!!t?.firstOnly,r=e.min.value,i=e.max.value,a=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return a;for(let e=r;e<=i;e++){let t=Mx(e);if(!PS(t))continue;let o=Kx(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function IS(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(MS.has(e))return MS.get(e);if(e<32||e>126&&e<160||e>262143||t&&dte(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?jS:AS:kS,a=Mx(e);return(i.has(a)?`\\`:``)+a}function LS(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],r=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?r??=t[e]:r===null?n.push(t[e]):(n.push([r,t[e]]),r=null);return n}function RS(e,t,n){if(e)return`>`;let r=``;if(t&&n){let{enable:e,disable:n}=t;r=(e?.ignoreCase?`i`:``)+(e?.dotAll?`s`:``)+(n?`-`:``)+(n?.ignoreCase?`i`:``)+(n?.dotAll?`s`:``)}return`${r}:`}function zS({kind:e,max:t,min:n}){let r;return r=!n&&t===1?`?`:!n&&t===1/0?`*`:n===1&&t===1/0?`+`:n===t?`{${n}}`:`{${n},${t===1/0?``:t}}`,r+{greedy:``,lazy:`?`,possessive:`+`}[e]}function BS({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function dte(e){return e>47&&e<58}function VS({type:e,value:t}){return e===`Character`&&t===45}var fte=class e extends RegExp{#e=new Map;#t=null;#n;#r=null;#i=null;rawOptions={};get source(){return this.#n||`(?:)`}constructor(t,n,r){let i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw Error(`Cannot provide options when copying a regexp`);let i=t;super(i,n),this.#n=i.source,i instanceof e&&(this.#e=i.#e,this.#r=i.#r,this.#i=i.#i,this.rawOptions=i.rawOptions)}else{let e={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?``:t,n),this.#n=t,this.#e=mte(e.hiddenCaptures,e.transfers),this.#i=e.strategy,this.rawOptions=r??{}}i||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,r=this.lastIndex;if(this.#i===`clip_search`&&n&&r){this.lastIndex=0;let e=this.#a(t.slice(r));return e&&(pte(e,r,t,this.hasIndices),this.lastIndex+=r),e}return this.#a(t)}#a(e){this.#t.lastIndex=this.lastIndex;let t=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!t||!this.#e.size)return t;let n=[...t];t.length=1;let r;this.hasIndices&&(r=[...t.indices],t.indices.length=1);let i=[0];for(let e=1;e<n.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?i.push(null):(i.push(t.length),t.push(n[e]),this.hasIndices&&t.indices.push(r[e])),o&&n[e]!==void 0){let a=i[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(t[a]=n[e],this.hasIndices&&(t.indices[a]=r[e]),t.groups){this.#r||=hte(this.source);let i=this.#r.get(o);i&&(t.groups[i]=n[e],this.hasIndices&&(t.indices.groups[i]=r[e]))}}}return t}};function pte(e,t,n,r){if(e.index+=t,e.input=n,r){let n=e.indices;for(let e=0;e<n.length;e++){let r=n[e];r&&(n[e]=[r[0]+t,r[1]+t])}let r=n.groups;r&&Object.keys(r).forEach(e=>{let n=r[e];n&&(r[e]=[n[0]+t,n[1]+t])})}}function mte(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,r]of t)for(let t of r)Lx(n,t,{}).transferTo=e;return n}function hte(e){let t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map,r=0,i=0,a;for(;a=t.exec(e);){let{0:e,groups:{capture:t,name:o}}=a;e===`[`?r++:r?e===`]`&&r--:t&&(i++,o&&n.set(i,o))}return n}function gte(e,t){let n=_te(e,t);return n.options?new fte(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function _te(e,t){let n=Hx(t),r=nS(yb(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:qx}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=ES(r,n),a=Ex(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=gx(yx(a.pattern).pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),s={pattern:o.pattern,flags:`${n.hasIndices?`d`:``}${n.global?`g`:``}${i.flags}${i.options.disable.v?`u`:`v`}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw Error(`Lazy compilation requires subclass`)}else{let e=o.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(o.captureTransfers),i=r._strategy,a=s.pattern.length>=n.lazyCompileLength;(e.length||t.length||i||a)&&(s.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...i&&{strategy:i},...a&&{lazyCompile:a}})}return s}var HS=4294967295,vte=class{constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:HS,end:HS,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function yte(e,t){return gte(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function bte(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>yte(e,{target:t.target}),{createScanner(e){return new vte(e,t)},createString(e){return{content:e}}}}var xte=bte({forgiving:!0}),Ste=Object.fromEntries(Yv.flatMap(e=>(e.aliases??[]).map(t=>[t,e.id]))),US=new Set(Object.keys(Qv)),WS=e=>{let t=e.trim().toLowerCase();return Ste[t]||(US.has(t),t)},GS=new Map,KS=new Map,qS=new Map,JS=e=>typeof e==`string`?e:e.name??`custom`,Cte=(e,t)=>`${e}-${JS(t[0])}-${JS(t[1])}`,wte=(e,t,n)=>{let r=e.slice(0,100),i=e.length>100?e.slice(-100):``;return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${i}`},Tte=(e,t)=>{let n=Cte(e,t);if(GS.has(n))return GS.get(n);let r=Ty({themes:t,langs:[e],engine:xte});return GS.set(n,r),r};function Ete(e={}){let t=e.themes??[`github-light`,`github-dark`];return{name:`shiki`,type:`code-highlighter`,supportsLanguage(e){let t=WS(e);return US.has(t)},getSupportedLanguages(){return Array.from(US)},getThemes(){return t},highlight({code:e,language:t,themes:n},r){let i=WS(t),a=[JS(n[0]),JS(n[1])],o=wte(e,i,a);return KS.has(o)?KS.get(o):(r&&(qS.has(o)||qS.set(o,new Set),qS.get(o).add(r)),Tte(US.has(i)?i:`text`,n).then(t=>{let n=t.getLoadedLanguages().includes(i)?i:`text`,r=t.codeToTokens(e,{lang:n,themes:{light:a[0],dark:a[1]}});KS.set(o,r);let s=qS.get(o);if(s){for(let e of s)e(r);qS.delete(o)}}).catch(e=>{console.error(`[Streamdown Code] Failed to highlight code:`,e),qS.delete(o)}),null)}}}var YS=Ete(),XS=/[#.]/g;function Dte(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){XS.lastIndex=i;let e=XS.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function ZS(e,t,n){let r=n?jte(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Dte(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Ote(i))a.unshift(i);else for(let[t,n]of Object.entries(i))kte(e,o.properties,t,n)}for(let e of a)QS(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Ote(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function kte(e,t,n,r){let i=xg(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Xg(r):i.commaSeparated?Jg(r):i.commaOrSpaceSeparated?Xg(Jg(r).join(` `)):$S(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Ate(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push($S(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function QS(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)QS(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?QS(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function $S(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Xh(n)===Xh(t)))return!0}return n}function Ate(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function jte(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Mte=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),eC=ZS(Sg,`div`),tC=ZS(Cg,`g`,Mte),nC={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Nte(e,t){return rC(e,t||{})||{type:`root`,children:[]}}function rC(e,t){let n=Pte(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function Pte(e,t){switch(e.nodeType){case 1:return Rte(e,t);case 3:return Ite(e);case 8:return Lte(e);case 9:return iC(e,t);case 10:return Fte();case 11:return iC(e,t);default:return}}function iC(e,t){return{type:`root`,children:aC(e,t)}}function Fte(){return{type:`doctype`}}function Ite(e){return{type:`text`,value:e.nodeValue||``}}function Lte(e){return{type:`comment`,value:e.nodeValue||``}}function Rte(e,t){let n=e.namespaceURI,r=n===nC.svg?tC:eC,i=n===nC.html?e.tagName.toLowerCase():e.tagName,a=n===nC.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++c<o.length;)s[o[c]]=e.getAttribute(o[c])||``;return r(i,s,aC(a,t))}function aC(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=rC(n[i],t);e!==void 0&&r.push(e)}return r}var zte=new DOMParser;function Bte(e,t){return Nte(t?.fragment?Vte(e):zte.parseFromString(e,`text/html`))}function Vte(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var oC=(function(e,t,n){let r=lm(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),sC=(function(e){if(e==null)return Wte;if(typeof e==`string`)return Ute(e);if(typeof e==`object`)return Hte(e);if(typeof e==`function`)return cC(e);throw Error("Expected function, string, or array as `test`")});function Hte(e){let t=[],n=-1;for(;++n<e.length;)t[n]=sC(e[n]);return cC(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Ute(e){return cC(t);function t(t){return t.tagName===e}}function cC(e){return t;function t(t,n,r){return!!(Gte(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Wte(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function Gte(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var lC=/\n/g,uC=/[\t ]+/g,dC=sC(`br`),fC=sC($te),Kte=sC(`p`),pC=sC(`tr`),qte=sC([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,Qte,ene]),mC=sC(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function Jte(e,t){let n=t||{},r=`children`in e?e.children:[],i=mC(e),a=_C(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...gC(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...hC(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?dC(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
162
+ `.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function hC(e,t,n){return e.type===`element`?Yte(e,t,n):e.type===`text`?n.whitespace===`normal`?gC(e,n):Xte(e):[]}function Yte(e,t,n){let r=_C(e,n),i=e.children||[],a=-1,o=[];if(qte(e))return o;let s,c;for(dC(e)||pC(e)&&oC(t,e,pC)?c=`
163
+ `:Kte(e)?(s=2,c=2):mC(e)&&(s=1,c=1);++a<i.length;)o=o.concat(hC(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?dC(i[a+1]):c}));return fC(e)&&oC(t,e,fC)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function gC(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){lC.lastIndex=a;let e=lC.exec(n),i=e&&`index`in e?e.index:n.length;r.push(Zte(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function Xte(e){return[String(e.value)]}function Zte(e,t,n){let r=[],i=0,a;for(;i<e.length;){uC.lastIndex=i;let n=uC.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function _C(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function Qte(e){return!!(e.properties||{}).hidden}function $te(e){return e.tagName===`td`||e.tagName===`th`}function ene(e){return e.tagName===`dialog`&&!(e.properties||{}).open}var tne={},nne=[];function rne(e){let t=e||tne;return function(e,n){ym(e,`element`,function(e,r){let i=Array.isArray(e.properties.className)?e.properties.className:nne,a=i.includes(`language-math`),s=i.includes(`math-display`),c=i.includes(`math-inline`),l=s;if(!a&&!s&&!c)return;let u=r[r.length-1],d=e;if(e.tagName===`code`&&a&&u&&u.type===`element`&&u.tagName===`pre`&&(d=u,u=r[r.length-2],l=!0),!u)return;let f=Jte(d,{whitespace:`pre`}),p;try{p=o.renderToString(f,{...t,displayMode:l,throwOnError:!0})}catch(i){let a=i,s=a.name.toLowerCase();n.message(`Could not render math with KaTeX`,{ancestors:[...r,e],cause:a,place:e.position,ruleId:s,source:`rehype-katex`});try{p=o.renderToString(f,{...t,displayMode:l,strict:`ignore`,throwOnError:!1})}catch{p=[{type:`element`,tagName:`span`,properties:{className:[`katex-error`],style:`color:`+(t.errorColor||`#cc0000`),title:String(i)},children:[{type:`text`,value:f}]}]}}typeof p==`string`&&(p=Bte(p,{fragment:!0}).children);let m=u.children.indexOf(d);return u.children.splice(m,1,...p),vm})}}function vC(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function ine(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function ane(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
164
+ `,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(vC(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
165
+ `,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
166
+ `),i&&(c+=a.move(i+`
167
+ `)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}function yC(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return zp(r)?(e.enter(n),s(r)):t(r)}function s(r){return zp(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var one={tokenize:sne,concrete:!0,name:`mathFlow`},bC={tokenize:cne,partial:!0};function sne(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),yC(e,l,`whitespace`)(t))}function l(t){return t===null||Lp(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||Lp(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(bC,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?yC(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):Lp(t)?e.attempt(bC,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||Lp(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return yC(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),yC(e,c,`whitespace`)(t))}function c(r){return r===null||Lp(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function cne(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function lne(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:une,previous:dne,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):Lp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||Lp(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function une(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`mathTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function dne(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function fne(e){return{flow:{36:one},text:{36:lne(e)}}}var pne={};function mne(e){let t=this,n=e||pne,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(fne(n)),a.push(ine()),o.push(ane(n))}function hne(e={}){return{name:`katex`,type:`math`,remarkPlugin:[mne,{singleDollarTextMath:e.singleDollarTextMath??!1}],rehypePlugin:[rne,{errorColor:e.errorColor??`var(--color-muted-foreground)`}],getStyles(){return`katex/dist/katex.min.css`}}}var xC=hne(),SC=l(e=>{let{securityLevel:t}=S(),n=u(`body`);return t===`sandbox`&&(n=u((u(`#i${e}`).node()?.contentDocument??document).body)),n.select(`#${e}`)},`selectSvgElement`);function CC(e){return e==null}l(CC,`isNothing`);function wC(e){return typeof e==`object`&&!!e}l(wC,`isObject`);function TC(e){return Array.isArray(e)?e:CC(e)?[]:[e]}l(TC,`toArray`);function EC(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}l(EC,`extend`);function DC(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}l(DC,`repeat`);function OC(e){return e===0&&1/e==-1/0}l(OC,`isNegativeZero`);var kC={isNothing:CC,isObject:wC,toArray:TC,repeat:DC,isNegativeZero:OC,extend:EC};function AC(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
168
+
169
+ `+e.mark.snippet),r+` `+n):r}l(AC,`formatError`);function jC(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=AC(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}l(jC,`YAMLException$1`),jC.prototype=Object.create(Error.prototype),jC.prototype.constructor=jC,jC.prototype.toString=l(function(e){return this.name+`: `+AC(this,e)},`toString`);var MC=jC;function NC(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}l(NC,`getLine`);function PC(e,t){return kC.repeat(` `,t-e.length)+e}l(PC,`padStart`);function FC(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var s=``,c,l,u=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+u+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=NC(e.buffer,r[o-c],i[o-c],e.position-(r[o]-r[o-c]),d),s=kC.repeat(` `,t.indent)+PC((e.line-c+1).toString(),u)+` | `+l.str+`
170
+ `+s;for(l=NC(e.buffer,r[o],i[o],e.position,d),s+=kC.repeat(` `,t.indent)+PC((e.line+1).toString(),u)+` | `+l.str+`
171
+ `,s+=kC.repeat(`-`,t.indent+u+3+l.pos)+`^
172
+ `,c=1;c<=t.linesAfter&&!(o+c>=i.length);c++)l=NC(e.buffer,r[o+c],i[o+c],e.position-(r[o]-r[o+c]),d),s+=kC.repeat(` `,t.indent)+PC((e.line+c+1).toString(),u)+` | `+l.str+`
173
+ `;return s.replace(/\n$/,``)}l(FC,`makeSnippet`);var gne=FC,_ne=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],vne=[`scalar`,`sequence`,`mapping`];function IC(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}l(IC,`compileStyleAliases`);function LC(e,t){if(t||={},Object.keys(t).forEach(function(t){if(_ne.indexOf(t)===-1)throw new MC(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=IC(t.styleAliases||null),vne.indexOf(this.kind)===-1)throw new MC(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}l(LC,`Type$1`);var RC=LC;function zC(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}l(zC,`compileList`);function BC(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(l(r,`collectType`),t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}l(BC,`compileMap`);function VC(e){return this.extend(e)}l(VC,`Schema$1`),VC.prototype.extend=l(function(e){var t=[],n=[];if(e instanceof RC)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new MC(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);t.forEach(function(e){if(!(e instanceof RC))throw new MC(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(e.loadKind&&e.loadKind!==`scalar`)throw new MC(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(e.multi)throw new MC(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),n.forEach(function(e){if(!(e instanceof RC))throw new MC(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});var r=Object.create(VC.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=zC(r,`implicit`),r.compiledExplicit=zC(r,`explicit`),r.compiledTypeMap=BC(r.compiledImplicit,r.compiledExplicit),r},`extend`);var yne=new VC({explicit:[new RC(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:l(function(e){return e===null?``:e},`construct`)}),new RC(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:l(function(e){return e===null?[]:e},`construct`)}),new RC(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:l(function(e){return e===null?{}:e},`construct`)})]});function HC(e){if(e===null)return!0;var t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}l(HC,`resolveYamlNull`);function UC(){return null}l(UC,`constructYamlNull`);function WC(e){return e===null}l(WC,`isNull`);var bne=new RC(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:HC,construct:UC,predicate:WC,represent:{canonical:l(function(){return`~`},`canonical`),lowercase:l(function(){return`null`},`lowercase`),uppercase:l(function(){return`NULL`},`uppercase`),camelcase:l(function(){return`Null`},`camelcase`),empty:l(function(){return``},`empty`)},defaultStyle:`lowercase`});function GC(e){if(e===null)return!1;var t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}l(GC,`resolveYamlBoolean`);function KC(e){return e===`true`||e===`True`||e===`TRUE`}l(KC,`constructYamlBoolean`);function qC(e){return Object.prototype.toString.call(e)===`[object Boolean]`}l(qC,`isBoolean`);var xne=new RC(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:GC,construct:KC,predicate:qC,represent:{lowercase:l(function(e){return e?`true`:`false`},`lowercase`),uppercase:l(function(e){return e?`TRUE`:`FALSE`},`uppercase`),camelcase:l(function(e){return e?`True`:`False`},`camelcase`)},defaultStyle:`lowercase`});function JC(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}l(JC,`isHexCode`);function YC(e){return 48<=e&&e<=55}l(YC,`isOctCode`);function XC(e){return 48<=e&&e<=57}l(XC,`isDecCode`);function ZC(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i===`-`||i===`+`)&&(i=e[++n]),i===`0`){if(n+1===t)return!0;if(i=e[++n],i===`b`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(i!==`0`&&i!==`1`)return!1;r=!0}return r&&i!==`_`}if(i===`x`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!JC(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}if(i===`o`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!YC(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}}if(i===`_`)return!1;for(;n<t;n++)if(i=e[n],i!==`_`){if(!XC(e.charCodeAt(n)))return!1;r=!0}return!(!r||i===`_`)}l(ZC,`resolveYamlInteger`);function QC(e){var t=e,n=1,r;if(t.indexOf(`_`)!==-1&&(t=t.replace(/_/g,``)),r=t[0],(r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}l(QC,`constructYamlInteger`);function $C(e){return Object.prototype.toString.call(e)===`[object Number]`&&e%1==0&&!kC.isNegativeZero(e)}l($C,`isInteger`);var Sne=new RC(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:ZC,construct:QC,predicate:$C,represent:{binary:l(function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:l(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:l(function(e){return e.toString(10)},`decimal`),hexadecimal:l(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),Cne=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function ew(e){return!(e===null||!Cne.test(e)||e[e.length-1]===`_`)}l(ew,`resolveYamlFloat`);function tw(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}l(tw,`constructYamlFloat`);var wne=/^[-+]?[0-9]+e/;function nw(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(kC.isNegativeZero(e))return`-0.0`;return n=e.toString(10),wne.test(n)?n.replace(`e`,`.e`):n}l(nw,`representYamlFloat`);function rw(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||kC.isNegativeZero(e))}l(rw,`isFloat`);var Tne=new RC(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:ew,construct:tw,predicate:rw,represent:nw,defaultStyle:`lowercase`}),iw=yne.extend({implicit:[bne,xne,Sne,Tne]}),Ene=iw,aw=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),ow=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function sw(e){return e===null?!1:aw.exec(e)!==null||ow.exec(e)!==null}l(sw,`resolveYamlTimestamp`);function cw(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=aw.exec(e),t===null&&(t=ow.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}l(cw,`constructYamlTimestamp`);function lw(e){return e.toISOString()}l(lw,`representYamlTimestamp`);var Dne=new RC(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:sw,construct:cw,instanceOf:Date,represent:lw});function uw(e){return e===`<<`||e===null}l(uw,`resolveYamlMerge`);var One=new RC(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:uw}),dw=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
174
+ \r`;function fw(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=dw;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8==0}l(fw,`resolveYamlBinary`);function pw(e){var t,n,r=e.replace(/[\r\n=]/g,``),i=r.length,a=dw,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}l(pw,`constructYamlBinary`);function mw(e){var t=``,n=0,r,i,a=e.length,o=dw;for(r=0;r<a;r++)r%3==0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}l(mw,`representYamlBinary`);function hw(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}l(hw,`isBinary`);var kne=new RC(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:fw,construct:pw,predicate:hw,represent:mw}),Ane=Object.prototype.hasOwnProperty,jne=Object.prototype.toString;function gw(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],o=!1,jne.call(i)!==`[object Object]`)return!1;for(a in i)if(Ane.call(i,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}l(gw,`resolveYamlOmap`);function _w(e){return e===null?[]:e}l(_w,`constructYamlOmap`);var Mne=new RC(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:gw,construct:_w}),Nne=Object.prototype.toString;function vw(e){if(e===null)return!0;var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],Nne.call(r)!==`[object Object]`||(i=Object.keys(r),i.length!==1))return!1;a[t]=[i[0],r[i[0]]]}return!0}l(vw,`resolveYamlPairs`);function yw(e){if(e===null)return[];var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}l(yw,`constructYamlPairs`);var Pne=new RC(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:vw,construct:yw}),Fne=Object.prototype.hasOwnProperty;function bw(e){if(e===null)return!0;var t,n=e;for(t in n)if(Fne.call(n,t)&&n[t]!==null)return!1;return!0}l(bw,`resolveYamlSet`);function xw(e){return e===null?{}:e}l(xw,`constructYamlSet`);var Ine=new RC(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:bw,construct:xw}),Sw=Ene.extend({implicit:[Dne,One],explicit:[kne,Mne,Pne,Ine]}),Cw=Object.prototype.hasOwnProperty,ww=1,Tw=2,Ew=3,Dw=4,Ow=1,Lne=2,kw=3,Rne=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,zne=/[\x85\u2028\u2029]/,Bne=/[,\[\]\{\}]/,Aw=/^(?:!|!!|![a-z\-]+!)$/i,jw=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Mw(e){return Object.prototype.toString.call(e)}l(Mw,`_class`);function Nw(e){return e===10||e===13}l(Nw,`is_EOL`);function Pw(e){return e===9||e===32}l(Pw,`is_WHITE_SPACE`);function Fw(e){return e===9||e===32||e===10||e===13}l(Fw,`is_WS_OR_EOL`);function Iw(e){return e===44||e===91||e===93||e===123||e===125}l(Iw,`is_FLOW_INDICATOR`);function Lw(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}l(Lw,`fromHexCode`);function Rw(e){return e===120?2:e===117?4:e===85?8:0}l(Rw,`escapedHexLen`);function zw(e){return 48<=e&&e<=57?e-48:-1}l(zw,`fromDecimalCode`);function Bw(e){return e===48?`\0`:e===97?`\x07`:e===98?`\b`:e===116||e===9?` `:e===110?`
175
+ `:e===118?`\v`:e===102?`\f`:e===114?`\r`:e===101?`\x1B`:e===32?` `:e===34?`"`:e===47?`/`:e===92?`\\`:e===78?`…`:e===95?`\xA0`:e===76?`\u2028`:e===80?`\u2029`:``}l(Bw,`simpleEscapeSequence`);function Vw(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}l(Vw,`charFromCodepoint`);function Hw(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}l(Hw,`setProperty`);var Uw=Array(256),Ww=Array(256);for(Gw=0;Gw<256;Gw++)Uw[Gw]=+!!Bw(Gw),Ww[Gw]=Bw(Gw);var Gw;function Kw(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Sw,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}l(Kw,`State$1`);function qw(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=gne(n),new MC(t,n)}l(qw,`generateError`);function Jw(e,t){throw qw(e,t)}l(Jw,`throwError`);function Yw(e,t){e.onWarning&&e.onWarning.call(null,qw(e,t))}l(Yw,`throwWarning`);var Xw={YAML:l(function(e,t,n){var r,i,a;e.version!==null&&Jw(e,`duplication of %YAML directive`),n.length!==1&&Jw(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&Jw(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&Jw(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&Yw(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:l(function(e,t,n){var r,i;n.length!==2&&Jw(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],Aw.test(r)||Jw(e,`ill-formed tag handle (first argument) of the TAG directive`),Cw.call(e.tagMap,r)&&Jw(e,`there is a previously declared suffix for "`+r+`" tag handle`),jw.test(i)||Jw(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{Jw(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i},`handleTagDirective`)};function Zw(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)o=s.charCodeAt(i),o===9||32<=o&&o<=1114111||Jw(e,`expected valid JSON character`);else Rne.test(s)&&Jw(e,`the stream contains non-printable characters`);e.result+=s}}l(Zw,`captureSegment`);function Qw(e,t,n,r){var i,a,o,s;for(kC.isObject(n)||Jw(e,`cannot merge mappings; the provided source object is unacceptable`),i=Object.keys(n),o=0,s=i.length;o<s;o+=1)a=i[o],Cw.call(t,a)||(Hw(t,a,n[a]),r[a]=!0)}l(Qw,`mergeMappings`);function $w(e,t,n,r,i,a,o,s,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&Jw(e,`nested arrays are not supported inside keys`),typeof i==`object`&&Mw(i[l])===`[object Object]`&&(i[l]=`[object Object]`);if(typeof i==`object`&&Mw(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)Qw(e,t,a[l],n);else Qw(e,t,a,n);else !e.json&&!Cw.call(n,i)&&Cw.call(t,i)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,Jw(e,`duplicated mapping key`)),Hw(t,i,a),delete n[i];return t}l($w,`storeMappingPair`);function eT(e){var t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Jw(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}l(eT,`readLineBreak`);function tT(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Pw(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Nw(i))for(eT(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Yw(e,`deficient indentation`),r}l(tT,`skipSeparationSpace`);function nT(e){var t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Fw(n)))}l(nT,`testDocumentSeparator`);function rT(e,t){t===1?e.result+=` `:t>1&&(e.result+=kC.repeat(`
176
+ `,t-1))}l(rT,`writeFoldedLines`);function iT(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(Fw(p)||Iw(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Fw(i)||n&&Iw(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Fw(i)||n&&Iw(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),Fw(r))break}else if(e.position===e.lineStart&&nT(e)||n&&Iw(p))break;else if(Nw(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,tT(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(Zw(e,a,o,!1),rT(e,e.line-c),a=o=e.position,!1),Pw(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Zw(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}l(iT,`readPlainScalar`);function aT(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Zw(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else Nw(n)?(Zw(e,r,i,!0),rT(e,tT(e,!1,t)),r=i=e.position):e.position===e.lineStart&&nT(e)?Jw(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);Jw(e,`unexpected end of the stream within a single quoted scalar`)}l(aT,`readSingleQuotedScalar`);function oT(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return Zw(e,n,e.position,!0),e.position++,!0;else if(s===92){if(Zw(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),Nw(s))tT(e,!1,t);else if(s<256&&Uw[s])e.result+=Ww[s],e.position++;else if((o=Rw(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=Lw(s))>=0?a=(a<<4)+o:Jw(e,`expected hexadecimal character`);e.result+=Vw(a),e.position++}else Jw(e,`unknown escape sequence`);n=r=e.position}else Nw(s)?(Zw(e,n,r,!0),rT(e,tT(e,!1,t)),n=r=e.position):e.position===e.lineStart&&nT(e)?Jw(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);Jw(e,`unexpected end of the stream within a double quoted scalar`)}l(oT,`readDoubleQuotedScalar`);function sT(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(tT(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&Jw(e,`expected the node content, but found ','`):Jw(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),Fw(l)&&(d=f=!0,e.position++,tT(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,mT(e,t,ww,!1,!0),g=e.tag,h=e.result,tT(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),tT(e,!0,t),mT(e,t,ww,!1,!0),_=e.result),p?$w(e,s,m,g,h,_,r,i,a):d?s.push($w(e,null,m,g,h,_,r,i,a)):s.push(h),tT(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}Jw(e,`unexpected end of the stream within a flow collection`)}l(sT,`readFlowCollection`);function cT(e,t){var n,r,i=Ow,a=!1,o=!1,s=t,c=0,l=!1,u,d=e.input.charCodeAt(e.position);if(d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)Ow===i?i=d===43?kw:Lne:Jw(e,`repeat of a chomping mode identifier`);else if((u=zw(d))>=0)u===0?Jw(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?Jw(e,`repeat of an indentation width identifier`):(s=t+u-1,o=!0);else break;if(Pw(d)){do d=e.input.charCodeAt(++e.position);while(Pw(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Nw(d)&&d!==0)}for(;d!==0;){for(eT(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),Nw(d)){c++;continue}if(e.lineIndent<s){i===kw?e.result+=kC.repeat(`
177
+ `,a?1+c:c):i===Ow&&a&&(e.result+=`
178
+ `);break}for(r?Pw(d)?(l=!0,e.result+=kC.repeat(`
179
+ `,a?1+c:c)):l?(l=!1,e.result+=kC.repeat(`
180
+ `,c+1)):c===0?a&&(e.result+=` `):e.result+=kC.repeat(`
181
+ `,c):e.result+=kC.repeat(`
182
+ `,a?1+c:c),a=!0,o=!0,c=0,n=e.position;!Nw(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Zw(e,n,e.position,!1)}return!0}l(cT,`readBlockScalar`);function lT(e,t){var n,r=e.tag,i=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Jw(e,`tab characters must not be used in indentation`)),!(c!==45||(o=e.input.charCodeAt(e.position+1),!Fw(o))));){if(s=!0,e.position++,tT(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,mT(e,t,Ew,!1,!0),a.push(e.result),tT(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)Jw(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind=`sequence`,e.result=a,!0):!1}l(lT,`readBlockSequence`);function uT(e,t,n){var r,i,a,o,s,c,l=e.tag,u=e.anchor,d={},f=Object.create(null),p=null,m=null,h=null,g=!1,_=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Jw(e,`tab characters must not be used in indentation`)),r=e.input.charCodeAt(e.position+1),a=e.line,(v===63||v===58)&&Fw(r))v===63?(g&&($w(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!0,i=!0):g?(g=!1,i=!0):Jw(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=r;else{if(o=e.line,s=e.lineStart,c=e.position,!mT(e,n,Tw,!1,!0))break;if(e.line===a){for(v=e.input.charCodeAt(e.position);Pw(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),Fw(v)||Jw(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&($w(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!1,i=!1,p=e.tag,m=e.result;else if(_)Jw(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=l,e.anchor=u,!0}else if(_)Jw(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=l,e.anchor=u,!0}if((e.line===a||e.lineIndent>t)&&(g&&(o=e.line,s=e.lineStart,c=e.position),mT(e,t,Dw,!0,i)&&(g?m=e.result:h=e.result),g||($w(e,d,f,p,m,h,o,s,c),p=m=h=null),tT(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)Jw(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&$w(e,d,f,p,m,null,o,s,c),_&&(e.tag=l,e.anchor=u,e.kind=`mapping`,e.result=d),_}l(uT,`readBlockMapping`);function dT(e){var t,n=!1,r=!1,i,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;if(e.tag!==null&&Jw(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i=`!!`,o=e.input.charCodeAt(++e.position)):i=`!`,t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):Jw(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!Fw(o);)o===33&&(r?Jw(e,`tag suffix cannot contain exclamation marks`):(i=e.input.slice(t-1,e.position+1),Aw.test(i)||Jw(e,`named tag handle cannot contain such characters`),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),Bne.test(a)&&Jw(e,`tag suffix cannot contain flow indicator characters`)}a&&!jw.test(a)&&Jw(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{Jw(e,`tag name is malformed: `+a)}return n?e.tag=a:Cw.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i===`!`?e.tag=`!`+a:i===`!!`?e.tag=`tag:yaml.org,2002:`+a:Jw(e,`undeclared tag handle "`+i+`"`),!0}l(dT,`readTagProperty`);function fT(e){var t,n=e.input.charCodeAt(e.position);if(n!==38)return!1;for(e.anchor!==null&&Jw(e,`duplication of an anchor property`),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Fw(n)&&!Iw(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Jw(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(t,e.position),!0}l(fT,`readAnchorProperty`);function pT(e){var t,n,r=e.input.charCodeAt(e.position);if(r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Fw(r)&&!Iw(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Jw(e,`name of an alias node must contain at least one character`),n=e.input.slice(t,e.position),Cw.call(e.anchorMap,n)||Jw(e,`unidentified alias "`+n+`"`),e.result=e.anchorMap[n],tT(e,!0,-1),!0}l(pT,`readAlias`);function mT(e,t,n,r,i){var a,o,s,c=1,l=!1,u=!1,d,f,p,m,h,g;if(e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=Dw===n||Ew===n,r&&tT(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;dT(e)||fT(e);)tT(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&=l||i,(c===1||Dw===n)&&(h=ww===n||Tw===n?t:t+1,g=e.position-e.lineStart,c===1?s&&(lT(e,g)||uT(e,g,h))||sT(e,h)?u=!0:(o&&cT(e,h)||aT(e,h)||oT(e,h)?u=!0:pT(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&Jw(e,`alias node should not have any properties`)):iT(e,h,ww===n)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&lT(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===`?`){for(e.result!==null&&e.kind!==`scalar`&&Jw(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`),d=0,f=e.implicitTypes.length;d<f;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==`!`){if(Cw.call(e.typeMap[e.kind||`fallback`],e.tag))m=e.typeMap[e.kind||`fallback`][e.tag];else for(m=null,p=e.typeMap.multi[e.kind||`fallback`],d=0,f=p.length;d<f;d+=1)if(e.tag.slice(0,p[d].tag.length)===p[d].tag){m=p[d];break}m||Jw(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&m.kind!==e.kind&&Jw(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+m.kind+`", not "`+e.kind+`"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Jw(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}l(mT,`composeNode`);function hT(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(tT(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!Fw(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&Jw(e,`directive name must not be less than one character in length`);o!==0;){for(;Pw(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Nw(o));break}if(Nw(o))break;for(n=e.position;o!==0&&!Fw(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&eT(e),Cw.call(Xw,r)?Xw[r](e,r,i):Yw(e,`unknown document directive "`+r+`"`)}if(tT(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,tT(e,!0,-1)):a&&Jw(e,`directives end mark is expected`),mT(e,e.lineIndent-1,Dw,!1,!0),tT(e,!0,-1),e.checkLineBreaks&&zne.test(e.input.slice(t,e.position))&&Yw(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&nT(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,tT(e,!0,-1));return}if(e.position<e.length-1)Jw(e,`end of the stream or a document separator is expected`);else return}l(hT,`readDocument`);function gT(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
183
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new Kw(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,Jw(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)hT(n);return n.documents}l(gT,`loadDocuments`);function _T(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);var r=gT(e,n);if(typeof t!=`function`)return r;for(var i=0,a=r.length;i<a;i+=1)t(r[i])}l(_T,`loadAll$1`);function vT(e,t){var n=gT(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new MC(`expected a single document in the stream, but found more`)}}l(vT,`load$1`);var yT={loadAll:_T,load:vT},bT=Object.prototype.toString,xT=Object.prototype.hasOwnProperty,ST=65279,Vne=9,CT=10,Hne=13,Une=32,Wne=33,Gne=34,wT=35,Kne=37,qne=38,Jne=39,TT=42,ET=44,Yne=45,DT=58,Xne=61,OT=62,kT=63,AT=64,jT=91,MT=93,NT=96,PT=123,FT=124,IT=125,LT={};LT[0]=`\\0`,LT[7]=`\\a`,LT[8]=`\\b`,LT[9]=`\\t`,LT[10]=`\\n`,LT[11]=`\\v`,LT[12]=`\\f`,LT[13]=`\\r`,LT[27]=`\\e`,LT[34]=`\\"`,LT[92]=`\\\\`,LT[133]=`\\N`,LT[160]=`\\_`,LT[8232]=`\\L`,LT[8233]=`\\P`;var Zne=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],Qne=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function RT(e,t){var n,r,i,a,o,s,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&xT.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s;return n}l(RT,`compileStyleMap`);function zT(e){var t=e.toString(16).toUpperCase(),n,r;if(e<=255)n=`x`,r=2;else if(e<=65535)n=`u`,r=4;else if(e<=4294967295)n=`U`,r=8;else throw new MC(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+n+kC.repeat(`0`,r-t.length)+t}l(zT,`encodeHex`);var $ne=1,BT=2;function VT(e){this.schema=e.schema||Sw,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=kC.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=RT(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===`"`?BT:$ne,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==`function`?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}l(VT,`State`);function HT(e,t){for(var n=kC.repeat(` `,t),r=0,i=-1,a=``,o,s=e.length;r<s;)i=e.indexOf(`
184
+ `,r),i===-1?(o=e.slice(r),r=s):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
185
+ `&&(a+=n),a+=o;return a}l(HT,`indentString`);function UT(e,t){return`
186
+ `+kC.repeat(` `,e.indent*t)}l(UT,`generateNextLine`);function WT(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}l(WT,`testImplicitResolving`);function GT(e){return e===Une||e===Vne}l(GT,`isWhitespace`);function KT(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==ST||65536<=e&&e<=1114111}l(KT,`isPrintable`);function qT(e){return KT(e)&&e!==ST&&e!==Hne&&e!==CT}l(qT,`isNsCharOrWhitespace`);function JT(e,t,n){var r=qT(e),i=r&&!GT(e);return(n?r:r&&e!==ET&&e!==jT&&e!==MT&&e!==PT&&e!==IT)&&e!==wT&&!(t===DT&&!i)||qT(t)&&!GT(t)&&e===wT||t===DT&&i}l(JT,`isPlainSafe`);function YT(e){return KT(e)&&e!==ST&&!GT(e)&&e!==Yne&&e!==kT&&e!==DT&&e!==ET&&e!==jT&&e!==MT&&e!==PT&&e!==IT&&e!==wT&&e!==qne&&e!==TT&&e!==Wne&&e!==FT&&e!==Xne&&e!==OT&&e!==Jne&&e!==Gne&&e!==Kne&&e!==AT&&e!==NT}l(YT,`isPlainSafeFirst`);function XT(e){return!GT(e)&&e!==DT}l(XT,`isPlainSafeLast`);function ZT(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}l(ZT,`codePointAt`);function QT(e){return/^\n* /.test(e)}l(QT,`needIndentIndicator`);var $T=1,eE=2,tE=3,nE=4,rE=5;function iE(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=YT(ZT(e,0))&&XT(ZT(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=ZT(e,c),!KT(l))return rE;h&&=JT(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=ZT(e,c),l===CT)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!KT(l))return rE;h&&=JT(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?$T:a===BT?rE:eE:n>9&&QT(e)?rE:o?a===BT?rE:eE:f?nE:tE}l(iE,`chooseScalarStyle`);function aE(e,t,n,r,i){e.dump=(function(){if(t.length===0)return e.quotingType===BT?`""`:`''`;if(!e.noCompatMode&&(Zne.indexOf(t)!==-1||Qne.test(t)))return e.quotingType===BT?`"`+t+`"`:`'`+t+`'`;var a=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=r||e.flowLevel>-1&&n>=e.flowLevel;function c(t){return WT(e,t)}switch(l(c,`testAmbiguity`),iE(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!r,i)){case $T:return t;case eE:return`'`+t.replace(/'/g,`''`)+`'`;case tE:return`|`+oE(t,e.indent)+sE(HT(t,a));case nE:return`>`+oE(t,e.indent)+sE(HT(cE(t,o),a));case rE:return`"`+uE(t)+`"`;default:throw new MC(`impossible error: invalid scalar style`)}})()}l(aE,`writeScalar`);function oE(e,t){var n=QT(e)?String(t):``,r=e[e.length-1]===`
187
+ `;return n+(r&&(e[e.length-2]===`
188
+ `||e===`
189
+ `)?`+`:r?``:`-`)+`
190
+ `}l(oE,`blockHeader`);function sE(e){return e[e.length-1]===`
191
+ `?e.slice(0,-1):e}l(sE,`dropEndingNewline`);function cE(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var r=e.indexOf(`
192
+ `);return r=r===-1?e.length:r,n.lastIndex=r,lE(e.slice(0,r),t)})(),i=e[0]===`
193
+ `||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?`
194
+ `:``)+lE(c,t),i=a}return r}l(cE,`foldString`);function lE(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
195
+ `+e.slice(i,a),i=a+1),o=s;return c+=`
196
+ `,e.length-i>t&&o>i?c+=e.slice(i,o)+`
197
+ `+e.slice(o+1):c+=e.slice(i),c.slice(1)}l(lE,`foldLine`);function uE(e){for(var t=``,n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=ZT(e,i),r=LT[n],!r&&KT(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||zT(n);return t}l(uE,`escapeString`);function dE(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a<o;a+=1)s=n[a],e.replacer&&(s=e.replacer.call(n,String(a),s)),(gE(e,t,s,!1,!1)||s===void 0&&gE(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump);e.tag=i,e.dump=`[`+r+`]`}l(dE,`writeFlowSequence`);function fE(e,t,n,r){var i=``,a=e.tag,o,s,c;for(o=0,s=n.length;o<s;o+=1)c=n[o],e.replacer&&(c=e.replacer.call(n,String(o),c)),(gE(e,t+1,c,!0,!0,!1,!0)||c===void 0&&gE(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=UT(e,t)),e.dump&&CT===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump);e.tag=a,e.dump=i||`[]`}l(fE,`writeBlockSequence`);function pE(e,t,n){var r=``,i=e.tag,a=Object.keys(n),o,s,c,l,u;for(o=0,s=a.length;o<s;o+=1)u=``,r!==``&&(u+=`, `),e.condenseFlow&&(u+=`"`),c=a[o],l=n[c],e.replacer&&(l=e.replacer.call(n,c,l)),gE(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),gE(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}l(pE,`writeFlowMapping`);function mE(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,u,d,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new MC(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s<c;s+=1)f=``,(!r||i!==``)&&(f+=UT(e,t)),l=o[s],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),gE(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024,d&&(e.dump&&CT===e.dump.charCodeAt(0)?f+=`?`:f+=`? `),f+=e.dump,d&&(f+=UT(e,t)),gE(e,t+1,u,!0,d)&&(e.dump&&CT===e.dump.charCodeAt(0)?f+=`:`:f+=`: `,f+=e.dump,i+=f));e.tag=a,e.dump=i||`{}`}l(mE,`writeBlockMapping`);function hE(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t==`object`&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=`?`,s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,bT.call(s.represent)===`[object Function]`)r=s.represent(t,c);else if(xT.call(s.represent,c))r=s.represent[c](t,c);else throw new MC(`!<`+s.tag+`> tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}l(hE,`detectType`);function gE(e,t,n,r,i,a,o){e.tag=null,e.dump=n,hE(e,n,!1)||hE(e,n,!0);var s=bT.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var u=s===`[object Object]`||s===`[object Array]`,d,f;if(u&&(d=e.duplicates.indexOf(n),f=d!==-1),(e.tag!==null&&e.tag!==`?`||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[d])e.dump=`*ref_`+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(mE(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(pE(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?fE(e,t-1,e.dump,i):fE(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(dE(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&aE(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new MC(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}l(gE,`writeNode`);function _E(e,t){var n=[],r=[],i,a;for(vE(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=Array(a)}l(_E,`getDuplicateReferences`);function vE(e,t,n){var r,i,a;if(typeof e==`object`&&e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)vE(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)vE(e[r[i]],t,n)}l(vE,`inspectNode`);function yE(e,t){t||={};var n=new VT(t);n.noRefs||_E(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),gE(n,0,r,!0,!0)?n.dump+`
198
+ `:``}l(yE,`dump$1`);var ere={dump:yE};function tre(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}l(tre,`renamed`);var bE=iw,xE=yT.load;yT.loadAll,ere.dump;var nre={common:A,getConfig:P,insertCluster:Se,insertEdge:Ee,insertEdgeLabel:De,insertMarkers:Te,insertNode:xe,interpolateToCurve:se,labelHelper:Ce,log:c,positionEdgeLabel:we},SE={},CE=l(e=>{for(let t of e)SE[t.name]=t},`registerLayoutLoaders`);l(()=>{CE([{name:`dagre`,loader:l(async()=>await a(()=>import(`./dagre-KV5264BT-D-09dDzP.js`),__vite__mapDeps([102,103,104,1,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123])),`loader`)},{name:`cose-bilkent`,loader:l(async()=>await a(()=>import(`./cose-bilkent-S5V4N54A-DX__-T-O.js`),__vite__mapDeps([124,1,125,104])),`loader`)}])},`registerDefaultLayoutLoaders`)();var rre=l(async(e,t)=>{if(!(e.layoutAlgorithm in SE))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=SE[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,nre,{algorithm:n.algorithm})},`render`),ire=l((e=``,{fallback:t=`dagre`}={})=>{if(e in SE)return e;if(t in SE)return c.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`),wE=`comm`,TE=`rule`,EE=`decl`,DE=`@import`,OE=`@namespace`,kE=`@keyframes`,AE=`@layer`,jE=Math.abs,ME=String.fromCharCode;function NE(e){return e.trim()}function PE(e,t,n){return e.replace(t,n)}function FE(e,t){return e.charCodeAt(t)|0}function IE(e,t,n){return e.slice(t,n)}function LE(e){return e.length}function RE(e){return e.length}function zE(e,t){return t.push(e),e}var BE=1,VE=1,HE=0,UE=0,WE=0,GE=``;function KE(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:BE,column:VE,length:o,return:``,siblings:s}}function qE(){return WE}function JE(){return WE=UE>0?FE(GE,--UE):0,VE--,WE===10&&(VE=1,BE--),WE}function YE(){return WE=UE<HE?FE(GE,UE++):0,VE++,WE===10&&(VE=1,BE++),WE}function XE(){return FE(GE,UE)}function ZE(){return UE}function QE(e,t){return IE(GE,e,t)}function $E(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function eD(e){return BE=VE=1,HE=LE(GE=e),UE=0,[]}function tD(e){return GE=``,e}function nD(e){return NE(QE(UE-1,aD(e===91?e+2:e===40?e+1:e)))}function rD(e){for(;(WE=XE())&&WE<33;)YE();return $E(e)>2||$E(WE)>3?``:` `}function iD(e,t){for(;--t&&YE()&&!(WE<48||WE>102||WE>57&&WE<65||WE>70&&WE<97););return QE(e,ZE()+(t<6&&XE()==32&&YE()==32))}function aD(e){for(;YE();)switch(WE){case e:return UE;case 34:case 39:e!==34&&e!==39&&aD(WE);break;case 40:e===41&&aD(e);break;case 92:YE();break}return UE}function oD(e,t){for(;YE()&&e+WE!==57&&!(e+WE===84&&XE()===47););return`/*`+QE(t,UE-1)+`*`+ME(e===47?e:YE())}function sD(e){for(;!$E(XE());)YE();return QE(e,UE)}function are(e){return tD(cD(``,null,null,null,[``],e=eD(e),0,[0],e))}function cD(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=YE()){case 40:m!=108&&FE(w,d-1)==58?(v++,w+=`(`):w+=nD(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=nD(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=ME(y);break}w+=rD(m);break;case 92:w+=iD(ZE()-1,7);continue;case 47:switch(XE()){case 42:case 47:zE(ore(oD(YE(),ZE()),t,n,c),c),($E(m||1)==5||$E(XE()||1)==5)&&LE(w)&&IE(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=LE(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=ME(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=PE(w,/\f/g,``)),p>0&&(LE(w)-d||h===0)&&zE(p>32?uD(w+`;`,r,n,d-1,c):uD(PE(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(zE(C=lD(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)cD(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(FE(w,3)===110)break;case 108:if(FE(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?cD(e,C,C,r&&zE(lD(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):cD(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+LE(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&JE()==125)continue}switch(w+=ME(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(LE(w)-1)*_,_=1;break;case 64:XE()===45&&(w+=nD(YE())),f=XE(),u=d=LE(b=w+=sD(ZE())),y++;break;case 45:m===45&&LE(w)==2&&(h=0)}}return a}function lD(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=RE(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=IE(e,f+1,f=jE(g=o[h])),b=e;v<m;++v)(b=NE(g>0?p[v]+` `+y:PE(y,/&\f/g,p[v])))&&(c[_++]=b);return KE(e,t,n,i===0?TE:s,c,l,u,d)}function ore(e,t,n,r){return KE(e,t,n,wE,ME(qE()),IE(e,2,-2),0,r)}function uD(e,t,n,r,i){return KE(e,t,n,EE,IE(e,0,r),IE(e,r+1,-1),r,i)}function dD(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function sre(e,t,n,r){switch(e.type){case AE:if(e.children.length)break;case DE:case OE:case EE:return e.return=e.return||e.value;case wE:return``;case kE:return e.return=e.value+`{`+dD(e.children,r)+`}`;case TE:if(!LE(e.value=e.props.join(`,`)))return``}return LE(n=dD(e.children,r))?e.return=e.value+`{`+n+`}`:``}var cre=he(Object.keys,Object),lre=Object.prototype.hasOwnProperty;function fD(e){if(!ge(e))return cre(e);var t=[];for(var n in Object(e))lre.call(e,n)&&n!=`constructor`&&t.push(n);return t}var pD=ue(le,`DataView`),mD=ue(le,`Promise`),hD=ue(le,`Set`),gD=ue(le,`WeakMap`),_D=`[object Map]`,ure=`[object Object]`,vD=`[object Promise]`,yD=`[object Set]`,bD=`[object WeakMap]`,xD=`[object DataView]`,dre=I(pD),fre=I(de),pre=I(mD),mre=I(hD),hre=I(gD),SD=ce;(pD&&SD(new pD(new ArrayBuffer(1)))!=xD||de&&SD(new de)!=_D||mD&&SD(mD.resolve())!=vD||hD&&SD(new hD)!=yD||gD&&SD(new gD)!=bD)&&(SD=function(e){var t=ce(e),n=t==ure?e.constructor:void 0,r=n?I(n):``;if(r)switch(r){case dre:return xD;case fre:return _D;case pre:return vD;case mre:return yD;case hre:return bD}return t});var CD=SD,gre=`[object Map]`,_re=`[object Set]`,vre=Object.prototype.hasOwnProperty;function wD(e){if(e==null)return!0;if(fe(e)&&(ve(e)||typeof e==`string`||typeof e.splice==`function`||_e(e)||me(e)||pe(e)))return!e.length;var t=CD(e);if(t==gre||t==_re)return!e.size;if(ge(e))return!fD(e).length;for(var n in e)if(vre.call(e,n))return!1;return!0}var TD=`c4`,ED={id:TD,detector:l(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./c4Diagram-AHTNJAMY-DekoM4-h.js`);return{diagram:e}},__vite__mapDeps([126,106,1,104,105,107,108,109,127]));return{id:TD,diagram:e}},`loader`)},DD=`flowchart`,OD={id:DD,detector:l((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./flowDiagram-DWJPFMVM-BzNKfuB7.js`);return{diagram:e}},__vite__mapDeps([128,103,104,1,105,106,107,108,109,129,130,115,116,117,118,119,131,120,121,122,123,132,127]));return{id:DD,diagram:e}},`loader`)},kD=`flowchart-v2`,AD={id:kD,detector:l((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./flowDiagram-DWJPFMVM-BzNKfuB7.js`);return{diagram:e}},__vite__mapDeps([128,103,104,1,105,106,107,108,109,129,130,115,116,117,118,119,131,120,121,122,123,132,127]));return{id:kD,diagram:e}},`loader`)},jD=`er`,MD={id:jD,detector:l(e=>/^\s*erDiagram/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./erDiagram-SMLLAGMA-ByIgp8Eo.js`);return{diagram:e}},__vite__mapDeps([133,103,104,1,105,106,107,108,109,129,130,115,116,117,118,119,131,120,121,122,123]));return{id:jD,diagram:e}},`loader`)},ND=`gitGraph`,PD={id:ND,detector:l(e=>/^\s*gitGraph/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-UUTBAWPF-BsxSqc1_.js`);return{diagram:e}},__vite__mapDeps([134,135,108,136,1,112,109,113,137,138,139,140,141,142,143,144,145,104,105,106,107,146,147]));return{id:ND,diagram:e}},`loader`)},FD=`gantt`,ID={id:FD,detector:l(e=>/^\s*gantt/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./ganttDiagram-T4ZO3ILL-DlhOhzIY.js`);return{diagram:e}},__vite__mapDeps([148,1,106,149,104,150,151,105,107,108,109]));return{id:FD,diagram:e}},`loader`)},LD=`info`,RD={id:LD,detector:l(e=>/^\s*info/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./infoDiagram-42DDH7IO-D3DzEWgU.js`);return{diagram:e}},__vite__mapDeps([152,135,108,136,1,112,109,113,137,138,139,140,141,142,143,144,145,104,107]));return{id:LD,diagram:e}},`loader`)},zD=`pie`,BD={id:zD,detector:l(e=>/^\s*pie/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./pieDiagram-DEJITSTG-loypmzPR.js`);return{diagram:e}},__vite__mapDeps([153,106,1,135,108,136,112,109,113,137,138,139,140,141,142,143,144,145,104,122,154,151,155,123,105,107,146]));return{id:zD,diagram:e}},`loader`)},VD=`quadrantChart`,HD={id:VD,detector:l(e=>/^\s*quadrantChart/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./quadrantDiagram-34T5L4WZ-DZ4KpC1p.js`);return{diagram:e}},__vite__mapDeps([156,149,104,1,150,151,107,108]));return{id:VD,diagram:e}},`loader`)},UD=`xychart`,WD={id:UD,detector:l(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./xychartDiagram-5P7HB3ND-BciTYgBN.js`);return{diagram:e}},__vite__mapDeps([157,103,104,1,105,106,107,108,109,149,150,151,154,121,122,123]));return{id:UD,diagram:e}},`loader`)},GD=`requirement`,KD={id:GD,detector:l(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./requirementDiagram-MS252O5E-g6mOII2w.js`);return{diagram:e}},__vite__mapDeps([158,103,104,1,105,106,107,108,109,130,115,116,117,118,119,131,120,121,122,123]));return{id:GD,diagram:e}},`loader`)},qD=`sequence`,JD={id:qD,detector:l(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./sequenceDiagram-FGHM5R23-DdcFzOps.js`);return{diagram:e}},__vite__mapDeps([159,106,1,104,105,107,108,109,147,127]));return{id:qD,diagram:e}},`loader`)},YD=`class`,XD={id:YD,detector:l((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./classDiagram-6PBFFD2Q-DJG5iG41.js`);return{diagram:e}},__vite__mapDeps([160,103,104,1,105,106,107,108,109,161,130,131,132,127,115,116,117,118,119,120,121,122,123]));return{id:YD,diagram:e}},`loader`)},ZD=`classDiagram`,QD={id:ZD,detector:l((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./classDiagram-v2-HSJHXN6E-Bb0dA9zB.js`);return{diagram:e}},__vite__mapDeps([162,103,104,1,105,106,107,108,109,161,130,131,132,127,115,116,117,118,119,120,121,122,123]));return{id:ZD,diagram:e}},`loader`)},$D=`state`,eO={id:$D,detector:l((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./stateDiagram-FHFEXIEX-aPTzDIYk.js`);return{diagram:e}},__vite__mapDeps([163,103,104,1,105,106,107,108,109,121,122,123,110,111,112,113,130,115,116,117,118,119,131,120,164]));return{id:$D,diagram:e}},`loader`)},tO=`stateDiagram`,nO={id:tO,detector:l((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-QKLJ7IA2-FcVD5MeB.js`);return{diagram:e}},__vite__mapDeps([165,103,104,1,105,106,107,108,109,130,115,116,117,118,119,131,120,121,122,123,164]));return{id:tO,diagram:e}},`loader`)},rO=`journey`,iO={id:rO,detector:l(e=>/^\s*journey/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./journeyDiagram-VCZTEJTY-BW4urxP0.js`);return{diagram:e}},__vite__mapDeps([166,104,1,155,106,122,107,108,132,127]));return{id:rO,diagram:e}},`loader`)},aO={draw:l((e,t,n)=>{c.debug(`rendering svg for syntax error
199
+ `);let r=SC(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),C(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},oO=aO,sO={db:{},renderer:aO,parser:{parse:l(()=>{},`parse`)}},cO=`flowchart-elk`,lO={id:cO,detector:l((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./flowDiagram-DWJPFMVM-BzNKfuB7.js`);return{diagram:e}},__vite__mapDeps([128,103,104,1,105,106,107,108,109,129,130,115,116,117,118,119,131,120,121,122,123,132,127]));return{id:cO,diagram:e}},`loader`)},uO=`timeline`,dO={id:uO,detector:l(e=>/^\s*timeline/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./timeline-definition-GMOUNBTQ-Dv0o3bm2.js`);return{diagram:e}},__vite__mapDeps([167,104,1,155,106,122,105,107,108,109]));return{id:uO,diagram:e}},`loader`)},fO=`mindmap`,pO={id:fO,detector:l(e=>/^\s*mindmap/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./mindmap-definition-QFDTVHPH-BYxkj8M5.js`);return{diagram:e}},__vite__mapDeps([168,103,104,1,105,106,107,108,109,130,115,116,117,118,119,131,120,121,122,123]));return{id:fO,diagram:e}},`loader`)},mO=`kanban`,hO={id:mO,detector:l(e=>/^\s*kanban/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./kanban-definition-6JOO6SKY-HE7NzVUF.js`);return{diagram:e}},__vite__mapDeps([169,103,104,1,105,106,107,108,109,115,116,117,118,132]));return{id:mO,diagram:e}},`loader`)},gO=`sankey`,_O={id:gO,detector:l(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./sankeyDiagram-XADWPNL6-DTcXqWic.js`);return{diagram:e}},__vite__mapDeps([170,104,1,154,151,107,108]));return{id:gO,diagram:e}},`loader`)},vO=`packet`,yO={id:vO,detector:l(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./diagram-TYMM5635-BpoWQOZz.js`);return{diagram:e}},__vite__mapDeps([171,135,108,136,1,112,109,113,137,138,139,140,141,142,143,144,145,104,105,106,107,146]));return{id:vO,diagram:e}},`loader`)},bO=`radar`,xO={id:bO,detector:l(e=>/^\s*radar-beta/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./diagram-MMDJMWI5-DQVh8vi4.js`);return{diagram:e}},__vite__mapDeps([172,135,108,136,1,112,109,113,137,138,139,140,141,142,143,144,145,104,105,106,107,146]));return{id:bO,diagram:e}},`loader`)},SO=`block`,CO={id:SO,detector:l(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./blockDiagram-DXYQGD6D-Z6Y3BGVg.js`);return{diagram:e}},__vite__mapDeps([173,103,104,1,105,106,107,108,109,121,122,123,111,112,129,114,119,132,117]));return{id:SO,diagram:e}},`loader`)},wO=`treeView`,TO={id:wO,detector:l(e=>/^\s*treeView-beta/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./diagram-5BDNPKRD-CV0UxZuv.js`);return{diagram:e}},__vite__mapDeps([174,135,108,136,1,112,109,113,137,138,139,140,141,142,143,144,145,104,105,106,107,146,147]));return{id:wO,diagram:e}},`loader`)},EO=`architecture`,DO={id:EO,detector:l(e=>/^\s*architecture/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./architectureDiagram-Q4EWVU46-DcS6A3Mg.js`);return{diagram:e}},__vite__mapDeps([175,1,103,104,105,106,107,108,109,135,136,112,113,137,138,139,140,141,142,143,144,145,125,146]));return{id:EO,diagram:e}},`loader`)},OO=`ishikawa`,kO={id:OO,detector:l(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-UXIWVN3A-epPQ8zog.js`);return{diagram:e}},__vite__mapDeps([176,104,1,105,106,107,108,109,118]));return{id:OO,diagram:e}},`loader`)},AO=`venn`,jO={id:AO,detector:l(e=>/^\s*venn-beta/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./vennDiagram-DHZGUBPP-CQgHNv55.js`);return{diagram:e}},__vite__mapDeps([177,104,1,105,106,107,108,109,118]));return{id:AO,diagram:e}},`loader`)},MO=`treemap`,NO={id:MO,detector:l(e=>/^\s*treemap/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./diagram-G4DWMVQ6-Diej41n9.js`);return{diagram:e}},__vite__mapDeps([178,135,108,136,1,112,109,113,137,138,139,140,141,142,143,144,145,104,150,154,151,105,106,107,146,131,116]));return{id:MO,diagram:e}},`loader`)},PO=`wardley-beta`,FO={id:PO,detector:l(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await a(async()=>{let{diagram:e}=await import(`./wardleyDiagram-NUSXRM2D-BlGX5hGO.js`);return{diagram:e}},__vite__mapDeps([179,135,108,136,1,112,109,113,137,138,139,140,141,142,143,144,145,104,107,146]));return{id:PO,diagram:e}},`loader`)},IO=!1,LO=l(()=>{IO||(IO=!0,h(`error`,sO,e=>e.toLowerCase().trim()===`error`),h(`---`,{db:{clear:l(()=>{},`clear`)},styles:{},renderer:{draw:l(()=>{},`draw`)},parser:{parse:l(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:l(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),g(lO,pO,DO),g(ED,hO,QD,XD,MD,ID,RD,BD,KD,JD,AD,OD,dO,PD,nO,eO,iO,HD,_O,yO,WD,CO,TO,xO,kO,NO,jO,FO))},`addDiagrams`),RO=l(async()=>{c.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(k).map(async([e,{detector:t,loader:n}])=>{if(n)try{N(e)}catch{try{let{diagram:e,id:r}=await n();h(r,e,t)}catch(t){throw c.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete k[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){c.error(`Failed to load ${e.length} external diagrams`);for(let t of e)c.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),zO=`graphics-document document`;function BO(e,t){e.attr(`role`,zO),t!==``&&e.attr(`aria-roledescription`,t)}l(BO,`setA11yDiagramInfo`);function VO(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}l(VO,`addSVGa11yTitleDescription`);var HO=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{l(this,`Diagram`)}static async fromText(t,n={}){let r=P(),i=w(t,r);t=te(t)+`
200
+ `;try{N(i)}catch{let e=_(i);if(!e)throw new j(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();h(t,n)}let{db:a,parser:o,renderer:s,init:c}=N(i);return o.parser&&(o.parser.yy=a),a.clear?.(),c?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(t),new e(i,t,a,o,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},UO=[],yre=l(()=>{UO.forEach(e=>{e()}),UO=[]},`attachFunctions`),bre=l(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function WO(e){let t=e.match(T);if(!t)return{text:e,metadata:{}};let n=xE(t[1],{schema:bE})??{};n=typeof n==`object`&&!Array.isArray(n)?n:{};let r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:e.slice(t[0].length),metadata:r}}l(WO,`extractFrontMatter`);var xre=l(e=>e.replace(/\r\n?/g,`
201
+ `).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),Sre=l(e=>{let{text:t,metadata:n}=WO(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),Cre=l(e=>{let t=re.detectInit(e)??{},n=re.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:ae(e),directive:t}},`processDirectives`);function GO(e){let t=Sre(xre(e)),n=Cre(t.text),r=oe(t.config,n.directive);return e=bre(n.text),{code:e,title:t.title,config:r}}l(GO,`preprocessDiagram`);function KO(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}l(KO,`toBase64`);var wre=5e4,Tre=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,Ere=`sandbox`,Dre=`loose`,Ore=`http://www.w3.org/2000/svg`,kre=`http://www.w3.org/1999/xlink`,Are=`http://www.w3.org/1999/xhtml`,jre=`100%`,Mre=`100%`,Nre=`border:0;margin:0;`,Pre=`margin:0`,Fre=`allow-top-navigation-by-user-activation allow-popups`,Ire=`The "iframe" tag is not supported by your browser.`,Lre=[`foreignobject`],Rre=[`dominant-baseline`];function qO(e){let t=GO(e);return d(),O(t.config??{}),t}l(qO,`processAndSetConfigs`);async function JO(e,t){LO();try{let{code:t,config:n}=qO(e);return{diagramType:(await $O(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}l(JO,`parse`);var YO=l((e,t,n=[])=>`
202
+ .${e} ${t} { ${n.join(` !important; `)} !important; }`,`cssImportantStyles`),zre=l((e,t=new Map)=>{let n=``;if(e.themeCSS!==void 0&&(n+=`
203
+ ${e.themeCSS}`),e.fontFamily!==void 0&&(n+=`
204
+ :root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(n+=`
205
+ :root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){let r=M(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{wD(e.styles)||r.forEach(t=>{n+=YO(e.id,t,e.styles)}),wD(e.textStyles)||(n+=YO(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))))})}return n},`createCssStyles`),Bre=l((e,t,n,r)=>dD(are(`${r}{${m(t,zre(e,n),{...e.themeVariables,theme:e.theme,look:e.look},r)}}`),sre),`createUserStyles`),Vre=l((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=ie(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),Hre=l((e=``,t)=>`<iframe style="width:${jre};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:Mre};${Nre}" src="data:text/html;charset=UTF-8;base64,${KO(`<body style="${Pre}">${e}</body>`)}" sandbox="${Fre}">
206
+ ${Ire}
207
+ </iframe>`,`putIntoIFrame`),XO=l((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,Ore);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function ZO(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}l(ZO,`sandboxedIframe`);var Ure=l((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),Wre=l(async function(e,t,n){LO();let r=qO(t);t=r.code;let i=P();c.debug(i),t.length>(i?.maxTextSize??wre)&&(t=Tre);let a=`#`+e,o=`i`+e,s=`#`+o,d=`d`+e,f=`#`+d,p=l(()=>{let e=u(h?s:f).node();e&&`remove`in e&&e.remove()},`removeTempElements`),m=u(`body`),h=i.securityLevel===Ere,g=i.securityLevel===Dre,_=i.fontFamily;n===void 0?(Ure(document,e,d,o),h?(m=u(ZO(u(`body`),o).nodes()[0].contentDocument.body),m.node().style.margin=0):m=u(`body`),XO(m,e,d)):(n&&(n.innerHTML=``),h?(m=u(ZO(u(n),o).nodes()[0].contentDocument.body),m.node().style.margin=0):m=u(n),XO(m,e,d,`font-family: ${_}`,kre));let v,y;try{v=await HO.fromText(t,{title:r.title})}catch(e){if(i.suppressErrorRendering)throw p(),e;v=await HO.fromText(`error`),y=e}let b=m.select(f).node(),S=v.type,C=b.firstChild,w=C.firstChild,T=v.renderer.getClasses?.(t,v),D=Bre(i,S,T,a),O=document.createElement(`style`);O.innerHTML=D,C.insertBefore(O,w);try{await v.renderer.draw(t,e,`11.14.0`,v)}catch(n){throw i.suppressErrorRendering?p():oO.draw(t,e,`11.14.0`),n}let k=m.select(`${f} svg`),ee=v.db.getAccTitle?.(),A=v.db.getAccDescription?.();ek(S,k,ee,A),m.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,Are);let j=m.select(f).node().innerHTML;if(c.debug(`config.arrowMarkerAbsolute`,i.arrowMarkerAbsolute),j=Vre(j,h,E(i.arrowMarkerAbsolute)),h){let e=m.select(f+` svg`).node();j=Hre(j,e)}else g||(j=x.sanitize(j,{ADD_TAGS:Lre,ADD_ATTR:Rre,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(yre(),y)throw y;return p(),{diagramType:S,svg:j,bindFunctions:v.db.bindFunctions}},`render`);function QO(e={}){let t=ee({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),F(t),t?.theme&&t.theme in b?t.themeVariables=b[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=b.default.getThemeVariables(t.themeVariables)),s((typeof t==`object`?f(t):v()).logLevel),LO()}l(QO,`initialize`);var $O=l((e,t={})=>{let{code:n}=GO(e);return HO.fromText(n,t)},`getDiagramFromText`);function ek(e,t,n,r){BO(t,e),VO(t,n,r,t.attr(`id`))}l(ek,`addA11yInfo`);var tk=Object.freeze({render:Wre,parse:JO,getDiagramFromText:$O,initialize:QO,getConfig:P,setConfig:p,getSiteConfig:v,updateSiteConfig:y,reset:l(()=>{d()},`reset`),globalReset:l(()=>{d(D)},`globalReset`),defaultConfig:D});s(P().logLevel),d(P());var Gre=l((e,t,n)=>{c.warn(e),ne(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),nk=l(async function(e={querySelector:`.mermaid`}){try{await Kre(e)}catch(t){if(ne(t)&&c.error(t.str),lk.parseError&&lk.parseError(t),!e.suppressErrors)throw c.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),Kre=l(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=tk.getConfig();c.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);c.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(c.debug(`Start On Load: `+r?.startOnLoad),tk.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new re.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(c.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=be(re.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let r=re.detectInit(o);r&&c.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await ck(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){Gre(e,s,lk.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),rk=l(function(e){tk.initialize(e)},`initialize`),qre=l(async function(e,t,n){c.warn(`mermaid.init is deprecated. Please use run instead.`),e&&rk(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.nodes=t),await nk(r)},`init`),Jre=l(async(e,{lazyLoad:t=!0}={})=>{LO(),g(...e),t===!1&&await RO()},`registerExternalDiagrams`),ik=l(function(){if(lk.startOnLoad){let{startOnLoad:e}=tk.getConfig();e&&lk.run().catch(e=>c.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,ik,!1);var Yre=l(function(e){lk.parseError=e},`setParseErrorHandler`),ak=[],ok=!1,sk=l(async()=>{if(!ok){for(ok=!0;ak.length>0;){let e=ak.shift();if(e)try{await e()}catch(e){c.error(`Error executing queue`,e)}}ok=!1}},`executeQueue`),Xre=l(async(e,t)=>new Promise((n,r)=>{let i=l(()=>new Promise((i,a)=>{tk.parse(e,t).then(e=>{i(e),n(e)},e=>{c.error(`Error parsing`,e),lk.parseError?.(e),a(e),r(e)})}),`performCall`);ak.push(i),sk().catch(r)}),`parse`),ck=l((e,t,n)=>new Promise((r,i)=>{let a=l(()=>new Promise((a,o)=>{tk.render(e,t,n).then(e=>{a(e),r(e)},e=>{c.error(`Error parsing`,e),lk.parseError?.(e),o(e),i(e)})}),`performCall`);ak.push(a),sk().catch(i)}),`render`),lk={startOnLoad:!0,mermaidAPI:tk,parse:Xre,render:ck,init:qre,run:nk,registerExternalDiagrams:Jre,registerLayoutLoaders:CE,initialize:rk,parseError:void 0,contentLoaded:ik,setParseErrorHandler:Yre,detectType:w,registerIconPacks:ye,getRegisteredDiagramsMetadata:l(()=>Object.keys(k).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},uk=lk,dk={startOnLoad:!1,theme:`default`,securityLevel:`strict`,fontFamily:`monospace`,suppressErrorRendering:!0};function Zre(e={}){let t=!1,n={...dk,...e.config},r={initialize(r){n={...dk,...e.config,...r},uk.initialize(n),t=!0},async render(e,r){return t||=(uk.initialize(n),!0),await uk.render(e,r)}};return{name:`mermaid`,type:`diagram`,language:`mermaid`,getMermaid(e){return e&&r.initialize(e),r}}}var fk=Zre(),pk={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function Qre({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=pk.indicator,imageBlockPolicy:c=pk.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=iie(e,t,n,r,i,a,o,s,c);gk(l),bm(l,u)}}function mk(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function $re(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var eie=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),tie=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function hk(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=mk(e,n);if(!o||tie.has(o.protocol)||!(eie.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=$re(e);return o&&t.some(e=>{let t=mk(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function gk(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)gk(t)}}var _k=Symbol(`node-seen`);function nie(e,t,n){return t===pk.remove?{type:`remove`}:t===pk.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function rie(e,t,n){if(t===pk.remove)return{type:`remove`};if(t===pk.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var iie=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[_k])return!0;if(u.tagName===`a`){let n=hk(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[_k]=!0,bm(u,l),f&&typeof d==`number`){let e=nie(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[vm,d];f.children[d]=e.element}return vm}else return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=hk(u.properties.src,n,e,r,!0,i);if(t===null){if(u[_k]=!0,bm(u,l),f&&typeof d==`number`){let e=rie(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[vm,d];f.children[d]=e.element}return vm}else return u.properties.src=t,!0}return!0};return l},aie=typeof self==`object`?self:globalThis,vk=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new aie[e](t)},oie=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(vk(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(vk(a,o),i)};return r},yk=e=>oie(new Map,e)(0),bk=``,{toString:sie}={},{keys:cie}=Object,xk=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=sie.call(e).slice(8,-1);switch(n){case`Array`:return[1,bk];case`Object`:return[2,bk];case`Date`:return[3,bk];case`RegExp`:return[4,bk];case`Map`:return[5,bk];case`Set`:return[6,bk];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Sk=([e,t])=>e===0&&(t===`function`||t===`symbol`),lie=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=xk(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of cie(r))(e||!Sk(xk(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Sk(xk(n))||Sk(xk(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Sk(xk(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Ck=(e,{json:t,lossy:n}={})=>{let r=[];return lie(!(t||n),!!t,new Map,r)(e),r},wk=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?yk(Ck(e,t)):structuredClone(e):(e,t)=>yk(Ck(e,t));function uie(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Tk(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Tk(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Tk(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
208
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Ek={}.hasOwnProperty,Dk=Object.prototype;function Ok(e,t){let n=t||{};return kk({file:n.file||void 0,location:!1,schema:n.space===`svg`?Cg:Sg,verbose:n.verbose||!1},e)}function kk(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},Mk(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:Ak(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=uie(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},Mk(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},Mk(e,r,n),n}default:return n=jk(e,t),n}}function Ak(e,t){let n=-1,r=[];for(;++n<t.length;){let i=kk(e,t[n]);r.push(i)}return r}function jk(e,t){let n=e.schema;e.schema=t.namespaceURI===nC.svg?Cg:Sg;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Ek.call(Dk,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?tC:eC)(t.tagName,i,Ak(e,t.childNodes));if(Mk(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&Pk(r.startTag),o=r&&r.endTag&&Pk(r.endTag),s=kk(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function Mk(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=Nk(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function Nk(e,t,n){let r=Pk(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Ek.call(n.attrs,i)&&(r[xg(e.schema,i).property]=Pk(n.attrs[i]));n.startTag;let a=Pk(n.startTag),o=n.endTag?Pk(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function Pk(e){let t=Fk({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Fk({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Fk(e){return e.line&&e.column?e:void 0}var Ik={},Lk={}.hasOwnProperty,Rk=Tg(`type`,{handlers:{root:Bk,element:Gk,text:Uk,comment:Wk,doctype:Hk}});function zk(e,t){let n=(t||Ik).space;return Rk(e,n===`svg`?Cg:Sg)}function Bk(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=qk(e.children,n,t),Jk(e,n),n}function Vk(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=qk(e.children,n,t),Jk(e,n),n}function Hk(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return Jk(e,t),t}function Uk(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return Jk(e,t),t}function Wk(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return Jk(e,t),t}function Gk(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=Cg);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&Lk.call(e.properties,a)){let t=Kk(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:nC[o],childNodes:[],parentNode:null};return s.childNodes=qk(e.children,s,r),Jk(e,s),e.tagName===`template`&&e.content&&(s.content=Vk(e.content,r)),s}function Kk(e,t,n){let r=xg(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Yg(n):Zg(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=nC[r.space]}return i}function qk(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=Rk(e[r],n);a.parentNode=t,i.push(a)}return i}function Jk(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Yk=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),H;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(H||={});var Xk={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function Zk(e){return e>=55296&&e<=57343}function Qk(e){return e>=56320&&e<=57343}function $k(e,t){return(e-55296)*1024+9216+t}function eA(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function tA(e){return e>=64976&&e<=65007||Yk.has(e)}var U;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(U||={});var nA=65536,rA=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=nA,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(Qk(t))return this.pos++,this._addGap(),$k(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,H.EOF;return this._err(U.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,H.EOF;let n=this.html.charCodeAt(t);return n===H.CARRIAGE_RETURN?H.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,H.EOF;let e=this.html.charCodeAt(this.pos);return e===H.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,H.LINE_FEED):e===H.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Zk(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===H.LINE_FEED||e===H.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){eA(e)?this._err(U.controlCharacterInInputStream):tA(e)&&this._err(U.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},iA;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(iA||={});function aA(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var oA=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),sA=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function cA(e){return e>=55296&&e<=57343||e>1114111?65533:sA.get(e)??e}var lA;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(lA||={});var uA=32,dA;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(dA||={});function fA(e){return e>=lA.ZERO&&e<=lA.NINE}function pA(e){return e>=lA.UPPER_A&&e<=lA.UPPER_F||e>=lA.LOWER_A&&e<=lA.LOWER_F}function mA(e){return e>=lA.UPPER_A&&e<=lA.UPPER_Z||e>=lA.LOWER_A&&e<=lA.LOWER_Z||fA(e)}function hA(e){return e===lA.EQUALS||mA(e)}var gA;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(gA||={});var _A;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(_A||={});var vA=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=gA.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=_A.Strict}startEntity(e){this.decodeMode=e,this.state=gA.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case gA.EntityStart:return e.charCodeAt(t)===lA.NUM?(this.state=gA.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=gA.NamedEntity,this.stateNamedEntity(e,t));case gA.NumericStart:return this.stateNumericStart(e,t);case gA.NumericDecimal:return this.stateNumericDecimal(e,t);case gA.NumericHex:return this.stateNumericHex(e,t);case gA.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|uA)===lA.LOWER_X?(this.state=gA.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=gA.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(fA(r)||pA(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(fA(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===lA.SEMI)this.consumed+=1;else if(this.decodeMode===_A.Strict)return 0;return this.emitCodePoint(cA(this.result),this.consumed),this.errors&&(e!==lA.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&dA.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=yA(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===_A.Attribute&&(i===0||hA(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&dA.VALUE_LENGTH)>>14,i!==0){if(a===lA.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==_A.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&dA.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~dA.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case gA.NamedEntity:return this.result!==0&&(this.decodeMode!==_A.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case gA.NumericDecimal:return this.emitNumericEntity(0,2);case gA.NumericHex:return this.emitNumericEntity(0,3);case gA.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case gA.EntityStart:return 0}}};function yA(e,t,n,r){let i=(t&dA.BRANCH_LENGTH)>>7,a=t&dA.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var W;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(W||={});var bA;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(bA||={});var xA;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(xA||={});var G;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(G||={});var K;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(K||={});var SA=new Map([[G.A,K.A],[G.ADDRESS,K.ADDRESS],[G.ANNOTATION_XML,K.ANNOTATION_XML],[G.APPLET,K.APPLET],[G.AREA,K.AREA],[G.ARTICLE,K.ARTICLE],[G.ASIDE,K.ASIDE],[G.B,K.B],[G.BASE,K.BASE],[G.BASEFONT,K.BASEFONT],[G.BGSOUND,K.BGSOUND],[G.BIG,K.BIG],[G.BLOCKQUOTE,K.BLOCKQUOTE],[G.BODY,K.BODY],[G.BR,K.BR],[G.BUTTON,K.BUTTON],[G.CAPTION,K.CAPTION],[G.CENTER,K.CENTER],[G.CODE,K.CODE],[G.COL,K.COL],[G.COLGROUP,K.COLGROUP],[G.DD,K.DD],[G.DESC,K.DESC],[G.DETAILS,K.DETAILS],[G.DIALOG,K.DIALOG],[G.DIR,K.DIR],[G.DIV,K.DIV],[G.DL,K.DL],[G.DT,K.DT],[G.EM,K.EM],[G.EMBED,K.EMBED],[G.FIELDSET,K.FIELDSET],[G.FIGCAPTION,K.FIGCAPTION],[G.FIGURE,K.FIGURE],[G.FONT,K.FONT],[G.FOOTER,K.FOOTER],[G.FOREIGN_OBJECT,K.FOREIGN_OBJECT],[G.FORM,K.FORM],[G.FRAME,K.FRAME],[G.FRAMESET,K.FRAMESET],[G.H1,K.H1],[G.H2,K.H2],[G.H3,K.H3],[G.H4,K.H4],[G.H5,K.H5],[G.H6,K.H6],[G.HEAD,K.HEAD],[G.HEADER,K.HEADER],[G.HGROUP,K.HGROUP],[G.HR,K.HR],[G.HTML,K.HTML],[G.I,K.I],[G.IMG,K.IMG],[G.IMAGE,K.IMAGE],[G.INPUT,K.INPUT],[G.IFRAME,K.IFRAME],[G.KEYGEN,K.KEYGEN],[G.LABEL,K.LABEL],[G.LI,K.LI],[G.LINK,K.LINK],[G.LISTING,K.LISTING],[G.MAIN,K.MAIN],[G.MALIGNMARK,K.MALIGNMARK],[G.MARQUEE,K.MARQUEE],[G.MATH,K.MATH],[G.MENU,K.MENU],[G.META,K.META],[G.MGLYPH,K.MGLYPH],[G.MI,K.MI],[G.MO,K.MO],[G.MN,K.MN],[G.MS,K.MS],[G.MTEXT,K.MTEXT],[G.NAV,K.NAV],[G.NOBR,K.NOBR],[G.NOFRAMES,K.NOFRAMES],[G.NOEMBED,K.NOEMBED],[G.NOSCRIPT,K.NOSCRIPT],[G.OBJECT,K.OBJECT],[G.OL,K.OL],[G.OPTGROUP,K.OPTGROUP],[G.OPTION,K.OPTION],[G.P,K.P],[G.PARAM,K.PARAM],[G.PLAINTEXT,K.PLAINTEXT],[G.PRE,K.PRE],[G.RB,K.RB],[G.RP,K.RP],[G.RT,K.RT],[G.RTC,K.RTC],[G.RUBY,K.RUBY],[G.S,K.S],[G.SCRIPT,K.SCRIPT],[G.SEARCH,K.SEARCH],[G.SECTION,K.SECTION],[G.SELECT,K.SELECT],[G.SOURCE,K.SOURCE],[G.SMALL,K.SMALL],[G.SPAN,K.SPAN],[G.STRIKE,K.STRIKE],[G.STRONG,K.STRONG],[G.STYLE,K.STYLE],[G.SUB,K.SUB],[G.SUMMARY,K.SUMMARY],[G.SUP,K.SUP],[G.TABLE,K.TABLE],[G.TBODY,K.TBODY],[G.TEMPLATE,K.TEMPLATE],[G.TEXTAREA,K.TEXTAREA],[G.TFOOT,K.TFOOT],[G.TD,K.TD],[G.TH,K.TH],[G.THEAD,K.THEAD],[G.TITLE,K.TITLE],[G.TR,K.TR],[G.TRACK,K.TRACK],[G.TT,K.TT],[G.U,K.U],[G.UL,K.UL],[G.SVG,K.SVG],[G.VAR,K.VAR],[G.WBR,K.WBR],[G.XMP,K.XMP]]);function CA(e){return SA.get(e)??K.UNKNOWN}var q=K,wA={[W.HTML]:new Set([q.ADDRESS,q.APPLET,q.AREA,q.ARTICLE,q.ASIDE,q.BASE,q.BASEFONT,q.BGSOUND,q.BLOCKQUOTE,q.BODY,q.BR,q.BUTTON,q.CAPTION,q.CENTER,q.COL,q.COLGROUP,q.DD,q.DETAILS,q.DIR,q.DIV,q.DL,q.DT,q.EMBED,q.FIELDSET,q.FIGCAPTION,q.FIGURE,q.FOOTER,q.FORM,q.FRAME,q.FRAMESET,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HEADER,q.HGROUP,q.HR,q.HTML,q.IFRAME,q.IMG,q.INPUT,q.LI,q.LINK,q.LISTING,q.MAIN,q.MARQUEE,q.MENU,q.META,q.NAV,q.NOEMBED,q.NOFRAMES,q.NOSCRIPT,q.OBJECT,q.OL,q.P,q.PARAM,q.PLAINTEXT,q.PRE,q.SCRIPT,q.SECTION,q.SELECT,q.SOURCE,q.STYLE,q.SUMMARY,q.TABLE,q.TBODY,q.TD,q.TEMPLATE,q.TEXTAREA,q.TFOOT,q.TH,q.THEAD,q.TITLE,q.TR,q.TRACK,q.UL,q.WBR,q.XMP]),[W.MATHML]:new Set([q.MI,q.MO,q.MN,q.MS,q.MTEXT,q.ANNOTATION_XML]),[W.SVG]:new Set([q.TITLE,q.FOREIGN_OBJECT,q.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},TA=new Set([q.H1,q.H2,q.H3,q.H4,q.H5,q.H6]);new Set([G.STYLE,G.SCRIPT,G.XMP,G.IFRAME,G.NOEMBED,G.NOFRAMES,G.PLAINTEXT]);var J;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(J||={});var EA={DATA:J.DATA,RCDATA:J.RCDATA,RAWTEXT:J.RAWTEXT,SCRIPT_DATA:J.SCRIPT_DATA,PLAINTEXT:J.PLAINTEXT,CDATA_SECTION:J.CDATA_SECTION};function DA(e){return e>=H.DIGIT_0&&e<=H.DIGIT_9}function OA(e){return e>=H.LATIN_CAPITAL_A&&e<=H.LATIN_CAPITAL_Z}function kA(e){return e>=H.LATIN_SMALL_A&&e<=H.LATIN_SMALL_Z}function AA(e){return kA(e)||OA(e)}function jA(e){return AA(e)||DA(e)}function MA(e){return e+32}function NA(e){return e===H.SPACE||e===H.LINE_FEED||e===H.TABULATION||e===H.FORM_FEED}function PA(e){return NA(e)||e===H.SOLIDUS||e===H.GREATER_THAN_SIGN}function FA(e){return e===H.NULL?U.nullCharacterReference:e>1114111?U.characterReferenceOutsideUnicodeRange:Zk(e)?U.surrogateCharacterReference:tA(e)?U.noncharacterCharacterReference:eA(e)||e===H.CARRIAGE_RETURN?U.controlCharacterReference:null}var IA=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=J.DATA,this.returnState=J.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new rA(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new vA(oA,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(U.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(U.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=FA(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:iA.START_TAG,tagName:``,tagID:K.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:iA.END_TAG,tagName:``,tagID:K.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:iA.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:iA.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(aA(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(U.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=CA(e.tagName),e.type===iA.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(U.endTagWithAttributes),e.selfClosing&&this._err(U.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case iA.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case iA.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case iA.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:iA.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=NA(e)?iA.WHITESPACE_CHARACTER:e===H.NULL?iA.NULL_CHARACTER:iA.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(iA.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=J.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?_A.Attribute:_A.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===J.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===J.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===J.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case J.DATA:this._stateData(e);break;case J.RCDATA:this._stateRcdata(e);break;case J.RAWTEXT:this._stateRawtext(e);break;case J.SCRIPT_DATA:this._stateScriptData(e);break;case J.PLAINTEXT:this._statePlaintext(e);break;case J.TAG_OPEN:this._stateTagOpen(e);break;case J.END_TAG_OPEN:this._stateEndTagOpen(e);break;case J.TAG_NAME:this._stateTagName(e);break;case J.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case J.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case J.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case J.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case J.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case J.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case J.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case J.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case J.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case J.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case J.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case J.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case J.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case J.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case J.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case J.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case J.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case J.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case J.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case J.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case J.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case J.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case J.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case J.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case J.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case J.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case J.BOGUS_COMMENT:this._stateBogusComment(e);break;case J.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case J.COMMENT_START:this._stateCommentStart(e);break;case J.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case J.COMMENT:this._stateComment(e);break;case J.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case J.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case J.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case J.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case J.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case J.COMMENT_END:this._stateCommentEnd(e);break;case J.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case J.DOCTYPE:this._stateDoctype(e);break;case J.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case J.DOCTYPE_NAME:this._stateDoctypeName(e);break;case J.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case J.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case J.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case J.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case J.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case J.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case J.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case J.CDATA_SECTION:this._stateCdataSection(e);break;case J.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case J.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case J.CHARACTER_REFERENCE:this._stateCharacterReference();break;case J.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case H.LESS_THAN_SIGN:this.state=J.TAG_OPEN;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitCodePoint(e);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case H.AMPERSAND:this._startCharacterReference();break;case H.LESS_THAN_SIGN:this.state=J.RCDATA_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case H.LESS_THAN_SIGN:this.state=J.RAWTEXT_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(AA(e))this._createStartTagToken(),this.state=J.TAG_NAME,this._stateTagName(e);else switch(e){case H.EXCLAMATION_MARK:this.state=J.MARKUP_DECLARATION_OPEN;break;case H.SOLIDUS:this.state=J.END_TAG_OPEN;break;case H.QUESTION_MARK:this._err(U.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=J.BOGUS_COMMENT,this._stateBogusComment(e);break;case H.EOF:this._err(U.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(U.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=J.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(AA(e))this._createEndTagToken(),this.state=J.TAG_NAME,this._stateTagName(e);else switch(e){case H.GREATER_THAN_SIGN:this._err(U.missingEndTagName),this.state=J.DATA;break;case H.EOF:this._err(U.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(U.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=J.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_ATTRIBUTE_NAME;break;case H.SOLIDUS:this.state=J.SELF_CLOSING_START_TAG;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentTagToken();break;case H.NULL:this._err(U.unexpectedNullCharacter),t.tagName+=`�`;break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(OA(e)?MA(e):e)}}_stateRcdataLessThanSign(e){e===H.SOLIDUS?this.state=J.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=J.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){AA(e)?(this.state=J.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=J.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=J.BEFORE_ATTRIBUTE_NAME,!1;case H.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=J.SELF_CLOSING_START_TAG,!1;case H.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=J.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===H.SOLIDUS?this.state=J.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=J.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){AA(e)?(this.state=J.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=J.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case H.SOLIDUS:this.state=J.SCRIPT_DATA_END_TAG_OPEN;break;case H.EXCLAMATION_MARK:this.state=J.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=J.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){AA(e)?(this.state=J.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===H.HYPHEN_MINUS?(this.state=J.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===H.HYPHEN_MINUS?(this.state=J.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=J.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case H.HYPHEN_MINUS:this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case H.GREATER_THAN_SIGN:this.state=J.SCRIPT_DATA,this._emitChars(`>`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===H.SOLIDUS?this.state=J.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:AA(e)?(this._emitChars(`<`),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){AA(e)?(this.state=J.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(Xk.SCRIPT,!1)&&PA(this.preprocessor.peek(Xk.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Xk.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=J.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case H.HYPHEN_MINUS:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case H.HYPHEN_MINUS:this._emitChars(`-`);break;case H.LESS_THAN_SIGN:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case H.GREATER_THAN_SIGN:this.state=J.SCRIPT_DATA,this._emitChars(`>`);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case H.EOF:this._err(U.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===H.SOLIDUS?(this.state=J.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(Xk.SCRIPT,!1)&&PA(this.preprocessor.peek(Xk.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<Xk.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=J.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=J.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.SOLIDUS:case H.GREATER_THAN_SIGN:case H.EOF:this.state=J.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case H.EQUALS_SIGN:this._err(U.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=J.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=J.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:case H.SOLIDUS:case H.GREATER_THAN_SIGN:case H.EOF:this._leaveAttrName(),this.state=J.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case H.EQUALS_SIGN:this._leaveAttrName(),this.state=J.BEFORE_ATTRIBUTE_VALUE;break;case H.QUOTATION_MARK:case H.APOSTROPHE:case H.LESS_THAN_SIGN:this._err(U.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(OA(e)?MA(e):e)}}_stateAfterAttributeName(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.SOLIDUS:this.state=J.SELF_CLOSING_START_TAG;break;case H.EQUALS_SIGN:this.state=J.BEFORE_ATTRIBUTE_VALUE;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentTagToken();break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=J.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:this.state=J.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case H.APOSTROPHE:this.state=J.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingAttributeValue),this.state=J.DATA,this.emitCurrentTagToken();break;default:this.state=J.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case H.QUOTATION_MARK:this.state=J.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case H.APOSTROPHE:this.state=J.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case H.AMPERSAND:this._startCharacterReference();break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this._leaveAttrValue(),this.state=J.BEFORE_ATTRIBUTE_NAME;break;case H.AMPERSAND:this._startCharacterReference();break;case H.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=J.DATA,this.emitCurrentTagToken();break;case H.NULL:this._err(U.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case H.QUOTATION_MARK:case H.APOSTROPHE:case H.LESS_THAN_SIGN:case H.EQUALS_SIGN:case H.GRAVE_ACCENT:this._err(U.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this._leaveAttrValue(),this.state=J.BEFORE_ATTRIBUTE_NAME;break;case H.SOLIDUS:this._leaveAttrValue(),this.state=J.SELF_CLOSING_START_TAG;break;case H.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=J.DATA,this.emitCurrentTagToken();break;case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this._err(U.missingWhitespaceBetweenAttributes),this.state=J.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case H.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=J.DATA,this.emitCurrentTagToken();break}case H.EOF:this._err(U.eofInTag),this._emitEOFToken();break;default:this._err(U.unexpectedSolidusInTag),this.state=J.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentComment(t);break;case H.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case H.NULL:this._err(U.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(Xk.DASH_DASH,!0)?(this._createCommentToken(Xk.DASH_DASH.length+1),this.state=J.COMMENT_START):this._consumeSequenceIfMatch(Xk.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Xk.DOCTYPE.length+1),this.state=J.DOCTYPE):this._consumeSequenceIfMatch(Xk.CDATA_START,!0)?this.inForeignNode?this.state=J.CDATA_SECTION:(this._err(U.cdataInHtmlContent),this._createCommentToken(Xk.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=J.BOGUS_COMMENT):this._ensureHibernation()||(this._err(U.incorrectlyOpenedComment),this._createCommentToken(2),this.state=J.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_START_DASH;break;case H.GREATER_THAN_SIGN:{this._err(U.abruptClosingOfEmptyComment),this.state=J.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=J.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_END;break;case H.GREATER_THAN_SIGN:this._err(U.abruptClosingOfEmptyComment),this.state=J.DATA,this.emitCurrentComment(t);break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=J.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_END_DASH;break;case H.LESS_THAN_SIGN:t.data+=`<`,this.state=J.COMMENT_LESS_THAN_SIGN;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.data+=`�`;break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case H.EXCLAMATION_MARK:t.data+=`!`,this.state=J.COMMENT_LESS_THAN_SIGN_BANG;break;case H.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=J.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===H.HYPHEN_MINUS?this.state=J.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=J.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===H.HYPHEN_MINUS?this.state=J.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=J.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==H.GREATER_THAN_SIGN&&e!==H.EOF&&this._err(U.nestedComment),this.state=J.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:this.state=J.COMMENT_END;break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=J.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentComment(t);break;case H.EXCLAMATION_MARK:this.state=J.COMMENT_END_BANG;break;case H.HYPHEN_MINUS:t.data+=`-`;break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=J.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case H.HYPHEN_MINUS:t.data+=`--!`,this.state=J.COMMENT_END_DASH;break;case H.GREATER_THAN_SIGN:this._err(U.incorrectlyClosedComment),this.state=J.DATA,this.emitCurrentComment(t);break;case H.EOF:this._err(U.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=J.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:this.state=J.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case H.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(U.missingWhitespaceBeforeDoctypeName),this.state=J.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(OA(e))this._createDoctypeToken(String.fromCharCode(MA(e))),this.state=J.DOCTYPE_NAME;else switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.NULL:this._err(U.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=J.DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:{this._err(U.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=J.DATA;break}case H.EOF:{this._err(U.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=J.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.AFTER_DOCTYPE_NAME;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.NULL:this._err(U.unexpectedNullCharacter),t.name+=`�`;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(OA(e)?MA(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(Xk.PUBLIC,!1)?this.state=J.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Xk.SYSTEM,!1)?this.state=J.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(U.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.QUOTATION_MARK:this._err(U.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(U.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.publicId=``,this.state=J.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case H.QUOTATION_MARK:this.state=J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.publicId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case H.APOSTROPHE:this.state=J.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.publicId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case H.GREATER_THAN_SIGN:this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.QUOTATION_MARK:this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(U.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.QUOTATION_MARK:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:this.state=J.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.QUOTATION_MARK:this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:this._err(U.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.QUOTATION_MARK:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case H.APOSTROPHE:t.systemId=``,this.state=J.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case H.GREATER_THAN_SIGN:this._err(U.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.DATA,this.emitCurrentDoctype(t);break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case H.QUOTATION_MARK:this.state=J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.systemId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case H.APOSTROPHE:this.state=J.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case H.NULL:this._err(U.unexpectedNullCharacter),t.systemId+=`�`;break;case H.GREATER_THAN_SIGN:this._err(U.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case H.SPACE:case H.LINE_FEED:case H.TABULATION:case H.FORM_FEED:break;case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.EOF:this._err(U.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(U.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=J.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case H.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=J.DATA;break;case H.NULL:this._err(U.unexpectedNullCharacter);break;case H.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case H.RIGHT_SQUARE_BRACKET:this.state=J.CDATA_SECTION_BRACKET;break;case H.EOF:this._err(U.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===H.RIGHT_SQUARE_BRACKET?this.state=J.CDATA_SECTION_END:(this._emitChars(`]`),this.state=J.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case H.GREATER_THAN_SIGN:this.state=J.DATA;break;case H.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=J.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(H.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&jA(this.preprocessor.peek(1))?J.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){jA(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===H.SEMICOLON&&this._err(U.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},LA=new Set([K.DD,K.DT,K.LI,K.OPTGROUP,K.OPTION,K.P,K.RB,K.RP,K.RT,K.RTC]),RA=new Set([...LA,K.CAPTION,K.COLGROUP,K.TBODY,K.TD,K.TFOOT,K.TH,K.THEAD,K.TR]),zA=new Set([K.APPLET,K.CAPTION,K.HTML,K.MARQUEE,K.OBJECT,K.TABLE,K.TD,K.TEMPLATE,K.TH]),BA=new Set([...zA,K.OL,K.UL]),VA=new Set([...zA,K.BUTTON]),HA=new Set([K.ANNOTATION_XML,K.MI,K.MN,K.MO,K.MS,K.MTEXT]),UA=new Set([K.DESC,K.FOREIGN_OBJECT,K.TITLE]),WA=new Set([K.TR,K.TEMPLATE,K.HTML]),GA=new Set([K.TBODY,K.TFOOT,K.THEAD,K.TEMPLATE,K.HTML]),KA=new Set([K.TABLE,K.TEMPLATE,K.HTML]),qA=new Set([K.TD,K.TH]),JA=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=K.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===K.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==W.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(TA,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(qA,W.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(KA,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(GA,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(WA,W.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===K.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===K.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case W.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case W.SVG:if(UA.has(r))return!1;break;case W.MATHML:if(HA.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,zA)}hasInListItemScope(e){return this.hasInDynamicScope(e,BA)}hasInButtonScope(e){return this.hasInDynamicScope(e,VA)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case W.HTML:if(TA.has(t))return!0;if(zA.has(t))return!1;break;case W.SVG:if(UA.has(t))return!1;break;case W.MATHML:if(HA.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case e:return!0;case K.TABLE:case K.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===W.HTML)switch(this.tagIDs[e]){case K.TBODY:case K.THEAD:case K.TFOOT:return!0;case K.TABLE:case K.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case e:return!0;case K.OPTION:case K.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&LA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&RA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&RA.has(this.currentTagId);)this.pop()}},YA=3,XA;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(XA||={});var ZA={type:XA.Marker},QA=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===XA.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<YA)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<YA)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=YA&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(ZA)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:XA.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:XA.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(ZA);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===XA.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===XA.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===XA.Element&&t.element===e)}},$A={createDocument(){return{nodeName:`#document`,mode:xA.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};$A.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if($A.isTextNode(n)){n.value+=t;return}}$A.appendChild(e,$A.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&$A.isTextNode(r)?r.value+=t:$A.insertBefore(e,$A.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},ej=`html`,tj=`about:legacy-compat`,nj=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,rj=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),ij=[...rj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],aj=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),oj=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],sj=[...oj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function cj(e,t){return t.some(t=>e.startsWith(t))}function lj(e){return e.name===ej&&e.publicId===null&&(e.systemId===null||e.systemId===tj)}function uj(e){if(e.name!==ej)return xA.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===nj)return xA.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),aj.has(n))return xA.QUIRKS;let e=t===null?ij:rj;if(cj(n,e))return xA.QUIRKS;if(e=t===null?oj:sj,cj(n,e))return xA.LIMITED_QUIRKS}return xA.NO_QUIRKS}var dj={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},fj=`definitionurl`,pj=`definitionURL`,mj=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),hj=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:W.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:W.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:W.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:W.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:W.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:W.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:W.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:W.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:W.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:W.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:W.XMLNS}]]),gj=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),_j=new Set([K.B,K.BIG,K.BLOCKQUOTE,K.BODY,K.BR,K.CENTER,K.CODE,K.DD,K.DIV,K.DL,K.DT,K.EM,K.EMBED,K.H1,K.H2,K.H3,K.H4,K.H5,K.H6,K.HEAD,K.HR,K.I,K.IMG,K.LI,K.LISTING,K.MENU,K.META,K.NOBR,K.OL,K.P,K.PRE,K.RUBY,K.S,K.SMALL,K.SPAN,K.STRONG,K.STRIKE,K.SUB,K.SUP,K.TABLE,K.TT,K.U,K.UL,K.VAR]);function vj(e){let t=e.tagID;return t===K.FONT&&e.attrs.some(({name:e})=>e===bA.COLOR||e===bA.SIZE||e===bA.FACE)||_j.has(t)}function yj(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===fj){e.attrs[t].name=pj;break}}function bj(e){for(let t=0;t<e.attrs.length;t++){let n=mj.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function xj(e){for(let t=0;t<e.attrs.length;t++){let n=hj.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Sj(e){let t=gj.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=CA(e.tagName))}function Cj(e,t){return t===W.MATHML&&(e===K.MI||e===K.MO||e===K.MN||e===K.MS||e===K.MTEXT)}function wj(e,t,n){if(t===W.MATHML&&e===K.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===bA.ENCODING){let t=n[e].value.toLowerCase();return t===dj.TEXT_HTML||t===dj.APPLICATION_XML}}return t===W.SVG&&(e===K.FOREIGN_OBJECT||e===K.DESC||e===K.TITLE)}function Tj(e,t,n,r){return(!r||r===W.HTML)&&wj(e,t,n)||(!r||r===W.MATHML)&&Cj(e,t)}var Ej=`hidden`,Dj=8,Oj=3,Y;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(Y||={});var kj={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Aj=new Set([K.TABLE,K.TBODY,K.TFOOT,K.THEAD,K.TR]),jj={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:$A,onParseError:null},Mj=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=Y.INITIAL,this.originalInsertionMode=Y.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...jj,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new IA(this.options,this),this.activeFormattingElements=new QA(this.treeAdapter),this.fragmentContextID=n?CA(this.treeAdapter.getTagName(n)):K.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new JA(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...jj,...t};e??=n.treeAdapter.createElement(G.TEMPLATE,W.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,W.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===K.TEMPLATE&&i.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??kj,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===W.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,W.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Y.TEXT}switchToPlaintextParsing(){this.insertionMode=Y.TEXT,this.originalInsertionMode=Y.IN_BODY,this.tokenizer.state=EA.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===G.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case K.TITLE:case K.TEXTAREA:this.tokenizer.state=EA.RCDATA;break;case K.STYLE:case K.XMP:case K.IFRAME:case K.NOEMBED:case K.NOFRAMES:case K.NOSCRIPT:this.tokenizer.state=EA.RAWTEXT;break;case K.SCRIPT:this.tokenizer.state=EA.SCRIPT_DATA;break;case K.PLAINTEXT:this.tokenizer.state=EA.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,W.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,W.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(G.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,K.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===iA.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===K.SVG&&this.treeAdapter.getTagName(t)===G.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===W.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===K.MGLYPH||e.tagID===K.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,W.HTML)}_processToken(e){switch(e.type){case iA.CHARACTER:this.onCharacter(e);break;case iA.NULL_CHARACTER:this.onNullCharacter(e);break;case iA.COMMENT:this.onComment(e);break;case iA.DOCTYPE:this.onDoctype(e);break;case iA.START_TAG:this._processStartTag(e);break;case iA.END_TAG:this.onEndTag(e);break;case iA.EOF:this.onEof(e);break;case iA.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return Tj(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===XA.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(K.P),this.openElements.popUntilTagNamePopped(K.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case K.TR:this.insertionMode=Y.IN_ROW;return;case K.TBODY:case K.THEAD:case K.TFOOT:this.insertionMode=Y.IN_TABLE_BODY;return;case K.CAPTION:this.insertionMode=Y.IN_CAPTION;return;case K.COLGROUP:this.insertionMode=Y.IN_COLUMN_GROUP;return;case K.TABLE:this.insertionMode=Y.IN_TABLE;return;case K.BODY:this.insertionMode=Y.IN_BODY;return;case K.FRAMESET:this.insertionMode=Y.IN_FRAMESET;return;case K.SELECT:this._resetInsertionModeForSelect(e);return;case K.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case K.HTML:this.insertionMode=this.headElement?Y.AFTER_HEAD:Y.BEFORE_HEAD;return;case K.TD:case K.TH:if(e>0){this.insertionMode=Y.IN_CELL;return}break;case K.HEAD:if(e>0){this.insertionMode=Y.IN_HEAD;return}break}this.insertionMode=Y.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===K.TEMPLATE)break;if(e===K.TABLE){this.insertionMode=Y.IN_SELECT_IN_TABLE;return}}this.insertionMode=Y.IN_SELECT}_isElementCausesFosterParenting(e){return Aj.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case K.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case K.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return wA[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){XN(this,e);return}switch(this.insertionMode){case Y.INITIAL:Gj(this,e);break;case Y.BEFORE_HTML:Jj(this,e);break;case Y.BEFORE_HEAD:Zj(this,e);break;case Y.IN_HEAD:tM(this,e);break;case Y.IN_HEAD_NO_SCRIPT:iM(this,e);break;case Y.AFTER_HEAD:sM(this,e);break;case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:uM(this,e);break;case Y.TEXT:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:aN(this,e);break;case Y.IN_TABLE_TEXT:vN(this,e);break;case Y.IN_COLUMN_GROUP:TN(this,e);break;case Y.AFTER_BODY:VN(this,e);break;case Y.AFTER_AFTER_BODY:qN(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){YN(this,e);return}switch(this.insertionMode){case Y.INITIAL:Gj(this,e);break;case Y.BEFORE_HTML:Jj(this,e);break;case Y.BEFORE_HEAD:Zj(this,e);break;case Y.IN_HEAD:tM(this,e);break;case Y.IN_HEAD_NO_SCRIPT:iM(this,e);break;case Y.AFTER_HEAD:sM(this,e);break;case Y.TEXT:this._insertCharacters(e);break;case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:aN(this,e);break;case Y.IN_COLUMN_GROUP:TN(this,e);break;case Y.AFTER_BODY:VN(this,e);break;case Y.AFTER_AFTER_BODY:qN(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Bj(this,e);return}switch(this.insertionMode){case Y.INITIAL:case Y.BEFORE_HTML:case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_TEMPLATE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:Bj(this,e);break;case Y.IN_TABLE_TEXT:yN(this,e);break;case Y.AFTER_BODY:Vj(this,e);break;case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:Hj(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case Y.INITIAL:Wj(this,e);break;case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:this._err(e,U.misplacedDoctype);break;case Y.IN_TABLE_TEXT:yN(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,U.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?QN(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case Y.INITIAL:Gj(this,e);break;case Y.BEFORE_HTML:Kj(this,e);break;case Y.BEFORE_HEAD:Yj(this,e);break;case Y.IN_HEAD:Qj(this,e);break;case Y.IN_HEAD_NO_SCRIPT:nM(this,e);break;case Y.AFTER_HEAD:aM(this,e);break;case Y.IN_BODY:UM(this,e);break;case Y.IN_TABLE:mN(this,e);break;case Y.IN_TABLE_TEXT:yN(this,e);break;case Y.IN_CAPTION:xN(this,e);break;case Y.IN_COLUMN_GROUP:CN(this,e);break;case Y.IN_TABLE_BODY:EN(this,e);break;case Y.IN_ROW:ON(this,e);break;case Y.IN_CELL:AN(this,e);break;case Y.IN_SELECT:MN(this,e);break;case Y.IN_SELECT_IN_TABLE:PN(this,e);break;case Y.IN_TEMPLATE:IN(this,e);break;case Y.AFTER_BODY:zN(this,e);break;case Y.IN_FRAMESET:HN(this,e);break;case Y.AFTER_FRAMESET:WN(this,e);break;case Y.AFTER_AFTER_BODY:KN(this,e);break;case Y.AFTER_AFTER_FRAMESET:JN(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?$N(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case Y.INITIAL:Gj(this,e);break;case Y.BEFORE_HTML:qj(this,e);break;case Y.BEFORE_HEAD:Xj(this,e);break;case Y.IN_HEAD:$j(this,e);break;case Y.IN_HEAD_NO_SCRIPT:rM(this,e);break;case Y.AFTER_HEAD:oM(this,e);break;case Y.IN_BODY:tN(this,e);break;case Y.TEXT:rN(this,e);break;case Y.IN_TABLE:hN(this,e);break;case Y.IN_TABLE_TEXT:yN(this,e);break;case Y.IN_CAPTION:SN(this,e);break;case Y.IN_COLUMN_GROUP:wN(this,e);break;case Y.IN_TABLE_BODY:DN(this,e);break;case Y.IN_ROW:kN(this,e);break;case Y.IN_CELL:jN(this,e);break;case Y.IN_SELECT:NN(this,e);break;case Y.IN_SELECT_IN_TABLE:FN(this,e);break;case Y.IN_TEMPLATE:LN(this,e);break;case Y.AFTER_BODY:BN(this,e);break;case Y.IN_FRAMESET:UN(this,e);break;case Y.AFTER_FRAMESET:GN(this,e);break;case Y.AFTER_AFTER_BODY:qN(this,e);break;default:}}onEof(e){switch(this.insertionMode){case Y.INITIAL:Gj(this,e);break;case Y.BEFORE_HTML:Jj(this,e);break;case Y.BEFORE_HEAD:Zj(this,e);break;case Y.IN_HEAD:tM(this,e);break;case Y.IN_HEAD_NO_SCRIPT:iM(this,e);break;case Y.AFTER_HEAD:sM(this,e);break;case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:nN(this,e);break;case Y.TEXT:iN(this,e);break;case Y.IN_TABLE_TEXT:yN(this,e);break;case Y.IN_TEMPLATE:RN(this,e);break;case Y.AFTER_BODY:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:Uj(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===H.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.TEXT:case Y.IN_COLUMN_GROUP:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:this._insertCharacters(e);break;case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:case Y.AFTER_BODY:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:lM(this,e);break;case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:aN(this,e);break;case Y.IN_TABLE_TEXT:_N(this,e);break;default:}}};function Nj(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):eN(e,t),n}function Pj(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Fj(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Oj;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Ij(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Ij(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Lj(e,t,n){let r=CA(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===K.TEMPLATE&&i===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Rj(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function zj(e,t){for(let n=0;n<Dj;n++){let n=Nj(e,t);if(!n)break;let r=Pj(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=Fj(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&Lj(e,a,i),Rj(e,r,n)}}function Bj(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Vj(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Hj(e,t){e._appendCommentNode(t,e.document)}function Uj(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Wj(e,t){e._setDocumentType(t);let n=t.forceQuirks?xA.QUIRKS:uj(t);lj(t)||e._err(t,U.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Y.BEFORE_HTML}function Gj(e,t){e._err(t,U.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,xA.QUIRKS),e.insertionMode=Y.BEFORE_HTML,e._processToken(t)}function Kj(e,t){t.tagID===K.HTML?(e._insertElement(t,W.HTML),e.insertionMode=Y.BEFORE_HEAD):Jj(e,t)}function qj(e,t){let n=t.tagID;(n===K.HTML||n===K.HEAD||n===K.BODY||n===K.BR)&&Jj(e,t)}function Jj(e,t){e._insertFakeRootElement(),e.insertionMode=Y.BEFORE_HEAD,e._processToken(t)}function Yj(e,t){switch(t.tagID){case K.HTML:UM(e,t);break;case K.HEAD:e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD;break;default:Zj(e,t)}}function Xj(e,t){let n=t.tagID;n===K.HEAD||n===K.BODY||n===K.HTML||n===K.BR?Zj(e,t):e._err(t,U.endTagWithoutMatchingOpenElement)}function Zj(e,t){e._insertFakeElement(G.HEAD,K.HEAD),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD,e._processToken(t)}function Qj(e,t){switch(t.tagID){case K.HTML:UM(e,t);break;case K.BASE:case K.BASEFONT:case K.BGSOUND:case K.LINK:case K.META:e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.TITLE:e._switchToTextParsing(t,EA.RCDATA);break;case K.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,EA.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=Y.IN_HEAD_NO_SCRIPT);break;case K.NOFRAMES:case K.STYLE:e._switchToTextParsing(t,EA.RAWTEXT);break;case K.SCRIPT:e._switchToTextParsing(t,EA.SCRIPT_DATA);break;case K.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE);break;case K.HEAD:e._err(t,U.misplacedStartTagForHeadElement);break;default:tM(e,t)}}function $j(e,t){switch(t.tagID){case K.HEAD:e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD;break;case K.BODY:case K.BR:case K.HTML:tM(e,t);break;case K.TEMPLATE:eM(e,t);break;default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function eM(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==K.TEMPLATE&&e._err(t,U.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(K.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,U.endTagWithoutMatchingOpenElement)}function tM(e,t){e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD,e._processToken(t)}function nM(e,t){switch(t.tagID){case K.HTML:UM(e,t);break;case K.BASEFONT:case K.BGSOUND:case K.HEAD:case K.LINK:case K.META:case K.NOFRAMES:case K.STYLE:Qj(e,t);break;case K.NOSCRIPT:e._err(t,U.nestedNoscriptInHead);break;default:iM(e,t)}}function rM(e,t){switch(t.tagID){case K.NOSCRIPT:e.openElements.pop(),e.insertionMode=Y.IN_HEAD;break;case K.BR:iM(e,t);break;default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function iM(e,t){let n=t.type===iA.EOF?U.openElementsLeftAfterEof:U.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Y.IN_HEAD,e._processToken(t)}function aM(e,t){switch(t.tagID){case K.HTML:UM(e,t);break;case K.BODY:e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_BODY;break;case K.FRAMESET:e._insertElement(t,W.HTML),e.insertionMode=Y.IN_FRAMESET;break;case K.BASE:case K.BASEFONT:case K.BGSOUND:case K.LINK:case K.META:case K.NOFRAMES:case K.SCRIPT:case K.STYLE:case K.TEMPLATE:case K.TITLE:e._err(t,U.abandonedHeadElementChild),e.openElements.push(e.headElement,K.HEAD),Qj(e,t),e.openElements.remove(e.headElement);break;case K.HEAD:e._err(t,U.misplacedStartTagForHeadElement);break;default:sM(e,t)}}function oM(e,t){switch(t.tagID){case K.BODY:case K.HTML:case K.BR:sM(e,t);break;case K.TEMPLATE:eM(e,t);break;default:e._err(t,U.endTagWithoutMatchingOpenElement)}}function sM(e,t){e._insertFakeElement(G.BODY,K.BODY),e.insertionMode=Y.IN_BODY,cM(e,t)}function cM(e,t){switch(t.type){case iA.CHARACTER:uM(e,t);break;case iA.WHITESPACE_CHARACTER:lM(e,t);break;case iA.COMMENT:Bj(e,t);break;case iA.START_TAG:UM(e,t);break;case iA.END_TAG:tN(e,t);break;case iA.EOF:nN(e,t);break;default:}}function lM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function uM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function dM(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function fM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function pM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_FRAMESET)}function mM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function hM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&TA.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function gM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function _M(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function vM(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===K.LI&&r===K.LI||(n===K.DD||n===K.DT)&&(r===K.DD||r===K.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==K.ADDRESS&&r!==K.DIV&&r!==K.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function yM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=EA.PLAINTEXT}function bM(e,t){e.openElements.hasInScope(K.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function xM(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(G.A);n&&(zj(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function SM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CM(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(K.NOBR)&&(zj(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function wM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function TM(e,t){e.treeAdapter.getDocumentMode(e.document)!==xA.QUIRKS&&e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_TABLE}function EM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function DM(e){let t=aA(e,bA.TYPE);return t!=null&&t.toLowerCase()===Ej}function OM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),DM(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function kM(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function AM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function jM(e,t){t.tagName=G.IMG,t.tagID=K.IMG,EM(e,t)}function MM(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=EA.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Y.TEXT}function NM(e,t){e.openElements.hasInButtonScope(K.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,EA.RAWTEXT)}function PM(e,t){e.framesetOk=!1,e._switchToTextParsing(t,EA.RAWTEXT)}function FM(e,t){e._switchToTextParsing(t,EA.RAWTEXT)}function IM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Y.IN_TABLE||e.insertionMode===Y.IN_CAPTION||e.insertionMode===Y.IN_TABLE_BODY||e.insertionMode===Y.IN_ROW||e.insertionMode===Y.IN_CELL?Y.IN_SELECT_IN_TABLE:Y.IN_SELECT}function LM(e,t){e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function RM(e,t){e.openElements.hasInScope(K.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function zM(e,t){e.openElements.hasInScope(K.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(K.RTC),e._insertElement(t,W.HTML)}function BM(e,t){e._reconstructActiveFormattingElements(),yj(t),xj(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function VM(e,t){e._reconstructActiveFormattingElements(),bj(t),xj(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function HM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function UM(e,t){switch(t.tagID){case K.I:case K.S:case K.B:case K.U:case K.EM:case K.TT:case K.BIG:case K.CODE:case K.FONT:case K.SMALL:case K.STRIKE:case K.STRONG:SM(e,t);break;case K.A:xM(e,t);break;case K.H1:case K.H2:case K.H3:case K.H4:case K.H5:case K.H6:hM(e,t);break;case K.P:case K.DL:case K.OL:case K.UL:case K.DIV:case K.DIR:case K.NAV:case K.MAIN:case K.MENU:case K.ASIDE:case K.CENTER:case K.FIGURE:case K.FOOTER:case K.HEADER:case K.HGROUP:case K.DIALOG:case K.DETAILS:case K.ADDRESS:case K.ARTICLE:case K.SEARCH:case K.SECTION:case K.SUMMARY:case K.FIELDSET:case K.BLOCKQUOTE:case K.FIGCAPTION:mM(e,t);break;case K.LI:case K.DD:case K.DT:vM(e,t);break;case K.BR:case K.IMG:case K.WBR:case K.AREA:case K.EMBED:case K.KEYGEN:EM(e,t);break;case K.HR:AM(e,t);break;case K.RB:case K.RTC:RM(e,t);break;case K.RT:case K.RP:zM(e,t);break;case K.PRE:case K.LISTING:gM(e,t);break;case K.XMP:NM(e,t);break;case K.SVG:VM(e,t);break;case K.HTML:dM(e,t);break;case K.BASE:case K.LINK:case K.META:case K.STYLE:case K.TITLE:case K.SCRIPT:case K.BGSOUND:case K.BASEFONT:case K.TEMPLATE:Qj(e,t);break;case K.BODY:fM(e,t);break;case K.FORM:_M(e,t);break;case K.NOBR:CM(e,t);break;case K.MATH:BM(e,t);break;case K.TABLE:TM(e,t);break;case K.INPUT:OM(e,t);break;case K.PARAM:case K.TRACK:case K.SOURCE:kM(e,t);break;case K.IMAGE:jM(e,t);break;case K.BUTTON:bM(e,t);break;case K.APPLET:case K.OBJECT:case K.MARQUEE:wM(e,t);break;case K.IFRAME:PM(e,t);break;case K.SELECT:IM(e,t);break;case K.OPTION:case K.OPTGROUP:LM(e,t);break;case K.NOEMBED:case K.NOFRAMES:FM(e,t);break;case K.FRAMESET:pM(e,t);break;case K.TEXTAREA:MM(e,t);break;case K.NOSCRIPT:e.options.scriptingEnabled?FM(e,t):HM(e,t);break;case K.PLAINTEXT:yM(e,t);break;case K.COL:case K.TH:case K.TD:case K.TR:case K.HEAD:case K.FRAME:case K.TBODY:case K.TFOOT:case K.THEAD:case K.CAPTION:case K.COLGROUP:break;default:HM(e,t)}}function WM(e,t){if(e.openElements.hasInScope(K.BODY)&&(e.insertionMode=Y.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function GM(e,t){e.openElements.hasInScope(K.BODY)&&(e.insertionMode=Y.AFTER_BODY,BN(e,t))}function KM(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function qM(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(K.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(K.FORM):n&&e.openElements.remove(n))}function JM(e){e.openElements.hasInButtonScope(K.P)||e._insertFakeElement(G.P,K.P),e._closePElement()}function YM(e){e.openElements.hasInListItemScope(K.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(K.LI),e.openElements.popUntilTagNamePopped(K.LI))}function XM(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function ZM(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function QM(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function $M(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(G.BR,K.BR),e.openElements.pop(),e.framesetOk=!1}function eN(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==K.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function tN(e,t){switch(t.tagID){case K.A:case K.B:case K.I:case K.S:case K.U:case K.EM:case K.TT:case K.BIG:case K.CODE:case K.FONT:case K.NOBR:case K.SMALL:case K.STRIKE:case K.STRONG:zj(e,t);break;case K.P:JM(e);break;case K.DL:case K.UL:case K.OL:case K.DIR:case K.DIV:case K.NAV:case K.PRE:case K.MAIN:case K.MENU:case K.ASIDE:case K.BUTTON:case K.CENTER:case K.FIGURE:case K.FOOTER:case K.HEADER:case K.HGROUP:case K.DIALOG:case K.ADDRESS:case K.ARTICLE:case K.DETAILS:case K.SEARCH:case K.SECTION:case K.SUMMARY:case K.LISTING:case K.FIELDSET:case K.BLOCKQUOTE:case K.FIGCAPTION:KM(e,t);break;case K.LI:YM(e);break;case K.DD:case K.DT:XM(e,t);break;case K.H1:case K.H2:case K.H3:case K.H4:case K.H5:case K.H6:ZM(e);break;case K.BR:$M(e);break;case K.BODY:WM(e,t);break;case K.HTML:GM(e,t);break;case K.FORM:qM(e);break;case K.APPLET:case K.OBJECT:case K.MARQUEE:QM(e,t);break;case K.TEMPLATE:eM(e,t);break;default:eN(e,t)}}function nN(e,t){e.tmplInsertionModeStack.length>0?RN(e,t):Uj(e,t)}function rN(e,t){var n;t.tagID===K.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function iN(e,t){e._err(t,U.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function aN(e,t){if(e.openElements.currentTagId!==void 0&&Aj.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Y.IN_TABLE_TEXT,t.type){case iA.CHARACTER:vN(e,t);break;case iA.WHITESPACE_CHARACTER:_N(e,t);break}else gN(e,t)}function oN(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_CAPTION}function sN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_COLUMN_GROUP}function cN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.COLGROUP,K.COLGROUP),e.insertionMode=Y.IN_COLUMN_GROUP,CN(e,t)}function lN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_TABLE_BODY}function uN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(G.TBODY,K.TBODY),e.insertionMode=Y.IN_TABLE_BODY,EN(e,t)}function dN(e,t){e.openElements.hasInTableScope(K.TABLE)&&(e.openElements.popUntilTagNamePopped(K.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function fN(e,t){DM(t)?e._appendElement(t,W.HTML):gN(e,t),t.ackSelfClosing=!0}function pN(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function mN(e,t){switch(t.tagID){case K.TD:case K.TH:case K.TR:uN(e,t);break;case K.STYLE:case K.SCRIPT:case K.TEMPLATE:Qj(e,t);break;case K.COL:cN(e,t);break;case K.FORM:pN(e,t);break;case K.TABLE:dN(e,t);break;case K.TBODY:case K.TFOOT:case K.THEAD:lN(e,t);break;case K.INPUT:fN(e,t);break;case K.CAPTION:oN(e,t);break;case K.COLGROUP:sN(e,t);break;default:gN(e,t)}}function hN(e,t){switch(t.tagID){case K.TABLE:e.openElements.hasInTableScope(K.TABLE)&&(e.openElements.popUntilTagNamePopped(K.TABLE),e._resetInsertionMode());break;case K.TEMPLATE:eM(e,t);break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:case K.TBODY:case K.TD:case K.TFOOT:case K.TH:case K.THEAD:case K.TR:break;default:gN(e,t)}}function gN(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,cM(e,t),e.fosterParentingEnabled=n}function _N(e,t){e.pendingCharacterTokens.push(t)}function vN(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function yN(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)gN(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var bN=new Set([K.CAPTION,K.COL,K.COLGROUP,K.TBODY,K.TD,K.TFOOT,K.TH,K.THEAD,K.TR]);function xN(e,t){let n=t.tagID;bN.has(n)?e.openElements.hasInTableScope(K.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,mN(e,t)):UM(e,t)}function SN(e,t){let n=t.tagID;switch(n){case K.CAPTION:case K.TABLE:e.openElements.hasInTableScope(K.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(K.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,n===K.TABLE&&hN(e,t));break;case K.BODY:case K.COL:case K.COLGROUP:case K.HTML:case K.TBODY:case K.TD:case K.TFOOT:case K.TH:case K.THEAD:case K.TR:break;default:tN(e,t)}}function CN(e,t){switch(t.tagID){case K.HTML:UM(e,t);break;case K.COL:e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.TEMPLATE:Qj(e,t);break;default:TN(e,t)}}function wN(e,t){switch(t.tagID){case K.COLGROUP:e.openElements.currentTagId===K.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break;case K.TEMPLATE:eM(e,t);break;case K.COL:break;default:TN(e,t)}}function TN(e,t){e.openElements.currentTagId===K.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE,e._processToken(t))}function EN(e,t){switch(t.tagID){case K.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_ROW;break;case K.TH:case K.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(G.TR,K.TR),e.insertionMode=Y.IN_ROW,ON(e,t);break;case K.CAPTION:case K.COL:case K.COLGROUP:case K.TBODY:case K.TFOOT:case K.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,mN(e,t));break;default:mN(e,t)}}function DN(e,t){let n=t.tagID;switch(t.tagID){case K.TBODY:case K.TFOOT:case K.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break;case K.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,hN(e,t));break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:case K.TD:case K.TH:case K.TR:break;default:hN(e,t)}}function ON(e,t){switch(t.tagID){case K.TH:case K.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=Y.IN_CELL,e.activeFormattingElements.insertMarker();break;case K.CAPTION:case K.COL:case K.COLGROUP:case K.TBODY:case K.TFOOT:case K.THEAD:case K.TR:e.openElements.hasInTableScope(K.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,EN(e,t));break;default:mN(e,t)}}function kN(e,t){switch(t.tagID){case K.TR:e.openElements.hasInTableScope(K.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY);break;case K.TABLE:e.openElements.hasInTableScope(K.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,DN(e,t));break;case K.TBODY:case K.TFOOT:case K.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(K.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,DN(e,t));break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:case K.TD:case K.TH:break;default:hN(e,t)}}function AN(e,t){let n=t.tagID;bN.has(n)?(e.openElements.hasInTableScope(K.TD)||e.openElements.hasInTableScope(K.TH))&&(e._closeTableCell(),ON(e,t)):UM(e,t)}function jN(e,t){let n=t.tagID;switch(n){case K.TD:case K.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_ROW);break;case K.TABLE:case K.TBODY:case K.TFOOT:case K.THEAD:case K.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),kN(e,t));break;case K.BODY:case K.CAPTION:case K.COL:case K.COLGROUP:case K.HTML:break;default:tN(e,t)}}function MN(e,t){switch(t.tagID){case K.HTML:UM(e,t);break;case K.OPTION:e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break;case K.OPTGROUP:e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e.openElements.currentTagId===K.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break;case K.HR:e.openElements.currentTagId===K.OPTION&&e.openElements.pop(),e.openElements.currentTagId===K.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.INPUT:case K.KEYGEN:case K.TEXTAREA:case K.SELECT:e.openElements.hasInSelectScope(K.SELECT)&&(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode(),t.tagID!==K.SELECT&&e._processStartTag(t));break;case K.SCRIPT:case K.TEMPLATE:Qj(e,t);break;default:}}function NN(e,t){switch(t.tagID){case K.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===K.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===K.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===K.OPTGROUP&&e.openElements.pop();break;case K.OPTION:e.openElements.currentTagId===K.OPTION&&e.openElements.pop();break;case K.SELECT:e.openElements.hasInSelectScope(K.SELECT)&&(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode());break;case K.TEMPLATE:eM(e,t);break;default:}}function PN(e,t){let n=t.tagID;n===K.CAPTION||n===K.TABLE||n===K.TBODY||n===K.TFOOT||n===K.THEAD||n===K.TR||n===K.TD||n===K.TH?(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode(),e._processStartTag(t)):MN(e,t)}function FN(e,t){let n=t.tagID;n===K.CAPTION||n===K.TABLE||n===K.TBODY||n===K.TFOOT||n===K.THEAD||n===K.TR||n===K.TD||n===K.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(K.SELECT),e._resetInsertionMode(),e.onEndTag(t)):NN(e,t)}function IN(e,t){switch(t.tagID){case K.BASE:case K.BASEFONT:case K.BGSOUND:case K.LINK:case K.META:case K.NOFRAMES:case K.SCRIPT:case K.STYLE:case K.TEMPLATE:case K.TITLE:Qj(e,t);break;case K.CAPTION:case K.COLGROUP:case K.TBODY:case K.TFOOT:case K.THEAD:e.tmplInsertionModeStack[0]=Y.IN_TABLE,e.insertionMode=Y.IN_TABLE,mN(e,t);break;case K.COL:e.tmplInsertionModeStack[0]=Y.IN_COLUMN_GROUP,e.insertionMode=Y.IN_COLUMN_GROUP,CN(e,t);break;case K.TR:e.tmplInsertionModeStack[0]=Y.IN_TABLE_BODY,e.insertionMode=Y.IN_TABLE_BODY,EN(e,t);break;case K.TD:case K.TH:e.tmplInsertionModeStack[0]=Y.IN_ROW,e.insertionMode=Y.IN_ROW,ON(e,t);break;default:e.tmplInsertionModeStack[0]=Y.IN_BODY,e.insertionMode=Y.IN_BODY,UM(e,t)}}function LN(e,t){t.tagID===K.TEMPLATE&&eM(e,t)}function RN(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(K.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Uj(e,t)}function zN(e,t){t.tagID===K.HTML?UM(e,t):VN(e,t)}function BN(e,t){if(t.tagID===K.HTML){if(e.fragmentContext||(e.insertionMode=Y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===K.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else VN(e,t)}function VN(e,t){e.insertionMode=Y.IN_BODY,cM(e,t)}function HN(e,t){switch(t.tagID){case K.HTML:UM(e,t);break;case K.FRAMESET:e._insertElement(t,W.HTML);break;case K.FRAME:e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break;case K.NOFRAMES:Qj(e,t);break;default:}}function UN(e,t){t.tagID===K.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==K.FRAMESET&&(e.insertionMode=Y.AFTER_FRAMESET))}function WN(e,t){switch(t.tagID){case K.HTML:UM(e,t);break;case K.NOFRAMES:Qj(e,t);break;default:}}function GN(e,t){t.tagID===K.HTML&&(e.insertionMode=Y.AFTER_AFTER_FRAMESET)}function KN(e,t){t.tagID===K.HTML?UM(e,t):qN(e,t)}function qN(e,t){e.insertionMode=Y.IN_BODY,cM(e,t)}function JN(e,t){switch(t.tagID){case K.HTML:UM(e,t);break;case K.NOFRAMES:Qj(e,t);break;default:}}function YN(e,t){t.chars=`�`,e._insertCharacters(t)}function XN(e,t){e._insertCharacters(t),e.framesetOk=!1}function ZN(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function QN(e,t){if(vj(t))ZN(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?yj(t):r===W.SVG&&(Sj(t),bj(t)),xj(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function $N(e,t){if(t.tagID===K.P||t.tagID===K.BR){ZN(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===W.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([G.AREA,G.BASE,G.BASEFONT,G.BGSOUND,G.BR,G.COL,G.EMBED,G.FRAME,G.HR,G.IMG,G.INPUT,G.KEYGEN,G.LINK,G.META,G.PARAM,G.SOURCE,G.TRACK,G.WBR]);var eP=nP(`end`),tP=nP(`start`);function nP(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function rP(e){let t=tP(e),n=eP(e);if(t&&n)return{start:t,end:n}}var iP=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,aP=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),oP={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function sP(e,t){let n=xP(e),r=Tg(`type`,{handlers:{root:lP,element:uP,text:dP,comment:mP,doctype:fP,raw:hP},unknown:gP}),i={parser:n?new Mj(oP):Mj.getFragmentParser(void 0,oP),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),_P(i,tP());let a=Ok(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&bm(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function cP(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function lP(e,t){cP(e.children,t)}function uP(e,t){yP(e,t),cP(e.children,t),bP(e,t)}function dP(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:iA.CHARACTER,chars:e.value,location:SP(e)};_P(t,tP(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function fP(e,t){let n={type:iA.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:SP(e)};_P(t,tP(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function pP(e,t){t.stitches=!0;let n=CP(e);`children`in e&&`children`in n&&(n.children=sP({type:`root`,children:e.children},t.options).children),mP({type:`comment`,value:{stitch:n}},t)}function mP(e,t){let n=e.value,r={type:iA.COMMENT,data:n,location:SP(e)};_P(t,tP(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function hP(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,vP(t,tP(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(iP,`&lt;$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function gP(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))pP(n,t);else{let e=``;throw aP.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function _P(e,t){vP(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=EA.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function vP(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function yP(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===EA.PLAINTEXT)return;_P(t,tP(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:nC.html;i===nC.html&&n===`svg`&&(i=nC.svg);let a=zk({...e,children:[]},{space:i===nC.svg?`svg`:`html`}),o={type:iA.START_TAG,tagName:n,tagID:CA(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:SP(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function bP(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&qh.includes(n)||t.parser.tokenizer.state===EA.PLAINTEXT)return;_P(t,eP(e));let r={type:iA.END_TAG,tagName:n,tagID:CA(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:SP(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===EA.RCDATA||t.parser.tokenizer.state===EA.RAWTEXT||t.parser.tokenizer.state===EA.SCRIPT_DATA)&&(t.parser.tokenizer.state=EA.DATA)}function xP(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function SP(e){let t=tP(e)||{line:void 0,column:void 0,offset:void 0},n=eP(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function CP(e){return`children`in e?wk({...e,children:[]}):wk(e)}function wP(e){return function(t,n){return sP(t,{...e,file:n})}}var TP=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],EP={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...TP,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...TP],h2:[[`className`,`sr-only`]],img:[...TP,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...TP,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...TP],table:[...TP],ul:[...TP,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},DP={}.hasOwnProperty;function OP(e,t){let n={type:`root`,children:[]},r=kP({schema:t?{...EP,...t}:EP,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function kP(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return AP(e,n);case`doctype`:return jP(e,n);case`element`:return MP(e,n);case`root`:return NP(e,n);case`text`:return PP(e,n);default:}}}function AP(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return VP(r,t),r}}function jP(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return VP(e,t),e}}function MP(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=FP(e,t.children),i=IP(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&DP.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return VP(o,t),o}function NP(e,t){let n={type:`root`,children:FP(e,t.children)};return VP(n,t),n}function PP(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return VP(n,t),n}function FP(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=kP(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function IP(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&DP.call(r,n)?r[n]:void 0,o=r&&DP.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(DP.call(s,l)){let t=s[l],n=LP(e,HP(a,l),l,t);n??=LP(e,HP(o,l),l,t),n!=null&&(c[l]=n)}if(i&&DP.call(i,n)){let e=i[n];for(l in e)DP.call(e,l)&&!DP.call(c,l)&&(c[l]=e[l])}return c}function LP(e,t,n,r){return t?Array.isArray(r)?RP(e,t,n,r):zP(e,t,n,r):void 0}function RP(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=zP(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function zP(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&BP(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function BP(e,t,n){let r=e.schema.protocols&&DP.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function VP(e,t){let n=rP(t);t.data&&(e.data=wk(t.data)),n&&(e.position=n)}function HP(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function UP(e){return function(t){return OP(t,e)}}function WP(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function GP(e,t,n){let r=lm((n||{}).ignore||[]),i=KP(t),a=-1;for(;++a<i.length;)ym(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function KP(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([qP(e[0]),JP(e[1])])}return t}function qP(e){return typeof e==`string`?new RegExp(WP(e),`g`):e}function JP(e){return typeof e==`function`?e:function(){return e}}var YP=`phrasing`,XP=[`autolink`,`link`,`image`,`label`];function ZP(){return{transforms:[aF],enter:{literalAutolink:$P,literalAutolinkEmail:eF,literalAutolinkHttp:eF,literalAutolinkWww:eF},exit:{literalAutolink:iF,literalAutolinkEmail:rF,literalAutolinkHttp:tF,literalAutolinkWww:nF}}}function QP(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:YP,notInConstruct:XP},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:YP,notInConstruct:XP},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:YP,notInConstruct:XP}]}}function $P(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function eF(e){this.config.enter.autolinkProtocol.call(this,e)}function tF(e){this.config.exit.autolinkProtocol.call(this,e)}function nF(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function rF(e){this.config.exit.autolinkEmail.call(this,e)}function iF(e){this.exit(e)}function aF(e){GP(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,oF],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,sF]],{ignore:[`link`,`linkReference`]})}function oF(e,t,n,r,i){let a=``;if(!uF(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!cF(n)))return!1;let o=lF(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function sF(e,t,n,r){return!uF(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function cF(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lF(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=qg(e,`(`),a=qg(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function uF(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Vp(n)||Bp(n))&&(!t||n!==47)}function dF(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}xF.peek=bF;function fF(){this.buffer()}function pF(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function mF(){this.buffer()}function hF(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function gF(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dF(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _F(e){this.exit(e)}function vF(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dF(this.sliceSerialize(e)).toLowerCase(),n.label=t}function yF(e){this.exit(e)}function bF(){return`[`}function xF(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function SF(){return{enter:{gfmFootnoteCallString:fF,gfmFootnoteCall:pF,gfmFootnoteDefinitionLabelString:mF,gfmFootnoteDefinition:hF},exit:{gfmFootnoteCallString:gF,gfmFootnoteCall:_F,gfmFootnoteDefinitionLabelString:vF,gfmFootnoteDefinition:yF}}}function die(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:xF},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
209
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?CF:fie))),s(),o}}function fie(e,t,n){return t===0?e:CF(e,t,n)}function CF(e,t,n){return(n?``:` `)+e}var pie=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];wF.peek=vie;function mie(){return{canContainEols:[`delete`],enter:{strikethrough:gie},exit:{strikethrough:_ie}}}function hie(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:pie}],handlers:{delete:wF}}}function gie(e){this.enter({type:`delete`,children:[]},e)}function _ie(e){this.exit(e)}function wF(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function vie(){return`~`}function yie(e){return e.length}function bie(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||yie,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=xie(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=TF(r[d]);else{let e=TF(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
210
+ `)}function xie(e){return e==null?``:String(e)}function TF(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Sie(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Cie);return i(),o}function Cie(e,t,n){return`>`+(n?``:` `)+e}function wie(e,t){return EF(e,t.inConstruct,!0)&&!EF(e,t.notInConstruct,!1)}function EF(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function DF(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
211
+ `&&wie(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
212
+ `}function Tie(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Eie(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Die(e,t,n,r){let i=Eie(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Tie(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Oie);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(vC(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
213
+ `,encode:["`"],...s.current()})),t()}return u+=s.move(`
214
+ `),a&&(u+=s.move(a+`
215
+ `)),u+=s.move(c),l(),u}function Oie(e,t,n){return(n?``:` `)+e}function OF(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function kie(e,t,n,r){let i=OF(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
216
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Aie(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function kF(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function AF(e){if(e===null||Rp(e)||Vp(e))return 1;if(Bp(e))return 2}function jF(e,t,n){let r=AF(e),i=AF(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}MF.peek=jie;function MF(e,t,n,r){let i=Aie(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=jF(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=kF(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=jF(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+kF(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function jie(e,t,n){return n.options.emphasis||`*`}var Mie={};function NF(e,t){let n=t||Mie;return PF(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function PF(e,t,n){if(Nie(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return FF(e.children,t,n)}return Array.isArray(e)?FF(e,t,n):``}function FF(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=PF(e[i],t,n);return r.join(``)}function Nie(e){return!!(e&&typeof e==`object`)}function Pie(e,t){let n=!1;return bm(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&NF(e)&&(t.options.setext||n))}function Fie(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Pie(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
217
+ `,after:`
218
+ `});return r(),t(),o+`
219
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
220
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
221
+ `,...a.current()});return/^[\t ]/.test(l)&&(l=kF(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}IF.peek=Iie;function IF(e){return e.value||``}function Iie(){return`<`}LF.peek=Lie;function LF(e,t,n,r){let i=OF(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Lie(){return`!`}RF.peek=Rie;function RF(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Rie(){return`!`}zF.peek=zie;function zF(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function zie(){return"`"}function BF(e,t){let n=NF(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}VF.peek=Bie;function VF(e,t,n,r){let i=OF(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(BF(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Bie(e,t,n){return BF(e,n)?`<`:`[`}HF.peek=Vie;function HF(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Vie(){return`[`}function UF(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Hie(e){let t=UF(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Uie(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function WF(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Wie(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Uie(n):UF(n),s=e.ordered?o===`.`?`)`:`.`:Hie(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),WF(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Gie(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Kie(e,t,n,r){let i=Gie(n),a=n.bulletCurrent||UF(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function qie(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Jie=lm([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Yie(e,t,n,r){return(e.children.some(function(e){return Jie(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Xie(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}GF.peek=Zie;function GF(e,t,n,r){let i=Xie(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=jF(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=kF(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=jF(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+kF(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Zie(e,t,n){return n.options.strong||`*`}function Qie(e,t,n,r){return n.safe(e.value,r)}function $ie(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function eae(e,t,n){let r=(WF(n)+(n.options.ruleSpaces?` `:``)).repeat($ie(n));return n.options.ruleSpaces?r.slice(0,-1):r}var KF={blockquote:Sie,break:DF,code:Die,definition:kie,emphasis:MF,hardBreak:DF,heading:Fie,html:IF,image:LF,imageReference:RF,inlineCode:zF,link:VF,linkReference:HF,list:Wie,listItem:Kie,paragraph:qie,root:Yie,strong:GF,text:Qie,thematicBreak:eae},qF=document.createElement(`i`);function JF(e){let t=`&`+e+`;`;qF.innerHTML=t;let n=qF.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function YF(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var tae=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nae(e){return e.replace(tae,rae)}function rae(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return YF(n.slice(t?2:1),t?16:10)}return JF(n)||e}function iae(){return{enter:{table:aae,tableData:ZF,tableHeader:ZF,tableRow:sae},exit:{codeText:cae,table:oae,tableData:XF,tableHeader:XF,tableRow:XF}}}function aae(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function oae(e){this.exit(e),this.data.inTable=void 0}function sae(e){this.enter({type:`tableRow`,children:[]},e)}function XF(e){this.exit(e)}function ZF(e){this.enter({type:`tableCell`,children:[]},e)}function cae(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,lae));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function lae(e,t){return t===`|`?t:e}function uae(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
222
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
223
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return bie(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=KF.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function dae(){return{exit:{taskListCheckValueChecked:QF,taskListCheckValueUnchecked:QF,paragraph:pae}}}function fae(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:mae}}}function QF(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function pae(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function mae(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=KF.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function hae(){return[ZP(),SF(),mie(),iae(),dae()]}function gae(e){return{extensions:[QP(),die(e),hie(),uae(e),fae()]}}var $F={}.hasOwnProperty;function eI(e){let t={},n=-1;for(;++n<e.length;)_ae(t,e[n]);return t}function _ae(e,t){let n;for(n in t){let r=($F.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){$F.call(r,a)||(r[a]=[]);let e=i[a];vae(r[a],Array.isArray(e)?e:e?[e]:[])}}}function vae(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);$p(e,0,0,r)}var yae={tokenize:Tae,partial:!0},tI={tokenize:Eae,partial:!0},nI={tokenize:Dae,partial:!0},rI={tokenize:Oae,partial:!0},bae={tokenize:kae,partial:!0},iI={name:`wwwAutolink`,tokenize:Cae,previous:lI},aI={name:`protocolAutolink`,tokenize:wae,previous:uI},oI={name:`emailAutolink`,tokenize:Sae,previous:dI},sI={};function xae(){return{text:sI}}for(var cI=48;cI<123;)sI[cI]=oI,cI++,cI===58?cI=65:cI===91&&(cI=97);sI[43]=oI,sI[45]=oI,sI[46]=oI,sI[95]=oI,sI[72]=[oI,aI],sI[104]=[oI,aI],sI[87]=[oI,iI],sI[119]=[oI,iI];function Sae(e,t,n){let r=this,i,a;return o;function o(t){return!fI(t)||!dI.call(r,r.previous)||pI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return fI(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(bae,u,l)(t):t===45||t===95||jp(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Ap(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Cae(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!lI.call(r,r.previous)||pI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(yae,e.attempt(tI,e.attempt(nI,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function wae(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&uI.call(r,r.previous)&&!pI(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Ap(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Np(t)||Rp(t)||Vp(t)||Bp(t)?n(t):e.attempt(tI,e.attempt(nI,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Tae(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Eae(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(rI,c,s)(t):t===null||Rp(t)||Vp(t)||t!==45&&Bp(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Dae(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(rI,t,a)(o):o===null||Rp(o)||Vp(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Oae(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||Rp(o)||Vp(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||Rp(e)||Vp(e)?t(e):r(e)}function a(e){return Ap(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Ap(t)?(e.consume(t),o):n(t)}}function kae(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return jp(e)?n(e):t(e)}}function lI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Rp(e)}function uI(e){return!Ap(e)}function dI(e){return!(e===47||fI(e))}function fI(e){return e===43||e===45||e===46||e===95||jp(e)}function pI(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function mI(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&jp(e.charCodeAt(n+1))&&jp(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}var hI={name:`attention`,resolveAll:Aae,tokenize:jae};function Aae(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};gI(d,-c),gI(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=em(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=em(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=em(l,tm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=em(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=em(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,$p(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function jae(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=AF(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=AF(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function gI(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Mae={name:`autolink`,tokenize:Nae};function Nae(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Ap(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||jp(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||jp(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Np(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Mp(t)?(e.consume(t),l):n(t)}function u(e){return jp(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||jp(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var _I={partial:!0,tokenize:Pae};function Pae(e,t,n){return r;function r(t){return zp(t)?yC(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Lp(e)?t(e):n(e)}}var vI={continuation:{tokenize:Iae},exit:Lae,name:`blockQuote`,tokenize:Fae};function Fae(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return zp(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Iae(e,t,n){let r=this;return i;function i(t){return zp(t)?yC(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(vI,t,n)(r)}}function Lae(e){e.exit(`blockQuote`)}var yI={name:`characterEscape`,tokenize:Rae};function Rae(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Ip(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var bI={name:`characterReference`,tokenize:zae};function zae(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=jp,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Fp,u):(e.enter(`characterReferenceValue`),a=7,o=Pp,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===jp&&!JF(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var xI={partial:!0,tokenize:Vae},SI={concrete:!0,name:`codeFenced`,tokenize:Bae};function Bae(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),zp(t)?yC(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Lp(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(xI,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Lp(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):zp(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),yC(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Lp(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Lp(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&zp(t)?yC(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Lp(t)?e.check(xI,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Lp(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),zp(t)?yC(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),zp(t)?yC(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Lp(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Vae(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var CI={name:`codeIndented`,tokenize:Uae},Hae={partial:!0,tokenize:Wae};function Uae(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),yC(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Lp(t)?e.attempt(Hae,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Lp(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Wae(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Lp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):yC(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Lp(e)?i(e):n(e)}}var Gae={name:`codeText`,previous:qae,resolve:Kae,tokenize:Jae};function Kae(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function qae(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Jae(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Lp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Lp(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Yae=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&wI(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),wI(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),wI(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);wI(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);wI(this.left,t.reverse())}}};function wI(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function TI(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Yae(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Xae(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return $p(e,0,1/0,u.slice(0)),!l}function Xae(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Zae={resolve:$ae,tokenize:eoe},Qae={partial:!0,tokenize:toe};function $ae(e){return TI(e),e}function eoe(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Lp(t)?e.check(Qae,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function toe(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),yC(e,a,`linePrefix`)}function a(i){if(i===null||Lp(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function EI(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Np(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Lp(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Rp(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Np(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function DI(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Lp(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Lp(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!zp(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function OI(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Lp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),yC(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Lp(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function kI(e,t){let n;return r;function r(i){return Lp(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):zp(i)?yC(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var noe={name:`definition`,tokenize:ioe},roe={partial:!0,tokenize:aoe};function ioe(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return DI.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=dF(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Rp(t)?kI(e,l)(t):l(t)}function l(t){return EI(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(roe,d,d)(t)}function d(t){return zp(t)?yC(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Lp(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function aoe(e,t,n){return r;function r(t){return Rp(t)?kI(e,i)(t):n(t)}function i(t){return OI(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return zp(t)?yC(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Lp(e)?t(e):n(e)}}var ooe={name:`hardBreakEscape`,tokenize:soe};function soe(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Lp(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var coe={name:`headingAtx`,resolve:loe,tokenize:uoe};function loe(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},$p(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function uoe(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Rp(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Lp(n)?(e.exit(`atxHeading`),t(n)):zp(n)?yC(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Rp(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var doe=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),AI=[`pre`,`script`,`style`,`textarea`],foe={concrete:!0,name:`htmlFlow`,resolveTo:hoe,tokenize:goe},poe={partial:!0,tokenize:voe},moe={partial:!0,tokenize:_oe};function hoe(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function goe(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:F):Ap(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Ap(a)?(e.consume(a),i=4,r.interrupt?t:F):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:F):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Ap(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Rp(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&AI.includes(l)?(i=1,r.interrupt?t(s):O(s)):doe.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||jp(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return zp(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Ap(t)?(e.consume(t),b):zp(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||jp(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):zp(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):zp(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Lp(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Rp(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||zp(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Lp(t)?O(t):zp(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),te):t===63&&i===3?(e.consume(t),F):t===93&&i===5?(e.consume(t),P):Lp(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(poe,ne,k)(t)):t===null||Lp(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(moe,ee,ne)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return t===null||Lp(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),F):O(t)}function M(t){return t===47?(e.consume(t),o=``,N):O(t)}function N(t){if(t===62){let n=o.toLowerCase();return AI.includes(n)?(e.consume(t),te):O(t)}return Ap(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),N):O(t)}function P(t){return t===93?(e.consume(t),F):O(t)}function F(t){return t===62?(e.consume(t),te):t===45&&i===2?(e.consume(t),F):O(t)}function te(t){return t===null||Lp(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),te)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function _oe(e,t,n){let r=this;return i;function i(t){return Lp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function voe(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(_I,t,n)}}var yoe={name:`htmlText`,tokenize:boe};function boe(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Ap(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Ap(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Lp(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Lp(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):Lp(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Lp(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return Ap(t)?(e.consume(t),S):n(t)}function S(t){return t===45||jp(t)?(e.consume(t),S):C(t)}function C(t){return Lp(t)?(o=C,M(t)):zp(t)?(e.consume(t),C):j(t)}function w(t){return t===45||jp(t)?(e.consume(t),w):t===47||t===62||Rp(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||Ap(t)?(e.consume(t),E):Lp(t)?(o=T,M(t)):zp(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||jp(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Lp(t)?(o=D,M(t)):zp(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Lp(t)?(o=O,M(t)):zp(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,A):t===null?n(t):Lp(t)?(o=k,M(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Rp(t)?T(t):(e.consume(t),ee)}function A(e){return e===47||e===62||Rp(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),N}function N(t){return zp(t)?yC(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var jI={name:`labelEnd`,resolveAll:woe,resolveTo:Toe,tokenize:Eoe},xoe={tokenize:Doe},Soe={tokenize:Ooe},Coe={tokenize:koe};function woe(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&$p(e,0,e.length,n),e}function Toe(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=em(s,e.slice(a+1,a+r+3)),s=em(s,[[`enter`,u,t]]),s=em(s,tm(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=em(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=em(s,e.slice(o+1)),s=em(s,[[`exit`,c,t]]),$p(e,a,e.length,s),e}function Eoe(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(dF(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(xoe,u,o?u:d)(t):t===91?e.attempt(Soe,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Coe,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Doe(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Rp(t)?kI(e,a)(t):a(t)}function a(t){return t===41?u(t):EI(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Rp(t)?kI(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?OI(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Rp(t)?kI(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ooe(e,t,n){let r=this;return i;function i(t){return DI.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(dF(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function koe(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Aoe={name:`labelStartImage`,resolveAll:jI.resolveAll,tokenize:joe};function joe(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Moe={name:`labelStartLink`,resolveAll:jI.resolveAll,tokenize:Noe};function Noe(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var MI={name:`lineEnding`,tokenize:Poe};function Poe(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),yC(e,t,`linePrefix`)}}var NI={name:`thematicBreak`,tokenize:Foe};function Foe(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Lp(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),zp(t)?yC(e,s,`whitespace`)(t):s(t))}}var PI={continuation:{tokenize:zoe},exit:Voe,name:`list`,tokenize:Roe},Ioe={partial:!0,tokenize:Hoe},Loe={partial:!0,tokenize:Boe};function Roe(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Pp(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(NI,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Pp(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(_I,r.interrupt?n:u,e.attempt(Ioe,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return zp(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function zoe(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(_I,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,yC(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!zp(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Loe,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,yC(e,e.attempt(PI,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Boe(e,t,n){let r=this;return yC(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Voe(e){e.exit(this.containerState.type)}function Hoe(e,t,n){let r=this;return yC(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!zp(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var FI={name:`setextUnderline`,resolveTo:Uoe,tokenize:Woe};function Uoe(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Woe(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),zp(t)?yC(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Lp(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Goe={tokenize:$oe,partial:!0};function Koe(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Xoe,continuation:{tokenize:Zoe},exit:Qoe}},text:{91:{name:`gfmFootnoteCall`,tokenize:Yoe},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:qoe,resolveTo:Joe}}}}function qoe(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=dF(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Joe(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Yoe(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Rp(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(dF(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Rp(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Xoe(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Rp(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=dF(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Rp(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),yC(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Zoe(e,t,n){return e.check(_I,t,e.attempt(Goe,t,n))}function Qoe(e){e.exit(`gfmFootnoteDefinition`)}function $oe(e,t,n){let r=this;return yC(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function ese(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&$p(o,o.length,0,tm(s,e.slice(r+1,n),t)),$p(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),$p(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=AF(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=AF(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var tse=class{constructor(){this.map=[]}add(e,t,n){nse(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function nse(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function rse(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function ise(){return{flow:{null:{name:`table`,tokenize:ase,resolveAll:ose}}}}function ase(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Lp(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):zp(t)?yC(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Rp(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,zp(t)?yC(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return zp(t)?yC(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Lp(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return zp(t)?yC(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Lp(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Lp(n)?(e.exit(`tableRow`),t(n)):zp(n)?yC(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Rp(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function ose(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new tse;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(LI(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=II(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=II(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=II(f,t,o,i,n,d)):(o[0]=o[1],d=II(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&LI(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=rse(t.events,n))}return e}function II(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},RI(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=RI(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=RI(t.events,n[2]),a=RI(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},RI(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function LI(e,t,n,r,i){let a=[],o=RI(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function RI(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var sse={name:`tasklistCheck`,tokenize:lse};function cse(){return{text:{91:sse}}}function lse(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Rp(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Lp(r)?t(r):zp(r)?e.check({tokenize:use},t,n)(r):n(r)}}function use(e,t,n){return yC(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function dse(e){return eI([xae(),Koe(),ese(e),ise(),cse()])}var fse={};function pse(e){let t=this,n=e||fse,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(dse(n)),a.push(hae()),o.push(gae(n))}var mse=Object.defineProperty,hse=Object.defineProperties,gse=Object.getOwnPropertyDescriptors,zI=Object.getOwnPropertySymbols,_se=Object.prototype.hasOwnProperty,vse=Object.prototype.propertyIsEnumerable,BI=(e,t,n)=>t in e?mse(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,VI=(e,t)=>{for(var n in t||={})_se.call(t,n)&&BI(e,n,t[n]);if(zI)for(var n of zI(t))vse.call(t,n)&&BI(e,n,t[n]);return e},HI=(e,t)=>hse(e,gse(t)),UI=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]===`\\`&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},yse=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},bse=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]===`\\`&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!yse(e,n)&&(t+=1)}return t},WI=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]===`\\`&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},xse=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Sse=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(xse,(t,n,r,i)=>UI(e,i)?t:`${n}\\>${r}`),Cse=/(\*\*)([^*]*\*?)$/,wse=/(__)([^_]*?)$/,Tse=/(\*\*\*)([^*]*?)$/,Ese=/(\*)([^*]*?)$/,Dse=/(_)([^_]*?)$/,Ose=/(`)([^`]*?)$/,kse=/(~~)([^~]*?)$/,GI=/^[\s_~*`]*$/,KI=/^[\s]*[-*+][\s]+$/,Ase=/[\p{L}\p{N}_]/u,jse=/^```[^`\n]*```?$/,Mse=/^\*{4,}$/,Nse=/(__)([^_]+)_$/,Pse=/(~~)([^~]+)~$/,qI=/~~/g,JI=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Ase.test(e)},Fse=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},YI=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]===`[`)n+=1;else if(e[r]===`]`&&(--n,n===0))return r;return-1},XI=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]===`\\`&&e[i+1]===`$`){i+=1;continue}e[i]===`$`&&(e[i+1]===`$`?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},Ise=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
224
+ `)return!1}return!1},ZI=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`)`)return!1;if(e[n]===`(`)return n>0&&e[n-1]===`]`?Ise(e,t):!1;if(e[n]===`
225
+ `)return!1}return!1},Lse=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`>`)return!1;if(e[n]===`<`){let t=n+1<e.length?e[n+1]:``;return t>=`a`&&t<=`z`||t>=`A`&&t<=`Z`||t===`/`}if(e[n]===`
226
+ `)return!1}return!1},QI=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===`
227
+ `){r=n+1;break}let i=e.length;for(let n=t;n<e.length;n+=1)if(e[n]===`
228
+ `){i=n;break}let a=e.substring(r,i),o=0,s=!1;for(let e of a)if(e===n)o+=1;else if(e!==` `&&e!==` `){s=!0;break}return o>=3&&!s},Rse=(e,t,n,r)=>n===`\\`||e.includes(`$`)&&XI(e,t)?!0:n!==`*`&&r===`*`?(t<e.length-2?e[t+2]:``)!==`*`:!!(n===`*`||n&&r&&JI(n)&&JI(r)||(!n||n===` `||n===` `||n===`
229
+ `)&&(!r||r===` `||r===` `||r===`
230
+ `)),$I=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!==`*`)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;Rse(e,i,a,o)||(t+=1)}return t},zse=(e,t,n,r)=>!!(n===`\\`||e.includes(`$`)&&XI(e,t)||ZI(e,t)||Lse(e,t)||n===`_`||r===`_`||n&&r&&JI(n)&&JI(r)),Bse=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!==`_`)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;zse(e,i,a,o)||(t+=1)}return t},Vse=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]===`*`?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},eL=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]===`*`&&r+1<e.length&&e[r+1]===`*`&&(t+=1,r+=1)}return t},tL=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]===`_`&&r+1<e.length&&e[r+1]===`_`&&(t+=1,r+=1)}return t},Hse=(e,t,n)=>{if(!t||GI.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
231
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return KI.test(a)&&t.includes(`
232
+ `)?!0:QI(e,n,`*`)},Use=e=>{let t=e.match(Cse);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return UI(e,r)||WI(e,r)||Hse(e,n,r)?e:eL(e)%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},Wse=(e,t,n)=>{if(!t||GI.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
233
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return KI.test(a)&&t.includes(`
234
+ `)?!0:QI(e,n,`_`)},Gse=e=>{let t=e.match(wse);if(!t){let t=e.match(Nse);if(t){let n=e.lastIndexOf(t[1]);if(!(UI(e,n)||WI(e,n))&&tL(e)%2==1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return UI(e,r)||WI(e,r)||Wse(e,n,r)?e:tL(e)%2==1?`${e}__`:e},Kse=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]===`*`&&e[n-1]!==`*`&&e[n+1]!==`*`&&e[n-1]!==`\\`&&!XI(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if((!t||t===` `||t===` `||t===`
235
+ `)&&(!r||r===` `||r===` `||r===`
236
+ `)||t&&r&&JI(t)&&JI(r))continue;return n}}return-1},qse=e=>{if(!e.match(Ese))return e;let t=Kse(e);if(t===-1||UI(e,t)||WI(e,t))return e;let n=e.substring(t+1);return!n||GI.test(n)?e:$I(e)%2==1?`${e}*`:e},nL=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]===`_`&&e[n-1]!==`_`&&e[n+1]!==`_`&&e[n-1]!==`\\`&&!XI(e,n)&&!ZI(e,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if(t&&r&&JI(t)&&JI(r))continue;return n}}return-1},Jse=e=>{let t=e.length;for(;t>0&&e[t-1]===`
237
+ `;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},Yse=e=>{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if(eL(t)%2!=1)return null;let n=t.indexOf(`**`),r=nL(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},Xse=e=>{if(!e.match(Dse))return e;let t=nL(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||GI.test(n)||UI(e,t)||WI(e,t))return e;if(Bse(e)%2==1){let t=Yse(e);return t===null?Jse(e):t}return e},Zse=e=>{let t=eL(e),n=$I(e);return t%2==0&&n%2==0},Qse=(e,t,n)=>!t||GI.test(t)||UI(e,n)||WI(e,n)?!0:QI(e,n,`*`),$se=e=>{if(Mse.test(e))return e;let t=e.match(Tse);if(!t)return e;let n=t[2];return Qse(e,n,e.lastIndexOf(t[1]))?e:Vse(e)%2==1?Zse(e)?e:`${e}***`:e},ece=/<[a-zA-Z/][^>]*$/,tce=e=>{let t=e.match(ece);return!t||t.index===void 0||UI(e,t.index)?e:e.substring(0,t.index).trimEnd()},nce=e=>!e.match(jse)||e.includes(`
238
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,rce=e=>(e.match(/```/g)||[]).length%2==1,ice=e=>{let t=nce(e);if(t!==null)return t;let n=e.match(Ose);if(n&&!rce(e)){let t=n[2];if(!t||GI.test(t))return e;if(bse(e)%2==1)return`${e}\``}return e},rL=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",ace=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!rL(e,r)&&(n=!n),!n&&e[r]===`$`&&e[r+1]===`$`&&(t+=1,r+=1);return t},oce=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]===`\\`){r+=1;continue}if(e[r]==="`"&&!rL(e,r)){n=!n;continue}!n&&e[r]===`$`&&(r+1<e.length&&e[r+1]===`$`?r+=1:t+=1)}return t},sce=e=>{if(e.endsWith(`$`)&&!e.endsWith(`$$`))return`${e}$`;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(`
239
+ `,t)!==-1&&!e.endsWith(`
240
+ `)?`${e}
241
+ $$`:`${e}$$`},cce=e=>ace(e)%2==0?e:sce(e),lce=e=>oce(e)%2==1?`${e}$`:e,uce=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=Fse(e,t);if(r===-1||UI(e,r))return null;let i=r>0&&e[r-1]===`!`,a=i?r-1:r,o=e.substring(0,a);if(i)return o;let s=e.substring(r+1,t);return n===`text-only`?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},iL=(e,t)=>{for(let n=0;n<t;n++)if(e[n]===`[`&&!UI(e,n)){if(n>0&&e[n-1]===`!`)continue;let t=YI(e,n);if(t===-1)return n;if(t+1<e.length&&e[t+1]===`(`){let r=e.indexOf(`)`,t+2);r!==-1&&(n=r)}}return t},dce=(e,t,n)=>{let r=t>0&&e[t-1]===`!`,i=r?t-1:t;if(!e.substring(t+1).includes(`]`)){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=iL(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}if(YI(e,t)===-1){let a=e.substring(0,i);if(r)return a;if(n===`text-only`){let n=iL(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},aL=(e,t=`protocol`)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!UI(e,n)){let r=uce(e,n,t);if(r!==null)return r}for(let n=e.length-1;n>=0;--n)if(e[n]===`[`&&!UI(e,n)){let r=dce(e,n,t);if(r!==null)return r}return e},fce=/^-{1,2}$/,pce=/^[\s]*-{1,2}[\s]+$/,mce=/^={1,2}$/,hce=/^[\s]*={1,2}[\s]+$/,gce=e=>{if(!e||typeof e!=`string`)return e;let t=e.lastIndexOf(`
242
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(fce.test(i)&&!n.match(pce)){let t=r.split(`
243
+ `).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(mce.test(i)&&!n.match(hce)){let t=r.split(`
244
+ `).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},_ce=RegExp(`(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])`,`gu`),vce=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(_ce,(t,n)=>UI(e,n)?t:`\\~`),yce=e=>{let t=e.match(kse);if(t){let n=t[2];if(!n||GI.test(n))return e;let r=e.lastIndexOf(t[1]);if(UI(e,r)||WI(e,r))return e;if(e.match(qI)?.length%2==1)return`${e}~~`}else{let t=e.match(Pse);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(UI(e,n)||WI(e,n))return e;if(e.match(qI)?.length%2==1)return`${e}~`}}return e},oL=e=>e!==!1,bce=e=>e===!0,sL={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},xce=[{handler:{name:`singleTilde`,handle:vce,priority:sL.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:Sse,priority:sL.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:tce,priority:sL.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:gce,priority:sL.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:aL,priority:sL.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:$se,priority:sL.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:Use,priority:sL.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:Gse,priority:sL.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:qse,priority:sL.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:Xse,priority:sL.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:ice,priority:sL.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:yce,priority:sL.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:cce,priority:sL.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:lce,priority:sL.INLINE_KATEX},optionKey:`inlineKatex`}],Sce=e=>{let t=e?.linkMode??`protocol`;return xce.filter(({handler:t,optionKey:n})=>t.name===`links`?oL(e?.links)||oL(e?.images):t.name===`inlineKatex`?bce(e?.inlineKatex):oL(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:HI(VI({},e),{handle:e=>aL(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},Cce=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=Sce(t),i=(t?.handlers??[]).map(e=>({handler:HI(VI({},e),{priority:e.priority??sL.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n},wce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tce=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ece={};function cL(e,t){return((t||Ece).jsx?Tce:wce).test(e)}var Dce=i(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
245
+ `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Oce=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Dce());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),kce=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Ace=i(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Oce()),r=kce();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i}));function lL(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?dL(e.position):`start`in e||`end`in e?dL(e):`line`in e||`column`in e?uL(e):``}function uL(e){return fL(e&&e.line)+`:`+fL(e&&e.column)}function dL(e){return uL(e&&e.start)+`-`+uL(e&&e.end)}function fL(e){return e&&typeof e==`number`?e:1}var pL=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=lL(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};pL.prototype.file=``,pL.prototype.name=``,pL.prototype.reason=``,pL.prototype.message=``,pL.prototype.stack=``,pL.prototype.column=void 0,pL.prototype.line=void 0,pL.prototype.ancestors=void 0,pL.prototype.cause=void 0,pL.prototype.fatal=void 0,pL.prototype.place=void 0,pL.prototype.ruleId=void 0,pL.prototype.source=void 0;var jce=n(Ace(),1),mL={}.hasOwnProperty,Mce=new Map,Nce=/[A-Z]/g,Pce=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Fce=new Set([`td`,`th`]),hL=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Ice(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Wce(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Uce(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Cg:Sg,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=gL(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function gL(e,t,n){if(t.type===`element`)return Lce(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Rce(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Bce(e,t,n);if(t.type===`mdxjsEsm`)return zce(e,t);if(t.type===`root`)return Vce(e,t,n);if(t.type===`text`)return Hce(e,t)}function Lce(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Cg,e.schema=i),e.ancestors.push(t);let a=bL(e,t.tagName,!1),o=Gce(e,t),s=yL(e,t);return Pce.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Qg(e):!0})),_L(e,o,a,t),vL(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Rce(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}xL(e,t.position)}function zce(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xL(e,t.position)}function Bce(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Cg,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:bL(e,t.name,!0),o=Kce(e,t),s=yL(e,t);return _L(e,o,a,t),vL(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Vce(e,t,n){let r={};return vL(r,yL(e,t)),e.create(t,e.Fragment,r,n)}function Hce(e,t){return t.value}function _L(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function vL(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Uce(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Wce(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=tP(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Gce(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&mL.call(t.properties,i)){let a=qce(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Fce.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Kce(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else xL(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else xL(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function yL(e,t){let n=[],r=-1,i=e.passKeys?new Map:Mce;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=gL(e,a,o);s!==void 0&&n.push(s)}return n}function qce(e,t,n){let r=xg(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Yg(n):Zg(n)),r.property===`style`){let t=typeof n==`object`?n:Jce(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Yce(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?wee[r.property]||r.property:r.attribute,n]}}function Jce(e,t){try{return(0,jce.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new pL("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=hL+`#cannot-parse-style-attribute`,r}}function bL(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=cL(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=cL(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return mL.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);xL(e)}function xL(e,t){let n=new pL("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=hL+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Yce(e){let t={},n;for(n in e)mL.call(e,n)&&(t[Xce(n)]=e[n]);return t}function Xce(e){let t=e.replace(Nce,Zce);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Zce(e){return`-`+e.toLowerCase()}var SL={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Qce={tokenize:$ce};function $ce(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),yC(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Lp(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var ele={tokenize:tle},CL={tokenize:nle};function tle(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return $p(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(CL,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(CL,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Lp(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;$p(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function nle(e,t,n){return yC(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var rle={tokenize:ile};function ile(e){let t=this,n=e.attempt(_I,r,e.attempt(this.parser.constructs.flowInitial,i,yC(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Zae,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ale={resolveAll:TL()},ole=wL(`string`),sle=wL(`text`);function wL(e){return{resolveAll:TL(e===`text`?cle:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function TL(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function cle(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var lle=r({attentionMarkers:()=>jL,contentInitial:()=>dle,disable:()=>ML,document:()=>ule,flow:()=>DL,flowInitial:()=>EL,insideSpan:()=>AL,string:()=>OL,text:()=>kL}),ule={42:PI,43:PI,45:PI,48:PI,49:PI,50:PI,51:PI,52:PI,53:PI,54:PI,55:PI,56:PI,57:PI,62:vI},dle={91:noe},EL={[-2]:CI,[-1]:CI,32:CI},DL={35:coe,42:NI,45:[FI,NI],60:foe,61:FI,95:NI,96:SI,126:SI},OL={38:bI,92:yI},kL={[-5]:MI,[-4]:MI,[-3]:MI,33:Aoe,38:bI,42:hI,60:[Mae,yoe],91:Moe,92:[ooe,yI],93:jI,95:hI,96:Gae},AL={null:[hI,ale]},jL={null:[42,95]},ML={null:[]};function NL(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=em(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=tm(a,l.events,l),l.events):[]}function f(e,t){return FL(p(e),t)}function p(e){return PL(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Lp(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&$p(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function PL(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function FL(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
246
+ `;break;case-3:o=`\r
247
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function IL(e){let t={constructs:eI([lle,...(e||{}).extensions||[]]),content:n(Qce),defined:[],document:n(ele),flow:n(rle),lazy:{},string:n(ole),text:n(sle)};return t;function n(e){return n;function n(n){return NL(t,e,n)}}}function LL(e){for(;!TI(e););return e}var RL=/[\0\t\n\r]/g;function zL(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(RL.lastIndex=u,c=RL.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var BL={}.hasOwnProperty;function VL(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),HL(n)(LL(IL(n).document().write(zL()(e,t,!0))))}function HL(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ve),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(le),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(ve),listItem:a(be),listItemValue:f,listOrdered:a(ye,d),listUnordered:a(ye),paragraph:a(xe),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(Se),thematicBreak:a(we)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ce,autolinkProtocol:I,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:oe,characterReference:se,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(A),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(ee),htmlTextData:E,image:c(M),label:P,labelText:N,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:F,resourceTitleString:te,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};WL(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];BL.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||KL).call(a,void 0,e[0])}for(r.position={start:UL(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:UL(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:UL(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||KL).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+lL({start:e.start,end:e.end})+`): it’s not open`);n.position.end=UL(e.end)}function u(){return NF(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=dF(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ce(),n.position={start:UL(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=UL(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=UL(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=nae(t),n.identifier=dF(t).toLowerCase()}function P(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=dF(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function oe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=YF(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=JF(t);let i=this.stack[this.stack.length-1];i.value+=r}function se(e){let t=this.stack.pop();t.position.end=UL(e.end)}function I(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function ve(){return{type:`link`,title:null,url:``,children:[]}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function xe(){return{type:`paragraph`,children:[]}}function Se(){return{type:`strong`,children:[]}}function Ce(){return{type:`text`,value:``}}function we(){return{type:`thematicBreak`}}}function UL(e){return{line:e.line,column:e.column,offset:e.offset}}function WL(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?WL(e,r):GL(e,r)}}function GL(e,t){let n;for(n in t)if(BL.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function KL(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+lL({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+lL({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+lL({start:t.start,end:t.end})+`) is still open`)}function qL(e){let t=this;t.parser=n;function n(n){return VL(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function JL(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function YL(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
248
+ `}]}function XL(e,t){let n=t.value?t.value+`
249
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function ZL(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QL(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $L(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=mI(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function eR(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tR(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function nR(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function rR(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nR(e,t);let i={src:mI(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function iR(e,t){let n={src:mI(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function aR(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function oR(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return nR(e,t);let i={href:mI(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function sR(e,t){let n={href:mI(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cR(e,t,n){let r=e.all(t),i=n?lR(n):uR(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
250
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
251
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function lR(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=uR(n[r])}return t}function uR(e){return e.spread??e.children.length>1}function dR(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function fR(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pR(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function mR(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hR(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=tP(t.children[1]),o=eP(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function gR(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function _R(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var vR=9,yR=32;function bR(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(xR(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(xR(t.slice(i),i>0,!1)),a.join(``)}function xR(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===vR||t===yR;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===vR||t===yR;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function SR(e,t){let n={type:`text`,value:bR(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function CR(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var wR={blockquote:JL,break:YL,code:XL,delete:ZL,emphasis:QL,footnoteReference:$L,heading:eR,html:tR,imageReference:rR,image:iR,inlineCode:aR,linkReference:oR,link:sR,listItem:cR,list:dR,paragraph:fR,root:pR,strong:mR,table:hR,tableCell:_R,tableRow:gR,text:SR,thematicBreak:CR,toml:TR,yaml:TR,definition:TR,footnoteDefinition:TR};function TR(){}function ER(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function DR(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function OR(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||ER,r=e.options.footnoteBackLabel||DR,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=mI(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...wk(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
252
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
253
+ `}]}}var kR={}.hasOwnProperty,AR={};function jR(e,t){let n=t||AR,r=new Map,i=new Map,a={all:s,applyData:NR,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...wR,...n.handlers},one:o,options:n,patch:MR,wrap:FR};return bm(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(kR.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=wk(n);return r.children=a.all(e),r}return wk(e)}return(a.options.unknownHandler||PR)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=IR(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=IR(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function MR(e,t){e.position&&(t.position=rP(e))}function NR(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,wk(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function PR(e,t){let n=t.data||{},r=`value`in t&&!(kR.call(n,`hProperties`)||kR.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FR(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
254
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
255
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
256
+ `}),n}function IR(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function LR(e,t){let n=jR(e,t),r=n.one(e,void 0),i=OR(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
257
+ `},i)),a}function RR(e,t){return e&&`run`in e?async function(n,r){let i=LR(n,{file:r,...t});await e.run(i,r)}:function(n,r){return LR(n,{file:r,...e||t})}}function zR(e){if(e)throw e}var BR=i(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function VR(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function HR(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?UR(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function UR(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var WR={basename:GR,dirname:KR,extname:qR,join:JR,sep:`/`};function GR(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);ZR(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function KR(e){if(ZR(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function qR(e){ZR(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function JR(...e){let t=-1,n;for(;++t<e.length;)ZR(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:YR(n)}function YR(e){ZR(e);let t=e.codePointAt(0)===47,n=XR(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function XR(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function ZR(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var QR={cwd:$R};function $R(){return`/`}function ez(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function tz(e){if(typeof e==`string`)e=new URL(e);else if(!ez(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return nz(e)}function nz(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var rz=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],iz=class{constructor(e){let t;t=e?ez(e)?{path:e}:typeof e==`string`||cz(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:QR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<rz.length;){let e=rz[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)rz.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?WR.basename(this.path):void 0}set basename(e){oz(e,`basename`),az(e,`basename`),this.path=WR.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?WR.dirname(this.path):void 0}set dirname(e){sz(this.basename,`dirname`),this.path=WR.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?WR.extname(this.path):void 0}set extname(e){if(az(e,`extname`),sz(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=WR.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){ez(e)&&(e=tz(e)),oz(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?WR.basename(this.path,this.extname):void 0}set stem(e){oz(e,`stem`),az(e,`stem`),this.path=WR.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new pL(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function az(e,t){if(e&&e.includes(WR.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+WR.sep+"`")}function oz(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function sz(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function cz(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var lz=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),uz=n(BR(),1),dz={}.hasOwnProperty,fz=new class e extends lz{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=HR()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,uz.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(hz(`data`,this.frozen),this.namespace[e]=t,this):dz.call(this.namespace,e)&&this.namespace[e]||void 0:e?(hz(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=vz(e),n=this.parser||this.Parser;return pz(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),pz(`process`,this.parser||this.Parser),mz(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=vz(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);bz(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),pz(`processSync`,this.parser||this.Parser),mz(`processSync`,this.compiler||this.Compiler),this.process(e,r),_z(`processSync`,`process`,t),n;function r(e,r){t=!0,zR(e),n=r}}run(e,t,n){gz(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=vz(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),_z(`runSync`,`run`,n),r;function i(e,t){zR(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=vz(t),r=this.compiler||this.Compiler;return mz(`stringify`,r),gz(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(hz(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,uz.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];VR(o)&&VR(r)&&(r=(0,uz.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function pz(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function mz(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function hz(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function gz(e){if(!VR(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function _z(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function vz(e){return yz(e)?e:new iz(e)}function yz(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function bz(e){return typeof e==`string`||xz(e)}function xz(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}function Sz(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Cz=Sz();function wz(e){Cz=e}var Tz={exec:()=>null};function Ez(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Oz.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Dz=(()=>{try{return!0}catch{return!1}})(),Oz={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},kz=/^(?:[ \t]*(?:\n|$))+/,Az=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,jz=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Mz=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Nz=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Pz=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Fz=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Iz=Ez(Fz).replace(/bull/g,Pz).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Lz=Ez(Fz).replace(/bull/g,Pz).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Rz=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,zz=/^[^\n]+/,Bz=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Vz=Ez(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Bz).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Hz=Ez(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Pz).getRegex(),Uz=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Wz=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Gz=Ez(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Wz).replace(`tag`,Uz).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Kz=Ez(Rz).replace(`hr`,Mz).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Uz).getRegex(),qz={blockquote:Ez(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Kz).getRegex(),code:Az,def:Vz,fences:jz,heading:Nz,hr:Mz,html:Gz,lheading:Iz,list:Hz,newline:kz,paragraph:Kz,table:Tz,text:zz},Jz=Ez(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Mz).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Uz).getRegex(),Yz={...qz,lheading:Lz,table:Jz,paragraph:Ez(Rz).replace(`hr`,Mz).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Jz).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Uz).getRegex()},Xz={...qz,html:Ez(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Wz).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Tz,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ez(Rz).replace(`hr`,Mz).replace(`heading`,` *#{1,6} *[^
258
+ ]`).replace(`lheading`,Iz).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Zz=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Qz=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,$z=/^( {2,}|\\)\n(?!\s*$)/,eB=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tB=/[\p{P}\p{S}]/u,nB=/[\s\p{P}\p{S}]/u,rB=/[^\s\p{P}\p{S}]/u,iB=Ez(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,nB).getRegex(),aB=/(?!~)[\p{P}\p{S}]/u,oB=/(?!~)[\s\p{P}\p{S}]/u,sB=/(?:[^\s\p{P}\p{S}]|~)/u,cB=Ez(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Dz?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),lB=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,uB=Ez(lB,`u`).replace(/punct/g,tB).getRegex(),dB=Ez(lB,`u`).replace(/punct/g,aB).getRegex(),fB=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,pB=Ez(fB,`gu`).replace(/notPunctSpace/g,rB).replace(/punctSpace/g,nB).replace(/punct/g,tB).getRegex(),mB=Ez(fB,`gu`).replace(/notPunctSpace/g,sB).replace(/punctSpace/g,oB).replace(/punct/g,aB).getRegex(),hB=Ez(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,rB).replace(/punctSpace/g,nB).replace(/punct/g,tB).getRegex(),gB=Ez(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,tB).getRegex(),_B=Ez(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,rB).replace(/punctSpace/g,nB).replace(/punct/g,tB).getRegex(),vB=Ez(/\\(punct)/,`gu`).replace(/punct/g,tB).getRegex(),yB=Ez(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bB=Ez(Wz).replace(`(?:-->|$)`,`-->`).getRegex(),xB=Ez(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,bB).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),SB=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,CB=Ez(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,SB).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wB=Ez(/^!?\[(label)\]\[(ref)\]/).replace(`label`,SB).replace(`ref`,Bz).getRegex(),TB=Ez(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Bz).getRegex(),EB=Ez(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,wB).replace(`nolink`,TB).getRegex(),DB=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,OB={_backpedal:Tz,anyPunctuation:vB,autolink:yB,blockSkip:cB,br:$z,code:Qz,del:Tz,delLDelim:Tz,delRDelim:Tz,emStrongLDelim:uB,emStrongRDelimAst:pB,emStrongRDelimUnd:hB,escape:Zz,link:CB,nolink:TB,punctuation:iB,reflink:wB,reflinkSearch:EB,tag:xB,text:eB,url:Tz},kB={...OB,link:Ez(/^!?\[(label)\]\((.*?)\)/).replace(`label`,SB).getRegex(),reflink:Ez(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,SB).getRegex()},AB={...OB,emStrongRDelimAst:mB,emStrongLDelim:dB,delLDelim:gB,delRDelim:_B,url:Ez(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,DB).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ez(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,DB).getRegex()},jB={...AB,br:Ez($z).replace(`{2,}`,`*`).getRegex(),text:Ez(AB.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},MB={normal:qz,gfm:Yz,pedantic:Xz},NB={normal:OB,gfm:AB,breaks:jB,pedantic:kB},PB={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},FB=e=>PB[e];function IB(e,t){if(t){if(Oz.escapeTest.test(e))return e.replace(Oz.escapeReplace,FB)}else if(Oz.escapeTestNoEncode.test(e))return e.replace(Oz.escapeReplaceNoEncode,FB);return e}function LB(e){try{e=encodeURI(e).replace(Oz.percentDecode,`%`)}catch{return null}return e}function RB(e,t){let n=e.replace(Oz.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Oz.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(Oz.slashPipe,`|`);return n}function zB(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function BB(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function VB(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function HB(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function UB(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
259
+ `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
260
+ `)}var WB=class{options;rules;lexer;constructor(e){this.options=e||Cz}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:zB(e,`
261
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=UB(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=zB(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:zB(t[0],`
262
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=zB(t[0],`
263
+ `).split(`
264
+ `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
265
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
266
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
267
+ ${s}`:s,r=r?`${r}
268
+ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
269
+ `+e.join(`
270
+ `),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
271
+ `+e.join(`
272
+ `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
273
+ `);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=VB(t[2].split(`
274
+ `,1)[0],t[1].length),l=e.split(`
275
+ `,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
276
+ `,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
277
+ `,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
278
+ `+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
279
+ `+l}u=!l.trim(),r+=p+`
280
+ `,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=RB(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
281
+ `):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(RB(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
282
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=zB(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=BB(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),HB(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return HB(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},GB=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Cz,this.options.tokenizer=this.options.tokenizer||new WB,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Oz,block:MB.normal,inline:NB.normal};this.options.pedantic?(t.block=MB.pedantic,t.inline=NB.pedantic):this.options.gfm&&(t.block=MB.gfm,this.options.breaks?t.inline=NB.breaks:t.inline=NB.gfm),this.tokenizer.rules=t}static get rules(){return{block:MB,inline:NB}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Oz.carriageReturn,`
283
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Oz.tabCharGlobal,` `).replace(Oz.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
284
+ `:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
285
+ `)?``:`
286
+ `)+r.raw,n.text+=`
287
+ `+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
288
+ `)?``:`
289
+ `)+r.raw,n.text+=`
290
+ `+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`
291
+ `)?``:`
292
+ `)+r.raw,a.text+=`
293
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
294
+ `)?``:`
295
+ `)+r.raw,n.text+=`
296
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},KB=class{options;parser;constructor(e){this.options=e||Cz}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Oz.notSpaceStart)?.[0],i=e.replace(Oz.endingNewline,``)+`
297
+ `;return r?`<pre><code class="language-`+IB(r)+`">`+(n?i:IB(i,!0))+`</code></pre>
298
+ `:`<pre><code>`+(n?i:IB(i,!0))+`</code></pre>
299
+ `}blockquote({tokens:e}){return`<blockquote>
300
+ ${this.parser.parse(e)}</blockquote>
301
+ `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
302
+ `}hr(e){return`<hr>
303
+ `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
304
+ `+r+`</`+i+`>
305
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
306
+ `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
307
+ `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
308
+ <thead>
309
+ `+t+`</thead>
310
+ `+r+`</table>
311
+ `}tablerow({text:e}){return`<tr>
312
+ ${e}</tr>
313
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
314
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${IB(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=LB(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+IB(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=LB(e);if(i===null)return IB(n);e=i;let a=`<img src="${e}" alt="${IB(n)}"`;return t&&(a+=` title="${IB(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:IB(e.text)}},qB=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},JB=class e{options;renderer;textRenderer;constructor(e){this.options=e||Cz,this.options.renderer=this.options.renderer||new KB,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new qB}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},YB=class{options;block;constructor(e){this.options=e||Cz}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?GB.lex:GB.lexInline}provideParser(e=this.block){return e?JB.parse:JB.parseInline}},XB=new class{defaults=Sz();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=JB;Renderer=KB;TextRenderer=qB;Lexer=GB;Tokenizer=WB;Hooks=YB;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new KB(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new WB(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new YB;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];YB.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&YB.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return GB.lex(e,t??this.defaults)}parser(e,t){return JB.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?GB.lex:GB.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?JB.parse:JB.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?GB.lex:GB.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?JB.parse:JB.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
315
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+IB(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function ZB(e,t){return XB.parse(e,t)}ZB.options=ZB.setOptions=function(e){return XB.setOptions(e),ZB.defaults=XB.defaults,wz(ZB.defaults),ZB},ZB.getDefaults=Sz,ZB.defaults=Cz,ZB.use=function(...e){return XB.use(...e),ZB.defaults=XB.defaults,wz(ZB.defaults),ZB},ZB.walkTokens=function(e,t){return XB.walkTokens(e,t)},ZB.parseInline=XB.parseInline,ZB.Parser=JB,ZB.parser=JB.parse,ZB.Renderer=KB,ZB.TextRenderer=qB,ZB.Lexer=GB,ZB.lexer=GB.lex,ZB.Tokenizer=WB,ZB.Hooks=YB,ZB.parse=ZB,ZB.options,ZB.setOptions,ZB.use,ZB.walkTokens,ZB.parseInline,JB.parse,GB.lex;var QB=300,$B=`300px`,eV=500;function tV(e={}){let{immediate:t=!1,debounceDelay:n=QB,rootMargin:r=$B,idleTimeout:i=eV}=e,[a,o]=(0,L.useState)(!1),s=(0,L.useRef)(null),c=(0,L.useRef)(null),l=(0,L.useRef)(null),u=(0,L.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,L.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,L.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,L.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var nV=/\s/,rV=/^\s+$/,iV=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),aV=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,oV=e=>e.some(e=>aV(e)&&iV.has(e.tagName)),sV=e=>{let t=[],n=``,r=!1;for(let i of e){let e=nV.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},cV=e=>{let t=[],n=``;for(let r of e)nV.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},lV=(e,t,n,r,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:o},children:[{type:`text`,value:e}]}},uV=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&`children`in a))return;if(oV(t))return vm;let o=a,s=o.children.indexOf(e);if(s===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let l=n.sep===`char`?cV(c):sV(c),u=r.prevContentLength,d=l.map(e=>{let t=i.count;if(i.count+=e.length,rV.test(e))return{type:`text`,value:e};let r=u>0&&t<u,a=r?0:i.newIndex++*n.stagger;return lV(e,n.animation,n.duration,n.easing,r,a)});return o.children.splice(s,1,...d),s+d.length},dV=0;function fV(e){let t={animation:e?.animation??`fadeIn`,duration:e?.duration??150,easing:e?.easing??`ease`,sep:e?.sep??`word`,stagger:e?.stagger??40},n={prevContentLength:0,lastRenderCharCount:0},r=dV++,i=()=>e=>{let r={count:0,newIndex:0};ym(e,`text`,(e,i)=>uV(e,i,t,n,r)),n.lastRenderCharCount=r.count,n.prevContentLength=0};return Object.defineProperty(i,`name`,{value:`rehypeAnimate$${r}`}),{name:`animate`,type:`animate`,rehypePlugin:i,setPrevContentLength(e){n.prevContentLength=e},getLastRenderCharCount(){let e=n.lastRenderCharCount;return n.lastRenderCharCount=0,e}}}fV();var pV=(0,L.createContext)(!1),mV=()=>(0,L.useContext)(pV),hV=(...e)=>hi(Bn(e)),gV=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(n)?t:`${e}:${t}`).join(` `)},_V=e=>e?(...t)=>gV(e,hi(Bn(t))):hV,vV=(e,t,n)=>{let r=typeof t==`string`&&n.startsWith(`text/csv`)?``:``,i=typeof t==`string`?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},yV=(0,L.createContext)(hV),bV=()=>(0,L.useContext)(yV),xV=hV(`block`,`before:content-[counter(line)]`,`before:inline-block`,`before:[counter-increment:line]`,`before:w-6`,`before:mr-4`,`before:text-[13px]`,`before:text-right`,`before:text-muted-foreground/50`,`before:font-mono`,`before:select-none`),SV=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},CV=(0,L.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...o})=>{let s=bV(),c=(0,L.useMemo)(()=>s(xV),[s]),l=(0,L.useMemo)(()=>{let e={};return t.bg&&(e[`--sdm-bg`]=t.bg),t.fg&&(e[`--sdm-fg`]=t.fg),t.rootStyle&&Object.assign(e,SV(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,z.jsx)(`div`,{className:s(r,`overflow-x-auto rounded-md border border-border bg-background p-4 text-sm`),"data-language":n,"data-streamdown":`code-block-body`,...o,children:(0,z.jsx)(`pre`,{className:s(r,`bg-[var(--sdm-bg,inherit]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]`),style:l,children:(0,z.jsx)(`code`,{className:a?s(`[counter-increment:line_0] [counter-reset:line]`):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((e,t)=>(0,z.jsx)(`span`,{className:a?c:void 0,children:e.length===0||e.length===1&&e[0].content===``?`
316
+ `:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,z.jsx)(`span`,{className:s(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),wV=({className:e,language:t,style:n,isIncomplete:r,...i})=>(0,z.jsx)(`div`,{className:bV()(`my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":`code-block`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 200px`,...n},...i}),TV=(0,L.createContext)({code:``}),EV=()=>(0,L.useContext)(TV),DV=({language:e})=>{let t=bV();return(0,z.jsx)(`div`,{className:t(`flex h-8 items-center text-muted-foreground text-xs`),"data-language":e,"data-streamdown":`code-block-header`,children:(0,z.jsx)(`span`,{className:t(`ml-1 font-mono lowercase`),children:e})})},OV=e=>{let t=e.length;for(;t>0&&e[t-1]===`
317
+ `;)t--;return e.slice(0,t)},kV=(0,L.lazy)(()=>a(()=>import(`./highlighted-body-OFNGDK62-C49FzMo3.js`).then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([180,1]))),AV=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=bV(),l=(0,L.useMemo)(()=>OV(e),[e]),u=(0,L.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:l.split(`
318
+ `).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[l]);return(0,z.jsx)(TV.Provider,{value:{code:e},children:(0,z.jsxs)(wV,{isIncomplete:i,language:t,children:[(0,z.jsx)(DV,{language:t}),r?(0,z.jsx)(`div`,{className:c(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,z.jsx)(`div`,{className:c(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`code-block-actions`,children:r})}):null,(0,z.jsx)(L.Suspense,{fallback:(0,z.jsx)(CV,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,z.jsx)(kV,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},jV={CheckIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z`,fill:`currentColor`,fillRule:`evenodd`})}),CopyIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),DownloadIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),ExternalLinkIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z`,fill:`currentColor`,fillRule:`evenodd`})}),Loader2Icon:e=>(0,z.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,z.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,z.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z`,fill:`currentColor`,fillRule:`evenodd`})}),RotateCcwIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z`,fill:`currentColor`,fillRule:`evenodd`})}),XIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomInIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomOutIcon:e=>(0,z.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,z.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})})},MV=(0,L.createContext)(jV),NV=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>e[n]===t[n]):!1},PV=({icons:e,children:t})=>{let n=(0,L.useRef)(e),r=(0,L.useRef)(e?{...jV,...e}:jV);NV(n.current,e)||(n.current=e,r.current=e?{...jV,...e}:jV);let i=r.current;return(0,z.jsx)(MV.Provider,{value:i,children:t})},FV=()=>(0,L.useContext)(MV),IV={copyCode:`Copy Code`,downloadFile:`Download file`,downloadDiagram:`Download diagram`,downloadDiagramAsSvg:`Download diagram as SVG`,downloadDiagramAsPng:`Download diagram as PNG`,downloadDiagramAsMmd:`Download diagram as MMD`,viewFullscreen:`View fullscreen`,exitFullscreen:`Exit fullscreen`,mermaidFormatSvg:`SVG`,mermaidFormatPng:`PNG`,mermaidFormatMmd:`MMD`,copyTable:`Copy table`,copyTableAsMarkdown:`Copy table as Markdown`,copyTableAsCsv:`Copy table as CSV`,copyTableAsTsv:`Copy table as TSV`,downloadTable:`Download table`,downloadTableAsCsv:`Download table as CSV`,downloadTableAsMarkdown:`Download table as Markdown`,tableFormatMarkdown:`Markdown`,tableFormatCsv:`CSV`,tableFormatTsv:`TSV`,imageNotAvailable:`Image not available`,downloadImage:`Download image`,openExternalLink:`Open external link?`,externalLinkWarning:`You're about to visit an external website.`,close:`Close`,copyLink:`Copy link`,copied:`Copied`,openLink:`Open link`},LV=(0,L.createContext)(IV),RV=()=>(0,L.useContext)(LV),zV=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=bV(),[c,l]=(0,L.useState)(!1),u=(0,L.useRef)(0),{code:d}=EV(),{isAnimating:f}=(0,L.useContext)(GU),p=RV(),m=a??d,h=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{c||(await navigator.clipboard.writeText(m),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,L.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let g=FV(),_=c?g.CheckIcon:g.CopyIcon;return(0,z.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:f,onClick:h,title:p.copyCode,type:`button`,...o,children:r??(0,z.jsx)(_,{size:14})})},BV={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,文言:`wy`},VV=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=bV(),{code:c}=EV(),{isAnimating:l}=(0,L.useContext)(GU),u=RV(),d=FV(),f=a??c,p=`file.${n&&n in BV?BV[n]:`txt`}`;return(0,z.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:()=>{try{vV(p,f,`text/plain`),e?.()}catch(e){t?.(e)}},title:u.downloadFile,type:`button`,...o,children:r??(0,z.jsx)(d.DownloadIcon,{size:14})})},HV=()=>{let{Loader2Icon:e}=FV(),t=bV();return(0,z.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,z.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,z.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,z.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},UV=/\.[^/.]+$/,WV=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=FV(),c=bV(),l=(0,L.useRef)(null),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(!1),m=RV(),h=o.width!=null||o.height!=null,g=(u||h)&&!f,_=f&&!h;(0,L.useEffect)(()=>{let e=l.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;d(t),p(!t)}},[]);let v=(0,L.useCallback)(e=>{d(!0),p(!1),i?.(e)},[i]),y=(0,L.useCallback)(e=>{d(!1),p(!0),a?.(e)},[a]),b=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(UV,``)}.${i}`}vV(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,z.jsxs)(`div`,{className:c(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,z.jsx)(`img`,{alt:r,className:c(`max-w-full rounded-lg`,_&&`hidden`,t),"data-streamdown":`image`,onError:y,onLoad:v,ref:l,src:n,...o}),_&&(0,z.jsx)(`span`,{className:c(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:m.imageNotAvailable}),(0,z.jsx)(`div`,{className:c(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`)}),g&&(0,z.jsx)(`button`,{className:c(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:b,title:m.downloadImage,type:`button`,children:(0,z.jsx)(s,{size:14})})]}):null},GV=0,KV=()=>{GV+=1,GV===1&&(document.body.style.overflow=`hidden`)},qV=()=>{GV=Math.max(0,GV-1),GV===0&&(document.body.style.overflow=``)},JV=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=FV(),c=bV(),[l,u]=(0,L.useState)(!1),d=RV(),f=(0,L.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),p=(0,L.useCallback)(()=>{r(),n()},[r,n]);return(0,L.useEffect)(()=>{if(t){KV();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),qV()}}},[t,n]),t?(0,z.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,z.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,z.jsx)(`button`,{className:c(`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:n,title:d.close,type:`button`,children:(0,z.jsx)(s,{size:16})}),(0,z.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,z.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,z.jsx)(o,{size:20}),(0,z.jsx)(`span`,{children:d.openExternalLink})]}),(0,z.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:d.externalLinkWarning})]}),(0,z.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,z.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,z.jsx)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted`),onClick:f,type:`button`,children:l?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(i,{size:14}),(0,z.jsx)(`span`,{children:d.copied})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(a,{size:14}),(0,z.jsx)(`span`,{children:d.copyLink})]})}),(0,z.jsxs)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90`),onClick:p,type:`button`,children:[(0,z.jsx)(o,{size:14}),(0,z.jsx)(`span`,{children:d.openLink})]})]})]})}):null},YV=(0,L.createContext)(null),XV=()=>(0,L.useContext)(YV),ZV=()=>XV()?.code??null,QV=()=>XV()?.mermaid??null,$V=e=>{var t;let n=XV();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},eH=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),tH=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=bV(),[s,c]=(0,L.useState)(!1),l=(0,L.useRef)(null),{isAnimating:u}=(0,L.useContext)(GU),d=FV(),f=QV(),p=RV(),m=async t=>{try{if(t===`mmd`){vV(`diagram.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!f){a?.(Error(`Mermaid plugin not available`));return}let n=f.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){vV(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){vV(`diagram.png`,await eH(l),`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,L.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,z.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,z.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:p.downloadDiagram,type:`button`,children:t??(0,z.jsx)(d.DownloadIcon,{size:14})}),s?(0,z.jsxs)(`div`,{className:o(`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,z.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`svg`),title:p.downloadDiagramAsSvg,type:`button`,children:p.mermaidFormatSvg}),(0,z.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`png`),title:p.downloadDiagramAsPng,type:`button`,children:p.mermaidFormatPng}),(0,z.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`mmd`),title:p.downloadDiagramAsMmd,type:`button`,children:p.mermaidFormatMmd})]}):null]})},nH=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=FV(),c=bV(),[l,u]=(0,L.useState)(!1),{isAnimating:d,controls:f}=(0,L.useContext)(GU),p=RV(),m=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),h=()=>{u(!l)};return(0,L.useEffect)(()=>{if(l){KV();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),qV()}}},[l]),(0,L.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:d,onClick:h,title:p.viewFullscreen,type:`button`,...a,children:(0,z.jsx)(o,{size:14})}),l?(0,Ie.createPortal)((0,z.jsxs)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),onClick:h,onKeyDown:e=>{e.key===`Escape`&&h()},role:`button`,tabIndex:0,children:[(0,z.jsx)(`button`,{className:c(`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:h,title:p.exitFullscreen,type:`button`,children:(0,z.jsx)(s,{size:20})}),(0,z.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,z.jsx)(YU,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},rH=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},iH=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===`
319
+ `)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(`
320
+ `)},aH=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===`
321
+ `||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===`
322
+ `?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(`
323
+ `)},oH=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):n.push(t);return n.join(``)},sH=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0;r[i]=`| ${t.map(e=>oH(e)).join(` | `)} |`,i+=1;let a=Array(t.length);for(let e=0;e<t.length;e+=1)a[e]=`---`;r[i]=`| ${a.join(` | `)} |`,i+=1;for(let e of n)if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?oH(e[r]):``;r[i]=`| ${n.join(` | `)} |`,i+=1}else r[i]=`| ${e.map(e=>oH(e)).join(` | `)} |`,i+=1;return r.join(`
324
+ `)},cH=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=bV(),[o,s]=(0,L.useState)(!1),[c,l]=(0,L.useState)(!1),u=(0,L.useRef)(null),d=(0,L.useRef)(0),{isAnimating:f}=(0,L.useContext)(GU),p=RV(),m=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=rH(t),o=({csv:iH,tsv:aH,md:sH}[e]||sH)(a),c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,L.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let h=FV(),g=c?h.CheckIcon:h.CopyIcon;return(0,z.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,z.jsx)(`button`,{className:a(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:f,onClick:()=>s(!o),title:p.copyTable,type:`button`,children:e??(0,z.jsx)(g,{height:14,width:14})}),o?(0,z.jsxs)(`div`,{className:a(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,z.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`md`),title:p.copyTableAsMarkdown,type:`button`,children:p.tableFormatMarkdown}),(0,z.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`csv`),title:p.copyTableAsCsv,type:`button`,children:p.tableFormatCsv}),(0,z.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`tsv`),title:p.copyTableAsTsv,type:`button`,children:p.tableFormatTsv})]}):null]})},lH=({children:e,className:t,onDownload:n,onError:r})=>{let i=bV(),[a,o]=(0,L.useState)(!1),s=(0,L.useRef)(null),{isAnimating:c}=(0,L.useContext)(GU),l=RV(),u=FV(),d=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=rH(t),a=e===`csv`?iH(i):sH(i);vV(`table.${e===`csv`?`csv`:`md`}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,L.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,z.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,z.jsx)(`button`,{className:i(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:c,onClick:()=>o(!a),title:l.downloadTable,type:`button`,children:e??(0,z.jsx)(u.DownloadIcon,{size:14})}),a?(0,z.jsxs)(`div`,{className:i(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,z.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`csv`),title:l.downloadTableAsCsv,type:`button`,children:l.tableFormatCsv}),(0,z.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`markdown`),title:l.downloadTableAsMarkdown,type:`button`,children:l.tableFormatMarkdown})]}):null]})},uH=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=FV(),o=bV(),[s,c]=(0,L.useState)(!1),{isAnimating:l}=(0,L.useContext)(GU),u=RV(),d=()=>{c(!0)},f=()=>{c(!1)};return(0,L.useEffect)(()=>{if(s){KV();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),qV()}}},[s]),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:d,title:u.viewFullscreen,type:`button`,children:(0,z.jsx)(i,{size:14})}),s?(0,Ie.createPortal)((0,z.jsx)(`div`,{"aria-label":u.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:f,onKeyDown:e=>{e.key===`Escape`&&f()},role:`dialog`,children:(0,z.jsxs)(`div`,{className:o(`flex h-full flex-col`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,z.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,z.jsx)(cH,{}):null,r?(0,z.jsx)(lH,{}):null,(0,z.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:f,title:u.exitFullscreen,type:`button`,children:(0,z.jsx)(a,{size:20})})]}),(0,z.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,z.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),document.body):null]})},dH=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=bV(),c=n&&r,l=n&&i,u=n&&a,d=c||l||u;return(0,z.jsxs)(`div`,{className:s(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[d?(0,z.jsxs)(`div`,{className:s(`flex items-center justify-end gap-1`),children:[c?(0,z.jsx)(cH,{}):null,l?(0,z.jsx)(lH,{}):null,u?(0,z.jsx)(uH,{showCopy:c,showDownload:l,children:e}):null]}):null,(0,z.jsx)(`div`,{className:s(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),children:(0,z.jsx)(`table`,{className:s(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...o,children:e})})]})},fH=/startLine=(\d+)/,pH=/\bnoLineNumbers\b/,mH=(0,L.lazy)(()=>a(()=>import(`./mermaid-GHXKKRXX-CSA8__nD.js`).then(e=>({default:e.Mermaid})),[])),hH=/language-([^\s]+)/;function gH(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function _H(e,t){return e.className===t.className&&gH(e.node,t.node)}var vH=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,yH=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},bH=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},xH=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},SH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`ol`,{className:bV()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>_H(e,t));SH.displayName=`MarkdownOl`;var CH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`li`,{className:bV()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&gH(e.node,t.node));CH.displayName=`MarkdownLi`;var wH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`ul`,{className:bV()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>_H(e,t));wH.displayName=`MarkdownUl`;var TH=(0,L.memo)(({className:e,node:t,...n})=>(0,z.jsx)(`hr`,{className:bV()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>_H(e,t));TH.displayName=`MarkdownHr`;var EH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`span`,{className:bV()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>_H(e,t));EH.displayName=`MarkdownStrong`;var DH=(0,L.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=bV(),{linkSafety:o}=(0,L.useContext)(GU),[s,c]=(0,L.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,L.useCallback)(async e=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,L.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,L.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,z.jsx)(JV,{...p})]}):(0,z.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>_H(e,t)&&e.href===t.href);DH.displayName=`MarkdownA`;var OH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h1`,{className:bV()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>_H(e,t));OH.displayName=`MarkdownH1`;var kH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h2`,{className:bV()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>_H(e,t));kH.displayName=`MarkdownH2`;var AH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h3`,{className:bV()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>_H(e,t));AH.displayName=`MarkdownH3`;var jH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h4`,{className:bV()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>_H(e,t));jH.displayName=`MarkdownH4`;var MH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h5`,{className:bV()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>_H(e,t));MH.displayName=`MarkdownH5`;var NH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`h6`,{className:bV()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>_H(e,t));NH.displayName=`MarkdownH6`;var PH=(0,L.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,L.useContext)(GU);return(0,z.jsx)(dH,{className:t,showControls:vH(i,`table`),showCopy:yH(i,`copy`),showDownload:yH(i,`download`),showFullscreen:yH(i,`fullscreen`),...r,children:e})},(e,t)=>_H(e,t));PH.displayName=`MarkdownTable`;var FH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`thead`,{className:bV()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>_H(e,t));FH.displayName=`MarkdownThead`;var IH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`tbody`,{className:bV()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>_H(e,t));IH.displayName=`MarkdownTbody`;var LH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`tr`,{className:bV()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>_H(e,t));LH.displayName=`MarkdownTr`;var RH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`th`,{className:bV()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>_H(e,t));RH.displayName=`MarkdownTh`;var zH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`td`,{className:bV()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>_H(e,t));zH.displayName=`MarkdownTd`;var BH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`blockquote`,{className:bV()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>_H(e,t));BH.displayName=`MarkdownBlockquote`;var VH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`sup`,{className:bV()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>_H(e,t));VH.displayName=`MarkdownSup`;var HH=(0,L.memo)(({children:e,className:t,node:n,...r})=>(0,z.jsx)(`sub`,{className:bV()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>_H(e,t));HH.displayName=`MarkdownSub`;var UH=(0,L.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,L.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,L.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,L.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,L.isValidElement)(e))return e;if(e.type===SH){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,z.jsx)(`section`,{className:t,...r,children:i}):null}return(0,z.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>_H(e,t));UH.displayName=`MarkdownSection`;var WH=(0,L.memo)(({node:e,className:t,children:n,...r})=>{let i=bV(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,L.useContext)(GU),l=QV(),u=mV(),d=(t?.match(hH))?.at(1)??``,f=$V(d);if(a)return(0,z.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(fH),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&pH.test(p))&&c!==!1,v=``;if((0,L.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,z.jsx)(L.Suspense,{fallback:(0,z.jsx)(HV,{}),children:(0,z.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=vH(s,`mermaid`),n=xH(s,`download`),r=xH(s,`copy`),a=xH(s,`fullscreen`),c=xH(s,`panZoom`),l=e&&(n||r||a);return(0,z.jsx)(L.Suspense,{fallback:(0,z.jsx)(HV,{}),children:(0,z.jsxs)(`div`,{className:i(`group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,t),"data-streamdown":`mermaid-block`,children:[(0,z.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,z.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,z.jsx)(`div`,{className:i(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,z.jsxs)(`div`,{className:i(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`mermaid-block-actions`,children:[n?(0,z.jsx)(tH,{chart:v,config:o?.config}):null,r?(0,z.jsx)(zV,{code:v}):null,a?(0,z.jsx)(nH,{chart:v,config:o?.config}):null]})}):null,(0,z.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,z.jsx)(mH,{chart:v,config:o?.config,showControls:c})})]})})}let y=vH(s,`code`),b=bH(s,`download`),x=bH(s,`copy`);return(0,z.jsx)(AV,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,children:y?(0,z.jsxs)(z.Fragment,{children:[b?(0,z.jsx)(VV,{code:v,language:d}):null,x?(0,z.jsx)(zV,{}):null]}):null})},(e,t)=>e.className===t.className&&gH(e.node,t.node));WH.displayName=`MarkdownCode`;var GH=(0,L.memo)(WV,(e,t)=>e.className===t.className&&gH(e.node,t.node));GH.displayName=`MarkdownImg`;var KH=(0,L.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,L.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,z.jsx)(z.Fragment,{children:e})}return(0,z.jsx)(`p`,{...n,children:e})},(e,t)=>_H(e,t));KH.displayName=`MarkdownParagraph`;var qH={ol:SH,li:CH,ul:wH,hr:TH,strong:EH,a:DH,h1:OH,h2:kH,h3:AH,h4:jH,h5:MH,h6:NH,table:PH,thead:FH,tbody:IH,tr:LH,th:RH,td:zH,blockquote:BH,code:WH,img:GH,pre:({children:e})=>(0,L.isValidElement)(e)?(0,L.cloneElement)(e,{"data-block":`true`}):e,sup:VH,sub:HH,p:KH,section:UH},JH=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,YH=/\p{L}/u;function XH(e){let t=e.replace(/^#{1,6}\s+/gm,``).replace(/(\*{1,3}|_{1,3})/g,``).replace(/`[^`]*`/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/^[\s>*\-+\d.]+/gm,``);for(let e of t){if(JH.test(e))return`rtl`;if(YH.test(e))return`ltr`}return`ltr`}var ZH=/^[ \t]{0,3}(`{3,}|~{3,})/,QH=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,$H=e=>{let t=e.split(`
325
+ `),n=null,r=0;for(let e of t){let t=ZH.exec(e);if(n===null){if(t){let e=t[1];n=e[0],r=e.length}}else if(t){let e=t[1],i=e[0],a=e.length;i===n&&a>=r&&(n=null,r=0)}}return n!==null},eU=e=>{let t=e.split(`
326
+ `);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&QH.test(t))return!0}return!1},tU=()=>e=>{bm(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},nU=[],rU={allowDangerousHtml:!0},iU=new WeakMap,aU=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=iU.get(e);n||(n=e.name,iU.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=iU.get(r);e||(e=r.name,iU.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},oU=e=>{let t=sU(e),n=e.children||``;return mU(t.runSync(t.parse(n),n),e)},sU=e=>{let t=aU.get(e);if(t)return t;let n=lU(e);return aU.set(e,n),n},cU=e=>e.some(e=>Array.isArray(e)?e[0]===wP:e===wP),lU=e=>{let t=e.rehypePlugins||nU,n=e.remarkPlugins||nU,r=cU(t)?n:[...n,tU],i=e.remarkRehypeOptions?{...rU,...e.remarkRehypeOptions}:rU;return fz().use(qL).use(r).use(RR,i).use(t)},uU=e=>e,dU=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},fU=(e,t)=>{for(let n in SL)if(Object.hasOwn(SL,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=SL[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},pU=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},mU=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||uU;bm(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return dU(c,s,a,e.value),s;if(e.type===`element`&&(fU(e,t),pU(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return Ice(e,{Fragment:z.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0})},hU=/\[\^[\w-]{1,200}\](?!:)/,gU=/\[\^[\w-]{1,200}\]:/,_U=/<(\w+)[\s>]/,vU=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),yU=new Map,bU=new Map,xU=e=>{let t=e.toLowerCase(),n=yU.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return yU.set(t,r),r},SU=e=>{let t=e.toLowerCase(),n=bU.get(t);if(n)return n;let r=RegExp(`</${t}(?=[\\s>])[^>]*>`,`gi`);return bU.set(t,r),r},CU=(e,t)=>{if(vU.has(t.toLowerCase()))return 0;let n=e.match(xU(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},wU=(e,t)=>{let n=e.match(SU(t));return n?n.length:0},TU=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]===`$`&&e[n+1]===`$`&&(t+=1,n+=1);return t},EU=e=>{let t=hU.test(e),n=gU.test(e);if(t||n)return[e];let r=GB.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let e of r){let t=e.raw,n=i.length;if(a.length>0){i[n-1]+=t;let e=a.at(-1),r=CU(t,e),o=wU(t,e);for(let t=0;t<r;t+=1)a.push(e);for(let t=0;t<o;t+=1)a.length>0&&a.at(-1)===e&&a.pop();continue}if(e.type===`html`&&e.block){let e=t.match(_U);if(e){let n=e[1];CU(t,n)>wU(t,n)&&a.push(n)}}if(n>0&&!o){let e=i[n-1];if(TU(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},DU=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>{if(!n.includes(`
327
+
328
+ `))return t+n+r;let i=n.replace(/\n\n/g,`
329
+ <!---->
330
+ `);return`${t}${(i.startsWith(`
331
+ `)?``:`
332
+ `)+i+(i.endsWith(`
333
+ `)?``:`
334
+ `)}${r}
335
+
336
+ `})}return n},OU=/([\\`*_~[\]|])/g,kU=e=>e.replace(OU,`\\$1`),AU=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>t+kU(n).replace(/\n\n/g,`&#10;&#10;`)+r)}return n},jU=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(jU).join(``):``,MU=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));bm(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=jU(e);e.children=t?[{type:`text`,value:t}]:[]}})},NU=()=>e=>{bm(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},PU=/^[ \t]*<[\w!/?-]/,FU=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,IU=e=>typeof e!=`string`||e.length===0||!PU.test(e)?e:e.replace(FU,`$1`),LU={...EP,protocols:{...EP.protocols,href:[...EP.protocols?.href??[],`tel`]},attributes:{...EP.attributes,code:[...EP.attributes?.code??[],`metastring`]}},RU={raw:wP,sanitize:[UP,LU],harden:[Qre,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},zU={gfm:[pse,{}],codeMeta:NU},BU=Object.values(RU),VU=Object.values(zU),HU={block:` ▋`,circle:` ●`},UU=[`github-light`,`github-dark`],WU={enabled:!0},GU=(0,L.createContext)({shikiTheme:UU,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:WU}),KU=(0,L.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let c=typeof e==`string`&&n?IU(e):e,l=(0,z.jsx)(oU,{...s,children:c});return(0,z.jsx)(pV.Provider,{value:i,children:a?(0,z.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});KU.displayName=`Block`;var qU=(0,L.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=BU,remarkPlugins:s=VU,className:c,shikiTheme:l=UU,mermaid:u,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:m=KU,parseMarkdownIntoBlocksFn:h=EU,caret:g,plugins:_,remend:v,linkSafety:y=WU,lineNumbers:b=!0,allowedTags:x,literalTagContent:S,translations:C,icons:w,prefix:T,onAnimationStart:E,onAnimationEnd:D,...O})=>{let k=(0,L.useId)(),[ee,A]=(0,L.useTransition)(),j=(0,L.useMemo)(()=>_V(T),[T]),M=(0,L.useRef)(null),N=(0,L.useRef)(E),P=(0,L.useRef)(D);N.current=E,P.current=D,(0,L.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=M.current;if(M.current=f,i===null){f&&((e=N.current)==null||e.call(N));return}f&&!i?(n=N.current)==null||n.call(N):!f&&i&&((r=P.current)==null||r.call(P))},[f,t]);let F=(0,L.useMemo)(()=>x?Object.keys(x):[],[x]),te=(0,L.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?Cce(e,v):e;return S&&S.length>0&&(n=AU(n,S)),F.length>0&&(n=DU(n,F)),n},[e,t,r,v,F,S]),ne=(0,L.useMemo)(()=>h(te),[te,h]),[re,ie]=(0,L.useState)(ne);(0,L.useEffect)(()=>{t===`streaming`&&!ce?A(()=>{ie(ne)}):ie(ne)},[ne,t]);let ae=t===`streaming`?re:ne,oe=(0,L.useMemo)(()=>n===`auto`?ae.map(XH):void 0,[ae,n]),se=(0,L.useMemo)(()=>ae.map((e,t)=>`${k}-${t}`),[ae.length,k]),I=(0,L.useMemo)(()=>p===!0?`true`:p?JSON.stringify(p):``,[p]),ce=(0,L.useMemo)(()=>I?I===`true`?fV():fV(p):null,[I]),le=(0,L.useMemo)(()=>({shikiTheme:(_?.code)?.getThemes()??l,controls:d,isAnimating:f,lineNumbers:b,mode:t,mermaid:u,linkSafety:y}),[l,d,f,b,t,u,y,_?.code]),ue=(0,L.useMemo)(()=>({...IV,...C}),[(0,L.useMemo)(()=>C?JSON.stringify(C):``,[C])]),de=(0,L.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...qH,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,L.createElement)(t,n):null:(0,L.createElement)(e,n)}return n},[a]),fe=(0,L.useMemo)(()=>{let e=[];return _!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsBefore]),e=[...e,...s],_!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(e=[...e,_.math.remarkPlugin]),e},[s,_?.math,_?.cjk]),pe=(0,L.useMemo)(()=>{let e=o;if(x&&Object.keys(x).length>0&&o===BU){let t={...LU,tagNames:[...LU.tagNames??[],...Object.keys(x)],attributes:{...LU.attributes,...x}};e=[RU.raw,[UP,t],RU.harden]}return S&&S.length>0&&(e=[...e,[MU,S]]),_!=null&&_.math&&(e=[...e,_.math.rehypePlugin]),ce&&f&&(e=[...e,ce.rehypePlugin]),e},[o,_?.math,ce,f,x,S]),me=(0,L.useMemo)(()=>{if(!f||ae.length===0)return!1;let e=ae.at(-1);return $H(e)||eU(e)},[f,ae]),he=(0,L.useMemo)(()=>g&&f&&!me?{"--streamdown-caret":`"${HU[g]}"`}:void 0,[g,f,me]);return t===`static`?(0,z.jsx)(LV.Provider,{value:ue,children:(0,z.jsx)(YV.Provider,{value:_??null,children:(0,z.jsx)(GU.Provider,{value:le,children:(0,z.jsx)(PV,{icons:w,children:(0,z.jsx)(yV.Provider,{value:j,children:(0,z.jsx)(`div`,{className:j(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?XH(te):n,children:(0,z.jsx)(oU,{components:de,rehypePlugins:pe,remarkPlugins:fe,...O,children:te})})})})})})}):(0,z.jsx)(LV.Provider,{value:ue,children:(0,z.jsx)(YV.Provider,{value:_??null,children:(0,z.jsx)(GU.Provider,{value:le,children:(0,z.jsx)(PV,{icons:w,children:(0,z.jsx)(yV.Provider,{value:j,children:(0,z.jsxs)(`div`,{className:j(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,g&&!me?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:he,children:[ae.length===0&&g&&f&&(0,z.jsx)(`span`,{}),ae.map((e,t)=>{let a=t===ae.length-1,o=f&&a&&$H(e);return(0,z.jsx)(m,{animatePlugin:ce,components:de,content:e,dir:oe?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:pe,remarkPlugins:fe,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...O},se[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);qU.displayName=`Streamdown`;var JU=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:l,ZoomOutIcon:u}=FV(),d=bV(),f=(0,L.useRef)(null),p=(0,L.useRef)(null),[m,h]=(0,L.useState)(o),[g,_]=(0,L.useState)({x:0,y:0}),[v,y]=(0,L.useState)(!1),[b,x]=(0,L.useState)({x:0,y:0}),[S,C]=(0,L.useState)({x:0,y:0}),w=(0,L.useCallback)(e=>{h(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),T=(0,L.useCallback)(()=>{w(i)},[w,i]),E=(0,L.useCallback)(()=>{w(-i)},[w,i]),D=(0,L.useCallback)(()=>{h(o),_({x:0,y:0})},[o]),O=(0,L.useCallback)(e=>{e.preventDefault(),w(e.deltaY>0?-i:i)},[w,i]),k=(0,L.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;y(!0),x({x:e.clientX,y:e.clientY}),C(g);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[g]),ee=(0,L.useCallback)(e=>{if(!v)return;e.preventDefault();let t=e.clientX-b.x,n=e.clientY-b.y;_({x:S.x+t,y:S.y+n})},[v,b,S]),A=(0,L.useCallback)(e=>{y(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,L.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(`wheel`,O,{passive:!1}),()=>{e.removeEventListener(`wheel`,O)}},[O]),(0,L.useEffect)(()=>{let e=p.current;if(e&&v)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,ee,{passive:!1}),e.addEventListener(`pointerup`,A),e.addEventListener(`pointercancel`,A),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,ee),e.removeEventListener(`pointerup`,A),e.removeEventListener(`pointercancel`,A)}},[v,ee,A]),(0,z.jsxs)(`div`,{className:d(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:f,style:{cursor:v?`grabbing`:`grab`},children:[a?(0,z.jsxs)(`div`,{className:d(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,z.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m>=r,onClick:T,title:`Zoom in`,type:`button`,children:(0,z.jsx)(l,{size:16})}),(0,z.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m<=n,onClick:E,title:`Zoom out`,type:`button`,children:(0,z.jsx)(u,{size:16})}),(0,z.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`),onClick:D,title:`Reset zoom and pan`,type:`button`,children:(0,z.jsx)(c,{size:16})})]}):null,(0,z.jsx)(`div`,{className:d(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:k,ref:p,role:`application`,style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},YU=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=bV(),[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(``),[f,p]=(0,L.useState)(``),[m,h]=(0,L.useState)(0),{mermaid:g}=(0,L.useContext)(GU),_=QV(),v=g?.errorComponent,{shouldRender:y,containerRef:b}=tV({immediate:r});if((0,L.useEffect)(()=>{if(y){if(!_){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{s(null),l(!0);let t=_.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);d(a),p(a)}catch(e){f||u||s(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{l(!1)}})()}},[e,n,m,y,_]),!(y||u||f))return(0,z.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:b});if(c&&!u&&!f)return(0,z.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:b,children:(0,z.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,z.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,z.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!f)return v?(0,z.jsx)(`div`,{ref:b,children:(0,z.jsx)(v,{chart:e,error:o,retry:()=>h(e=>e+1)})}):(0,z.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:b,children:[(0,z.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,z.jsxs)(`details`,{className:a(`mt-2`),children:[(0,z.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,z.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let x=u||f;return(0,z.jsx)(`div`,{className:a(`size-full`,t),"data-streamdown":`mermaid`,ref:b,children:(0,z.jsx)(JU,{className:a(r?`size-full overflow-hidden`:`overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,z.jsx)(`div`,{"aria-label":`Mermaid chart`,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:x},role:`img`})})})},XU=({className:e,from:t,...n})=>(0,z.jsx)(`div`,{className:gi(`group flex w-full max-w-[95%] flex-col gap-2`,t===`user`?`is-user ml-auto justify-end`:`is-assistant self-start`,e),...n}),ZU=({children:e,className:t,...n})=>(0,z.jsx)(`div`,{className:gi(`is-user:dark flex w-fit min-w-0 max-w-full flex-col gap-2 overflow-hidden text-sm`,`group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground`,`group-[.is-assistant]:text-left group-[.is-assistant]:text-foreground`,t),...n,children:e}),QU=({className:e,children:t,...n})=>(0,z.jsx)(`div`,{className:gi(`flex items-center gap-1`,e),...n,children:t}),$U=({tooltip:e,children:t,label:n,variant:r=`ghost`,size:i=`icon-sm`,...a})=>{let o=(0,z.jsxs)(bi,{size:i,type:`button`,variant:r,...a,children:[t,(0,z.jsx)(`span`,{className:`sr-only`,children:n||e})]});return e?(0,z.jsx)(Gf,{children:(0,z.jsxs)(Kf,{children:[(0,z.jsx)(qf,{render:o}),(0,z.jsx)(Jf,{children:(0,z.jsx)(`p`,{children:e})})]})}):o},eW=(0,L.createContext)(null),tW=()=>{let e=(0,L.useContext)(eW);if(!e)throw Error(`MessageBranch components must be used within MessageBranch`);return e},nW=({defaultBranch:e=0,onBranchChange:t,className:n,...r})=>{let[i,a]=(0,L.useState)(e),[o,s]=(0,L.useState)([]),c=(0,L.useCallback)(e=>{a(e),t?.(e)},[t]),l=(0,L.useCallback)(()=>{c(i>0?i-1:o.length-1)},[i,o.length,c]),u=(0,L.useCallback)(()=>{c(i<o.length-1?i+1:0)},[i,o.length,c]),d=(0,L.useMemo)(()=>({branches:o,currentBranch:i,goToNext:u,goToPrevious:l,setBranches:s,totalBranches:o.length}),[o,i,u,l]);return(0,z.jsx)(eW.Provider,{value:d,children:(0,z.jsx)(`div`,{className:gi(`grid w-full gap-2 [&>div]:pb-0`,n),...r})})},rW=({children:e,...t})=>{let{currentBranch:n,setBranches:r,branches:i}=tW(),a=(0,L.useMemo)(()=>Array.isArray(e)?e:[e],[e]);return(0,L.useEffect)(()=>{i.length!==a.length&&r(a)},[a,i,r]),a.map((e,r)=>(0,z.jsx)(`div`,{className:gi(`grid gap-2 overflow-hidden [&>div]:pb-0`,r===n?`block`:`hidden`),...t,children:e},e.key))},iW={cjk:wm,code:YS,math:xC,mermaid:fk},aW=(0,L.memo)(({className:e,...t})=>(0,z.jsx)(qU,{className:gi(`size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,e),plugins:iW,...t}),(e,t)=>e.children===t.children&&t.isAnimating===e.isAnimating);aW.displayName=`MessageResponse`;var oW=({messageId:e,rating:t,onRate:n,disabled:r})=>{let[i,a]=(0,L.useState)(null),[o,s]=(0,L.useState)(``),c=t?.rating,l=(0,L.useCallback)(r=>{let i=c===r?0:r;i===0?(n(e,0),a(null),s(``)):(a(i),s(t?.comment??``))},[c,e,n,t?.comment]),u=(0,L.useCallback)(()=>{i!==null&&(n(e,i,o.trim()||void 0),a(null),s(``))},[o,e,n,i]),d=(0,L.useCallback)(()=>{i!==null&&(n(e,i),a(null),s(``))},[e,n,i]),f=i??c;return(0,z.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2`,children:[(0,z.jsxs)(QU,{children:[(0,z.jsx)($U,{tooltip:`Thumbs up`,onClick:()=>l(1),variant:f===1?`default`:`ghost`,disabled:r,children:(0,z.jsx)(Ud,{className:`size-4`})}),(0,z.jsx)($U,{tooltip:`Thumbs down`,onClick:()=>l(-1),variant:f===-1?`default`:`ghost`,disabled:r,children:(0,z.jsx)(Hd,{className:`size-4`})})]}),i!==null&&(0,z.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-md border bg-background p-3 text-sm shadow-sm`,children:[(0,z.jsx)(`textarea`,{autoFocus:!0,className:`w-full resize-none rounded border-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground`,placeholder:`Add a comment (optional)`,rows:2,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&u(),e.key===`Escape`&&d()}}),(0,z.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,z.jsx)(`button`,{className:`text-xs text-muted-foreground hover:text-foreground transition-colors`,onClick:d,children:`Skip`}),(0,z.jsx)(`button`,{className:`rounded bg-primary px-2.5 py-1 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors`,onClick:u,children:`Submit`})]})]})]})},sW=globalThis?.document?L.useLayoutEffect:()=>{},cW=L.useInsertionEffect||sW;function lW({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=uW({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=L.useRef(e!==void 0);L.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,L.useCallback(t=>{if(s){let n=dW(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function uW({defaultProp:e,onChange:t}){let[n,r]=L.useState(e),i=L.useRef(n),a=L.useRef(t);return cW(()=>{a.current=t},[t]),L.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function dW(e){return typeof e==`function`}var fW=L.createContext(void 0);function pW(e){let t=L.useContext(fW);if(e===!1&&t===void 0)throw Error(un(27));return t}var mW={...Uu,...Vl},hW=L.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,{store:s}=pW(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return Mn(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:mW,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),gW=L.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,style:o,...s}=e,{store:c}=pW(),l=c.useState(`open`);function u(e){l&&c.setOpen(!1,ua(na,e.nativeEvent))}let{getButtonProps:d,buttonRef:f}=mn({disabled:i,native:a});return Mn(`button`,e,{state:{disabled:i},ref:[t,f],props:[{onClick:u},s,d]})}),_W=L.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=pW(),c=Wu(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),Mn(`p`,e,{ref:t,props:[{id:c},o]})}),vW=function(e){return e.nestedDialogs=`--nested-dialogs`,e}({}),yW=function(e){return e[e.open=Pu.open]=`open`,e[e.closed=Pu.closed]=`closed`,e[e.startingStyle=Pu.startingStyle]=`startingStyle`,e[e.endingStyle=Pu.endingStyle]=`endingStyle`,e.nested=`data-nested`,e.nestedDialogOpen=`data-nested-dialog-open`,e}({}),bW=L.createContext(void 0);function xW(){let e=L.useContext(bW);if(e===void 0)throw Error(un(26));return e}var SW=`ArrowUp`,CW=`ArrowDown`,wW=`ArrowLeft`,TW=`ArrowRight`,EW=`Home`,DW=new Set([wW,TW]),OW=new Set([SW,CW]),kW=new Set([...DW,...OW]);new Set([...kW,EW,`End`]);var AW=new Set([SW,CW,wW,TW,EW,`End`]),jW={...Uu,...Vl,nestedDialogOpen(e){return e?{[yW.nestedDialogOpen]:``}:null}},MW=L.forwardRef(function(e,t){let{className:n,finalFocus:r,initialFocus:i,render:a,style:o,...s}=e,{store:c}=pW(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`);xW(),Ul({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});function S(e){return e===`touch`?c.context.popupRef.current:!0}let C=i===void 0?S:i,w=Mn(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:g>0},props:[f,{"aria-labelledby":y??void 0,"aria-describedby":l??void 0,role:x,tabIndex:-1,hidden:!m,onKeyDown(e){AW.has(e.key)&&e.stopPropagation()},style:{[vW.nestedDialogs]:g}},s],ref:[t,c.context.popupRef,c.useStateSetter(`popupElement`)],stateAttributesMapping:jW});return(0,z.jsx)(Zs,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:r,modal:p!==!1,restoreFocus:`popup`,children:w})}),NW=L.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,z.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),PW=L.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=pW(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,z.jsx)(bW.Provider,{value:n,children:(0,z.jsxs)(Ms,{ref:t,...r,children:[a&&o===!0&&(0,z.jsx)(NW,{ref:i.context.internalBackdropRef,inert:id(!s)}),e.children]})}):null}),FW={},IW={},LW=``;function RW(e){if(typeof document>`u`)return!1;let t=Sa(e);return ht(t).innerWidth-t.documentElement.clientWidth>0}function zW(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Sa(e),n=t.documentElement,r=t.body,i=xt(n)?n:r,a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function BW(e){let t=Sa(e),n=t.documentElement,r=t.body,i=xt(n)?n:r,a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function VW(e){let t=Sa(e),n=t.documentElement,r=t.body,i=ht(n),a=0,o=0,s=!1,c=ba.create();if(ji&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,FW={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},LW=n.style.scrollBehavior,IW={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=xt(n)?n:r;if(s=zW(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflow:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,FW),Object.assign(r.style,IW),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=LW)}function d(){u(),c.request(l)}l();let f=ma(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var HW=new class{lockCount=0;restore=null;timeoutLock=Ti.create();timeoutUnlock=Ti.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Sa(e).documentElement,n=ht(t).getComputedStyle(t).overflowY;if(n===`hidden`||n===`clip`){this.restore=En;return}let r=Mi||!RW(e);this.restore=r?BW(e):VW(e)}};function UW(e=!0,t=null){R(()=>{if(e)return HW.acquire(t)},[e,t])}function WW(e){let t=L.useRef(``),n=L.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:L.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function GW(e,t){let n=L.useRef(e),r=Ht(t);R(()=>{n.current!==e&&r(n.current)},[e,r]),R(()=>{n.current=e},[e])}function KW(e){let[t,n]=L.useState(null),r=Ht((t,r)=>{e||n(r||(Mi?`touch`:``))});GW(e,t=>{t&&!e&&n(null)});let{onClick:i,onPointerDown:a}=WW(r);return L.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}function qW(e){let{store:t,parentContext:n,actionsRef:r,isDrawer:i}=e,a=t.useState(`open`),o=t.useState(`disablePointerDismissal`),s=t.useState(`modal`),c=t.useState(`popupElement`),{openMethod:l,triggerProps:u}=KW(a);Kl(t);let{forceUnmount:d}=ql(a,t),f=L.useCallback(()=>{t.setOpen(!1,ua(la))},[t]);L.useImperativeHandle(r,()=>({unmount:d,close:f}),[d,f]);let p=tu({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0}),[m,h]=L.useState(0),[g,_]=L.useState(0),v=m===0,y=Cu(p),b=ac(p,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?`intentional`:{mouse:s===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(e){if(!t.context.outsidePressEnabledRef.current||`button`in e&&e.button!==0||`touches`in e&&e.touches.length!==1)return!1;let n=Fa(e);if(v&&!o){let e=n;return s&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||Pa(e,c)&&!e?.hasAttribute(`data-base-ui-portal`):!0}return!1},escapeKey:v});UW(a&&s===!0,c);let{getReferenceProps:x,getFloatingProps:S,getTriggerProps:C}=fu([y,b]);t.useContextCallback(`onNestedDialogOpen`,(e,t)=>{h(e),_(t)}),t.useContextCallback(`onNestedDialogClose`,()=>{h(0),_(0)}),L.useEffect(()=>(n?.onNestedDialogOpen&&a&&n.onNestedDialogOpen(m+1,g+ +!!i),n?.onNestedDialogClose&&!a&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&a&&n.onNestedDialogClose()}),[i,a,m,g,n]);let w=L.useMemo(()=>x(u),[x,u]),T=L.useMemo(()=>C(u),[C,u]),E=L.useMemo(()=>S(),[S]);t.useSyncedValues({openMethod:l,activeTriggerProps:w,inactiveTriggerProps:T,popupProps:E,floatingRootContext:p,nestedOpenDialogCount:m,nestedOpenDrawerCount:g})}var JW={...Ql,modal:B(e=>e.modal),nested:B(e=>e.nested),nestedOpenDialogCount:B(e=>e.nestedOpenDialogCount),nestedOpenDrawerCount:B(e=>e.nestedOpenDrawerCount),disablePointerDismissal:B(e=>e.disablePointerDismissal),openMethod:B(e=>e.openMethod),descriptionElementId:B(e=>e.descriptionElementId),titleElementId:B(e=>e.titleElementId),viewportElement:B(e=>e.viewportElement),role:B(e=>e.role)},YW=class e extends Pl{constructor(e){super(XW(e),{popupRef:L.createRef(),backdropRef:L.createRef(),internalBackdropRef:L.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Jl,onOpenChange:void 0,onOpenChangeComplete:void 0},JW)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let n={open:e},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};static useStore(t,n){let r=zt(()=>new e(n)).current;return t??r}};function XW(e={}){return{...Xl(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}var ZW=L.createContext(!1);function QW(e){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:o=!1,modal:s=!0,actionsRef:c,handle:l,triggerId:u,defaultTriggerId:d=null}=e,f=pW(!0),p=L.useContext(ZW),m=!!f,h=YW.useStore(l?.store,{open:r,openProp:n,activeTriggerId:d,triggerIdProp:u,modal:s,disablePointerDismissal:o,nested:m});xi(()=>{n===void 0&&h.state.open===!1&&r===!0&&h.update({open:!0,activeTriggerId:d})}),h.useControlledProp(`openProp`,n),h.useControlledProp(`triggerIdProp`,u),h.useSyncedValues({disablePointerDismissal:o,nested:m,modal:s}),h.useContextCallback(`onOpenChange`,i),h.useContextCallback(`onOpenChangeComplete`,a);let g=h.useState(`payload`);qW({store:h,actionsRef:c,parentContext:f?.store.context,isDrawer:p,onOpenChange:i,triggerIdProp:u});let _=L.useMemo(()=>({store:h}),[h]);return(0,z.jsx)(ZW.Provider,{value:!1,children:(0,z.jsx)(fW.Provider,{value:_,children:typeof t==`function`?t({payload:g}):t})})}var $W=L.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{store:s}=pW(),c=Wu(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),Mn(`h2`,e,{ref:t,props:[{id:c},o]})}),eG=L.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,id:o,payload:s,handle:c,style:l,...u}=e,d=pW(!0),f=c?.store??d?.store;if(!f)throw Error(un(79));let p=Wu(o),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=L.useRef(null),{registerTrigger:_,isMountedByThisTrigger:v}=Gl(p,g,f,{payload:s}),{getButtonProps:y,buttonRef:b}=mn({disabled:i,native:a}),x=fu([Qs(m,{enabled:m!=null})]),S={disabled:i,open:h},C=f.useState(`triggerProps`,v);return Mn(`button`,e,{state:S,ref:[b,t,_,g],props:[x.getReferenceProps(),C,{[ws]:``,id:p},u,y],stateAttributesMapping:Vu})});function tG({...e}){return(0,z.jsx)(QW,{"data-slot":`dialog`,...e})}function nG({...e}){return(0,z.jsx)(eG,{"data-slot":`dialog-trigger`,...e})}function rG({...e}){return(0,z.jsx)(PW,{"data-slot":`dialog-portal`,...e})}function iG({className:e,...t}){return(0,z.jsx)(hW,{"data-slot":`dialog-overlay`,className:gi(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function aG({className:e,children:t,showCloseButton:n=!0,...r}){return(0,z.jsxs)(rG,{children:[(0,z.jsx)(iG,{}),(0,z.jsxs)(MW,{"data-slot":`dialog-content`,className:gi(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-background p-4 text-sm ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...r,children:[t,n&&(0,z.jsxs)(gW,{"data-slot":`dialog-close`,render:(0,z.jsx)(bi,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,z.jsx)(qd,{}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function oG({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`dialog-header`,className:gi(`flex flex-col gap-2`,e),...t})}function sG({className:e,showCloseButton:t=!1,children:n,...r}){return(0,z.jsxs)(`div`,{"data-slot":`dialog-footer`,className:gi(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,z.jsx)(gW,{render:(0,z.jsx)(bi,{variant:`outline`}),children:`Close`})]})}function cG({className:e,...t}){return(0,z.jsx)($W,{"data-slot":`dialog-title`,className:gi(`text-base leading-none font-medium`,e),...t})}var lG=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),uG={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},dG={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},fG={disabled:!1,...dG},pG={valid(e){return e===null?null:e?{[lG.valid]:``}:{[lG.invalid]:``}}},mG=L.createContext({invalid:void 0,name:void 0,validityData:{state:uG,errors:[],error:``,value:``,initialValue:null},setValidityData:En,disabled:void 0,touched:dG.touched,setTouched:En,dirty:dG.dirty,setDirty:En,filled:dG.filled,setFilled:En,focused:dG.focused,setFocused:En,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:fG,markedDirtyRef:{current:!1},registerFieldControl:En,validation:{getValidationProps:(e=On)=>e,getInputValidationProps:(e=On)=>e,inputRef:{current:null},commit:async()=>{}}});function hG(e=!0){let t=L.useContext(mG);if(t.setValidityData===En&&!e)throw Error(un(28));return t}var gG=L.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:En,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function _G(){return L.useContext(gG)}var vG=L.createContext({controlId:void 0,registerControlId:En,labelId:void 0,setLabelId:En,messageIds:[],setMessageIds:En,getDescriptionProps:e=>e});function yG(){return L.useContext(vG)}function bG(e,t,n,r=!0,i){let[a,o]=L.useState(),s=Wu(i?`${i}-label`:void 0),c=e??t??a;return R(()=>{let i=e||t||!r?void 0:xG(n.current,s);a!==i&&o(i)}),c}function xG(e,t){let n=SG(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function SG(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function CG(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:a}=yG(),o=Wu(t),s=n?i:void 0,c=zt(()=>Symbol(`labelable-control`)),l=L.useRef(!1),u=L.useRef(t!=null),d=Ht(()=>{!l.current||a===En||(l.current=!1,a(c.current,void 0))});return R(()=>{if(a===En)return;let e;if(n){let n=r?.current;e=vt(n)&&n.closest(`label`)!=null?t??null:s??o}else if(t!=null)u.current=!0,e=t;else if(u.current)e=o;else{d();return}if(e===void 0){d();return}l.current=!0,a(c.current,e)},[t,r,s,a,n,o,c,d]),L.useEffect(()=>d,[d]),i??o}function wG({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=L.useRef(e!==void 0),[a,o]=L.useState(t);return[i?e:a,L.useCallback(e=>{i||o(e)},[])]}function TG(e,t){let{enabled:n=!0,getValue:r,id:i,value:a}=t,{registerFieldControl:o}=hG(),s=L.useRef(null);s.current||=Symbol(),R(()=>{let t=s.current;if(!(!t||!n))return o(t,{controlRef:e,getValue:r,id:i,value:a}),()=>{o(t,void 0)}},[e,n,r,i,o,a])}var EG=L.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFocused:y,setFilled:b,validationMode:x,validation:S}=hG(),C=h||s,w=m??a,T={...p,disabled:C},{labelId:E}=yG(),D=CG({id:i});R(()=>{let e=o!=null;S.inputRef.current?.value||e&&o!==``?b(!0):e&&o===``&&b(!1)},[S.inputRef,b,o]);let O=L.useRef(null);R(()=>{u&&O.current===Na(Sa(O.current))&&y(!0)},[u,y]);let[k]=wG({controlled:o,default:l,name:`FieldControl`,state:`value`}),ee=o!==void 0,A=ee?k:void 0,j=Ht(()=>S.inputRef.current?.value);return TG(S.inputRef,{id:D,value:A,getValue:j}),Mn(`input`,e,{ref:[t,O],state:T,props:[{id:D,disabled:C,name:w,ref:S.inputRef,"aria-labelledby":E,autoFocus:u,...ee?{value:A}:{defaultValue:l},onChange(e){let t=e.currentTarget.value;c?.(t,ua(Xi,e.nativeEvent)),_(t!==v.initialValue),b(t!==``)},onFocus(){y(!0)},onBlur(e){g(!0),y(!1),x===`onBlur`&&S.commit(e.currentTarget.value)},onKeyDown(e){e.currentTarget.tagName===`INPUT`&&e.key===`Enter`&&(g(!0),S.commit(e.currentTarget.value))}},S.getInputValidationProps(),f],stateAttributesMapping:pG})}),DG=L.forwardRef(function(e,t){return(0,z.jsx)(EG,{ref:t,...e})});function OG({className:e,type:t,...n}){return(0,z.jsx)(DG,{type:t,"data-slot":`input`,className:gi(`h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function kG({className:e,...t}){return(0,z.jsx)(`textarea`,{"data-slot":`textarea`,className:gi(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function AG({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:gi(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var jG=Un(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function MG({className:e,align:t=`inline-start`,...n}){return(0,z.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:gi(jG({align:t}),e),onClick:e=>{e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var NG=Un(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function PG({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,z.jsx)(bi,{type:t,"data-size":r,variant:n,className:gi(NG({size:r}),e),...i})}function FG({className:e,...t}){return(0,z.jsx)(kG,{"data-slot":`input-group-control`,className:gi(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}var IG=L.createContext(void 0);function LG(e){let t=L.useContext(IG);if(t===void 0&&!e)throw Error(un(33));return t}var RG=L.createContext(void 0);function zG(e){let t=L.useContext(RG);if(t===void 0&&!e)throw Error(un(36));return t}var BG=L.createContext(void 0);function VG(e=!0){let t=L.useContext(BG);if(t===void 0&&!e)throw Error(un(25));return t}function HG(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,{events:l}=a.useState(`floatingTreeRoot`),u=VG(!0),d=u!==void 0;return L.useMemo(()=>({id:r,role:`menuitem`,tabIndex:n?0:-1,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&l.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&l.emit(`close`,{domEvent:e,reason:ta})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,d&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||d&&!Fi&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!d||e.button===2)&&(!c||c.type===`regular-item`)&&s.current.click()}}),[t,n,r,l,i,a,o,s,u,d,c])}var UG={type:`regular-item`};function WG(e){let{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=L.useRef(null),{getButtonProps:d,buttonRef:f}=mn({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=HG({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=L.useCallback(e=>Jt(p,{onMouseEnter(){c.type===`submenu-trigger`&&c.setActive()}},e,d),[p,d,c]),h=_n(u,f);return L.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var GG=L.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function KG(){return L.useContext(GG)}var qG=function(e){return e[e.None=0]=`None`,e[e.GuessFromOrder=1]=`GuessFromOrder`,e}({});function JG(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,elementsRef:l,labelsRef:u,nextIndexRef:d}=KG(),f=L.useRef(-1),[p,m]=L.useState(a??(i===qG.GuessFromOrder?()=>{if(f.current===-1){let e=d.current;d.current+=1,f.current=e}return f.current}:-1)),h=L.useRef(null),g=L.useCallback(e=>{if(h.current=e,p!==-1&&e!==null&&(l.current[p]=e,u)){let n=t!==void 0;u.current[p]=n?t:r?.current?.textContent??e.textContent}},[p,l,u,t,r]);return R(()=>{if(a!=null)return;let e=h.current;if(e)return o(e,n),()=>{s(e)}},[a,o,s,n]),R(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&m(t)})},[a,c,m]),L.useMemo(()=>({ref:g,index:p}),[p,g])}var YG=L.forwardRef(function(e,t){let{render:n,className:r,id:i,label:a,nativeButton:o=!1,disabled:s=!1,closeOnClick:c=!0,style:l,...u}=e,d=JG({label:a}),f=LG(!0),p=Wu(i),{store:m}=zG(),h=m.useState(`isActive`,d.index),g=m.useState(`itemProps`),{getItemProps:_,itemRef:v}=WG({closeOnClick:c,disabled:s,highlighted:h,id:p,store:m,nativeButton:o,nodeId:f?.context.nodeId,itemMetadata:UG});return Mn(`div`,e,{state:{disabled:s,highlighted:h},props:[g,u,_],ref:[v,t,d.ref]})}),XG=L.createContext(void 0);function ZG(e){let t=L.useContext(XG);if(t===void 0&&!e)throw Error(un(69));return t}var QG={...Uu,...Vl},$G=L.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,{store:s}=zG(),{side:c,align:l}=LG(),u=ZG(!0)!=null,d=s.useState(`open`),f=s.useState(`transitionStatus`),p=s.useState(`popupProps`),m=s.useState(`mounted`),h=s.useState(`instantType`),g=s.useState(`activeTriggerElement`),_=s.useState(`parent`),v=s.useState(`lastOpenChangeReason`),y=s.useState(`rootId`),b=s.useState(`floatingRootContext`),x=s.useState(`floatingTreeRoot`),S=s.useState(`closeDelay`),C=s.useState(`activeTriggerElement`),w=_.type===`context-menu`;Ul({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),L.useEffect(()=>{function e(e){s.setOpen(!1,ua(e.reason,e.domEvent))}return x.events.on(`close`,e),()=>{x.events.off(`close`,e)}},[x.events,s]);let T=s.useState(`hoverEnabled`),E=s.useState(`disabled`);lu(b,{enabled:T&&!E&&!w&&_.type!==`menubar`,closeDelay:S});let D={transitionStatus:f,side:c,align:l,open:d,nested:_.type===`menu`,instant:h},O=L.useCallback(e=>{s.set(`popupElement`,e)},[s]),k=Mn(`div`,e,{state:D,ref:[t,s.context.popupRef,O],stateAttributesMapping:QG,props:[p,{onKeyDown(e){u&&AW.has(e.key)&&e.stopPropagation()}},nd(f),o,{"data-rootownerid":y}]}),ee=_.type===void 0||w;return(g||_.type===`menubar`&&v!==`outside-press`)&&(ee=!0),(0,z.jsx)(Zs,{context:b,modal:w,disabled:!m,returnFocus:a===void 0?ee:a,initialFocus:_.type!==`menu`,restoreFocus:!0,externalTree:_.type===`menubar`?void 0:x,previousFocusableElement:C,nextFocusableElement:_.type===void 0?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:_.type===void 0?s.context.beforeContentFocusGuardRef:void 0,children:k})}),eK=L.createContext(void 0);function tK(){let e=L.useContext(eK);if(e===void 0)throw Error(un(32));return e}var nK=L.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=zG();return i.useState(`mounted`)||n?(0,z.jsx)(eK.Provider,{value:n,children:(0,z.jsx)(Ms,{ref:t,...r})}):null});function rK(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=Ht(i),o=L.useRef(0),s=zt(aK).current,c=zt(iK).current,[l,u]=L.useState(0),d=L.useRef(l),f=Ht((e,t)=>{c.set(e,t??null),d.current+=1,u(d.current)}),p=Ht(e=>{c.delete(e),d.current+=1,u(d.current)}),m=L.useMemo(()=>{let e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(oK).forEach((t,n)=>{let r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,l]);R(()=>{if(typeof MutationObserver!=`function`||m.size===0)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),t.size===0&&(d.current+=1,u(d.current))});return m.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[m]),R(()=>{d.current===l&&(n.current.length!==m.size&&(n.current.length=m.size),r&&r.current.length!==m.size&&(r.current.length=m.size),o.current=m.size),a(m)},[a,m,n,r,l]),R(()=>()=>{n.current=[]},[n]),R(()=>()=>{r&&(r.current=[])},[r]);let h=Ht(e=>(s.add(e),()=>{s.delete(e)}));R(()=>{s.forEach(e=>e(m))},[s,m]);let g=L.useMemo(()=>({register:f,unregister:p,subscribeMapChange:h,elementsRef:n,labelsRef:r,nextIndexRef:o}),[f,p,h,n,r,o]);return(0,z.jsx)(GG.Provider,{value:g,children:t})}function iK(){return new Map}function aK(){return new Set}function oK(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var sK=20;function cK(e,t,n,r){let[i,a]=L.useState(!1);R(()=>{if(!e||!t||n==null){a(!1);return}let r=Sa(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-sK)},[e,t,n]),UW(e&&(!t||i),r)}var lK=L.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:s,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Ts,style:g,..._}=e,{store:v}=zG(),y=tK(),b=VG(!0),x=v.useState(`parent`),S=v.useState(`floatingRootContext`),C=v.useState(`floatingTreeRoot`),w=v.useState(`mounted`),T=v.useState(`open`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`activeTriggerElement`),k=v.useState(`transitionStatus`),ee=v.useState(`positionerElement`),A=v.useState(`instantType`),j=v.useState(`hasViewport`),M=v.useState(`lastOpenChangeReason`),N=v.useState(`floatingNodeId`),P=v.useState(`floatingParentNodeId`),F=S.useState(`domReferenceElement`),te=L.useRef(null),ne=Hl(ee,!1,!1),re=n,ie=c,ae=l,oe=s,se=h;x.type===`context-menu`&&(re=n??x.context?.anchor,oe??=`start`,!o&&oe!==`center`&&(ae=e.alignOffset??2,ie=e.sideOffset??-5));let I=o,ce=oe;x.type===`menu`?(I??=`inline-end`,ce??=`start`,se=e.collisionAvoidance??Es):x.type===`menubar`&&(I??=`bottom`,ce??=`start`);let le=x.type===`context-menu`,ue=ed({anchor:re,floatingRootContext:S,positionMethod:b?`fixed`:r,mounted:w,side:I,sideOffset:ie,align:ce,alignOffset:ae,arrowPadding:le?0:f,collisionBoundary:u,collisionPadding:d,sticky:p,nodeId:N,keepMounted:y,disableAnchorTracking:m,collisionAvoidance:se,shiftCrossAxis:le&&!(`side`in se&&se.side===`flip`),externalTree:C,adaptiveOrigin:j?Zu:void 0});L.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===N&&v.set(`hoverEnabled`,!1),e.nodeId!==N&&e.parentNodeId===v.select(`floatingParentNodeId`)&&v.setOpen(!1,ua(sa)))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[v,C.events,N]),L.useEffect(()=>{if(v.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==v.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;v.setOpen(!1,ua(t))}return C.events.on(`menuopenchange`,e),()=>{C.events.off(`menuopenchange`,e)}},[C.events,v]);let de=Ei();L.useEffect(()=>{T||de.clear()},[T,de]),L.useEffect(()=>{function e(e){if(!(!T||e.nodeId!==v.select(`floatingParentNodeId`)))if(e.target&&O&&O!==e.target){let e=v.select(`closeDelay`);e>0?de.isStarted()||de.start(e,()=>{v.setOpen(!1,ua(sa))}):v.setOpen(!1,ua(sa))}else de.clear()}return C.events.on(`itemhover`,e),()=>{C.events.off(`itemhover`,e)}},[C.events,T,O,v,de]),L.useEffect(()=>{let e={open:T,nodeId:N,parentNodeId:P,reason:v.select(`lastOpenChangeReason`)};C.events.emit(`menuopenchange`,e)},[C.events,T,v,N,P]),R(()=>{let e=F,t=te.current;if(e&&(te.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return ne(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[F,ne,v]);let fe={open:T,side:ue.side,align:ue.align,anchorHidden:ue.anchorHidden,nested:x.type===`menu`,instant:A},pe=x.type===`menubar`&&x.context.modal;cK(T&&(pe||E&&M!==`trigger-hover`),D===`touch`,ee,O);let me=rd(e,fe,{styles:ue.positionerStyles,transitionStatus:k,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!w,inert:!T}),he=w&&x.type!==`menu`&&(x.type!==`menubar`&&E&&M!==`trigger-hover`||x.type===`menubar`&&x.context.modal),ge=null;return x.type===`menubar`?ge=x.context.contentElement:x.type===void 0&&(ge=O),(0,z.jsxs)(IG.Provider,{value:ue,children:[he&&(0,z.jsx)(NW,{ref:x.type===`context-menu`||x.type===`nested-context-menu`?x.context.internalBackdropRef:null,inert:id(!T),cutout:ge}),(0,z.jsx)(Bs,{id:N,children:(0,z.jsx)(rK,{elementsRef:v.context.itemDomElements,labelsRef:v.context.itemLabels,children:me})})]})}),uK=L.createContext(null);function dK(e){let t=L.useContext(uK);if(t===null&&!e)throw Error(un(5));return t}var fK={...Ql,disabled:B(e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled),modal:B(e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0)),openMethod:B(e=>e.openMethod),allowMouseEnter:B(e=>e.allowMouseEnter),stickIfOpen:B(e=>e.stickIfOpen),parent:B(e=>e.parent),rootId:B(e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId),activeIndex:B(e=>e.activeIndex),isActive:B((e,t)=>e.activeIndex===t),hoverEnabled:B(e=>e.hoverEnabled),instantType:B(e=>e.instantType),lastOpenChangeReason:B(e=>e.openChangeReason),floatingTreeRoot:B(e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot),floatingNodeId:B(e=>e.floatingNodeId),floatingParentNodeId:B(e=>e.floatingParentNodeId),itemProps:B(e=>e.itemProps),closeDelay:B(e=>e.closeDelay),hasViewport:B(e=>e.hasViewport),keyboardEventRelay:B(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)})},pK=class e extends Pl{constructor(e){super({...mK(),...e},{positionerRef:L.createRef(),popupRef:L.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:L.createRef(),beforeContentFocusGuardRef:L.createRef(),onOpenChangeComplete:void 0,triggerElements:new Jl},fK),this.unsubscribeParentListener=this.observe(`parent`,e=>{if(this.unsubscribeParentListener?.(),e.type===`menu`){let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);this.unsubscribeParentListener=e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);t===i&&n===a&&r===o||(t=i,n=a,r=o,this.notifyAll())}),this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef;return}e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}static useStore(t,n){let r=zt(()=>new e(n)).current;return t??r}unsubscribeParentListener=null};function mK(){return{...Xl(),disabled:!1,modal:!0,openMethod:null,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Ps,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:On,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1}}var hK=L.createContext(void 0);function gK(){return L.useContext(hK)}var _K=Cl(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:o=!1,modal:s,loopFocus:c=!0,orientation:l=`vertical`,actionsRef:u,closeParentOnEsc:d=!1,handle:f,triggerId:p,defaultTriggerId:m=null,highlightItemOnHover:h=!0}=e,g=VG(!0),_=zG(!0),v=dK(!0),y=gK(),b=L.useMemo(()=>y&&_?{type:`menu`,store:_.store}:v?{type:`menubar`,context:v}:g&&!_?{type:`context-menu`,context:g}:{type:void 0},[g,_,v,y]),x=pK.useStore(f?.store,{open:a,openProp:n,activeTriggerId:m,triggerIdProp:p,parent:b});xi(()=>{n===void 0&&x.state.open===!1&&a===!0&&x.update({open:!0,activeTriggerId:m})}),x.useControlledProp(`openProp`,n),x.useControlledProp(`triggerIdProp`,p),x.useContextCallback(`onOpenChangeComplete`,i);let S=x.useState(`floatingTreeRoot`),C=zs(S),w=Ls();R(()=>{g&&!_?x.update({parent:{type:`context-menu`,context:g},floatingNodeId:C,floatingParentNodeId:w}):_&&x.update({floatingNodeId:C,floatingParentNodeId:w})},[g,_,C,w,x]);let T=x.useState(`open`),E=x.useState(`activeTriggerElement`),D=x.useState(`positionerElement`),O=x.useState(`hoverEnabled`),k=x.useState(`disabled`),ee=x.useState(`lastOpenChangeReason`),A=x.useState(`parent`),j=x.useState(`activeIndex`),M=x.useState(`payload`),N=x.useState(`floatingParentNodeId`),P=L.useRef(null),F=N!=null,{openMethod:te,triggerProps:ne}=KW(T);x.useSyncedValues({disabled:o,modal:A.type===void 0?s:void 0,openMethod:te,rootId:Ss()}),Kl(x);let{forceUnmount:re}=ql(T,x,()=>{x.update({allowMouseEnter:!1,stickIfOpen:!0})}),ie=L.useRef(A.type!==`context-menu`),ae=Ei();L.useEffect(()=>{if(T||(P.current=null),A.type===`context-menu`){if(!T){ae.clear(),ie.current=!1;return}ae.start(500,()=>{ie.current=!0})}},[ae,T,A.type]),R(()=>{!T&&!O&&x.set(`hoverEnabled`,!0)},[T,O,x]);let oe=L.useRef(!0),se=Ei(),I=Ht((e,t)=>{let n=t.reason;if(T===e&&t.trigger===E&&ee===n||(t.preventUnmountOnClose=()=>{x.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&(t.trigger=E??void 0),r?.(e,t),t.isCanceled))return;x.state.floatingRootContext.dispatchOpenChange(e,t);let i=t.event;if(e===!1&&i?.type===`click`&&i.pointerType===`touch`&&!oe.current)return;if(!e&&j!==null){let e=x.context.itemDomElements.current[j];queueMicrotask(()=>{e?.setAttribute(`tabindex`,`-1`)})}e&&n===`trigger-focus`?(oe.current=!1,se.start(300,()=>{oe.current=!0})):(oe.current=!0,se.clear());let a=(n===`trigger-press`||n===`item-press`)&&i.detail===0&&i?.isTrusted,o=!e&&(n===`escape-key`||n==null),s={open:e,openChangeReason:n};P.current=t.event??null;let c=t.trigger?.id??null;(c||e)&&(s.activeTriggerId=c,s.activeTriggerElement=t.trigger??null),x.update(s),A.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?x.set(`instantType`,`group`):a||o?x.set(`instantType`,a?`click`:`dismiss`):x.set(`instantType`,void 0)}),ce=L.useCallback(()=>{x.setOpen(!1,ua(la))},[x]);L.useImperativeHandle(u,()=>({unmount:re,close:ce}),[re,ce]);let le;A.type===`context-menu`&&(le=A.context),L.useImperativeHandle(le?.positionerRef,()=>D,[D]),L.useImperativeHandle(le?.actionsRef,()=>({setOpen:I}),[I]);let ue=tu({popupStore:x,onOpenChange:I}),de=ue.context.events;L.useEffect(()=>{let e=({open:e,eventDetails:t})=>I(e,t);return de.on(`setOpen`,e),()=>{de?.off(`setOpen`,e)}},[de,I]);let fe=ac(ue,{enabled:!k,bubbles:{escapeKey:d&&A.type===`menu`},outsidePress(){return A.type!==`context-menu`||P.current?.type===`contextmenu`?!0:ie.current},externalTree:F?S:void 0}),pe=Cu(ue,{role:`menu`}),me=Ku(),he=L.useCallback(e=>{x.select(`activeIndex`)!==e&&x.set(`activeIndex`,e)},[x]),ge=xu(ue,{enabled:!k,listRef:x.context.itemDomElements,activeIndex:j,nested:A.type!==void 0,loopFocus:c,orientation:l,parentOrientation:A.type===`menubar`?A.context.orientation:void 0,rtl:me===`rtl`,disabledIndices:Dn,onNavigate:he,openOnArrowKeyDown:A.type!==`context-menu`,externalTree:F?S:void 0,focusItemOnHover:h}),_e=L.useCallback(e=>{x.context.typingRef.current=e},[x]),{getReferenceProps:ve,getFloatingProps:ye,getItemProps:be,getTriggerProps:xe}=fu([fe,pe,ge,wu(ue,{listRef:x.context.itemLabels,elementsRef:x.context.itemDomElements,activeIndex:j,resetMs:500,onMatch:e=>{T&&e!==j&&x.set(`activeIndex`,e)},onTypingChange:_e})]),Se=L.useMemo(()=>{let e=Jt(ve(),{onMouseMove(){x.set(`allowMouseEnter`,!0)}},ne);return delete e.role,e},[ve,x,ne]),Ce=L.useMemo(()=>{let e=xe();if(!e)return e;let t=Jt(e,ne);return delete t.role,delete t[`aria-controls`],t},[xe,ne]),we=L.useMemo(()=>ye({onMouseMove(){x.set(`allowMouseEnter`,!0),A.type===`menu`&&x.set(`hoverEnabled`,!1)},onClick(){x.select(`hoverEnabled`)&&x.set(`hoverEnabled`,!1)},onKeyDown(e){let t=x.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}}),[ye,A.type,x]),Te=L.useMemo(()=>be(),[be]);x.useSyncedValues({floatingRootContext:ue,activeTriggerProps:Se,inactiveTriggerProps:Ce,popupProps:we,itemProps:Te});let Ee=L.useMemo(()=>({store:x,parent:b}),[x,b]),De=(0,z.jsx)(RG.Provider,{value:Ee,children:typeof t==`function`?t({payload:M}):t});return A.type===void 0||A.type===`context-menu`?(0,z.jsx)(Vs,{externalTree:S,children:De}):De});function vK(e){let t=e.getBoundingClientRect(),n=ht(e),r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(!(r.content!==`none`||i.content!==`none`))return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function yK(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=fn(),{ref:i,index:a}=JG(e),o=n===a,s=L.useRef(null),c=_n(i,s);return{compositeProps:L.useMemo(()=>({tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}}),[o,r,a,t]),compositeRef:c,index:a}}function bK(e){let{render:t,className:n,style:r,state:i=On,props:a=Dn,refs:o=Dn,metadata:s,stateAttributesMapping:c,tag:l=`div`,...u}=e,{compositeProps:d,compositeRef:f}=yK({metadata:s});return Mn(l,e,{state:i,ref:[...o,f],props:[d,...a,u],stateAttributesMapping:c})}function xK(e){if(yt(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`)??void 0;if(!jt(e))return xK(Pt(e))}function SK(e,t){let n=L.useRef(null);return{preFocusGuardRef:n,handlePreFocusGuardFocus:Ht(t=>{Ie.flushSync(()=>{e.setOpen(!1,ua(ra,t.nativeEvent,t.currentTarget))}),Qo(n.current)?.focus()}),handleFocusTargetFocus:Ht(n=>{let r=e.select(`positionerElement`);if(r&&$o(n,r))e.context.beforeContentFocusGuardRef.current?.focus();else{Ie.flushSync(()=>{e.setOpen(!1,ua(ra,n.nativeEvent,n.currentTarget))});let i=Zo(e.context.triggerFocusTargetRef.current||t.current);for(;i!==null&&Pa(r,i);){let e=i;if(i=Jo(i),i===e)break}i?.focus()}})}}function CK(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=L.useRef(!1);return L.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,Sa(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:On,[t,n,r])}var wK=2,TK=wl(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,id:o,openOnHover:s,delay:c=100,closeDelay:l=0,handle:u,payload:d,style:f,...p}=e,m=zG(!0),h=u?.store??m?.store;if(!h)throw Error(un(85));let g=Wu(o),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=L.useRef(null),x=DK(),S=fn(!0),C=Rs(),w=L.useMemo(()=>C??new Ps,[C]),{registerTrigger:T,isMountedByThisTrigger:E}=Gl(g,b,h,{payload:d,closeDelay:l,parent:x,floatingTreeRoot:w,floatingNodeId:zs(w),floatingParentNodeId:Ls(),keyboardEventRelay:S?.relayKeyboardEvent}),D=x.type===`menubar`,O=h.useState(`disabled`),k=i||O||D&&x.context.disabled,{getButtonProps:ee,buttonRef:A}=mn({disabled:k,native:a});L.useEffect(()=>{!y&&x.type===void 0&&(h.context.allowMouseUpTriggerRef.current=!1)},[h,y,x.type]);let j=L.useRef(null),M=Ei(),N=Ht(e=>{if(!j.current)return;M.clear(),h.context.allowMouseUpTriggerRef.current=!1;let t=e.target;if(Pa(j.current,t)||Pa(h.select(`positionerElement`),t)||t===j.current||t!=null&&xK(t)===h.select(`rootId`))return;let n=vK(j.current);e.clientX>=n.left-wK&&e.clientX<=n.right+wK&&e.clientY>=n.top-wK&&e.clientY<=n.bottom+wK||w.events.emit(`close`,{domEvent:e,reason:oa})});L.useEffect(()=>{y&&h.select(`lastOpenChangeReason`)===`trigger-hover`&&Sa(j.current).addEventListener(`mouseup`,N,{once:!0})},[y,N,h]);let P=D&&x.context.hasSubmenuOpen,F=du(v,{enabled:(s??P)&&!k&&x.type!==`context-menu`&&(!D||P&&!E),handleClose:Mu({blockPointerEvents:!D}),mouseOnly:!0,move:!1,restMs:x.type===void 0?c:void 0,delay:{close:l},triggerElementRef:b,externalTree:w,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),te=EK(y,h.select(`lastOpenChangeReason`)),ne=Qs(v,{enabled:!k&&x.type!==`context-menu`,event:y&&D?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:x.type===void 0?te:!1}),re=ru(v,{enabled:!k&&P}),ie=CK({open:y,enabled:D,mouseDownAction:`open`}),ae=fu([ne,re]),oe={disabled:k,open:y},se=h.useState(`triggerProps`,E),I=[j,t,A,T,b],ce=[ae.getReferenceProps(),F??On,se,{"aria-haspopup":`menu`,id:g,onMouseDown:e=>{h.select(`open`)||(M.start(200,()=>{h.context.allowMouseUpTriggerRef.current=!0}),Sa(e.currentTarget).addEventListener(`mouseup`,N,{once:!0}))}},D?{role:`menuitem`}:{},ie,p,ee],{preFocusGuardRef:le,handlePreFocusGuardFocus:ue,handleFocusTargetFocus:de}=SK(h,b),fe=Mn(`button`,e,{enabled:!D,stateAttributesMapping:Hu,state:oe,ref:I,props:ce});return D?(0,z.jsx)(bK,{tag:`button`,render:n,className:r,style:f,state:oe,refs:I,props:ce,stateAttributesMapping:Hu}):y?(0,z.jsxs)(L.Fragment,{children:[(0,z.jsx)(Ea,{ref:le,onFocus:ue},`${g}-pre-focus-guard`),(0,z.jsx)(L.Fragment,{children:fe},g),(0,z.jsx)(Ea,{ref:h.context.triggerFocusTargetRef,onFocus:de},`${g}-post-focus-guard`)]}):(0,z.jsx)(L.Fragment,{children:fe},g)});function EK(e,t){let n=Ei(),[r,i]=L.useState(!1);return R(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function DK(){let e=VG(!0),t=zG(!0),n=dK(!0);return L.useMemo(()=>n?{type:`menubar`,context:n}:e&&!t?{type:`context-menu`,context:e}:{type:void 0},[e,t,n])}function OK({...e}){return(0,z.jsx)(_K,{"data-slot":`dropdown-menu`,...e})}function kK({...e}){return(0,z.jsx)(TK,{"data-slot":`dropdown-menu-trigger`,...e})}function AK({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,z.jsx)(nK,{children:(0,z.jsx)(lK,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,z.jsx)($G,{"data-slot":`dropdown-menu-content`,className:gi(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function jK({className:e,inset:t,variant:n=`default`,...r}){return(0,z.jsx)(YG,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:gi(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function MK(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function NK(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function PK(e){return e!=null&&e.length>0&&typeof e[0]==`object`&&e[0]!=null&&`items`in e[0]}function FK(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(PK(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function IK(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?NK(e.value):NK(e)}B(e=>e.id),B(e=>e.labelId),B(e=>e.modal),B(e=>e.multiple),B(e=>e.items),B(e=>e.itemToStringLabel),B(e=>e.itemToStringValue),B(e=>e.isItemEqualToValue),B(e=>e.value),B(e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:IK(t,r)!==``}),B((e,t)=>t?FK(e.items):!1),B(e=>e.open),B(e=>e.mounted),B(e=>e.forceMount),B(e=>e.transitionStatus),B(e=>e.openMethod),B(e=>e.activeIndex),B(e=>e.selectedIndex),B((e,t)=>e.activeIndex===t),B((e,t,n)=>{let r=e.isItemEqualToValue,i=e.value;return e.multiple?Array.isArray(i)&&i.some(e=>MK(n,e,r)):e.selectedIndex===t&&e.selectedIndex!==null?!0:MK(n,i,r)}),B((e,t)=>e.selectedIndex===t),B(e=>e.popupProps),B(e=>e.triggerProps),B(e=>e.triggerElement),B(e=>e.positionerElement),B(e=>e.listElement),B(e=>e.scrollUpArrowVisible),B(e=>e.scrollDownArrowVisible),B(e=>e.hasScrollArrows);function LK({className:e,...t}){return(0,z.jsx)(jd,{role:`status`,"aria-label":`Loading`,className:gi(`size-4 animate-spin`,e),...t})}var RK=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`,zK=(e=21)=>{let t=``,n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=RK[n[e]&63];return t},BK=async e=>{try{let t=await(await fetch(e)).blob();return new Promise(e=>{let n=new FileReader;n.onloadend=()=>e(n.result),n.onerror=()=>e(null),n.readAsDataURL(t)})}catch{return null}},VK=(0,L.createContext)(null),HK=(0,L.createContext)(null),UK=()=>(0,L.useContext)(VK),WK=()=>(0,L.useContext)(HK),GK=(0,L.createContext)(null),KK=()=>{let e=WK(),t=(0,L.useContext)(GK)??e;if(!t)throw Error(`usePromptInputAttachments must be used within a PromptInput or PromptInputProvider`);return t},qK=(0,L.createContext)(null),JK=({label:e=`Add photos or files`,...t})=>{let n=KK(),r=(0,L.useCallback)(()=>{n.openFileDialog()},[n]);return(0,z.jsxs)(jK,{...t,closeOnClick:!1,onClick:r,children:[(0,z.jsx)(kd,{className:`mr-2 size-4`}),` `,e]})},YK=({className:e,accept:t,multiple:n,globalDrop:r,syncHiddenInput:i,maxFiles:a,maxFileSize:o,onError:s,onSubmit:c,children:l,...u})=>{let d=UK(),f=!!d,p=(0,L.useRef)(null),m=(0,L.useRef)(null),[h,g]=(0,L.useState)([]),_=f?d.attachments.files:h,[v,y]=(0,L.useState)([]),b=(0,L.useRef)(_);(0,L.useEffect)(()=>{b.current=_},[_]);let x=(0,L.useCallback)(()=>{p.current?.click()},[]),S=(0,L.useCallback)(e=>!t||t.trim()===``?!0:t.split(`,`).map(e=>e.trim()).filter(Boolean).some(t=>{if(t.endsWith(`/*`)){let n=t.slice(0,-1);return e.type.startsWith(n)}return e.type===t}),[t]),C=(0,L.useCallback)(e=>{let t=[...e],n=t.filter(e=>S(e));if(t.length&&n.length===0){s?.({code:`accept`,message:`No files match the accepted types.`});return}let r=n.filter(e=>o?e.size<=o:!0);if(n.length>0&&r.length===0){s?.({code:`max_file_size`,message:`All files exceed the maximum size.`});return}g(e=>{let t=typeof a==`number`?Math.max(0,a-e.length):void 0,n=typeof t==`number`?r.slice(0,t):r;typeof t==`number`&&r.length>t&&s?.({code:`max_files`,message:`Too many files. Some were not added.`});let i=[];for(let e of n)i.push({filename:e.name,id:zK(),mediaType:e.type,type:`file`,url:URL.createObjectURL(e)});return[...e,...i]})},[S,a,o,s]),w=(0,L.useCallback)(e=>g(t=>{let n=t.find(t=>t.id===e);return n?.url&&URL.revokeObjectURL(n.url),t.filter(t=>t.id!==e)}),[]),T=(0,L.useCallback)(e=>{let t=[...e],n=t.filter(e=>S(e));if(t.length&&n.length===0){s?.({code:`accept`,message:`No files match the accepted types.`});return}let r=n.filter(e=>o?e.size<=o:!0);if(n.length>0&&r.length===0){s?.({code:`max_file_size`,message:`All files exceed the maximum size.`});return}let i=_.length,c=typeof a==`number`?Math.max(0,a-i):void 0,l=typeof c==`number`?r.slice(0,c):r;typeof c==`number`&&r.length>c&&s?.({code:`max_files`,message:`Too many files. Some were not added.`}),l.length>0&&d?.attachments.add(l)},[S,o,a,s,_.length,d]),E=(0,L.useCallback)(()=>f?d?.attachments.clear():g(e=>{for(let t of e)t.url&&URL.revokeObjectURL(t.url);return[]}),[f,d]),D=(0,L.useCallback)(()=>y([]),[]),O=f?T:C,k=f?d.attachments.remove:w,ee=f?d.attachments.openFileDialog:x,A=(0,L.useCallback)(()=>{E(),D()},[E,D]);(0,L.useEffect)(()=>{f&&d.__registerFileInput(p,()=>p.current?.click())},[f,d]),(0,L.useEffect)(()=>{i&&p.current&&_.length===0&&(p.current.value=``)},[_,i]),(0,L.useEffect)(()=>{let e=m.current;if(!e||r)return;let t=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault()},n=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault(),e.dataTransfer?.files&&e.dataTransfer.files.length>0&&O(e.dataTransfer.files)};return e.addEventListener(`dragover`,t),e.addEventListener(`drop`,n),()=>{e.removeEventListener(`dragover`,t),e.removeEventListener(`drop`,n)}},[O,r]),(0,L.useEffect)(()=>{if(!r)return;let e=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault()},t=e=>{e.dataTransfer?.types?.includes(`Files`)&&e.preventDefault(),e.dataTransfer?.files&&e.dataTransfer.files.length>0&&O(e.dataTransfer.files)};return document.addEventListener(`dragover`,e),document.addEventListener(`drop`,t),()=>{document.removeEventListener(`dragover`,e),document.removeEventListener(`drop`,t)}},[O,r]),(0,L.useEffect)(()=>()=>{if(!f)for(let e of b.current)e.url&&URL.revokeObjectURL(e.url)},[f]);let j=(0,L.useCallback)(e=>{e.currentTarget.files&&O(e.currentTarget.files),e.currentTarget.value=``},[O]),M=(0,L.useMemo)(()=>({add:O,clear:E,fileInputRef:p,files:_.map(e=>({...e,id:e.id})),openFileDialog:ee,remove:k}),[_,O,k,E,ee]),N=(0,L.useMemo)(()=>({add:e=>{let t=Array.isArray(e)?e:[e];y(e=>[...e,...t.map(e=>({...e,id:zK()}))])},clear:D,remove:e=>{y(t=>t.filter(t=>t.id!==e))},sources:v}),[v,D]),P=(0,L.useCallback)(async e=>{e.preventDefault();let t=e.currentTarget,n=f?d.textInput.value:new FormData(t).get(`message`)||``;f||t.reset();try{let t=c({files:await Promise.all(_.map(async({id:e,...t})=>{if(t.url?.startsWith(`blob:`)){let e=await BK(t.url);return{...t,url:e??t.url}}return t})),text:n},e);if(t instanceof Promise)try{await t,A(),f&&d.textInput.clear()}catch{}else A(),f&&d.textInput.clear()}catch{}},[f,d,_,c,A]),F=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`input`,{accept:t,"aria-label":`Upload files`,className:`hidden`,multiple:n,onChange:j,ref:p,title:`Upload files`,type:`file`}),(0,z.jsx)(`form`,{className:gi(`w-full`,e),onSubmit:P,ref:m,...u,children:(0,z.jsx)(AG,{className:`overflow-hidden`,children:l})})]}),te=(0,z.jsx)(qK.Provider,{value:N,children:F});return(0,z.jsx)(GK.Provider,{value:M,children:te})},XK=({className:e,...t})=>(0,z.jsx)(`div`,{className:gi(`contents`,e),...t}),ZK=({onChange:e,onKeyDown:t,className:n,placeholder:r=`What would you like to know?`,...i})=>{let a=UK(),o=KK(),[s,c]=(0,L.useState)(!1),l=(0,L.useCallback)(e=>{if(t?.(e),!e.defaultPrevented){if(e.key===`Enter`){if(s||e.nativeEvent.isComposing||e.shiftKey)return;e.preventDefault();let{form:t}=e.currentTarget;if(t?.querySelector(`button[type="submit"]`)?.disabled)return;t?.requestSubmit()}if(e.key===`Backspace`&&e.currentTarget.value===``&&o.files.length>0){e.preventDefault();let t=o.files.at(-1);t&&o.remove(t.id)}}},[t,s,o]),u=(0,L.useCallback)(e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e of t)if(e.kind===`file`){let t=e.getAsFile();t&&n.push(t)}n.length>0&&(e.preventDefault(),o.add(n))},[o]),d=(0,L.useCallback)(()=>c(!1),[]),f=(0,L.useCallback)(()=>c(!0),[]),p=a?{onChange:t=>{a.textInput.setInput(t.currentTarget.value),e?.(t)},value:a.textInput.value}:{onChange:e};return(0,z.jsx)(FG,{className:gi(`field-sizing-content max-h-48 min-h-16`,n),name:`message`,onCompositionEnd:d,onCompositionStart:f,onKeyDown:l,onPaste:u,placeholder:r,...i,...p})},QK=({className:e,...t})=>(0,z.jsx)(MG,{align:`block-end`,className:gi(`order-first flex-wrap gap-1`,e),...t}),$K=({className:e,...t})=>(0,z.jsx)(MG,{align:`block-end`,className:gi(`justify-between gap-1`,e),...t}),eq=({className:e,...t})=>(0,z.jsx)(`div`,{className:gi(`flex min-w-0 items-center gap-1`,e),...t}),tq=({variant:e=`ghost`,className:t,size:n,tooltip:r,...i})=>{let a=n??(L.Children.count(i.children)>1?`sm`:`icon-sm`),o=(0,z.jsx)(PG,{className:gi(t),size:a,type:`button`,variant:e,...i});if(!r)return o;let s=typeof r==`string`?r:r.content,c=typeof r==`string`?void 0:r.shortcut,l=typeof r==`string`?`top`:r.side??`top`;return(0,z.jsxs)(Kf,{children:[(0,z.jsx)(qf,{children:o}),(0,z.jsxs)(Jf,{side:l,children:[s,c&&(0,z.jsx)(`span`,{className:`ml-2 text-muted-foreground`,children:c})]})]})},nq=e=>(0,z.jsx)(OK,{...e}),rq=({className:e,children:t,...n})=>(0,z.jsx)(kK,{render:(0,z.jsx)(tq,{className:e,...n}),children:t??(0,z.jsx)(Ld,{className:`size-4`})}),iq=({className:e,...t})=>(0,z.jsx)(AK,{align:`start`,className:gi(e),...t}),aq=({className:e,variant:t=`default`,size:n=`icon-sm`,status:r,onStop:i,onClick:a,children:o,...s})=>{let c=r===`submitted`||r===`streaming`,l=(0,z.jsx)(wd,{className:`size-4`});r===`submitted`?l=(0,z.jsx)(LK,{}):r===`streaming`?l=(0,z.jsx)(Vd,{className:`size-4`}):r===`error`&&(l=(0,z.jsx)(qd,{className:`size-4`}));let u=(0,L.useCallback)(e=>{if(c&&i){e.preventDefault(),i();return}a?.(e)},[c,i,a]);return(0,z.jsx)(PG,{"aria-label":c?`Stop`:`Submit`,className:gi(e),onClick:u,size:n,type:c&&i?`button`:`submit`,variant:t,...s,children:o??l})};function oq(e){let{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,a=t!==void 0,[o,s]=wG({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:c,setMounted:l,transitionStatus:u}=Ll(o,!0,!0),[d,f]=L.useState(o),[{height:p,width:m},h]=L.useState({height:void 0,width:void 0}),g=Wu(),[_,v]=L.useState(),y=_??g,[b,x]=L.useState(!1),[S,C]=L.useState(!1),w=L.useRef(null),T=L.useRef(null),E=L.useRef(null),D=L.useRef(null),O=Hl(D,!1),k=Ht(e=>{let t=!o,n=ua(Zi,e.nativeEvent);if(r(t,n),n.isCanceled)return;let i=D.current;T.current===`css-animation`&&i!=null&&i.style.removeProperty(`animation-name`),!b&&!S&&(T.current!=null&&T.current!==`css-animation`&&!c&&t&&l(!0),T.current===`css-animation`&&(!d&&t&&f(!0),!c&&t&&l(!0))),s(t),T.current===`none`&&c&&!t&&l(!1)});return R(()=>{a&&T.current===`none`&&!o&&l(!1)},[a,o,t,l]),L.useMemo(()=>({abortControllerRef:w,animationTypeRef:T,disabled:i,handleTrigger:k,height:p,mounted:c,open:o,panelId:y,panelRef:D,runOnceAnimationsFinish:O,setDimensions:h,setHiddenUntilFound:x,setKeepMounted:C,setMounted:l,setOpen:s,setPanelIdState:v,setVisible:f,transitionDimensionRef:E,transitionStatus:u,visible:d,width:m}),[w,T,i,k,p,c,o,y,D,O,h,x,C,l,s,f,E,u,d,m])}var sq=L.createContext(void 0);function cq(){let e=L.useContext(sq);if(e===void 0)throw Error(un(15));return e}var lq=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=Rl.startingStyle]=`startingStyle`,e[e.endingStyle=Rl.endingStyle]=`endingStyle`,e}({}),uq=function(e){return e.panelOpen=`data-panel-open`,e}({}),dq={[lq.open]:``},fq={[lq.closed]:``},pq={open(e){return e?{[uq.panelOpen]:``}:null}},mq={open(e){return e?dq:fq},...Vl},hq=L.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=Ht(o),d=oq({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=L.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=L.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=Mn(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:mq});return(0,z.jsx)(sq.Provider,{value:p,children:m})}),gq={...pq,...Vl},_q=L.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=cq(),{className:s,disabled:c=o,id:l,render:u,nativeButton:d=!0,style:f,...p}=e,{getButtonProps:m,buttonRef:h}=mn({disabled:c,focusableWhenDisabled:!0,native:d}),g=L.useMemo(()=>({"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i}),[n,r,i]);return Mn(`button`,e,{state:a,ref:[t,h],props:[g,p,m],stateAttributesMapping:gq})}),vq=function(e){return e.disabled=`data-disabled`,e.orientation=`data-orientation`,e}({});function yq(e){let{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:i,hiddenUntilFound:a,keepMounted:o,id:s,mounted:c,onOpenChange:l,open:u,panelRef:d,runOnceAnimationsFinish:f,setDimensions:p,setMounted:m,setOpen:h,setVisible:g,transitionDimensionRef:_,visible:v,width:y}=e,b=L.useRef(!1),x=L.useRef(null),S=L.useRef(u),C=L.useRef(u),w=xa(),T=L.useMemo(()=>n.current===`css-animation`?!v:!u&&!c,[u,c,v,n]),E=_n(r,d,Ht(e=>{if(!e)return;if(n.current==null||_.current==null){let t=getComputedStyle(e),r=t.animationName!==`none`&&t.animationName!==``,i=t.transitionDuration!==`0s`&&t.transitionDuration!==``;r&&i||(t.animationName===`none`&&t.transitionDuration!==`0s`?n.current=`css-transition`:t.animationName!==`none`&&t.transitionDuration===`0s`?n.current=`css-animation`:n.current=`none`),e.getAttribute(vq.orientation)===`horizontal`||t.transitionProperty.indexOf(`width`)>-1?_.current=`width`:_.current=`height`}if(n.current!==`css-transition`)return;(i===void 0||y===void 0)&&(p({height:e.scrollHeight,width:e.scrollWidth}),C.current&&e.style.setProperty(`transition-duration`,`0s`));let t=-1,r=-1;return t=ba.request(()=>{C.current=!1,r=ba.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})}),()=>{ba.cancel(t),ba.cancel(r)}}));return R(()=>{if(n.current!==`css-transition`)return;let e=d.current;if(!e)return;let r=-1;if(t.current!=null&&(t.current.abort(),t.current=null),u){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)}),!C.current&&!o&&e.setAttribute(lq.startingStyle,``),p({height:e.scrollHeight,width:e.scrollWidth}),r=ba.request(()=>{Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})})}else{if(e.scrollHeight===0&&e.scrollWidth===0)return;p({height:e.scrollHeight,width:e.scrollWidth});let n=new AbortController;t.current=n;let r=n.signal,i=null,a=lq.endingStyle;return i=new MutationObserver(o=>{o.some(e=>e.type===`attributes`&&e.attributeName===a)&&(i?.disconnect(),i=null,f(()=>{p({height:0,width:0}),e.style.removeProperty(`content-visibility`),m(!1),t.current===n&&(t.current=null)},r))}),i.observe(e,{attributes:!0,attributeFilter:[a]}),()=>{i?.disconnect(),w.cancel(),t.current===n&&(n.abort(),t.current=null)}}return()=>{ba.cancel(r)}},[t,n,w,a,o,c,u,d,f,p,m]),R(()=>{if(n.current!==`css-animation`)return;let e=d.current;e&&(x.current=e.style.animationName||x.current,e.style.setProperty(`animation-name`,`none`),p({height:e.scrollHeight,width:e.scrollWidth}),!S.current&&!b.current&&e.style.removeProperty(`animation-name`),u?(t.current!=null&&(t.current.abort(),t.current=null),m(!0),g(!0)):(t.current=new AbortController,f(()=>{m(!1),g(!1),t.current=null},t.current.signal)))},[t,n,u,d,f,p,m,g,v]),Ci(()=>{let e=ba.request(()=>{S.current=!1});return()=>ba.cancel(e)}),R(()=>{if(!a)return;let e=d.current;if(!e)return;let t=-1,n=-1;return u&&b.current&&(e.style.transitionDuration=`0s`,p({height:e.scrollHeight,width:e.scrollWidth}),t=ba.request(()=>{b.current=!1,n=ba.request(()=>{setTimeout(()=>{e.style.removeProperty(`transition-duration`)})})})),()=>{ba.cancel(t),ba.cancel(n)}},[a,u,d,p]),R(()=>{let e=d.current;e&&a&&T&&(e.setAttribute(`hidden`,`until-found`),n.current===`css-transition`&&e.setAttribute(lq.startingStyle,``))},[a,T,n,d]),L.useEffect(function(){let e=d.current;if(!e)return;function t(e){b.current=!0,h(!0),l(!0,ua(Xi,e))}return ma(e,`beforematch`,t)},[l,d,h]),L.useMemo(()=>({props:{hidden:T,id:s,ref:E}}),[T,s,E])}var bq=function(e){return e.collapsiblePanelHeight=`--collapsible-panel-height`,e.collapsiblePanelWidth=`--collapsible-panel-width`,e}({}),xq=L.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{abortControllerRef:l,animationTypeRef:u,height:d,mounted:f,onOpenChange:p,open:m,panelId:h,panelRef:g,runOnceAnimationsFinish:_,setDimensions:v,setHiddenUntilFound:y,setKeepMounted:b,setMounted:x,setPanelIdState:S,setOpen:C,setVisible:w,state:T,transitionDimensionRef:E,visible:D,width:O,transitionStatus:k}=cq(),ee=r??!1,A=i??!1;R(()=>{if(o)return S(o),()=>{S(void 0)}},[o,S]),R(()=>{y(ee)},[y,ee]),R(()=>{b(A)},[b,A]);let{props:j}=yq({abortControllerRef:l,animationTypeRef:u,externalRef:t,height:d,hiddenUntilFound:ee,id:h,keepMounted:A,mounted:f,onOpenChange:p,open:m,panelRef:g,runOnceAnimationsFinish:_,setDimensions:v,setMounted:x,setOpen:C,setVisible:w,transitionDimensionRef:E,visible:D,width:O});Ul({open:m&&k===`idle`,ref:g,onComplete(){m&&v({height:void 0,width:void 0})}});let M=Mn(`div`,e,{state:L.useMemo(()=>({...T,transitionStatus:k}),[T,k]),ref:[t,g],props:[j,{style:{[bq.collapsiblePanelHeight]:d===void 0?`auto`:`${d}px`,[bq.collapsiblePanelWidth]:O===void 0?`auto`:`${O}px`}},c],stateAttributesMapping:mq});return A||ee||f?M:null});function Sq({...e}){return(0,z.jsx)(hq,{"data-slot":`collapsible`,...e})}function Cq({...e}){return(0,z.jsx)(_q,{"data-slot":`collapsible-trigger`,...e})}function wq({...e}){return(0,z.jsx)(xq,{"data-slot":`collapsible-content`,...e})}var Tq=(0,L.createContext)({});function Eq(e){let t=(0,L.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Dq=typeof window<`u`?L.useLayoutEffect:L.useEffect,Oq=(0,L.createContext)(null);function kq(e,t){e.indexOf(t)===-1&&e.push(t)}function Aq(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var jq=(e,t,n)=>n>t?t:n<e?e:n,Mq={},Nq=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Pq(e){return typeof e==`object`&&!!e}var Fq=e=>/^0[^.\s]+$/u.test(e);function Iq(e){let t;return()=>(t===void 0&&(t=e()),t)}var Lq=e=>e,Rq=(e,t)=>n=>t(e(n)),zq=(...e)=>e.reduce(Rq),Bq=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Vq=class{constructor(){this.subscriptions=[]}add(e){return kq(this.subscriptions,e),()=>Aq(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Hq=e=>e*1e3,Uq=e=>e/1e3;function Wq(e,t){return t?1e3/t*e:0}var Gq=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Kq=1e-7,qq=12;function Jq(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Gq(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Kq&&++s<qq);return o}function Yq(e,t,n,r){if(e===t&&n===r)return Lq;let i=t=>Jq(t,0,1,e,n);return e=>e===0||e===1?e:Gq(i(e),t,r)}var Xq=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Zq=e=>t=>1-e(1-t),Qq=Yq(.33,1.53,.69,.99),$q=Zq(Qq),eJ=Xq($q),tJ=e=>e>=1?1:(e*=2)<1?.5*$q(e):.5*(2-2**(-10*(e-1))),nJ=e=>1-Math.sin(Math.acos(e)),rJ=Zq(nJ),iJ=Xq(nJ),aJ=Yq(.42,0,1,1),oJ=Yq(0,0,.58,1),sJ=Yq(.42,0,.58,1),cJ=e=>Array.isArray(e)&&typeof e[0]!=`number`,lJ=e=>Array.isArray(e)&&typeof e[0]==`number`,uJ={linear:Lq,easeIn:aJ,easeInOut:sJ,easeOut:oJ,circIn:nJ,circInOut:iJ,circOut:rJ,backIn:$q,backInOut:eJ,backOut:Qq,anticipate:tJ},dJ=e=>typeof e==`string`,fJ=e=>{if(lJ(e)){e.length;let[t,n,r,i]=e;return Yq(t,n,r,i)}else if(dJ(e))return uJ[e],`${e}`,uJ[e];return e},pJ=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],mJ={value:null,addProjectionMetrics:null};function hJ(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&mJ.value&&mJ.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var gJ=40;function _J(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=pJ.reduce((e,n)=>(e[n]=hJ(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=Mq.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,gJ),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:pJ.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<pJ.length;t++)o[pJ[t]].cancel(e)},state:i,steps:o}}var{schedule:vJ,cancel:yJ,state:bJ,steps:xJ}=_J(typeof requestAnimationFrame<`u`?requestAnimationFrame:Lq,!0),SJ;function CJ(){SJ=void 0}var wJ={now:()=>(SJ===void 0&&wJ.set(bJ.isProcessing||Mq.useManualTiming?bJ.timestamp:performance.now()),SJ),set:e=>{SJ=e,queueMicrotask(CJ)}},TJ={layout:0,mainThread:0,waapi:0},EJ=e=>t=>typeof t==`string`&&t.startsWith(e),DJ=EJ(`--`),OJ=EJ(`var(--`),kJ=e=>OJ(e)?AJ.test(e.split(`/*`)[0].trim()):!1,AJ=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function jJ(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var MJ={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},NJ={...MJ,transform:e=>jq(0,1,e)},PJ={...MJ,default:1},FJ=e=>Math.round(e*1e5)/1e5,IJ=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function LJ(e){return e==null}var RJ=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zJ=(e,t)=>n=>!!(typeof n==`string`&&RJ.test(n)&&n.startsWith(e)||t&&!LJ(n)&&Object.prototype.hasOwnProperty.call(n,t)),BJ=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(IJ);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},VJ=e=>jq(0,255,e),HJ={...MJ,transform:e=>Math.round(VJ(e))},UJ={test:zJ(`rgb`,`red`),parse:BJ(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+HJ.transform(e)+`, `+HJ.transform(t)+`, `+HJ.transform(n)+`, `+FJ(NJ.transform(r))+`)`};function WJ(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var GJ={test:zJ(`#`),parse:WJ,transform:UJ.transform},KJ=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),qJ=KJ(`deg`),JJ=KJ(`%`),YJ=KJ(`px`),XJ=KJ(`vh`),ZJ=KJ(`vw`),QJ={...JJ,parse:e=>JJ.parse(e)/100,transform:e=>JJ.transform(e*100)},$J={test:zJ(`hsl`,`hue`),parse:BJ(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+JJ.transform(FJ(t))+`, `+JJ.transform(FJ(n))+`, `+FJ(NJ.transform(r))+`)`},eY={test:e=>UJ.test(e)||GJ.test(e)||$J.test(e),parse:e=>UJ.test(e)?UJ.parse(e):$J.test(e)?$J.parse(e):GJ.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?UJ.transform(e):$J.transform(e),getAnimatableNone:e=>{let t=eY.parse(e);return t.alpha=0,eY.transform(t)}},tY=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function nY(e){return isNaN(e)&&typeof e==`string`&&(e.match(IJ)?.length||0)+(e.match(tY)?.length||0)>0}var rY=`number`,iY=`color`,aY=`var`,oY=`var(`,sY="${}",cY=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function lY(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(cY,e=>(eY.test(e)?(r.color.push(a),i.push(iY),n.push(eY.parse(e))):e.startsWith(oY)?(r.var.push(a),i.push(aY),n.push(e)):(r.number.push(a),i.push(rY),n.push(parseFloat(e))),++a,sY)).split(sY),indexes:r,types:i}}function uY(e){return lY(e).values}function dY({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===rY?i+=FJ(r[a]):e===iY?i+=eY.transform(r[a]):i+=r[a]}return i}}function fY(e){return dY(lY(e))}var pY=e=>typeof e==`number`?0:eY.test(e)?eY.getAnimatableNone(e):e,mY=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:pY(e);function hY(e){let t=lY(e);return dY(t)(t.values.map((e,n)=>mY(e,t.split[n])))}var gY={test:nY,parse:uY,createTransformer:fY,getAnimatableNone:hY};function _Y(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function vY({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=_Y(s,r,e+1/3),a=_Y(s,r,e),o=_Y(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function yY(e,t){return n=>n>0?t:e}var bY=(e,t,n)=>e+(t-e)*n,xY=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},SY=[GJ,UJ,$J],CY=e=>SY.find(t=>t.test(e));function wY(e){let t=CY(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===$J&&(n=vY(n)),n}var TY=(e,t)=>{let n=wY(e),r=wY(t);if(!n||!r)return yY(e,t);let i={...n};return e=>(i.red=xY(n.red,r.red,e),i.green=xY(n.green,r.green,e),i.blue=xY(n.blue,r.blue,e),i.alpha=bY(n.alpha,r.alpha,e),UJ.transform(i))},EY=new Set([`none`,`hidden`]);function DY(e,t){return EY.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function OY(e,t){return n=>bY(e,t,n)}function kY(e){return typeof e==`number`?OY:typeof e==`string`?kJ(e)?yY:eY.test(e)?TY:NY:Array.isArray(e)?AY:typeof e==`object`?eY.test(e)?TY:jY:yY}function AY(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>kY(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function jY(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=kY(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function MY(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var NY=(e,t)=>{let n=gY.createTransformer(t),r=lY(e),i=lY(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?EY.has(e)&&!i.values.length||EY.has(t)&&!r.values.length?DY(e,t):zq(AY(MY(r,i),i.values),n):(`${e}${t}`,yY(e,t))};function PY(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?bY(e,t,n):kY(e)(e,t)}var FY=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>vJ.update(t,e),stop:()=>yJ(t),now:()=>bJ.isProcessing?bJ.timestamp:wJ.now()}},IY=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},LY=2e4;function RY(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function zY(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(RY(r),LY);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:Uq(i)}}var BY={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function VY(e,t){return e*Math.sqrt(1-t*t)}var HY=12;function UY(e,t,n){let r=n;for(let n=1;n<HY;n++)r-=e(r)/t(r);return r}var WY=.001;function GY({duration:e=BY.duration,bounce:t=BY.bounce,velocity:n=BY.velocity,mass:r=BY.mass}){let i,a;BY.maxDuration;let o=1-t;o=jq(BY.minDamping,BY.maxDamping,o),e=jq(BY.minDuration,BY.maxDuration,Uq(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=VY(t,o),c=Math.exp(-i);return WY-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=VY(t**2,o);return(-i(t)+WY>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-WY+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=UY(i,a,s);if(e=Hq(e),isNaN(c))return{stiffness:BY.stiffness,damping:BY.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var KY=[`duration`,`bounce`],qY=[`stiffness`,`damping`,`mass`];function JY(e,t){return t.some(t=>e[t]!==void 0)}function YY(e){let t={velocity:BY.velocity,stiffness:BY.stiffness,damping:BY.damping,mass:BY.mass,isResolvedFromDuration:!1,...e};if(!JY(e,qY)&&JY(e,KY))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*jq(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:BY.mass,stiffness:i,damping:a}}else{let n=GY({...e,velocity:0});t={...t,...n,mass:BY.mass},t.isResolvedFromDuration=!0}return t}function XY(e=BY.visualDuration,t=BY.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=YY({...n,velocity:-Uq(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=Uq(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?BY.restSpeed.granular:BY.restSpeed.default,i||=v?BY.restDelta.granular:BY.restDelta.default;let y,b,x,S,C,w;if(h<1)x=VY(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let T={calculatedDuration:p&&d||null,velocity:e=>Hq(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=Hq(t*(C*n+w*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=Hq(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(RY(T),LY),t=IY(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}XY.applyToOptions=e=>{let t=zY(e,100,XY);return e.ease=t.ease,e.duration=Hq(t.duration),e.type=`keyframes`,e};var ZY=5;function QY(e,t,n){let r=Math.max(t-ZY,0);return Wq(n-e(r),t-r)}function $Y({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=XY({keyframes:[f.value,m(f.value)],velocity:QY(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function eX(e,t,n){let r=[],i=n||Mq.mix||PY,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=zq(Array.isArray(t)?t[n]||Lq:t,a)),r.push(a)}return r}function tX(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=eX(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Bq(e[r],e[r+1],n);return s[r](i)};return n?t=>l(jq(e[0],e[a-1],t)):l}function nX(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Bq(0,t,r);e.push(bY(n,1,i))}}function rX(e){let t=[0];return nX(t,e.length-1),t}function iX(e,t){return e.map(e=>e*t)}function aX(e,t){return e.map(()=>t||sJ).splice(0,e.length-1)}function oX({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=cJ(r)?r.map(fJ):fJ(r),a={done:!1,value:t[0]},o=tX(iX(n&&n.length===t.length?n:rX(t),e),t,{ease:Array.isArray(i)?i:aX(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var sX=e=>e!==null;function cX(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(sX),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var lX={decay:$Y,inertia:$Y,tween:oX,keyframes:oX,spring:XY};function uX(e){typeof e.type==`string`&&(e.type=lX[e.type])}var dX=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},fX=e=>e/100,pX=class extends dX{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==wJ.now()&&this.tick(wJ.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},TJ.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;uX(e);let{type:t=oX,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||oX;s!==oX&&typeof o[0]!=`number`&&(this.mixKeyframes=zq(fX,PY(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=RY(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=jq(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==$Y&&(b.value=cX(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return Uq(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Uq(e)}get time(){return Uq(this.currentTime)}set time(e){e=Hq(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return QY(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(wJ.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Uq(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=FY,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(wJ.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,TJ.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function mX(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var hX=e=>e*180/Math.PI,gX=e=>vX(hX(Math.atan2(e[1],e[0]))),_X={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gX,rotateZ:gX,skewX:e=>hX(Math.atan(e[1])),skewY:e=>hX(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vX=e=>(e%=360,e<0&&(e+=360),e),yX=gX,bX=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xX=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),SX={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bX,scaleY:xX,scale:e=>(bX(e)+xX(e))/2,rotateX:e=>vX(hX(Math.atan2(e[6],e[5]))),rotateY:e=>vX(hX(Math.atan2(-e[2],e[0]))),rotateZ:yX,rotate:yX,skewX:e=>hX(Math.atan(e[4])),skewY:e=>hX(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function CX(e){return+!!e.includes(`scale`)}function wX(e,t){if(!e||e===`none`)return CX(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=SX,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_X,i=t}if(!i)return CX(t);let a=r[t],o=i[1].split(`,`).map(EX);return typeof a==`function`?a(o):o[a]}var TX=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return wX(n,t)};function EX(e){return parseFloat(e.trim())}var DX=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],OX=new Set(DX),kX=e=>e===MJ||e===YJ,AX=new Set([`x`,`y`,`z`]),jX=DX.filter(e=>!AX.has(e));function MX(e){let t=[];return jX.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var NX={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>wX(t,`x`),y:(e,{transform:t})=>wX(t,`y`)};NX.translateX=NX.x,NX.translateY=NX.y;var PX=new Set,FX=!1,IX=!1,LX=!1;function RX(){if(IX){let e=Array.from(PX).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=MX(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}IX=!1,FX=!1,PX.forEach(e=>e.complete(LX)),PX.clear()}function zX(){PX.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(IX=!0)})}function BX(){LX=!0,zX(),RX(),LX=!1}var VX=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(PX.add(this),FX||(FX=!0,vJ.read(zX),vJ.resolveKeyframes(RX))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}mX(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),PX.delete(this)}cancel(){this.state===`scheduled`&&(PX.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},HX=e=>e.startsWith(`--`);function UX(e,t,n){HX(t)?e.style.setProperty(t,n):e.style[t]=n}var WX={};function GX(e,t){let n=Iq(e);return()=>WX[t]??n()}var KX=GX(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),qX=GX(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),JX=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,YX={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:JX([0,.65,.55,1]),circOut:JX([.55,0,1,.45]),backIn:JX([.31,.01,.66,-.59]),backOut:JX([.33,1.53,.69,.99])};function XX(e,t){if(e)return typeof e==`function`?qX()?IY(e,t):`ease-out`:lJ(e)?JX(e):Array.isArray(e)?e.map(e=>XX(e,t)||YX.easeOut):YX[e]}function ZX(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=XX(s,i);Array.isArray(d)&&(u.easing=d),mJ.value&&TJ.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return mJ.value&&p.finished.finally(()=>{TJ.waapi--}),p}function QX(e){return typeof e==`function`&&`applyToOptions`in e}function $X({type:e,...t}){return QX(e)&&qX()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var eZ=class extends dX{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=$X(e);this.animation=ZX(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=cX(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),UX(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return Uq(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+Uq(e)}get time(){return Uq(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Hq(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&KX()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Lq):r(this)}},tZ={anticipate:tJ,backInOut:eJ,circInOut:iJ};function nZ(e){return e in tZ}function rZ(e){typeof e.ease==`string`&&nZ(e.ease)&&(e.ease=tZ[e.ease])}var iZ=10,aZ=class extends eZ{constructor(e){rZ(e),uX(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new pX({...a,autoplay:!1}),s=Math.max(iZ,wJ.now()-this.startTime),c=jq(0,iZ,s-iZ),l=o.sample(s).value,{name:u}=this.options;i&&u&&UX(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},oZ=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(gY.test(e)||e===`0`)&&!e.startsWith(`url(`));function sZ(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function cZ(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=oZ(i,t),s=oZ(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:sZ(e)||(n===`spring`||QX(n))&&r}function lZ(e){e.duration=0,e.type=`keyframes`}var uZ=new Set([`opacity`,`clipPath`,`filter`,`transform`]),dZ=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function fZ(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&dZ.test(e[t]))return!0;return!1}var pZ=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),mZ=Iq(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function hZ(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return mZ()&&n&&(uZ.has(n)||pZ.has(n)&&fZ(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var gZ=40,_Z=class extends dX{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=wJ.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||VX;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=wJ.now();let u=!0;cZ(e,i,a,o)||(u=!1,(Mq.instantAnimations||!s)&&l?.(cX(e,n,t)),e[0]=e[e.length-1],lZ(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>gZ?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&hZ(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new aZ({...d,element:p})}catch{m=new pX(d)}else m=new pX(d);m.finished.then(()=>{this.notifyFinished()}).catch(Lq),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),BX()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function vZ(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var yZ=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bZ(e){let t=yZ.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function xZ(e,t,n=1){`${e}`;let[r,i]=bZ(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Nq(e)?parseFloat(e):e}return kJ(i)?xZ(i,t,n+1):i}var SZ={type:`spring`,stiffness:500,damping:25,restSpeed:10},CZ=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wZ={type:`keyframes`,duration:.8},TZ={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},EZ=(e,{keyframes:t})=>t.length>2?wZ:OX.has(e)?e.startsWith(`scale`)?CZ(t[1]):SZ:TZ;function DZ(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function OZ(e,t){let n=e?.[t]??e?.default??e;return n===e?n:DZ(n,e)}var kZ=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function AZ(e){for(let t in e)if(!kZ.has(t))return!0;return!1}var jZ=(e,t,n,r={},i,a)=>o=>{let s=OZ(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Hq(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};AZ(s)||Object.assign(u,EZ(e,u)),u.duration&&=Hq(u.duration),u.repeatDelay&&=Hq(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(lZ(u),u.delay===0&&(d=!0)),(Mq.instantAnimations||Mq.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,lZ(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=cX(u.keyframes,s);if(e!==void 0){vJ.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new pX(u):new _Z(u)};function MZ(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function NZ(e,t,n,r){if(typeof t==`function`){let[i,a]=MZ(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=MZ(r);t=t(n===void 0?e.custom:n,i,a)}return t}function PZ(e,t,n){let r=e.getProps();return NZ(r,t,n===void 0?r.custom:n,e)}var FZ=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...DX]),IZ=30,LZ=e=>!isNaN(parseFloat(e)),RZ={current:void 0},zZ=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=wJ.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=wJ.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=LZ(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new Vq);let n=this.events[e].add(t);return e===`change`?()=>{n(),vJ.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return RZ.current&&RZ.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=wJ.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>IZ)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,IZ);return Wq(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function BZ(e,t){return new zZ(e,t)}var VZ=e=>Array.isArray(e);function HZ(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,BZ(n))}function UZ(e){return VZ(e)?e[e.length-1]||0:e}function WZ(e,t){let{transitionEnd:n={},transition:r={},...i}=PZ(e,t)||{};i={...i,...n};for(let t in i)HZ(e,t,UZ(i[t]))}var GZ=e=>!!(e&&e.getVelocity);function KZ(e){return!!(GZ(e)&&e.add)}function qZ(e,t){let n=e.getValue(`willChange`);if(KZ(n))return n.add(t);if(!n&&Mq.WillChange){let n=new Mq.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function JZ(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var YZ=`data-`+JZ(`framerAppearId`);function XZ(e){return e.props[YZ]}function ZZ({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function QZ(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?DZ(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&ZZ(d,t))continue;let o={delay:n,...OZ(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){vJ.update(()=>r.set(i));continue}let f=!1;if(window.MotionHandoffAnimation){let n=XZ(e);if(n){let e=window.MotionHandoffAnimation(n,t,vJ);e!==null&&(o.startTime=e,f=!0)}}qZ(e,t);let p=l??e.shouldReduceMotion;r.start(jZ(t,r,i,p&&FZ.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>vJ.update(()=>{o&&WZ(e,o)});u.length?Promise.all(u).then(t):t()}return u}function $Z(e,t,n={}){let r=PZ(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(QZ(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return eQ(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function eQ(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push($Z(c,t,{...o,delay:n+(typeof r==`function`?0:r)+vZ(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function tQ(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>$Z(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=$Z(e,t,n);else{let i=typeof t==`function`?PZ(e,t,n.custom):t;r=Promise.all(QZ(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var nQ={test:e=>e===`auto`,parse:e=>e},rQ=e=>t=>t.test(e),iQ=[MJ,YJ,JJ,qJ,ZJ,XJ,nQ],aQ=e=>iQ.find(rQ(e));function oQ(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||Fq(e)}var sQ=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function cQ(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(IJ)||[];if(!r)return e;let i=n.replace(r,``),a=+!!sQ.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var lQ=/\b([a-z-]*)\(.*?\)/gu,uQ={...gY,getAnimatableNone:e=>{let t=e.match(lQ);return t?t.map(cQ).join(` `):e}},dQ={...gY,getAnimatableNone:e=>{let t=gY.parse(e);return gY.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},fQ={...MJ,transform:Math.round},pQ={borderWidth:YJ,borderTopWidth:YJ,borderRightWidth:YJ,borderBottomWidth:YJ,borderLeftWidth:YJ,borderRadius:YJ,borderTopLeftRadius:YJ,borderTopRightRadius:YJ,borderBottomRightRadius:YJ,borderBottomLeftRadius:YJ,width:YJ,maxWidth:YJ,height:YJ,maxHeight:YJ,top:YJ,right:YJ,bottom:YJ,left:YJ,inset:YJ,insetBlock:YJ,insetBlockStart:YJ,insetBlockEnd:YJ,insetInline:YJ,insetInlineStart:YJ,insetInlineEnd:YJ,padding:YJ,paddingTop:YJ,paddingRight:YJ,paddingBottom:YJ,paddingLeft:YJ,paddingBlock:YJ,paddingBlockStart:YJ,paddingBlockEnd:YJ,paddingInline:YJ,paddingInlineStart:YJ,paddingInlineEnd:YJ,margin:YJ,marginTop:YJ,marginRight:YJ,marginBottom:YJ,marginLeft:YJ,marginBlock:YJ,marginBlockStart:YJ,marginBlockEnd:YJ,marginInline:YJ,marginInlineStart:YJ,marginInlineEnd:YJ,fontSize:YJ,backgroundPositionX:YJ,backgroundPositionY:YJ,rotate:qJ,rotateX:qJ,rotateY:qJ,rotateZ:qJ,scale:PJ,scaleX:PJ,scaleY:PJ,scaleZ:PJ,skew:qJ,skewX:qJ,skewY:qJ,distance:YJ,translateX:YJ,translateY:YJ,translateZ:YJ,x:YJ,y:YJ,z:YJ,perspective:YJ,transformPerspective:YJ,opacity:NJ,originX:QJ,originY:QJ,originZ:YJ,zIndex:fQ,fillOpacity:NJ,strokeOpacity:NJ,numOctaves:fQ},mQ={...pQ,color:eY,backgroundColor:eY,outlineColor:eY,fill:eY,stroke:eY,borderColor:eY,borderTopColor:eY,borderRightColor:eY,borderBottomColor:eY,borderLeftColor:eY,filter:uQ,WebkitFilter:uQ,mask:dQ,WebkitMask:dQ},hQ=e=>mQ[e],gQ=new Set([uQ,dQ]);function _Q(e,t){let n=hQ(e);return gQ.has(n)||(n=gY),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var vQ=new Set([`auto`,`none`,`0`]);function yQ(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!vQ.has(t)&&lY(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=_Q(n,i)}var bQ=class extends VX{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),kJ(r))){let i=xZ(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!FZ.has(n)||e.length!==2)return;let[r,i]=e,a=aQ(r),o=aQ(i);if(jJ(r)!==jJ(i)&&NX[n]){this.needsMeasurement=!0;return}if(a!==o)if(kX(a)&&kX(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else NX[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||oQ(e[t]))&&n.push(t);n.length&&yQ(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=NX[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=NX[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function xQ(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var SQ=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function CQ(e){return Pq(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:wQ,cancel:fle}=_J(queueMicrotask,!1),TQ={x:!1,y:!1};function EQ(){return TQ.x||TQ.y}function DQ(e){return e===`x`||e===`y`?TQ[e]?null:(TQ[e]=!0,()=>{TQ[e]=!1}):TQ.x||TQ.y?null:(TQ.x=TQ.y=!0,()=>{TQ.x=TQ.y=!1})}function OQ(e,t){let n=xQ(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function kQ(e){return!(e.pointerType===`touch`||EQ())}function AQ(e,t,n={}){let[r,i,a]=OQ(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!kQ(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var jQ=(e,t)=>t?e===t?!0:jQ(e,t.parentElement):!1,MQ=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,NQ=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function PQ(e){return NQ.has(e.tagName)||e.isContentEditable===!0}var FQ=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function IQ(e){return FQ.has(e.tagName)||e.isContentEditable===!0}var LQ=new WeakSet;function RQ(e){return t=>{t.key===`Enter`&&e(t)}}function zQ(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var BQ=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=RQ(()=>{if(LQ.has(n))return;zQ(n,`down`);let e=RQ(()=>{zQ(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>zQ(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function VQ(e){return MQ(e)&&!EQ()}var HQ=new WeakSet;function UQ(e,t,n={}){let[r,i,a]=OQ(e,n),o=e=>{let r=e.currentTarget;if(!VQ(e)||HQ.has(e))return;LQ.add(r),n.stopPropagation&&HQ.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),LQ.has(r)&&LQ.delete(r),VQ(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||jQ(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),CQ(e)&&(e.addEventListener(`focus`,e=>BQ(e,i)),!PQ(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function WQ(e){return Pq(e)&&`ownerSVGElement`in e}var GQ=new WeakMap,KQ,qQ=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:WQ(r)&&`getBBox`in r?r.getBBox()[t]:r[n],JQ=qQ(`inline`,`width`,`offsetWidth`),YQ=qQ(`block`,`height`,`offsetHeight`);function XQ({target:e,borderBoxSize:t}){GQ.get(e)?.forEach(n=>{n(e,{get width(){return JQ(e,t)},get height(){return YQ(e,t)}})})}function ZQ(e){e.forEach(XQ)}function QQ(){typeof ResizeObserver>`u`||(KQ=new ResizeObserver(ZQ))}function $Q(e,t){KQ||QQ();let n=xQ(e);return n.forEach(e=>{let n=GQ.get(e);n||(n=new Set,GQ.set(e,n)),n.add(t),KQ?.observe(e)}),()=>{n.forEach(e=>{let n=GQ.get(e);n?.delete(t),n?.size||KQ?.unobserve(e)})}}var e$=new Set,t$;function n$(){t$=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};e$.forEach(t=>t(e))},window.addEventListener(`resize`,t$)}function r$(e){return e$.add(e),t$||n$(),()=>{e$.delete(e),!e$.size&&typeof t$==`function`&&(window.removeEventListener(`resize`,t$),t$=void 0)}}function i$(e,t){return typeof e==`function`?r$(e):$Q(e,t)}function a$(e){return WQ(e)&&e.tagName===`svg`}var o$=[...iQ,eY,gY],s$=e=>o$.find(rQ(e)),c$=()=>({translate:0,scale:1,origin:0,originPoint:0}),l$=()=>({x:c$(),y:c$()}),u$=()=>({min:0,max:0}),d$=()=>({x:u$(),y:u$()}),f$=new WeakMap;function p$(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function m$(e){return typeof e==`string`||Array.isArray(e)}var h$=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],g$=[`initial`,...h$];function _$(e){return p$(e.animate)||g$.some(t=>m$(e[t]))}function v$(e){return!!(_$(e)||e.variants)}function y$(e,t,n){for(let r in t){let i=t[r],a=n[r];if(GZ(i))e.addValue(r,i);else if(GZ(a))e.addValue(r,BZ(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,BZ(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var b$={current:null},x$={current:!1},S$=typeof window<`u`;function C$(){if(x$.current=!0,S$)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>b$.current=e.matches;e.addEventListener(`change`,t),t()}else b$.current=!1}var w$=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],T$={};function E$(e){T$=e}function D$(){return T$}var O$=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=VX,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=wJ.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,vJ.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=_$(t),this.isVariantNode=v$(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&GZ(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,f$.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(x$.current||C$(),this.shouldReduceMotion=b$.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),yJ(this.notifyUpdate),yJ(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&uZ.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new eZ({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Hq(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=OX.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&vJ.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in T$){let t=T$[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):d$()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<w$.length;t++){let n=w$[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=y$(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=BZ(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Nq(n)||Fq(n))?n=parseFloat(n):!s$(n)&&gY.test(t)&&(n=_Q(e,t)),this.setBaseTarget(e,GZ(n)?n.get():n)),GZ(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=NZ(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!GZ(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new Vq),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){wQ.render(this.render)}},k$=class extends O${constructor(){super(...arguments),this.KeyframeResolver=bQ}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;GZ(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},A$=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function j$({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function M$({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function N$(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function P$(e){return e===void 0||e===1}function F$({scale:e,scaleX:t,scaleY:n}){return!P$(e)||!P$(t)||!P$(n)}function I$(e){return F$(e)||L$(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function L$(e){return R$(e.x)||R$(e.y)}function R$(e){return e&&e!==`0%`}function z$(e,t,n){return n+t*(e-n)}function B$(e,t,n,r,i){return i!==void 0&&(e=z$(e,i,r)),z$(e,n,r)+t}function V$(e,t=0,n=1,r,i){e.min=B$(e.min,t,n,r,i),e.max=B$(e.max,t,n,r,i)}function H$(e,{x:t,y:n}){V$(e.x,t.translate,t.scale,t.originPoint),V$(e.y,n.translate,n.scale,n.originPoint)}var U$=.999999999999,W$=1.0000000000001;function G$(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(K$(e.x,-a.scroll.offset.x),K$(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,H$(e,o)),r&&I$(a.latestValues)&&Y$(e,a.latestValues,a.layout?.layoutBox))}t.x<W$&&t.x>U$&&(t.x=1),t.y<W$&&t.y>U$&&(t.y=1)}function K$(e,t){e.min+=t,e.max+=t}function q$(e,t,n,r,i=.5){V$(e,t,n,bY(e.min,e.max,i),r)}function J$(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Y$(e,t,n){let r=n??e;q$(e.x,J$(t.x,r.x),t.scaleX,t.scale,t.originX),q$(e.y,J$(t.y,r.y),t.scaleY,t.scale,t.originY)}function X$(e,t){return j$(N$(e.getBoundingClientRect(),t))}function Z$(e,t,n){let r=X$(e,n),{scroll:i}=t;return i&&(K$(r.x,i.offset.x),K$(r.y,i.offset.y)),r}var Q$={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},$$=DX.length;function e1(e,t,n){let r=``,i=!0;for(let a=0;a<$$;a++){let o=DX[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=SQ(s,pQ[o]);if(!c){i=!1;let t=Q$[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function t1(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(OX.has(e)){o=!0;continue}else if(DJ(e)){i[e]=n;continue}else{let t=SQ(n,pQ[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=e1(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function n1(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function r1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var i1={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(YJ.test(e))e=parseFloat(e);else return e;return`${r1(e,t.target.x)}% ${r1(e,t.target.y)}%`}},a1={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=gY.parse(e);if(i.length>5)return r;let a=gY.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=bY(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},o1={borderRadius:{...i1,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:i1,borderTopRightRadius:i1,borderBottomLeftRadius:i1,borderBottomRightRadius:i1,boxShadow:a1};function s1(e,{layout:t,layoutId:n}){return OX.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!o1[e]||e===`opacity`)}function c1(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(GZ(r[t])||i&&GZ(i[t])||s1(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function l1(e){return window.getComputedStyle(e)}var u1=class extends k${constructor(){super(...arguments),this.type=`html`,this.renderInstance=n1}readValueFromInstance(e,t){if(OX.has(t))return this.projection?.isProjecting?CX(t):TX(e,t);{let n=l1(e),r=(DJ(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return X$(e,t)}build(e,t,n){t1(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return c1(e,t,n)}},d1={offset:`stroke-dashoffset`,array:`stroke-dasharray`},f1={offset:`strokeDashoffset`,array:`strokeDasharray`};function p1(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?d1:f1;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var m1=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function h1(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(t1(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of m1)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&p1(d,i,a,o,!1)}var g1=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),_1=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function v1(e,t,n,r){n1(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(g1.has(n)?n:JZ(n),t.attrs[n])}function y1(e,t,n){let r=c1(e,t,n);for(let n in e)if(GZ(e[n])||GZ(t[n])){let t=DX.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var b1=class extends k${constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=d$}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(OX.has(t)){let e=hQ(t);return e&&e.default||0}return t=g1.has(t)?t:JZ(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return y1(e,t,n)}build(e,t,n){h1(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){v1(e,t,n,r)}mount(e){this.isSVGTag=_1(e.tagName),super.mount(e)}},x1=g$.length;function S1(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&S1(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<x1;n++){let r=g$[n],i=e.props[r];(m$(i)||i===!1)&&(t[r]=i)}return t}function C1(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var w1=[...h$].reverse(),T1=h$.length;function E1(e){return t=>Promise.all(t.map(({animation:t,options:n})=>tQ(e,t,n)))}function D1(e){let t=E1(e),n=A1(),r=!0,i=!1,a=t=>(n,r)=>{let i=PZ(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=S1(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<T1;t++){let p=w1[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=m$(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||p$(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=O1(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:w={}}=m,T={...w,...C},E=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=VZ(t)&&VZ(n)?!C1(t,n):t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=PZ(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=vZ(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=PZ(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=A1(),i=!0}}}function O1(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!C1(t,e):!1}function k1(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function A1(){return{animate:k1(!0),whileInView:k1(),whileHover:k1(),whileTap:k1(),whileDrag:k1(),whileFocus:k1(),exit:k1()}}function j1(e,t){e.min=t.min,e.max=t.max}function M1(e,t){j1(e.x,t.x),j1(e.y,t.y)}function N1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var P1=1e-4,F1=1-P1,I1=1+P1,L1=.01,R1=0-L1,z1=0+L1;function B1(e){return e.max-e.min}function V1(e,t,n){return Math.abs(e-t)<=n}function H1(e,t,n,r=.5){e.origin=r,e.originPoint=bY(t.min,t.max,e.origin),e.scale=B1(n)/B1(t),e.translate=bY(n.min,n.max,e.origin)-e.originPoint,(e.scale>=F1&&e.scale<=I1||isNaN(e.scale))&&(e.scale=1),(e.translate>=R1&&e.translate<=z1||isNaN(e.translate))&&(e.translate=0)}function U1(e,t,n,r){H1(e.x,t.x,n.x,r?r.originX:void 0),H1(e.y,t.y,n.y,r?r.originY:void 0)}function W1(e,t,n,r=0){e.min=(r?bY(n.min,n.max,r):n.min)+t.min,e.max=e.min+B1(t)}function G1(e,t,n,r){W1(e.x,t.x,n.x,r?.x),W1(e.y,t.y,n.y,r?.y)}function K1(e,t,n,r=0){let i=r?bY(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+B1(t)}function q1(e,t,n,r){K1(e.x,t.x,n.x,r?.x),K1(e.y,t.y,n.y,r?.y)}function J1(e,t,n,r,i){return e-=t,e=z$(e,1/n,r),i!==void 0&&(e=z$(e,1/i,r)),e}function Y1(e,t=0,n=1,r=.5,i,a=e,o=e){if(JJ.test(t)&&(t=parseFloat(t),t=bY(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=bY(a.min,a.max,r);e===a&&(s-=t),e.min=J1(e.min,t,n,s,i),e.max=J1(e.max,t,n,s,i)}function X1(e,t,[n,r,i],a,o){Y1(e,t[n],t[r],t[i],t.scale,a,o)}var Z1=[`x`,`scaleX`,`originX`],Q1=[`y`,`scaleY`,`originY`];function $1(e,t,n,r){X1(e.x,t,Z1,n?n.x:void 0,r?r.x:void 0),X1(e.y,t,Q1,n?n.y:void 0,r?r.y:void 0)}function e0(e){return e.translate===0&&e.scale===1}function t0(e){return e0(e.x)&&e0(e.y)}function n0(e,t){return e.min===t.min&&e.max===t.max}function ple(e,t){return n0(e.x,t.x)&&n0(e.y,t.y)}function r0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function i0(e,t){return r0(e.x,t.x)&&r0(e.y,t.y)}function a0(e){return B1(e.x)/B1(e.y)}function o0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function s0(e){return[e(`x`),e(`y`)]}function mle(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var c0=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],hle=c0.length,l0=e=>typeof e==`string`?parseFloat(e):e,u0=e=>typeof e==`number`||YJ.test(e);function gle(e,t,n,r,i,a){i?(e.opacity=bY(0,n.opacity??1,_le(r)),e.opacityExit=bY(t.opacity??1,0,vle(r))):a&&(e.opacity=bY(t.opacity??1,n.opacity??1,r));for(let i=0;i<hle;i++){let a=c0[i],o=d0(t,a),s=d0(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||u0(o)===u0(s)?(e[a]=Math.max(bY(l0(o),l0(s),r),0),(JJ.test(s)||JJ.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=bY(t.rotate||0,n.rotate||0,r))}function d0(e,t){return e[t]===void 0?e.borderRadius:e[t]}var _le=f0(0,.5,rJ),vle=f0(.5,.95,Lq);function f0(e,t,n){return r=>r<e?0:r>t?1:n(Bq(e,t,r))}function yle(e,t,n){let r=GZ(e)?e:BZ(e);return r.start(jZ(``,r,t,n)),r.animation}function p0(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var ble=(e,t)=>e.depth-t.depth,xle=class{constructor(){this.children=[],this.isDirty=!1}add(e){kq(this.children,e),this.isDirty=!0}remove(e){Aq(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ble),this.isDirty=!1,this.children.forEach(e)}};function Sle(e,t){let n=wJ.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(yJ(r),e(a-t))};return vJ.setup(r,!0),()=>yJ(r)}function m0(e){return GZ(e)?e.get():e}var Cle=class{constructor(){this.members=[]}add(e){kq(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(Aq(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Aq(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},h0={hasAnimatedSinceResize:!0,hasEverUpdated:!1},g0={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},_0=[``,`X`,`Y`,`Z`],wle=1e3,Tle=0;function v0(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function y0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=XZ(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,vJ,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&y0(r)}function b0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Tle++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,mJ.value&&(g0.nodes=g0.calculatedTargetDeltas=g0.calculatedProjections=0),this.nodes.forEach(Ole),this.nodes.forEach(Ple),this.nodes.forEach(Fle),this.nodes.forEach(kle),mJ.addProjectionMetrics&&mJ.addProjectionMetrics(g0)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new xle)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Vq),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=WQ(t)&&!a$(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;vJ.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Sle(i,250),h0.hasAnimatedSinceResize&&(h0.hasAnimatedSinceResize=!1,this.nodes.forEach(C0)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Ble,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!i0(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...OZ(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||C0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),yJ(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ile),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&y0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(jle),this.nodes.forEach(x0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(S0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Mle),this.nodes.forEach(Nle),this.nodes.forEach(Ele),this.nodes.forEach(Dle)):this.nodes.forEach(S0),this.clearAllSnapshots();let e=wJ.now();bJ.delta=jq(0,1e3/60,e-bJ.timestamp),bJ.timestamp=e,bJ.isProcessing=!0,xJ.update.process(bJ),xJ.preRender.process(bJ),xJ.render.process(bJ),bJ.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wQ.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ale),this.sharedNodes.forEach(Lle)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,vJ.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){vJ.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!B1(this.snapshot.measuredBox.x)&&!B1(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=d$(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!t0(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||I$(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Vle(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return d$();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Hle))){let{scroll:e}=this.root;e&&(K$(t.x,e.offset.x),K$(t.y,e.offset.y))}return t}removeElementScroll(e){let t=d$();if(M1(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&M1(t,e),K$(t.x,i.offset.x),K$(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||d$();M1(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(K$(r.x,-n.scroll.offset.x),K$(r.y,-n.scroll.offset.y)),I$(n.latestValues)&&Y$(r,n.latestValues,n.layout?.layoutBox)}return I$(this.latestValues)&&Y$(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=d$();M1(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!I$(n.latestValues))continue;let r;n.instance&&(F$(n.latestValues)&&n.updateSnapshot(),r=d$(),M1(r,n.measurePageBox())),$1(t,n.latestValues,n.snapshot?.layoutBox,r)}return I$(this.latestValues)&&$1(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==bJ.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=bJ.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=d$(),this.targetWithTransforms=d$()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),G1(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):M1(this.target,this.layout.layoutBox),H$(this.target,this.targetDelta)):M1(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),mJ.value&&g0.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||F$(this.parent.latestValues)||L$(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=d$(),this.relativeTargetOrigin=d$(),q1(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),M1(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===bJ.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;M1(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;G$(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=d$());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(N1(this.prevProjectionDelta.x,this.projectionDelta.x),N1(this.prevProjectionDelta.y,this.projectionDelta.y)),U1(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!o0(this.projectionDelta.x,this.prevProjectionDelta.x)||!o0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),mJ.value&&g0.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=l$(),this.projectionDelta=l$(),this.projectionDeltaWithTransform=l$()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=l$();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=d$(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(zle));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;w0(a.x,e.x,n),w0(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(q1(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Rle(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&ple(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=d$(),M1(d,this.relativeTarget)),s&&(this.animationValues=i,gle(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(yJ(this.pendingAnimation),void 0),this.pendingAnimation=vJ.update(()=>{h0.hasAnimatedSinceResize=!0,TJ.layout++,this.motionValue||=BZ(0),this.motionValue.jump(0,!1),this.currentAnimation=yle(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{TJ.layout--},onComplete:()=>{TJ.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(wle),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&k0(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||d$();let t=B1(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=B1(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}M1(t,n),Y$(t,i),U1(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Cle),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&v0(`z`,e,r,this.animationValues);for(let t=0;t<_0.length;t++)v0(`rotate${_0[t]}`,e,r,this.animationValues),v0(`skew${_0[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=m0(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=m0(t?.pointerEvents)||``),this.hasProjected&&!I$(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=mle(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in o1){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=o1[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?m0(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(x0),this.root.sharedNodes.clear()}}}function Ele(e){e.updateLayout()}function Dle(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)s0(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=B1(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;j1(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else k0(i,t.layoutBox,n)&&s0(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=B1(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=l$();U1(o,n,t.layoutBox);let s=l$();a?U1(s,e.applyTransform(r,!0),t.measuredBox):U1(s,n,t.layoutBox);let c=!t0(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=d$();q1(s,t.layoutBox,i.layoutBox,o);let c=d$();q1(c,n,a.layoutBox,o),i0(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ole(e){mJ.value&&g0.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function kle(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ale(e){e.clearSnapshot()}function x0(e){e.clearMeasurements()}function jle(e){e.isLayoutDirty=!0,e.updateLayout()}function S0(e){e.isLayoutDirty=!1}function Mle(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Nle(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function C0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Ple(e){e.resolveTargetDelta()}function Fle(e){e.calcProjection()}function Ile(e){e.resetSkewAndRotation()}function Lle(e){e.removeLeadSnapshot()}function w0(e,t,n){e.translate=bY(t.translate,0,n),e.scale=bY(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function T0(e,t,n,r){e.min=bY(t.min,n.min,r),e.max=bY(t.max,n.max,r)}function Rle(e,t,n,r){T0(e.x,t.x,n.x,r),T0(e.y,t.y,n.y,r)}function zle(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Ble={duration:.45,ease:[.4,0,.1,1]},E0=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),D0=E0(`applewebkit/`)&&!E0(`chrome/`)?Math.round:Lq;function O0(e){e.min=D0(e.min),e.max=D0(e.max)}function Vle(e){O0(e.x),O0(e.y)}function k0(e,t,n){return e===`position`||e===`preserve-aspect`&&!V1(a0(t),a0(n),.2)}function Hle(e){return e!==e.root&&e.scroll?.wasRoot}var Ule=b0({attachResizeListener:(e,t)=>p0(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),A0={current:void 0},j0=b0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!A0.current){let e=new Ule({});e.mount(window),e.setOptions({layoutScroll:!0}),A0.current=e}return A0.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),M0=(0,L.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Wle(e=!0){let t=(0,L.useContext)(Oq);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,L.useId)();(0,L.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,L.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var N0=(0,L.createContext)({strict:!1}),P0={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},F0=!1;function Gle(){if(F0)return;let e={};for(let t in P0)e[t]={isEnabled:e=>P0[t].some(t=>!!e[t])};E$(e),F0=!0}function I0(){return Gle(),D$()}function Kle(e){let t=I0();for(let n in e)t[n]={...t[n],...e[n]};E$(t)}var qle=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function L0(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||qle.has(e)}var Jle=r({default:()=>R0}),R0,Yle=t((()=>{throw R0={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),z0=e=>!L0(e);function Xle(e){typeof e==`function`&&(z0=t=>t.startsWith(`on`)?!L0(t):e(t))}try{Xle((Yle(),e(Jle)).default)}catch{}function Zle(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||GZ(e[i])||(z0(i)||n===!0&&L0(i)||!t&&!L0(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var B0=(0,L.createContext)({});function Qle(e,t){if(_$(e)){let{initial:t,animate:n}=e;return{initial:t===!1||m$(t)?t:void 0,animate:m$(n)?n:void 0}}return e.inherit===!1?{}:t}function $le(e){let{initial:t,animate:n}=Qle(e,(0,L.useContext)(B0));return(0,L.useMemo)(()=>({initial:t,animate:n}),[V0(t),V0(n)])}function V0(e){return Array.isArray(e)?e.join(` `):e}var H0=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function U0(e,t,n){for(let r in t)!GZ(t[r])&&!s1(r,n)&&(e[r]=t[r])}function eue({transformTemplate:e},t){return(0,L.useMemo)(()=>{let n=H0();return t1(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tue(e,t){let n=e.style||{},r={};return U0(r,n,e),Object.assign(r,eue(e,t)),r}function nue(e,t){let n={},r=tue(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var W0=()=>({...H0(),attrs:{}});function rue(e,t,n,r){let i=(0,L.useMemo)(()=>{let n=W0();return h1(n,t,_1(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};U0(t,e.style,e),i.style={...t,...i.style}}return i}var iue=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function G0(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(iue.indexOf(e)>-1||/[A-Z]/u.test(e))}function aue(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??G0(e)?rue:nue)(t,r,i,e),c=Zle(t,typeof e==`string`,a),l=e===L.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,L.useMemo)(()=>GZ(u)?u.get():u,[u]);return(0,L.createElement)(e,{...l,children:d})}function oue({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:sue(n,r,i,e),renderState:t()}}function sue(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=m0(a[e]);let{initial:o,animate:s}=e,c=_$(e),l=v$(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!p$(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=NZ(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var K0=e=>(t,n)=>{let r=(0,L.useContext)(B0),i=(0,L.useContext)(Oq),a=()=>oue(e,t,r,i);return n?a():Eq(a)},cue=K0({scrapeMotionValuesFromProps:c1,createRenderState:H0}),lue=K0({scrapeMotionValuesFromProps:y1,createRenderState:W0}),uue=Symbol.for(`motionComponentSymbol`);function due(e,t,n){let r=(0,L.useRef)(n);(0,L.useInsertionEffect)(()=>{r.current=n});let i=(0,L.useRef)(null);return(0,L.useCallback)(n=>{n&&e.onMount?.(n);let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n);t&&(n?t.mount(n):t.unmount())},[t])}var q0=(0,L.createContext)({});function J0(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function fue(e,t,n,r,i,a){let{visualElement:o}=(0,L.useContext)(B0),s=(0,L.useContext)(N0),c=(0,L.useContext)(Oq),l=(0,L.useContext)(M0),u=l.reducedMotion,d=l.skipAnimations,f=(0,L.useRef)(null),p=(0,L.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,L.useContext)(q0);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&pue(f.current,n,i,h);let g=(0,L.useRef)(!1);(0,L.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[YZ],v=(0,L.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Dq(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,L.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function pue(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Y0(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&J0(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Y0(e){if(e)return e.options.allowProjection===!1?Y0(e.parent):e.projection}function X0(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Kle(r);let a=n?n===`svg`:G0(e),o=a?lue:cue;function s(n,s){let c,l={...(0,L.useContext)(M0),...n,layoutId:mue(n)},{isStatic:u}=l,d=$le(n),f=o(n,u);if(!u&&typeof window<`u`){hue(l,r);let t=gue(l);c=t.MeasureLayout,d.visualElement=fue(e,f,l,i,t.ProjectionNode,a)}return(0,z.jsxs)(B0.Provider,{value:d,children:[c&&d.visualElement?(0,z.jsx)(c,{visualElement:d.visualElement,...l}):null,aue(e,n,due(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,L.forwardRef)(s);return c[uue]=e,c}function mue({layoutId:e}){let t=(0,L.useContext)(Tq).id;return t&&e!==void 0?t+`-`+e:e}function hue(e,t){(0,L.useContext)(N0).strict}function gue(e){let{drag:t,layout:n}=I0();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function _ue(e,t){if(typeof Proxy>`u`)return X0;let n=new Map,r=(n,r)=>X0(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,X0(a,void 0,e,t)),n.get(a))})}var vue=(e,t)=>t.isSVG??G0(e)?new b1(t):new u1(t,{allowProjection:e!==L.Fragment}),yue=class extends A${constructor(e){super(e),e.animationState||=D1(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();p$(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},bue=0,xue={animation:{Feature:yue},exit:{Feature:class extends A${constructor(){super(...arguments),this.id=bue++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`){let n=PZ(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Z0(e){return{point:{x:e.pageX,y:e.pageY}}}var Sue=e=>t=>MQ(t)&&e(t,Z0(t));function Q0(e,t,n,r){return p0(e,t,Sue(n),r)}var $0=({current:e})=>e?e.ownerDocument.defaultView:null,e2=(e,t)=>Math.abs(e-t);function Cue(e,t){let n=e2(e.x,t.x),r=e2(e.y,t.y);return Math.sqrt(n**2+r**2)}var t2=new Set([`auto`,`scroll`]),n2=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=r2(this.lastRawMoveEventInfo,this.transformPagePoint));let e=a2(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Cue(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=bJ;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=r2(t,this.transformPagePoint),vJ.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=a2(e.type===`pointercancel`?this.lastMoveEventInfo:r2(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!MQ(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=r2(Z0(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=bJ;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,a2(s,this.history)),this.removeListeners=zq(Q0(this.contextWindow,`pointermove`,this.handlePointerMove),Q0(this.contextWindow,`pointerup`,this.handlePointerUp),Q0(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(t2.has(e.overflowX)||t2.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),vJ.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),yJ(this.updatePoint)}};function r2(e,t){return t?{point:t(e.point)}:e}function i2(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a2({point:e},t){return{point:e,delta:i2(e,o2(t)),offset:i2(e,wue(t)),velocity:Tue(t,.1)}}function wue(e){return e[0]}function o2(e){return e[e.length-1]}function Tue(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=o2(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Hq(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Hq(t)*2&&(r=e[1]);let a=Uq(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Eue(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?bY(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?bY(n,e,r.max):Math.min(e,n)),e}function s2(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Due(e,{top:t,left:n,bottom:r,right:i}){return{x:s2(e.x,n,i),y:s2(e.y,t,r)}}function c2(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Oue(e,t){return{x:c2(e.x,t.x),y:c2(e.y,t.y)}}function kue(e,t){let n=.5,r=B1(e),i=B1(t);return i>r?n=Bq(t.min,t.max-r,e.min):r>i&&(n=Bq(e.min,e.max-i,t.min)),jq(0,1,n)}function Aue(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var l2=.35;function jue(e=l2){return e===!1?e=0:e===!0&&(e=l2),{x:u2(e,`left`,`right`),y:u2(e,`top`,`bottom`)}}function u2(e,t,n){return{min:d2(e,t),max:d2(e,n)}}function d2(e,t){return typeof e==`number`?e:e[t]||0}var Mue=new WeakMap,Nue=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=d$(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Z0(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=DQ(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),s0(e=>{let t=this.getAxisMotionValue(e).get()||0;if(JJ.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=B1(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&vJ.update(()=>i(e,t),!1,!0),qZ(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Fue(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&vJ.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new n2(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:$0(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&vJ.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!p2(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Eue(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&J0(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=Due(n.layoutBox,e):this.constraints=!1,this.elastic=jue(t),r!==this.constraints&&!J0(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&s0(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Aue(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!J0(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=Z$(n,r.root,this.visualElement.getTransformPagePoint()),a=Oue(r.layout.layoutBox,i);if(t){let e=t(M$(a));this.hasMutatedConstraints=!!e,e&&(a=j$(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=s0(o=>{if(!p2(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return qZ(this.visualElement,e),n.start(jZ(e,n,0,t,this.visualElement,!1))}stopAnimation(){s0(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){s0(t=>{let{drag:n}=this.getProps();if(!p2(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-bY(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!J0(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};s0(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=kue({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),s0(t=>{if(!p2(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(bY(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Mue.set(this.visualElement,this);let e=this.visualElement.current,t=Q0(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&IQ(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();J0(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Pue(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),vJ.read(r);let o=p0(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(s0(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=l2,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function f2(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Pue(e,t,n){let r=i$(e,f2(n)),i=i$(t,f2(n));return()=>{r(),i()}}function p2(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Fue(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Iue=class extends A${constructor(e){super(e),this.removeGroupControls=Lq,this.removeListeners=Lq,this.controls=new Nue(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Lq}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},m2=e=>(t,n)=>{e&&vJ.update(()=>e(t,n),!1,!0)},Lue=class extends A${constructor(){super(...arguments),this.removePointerDownListener=Lq}onPointerDown(e){this.session=new n2(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:$0(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:m2(e),onStart:m2(t),onMove:m2(n),onEnd:(e,t)=>{delete this.session,r&&vJ.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Q0(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},h2=!1,Rue=class extends L.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),h2&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),h0.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),h2=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||vJ.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),wQ.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;h2=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function g2(e){let[t,n]=Wle(),r=(0,L.useContext)(Tq);return(0,z.jsx)(Rue,{...e,layoutGroup:r,switchLayoutGroup:(0,L.useContext)(q0),isPresent:t,safeToRemove:n})}var zue={pan:{Feature:Lue},drag:{Feature:Iue,ProjectionNode:j0,MeasureLayout:g2}};function _2(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&vJ.postRender(()=>i(t,Z0(t)))}var Bue=class extends A${mount(){let{current:e}=this.node;e&&(this.unmount=AQ(e,(e,t)=>(_2(this.node,t,`Start`),e=>_2(this.node,e,`End`))))}unmount(){}},Vue=class extends A${constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=zq(p0(this.node.current,`focus`,()=>this.onFocus()),p0(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function v2(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&vJ.postRender(()=>i(t,Z0(t)))}var Hue=class extends A${mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=UQ(e,(e,t)=>(v2(this.node,t,`Start`),(e,{success:t})=>v2(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},y2=new WeakMap,b2=new WeakMap,Uue=e=>{let t=y2.get(e.target);t&&t(e)},Wue=e=>{e.forEach(Uue)};function Gue({root:e,...t}){let n=e||document;b2.has(n)||b2.set(n,{});let r=b2.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Wue,{root:e,...t})),r[i]}function Kue(e,t,n){let r=Gue(t);return y2.set(e,n),r.observe(e),()=>{y2.delete(e),r.unobserve(e)}}var que={some:0,all:1},Jue=class extends A${constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:que[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Kue(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Yue(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Yue({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Xue={inView:{Feature:Jue},tap:{Feature:Hue},focus:{Feature:Vue},hover:{Feature:Bue}},Zue={layout:{ProjectionNode:j0,MeasureLayout:g2}},Que=_ue({...xue,...Xue,...zue,...Zue},vue),x2=new Map,$ue=e=>{let t=x2.get(e);return t||(t=Que.create(e),x2.set(e,t)),t},ede=(0,L.memo)(({children:e,as:t=`p`,className:n,duration:r=2,spread:i=2})=>{let a=$ue(t),o=(0,L.useMemo)(()=>(e?.length??0)*i,[e,i]);return(0,z.jsx)(a,{animate:{backgroundPosition:`0% center`},className:gi(`relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent`,`[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]`,n),initial:{backgroundPosition:`100% center`},style:{"--spread":`${o}px`,backgroundImage:`var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))`},transition:{duration:r,ease:`linear`,repeat:1/0},children:e})}),S2=(0,L.createContext)(null),tde=()=>{let e=(0,L.useContext)(S2);if(!e)throw Error(`Reasoning components must be used within Reasoning`);return e},nde=1e3,rde=1e3,C2=(0,L.memo)(({className:e,isStreaming:t=!1,open:n,defaultOpen:r,onOpenChange:i,duration:a,children:o,...s})=>{let c=r??t,l=r===!1,[u,d]=lW({defaultProp:c,onChange:i,prop:n}),[f,p]=lW({defaultProp:void 0,prop:a}),m=(0,L.useRef)(t),[h,g]=(0,L.useState)(!1),_=(0,L.useRef)(null);(0,L.useEffect)(()=>{t?(m.current=!0,_.current===null&&(_.current=Date.now())):_.current!==null&&(p(Math.ceil((Date.now()-_.current)/rde)),_.current=null)},[t,p]),(0,L.useEffect)(()=>{t&&!u&&!l&&d(!0)},[t,u,d,l]),(0,L.useEffect)(()=>{if(m.current&&!t&&u&&!h){let e=setTimeout(()=>{d(!1),g(!0)},nde);return()=>clearTimeout(e)}},[t,u,d,h]);let v=(0,L.useCallback)(e=>{d(e)},[d]),y=(0,L.useMemo)(()=>({duration:f,isOpen:u,isStreaming:t,setIsOpen:d}),[f,u,t,d]);return(0,z.jsx)(S2.Provider,{value:y,children:(0,z.jsx)(Sq,{className:gi(`not-prose mb-4`,e),onOpenChange:v,open:u,...s,children:o})})}),ide=(e,t)=>e||t===0?(0,z.jsx)(ede,{duration:1,children:`Thinking...`}):t===void 0?(0,z.jsx)(`p`,{children:`Thought for a few seconds`}):(0,z.jsxs)(`p`,{children:[`Thought for `,t,` seconds`]}),w2=(0,L.memo)(({className:e,children:t,getThinkingMessage:n=ide,...r})=>{let{isStreaming:i,isOpen:a,duration:o}=tde();return(0,z.jsx)(Cq,{className:gi(`flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground`,e),...r,children:t??(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(_d,{className:`size-4`}),n(i,o),(0,z.jsx)(vd,{className:gi(`size-4 transition-transform`,a?`rotate-180`:`rotate-0`)})]})})}),ade={cjk:wm,code:YS,math:xC,mermaid:fk},T2=(0,L.memo)(({className:e,children:t,...n})=>(0,z.jsx)(wq,{className:gi(`mt-4 text-sm`,`data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...n,children:(0,z.jsx)(qU,{plugins:ade,children:t})}));C2.displayName=`Reasoning`,w2.displayName=`ReasoningTrigger`,T2.displayName=`ReasoningContent`;var ode=({className:e,...t})=>(0,z.jsx)(Sq,{className:gi(`not-prose mb-4 text-primary text-xs`,e),...t}),sde=({className:e,count:t,children:n,...r})=>(0,z.jsx)(Cq,{className:gi(`flex items-center gap-2`,e),...r,children:n??(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`p`,{className:`font-medium`,children:[`Used `,t,` sources`]}),(0,z.jsx)(vd,{className:`h-4 w-4`})]})}),cde=({className:e,...t})=>(0,z.jsx)(wq,{className:gi(`mt-3 flex w-fit flex-col gap-2`,`data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...t}),E2=({href:e,title:t,children:n,...r})=>(0,z.jsx)(`a`,{className:`flex items-center gap-2`,href:e,rel:`noreferrer`,target:`_blank`,...r,children:n??(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(gd,{className:`h-4 w-4`}),(0,z.jsx)(`span`,{className:`block font-medium`,children:t})]})}),lde=()=>typeof window>`u`?`none`:`SpeechRecognition`in window||`webkitSpeechRecognition`in window?`speech-recognition`:`MediaRecorder`in window&&`mediaDevices`in navigator?`media-recorder`:`none`,ude=({className:e,onTranscriptionChange:t,onAudioRecorded:n,lang:r=`en-US`,...i})=>{let[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(!1),[l]=(0,L.useState)(lde),[u,d]=(0,L.useState)(!1),f=(0,L.useRef)(null),p=(0,L.useRef)(null),m=(0,L.useRef)(null),h=(0,L.useRef)([]),g=(0,L.useRef)(t),_=(0,L.useRef)(n);g.current=t,_.current=n,(0,L.useEffect)(()=>{if(l!==`speech-recognition`)return;let e=new(window.SpeechRecognition||window.webkitSpeechRecognition);e.continuous=!0,e.interimResults=!0,e.lang=r;let t=()=>{o(!0)},n=()=>{o(!1)},i=e=>{let t=e,n=``;for(let e=t.resultIndex;e<t.results.length;e+=1){let r=t.results[e];r.isFinal&&(n+=r[0]?.transcript??``)}n&&g.current?.(n)},a=()=>{o(!1)};return e.addEventListener(`start`,t),e.addEventListener(`end`,n),e.addEventListener(`result`,i),e.addEventListener(`error`,a),f.current=e,d(!0),()=>{e.removeEventListener(`start`,t),e.removeEventListener(`end`,n),e.removeEventListener(`result`,i),e.removeEventListener(`error`,a),e.stop(),f.current=null,d(!1)}},[l,r]),(0,L.useEffect)(()=>()=>{if(p.current?.state===`recording`&&p.current.stop(),m.current)for(let e of m.current.getTracks())e.stop()},[]);let v=(0,L.useCallback)(async()=>{if(_.current)try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});m.current=e;let t=new MediaRecorder(e);h.current=[],t.addEventListener(`dataavailable`,e=>{e.data.size>0&&h.current.push(e.data)}),t.addEventListener(`stop`,async()=>{for(let t of e.getTracks())t.stop();m.current=null;let t=new Blob(h.current,{type:`audio/webm`});if(t.size>0&&_.current){c(!0);try{let e=await _.current(t);e&&g.current?.(e)}catch{}finally{c(!1)}}}),t.addEventListener(`error`,()=>{o(!1);for(let t of e.getTracks())t.stop();m.current=null}),p.current=t,t.start(),o(!0)}catch{o(!1)}},[]),y=(0,L.useCallback)(()=>{p.current?.state===`recording`&&p.current.stop(),o(!1)},[]),b=(0,L.useCallback)(()=>{l===`speech-recognition`&&f.current?a?f.current.stop():f.current.start():l===`media-recorder`&&(a?y():v())},[l,a,v,y]),x=l===`none`||l===`speech-recognition`&&!u||l===`media-recorder`&&!n||s;return(0,z.jsxs)(`div`,{className:`relative inline-flex items-center justify-center`,children:[a&&[0,1,2].map(e=>(0,z.jsx)(`div`,{className:`absolute inset-0 animate-ping rounded-full border-2 border-red-400/30`,style:{animationDelay:`${e*.3}s`,animationDuration:`2s`}},e)),(0,z.jsxs)(bi,{className:gi(`relative z-10 rounded-full transition-all duration-300`,a?`bg-destructive text-white hover:bg-destructive/80 hover:text-white`:`bg-primary text-primary-foreground hover:bg-primary/80 hover:text-primary-foreground`,e),disabled:x,onClick:b,...i,children:[s&&(0,z.jsx)(LK,{}),!s&&a&&(0,z.jsx)(Vd,{className:`size-4`}),!(s||a)&&(0,z.jsx)(Pd,{className:`size-4`})]})]})},dde=Un(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function fde({className:e,variant:t=`default`,render:n,...r}){return Sf({defaultTagName:`span`,props:Jt({className:gi(dde({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}var D2=Object.defineProperty,pde=Object.getOwnPropertyDescriptor,mde=Object.getOwnPropertyNames,hde=Object.prototype.hasOwnProperty,gde=(e,t)=>{let n={};for(var r in e)D2(n,r,{get:e[r],enumerable:!0});return t||D2(n,Symbol.toStringTag,{value:`Module`}),n},O2=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=mde(t),a=0,o=i.length,s;a<o;a++)s=i[a],!hde.call(e,s)&&s!==n&&D2(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=pde(t,s))||r.enumerable});return e},_de=(e,t,n)=>(O2(e,t,`default`),n&&O2(n,t,`default`)),k2=[{id:`abap`,name:`ABAP`,import:(()=>a(()=>import(`./abap-MtXtrFp7.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,import:(()=>a(()=>import(`./actionscript-3-BgNL0N1E.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>a(()=>import(`./ada-DiRrRLS1.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>a(()=>import(`./angular-html-C2U28d7I.js`).then(e=>e.n),__vite__mapDeps([181,1,182,183,184])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>a(()=>import(`./angular-ts-JFeCGW_v.js`),__vite__mapDeps([185,181,1,182,183,184,186])))},{id:`apache`,name:`Apache Conf`,import:(()=>a(()=>import(`./apache-DLa6jFkS.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>a(()=>import(`./apex-Dpz-K4fb.js`),[]))},{id:`apl`,name:`APL`,import:(()=>a(()=>import(`./apl-BpebQNmD.js`),__vite__mapDeps([187,183,1,182,184,188,189,190])))},{id:`applescript`,name:`AppleScript`,import:(()=>a(()=>import(`./applescript-C3rOV--1.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>a(()=>import(`./ara-ApwnWgO5.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>a(()=>import(`./asciidoc-DUQrwBgw.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>a(()=>import(`./asm-rZD_19Wt.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>a(()=>import(`./astro-CRpHIgIU.js`),__vite__mapDeps([191,183,1,184,188,192,193,194])))},{id:`awk`,name:`AWK`,import:(()=>a(()=>import(`./awk-BYgN-2ag.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>a(()=>import(`./ballerina-POmyawgi.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`],import:(()=>a(()=>import(`./bat-B6x_YHGG.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>a(()=>import(`./beancount-boLq-aT1.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>a(()=>import(`./berry-BT1qbF1v.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>a(()=>import(`./bibtex-CWZmTJZ-.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>a(()=>import(`./bicep-DSO2VMUk.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>a(()=>import(`./bird2-zNhXi_V-.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>a(()=>import(`./blade-DhbbzlNo.js`),__vite__mapDeps([195,183,1,196,182,184,188,197,189,190])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>a(()=>import(`./bsl-B54i21_P.js`),__vite__mapDeps([198,199])))},{id:`c`,name:`C`,import:(()=>a(()=>import(`./c-Cs0TSLm9.js`).then(e=>e.n),__vite__mapDeps([200,1])))},{id:`c3`,name:`C3`,import:(()=>a(()=>import(`./c3-yuHhF9ON.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>a(()=>import(`./cadence-BmsmHR8j.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>a(()=>import(`./cairo-JaUDbVYo.js`),__vite__mapDeps([201,202])))},{id:`clarity`,name:`Clarity`,import:(()=>a(()=>import(`./clarity-Bz5rv1b0.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>a(()=>import(`./clojure-BlfqDAxm.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>a(()=>import(`./cmake-t9HbbaOy.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>a(()=>import(`./cobol-DffwYkFi.js`),__vite__mapDeps([203,182,1,183,184,190])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>a(()=>import(`./codeowners-BUWzLKU_.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>a(()=>import(`./codeql-lIqjuzSV.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>a(()=>import(`./coffee-DolKeCzx.js`),__vite__mapDeps([204,184,1])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>a(()=>import(`./common-lisp-CwR7w7Mc.js`),[]))},{id:`coq`,name:`Coq`,import:(()=>a(()=>import(`./coq-CLaeVPd3.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>a(()=>import(`./cpp-CXq4pIDO.js`).then(e=>e.n),__vite__mapDeps([205,1,206,200,207,197])))},{id:`crystal`,name:`Crystal`,import:(()=>a(()=>import(`./crystal-CFQjs88Q.js`),__vite__mapDeps([208,200,1,183,182,184,209,197])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>a(()=>import(`./csharp-CiH7oTou.js`),[]))},{id:`css`,name:`CSS`,import:(()=>a(()=>import(`./css-BNlbTijp.js`).then(e=>e.n),__vite__mapDeps([183,1])))},{id:`csv`,name:`CSV`,import:(()=>a(()=>import(`./csv-BxO9mTca.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>a(()=>import(`./cue-BTN5NZzf.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>a(()=>import(`./cypher-BFDPHm6j.js`),[]))},{id:`d`,name:`D`,import:(()=>a(()=>import(`./d-C9JWWN1n.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>a(()=>import(`./dart-DXMuKonb.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>a(()=>import(`./dax-eFeXdw2Y.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>a(()=>import(`./desktop-vaRnhEHO.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>a(()=>import(`./diff-BfcdpccF.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>a(()=>import(`./docker-BfFZ8pW1.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>a(()=>import(`./dotenv-6it1OykX.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>a(()=>import(`./dream-maker-DTyjEDlz.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>a(()=>import(`./edge-Ce8ETtVJ.js`),__vite__mapDeps([210,196,182,1,183,184,194])))},{id:`elixir`,name:`Elixir`,import:(()=>a(()=>import(`./elixir-DWgbHRG4.js`),__vite__mapDeps([211,182,1,183,184])))},{id:`elm`,name:`Elm`,import:(()=>a(()=>import(`./elm-Cj38Buk6.js`),__vite__mapDeps([212,206,1,200])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>a(()=>import(`./emacs-lisp-RCv_OPrX.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>a(()=>import(`./erb-B8WAiN7n.js`),__vite__mapDeps([213,182,1,183,184,214,200,205,206,207,197,215,216,193,194,217,218,209,189,190,219])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>a(()=>import(`./erlang-9bZkvgha.js`),__vite__mapDeps([220,221])))},{id:`fennel`,name:`Fennel`,import:(()=>a(()=>import(`./fennel-o7i3YIOB.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>a(()=>import(`./fish-jXqpL1U6.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>a(()=>import(`./fluent-BJgigJ4-.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>a(()=>import(`./fortran-fixed-form-BVlcY82S.js`),__vite__mapDeps([222,223])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>a(()=>import(`./fortran-free-form-T246OFmF.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>a(()=>import(`./fsharp-D4PGOmrZ.js`),__vite__mapDeps([224,221])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>a(()=>import(`./gdresource-zogYIbMs.js`),__vite__mapDeps([225,226,227])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>a(()=>import(`./gdscript-DilHUO6X.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>a(()=>import(`./gdshader-CVkSEAIh.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>a(()=>import(`./genie-BcwRv1XQ.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>a(()=>import(`./gherkin-NKgd_wpf.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>a(()=>import(`./git-commit-BOtit0B7.js`),__vite__mapDeps([228,229])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>a(()=>import(`./git-rebase-Dz4G9beD.js`),__vite__mapDeps([230,209,1])))},{id:`gleam`,name:`Gleam`,import:(()=>a(()=>import(`./gleam-DWfIuUJE.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>a(()=>import(`./glimmer-js-D8Ts9DvD.js`),__vite__mapDeps([231,183,1,182,184,194])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>a(()=>import(`./glimmer-ts-y7nzn0ID.js`),__vite__mapDeps([232,183,1,182,184,194])))},{id:`glsl`,name:`GLSL`,import:(()=>a(()=>import(`./glsl-Df_EGTfW.js`).then(e=>e.n),__vite__mapDeps([206,1,200])))},{id:`gn`,name:`GN`,import:(()=>a(()=>import(`./gn-v6v3PdnZ.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>a(()=>import(`./gnuplot-D3ERsOCN.js`),[]))},{id:`go`,name:`Go`,import:(()=>a(()=>import(`./go-BT4oYldF.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>a(()=>import(`./graphql-DQZ2ti5C.js`).then(e=>e.n),__vite__mapDeps([215,1,184,216,193,194])))},{id:`groovy`,name:`Groovy`,import:(()=>a(()=>import(`./groovy-Ck8ECyM4.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>a(()=>import(`./hack-cEAjOsDW.js`),__vite__mapDeps([233,182,1,183,184,197])))},{id:`haml`,name:`Ruby Haml`,import:(()=>a(()=>import(`./haml-Z6fBk1Nn.js`).then(e=>e.n),__vite__mapDeps([217,1,183,184])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>a(()=>import(`./handlebars-B0-Og-pC.js`),__vite__mapDeps([234,183,1,182,184,219])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>a(()=>import(`./haskell-BcuBlHQQ.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>a(()=>import(`./haxe-Ds6BbIFI.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>a(()=>import(`./hcl-Di6Zf7fX.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>a(()=>import(`./hjson-n846ZK_5.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>a(()=>import(`./hlsl-Cn4xOp4H.js`),[]))},{id:`html`,name:`HTML`,import:(()=>a(()=>import(`./html-IDCAcWPz.js`).then(e=>e.n),__vite__mapDeps([182,1,183,184])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>a(()=>import(`./html-derivative-CLqUdpRr.js`),__vite__mapDeps([196,182,1,183,184])))},{id:`http`,name:`HTTP`,import:(()=>a(()=>import(`./http-B_4Eeybg.js`),__vite__mapDeps([235,215,1,184,216,193,194,188,209,189,190])))},{id:`hurl`,name:`Hurl`,import:(()=>a(()=>import(`./hurl-_1c_0_Wc.js`),__vite__mapDeps([236,237,215,1,184,216,193,194,189,190])))},{id:`hxml`,name:`HXML`,import:(()=>a(()=>import(`./hxml-CBLoPFJn.js`),__vite__mapDeps([238,239])))},{id:`hy`,name:`Hy`,import:(()=>a(()=>import(`./hy-BEBfvakU.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>a(()=>import(`./imba-YxfLfDV5.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>a(()=>import(`./ini-DNM4EV4o.js`),[]))},{id:`java`,name:`Java`,import:(()=>a(()=>import(`./java-CRBbboP-.js`).then(e=>e.n),__vite__mapDeps([190,1])))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>a(()=>import(`./javascript-Cpa2yoQT.js`).then(e=>e.n),__vite__mapDeps([184,1])))},{id:`jinja`,name:`Jinja`,import:(()=>a(()=>import(`./jinja-BYrs-9sw.js`),__vite__mapDeps([240,182,1,183,184])))},{id:`jison`,name:`Jison`,import:(()=>a(()=>import(`./jison-_g2Qrf-2.js`),__vite__mapDeps([241,184,1])))},{id:`json`,name:`JSON`,import:(()=>a(()=>import(`./json-BkAcrDlM.js`).then(e=>e.n),__vite__mapDeps([188,1])))},{id:`json5`,name:`JSON5`,import:(()=>a(()=>import(`./json5-BavpNaDy.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>a(()=>import(`./jsonc-DnNY0bkA.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>a(()=>import(`./jsonl-FKTLVwIK.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>a(()=>import(`./jsonnet-DbkyzC45.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>a(()=>import(`./jssm-CSQu3gIK.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>a(()=>import(`./jsx-Dp7se6LN.js`).then(e=>e.n),__vite__mapDeps([216,1])))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>a(()=>import(`./julia-Dww0yICA.js`),__vite__mapDeps([242,205,1,206,200,207,197,184,202,243])))},{id:`just`,name:`Just`,import:(()=>a(()=>import(`./just-DmI2dcWN.js`),__vite__mapDeps([244,184,1,245,183,182,197,189,190,202,214,200,205,206,207,215,216,193,194,217,218,209,219])))},{id:`kdl`,name:`KDL`,import:(()=>a(()=>import(`./kdl-C0UIj31o.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>a(()=>import(`./kotlin-vffgfDNS.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>a(()=>import(`./kusto-DSJENqrG.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>a(()=>import(`./latex-290GCwIn.js`),__vite__mapDeps([246,247,243,1])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>a(()=>import(`./lean-gMq75vwe.js`),[]))},{id:`less`,name:`Less`,import:(()=>a(()=>import(`./less-Cmnr-ah1.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>a(()=>import(`./liquid-CvTrx5Vc.js`),__vite__mapDeps([248,183,1,182,184,188])))},{id:`llvm`,name:`LLVM IR`,import:(()=>a(()=>import(`./llvm-C_5WH3kq.js`),[]))},{id:`log`,name:`Log file`,import:(()=>a(()=>import(`./log-DU60H7d_.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>a(()=>import(`./logo-CLmtY5PB.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>a(()=>import(`./lua-8BMmASPg.js`).then(e=>e.n),__vite__mapDeps([218,1,200])))},{id:`luau`,name:`Luau`,import:(()=>a(()=>import(`./luau-BvW230Dm.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>a(()=>import(`./make-B9Qs4agE.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>a(()=>import(`./markdown-dkut3LZ0.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>a(()=>import(`./marko-eKiBW8WW.js`),__vite__mapDeps([249,183,1,250,186,194])))},{id:`matlab`,name:`MATLAB`,import:(()=>a(()=>import(`./matlab-CpQqW4hd.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>a(()=>import(`./mdc-B0Wqmpvj.js`),__vite__mapDeps([251,196,182,1,183,184,221,219])))},{id:`mdx`,name:`MDX`,import:(()=>a(()=>import(`./mdx-sBdGCLwW.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>a(()=>import(`./mermaid-b44tA5S7.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>a(()=>import(`./mipsasm-Dqxe8ApN.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>a(()=>import(`./mojo-DFNqigHG.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>a(()=>import(`./moonbit-ctcXZvn9.js`),[]))},{id:`move`,name:`Move`,import:(()=>a(()=>import(`./move-zLcwbUqu.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>a(()=>import(`./narrat-f1lpVZJf.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>a(()=>import(`./nextflow-DaMHJyv-.js`),__vite__mapDeps([252,253])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>a(()=>import(`./nextflow-groovy-BCzh_nVB.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>a(()=>import(`./nginx-DLlifRTt.js`),__vite__mapDeps([254,218,1,200])))},{id:`nim`,name:`Nim`,import:(()=>a(()=>import(`./nim-D5ig7v3l.js`),__vite__mapDeps([255,200,1,183,206,182,184,221,189,190])))},{id:`nix`,name:`Nix`,import:(()=>a(()=>import(`./nix-BhbhL18q.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>a(()=>import(`./nushell-DDVwI-D5.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>a(()=>import(`./objective-c-ChyETAB0.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>a(()=>import(`./objective-cpp-BcqP6Aic.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>a(()=>import(`./ocaml-BKHAcOrO.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>a(()=>import(`./odin-D2DKZf1q.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>a(()=>import(`./openscad-B_zRpkpM.js`),[]))},{id:`pascal`,name:`Pascal`,import:(()=>a(()=>import(`./pascal-BKuCIWM_.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>a(()=>import(`./perl-BBy9cgaT.js`),__vite__mapDeps([245,183,1,182,184,197,189,190])))},{id:`php`,name:`PHP`,import:(()=>a(()=>import(`./php-DuBxjQDx.js`),__vite__mapDeps([256,183,1,182,184,188,197,189,190])))},{id:`pkl`,name:`Pkl`,import:(()=>a(()=>import(`./pkl-LEYeyt_p.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>a(()=>import(`./plsql-fI9PIVwT.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>a(()=>import(`./po-DLTWlrqV.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>a(()=>import(`./polar-DUoF5U0u.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>a(()=>import(`./postcss-_4KnAWK8.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>a(()=>import(`./powerquery-DFoWq5qH.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`],import:(()=>a(()=>import(`./powershell-DFwmRix9.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>a(()=>import(`./prisma-CnzQ94tG.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>a(()=>import(`./prolog-DtQ9yJfT.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>a(()=>import(`./proto-DwM9UHil.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>a(()=>import(`./pug-CeUn-RsL.js`),__vite__mapDeps([257,183,1,182,184])))},{id:`puppet`,name:`Puppet`,import:(()=>a(()=>import(`./puppet-DsEuO1X7.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>a(()=>import(`./purescript-BTSir1Xo.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>a(()=>import(`./python-CiZjse7V.js`),[]))},{id:`qml`,name:`QML`,import:(()=>a(()=>import(`./qml-CxI8kE-p.js`),__vite__mapDeps([258,184,1])))},{id:`qmldir`,name:`QML Directory`,import:(()=>a(()=>import(`./qmldir-CtYPMSE3.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>a(()=>import(`./qss-DRMNzZ59.js`),[]))},{id:`r`,name:`R`,import:(()=>a(()=>import(`./r-CUg6wo0X.js`).then(e=>e.n),__vite__mapDeps([243,1])))},{id:`racket`,name:`Racket`,import:(()=>a(()=>import(`./racket-D_QPqTKn.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>a(()=>import(`./raku-DBZIRFvi.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>a(()=>import(`./razor-uD0Mg1wE.js`),__vite__mapDeps([259,260,182,1,183,184])))},{id:`reg`,name:`Windows Registry Script`,import:(()=>a(()=>import(`./reg-BC-LA5Qp.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>a(()=>import(`./regexp-Cs5_e8GY.js`).then(e=>e.n),__vite__mapDeps([207,1])))},{id:`rel`,name:`Rel`,import:(()=>a(()=>import(`./rel-CKAqwkdL.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>a(()=>import(`./riscv-BlvsE9dl.js`),[]))},{id:`ron`,name:`RON`,import:(()=>a(()=>import(`./ron-52n37KMa.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>a(()=>import(`./rosmsg-UyrZIIwN.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>a(()=>import(`./rst-BQRiWr_Y.js`),__vite__mapDeps([261,262,205,1,206,200,207,197,196,182,183,184,202,214,215,216,193,194,217,218,209,189,190,219])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>a(()=>import(`./ruby-vXaFb4jN.js`),__vite__mapDeps([214,200,1,205,206,207,197,183,215,184,216,193,194,217,182,218,209,189,190,219])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>a(()=>import(`./rust-gKoOtISS.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>a(()=>import(`./sas-DSyoyZG-.js`),__vite__mapDeps([263,197,1])))},{id:`sass`,name:`Sass`,import:(()=>a(()=>import(`./sass-D_gdEHBM.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>a(()=>import(`./scala-DNT7BEHY.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>a(()=>import(`./scheme-nljwiTX7.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>a(()=>import(`./scss-DXZ2YRPX.js`).then(e=>e.n),__vite__mapDeps([186,1,183])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>a(()=>import(`./sdbl-f-RzDkID.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>a(()=>import(`./shaderlab-B__viSd1.js`),__vite__mapDeps([264,265])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>a(()=>import(`./shellscript-246l_CV_.js`).then(e=>e.n),__vite__mapDeps([209,1])))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>a(()=>import(`./shellsession-DDTE6nt1.js`),__vite__mapDeps([266,209,1])))},{id:`smalltalk`,name:`Smalltalk`,import:(()=>a(()=>import(`./smalltalk-CdlSHLiV.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>a(()=>import(`./solidity--IaVYjFZ.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>a(()=>import(`./soy-BjBoAgvY.js`),__vite__mapDeps([267,182,1,183,184])))},{id:`sparql`,name:`SPARQL`,import:(()=>a(()=>import(`./sparql-P3fQ_Jok.js`),__vite__mapDeps([268,269])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>a(()=>import(`./splunk-Dxrj7cOP.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>a(()=>import(`./sql-B_MmwxVm.js`).then(e=>e.n),__vite__mapDeps([197,1])))},{id:`ssh-config`,name:`SSH Config`,import:(()=>a(()=>import(`./ssh-config-BPyiTEhv.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>a(()=>import(`./stata-T5FYSu1-.js`),__vite__mapDeps([270,197,1])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>a(()=>import(`./stylus-BRjIdNaI.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>a(()=>import(`./surrealql-Dx7bR3iH.js`),__vite__mapDeps([271,184,1])))},{id:`svelte`,name:`Svelte`,import:(()=>a(()=>import(`./svelte-DDotzggB.js`),__vite__mapDeps([272,183,1,184,192,194])))},{id:`swift`,name:`Swift`,import:(()=>a(()=>import(`./swift-BKjGZ3kI.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>a(()=>import(`./system-verilog-Cp5krGt2.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>a(()=>import(`./systemd-Boj767kS.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>a(()=>import(`./talonscript-DnvENotk.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>a(()=>import(`./tasl-UM_bHGae.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>a(()=>import(`./tcl-CzfTkjZ6.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>a(()=>import(`./templ-BintcxtH.js`),__vite__mapDeps([273,183,1,274,184])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>a(()=>import(`./terraform-Dse-iQ9t.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>a(()=>import(`./tex-DHFUYOEI.js`),__vite__mapDeps([247,243,1])))},{id:`toml`,name:`TOML`,import:(()=>a(()=>import(`./toml-B6YYqquZ.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>a(()=>import(`./ts-tags-aQrlJJF3.js`),__vite__mapDeps([275,183,1,206,200,182,184,197,194,189,190])))},{id:`tsv`,name:`TSV`,import:(()=>a(()=>import(`./tsv-CJMvFGxb.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>a(()=>import(`./tsx-Cw6jWh37.js`).then(e=>e.n),__vite__mapDeps([193,1])))},{id:`turtle`,name:`Turtle`,import:(()=>a(()=>import(`./turtle-C4YJmC8S.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>a(()=>import(`./twig-BiDIhIq9.js`),__vite__mapDeps([276,183,1,184,256,182,188,197,189,190,202,214,200,205,206,207,215,216,193,194,217,218,209,219,186])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>a(()=>import(`./typescript-CHh8HHl_.js`).then(e=>e.n),__vite__mapDeps([194,1])))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>a(()=>import(`./typespec-0sYIIYUy.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>a(()=>import(`./typst-DBjhjUQY.js`),[]))},{id:`v`,name:`V`,import:(()=>a(()=>import(`./v-BmVHErHK.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>a(()=>import(`./vala-BL8YlVFd.js`),[]))},{id:`vb`,name:`Visual Basic`,aliases:[`cmd`],import:(()=>a(()=>import(`./vb-CBy7ZYkb.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>a(()=>import(`./verilog-DPTVOhF5.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>a(()=>import(`./vhdl-DtzVbXzj.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>a(()=>import(`./viml-kDNnOCg0.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>a(()=>import(`./vue-CKOPxhtK.js`),__vite__mapDeps([277,183,1,196,182,184,188,194])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>a(()=>import(`./vue-html-ByGXx9rV.js`),__vite__mapDeps([278,184,1])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>a(()=>import(`./vue-vine-CHhnfXci.js`),__vite__mapDeps([279,183,1,184,250,192,186,280])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>a(()=>import(`./vyper-BoicJa8D.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>a(()=>import(`./wasm-BOH38yL_.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>a(()=>import(`./wenyan-ygG9GT-L.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>a(()=>import(`./wgsl-DWYw-pSW.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>a(()=>import(`./wikitext-C7YKi9IK.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>a(()=>import(`./wit-BX2jNrWD.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>a(()=>import(`./wolfram-BMFNjnaU.js`),[]))},{id:`xml`,name:`XML`,import:(()=>a(()=>import(`./xml-CkFha01Y.js`).then(e=>e.n),__vite__mapDeps([189,1,190])))},{id:`xsl`,name:`XSL`,import:(()=>a(()=>import(`./xsl-CEdS8bNO.js`),__vite__mapDeps([281,189,1,190])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>a(()=>import(`./yaml-oqPcGiBF.js`).then(e=>e.n),__vite__mapDeps([219,1])))},{id:`zenscript`,name:`ZenScript`,import:(()=>a(()=>import(`./zenscript-CE8gYYue.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>a(()=>import(`./zig-CBzbITnn.js`),[]))}],vde=Object.fromEntries(k2.map(e=>[e.id,e.import])),yde=Object.fromEntries(k2.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),bde={...vde,...yde},xde=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>a(()=>import(`./andromeeda-BBjKapps.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>a(()=>import(`./aurora-x-BgStcHuo.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>a(()=>import(`./ayu-dark-BzkKG4Sv.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>a(()=>import(`./ayu-light-DdcqvO4T.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>a(()=>import(`./ayu-mirage-J8giD7N2.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>a(()=>import(`./catppuccin-frappe-DAOuYvzF.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>a(()=>import(`./catppuccin-latte-BwY8mtP2.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>a(()=>import(`./catppuccin-macchiato-QZaRqe7n.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>a(()=>import(`./catppuccin-mocha-BBso-pxM.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>a(()=>import(`./dark-plus-Bbc19rIk.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>a(()=>import(`./dracula-2ybYu6DR.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>a(()=>import(`./dracula-soft-DGAeH-LM.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>a(()=>import(`./everforest-dark-DrLyOUiK.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>a(()=>import(`./everforest-light-VqyzUity.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>a(()=>import(`./github-dark-DbG-K_ZU.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>a(()=>import(`./github-dark-default-NK7CxJCj.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>a(()=>import(`./github-dark-dimmed-Bpt5af_M.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>a(()=>import(`./github-dark-high-contrast-QJMvve25.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>a(()=>import(`./github-light-ZFz5Gc4p.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>a(()=>import(`./github-light-default-CcMn0PC1.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>a(()=>import(`./github-light-high-contrast-B7VTK3vM.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>a(()=>import(`./gruvbox-dark-hard-B48OGn6k.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>a(()=>import(`./gruvbox-dark-medium-9B3ggi3D.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>a(()=>import(`./gruvbox-dark-soft-CnZ219w7.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>a(()=>import(`./gruvbox-light-hard-DrrkQubH.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>a(()=>import(`./gruvbox-light-medium-CR-qzlYD.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>a(()=>import(`./gruvbox-light-soft-CYX1WuHx.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>a(()=>import(`./horizon-ZVnuzBNV.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>a(()=>import(`./horizon-bright-B91if1Xb.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>a(()=>import(`./houston-Dm4pMJIX.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>a(()=>import(`./kanagawa-dragon-q3IZG2mU.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>a(()=>import(`./kanagawa-lotus-BbU5dcfH.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>a(()=>import(`./kanagawa-wave-Bi3j39e9.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>a(()=>import(`./laserwave-B4XktGfw.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>a(()=>import(`./light-plus-CjS5UTgi.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>a(()=>import(`./material-theme-B0GuAxhl.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>a(()=>import(`./material-theme-darker-CZbc7JwZ.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>a(()=>import(`./material-theme-lighter-Burc_UpA.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>a(()=>import(`./material-theme-ocean-B_2uOeYL.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>a(()=>import(`./material-theme-palenight-Byy4sFv9.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>a(()=>import(`./min-dark-dyk1cWlJ.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>a(()=>import(`./min-light-qP5B9k9w.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>a(()=>import(`./monokai-6LF27W_4.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>a(()=>import(`./night-owl-B6f2CW1l.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>a(()=>import(`./night-owl-light-CScKiob4.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>a(()=>import(`./nord-CmoF6O1F.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>a(()=>import(`./one-dark-pro-Dc1N-T5Q.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>a(()=>import(`./one-light-DpX7NQM7.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>a(()=>import(`./plastic-CYMS6aya.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>a(()=>import(`./poimandres-DdbhRq91.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>a(()=>import(`./red-BVkkvqT5.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>a(()=>import(`./rose-pine-BQZdLH9g.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>a(()=>import(`./rose-pine-dawn-D64bZARe.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>a(()=>import(`./rose-pine-moon-Dur094mG.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>a(()=>import(`./slack-dark-D5PCG6zY.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>a(()=>import(`./slack-ochin-C8_tFsxN.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>a(()=>import(`./snazzy-light-D_MqmPzn.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>a(()=>import(`./solarized-dark-DgYuRXKz.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>a(()=>import(`./solarized-light-BZLLgGyu.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>a(()=>import(`./synthwave-84-BpimzZ_P.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>a(()=>import(`./tokyo-night-CxWOuYuq.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>a(()=>import(`./vesper-CmalT_e3.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>a(()=>import(`./vitesse-black-CBEogNRC.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>a(()=>import(`./vitesse-dark-6l4x90Kr.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>a(()=>import(`./vitesse-light-CWGgRCvr.js`),[]))}].map(e=>[e.id,e.import])),Sde=r({createOnigurumaEngine:()=>Bde,getDefaultWasmLoader:()=>zde,loadWasm:()=>L2,setDefaultWasmLoader:()=>Rde}),A2=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Cde(){return 2147483648}function wde(){return typeof performance<`u`?performance.now():Date.now()}var Tde=(e,t)=>e+(t-e%t)%t;async function Ede(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=Cde();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,Tde(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let d={emscripten_get_now:wde,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function f(){let n=await e({env:d,wasi_snapshot_preview1:d});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await f(),r}var Dde=Object.defineProperty,Ode=(e,t,n)=>t in e?Dde(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,j2=(e,t,n)=>Ode(e,typeof t==`symbol`?t:t+``,n),M2=null;function kde(e){throw new A2(e.UTF8ToString(e.getLastOnigError()))}var N2=class e{constructor(t){j2(this,`utf16Length`),j2(this,`utf8Length`),j2(this,`utf16Value`),j2(this,`utf8Value`),j2(this,`utf16OffsetToUtf8`),j2(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},P2=class e{constructor(t){if(j2(this,`id`,++e.LAST_ID),j2(this,`_onigBinding`),j2(this,`content`),j2(this,`utf16Length`),j2(this,`utf8Length`),j2(this,`utf16OffsetToUtf8`),j2(this,`utf8OffsetToUtf16`),j2(this,`ptr`),!M2)throw new A2(`Must invoke loadWasm first.`);this._onigBinding=M2,this.content=t;let n=new N2(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=M2.omalloc(1e4),e._sharedPtrInUse=!0,M2.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(M2)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};j2(P2,`LAST_ID`,0),j2(P2,`_sharedPtr`,0),j2(P2,`_sharedPtrInUse`,!1);var F2=P2,Ade=class{constructor(e){if(j2(this,`_onigBinding`),j2(this,`_ptr`),!M2)throw new A2(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new N2(e[r]);t[r]=i.createString(M2),n[r]=i.utf8Length}let r=M2.omalloc(4*e.length);M2.HEAPU32.set(t,r/4);let i=M2.omalloc(4*e.length);M2.HEAPU32.set(n,i/4);let a=M2.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)M2.ofree(t[n]);M2.ofree(i),M2.ofree(r),a===0&&kde(M2),this._onigBinding=M2,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new F2(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function jde(e){return typeof e.instantiator==`function`}function Mde(e){return typeof e.default==`function`}function Nde(e){return e.data!==void 0}function Pde(e){return typeof Response<`u`&&e instanceof Response}function Fde(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var I2;function L2(e){if(I2)return I2;async function t(){M2=await Ede(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),jde(n)?n=await n.instantiator(t):Mde(n)?n=await n.default(t):(Nde(n)&&(n=n.data),Pde(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Ide(n)(t):await Lde(n)(t):Fde(n)||n instanceof WebAssembly.Module?n=await R2(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await R2(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return I2=t(),I2}function R2(e){return t=>WebAssembly.instantiate(e,t)}function Ide(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Lde(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var z2;function Rde(e){z2=e}function zde(){return z2}async function Bde(e){return e&&await L2(e),{createScanner(e){return new Ade(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new F2(e)}}}var B2=gde({});_de(B2,Sde);var V2=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function H2(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function U2(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Vde(e){return Array.isArray(e)?e:[e]}async function W2(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function G2(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function K2(e){return e===`ansi`||G2(e)}function q2(e){return e===`none`}function J2(e){return q2(e)}function Y2(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var X2={light:`#333333`,dark:`#bbbbbb`},Z2={light:`#fffffe`,dark:`#1e1e1e`},Q2=`__shiki_resolved`;function $2(e){if(e?.[Q2])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?X2.light:X2.dark,n||=t.type===`light`?Z2.light:Z2.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Q2,{enumerable:!1,writable:!1,value:!0}),t}async function e4(e){return Array.from(new Set((await Promise.all(e.filter(e=>!K2(e)).map(async e=>await W2(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function t4(e){return(await Promise.all(e.map(async e=>J2(e)?null:$2(await W2(e))))).filter(e=>!!e)}function n4(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new V2(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Hde=class extends Gh{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=$2(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=zm.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=n4(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new V2(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},Ude=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},r4=0;function Wde(e){r4+=1,e.warnings!==!1&&r4>=10&&r4%10==0&&console.warn(`[Shiki] ${r4} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new V2("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map($2),i=new Hde(new Ude(e.engine,n),r,n,e.langAlias),a;function o(t){return n4(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new V2(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new V2(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await e4(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await t4(e))}function g(){if(t)throw new V2(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--r4)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function Gde(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([t4(e.themes||[]),e4(e.langs||[]),e.engine]);return Wde({...e,themes:t,langs:n,engine:r})}var i4=new WeakMap;function a4(e,t){i4.set(e,t)}function o4(e){return i4.get(e)}var s4=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Vde(n).map(e=>[e,Kh])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return Kde(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Kde(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function qde(e,t){if(!(e instanceof s4))throw new V2(`Invalid grammar state`);return e.getInternalStack(t)}function c4(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(G2(e.resolveLangAlias(n.lang||`text`))||q2(r))return Y2(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new V2(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new V2(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Yde(t,o,i,a,n)}function Jde(...e){if(e.length===2)return o4(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(G2(i)||q2(a))throw new V2(`Plain language does not have grammar state`);if(i===`ansi`)throw new V2(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new s4(l4(n,c,o,s,r).stateStack,c.name,o.name)}function Yde(e,t,n,r,i){let a=l4(e,t,n,r,i),o=new s4(a.stateStack,t.name,n.name);return a4(a.tokens,o),a.tokens}function l4(e,t,n,r,i){let a=H2(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=Y2(e),l=i.grammarState?qde(i.grammarState,n.name)??Kh:i.grammarContextCode==null?Kh:l4(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=U2(r[Qm.getForeground(s)],a),l=Qm.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?Xde(t.scopes):Zde(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function Xde(e){return e.map(e=>({scopeName:e}))}function Zde(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:$de(e,i,t.slice(0,r))}}return n}function u4(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function Qde(e,t,n){if(!u4(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)u4(e[r],n[i])&&--r,--i;return r===-1}function $de(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(Qde(e,t,n)){r.push(a);break}return r}function d4(e,t,n,r=c4){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:o4(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=efe(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new s4(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&a4(s,c),s}function efe(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function f4(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function tfe(e){let t=Y2(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}function nfe(e,t,n){let r=new Set;for(let t of e.matchAll(/:?lang=["']([^"']+)["']/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/(?:```|~~~)([\w-]+)/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/\\begin\{([\w-]+)\}/g)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(!n)return Array.from(r);let i=n.getBundledLanguages();return Array.from(r).filter(e=>e&&i[e])}var p4=`light-dark()`,rfe=[`color`,`background-color`];function ife(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function afe(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?ife(e,t):e})):e}function ofe(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>m4(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&rfe.includes(a))if(r===p4&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new V2('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function m4(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&Km.Italic&&(t[`font-style`]=`italic`),e.fontStyle&Km.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&Km.Underline&&n.push(`underline`),e.fontStyle&Km.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function h4(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function sfe(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=tfe(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new V2(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}else{let t=n.lines[e.line];if(t===void 0)throw new V2(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new V2(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));cfe(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return afe(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new V2(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=g4(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new V2(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new V2(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&f4(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function cfe(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new V2(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new V2(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function g4(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(g4).join(``):``}var lfe=[sfe()];function _4(e){let t=ufe(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...lfe]}function ufe(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var v4=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],y4={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function dfe(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function b4(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function ffe(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)y4[r]&&t.push({type:`setDecoration`,value:y4[r]});else if(r<=29){let e=y4[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:v4[r-30]}});else if(r===38){let n=b4(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:v4[r-40]}});else if(r===48){let n=b4(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:v4[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:v4[r-100+8]}})}return t}function pfe(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=dfe(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=ffe(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var mfe={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function hfe(e=mfe){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<v4.length;e++)r.push(t(v4[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var gfe={black:`#000000`,red:`#cd3131`,green:`#0DBC79`,yellow:`#E5E510`,blue:`#2472C8`,magenta:`#BC3FBC`,cyan:`#11A8CD`,white:`#E5E5E5`,brightBlack:`#666666`,brightRed:`#F14C4C`,brightGreen:`#23D18B`,brightYellow:`#F5F543`,brightBlue:`#3B8EEA`,brightMagenta:`#D670D6`,brightCyan:`#29B8DB`,brightWhite:`#FFFFFF`};function _fe(e,t,n){let r=H2(e,n),i=Y2(t),a=hfe(Object.fromEntries(v4.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||gfe[t]]}))),o=pfe();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=U2(i,r),o=U2(o,r),n.decorations.has(`dim`)&&(i=vfe(i));let s=Km.None;return n.decorations.has(`bold`)&&(s|=Km.Bold),n.decorations.has(`italic`)&&(s|=Km.Italic),n.decorations.has(`underline`)&&(s|=Km.Underline),n.decorations.has(`strikethrough`)&&(s|=Km.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function vfe(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function x4(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!G2(r)&&!q2(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return _fe(r,t,n)}return c4(e,t,n)}function S4(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:+(t.color===l));if(f.length===0)throw new V2("`themes` option must not be empty");let p=d4(e,t,n,x4);if(c=o4(p),l&&p4!==l&&!f.find(e=>e.color===l))throw new V2(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>ofe(e,h,u,l,d))),c&&a4(a,c);let g=f.map(e=>H2(e.theme,n));i=C4(f,m,g,u,l,`fg`,d),r=C4(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=H2(n.theme,n);a=x4(e,t,n);let l=e.getTheme(n.theme);r=U2(l.bg,s),i=U2(l.fg,s),o=l.name,c=o4(a)}else throw new V2("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function C4(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=U2(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===p4&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new V2('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${U2(t[r][a],n[r])||`inherit`}, ${U2(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function w4(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>w4(e,t,n),codeToTokens:(t,n)=>S4(e,t,n)}){let i=t;for(let e of _4(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=S4(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=bfe(a):d===`never`&&(a=xfe(a)),f&&(a=Sfe(a));let p={...r,get source(){return i}};for(let e of _4(n))a=e.tokens?.call(p,a)||a;return yfe(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function yfe(e,t,n,r=o4(e)){let i=_4(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:f4,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
337
+ `}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=h4(a.htmlStyle||m4(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&a4(m,r),m}function bfe(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&Km.Underline||i.fontStyle&Km.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function xfe(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function Sfe(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=h4(e.htmlStyle||m4(e)),i=h4(n.htmlStyle||m4(n)),a=e.fontStyle&&(e.fontStyle&Km.Underline||e.fontStyle&Km.Strikethrough),o=n.fontStyle&&(n.fontStyle&Km.Underline||n.fontStyle&Km.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Cfe=V_;function wfe(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>w4(e,t,n),codeToTokens:(t,n)=>S4(e,t,n)},i=Cfe(w4(e,t,n,r));for(let e of _4(n))i=e.postprocess?.call(r,i,n)||i;return i}async function Tfe(e){let t=await Gde(e);return{getLastGrammarState:(...e)=>Jde(t,...e),codeToTokensBase:(e,n)=>x4(t,e,n),codeToTokensWithThemes:(e,n)=>d4(t,e,n),codeToTokens:(e,n)=>S4(t,e,n),codeToHast:(e,n)=>w4(t,e,n),codeToHtml:(e,n)=>wfe(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function Efe(e){let t=e.langs,n=e.themes,r=e.engine;async function i(e){function i(n){if(typeof n==`string`){if(n=e.langAlias?.[n]||n,K2(n))return[];let r=t[n];if(!r)throw new V2(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function a(e){if(J2(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new V2(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>a(e)),s=(e.langs??[]).map(e=>i(e)),c=await Tfe({engine:e.engine??r(),...e,themes:o,langs:s});return{...c,loadLanguage(...e){return c.loadLanguage(...e.map(i))},loadTheme(...e){return c.loadTheme(...e.map(a))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function Dfe(e){let t;async function n(n={}){if(t){let e=await t;return await Promise.all([e.loadTheme(...n.themes||[]),e.loadLanguage(...n.langs||[])]),e}else{t=e({...n,themes:[],langs:[]});let r=await t;return await Promise.all([r.loadTheme(...n.themes||[]),r.loadLanguage(...n.langs||[])]),r}}return n}function Ofe(e,t){let n=Dfe(e);async function r(e,r){let i=await n({langs:[r.lang],themes:`theme`in r?[r.theme]:Object.values(r.themes)}),a=await t?.guessEmbeddedLanguages?.(e,r.lang,i);return a&&await i.loadLanguage(...a),i}return{getSingletonHighlighter(e){return n(e)},async codeToHtml(e,t){return(await r(e,t)).codeToHtml(e,t)},async codeToHast(e,t){return(await r(e,t)).codeToHast(e,t)},async codeToTokens(e,t){return(await r(e,t)).codeToTokens(e,t)},async codeToTokensBase(e,t){return(await r(e,t)).codeToTokensBase(e,t)},async codeToTokensWithThemes(e,t){return(await r(e,t)).codeToTokensWithThemes(e,t)},async getLastGrammarState(e,t){return(await n({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}}var T4=Efe({langs:bde,themes:xde,engine:()=>(0,B2.createOnigurumaEngine)(a(()=>import(`./wasm-Bnwmaszn.js`),[]))}),{codeToHtml:kfe,codeToHast:Afe,codeToTokens:jfe,codeToTokensBase:Mfe,codeToTokensWithThemes:Nfe,getSingletonHighlighter:Pfe,getLastGrammarState:Ffe}=Ofe(T4,{guessEmbeddedLanguages:nfe}),Ife=e=>e&&e&1,Lfe=e=>e&&e&2,Rfe=e=>e&&e&4,zfe=e=>e.map((e,t)=>({key:`line-${t}`,tokens:e.map((e,n)=>({key:`line-${t}-${n}`,token:e}))})),Bfe=({token:e})=>(0,z.jsx)(`span`,{className:`dark:!bg-[var(--shiki-dark-bg)] dark:!text-[var(--shiki-dark)]`,style:{backgroundColor:e.bgColor,color:e.color,fontStyle:Ife(e.fontStyle)?`italic`:void 0,fontWeight:Lfe(e.fontStyle)?`bold`:void 0,textDecoration:Rfe(e.fontStyle)?`underline`:void 0,...e.htmlStyle},children:e.content}),Vfe=gi(`block`,`before:content-[counter(line)]`,`before:inline-block`,`before:[counter-increment:line]`,`before:w-8`,`before:mr-4`,`before:text-right`,`before:text-muted-foreground/50`,`before:font-mono`,`before:select-none`),Hfe=({keyedLine:e,showLineNumbers:t})=>(0,z.jsx)(`span`,{className:t?Vfe:`block`,children:e.tokens.length===0?`
338
+ `:e.tokens.map(({token:e,key:t})=>(0,z.jsx)(Bfe,{token:e},t))}),Ufe=(0,L.createContext)({code:``}),E4=new Map,D4=new Map,O4=new Map,Wfe=(e,t)=>{let n=e.slice(0,100),r=e.length>100?e.slice(-100):``;return`${t}:${e.length}:${n}:${r}`},Gfe=e=>{let t=E4.get(e);if(t)return t;let n=T4({langs:[e],themes:[`github-light`,`github-dark`]});return E4.set(e,n),n},Kfe=e=>({bg:`transparent`,fg:`inherit`,tokens:e.split(`
339
+ `).map(e=>e===``?[]:[{color:`inherit`,content:e}])}),k4=(e,t,n)=>{let r=Wfe(e,t);return D4.get(r)||(n&&(O4.has(r)||O4.set(r,new Set),O4.get(r)?.add(n)),Gfe(t).then(n=>{let i=n.getLoadedLanguages().includes(t)?t:`text`,a=n.codeToTokens(e,{lang:i,themes:{dark:`github-dark`,light:`github-light`}}),o={bg:a.bg??`transparent`,fg:a.fg??`inherit`,tokens:a.tokens};D4.set(r,o);let s=O4.get(r);if(s){for(let e of s)e(o);O4.delete(r)}}).catch(e=>{console.error(`Failed to highlight code:`,e),O4.delete(r)}),null)},A4=(0,L.memo)(({tokenized:e,showLineNumbers:t,className:n})=>{let r=(0,L.useMemo)(()=>({backgroundColor:e.bg,color:e.fg}),[e.bg,e.fg]),i=(0,L.useMemo)(()=>zfe(e.tokens),[e.tokens]);return(0,z.jsx)(`pre`,{className:gi(`dark:!bg-[var(--shiki-dark-bg)] dark:!text-[var(--shiki-dark)] m-0 p-4 text-sm`,n),style:r,children:(0,z.jsx)(`code`,{className:gi(`font-mono text-sm`,t&&`[counter-increment:line_0] [counter-reset:line]`),children:i.map(e=>(0,z.jsx)(Hfe,{keyedLine:e,showLineNumbers:t},e.key))})})},(e,t)=>e.tokenized===t.tokenized&&e.showLineNumbers===t.showLineNumbers&&e.className===t.className);A4.displayName=`CodeBlockBody`;var qfe=({className:e,language:t,style:n,...r})=>(0,z.jsx)(`div`,{className:gi(`group relative w-full overflow-hidden rounded-md border bg-background text-foreground`,e),"data-language":t,style:{containIntrinsicSize:`auto 200px`,contentVisibility:`auto`,...n},...r}),Jfe=({code:e,language:t,showLineNumbers:n=!1})=>{let r=(0,L.useMemo)(()=>Kfe(e),[e]),i=(0,L.useMemo)(()=>k4(e,t)??r,[e,t,r]),[a,o]=(0,L.useState)(null),s=(0,L.useRef)({code:e,language:t});return(s.current.code!==e||s.current.language!==t)&&(s.current={code:e,language:t},o(null)),(0,L.useEffect)(()=>{let n=!1;return k4(e,t,e=>{n||o(e)}),()=>{n=!0}},[e,t]),(0,z.jsx)(`div`,{className:`relative overflow-auto`,children:(0,z.jsx)(A4,{showLineNumbers:n,tokenized:a??i})})},j4=({code:e,language:t,showLineNumbers:n=!1,className:r,children:i,...a})=>{let o=(0,L.useMemo)(()=>({code:e}),[e]);return(0,z.jsx)(Ufe.Provider,{value:o,children:(0,z.jsxs)(qfe,{className:r,language:t,...a,children:[i,(0,z.jsx)(Jfe,{code:e,language:t,showLineNumbers:n})]})})},Yfe=({className:e,...t})=>(0,z.jsx)(Sq,{className:gi(`group not-prose mb-4 w-full rounded-md border`,e),...t}),Xfe={"approval-requested":`Awaiting Approval`,"approval-responded":`Responded`,"input-available":`Running`,"input-streaming":`Pending`,"output-available":`Completed`,"output-denied":`Denied`,"output-error":`Error`},Zfe={"approval-requested":(0,z.jsx)(Cd,{className:`size-4 text-yellow-600`}),"approval-responded":(0,z.jsx)(yd,{className:`size-4 text-blue-600`}),"input-available":(0,z.jsx)(Cd,{className:`size-4 animate-pulse`}),"input-streaming":(0,z.jsx)(xd,{className:`size-4`}),"output-available":(0,z.jsx)(yd,{className:`size-4 text-green-600`}),"output-denied":(0,z.jsx)(bd,{className:`size-4 text-orange-600`}),"output-error":(0,z.jsx)(bd,{className:`size-4 text-red-600`})},Qfe=e=>(0,z.jsxs)(fde,{className:`gap-1.5 rounded-full text-xs`,variant:`secondary`,children:[Zfe[e],Xfe[e]]}),M4=({className:e,title:t,type:n,state:r,toolName:i,...a})=>{let o=n===`dynamic-tool`?i:n.split(`-`).slice(1).join(`-`);return(0,z.jsxs)(Cq,{className:gi(`flex w-full items-center justify-between gap-4 p-3`,e),...a,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(Kd,{className:`size-4 text-muted-foreground`}),(0,z.jsx)(`span`,{className:`font-medium text-sm`,children:t??o}),Qfe(r)]}),(0,z.jsx)(vd,{className:`size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180`})]})},$fe=({className:e,...t})=>(0,z.jsx)(wq,{className:gi(`data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 space-y-4 p-4 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in`,e),...t}),epe=({className:e,input:t,...n})=>(0,z.jsxs)(`div`,{className:gi(`space-y-2 overflow-hidden`,e),...n,children:[(0,z.jsx)(`h4`,{className:`font-medium text-muted-foreground text-xs uppercase tracking-wide`,children:`Parameters`}),(0,z.jsx)(`div`,{className:`rounded-md bg-muted/50`,children:(0,z.jsx)(j4,{code:JSON.stringify(t,null,2),language:`json`})})]}),tpe=({className:e,output:t,errorText:n,...r})=>{if(!(t||n))return null;let i=(0,z.jsx)(`div`,{children:t});return typeof t==`object`&&!(0,L.isValidElement)(t)?i=(0,z.jsx)(j4,{code:JSON.stringify(t,null,2),language:`json`}):typeof t==`string`&&(i=(0,z.jsx)(j4,{code:t,language:`json`})),(0,z.jsxs)(`div`,{className:gi(`space-y-2`,e),...r,children:[(0,z.jsx)(`h4`,{className:`font-medium text-muted-foreground text-xs uppercase tracking-wide`,children:n?`Error`:`Result`}),(0,z.jsxs)(`div`,{className:gi(`overflow-x-auto rounded-md text-xs [&_table]:w-full`,n?`bg-destructive/10 text-destructive`:`bg-muted/50 text-foreground`),children:[n&&(0,z.jsx)(`div`,{children:n}),i]})]})};function npe(e,t){switch(t.type){case`text-start`:return e.push({type:`text`,text:``,state:`streaming`}),!0;case`text-delta`:{let n=N4(e,`text`);return n&&n.type===`text`?n.text+=t.delta??``:e.push({type:`text`,text:t.delta??``,state:`streaming`}),!0}case`text-end`:{let t=N4(e,`text`);return t&&`state`in t&&(t.state=`done`),!0}case`reasoning-start`:return e.push({type:`reasoning`,text:``,state:`streaming`}),!0;case`reasoning-delta`:{let n=N4(e,`reasoning`);return n&&n.type===`reasoning`?(n.text+=t.delta??``,F4(n,t.providerMetadata)):e.push({type:`reasoning`,text:t.delta??``,state:`streaming`,...t.providerMetadata==null?{}:{providerMetadata:t.providerMetadata}}),!0}case`reasoning-end`:{let n=N4(e,`reasoning`);return n&&`state`in n&&(n.state=`done`,F4(n,t.providerMetadata)),!0}case`file`:return e.push({type:`file`,mediaType:t.mediaType,url:t.url}),!0;case`source-url`:return e.push({type:`source-url`,sourceId:t.sourceId,url:t.url,title:t.title,providerMetadata:t.providerMetadata}),!0;case`source-document`:return e.push({type:`source-document`,sourceId:t.sourceId,mediaType:t.mediaType,title:t.title,filename:t.filename,providerMetadata:t.providerMetadata}),!0;case`tool-input-start`:return P4(e,t.toolCallId)||e.push({type:`tool-${t.toolName}`,toolCallId:t.toolCallId,toolName:t.toolName,state:`input-streaming`,input:void 0,...t.providerExecuted==null?{}:{providerExecuted:t.providerExecuted},...t.providerMetadata==null?{}:{callProviderMetadata:t.providerMetadata},...t.title==null?{}:{title:t.title}}),!0;case`tool-input-delta`:{let n=P4(e,t.toolCallId);return n&&n.state===`input-streaming`&&(n.input=t.input),!0}case`tool-input-available`:{let n=P4(e,t.toolCallId);if(n){let e=n;return e.state===`input-streaming`&&(e.state=`input-available`,e.input=t.input,t.providerExecuted!=null&&(e.providerExecuted=t.providerExecuted),t.providerMetadata!=null&&(e.callProviderMetadata=t.providerMetadata),t.title!=null&&(e.title=t.title)),!0}return e.push({type:`tool-${t.toolName}`,toolCallId:t.toolCallId,toolName:t.toolName,state:`input-available`,input:t.input,...t.providerExecuted==null?{}:{providerExecuted:t.providerExecuted},...t.providerMetadata==null?{}:{callProviderMetadata:t.providerMetadata},...t.title==null?{}:{title:t.title}}),!0}case`tool-input-error`:{let n=P4(e,t.toolCallId);if(n){let e=n;if(e.state===`output-available`||e.state===`output-error`||e.state===`output-denied`)return!0;e.state=`output-error`,e.errorText=t.errorText,e.input=t.input,t.providerExecuted!=null&&(e.providerExecuted=t.providerExecuted),t.providerMetadata!=null&&(e.callProviderMetadata=t.providerMetadata)}else e.push({type:`tool-${t.toolName}`,toolCallId:t.toolCallId,toolName:t.toolName,state:`output-error`,input:t.input,errorText:t.errorText,...t.providerExecuted==null?{}:{providerExecuted:t.providerExecuted},...t.providerMetadata==null?{}:{callProviderMetadata:t.providerMetadata}});return!0}case`tool-approval-request`:{let n=P4(e,t.toolCallId);if(n){let e=n;e.state=`approval-requested`,e.approval={id:t.approvalId}}return!0}case`tool-output-denied`:{let n=P4(e,t.toolCallId);if(n){let e=n;e.state=`output-denied`}return!0}case`tool-output-available`:{let n=P4(e,t.toolCallId);if(n){let e=n;e.state=`output-available`,e.output=t.output,t.preliminary!==void 0&&(e.preliminary=t.preliminary)}return!0}case`tool-output-error`:{let n=P4(e,t.toolCallId);if(n){let e=n;e.state=`output-error`,e.errorText=t.errorText}return!0}case`step-start`:case`start-step`:return e.push({type:`step-start`}),!0;default:if(t.type.startsWith(`data-`)){if(t.transient)return!0;if(t.id!=null){let n=rpe(e,t.type,t.id);if(n)return n.data=t.data,!0}return e.push({type:t.type,...t.id!=null&&{id:t.id},data:t.data}),!0}return!1}}function N4(e,t){for(let n=e.length-1;n>=0;n--)if(e[n].type===t)return e[n]}function P4(e,t){if(t)for(let n=e.length-1;n>=0;n--){let r=e[n];if(`toolCallId`in r&&r.toolCallId===t)return r}}function F4(e,t){if(t==null)return;let n=e;n.providerMetadata={...n.providerMetadata,...t}}function rpe(e,t,n){for(let r=e.length-1;r>=0;r--){let i=e[r];if(i.type===t&&`id`in i&&i.id===n)return i}}var I4=`vercel.ai.error`,ipe=Symbol.for(I4),L4,R4,z4=class e extends (R4=Error,L4=ipe,R4){constructor({name:e,message:t,cause:n}){super(t),this[L4]=!0,this.name=e,this.cause=n}static isInstance(t){return e.hasMarker(t,I4)}static hasMarker(e,t){let n=Symbol.for(t);return typeof e==`object`&&!!e&&n in e&&typeof e[n]==`boolean`&&e[n]===!0}};function B4(e){return e==null?`unknown error`:typeof e==`string`?e:e instanceof Error?e.message:JSON.stringify(e)}var V4=`AI_InvalidArgumentError`,H4=`vercel.ai.error.${V4}`,ape=Symbol.for(H4),U4,W4,ope=class extends (W4=z4,U4=ape,W4){constructor({message:e,cause:t,argument:n}){super({name:V4,message:e,cause:t}),this[U4]=!0,this.argument=n}static isInstance(e){return z4.hasMarker(e,H4)}},G4=`AI_JSONParseError`,K4=`vercel.ai.error.${G4}`,spe=Symbol.for(K4),q4,J4,Y4=class extends (J4=z4,q4=spe,J4){constructor({text:e,cause:t}){super({name:G4,message:`JSON parsing failed: Text: ${e}.
340
+ Error message: ${B4(t)}`,cause:t}),this[q4]=!0,this.text=e}static isInstance(e){return z4.hasMarker(e,K4)}},X4=`AI_TypeValidationError`,Z4=`vercel.ai.error.${X4}`,cpe=Symbol.for(Z4),Q4,$4,e3=class e extends ($4=z4,Q4=cpe,$4){constructor({value:e,cause:t,context:n}){let r=`Type validation failed`;if(n?.field&&(r+=` for ${n.field}`),n?.entityName||n?.entityId){r+=` (`;let e=[];n.entityName&&e.push(n.entityName),n.entityId&&e.push(`id: "${n.entityId}"`),r+=e.join(`, `),r+=`)`}super({name:X4,message:`${r}: Value: ${JSON.stringify(e)}.
341
+ Error message: ${B4(t)}`,cause:t}),this[Q4]=!0,this.value=e,this.context=n}static isInstance(e){return z4.hasMarker(e,Z4)}static wrap({value:t,cause:n,context:r}){return e.isInstance(n)&&n.value===t&&n.context?.field===r?.field&&n.context?.entityName===r?.entityName&&n.context?.entityId===r?.entityId?n:new e({value:t,cause:n,context:r})}},t3;function X(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var n3=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},r3=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(t3=globalThis).__zod_globalConfig??(t3.__zod_globalConfig={});var i3=globalThis.__zod_globalConfig;function a3(e){return e&&Object.assign(i3,e),i3}function o3(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function s3(e,t){return typeof t==`bigint`?t.toString():t}function c3(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function l3(e){return e==null}function u3(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function lpe(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var d3=Symbol(`evaluating`);function f3(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==d3)return r===void 0&&(r=d3,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function p3(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function m3(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function h3(e){return JSON.stringify(e)}function upe(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var g3=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function _3(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var dpe=c3(()=>{if(i3.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function v3(e){if(_3(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(_3(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function y3(e){return v3(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var fpe=new Set([`string`,`number`,`symbol`]);function b3(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function x3(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function S3(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ppe(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var mpe={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function hpe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return x3(e,m3(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return p3(this,`shape`,e),e},checks:[]}))}function gpe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return x3(e,m3(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return p3(this,`shape`,r),r},checks:[]}))}function _pe(e,t){if(!v3(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return x3(e,m3(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return p3(this,`shape`,n),n}}))}function vpe(e,t){if(!v3(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return x3(e,m3(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return p3(this,`shape`,n),n}}))}function ype(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return x3(e,m3(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return p3(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function bpe(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return x3(t,m3(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return p3(this,`shape`,i),i},checks:[]}))}function xpe(e,t,n){return x3(t,m3(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return p3(this,`shape`,i),i}}))}function C3(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Spe(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function w3(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function T3(e){return typeof e==`string`?e:e?.message}function E3(e,t,n){let r=e.message?e.message:T3(e.inst?._zod.def?.error?.(e))??T3(t?.error?.(e))??T3(n.customError?.(e))??T3(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function D3(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function O3(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var k3=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,s3,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},A3=X(`$ZodError`,k3),j3=X(`$ZodError`,k3,{Parent:Error});function Cpe(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function wpe(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}var M3=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new n3;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>E3(e,a,a3())));throw g3(t,i?.callee),t}return o.value},N3=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>E3(e,a,a3())));throw g3(t,i?.callee),t}return o.value},P3=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new n3;return a.issues.length?{success:!1,error:new(e??A3)(a.issues.map(e=>E3(e,i,a3())))}:{success:!0,data:a.value}},Tpe=P3(j3),F3=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>E3(e,i,a3())))}:{success:!0,data:a.value}},Epe=F3(j3),Dpe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return M3(e)(t,n,i)},Ope=e=>(t,n,r)=>M3(e)(t,n,r),kpe=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return N3(e)(t,n,i)},Ape=e=>async(t,n,r)=>N3(e)(t,n,r),jpe=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return P3(e)(t,n,i)},Mpe=e=>(t,n,r)=>P3(e)(t,n,r),Npe=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return F3(e)(t,n,i)},Ppe=e=>async(t,n,r)=>F3(e)(t,n,r),Fpe=/^[cC][0-9a-z]{6,}$/,Ipe=/^[0-9a-z]+$/,Lpe=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Rpe=/^[0-9a-vA-V]{20}$/,zpe=/^[A-Za-z0-9]{27}$/,Bpe=/^[a-zA-Z0-9_-]{21}$/,Vpe=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hpe=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,I3=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Upe=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Wpe=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Gpe(){return new RegExp(Wpe,`u`)}var Kpe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qpe=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Jpe=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Ype=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Xpe=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,L3=/^[A-Za-z0-9_-]*$/,Zpe=/^https?$/,Qpe=/^\+[1-9]\d{6,14}$/,R3=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,$pe=RegExp(`^${R3}$`);function z3(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function eme(e){return RegExp(`^${z3(e)}$`)}function tme(e){let t=z3({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${R3}T(?:${r})$`)}var nme=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},rme=/^-?\d+$/,B3=/^-?\d+(?:\.\d+)?$/,ime=/^(?:true|false)$/i,ame=/^null$/i,ome=/^[^A-Z]*$/,sme=/^[^a-z]*$/,V3=X(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),H3={number:`number`,bigint:`bigint`,object:`date`},U3=X(`$ZodCheckLessThan`,(e,t)=>{V3.init(e,t);let n=H3[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),W3=X(`$ZodCheckGreaterThan`,(e,t)=>{V3.init(e,t);let n=H3[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),cme=X(`$ZodCheckMultipleOf`,(e,t)=>{V3.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):lpe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),lme=X(`$ZodCheckNumberFormat`,(e,t)=>{V3.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=mpe[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=rme)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),ume=X(`$ZodCheckMaxLength`,(e,t)=>{var n;V3.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l3(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=D3(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),dme=X(`$ZodCheckMinLength`,(e,t)=>{var n;V3.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l3(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=D3(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),fme=X(`$ZodCheckLengthEquals`,(e,t)=>{var n;V3.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!l3(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=D3(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),G3=X(`$ZodCheckStringFormat`,(e,t)=>{var n,r;V3.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),pme=X(`$ZodCheckRegex`,(e,t)=>{G3.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),mme=X(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=ome,G3.init(e,t)}),hme=X(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=sme,G3.init(e,t)}),gme=X(`$ZodCheckIncludes`,(e,t)=>{V3.init(e,t);let n=b3(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),_me=X(`$ZodCheckStartsWith`,(e,t)=>{V3.init(e,t);let n=RegExp(`^${b3(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),vme=X(`$ZodCheckEndsWith`,(e,t)=>{V3.init(e,t);let n=RegExp(`.*${b3(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),yme=X(`$ZodCheckOverwrite`,(e,t)=>{V3.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),bme=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
342
+ `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
343
+ `))}},xme={major:4,minor:4,patch:3},K3=X(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=xme;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=C3(e),i;for(let a of t){if(a._zod.def.when){if(Spe(e)||!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new n3;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=C3(e,t))});else{if(e.issues.length===t)continue;r||=C3(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(C3(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new n3;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new n3;return o.then(e=>t(e,r,a))}return t(o,r,a)}}f3(e,`~standard`,()=>({validate:t=>{try{let n=Tpe(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Epe(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),q3=X(`$ZodString`,(e,t)=>{K3.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??nme(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),J3=X(`$ZodStringFormat`,(e,t)=>{G3.init(e,t),q3.init(e,t)}),Sme=X(`$ZodGUID`,(e,t)=>{t.pattern??=Hpe,J3.init(e,t)}),Cme=X(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=I3(e)}else t.pattern??=I3();J3.init(e,t)}),wme=X(`$ZodEmail`,(e,t)=>{t.pattern??=Upe,J3.init(e,t)}),Tme=X(`$ZodURL`,(e,t)=>{J3.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===Zpe.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Eme=X(`$ZodEmoji`,(e,t)=>{t.pattern??=Gpe(),J3.init(e,t)}),Dme=X(`$ZodNanoID`,(e,t)=>{t.pattern??=Bpe,J3.init(e,t)}),Ome=X(`$ZodCUID`,(e,t)=>{t.pattern??=Fpe,J3.init(e,t)}),kme=X(`$ZodCUID2`,(e,t)=>{t.pattern??=Ipe,J3.init(e,t)}),Ame=X(`$ZodULID`,(e,t)=>{t.pattern??=Lpe,J3.init(e,t)}),jme=X(`$ZodXID`,(e,t)=>{t.pattern??=Rpe,J3.init(e,t)}),Mme=X(`$ZodKSUID`,(e,t)=>{t.pattern??=zpe,J3.init(e,t)}),Nme=X(`$ZodISODateTime`,(e,t)=>{t.pattern??=tme(t),J3.init(e,t)}),Pme=X(`$ZodISODate`,(e,t)=>{t.pattern??=$pe,J3.init(e,t)}),Fme=X(`$ZodISOTime`,(e,t)=>{t.pattern??=eme(t),J3.init(e,t)}),Ime=X(`$ZodISODuration`,(e,t)=>{t.pattern??=Vpe,J3.init(e,t)}),Lme=X(`$ZodIPv4`,(e,t)=>{t.pattern??=Kpe,J3.init(e,t),e._zod.bag.format=`ipv4`}),Rme=X(`$ZodIPv6`,(e,t)=>{t.pattern??=qpe,J3.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),zme=X(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Jpe,J3.init(e,t)}),Bme=X(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Ype,J3.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function Y3(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Vme=X(`$ZodBase64`,(e,t)=>{t.pattern??=Xpe,J3.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Y3(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function Hme(e){if(!L3.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Y3(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Ume=X(`$ZodBase64URL`,(e,t)=>{t.pattern??=L3,J3.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Hme(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Wme=X(`$ZodE164`,(e,t)=>{t.pattern??=Qpe,J3.init(e,t)});function Gme(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Kme=X(`$ZodJWT`,(e,t)=>{J3.init(e,t),e._zod.check=n=>{Gme(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),X3=X(`$ZodNumber`,(e,t)=>{K3.init(e,t),e._zod.pattern=e._zod.bag.pattern??B3,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),qme=X(`$ZodNumberFormat`,(e,t)=>{lme.init(e,t),X3.init(e,t)}),Jme=X(`$ZodBoolean`,(e,t)=>{K3.init(e,t),e._zod.pattern=ime,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Yme=X(`$ZodNull`,(e,t)=>{K3.init(e,t),e._zod.pattern=ame,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Xme=X(`$ZodUnknown`,(e,t)=>{K3.init(e,t),e._zod.parse=e=>e}),Zme=X(`$ZodNever`,(e,t)=>{K3.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Z3(e,t,n){e.issues.length&&t.issues.push(...w3(n,e.issues)),t.value[n]=e.value}var Qme=X(`$ZodArray`,(e,t)=>{K3.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Z3(t,n,e))):Z3(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Q3(e,t,n,r,i,a){let o=n in r;if(e.issues.length){if(i&&a&&!o)return;t.issues.push(...w3(n,e.issues))}if(!o&&!i){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}function $3(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=ppe(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function e6(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin===`optional`,d=c.optout===`optional`;for(let i in t){if(i===`__proto__`||s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Q3(e,n,i,t,u,d))):Q3(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var $me=X(`$ZodObject`,(e,t)=>{if(K3.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=c3(()=>$3(t));f3(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=_3,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optin===`optional`,i=n._zod.optout===`optional`,a=n._zod.run({value:s[e],issues:[]},o);a instanceof Promise?c.push(a.then(n=>Q3(n,t,e,s,r,i))):Q3(a,t,e,s,r,i)}return i?e6(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),ehe=X(`$ZodObjectJIT`,(e,t)=>{$me.init(e,t);let n=e._zod.parse,r=c3(()=>$3(t)),i=e=>{let t=new bme([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=h3(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=h3(r),s=e[r],c=s?._zod?.optin===`optional`,l=s?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),c&&l?t.write(`
344
+ if (${n}.issues.length) {
345
+ if (${o} in input) {
346
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
347
+ ...iss,
348
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
349
+ })));
350
+ }
351
+ }
352
+
353
+ if (${n}.value === undefined) {
354
+ if (${o} in input) {
355
+ newResult[${o}] = undefined;
356
+ }
357
+ } else {
358
+ newResult[${o}] = ${n}.value;
359
+ }
360
+
361
+ `):c?t.write(`
362
+ if (${n}.issues.length) {
363
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
364
+ ...iss,
365
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
366
+ })));
367
+ }
368
+
369
+ if (${n}.value === undefined) {
370
+ if (${o} in input) {
371
+ newResult[${o}] = undefined;
372
+ }
373
+ } else {
374
+ newResult[${o}] = ${n}.value;
375
+ }
376
+
377
+ `):t.write(`
378
+ const ${n}_present = ${o} in input;
379
+ if (${n}.issues.length) {
380
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
381
+ ...iss,
382
+ path: iss.path ? [${o}, ...iss.path] : [${o}]
383
+ })));
384
+ }
385
+ if (!${n}_present && !${n}.issues.length) {
386
+ payload.issues.push({
387
+ code: "invalid_type",
388
+ expected: "nonoptional",
389
+ input: undefined,
390
+ path: [${o}]
391
+ });
392
+ }
393
+
394
+ if (${n}_present) {
395
+ if (${n}.value === undefined) {
396
+ newResult[${o}] = undefined;
397
+ } else {
398
+ newResult[${o}] = ${n}.value;
399
+ }
400
+ }
401
+
402
+ `)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=_3,s=!i3.jitless,c=s&&dpe.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?e6([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function t6(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!C3(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>E3(e,r,a3())))}),t)}var n6=X(`$ZodUnion`,(e,t)=>{K3.init(e,t),f3(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),f3(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),f3(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),f3(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>u3(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>t6(t,r,e,i)):t6(o,r,e,i)}}),the=X(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,n6.init(e,t);let n=e._zod.parse;f3(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=c3(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!_3(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),nhe=X(`$ZodIntersection`,(e,t)=>{K3.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>i6(e,t,n)):i6(e,i,a)}});function r6(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(v3(e)&&v3(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=r6(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=r6(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function i6(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),C3(e))return e;let o=r6(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var rhe=X(`$ZodRecord`,(e,t)=>{K3.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!v3(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let c of o)if(typeof c==`string`||typeof c==`number`||typeof c==`symbol`){s.add(typeof c==`number`?c.toString():c);let o=t.keyType._zod.run({value:c,issues:[]},r);if(o instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(o.issues.length){n.issues.push({code:`invalid_key`,origin:`record`,issues:o.issues.map(e=>E3(e,r,a3())),input:c,path:[c],inst:e});continue}let l=o.value,u=t.valueType._zod.run({value:i[c],issues:[]},r);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...w3(c,e.issues)),n.value[l]=e.value})):(u.issues.length&&n.issues.push(...w3(c,u.issues)),n.value[l]=u.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`||!Object.prototype.propertyIsEnumerable.call(i,o))continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&B3.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>E3(e,r,a3())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...w3(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...w3(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),ihe=X(`$ZodEnum`,(e,t)=>{K3.init(e,t);let n=o3(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>fpe.has(typeof e)).map(e=>typeof e==`string`?b3(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),ahe=X(`$ZodLiteral`,(e,t)=>{if(K3.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?b3(e):e?b3(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),ohe=X(`$ZodTransform`,(e,t)=>{K3.init(e,t),e._zod.optin=`optional`,e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new r3(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n.fallback=!0,n));if(i instanceof Promise)throw new n3;return n.value=i,n.fallback=!0,n}});function a6(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var o6=X(`$ZodOptional`,(e,t)=>{K3.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,f3(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),f3(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${u3(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=e.value,i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(e=>a6(e,r)):a6(i,r)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),she=X(`$ZodExactOptional`,(e,t)=>{o6.init(e,t),f3(e._zod,`values`,()=>t.innerType._zod.values),f3(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),che=X(`$ZodNullable`,(e,t)=>{K3.init(e,t),f3(e._zod,`optin`,()=>t.innerType._zod.optin),f3(e._zod,`optout`,()=>t.innerType._zod.optout),f3(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${u3(e.source)}|null)$`):void 0}),f3(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),lhe=X(`$ZodDefault`,(e,t)=>{K3.init(e,t),e._zod.optin=`optional`,f3(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>s6(e,t)):s6(r,t)}});function s6(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var uhe=X(`$ZodPrefault`,(e,t)=>{K3.init(e,t),e._zod.optin=`optional`,f3(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),dhe=X(`$ZodNonOptional`,(e,t)=>{K3.init(e,t),f3(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>c6(t,e)):c6(i,e)}});function c6(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var fhe=X(`$ZodCatch`,(e,t)=>{K3.init(e,t),e._zod.optin=`optional`,f3(e._zod,`optout`,()=>t.innerType._zod.optout),f3(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>E3(e,n,a3()))},input:e.value}),e.issues=[],e.fallback=!0),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>E3(e,n,a3()))},input:e.value}),e.issues=[],e.fallback=!0),e)}}),phe=X(`$ZodPipe`,(e,t)=>{K3.init(e,t),f3(e._zod,`values`,()=>t.in._zod.values),f3(e._zod,`optin`,()=>t.in._zod.optin),f3(e._zod,`optout`,()=>t.out._zod.optout),f3(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>l6(e,t.in,n)):l6(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>l6(e,t.out,n)):l6(r,t.out,n)}});function l6(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var mhe=X(`$ZodReadonly`,(e,t)=>{K3.init(e,t),f3(e._zod,`propValues`,()=>t.innerType._zod.propValues),f3(e._zod,`values`,()=>t.innerType._zod.values),f3(e._zod,`optin`,()=>t.innerType?._zod?.optin),f3(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(u6):u6(r)}});function u6(e){return e.value=Object.freeze(e.value),e}var hhe=X(`$ZodLazy`,(e,t)=>{K3.init(e,t),f3(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),f3(e._zod,`pattern`,()=>e._zod.innerType?._zod?.pattern),f3(e._zod,`propValues`,()=>e._zod.innerType?._zod?.propValues),f3(e._zod,`optin`,()=>e._zod.innerType?._zod?.optin??void 0),f3(e._zod,`optout`,()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),ghe=X(`$ZodCustom`,(e,t)=>{V3.init(e,t),K3.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>d6(t,n,r,e));d6(i,n,r,e)}});function d6(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(O3(e))}}var f6,_he=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function vhe(){return new _he}(f6=globalThis).__zod_globalRegistry??(f6.__zod_globalRegistry=vhe());var p6=globalThis.__zod_globalRegistry;function yhe(e,t){return new e({type:`string`,...S3(t)})}function bhe(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...S3(t)})}function m6(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...S3(t)})}function xhe(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...S3(t)})}function She(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...S3(t)})}function Che(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...S3(t)})}function whe(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...S3(t)})}function The(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...S3(t)})}function Ehe(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...S3(t)})}function Dhe(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...S3(t)})}function Ohe(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...S3(t)})}function khe(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...S3(t)})}function Ahe(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...S3(t)})}function jhe(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...S3(t)})}function Mhe(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...S3(t)})}function Nhe(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...S3(t)})}function Phe(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...S3(t)})}function Fhe(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...S3(t)})}function Ihe(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...S3(t)})}function Lhe(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...S3(t)})}function Rhe(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...S3(t)})}function zhe(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...S3(t)})}function Bhe(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...S3(t)})}function Vhe(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...S3(t)})}function Hhe(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...S3(t)})}function Uhe(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...S3(t)})}function Whe(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...S3(t)})}function Ghe(e,t){return new e({type:`number`,checks:[],...S3(t)})}function Khe(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...S3(t)})}function qhe(e,t){return new e({type:`boolean`,...S3(t)})}function Jhe(e,t){return new e({type:`null`,...S3(t)})}function Yhe(e){return new e({type:`unknown`})}function Xhe(e,t){return new e({type:`never`,...S3(t)})}function h6(e,t){return new U3({check:`less_than`,...S3(t),value:e,inclusive:!1})}function g6(e,t){return new U3({check:`less_than`,...S3(t),value:e,inclusive:!0})}function _6(e,t){return new W3({check:`greater_than`,...S3(t),value:e,inclusive:!1})}function v6(e,t){return new W3({check:`greater_than`,...S3(t),value:e,inclusive:!0})}function y6(e,t){return new cme({check:`multiple_of`,...S3(t),value:e})}function b6(e,t){return new ume({check:`max_length`,...S3(t),maximum:e})}function x6(e,t){return new dme({check:`min_length`,...S3(t),minimum:e})}function S6(e,t){return new fme({check:`length_equals`,...S3(t),length:e})}function Zhe(e,t){return new pme({check:`string_format`,format:`regex`,...S3(t),pattern:e})}function Qhe(e){return new mme({check:`string_format`,format:`lowercase`,...S3(e)})}function $he(e){return new hme({check:`string_format`,format:`uppercase`,...S3(e)})}function ege(e,t){return new gme({check:`string_format`,format:`includes`,...S3(t),includes:e})}function tge(e,t){return new _me({check:`string_format`,format:`starts_with`,...S3(t),prefix:e})}function nge(e,t){return new vme({check:`string_format`,format:`ends_with`,...S3(t),suffix:e})}function C6(e){return new yme({check:`overwrite`,tx:e})}function rge(e){return C6(t=>t.normalize(e))}function ige(){return C6(e=>e.trim())}function age(){return C6(e=>e.toLowerCase())}function oge(){return C6(e=>e.toUpperCase())}function sge(){return C6(e=>upe(e))}function cge(e,t,n){return new e({type:`array`,element:t,...S3(n)})}function lge(e,t,n){let r=S3(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function uge(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...S3(n)})}function dge(e,t){let n=fge(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(O3(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=t.value,r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(O3(r))}},e(t.value,t)),t);return n}function fge(e,t){let n=new V3({check:`custom`,...S3(t)});return n._zod.check=e,n}function w6(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??p6,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function T6(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,T6(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&O6(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function E6(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
403
+
404
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function D6(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,o[e.defId]=e.def)}e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:k6(t,`input`,e.processors),output:k6(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function O6(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return O6(r.element,n);if(r.type===`set`)return O6(r.valueType,n);if(r.type===`lazy`)return O6(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return O6(r.innerType,n);if(r.type===`intersection`)return O6(r.left,n)||O6(r.right,n);if(r.type===`record`||r.type===`map`)return O6(r.keyType,n)||O6(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:O6(r.in,n)||O6(r.out,n);if(r.type===`object`){for(let e in r.shape)if(O6(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(O6(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(O6(e,n))return!0;return!!(r.rest&&O6(r.rest,n))}return!1}var pge=(e,t={})=>n=>{let r=w6({...n,processors:t});return T6(e,r),E6(r,e),D6(r,e)},k6=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=w6({...i??{},target:a,io:t,processors:n});return T6(e,o),E6(o,e),D6(o,e)},mge={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},A6=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=mge[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},j6=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(i.multipleOf=c)},M6=(e,t,n,r)=>{n.type=`boolean`},hge=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`BigInt cannot be represented in JSON Schema`)},gge=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Symbols cannot be represented in JSON Schema`)},N6=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},_ge=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Undefined cannot be represented in JSON Schema`)},vge=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Void cannot be represented in JSON Schema`)},P6=(e,t,n,r)=>{n.not={}},yge=(e,t,n,r)=>{},bge=(e,t,n,r)=>{},xge=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Date cannot be represented in JSON Schema`)},F6=(e,t,n,r)=>{let i=e._zod.def,a=o3(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},I6=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Sge=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`NaN cannot be represented in JSON Schema`)},Cge=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},wge=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},Tge=(e,t,n,r)=>{n.type=`boolean`},L6=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},Ege=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Function types cannot be represented in JSON Schema`)},R6=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},Dge=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Map cannot be represented in JSON Schema`)},Oge=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Set cannot be represented in JSON Schema`)},z6=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=T6(a.element,t,{...r,path:[...r.path,`items`]})},B6=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=T6(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=T6(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},V6=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>T6(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},H6=(e,t,n,r)=>{let i=e._zod.def,a=T6(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=T6(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},kge=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>T6(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?T6(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null;t.target===`draft-2020-12`?(i.prefixItems=c,l&&(i.items=l)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),i.minItems=c.length,l||(i.maxItems=c.length)):(i.items=c,l&&(i.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u==`number`&&(i.minItems=u),typeof d==`number`&&(i.maxItems=d)},U6=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=T6(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=T6(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=T6(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},W6=(e,t,n,r)=>{let i=e._zod.def,a=T6(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},G6=(e,t,n,r)=>{let i=e._zod.def;T6(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},K6=(e,t,n,r)=>{let i=e._zod.def;T6(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},q6=(e,t,n,r)=>{let i=e._zod.def;T6(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},J6=(e,t,n,r)=>{let i=e._zod.def;T6(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Y6=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;T6(o,t,r);let s=t.seen.get(e);s.ref=o},X6=(e,t,n,r)=>{let i=e._zod.def;T6(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Age=(e,t,n,r)=>{let i=e._zod.def;T6(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Z6=(e,t,n,r)=>{let i=e._zod.def;T6(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Q6=(e,t,n,r)=>{let i=e._zod.innerType;T6(i,t,r);let a=t.seen.get(e);a.ref=i},$6={string:A6,number:j6,boolean:M6,bigint:hge,symbol:gge,null:N6,undefined:_ge,void:vge,never:P6,any:yge,unknown:bge,date:xge,enum:F6,literal:I6,nan:Sge,template_literal:Cge,file:wge,success:Tge,custom:L6,function:Ege,transform:R6,map:Dge,set:Oge,array:z6,object:B6,union:V6,intersection:H6,tuple:kge,record:U6,nullable:W6,nonoptional:G6,default:K6,prefault:q6,catch:J6,pipe:Y6,readonly:X6,promise:Age,optional:Z6,lazy:Q6};function jge(e,t){if(`_idmap`in e){let n=e,r=w6({...t,processors:$6}),i={};for(let e of n._idmap.entries()){let[t,n]=e;T6(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;E6(r,n),a[t]=D6(r,n)}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=w6({...t,processors:$6});return T6(e,n),E6(n,e),D6(n,e)}var Mge=X(`ZodISODateTime`,(e,t)=>{Nme.init(e,t),o8.init(e,t)});function Nge(e){return Vhe(Mge,e)}var Pge=X(`ZodISODate`,(e,t)=>{Pme.init(e,t),o8.init(e,t)});function Fge(e){return Hhe(Pge,e)}var Ige=X(`ZodISOTime`,(e,t)=>{Fme.init(e,t),o8.init(e,t)});function Lge(e){return Uhe(Ige,e)}var Rge=X(`ZodISODuration`,(e,t)=>{Ime.init(e,t),o8.init(e,t)});function zge(e){return Whe(Rge,e)}var e8=X(`ZodError`,(e,t)=>{A3.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>wpe(e,t)},flatten:{value:t=>Cpe(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,s3,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,s3,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),Bge=M3(e8),Vge=N3(e8),Hge=P3(e8),t8=F3(e8),Uge=Dpe(e8),Wge=Ope(e8),Gge=kpe(e8),Kge=Ape(e8),qge=jpe(e8),Jge=Mpe(e8),Yge=Npe(e8),Xge=Ppe(e8),n8=new WeakMap;function r8(e,t,n){let r=Object.getPrototypeOf(e),i=n8.get(r);if(i||(i=new Set,n8.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var i8=X(`ZodType`,(e,t)=>(K3.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:k6(e,`input`),output:k6(e,`output`)}}),e.toJSONSchema=pge(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>Bge(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Hge(e,t,n),e.parseAsync=async(t,n)=>Vge(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>t8(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Uge(e,t,n),e.decode=(t,n)=>Wge(e,t,n),e.encodeAsync=async(t,n)=>Gge(e,t,n),e.decodeAsync=async(t,n)=>Kge(e,t,n),e.safeEncode=(t,n)=>qge(e,t,n),e.safeDecode=(t,n)=>Jge(e,t,n),e.safeEncodeAsync=async(t,n)=>Yge(e,t,n),e.safeDecodeAsync=async(t,n)=>Xge(e,t,n),r8(e,`ZodType`,{check(...e){let t=this.def;return this.clone(m3(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return x3(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(G_e(e,t))},superRefine(e,t){return this.check(K_e(e,t))},overwrite(e){return this.check(C6(e))},optional(){return E8(this)},exactOptional(){return j_e(this)},nullable(){return D8(this)},nullish(){return E8(D8(this))},nonoptional(e){return L_e(this,e)},array(){return m8(this)},or(e){return y8([this,e])},and(e){return E_e(this,e)},transform(e){return k8(this,k_e(e))},default(e){return P_e(this,e)},prefault(e){return I_e(this,e)},catch(e){return z_e(this,e)},pipe(e){return k8(this,e)},readonly(){return H_e(this)},describe(e){let t=this.clone();return p6.add(t,{description:e}),t},meta(...e){if(e.length===0)return p6.get(this);let t=this.clone();return p6.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,`description`,{get(){return p6.get(e)?.description},configurable:!0}),e)),a8=X(`_ZodString`,(e,t)=>{q3.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A6(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,r8(e,`_ZodString`,{regex(...e){return this.check(Zhe(...e))},includes(...e){return this.check(ege(...e))},startsWith(...e){return this.check(tge(...e))},endsWith(...e){return this.check(nge(...e))},min(...e){return this.check(x6(...e))},max(...e){return this.check(b6(...e))},length(...e){return this.check(S6(...e))},nonempty(...e){return this.check(x6(1,...e))},lowercase(e){return this.check(Qhe(e))},uppercase(e){return this.check($he(e))},trim(){return this.check(ige())},normalize(...e){return this.check(rge(...e))},toLowerCase(){return this.check(age())},toUpperCase(){return this.check(oge())},slugify(){return this.check(sge())}})}),Zge=X(`ZodString`,(e,t)=>{q3.init(e,t),a8.init(e,t),e.email=t=>e.check(bhe(Qge,t)),e.url=t=>e.check(The($ge,t)),e.jwt=t=>e.check(Bhe(m_e,t)),e.emoji=t=>e.check(Ehe(e_e,t)),e.guid=t=>e.check(m6(s8,t)),e.uuid=t=>e.check(xhe(c8,t)),e.uuidv4=t=>e.check(She(c8,t)),e.uuidv6=t=>e.check(Che(c8,t)),e.uuidv7=t=>e.check(whe(c8,t)),e.nanoid=t=>e.check(Dhe(t_e,t)),e.guid=t=>e.check(m6(s8,t)),e.cuid=t=>e.check(Ohe(n_e,t)),e.cuid2=t=>e.check(khe(r_e,t)),e.ulid=t=>e.check(Ahe(i_e,t)),e.base64=t=>e.check(Lhe(d_e,t)),e.base64url=t=>e.check(Rhe(f_e,t)),e.xid=t=>e.check(jhe(a_e,t)),e.ksuid=t=>e.check(Mhe(o_e,t)),e.ipv4=t=>e.check(Nhe(s_e,t)),e.ipv6=t=>e.check(Phe(c_e,t)),e.cidrv4=t=>e.check(Fhe(l_e,t)),e.cidrv6=t=>e.check(Ihe(u_e,t)),e.e164=t=>e.check(zhe(p_e,t)),e.datetime=t=>e.check(Nge(t)),e.date=t=>e.check(Fge(t)),e.time=t=>e.check(Lge(t)),e.duration=t=>e.check(zge(t))});function Z(e){return yhe(Zge,e)}var o8=X(`ZodStringFormat`,(e,t)=>{J3.init(e,t),a8.init(e,t)}),Qge=X(`ZodEmail`,(e,t)=>{wme.init(e,t),o8.init(e,t)}),s8=X(`ZodGUID`,(e,t)=>{Sme.init(e,t),o8.init(e,t)}),c8=X(`ZodUUID`,(e,t)=>{Cme.init(e,t),o8.init(e,t)}),$ge=X(`ZodURL`,(e,t)=>{Tme.init(e,t),o8.init(e,t)}),e_e=X(`ZodEmoji`,(e,t)=>{Eme.init(e,t),o8.init(e,t)}),t_e=X(`ZodNanoID`,(e,t)=>{Dme.init(e,t),o8.init(e,t)}),n_e=X(`ZodCUID`,(e,t)=>{Ome.init(e,t),o8.init(e,t)}),r_e=X(`ZodCUID2`,(e,t)=>{kme.init(e,t),o8.init(e,t)}),i_e=X(`ZodULID`,(e,t)=>{Ame.init(e,t),o8.init(e,t)}),a_e=X(`ZodXID`,(e,t)=>{jme.init(e,t),o8.init(e,t)}),o_e=X(`ZodKSUID`,(e,t)=>{Mme.init(e,t),o8.init(e,t)}),s_e=X(`ZodIPv4`,(e,t)=>{Lme.init(e,t),o8.init(e,t)}),c_e=X(`ZodIPv6`,(e,t)=>{Rme.init(e,t),o8.init(e,t)}),l_e=X(`ZodCIDRv4`,(e,t)=>{zme.init(e,t),o8.init(e,t)}),u_e=X(`ZodCIDRv6`,(e,t)=>{Bme.init(e,t),o8.init(e,t)}),d_e=X(`ZodBase64`,(e,t)=>{Vme.init(e,t),o8.init(e,t)}),f_e=X(`ZodBase64URL`,(e,t)=>{Ume.init(e,t),o8.init(e,t)}),p_e=X(`ZodE164`,(e,t)=>{Wme.init(e,t),o8.init(e,t)}),m_e=X(`ZodJWT`,(e,t)=>{Kme.init(e,t),o8.init(e,t)}),l8=X(`ZodNumber`,(e,t)=>{X3.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j6(e,t,n,r),r8(e,`ZodNumber`,{gt(e,t){return this.check(_6(e,t))},gte(e,t){return this.check(v6(e,t))},min(e,t){return this.check(v6(e,t))},lt(e,t){return this.check(h6(e,t))},lte(e,t){return this.check(g6(e,t))},max(e,t){return this.check(g6(e,t))},int(e){return this.check(u8(e))},safe(e){return this.check(u8(e))},positive(e){return this.check(_6(0,e))},nonnegative(e){return this.check(v6(0,e))},negative(e){return this.check(h6(0,e))},nonpositive(e){return this.check(g6(0,e))},multipleOf(e,t){return this.check(y6(e,t))},step(e,t){return this.check(y6(e,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function h_e(e){return Ghe(l8,e)}var g_e=X(`ZodNumberFormat`,(e,t)=>{qme.init(e,t),l8.init(e,t)});function u8(e){return Khe(g_e,e)}var __e=X(`ZodBoolean`,(e,t)=>{Jme.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M6(e,t,n,r)});function d8(e){return qhe(__e,e)}var v_e=X(`ZodNull`,(e,t)=>{Yme.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N6(e,t,n,r)});function y_e(e){return Jhe(v_e,e)}var b_e=X(`ZodUnknown`,(e,t)=>{Xme.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function f8(){return Yhe(b_e)}var x_e=X(`ZodNever`,(e,t)=>{Zme.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P6(e,t,n,r)});function p8(e){return Xhe(x_e,e)}var S_e=X(`ZodArray`,(e,t)=>{Qme.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z6(e,t,n,r),e.element=t.element,r8(e,`ZodArray`,{min(e,t){return this.check(x6(e,t))},nonempty(e){return this.check(x6(1,e))},max(e,t){return this.check(b6(e,t))},length(e,t){return this.check(S6(e,t))},unwrap(){return this.element}})});function m8(e,t){return cge(S_e,e,t)}var h8=X(`ZodObject`,(e,t)=>{ehe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B6(e,t,n,r),f3(e,`shape`,()=>t.shape),r8(e,`ZodObject`,{keyof(){return C8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:f8()})},loose(){return this.clone({...this._zod.def,catchall:f8()})},strict(){return this.clone({...this._zod.def,catchall:p8()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return _pe(this,e)},safeExtend(e){return vpe(this,e)},merge(e){return ype(this,e)},pick(e){return hpe(this,e)},omit(e){return gpe(this,e)},partial(...e){return bpe(T8,this,e[0])},required(...e){return xpe(O8,this,e[0])}})});function g8(e,t){return new h8({type:`object`,shape:e??{},...S3(t)})}function _8(e,t){return new h8({type:`object`,shape:e,catchall:p8(),...S3(t)})}var v8=X(`ZodUnion`,(e,t)=>{n6.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V6(e,t,n,r),e.options=t.options});function y8(e,t){return new v8({type:`union`,options:e,...S3(t)})}var C_e=X(`ZodDiscriminatedUnion`,(e,t)=>{v8.init(e,t),the.init(e,t)});function w_e(e,t,n){return new C_e({type:`union`,options:t,discriminator:e,...S3(n)})}var T_e=X(`ZodIntersection`,(e,t)=>{nhe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H6(e,t,n,r)});function E_e(e,t){return new T_e({type:`intersection`,left:e,right:t})}var b8=X(`ZodRecord`,(e,t)=>{rhe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U6(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function x8(e,t,n){return!t||!t._zod?new b8({type:`record`,keyType:Z(),valueType:e,...S3(t)}):new b8({type:`record`,keyType:e,valueType:t,...S3(n)})}var S8=X(`ZodEnum`,(e,t)=>{ihe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F6(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new S8({...t,checks:[],...S3(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new S8({...t,checks:[],...S3(r),entries:i})}});function C8(e,t){return new S8({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...S3(t)})}var D_e=X(`ZodLiteral`,(e,t)=>{ahe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I6(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function w8(e,t){return new D_e({type:`literal`,values:Array.isArray(e)?e:[e],...S3(t)})}var O_e=X(`ZodTransform`,(e,t)=>{ohe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R6(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new r3(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(O3(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(O3(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function k_e(e){return new O_e({type:`transform`,transform:e})}var T8=X(`ZodOptional`,(e,t)=>{o6.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function E8(e){return new T8({type:`optional`,innerType:e})}var A_e=X(`ZodExactOptional`,(e,t)=>{she.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function j_e(e){return new A_e({type:`optional`,innerType:e})}var M_e=X(`ZodNullable`,(e,t)=>{che.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function D8(e){return new M_e({type:`nullable`,innerType:e})}var N_e=X(`ZodDefault`,(e,t)=>{lhe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function P_e(e,t){return new N_e({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():y3(t)}})}var F_e=X(`ZodPrefault`,(e,t)=>{uhe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function I_e(e,t){return new F_e({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():y3(t)}})}var O8=X(`ZodNonOptional`,(e,t)=>{dhe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function L_e(e,t){return new O8({type:`nonoptional`,innerType:e,...S3(t)})}var R_e=X(`ZodCatch`,(e,t)=>{fhe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function z_e(e,t){return new R_e({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var B_e=X(`ZodPipe`,(e,t)=>{phe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y6(e,t,n,r),e.in=t.in,e.out=t.out});function k8(e,t){return new B_e({type:`pipe`,in:e,out:t})}var V_e=X(`ZodReadonly`,(e,t)=>{mhe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X6(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function H_e(e){return new V_e({type:`readonly`,innerType:e})}var U_e=X(`ZodLazy`,(e,t)=>{hhe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q6(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function W_e(e){return new U_e({type:`lazy`,getter:e})}var A8=X(`ZodCustom`,(e,t)=>{ghe.init(e,t),i8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L6(e,t,n,r)});function j8(e,t){return lge(A8,e??(()=>!0),t)}function G_e(e,t={}){return uge(A8,e,t)}function K_e(e,t){return dge(e,t)}function M8(e,t={}){let n=new A8({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...S3(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}var N8;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(N8||={});var q_e;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(q_e||={});var P8=N8.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),F8=e=>{switch(typeof e){case`undefined`:return P8.undefined;case`string`:return P8.string;case`number`:return Number.isNaN(e)?P8.nan:P8.number;case`boolean`:return P8.boolean;case`function`:return P8.function;case`bigint`:return P8.bigint;case`symbol`:return P8.symbol;case`object`:return Array.isArray(e)?P8.array:e===null?P8.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?P8.promise:typeof Map<`u`&&e instanceof Map?P8.map:typeof Set<`u`&&e instanceof Set?P8.set:typeof Date<`u`&&e instanceof Date?P8.date:P8.object;default:return P8.unknown}},Q=N8.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),I8=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N8.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t=Object.create(null),n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};I8.create=e=>new I8(e);var L8=(e,t)=>{let n;switch(e.code){case Q.invalid_type:n=e.received===P8.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case Q.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,N8.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:n=`Unrecognized key(s) in object: ${N8.joinValues(e.keys,`, `)}`;break;case Q.invalid_union:n=`Invalid input`;break;case Q.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${N8.joinValues(e.options)}`;break;case Q.invalid_enum_value:n=`Invalid enum value. Expected ${N8.joinValues(e.options)}, received '${e.received}'`;break;case Q.invalid_arguments:n=`Invalid function arguments`;break;case Q.invalid_return_type:n=`Invalid function return type`;break;case Q.invalid_date:n=`Invalid date`;break;case Q.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:N8.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case Q.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case Q.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case Q.custom:n=`Invalid input`;break;case Q.invalid_intersection_types:n=`Intersection results could not be merged`;break;case Q.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Q.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,N8.assertNever(e)}return{message:n}},J_e=L8;function R8(){return J_e}var z8=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function B8(e,t){let n=R8(),r=z8({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===L8?void 0:L8].filter(e=>!!e)});e.common.issues.push(r)}var V8=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return H8;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return H8;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},H8=Object.freeze({status:`aborted`}),U8=e=>({status:`dirty`,value:e}),W8=e=>({status:`valid`,value:e}),G8=e=>e.status===`aborted`,K8=e=>e.status===`dirty`,q8=e=>e.status===`valid`,J8=e=>typeof Promise<`u`&&e instanceof Promise,Y8;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(Y8||={});var X8=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Z8=(e,t)=>{if(q8(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new I8(e.common.issues);return this._error=t,this._error}}};function Q8(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var $8=class{get description(){return this._def.description}_getType(e){return F8(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:F8(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new V8,ctx:{common:e.parent.common,data:e.data,parsedType:F8(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(J8(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F8(e)};return Z8(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F8(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return q8(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>q8(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:F8(e)},r=this._parse({data:e,path:n.path,parent:n});return Z8(n,await(J8(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:Q.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new j5({schema:this,typeName:$.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return M5.create(this,this._def)}nullable(){return N5.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return h5.create(this)}promise(){return A5.create(this,this._def)}or(e){return v5.create([this,e],this._def)}and(e){return x5.create(this,e,this._def)}transform(e){return new j5({...Q8(this._def),schema:this,typeName:$.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new P5({...Q8(this._def),innerType:this,defaultValue:t,typeName:$.ZodDefault})}brand(){return new L5({typeName:$.ZodBranded,type:this,...Q8(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new F5({...Q8(this._def),innerType:this,catchValue:t,typeName:$.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return R5.create(this,e)}readonly(){return z5.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Y_e=/^c[^\s-]{8,}$/i,X_e=/^[0-9a-z]+$/,Z_e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Q_e=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$_e=/^[a-z0-9_-]{21}$/i,eve=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tve=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,nve=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rve=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,e5,ive=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ave=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ove=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,sve=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cve=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,lve=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,t5=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,uve=RegExp(`^${t5}$`);function n5(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function dve(e){return RegExp(`^${n5(e)}$`)}function fve(e){let t=`${t5}T${n5(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function pve(e,t){return!!((t===`v4`||!t)&&ive.test(e)||(t===`v6`||!t)&&ove.test(e))}function mve(e,t){if(!eve.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function hve(e,t){return!!((t===`v4`||!t)&&ave.test(e)||(t===`v6`||!t)&&sve.test(e))}var r5=class e extends $8{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==P8.string){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.string,received:t.parsedType}),H8}let t=new V8,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?B8(n,{code:Q.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&B8(n,{code:Q.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)nve.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`email`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)e5||=new RegExp(rve,`u`),e5.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`emoji`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)Q_e.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`uuid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)$_e.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`nanoid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)Y_e.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`cuid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)X_e.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`cuid2`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)Z_e.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`ulid`,code:Q.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),B8(n,{validation:`url`,code:Q.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`regex`,code:Q.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?fve(r).test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?uve.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?dve(r).test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?tve.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`duration`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?pve(e.data,r.version)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`ip`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?mve(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`jwt`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?hve(e.data,r.version)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`cidr`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?cve.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`base64`,code:Q.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?lve.test(e.data)||(n=this._getOrReturnCtx(e,n),B8(n,{validation:`base64url`,code:Q.invalid_string,message:r.message}),t.dirty()):N8.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:Q.invalid_string,...Y8.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...Y8.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...Y8.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...Y8.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...Y8.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...Y8.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...Y8.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...Y8.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...Y8.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...Y8.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...Y8.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...Y8.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...Y8.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...Y8.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Y8.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...Y8.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...Y8.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...Y8.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...Y8.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...Y8.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...Y8.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...Y8.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...Y8.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...Y8.errToObj(t)})}nonempty(e){return this.min(1,Y8.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};r5.create=e=>new r5({checks:[],typeName:$.ZodString,coerce:e?.coerce??!1,...Q8(e)});function gve(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var i5=class e extends $8{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==P8.number){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.number,received:t.parsedType}),H8}let t,n=new V8;for(let r of this._def.checks)r.kind===`int`?N8.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),B8(t,{code:Q.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),B8(t,{code:Q.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),B8(t,{code:Q.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?gve(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),B8(t,{code:Q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),B8(t,{code:Q.not_finite,message:r.message}),n.dirty()):N8.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,Y8.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Y8.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Y8.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Y8.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Y8.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:Y8.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Y8.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Y8.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Y8.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Y8.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Y8.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:Y8.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Y8.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Y8.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&N8.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};i5.create=e=>new i5({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...Q8(e)});var a5=class e extends $8{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==P8.bigint)return this._getInvalidInput(e);let t,n=new V8;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),B8(t,{code:Q.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),B8(t,{code:Q.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),B8(t,{code:Q.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):N8.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.bigint,received:t.parsedType}),H8}gte(e,t){return this.setLimit(`min`,e,!0,Y8.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Y8.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Y8.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Y8.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Y8.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Y8.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Y8.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Y8.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Y8.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Y8.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};a5.create=e=>new a5({checks:[],typeName:$.ZodBigInt,coerce:e?.coerce??!1,...Q8(e)});var o5=class extends $8{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==P8.boolean){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.boolean,received:t.parsedType}),H8}return W8(e.data)}};o5.create=e=>new o5({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...Q8(e)});var s5=class e extends $8{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==P8.date){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.date,received:t.parsedType}),H8}if(Number.isNaN(e.data.getTime()))return B8(this._getOrReturnCtx(e),{code:Q.invalid_date}),H8;let t=new V8,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),B8(n,{code:Q.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):N8.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Y8.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Y8.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};s5.create=e=>new s5({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...Q8(e)});var c5=class extends $8{_parse(e){if(this._getType(e)!==P8.symbol){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.symbol,received:t.parsedType}),H8}return W8(e.data)}};c5.create=e=>new c5({typeName:$.ZodSymbol,...Q8(e)});var l5=class extends $8{_parse(e){if(this._getType(e)!==P8.undefined){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.undefined,received:t.parsedType}),H8}return W8(e.data)}};l5.create=e=>new l5({typeName:$.ZodUndefined,...Q8(e)});var u5=class extends $8{_parse(e){if(this._getType(e)!==P8.null){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.null,received:t.parsedType}),H8}return W8(e.data)}};u5.create=e=>new u5({typeName:$.ZodNull,...Q8(e)});var d5=class extends $8{constructor(){super(...arguments),this._any=!0}_parse(e){return W8(e.data)}};d5.create=e=>new d5({typeName:$.ZodAny,...Q8(e)});var f5=class extends $8{constructor(){super(...arguments),this._unknown=!0}_parse(e){return W8(e.data)}};f5.create=e=>new f5({typeName:$.ZodUnknown,...Q8(e)});var p5=class extends $8{_parse(e){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.never,received:t.parsedType}),H8}};p5.create=e=>new p5({typeName:$.ZodNever,...Q8(e)});var m5=class extends $8{_parse(e){if(this._getType(e)!==P8.undefined){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.void,received:t.parsedType}),H8}return W8(e.data)}};m5.create=e=>new m5({typeName:$.ZodVoid,...Q8(e)});var h5=class e extends $8{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==P8.array)return B8(t,{code:Q.invalid_type,expected:P8.array,received:t.parsedType}),H8;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(B8(t,{code:e?Q.too_big:Q.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(B8(t,{code:Q.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(B8(t,{code:Q.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new X8(t,e,t.path,n)))).then(e=>V8.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new X8(t,e,t.path,n)));return V8.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Y8.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Y8.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Y8.toString(n)}})}nonempty(e){return this.min(1,e)}};h5.create=(e,t)=>new h5({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...Q8(t)});function g5(e){if(e instanceof _5){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=M5.create(g5(r))}return new _5({...e._def,shape:()=>t})}else if(e instanceof h5)return new h5({...e._def,type:g5(e.element)});else if(e instanceof M5)return M5.create(g5(e.unwrap()));else if(e instanceof N5)return N5.create(g5(e.unwrap()));else if(e instanceof S5)return S5.create(e.items.map(e=>g5(e)));else return e}var _5=class e extends $8{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=N8.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==P8.object){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.object,received:t.parsedType}),H8}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof p5&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new X8(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof p5){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(B8(n,{code:Q.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new X8(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>V8.mergeObjectSync(t,e)):V8.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return Y8.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:Y8.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of N8.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of N8.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return g5(this)}partial(t){let n={};for(let e of N8.objectKeys(this.shape)){let r=this.shape[e];t&&!t[e]?n[e]=r:n[e]=r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of N8.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof M5;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return D5(N8.objectKeys(this.shape))}};_5.create=(e,t)=>new _5({shape:()=>e,unknownKeys:`strip`,catchall:p5.create(),typeName:$.ZodObject,...Q8(t)}),_5.strictCreate=(e,t)=>new _5({shape:()=>e,unknownKeys:`strict`,catchall:p5.create(),typeName:$.ZodObject,...Q8(t)}),_5.lazycreate=(e,t)=>new _5({shape:e,unknownKeys:`strip`,catchall:p5.create(),typeName:$.ZodObject,...Q8(t)});var v5=class extends $8{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new I8(e.ctx.common.issues));return B8(t,{code:Q.invalid_union,unionErrors:n}),H8}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new I8(e));return B8(t,{code:Q.invalid_union,unionErrors:i}),H8}}get options(){return this._def.options}};v5.create=(e,t)=>new v5({options:e,typeName:$.ZodUnion,...Q8(t)});var y5=e=>e instanceof T5?y5(e.schema):e instanceof j5?y5(e.innerType()):e instanceof E5?[e.value]:e instanceof O5?e.options:e instanceof k5?N8.objectValues(e.enum):e instanceof P5?y5(e._def.innerType):e instanceof l5?[void 0]:e instanceof u5?[null]:e instanceof M5?[void 0,...y5(e.unwrap())]:e instanceof N5?[null,...y5(e.unwrap())]:e instanceof L5||e instanceof z5?y5(e.unwrap()):e instanceof F5?y5(e._def.innerType):[],_ve=class e extends $8{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P8.object)return B8(t,{code:Q.invalid_type,expected:P8.object,received:t.parsedType}),H8;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(B8(t,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),H8)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=y5(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Q8(r)})}};function b5(e,t){let n=F8(e),r=F8(t);if(e===t)return{valid:!0,data:e};if(n===P8.object&&r===P8.object){let n=N8.objectKeys(t),r=N8.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=b5(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}else if(n===P8.array&&r===P8.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=b5(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}else if(n===P8.date&&r===P8.date&&+e==+t)return{valid:!0,data:e};else return{valid:!1}}var x5=class extends $8{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(G8(e)||G8(r))return H8;let i=b5(e.value,r.value);return i.valid?((K8(e)||K8(r))&&t.dirty(),{status:t.value,value:i.data}):(B8(n,{code:Q.invalid_intersection_types}),H8)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};x5.create=(e,t,n)=>new x5({left:e,right:t,typeName:$.ZodIntersection,...Q8(n)});var S5=class e extends $8{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P8.array)return B8(n,{code:Q.invalid_type,expected:P8.array,received:n.parsedType}),H8;if(n.data.length<this._def.items.length)return B8(n,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),H8;!this._def.rest&&n.data.length>this._def.items.length&&(B8(n,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new X8(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>V8.mergeArray(t,e)):V8.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};S5.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new S5({items:e,typeName:$.ZodTuple,rest:null,...Q8(t)})};var vve=class e extends $8{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P8.object)return B8(n,{code:Q.invalid_type,expected:P8.object,received:n.parsedType}),H8;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new X8(n,e,n.path,e)),value:a._parse(new X8(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?V8.mergeObjectAsync(t,r):V8.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof $8?new e({keyType:t,valueType:n,typeName:$.ZodRecord,...Q8(r)}):new e({keyType:r5.create(),valueType:t,typeName:$.ZodRecord,...Q8(n)})}},C5=class extends $8{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P8.map)return B8(n,{code:Q.invalid_type,expected:P8.map,received:n.parsedType}),H8;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new X8(n,e,n.path,[a,`key`])),value:i._parse(new X8(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return H8;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}else{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return H8;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};C5.create=(e,t,n)=>new C5({valueType:t,keyType:e,typeName:$.ZodMap,...Q8(n)});var w5=class e extends $8{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P8.set)return B8(n,{code:Q.invalid_type,expected:P8.set,received:n.parsedType}),H8;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(B8(n,{code:Q.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(B8(n,{code:Q.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return H8;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new X8(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:Y8.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Y8.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};w5.create=(e,t)=>new w5({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...Q8(t)});var yve=class e extends $8{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P8.function)return B8(t,{code:Q.invalid_type,expected:P8.function,received:t.parsedType}),H8;function n(e,n){return z8({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,R8(),L8].filter(e=>!!e),issueData:{code:Q.invalid_arguments,argumentsError:n}})}function r(e,n){return z8({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,R8(),L8].filter(e=>!!e),issueData:{code:Q.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof A5){let e=this;return W8(async function(...t){let o=new I8([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}else{let e=this;return W8(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new I8([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new I8([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:S5.create(t).rest(f5.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||S5.create([]).rest(f5.create()),returns:n||f5.create(),typeName:$.ZodFunction,...Q8(r)})}},T5=class extends $8{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};T5.create=(e,t)=>new T5({getter:e,typeName:$.ZodLazy,...Q8(t)});var E5=class extends $8{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return B8(t,{received:t.data,code:Q.invalid_literal,expected:this._def.value}),H8}return{status:`valid`,value:e.data}}get value(){return this._def.value}};E5.create=(e,t)=>new E5({value:e,typeName:$.ZodLiteral,...Q8(t)});function D5(e,t){return new O5({values:e,typeName:$.ZodEnum,...Q8(t)})}var O5=class e extends $8{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return B8(t,{expected:N8.joinValues(n),received:t.parsedType,code:Q.invalid_type}),H8}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return B8(t,{received:t.data,code:Q.invalid_enum_value,options:n}),H8}return W8(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};O5.create=D5;var k5=class extends $8{_parse(e){let t=N8.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==P8.string&&n.parsedType!==P8.number){let e=N8.objectValues(t);return B8(n,{expected:N8.joinValues(e),received:n.parsedType,code:Q.invalid_type}),H8}if(this._cache||=new Set(N8.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=N8.objectValues(t);return B8(n,{received:n.data,code:Q.invalid_enum_value,options:e}),H8}return W8(e.data)}get enum(){return this._def.values}};k5.create=(e,t)=>new k5({values:e,typeName:$.ZodNativeEnum,...Q8(t)});var A5=class extends $8{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==P8.promise&&t.common.async===!1?(B8(t,{code:Q.invalid_type,expected:P8.promise,received:t.parsedType}),H8):W8((t.parsedType===P8.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};A5.create=(e,t)=>new A5({type:e,typeName:$.ZodPromise,...Q8(t)});var j5=class extends $8{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{B8(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return H8;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?H8:r.status===`dirty`||t.value===`dirty`?U8(r.value):r});{if(t.value===`aborted`)return H8;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?H8:r.status===`dirty`||t.value===`dirty`?U8(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?H8:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?H8:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`)if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!q8(e))return H8;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>q8(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):H8);N8.assertNever(r)}};j5.create=(e,t,n)=>new j5({schema:e,typeName:$.ZodEffects,effect:t,...Q8(n)}),j5.createWithPreprocess=(e,t,n)=>new j5({schema:t,effect:{type:`preprocess`,transform:e},typeName:$.ZodEffects,...Q8(n)});var M5=class extends $8{_parse(e){return this._getType(e)===P8.undefined?W8(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};M5.create=(e,t)=>new M5({innerType:e,typeName:$.ZodOptional,...Q8(t)});var N5=class extends $8{_parse(e){return this._getType(e)===P8.null?W8(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};N5.create=(e,t)=>new N5({innerType:e,typeName:$.ZodNullable,...Q8(t)});var P5=class extends $8{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===P8.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};P5.create=(e,t)=>new P5({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Q8(t)});var F5=class extends $8{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return J8(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new I8(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new I8(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};F5.create=(e,t)=>new F5({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Q8(t)});var I5=class extends $8{_parse(e){if(this._getType(e)!==P8.nan){let t=this._getOrReturnCtx(e);return B8(t,{code:Q.invalid_type,expected:P8.nan,received:t.parsedType}),H8}return{status:`valid`,value:e.data}}};I5.create=e=>new I5({typeName:$.ZodNaN,...Q8(e)});var L5=class extends $8{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},R5=class e extends $8{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?H8:e.status===`dirty`?(t.dirty(),U8(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?H8:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:$.ZodPipeline})}},z5=class extends $8{_parse(e){let t=this._def.innerType._parse(e),n=e=>(q8(e)&&(e.value=Object.freeze(e.value)),e);return J8(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};z5.create=(e,t)=>new z5({innerType:e,typeName:$.ZodReadonly,...Q8(t)}),_5.lazycreate;var $;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})($||={}),r5.create,i5.create,I5.create,a5.create,o5.create,s5.create,c5.create,l5.create,u5.create,d5.create,f5.create,p5.create,m5.create,h5.create,_5.create,_5.strictCreate,v5.create,_ve.create,x5.create,S5.create,vve.create,C5.create,w5.create,yve.create,T5.create,E5.create,O5.create,k5.create,A5.create,j5.create,M5.create,N5.create,j5.createWithPreprocess,R5.create;var B5=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},V5=10,bve=13,H5=32;function U5(e){}function xve(e){if(typeof e==`function`)throw TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");let{onEvent:t=U5,onError:n=U5,onRetry:r=U5,onComment:i}=e,a=[],o=!0,s,c=``,l=0,u;function d(e){if(o&&(o=!1,e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),a.length===0){let t=f(e);t!==``&&a.push(t);return}if(e.indexOf(`
405
+ `)===-1&&e.indexOf(`\r`)===-1){a.push(e);return}a.push(e);let t=a.join(``);a.length=0;let n=f(t);n!==``&&a.push(n)}function f(e){let n=0;if(e.indexOf(`\r`)===-1){let r=e.indexOf(`
406
+ `,n);for(;r!==-1;){if(n===r){l>0&&t({id:s,event:u,data:c}),s=void 0,c=``,l=0,u=void 0,n=r+1,r=e.indexOf(`
407
+ `,n);continue}let i=e.charCodeAt(n);if(W5(e,n,i)){let i=e.charCodeAt(n+5)===H5?n+6:n+5,a=e.slice(i,r);if(l===0&&e.charCodeAt(r+1)===V5){t({id:s,event:u,data:a}),s=void 0,c=``,u=void 0,n=r+2,r=e.indexOf(`
408
+ `,n);continue}c=l===0?a:`${c}
409
+ ${a}`,l++}else G5(e,n,i)?u=e.slice(e.charCodeAt(n+6)===H5?n+7:n+6,r)||void 0:p(e,n,r);n=r+1,r=e.indexOf(`
410
+ `,n)}return e.slice(n)}for(;n<e.length;){let t=e.indexOf(`\r`,n),r=e.indexOf(`
411
+ `,n),i=-1;if(t!==-1&&r!==-1?i=t<r?t:r:t===-1?r!==-1&&(i=r):i=t===e.length-1?-1:t,i===-1)break;p(e,n,i),n=i+1,e.charCodeAt(n-1)===bve&&e.charCodeAt(n)===V5&&n++}return e.slice(n)}function p(e,t,n){if(t===n){h();return}let r=e.charCodeAt(t);if(W5(e,t,r)){let r=e.charCodeAt(t+5)===H5?t+6:t+5,i=e.slice(r,n);c=l===0?i:`${c}
412
+ ${i}`,l++;return}if(G5(e,t,r)){u=e.slice(e.charCodeAt(t+6)===H5?t+7:t+6,n)||void 0;return}if(r===105&&e.charCodeAt(t+1)===100&&e.charCodeAt(t+2)===58){let r=e.slice(e.charCodeAt(t+3)===H5?t+4:t+3,n);s=r.includes(`\0`)?void 0:r;return}if(r===58){i&&i(e.slice(t,n).slice(e.charCodeAt(t+1)===H5?2:1));return}let a=e.slice(t,n),o=a.indexOf(`:`);if(o===-1){m(a,``,a);return}let d=a.slice(0,o),f=a.charCodeAt(o+1)===H5?2:1;m(d,a.slice(o+f),a)}function m(e,t,i){switch(e){case`event`:u=t||void 0;break;case`data`:c=l===0?t:`${c}
413
+ ${t}`,l++;break;case`id`:s=t.includes(`\0`)?void 0:t;break;case`retry`:/^\d+$/.test(t)?r(parseInt(t,10)):n(new B5(`Invalid \`retry\` value: "${t}"`,{type:`invalid-retry`,value:t,line:i}));break;default:n(new B5(`Unknown field "${e.length>20?`${e.slice(0,20)}\u2026`:e}"`,{type:`unknown-field`,field:e,value:t,line:i}));break}}function h(){l>0&&t({id:s,event:u,data:c}),s=void 0,c=``,l=0,u=void 0}function g(e={}){if(e.consume&&a.length>0){let e=a.join(``);p(e,0,e.length)}o=!0,s=void 0,c=``,l=0,u=void 0,a.length=0}return{feed:d,reset:g}}function W5(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function G5(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}var Sve=class extends TransformStream{constructor({onError:e,onRetry:t,onComment:n}={}){let r;super({start(i){r=xve({onEvent:e=>{i.enqueue(e)},onError(t){e===`terminate`?i.error(t):typeof e==`function`&&e(t)},onRetry:t,onComment:n})},transform(e){r.feed(e)}})}},{btoa:Cve,atob:wve}=globalThis,K5=({prefix:e,size:t=16,alphabet:n=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,separator:r=`-`}={})=>{let i=()=>{let e=n.length,r=Array(t);for(let i=0;i<t;i++)r[i]=n[Math.random()*e|0];return r.join(``)};if(e==null)return i;if(n.includes(r))throw new ope({argument:`separator`,message:`The separator "${r}" must not be part of the alphabet "${n}".`});return()=>`${e}${r}${i()}`},Tve=K5();function q5(e){if(e==null)return{};let t={};if(e instanceof Headers)e.forEach((e,n)=>{t[n.toLowerCase()]=e});else{Array.isArray(e)||(e=Object.entries(e));for(let[n,r]of e)r!=null&&(t[n.toLowerCase()]=r)}return t}var Eve=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Dve=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function J5(e){let t=JSON.parse(e);return typeof t!=`object`||!t||Eve.test(e)===!1&&Dve.test(e)===!1?t:Ove(t)}function Ove(e){let t=[e];for(;t.length;){let e=t;t=[];for(let n of e){if(Object.prototype.hasOwnProperty.call(n,`__proto__`)||Object.prototype.hasOwnProperty.call(n,`constructor`)&&n.constructor!==null&&typeof n.constructor==`object`&&Object.prototype.hasOwnProperty.call(n.constructor,`prototype`))throw SyntaxError(`Object contains forbidden prototype property`);for(let e in n){let r=n[e];r&&typeof r==`object`&&t.push(r)}}}return e}function kve(e){let{stackTraceLimit:t}=Error;try{Error.stackTraceLimit=0}catch{return J5(e)}try{return J5(e)}finally{Error.stackTraceLimit=t}}function Y5(e){if(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)){e.additionalProperties=!1;let{properties:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=X5(t[e])}e.items!=null&&(e.items=Array.isArray(e.items)?e.items.map(X5):X5(e.items)),e.anyOf!=null&&(e.anyOf=e.anyOf.map(X5)),e.allOf!=null&&(e.allOf=e.allOf.map(X5)),e.oneOf!=null&&(e.oneOf=e.oneOf.map(X5));let{definitions:t}=e;if(t!=null)for(let e of Object.keys(t))t[e]=X5(t[e]);return e}function X5(e){return typeof e==`boolean`?e:Y5(e)}var Ave=Symbol(`Let zodToJsonSchema decide on which parser to use`),Z5={name:void 0,$refStrategy:`root`,basePath:[`#`],effectStrategy:`input`,pipeStrategy:`all`,dateStrategy:`format:date-time`,mapStrategy:`entries`,removeAdditionalStrategy:`passthrough`,allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:`definitions`,strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:`escape`,applyRegexFlags:!1,emailStrategy:`format:email`,base64Strategy:`contentEncoding:base64`,nameStrategy:`ref`},jve=e=>typeof e==`string`?{...Z5,name:e}:{...Z5,...e};function Q5(){return{}}function Mve(e,t){let n={type:`array`};return e.type?._def&&e.type?._def?.typeName!==$.ZodAny&&(n.items=u7(e.type._def,{...t,currentPath:[...t.currentPath,`items`]})),e.minLength&&(n.minItems=e.minLength.value),e.maxLength&&(n.maxItems=e.maxLength.value),e.exactLength&&(n.minItems=e.exactLength.value,n.maxItems=e.exactLength.value),n}function Nve(e){let t={type:`integer`,format:`int64`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value;break}return t}function Pve(){return{type:`boolean`}}function $5(e,t){return u7(e.type._def,t)}var Fve=(e,t)=>u7(e.innerType._def,t);function e7(e,t,n){let r=n??t.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((n,r)=>e7(e,t,n))};switch(r){case`string`:case`format:date-time`:return{type:`string`,format:`date-time`};case`format:date`:return{type:`string`,format:`date`};case`integer`:return Ive(e)}}var Ive=e=>{let t={type:`integer`,format:`unix-time`};for(let n of e.checks)switch(n.kind){case`min`:t.minimum=n.value;break;case`max`:t.maximum=n.value;break}return t};function Lve(e,t){return{...u7(e.innerType._def,t),default:e.defaultValue()}}function Rve(e,t){return t.effectStrategy===`input`?u7(e.schema._def,t):Q5()}function zve(e){return{type:`string`,enum:Array.from(e.values)}}var Bve=e=>`type`in e&&e.type===`string`?!1:`allOf`in e;function Vve(e,t){let n=[u7(e.left._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]}),u7(e.right._def,{...t,currentPath:[...t.currentPath,`allOf`,`1`]})].filter(e=>!!e),r=[];return n.forEach(e=>{if(Bve(e))r.push(...e.allOf);else{let t=e;if(`additionalProperties`in e&&e.additionalProperties===!1){let{additionalProperties:n,...r}=e;t=r}r.push(t)}}),r.length?{allOf:r}:void 0}function Hve(e){let t=typeof e.value;return t!==`bigint`&&t!==`number`&&t!==`boolean`&&t!==`string`?{type:Array.isArray(e.value)?`array`:`object`}:{type:t===`bigint`?`integer`:t,const:e.value}}var t7=void 0,n7={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(t7===void 0&&(t7=RegExp(`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,`u`)),t7),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function r7(e,t){let n={type:`string`};if(e.checks)for(let r of e.checks)switch(r.kind){case`min`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value;break;case`max`:n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`email`:switch(t.emailStrategy){case`format:email`:a7(n,`email`,r.message,t);break;case`format:idn-email`:a7(n,`idn-email`,r.message,t);break;case`pattern:zod`:o7(n,n7.email,r.message,t);break}break;case`url`:a7(n,`uri`,r.message,t);break;case`uuid`:a7(n,`uuid`,r.message,t);break;case`regex`:o7(n,r.regex,r.message,t);break;case`cuid`:o7(n,n7.cuid,r.message,t);break;case`cuid2`:o7(n,n7.cuid2,r.message,t);break;case`startsWith`:o7(n,RegExp(`^${i7(r.value,t)}`),r.message,t);break;case`endsWith`:o7(n,RegExp(`${i7(r.value,t)}$`),r.message,t);break;case`datetime`:a7(n,`date-time`,r.message,t);break;case`date`:a7(n,`date`,r.message,t);break;case`time`:a7(n,`time`,r.message,t);break;case`duration`:a7(n,`duration`,r.message,t);break;case`length`:n.minLength=typeof n.minLength==`number`?Math.max(n.minLength,r.value):r.value,n.maxLength=typeof n.maxLength==`number`?Math.min(n.maxLength,r.value):r.value;break;case`includes`:o7(n,RegExp(i7(r.value,t)),r.message,t);break;case`ip`:r.version!==`v6`&&a7(n,`ipv4`,r.message,t),r.version!==`v4`&&a7(n,`ipv6`,r.message,t);break;case`base64url`:o7(n,n7.base64url,r.message,t);break;case`jwt`:o7(n,n7.jwt,r.message,t);break;case`cidr`:r.version!==`v6`&&o7(n,n7.ipv4Cidr,r.message,t),r.version!==`v4`&&o7(n,n7.ipv6Cidr,r.message,t);break;case`emoji`:o7(n,n7.emoji(),r.message,t);break;case`ulid`:o7(n,n7.ulid,r.message,t);break;case`base64`:switch(t.base64Strategy){case`format:binary`:a7(n,`binary`,r.message,t);break;case`contentEncoding:base64`:n.contentEncoding=`base64`;break;case`pattern:zod`:o7(n,n7.base64,r.message,t);break}break;case`nanoid`:o7(n,n7.nanoid,r.message,t);case`toLowerCase`:case`toUpperCase`:case`trim`:break;default:}return n}function i7(e,t){return t.patternStrategy===`escape`?Wve(e):e}var Uve=new Set(`ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789`);function Wve(e){let t=``;for(let n=0;n<e.length;n++)Uve.has(e[n])||(t+=`\\`),t+=e[n];return t}function a7(e,t,n,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||=[],e.format&&(e.anyOf.push({format:e.format}),delete e.format),e.anyOf.push({format:t,...n&&r.errorMessages&&{errorMessage:{format:n}}})):e.format=t}function o7(e,t,n,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||=[],e.pattern&&(e.allOf.push({pattern:e.pattern}),delete e.pattern),e.allOf.push({pattern:s7(t,r),...n&&r.errorMessages&&{errorMessage:{pattern:n}}})):e.pattern=s7(t,r)}function s7(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let n={i:e.flags.includes(`i`),m:e.flags.includes(`m`),s:e.flags.includes(`s`)},r=n.i?e.source.toLowerCase():e.source,i=``,a=!1,o=!1,s=!1;for(let e=0;e<r.length;e++){if(a){i+=r[e],a=!1;continue}if(n.i){if(o){if(r[e].match(/[a-z]/)){s?(i+=r[e],i+=`${r[e-2]}-${r[e]}`.toUpperCase(),s=!1):r[e+1]===`-`&&r[e+2]?.match(/[a-z]/)?(i+=r[e],s=!0):i+=`${r[e]}${r[e].toUpperCase()}`;continue}}else if(r[e].match(/[a-z]/)){i+=`[${r[e]}${r[e].toUpperCase()}]`;continue}}if(n.m){if(r[e]===`^`){i+=`(^|(?<=[\r
414
+ ]))`;continue}else if(r[e]===`$`){i+=`($|(?=[\r
415
+ ]))`;continue}}if(n.s&&r[e]===`.`){i+=o?`${r[e]}\r
416
+ `:`[${r[e]}\r
417
+ ]`;continue}i+=r[e],r[e]===`\\`?a=!0:o&&r[e]===`]`?o=!1:!o&&r[e]===`[`&&(o=!0)}try{new RegExp(i)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join(`/`)} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return i}function c7(e,t){let n={type:`object`,additionalProperties:u7(e.valueType._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]})??t.allowedAdditionalProperties};if(e.keyType?._def.typeName===$.ZodString&&e.keyType._def.checks?.length){let{type:r,...i}=r7(e.keyType._def,t);return{...n,propertyNames:i}}else if(e.keyType?._def.typeName===$.ZodEnum)return{...n,propertyNames:{enum:e.keyType._def.values}};else if(e.keyType?._def.typeName===$.ZodBranded&&e.keyType._def.type._def.typeName===$.ZodString&&e.keyType._def.type._def.checks?.length){let{type:r,...i}=$5(e.keyType._def,t);return{...n,propertyNames:i}}return n}function Gve(e,t){return t.mapStrategy===`record`?c7(e,t):{type:`array`,maxItems:125,items:{type:`array`,items:[u7(e.keyType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`0`]})||Q5(),u7(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`,`items`,`1`]})||Q5()],minItems:2,maxItems:2}}}function Kve(e){let t=e.values,n=Object.keys(e.values).filter(e=>typeof t[t[e]]!=`number`).map(e=>t[e]),r=Array.from(new Set(n.map(e=>typeof e)));return{type:r.length===1?r[0]===`string`?`string`:`number`:[`string`,`number`],enum:n}}function qve(){return{not:Q5()}}function Jve(){return{type:`null`}}var l7={ZodString:`string`,ZodNumber:`number`,ZodBigInt:`integer`,ZodBoolean:`boolean`,ZodNull:`null`};function Yve(e,t){let n=e.options instanceof Map?Array.from(e.options.values()):e.options;if(n.every(e=>e._def.typeName in l7&&(!e._def.checks||!e._def.checks.length))){let e=n.reduce((e,t)=>{let n=l7[t._def.typeName];return n&&!e.includes(n)?[...e,n]:e},[]);return{type:e.length>1?e:e[0]}}else if(n.every(e=>e._def.typeName===`ZodLiteral`&&!e.description)){let e=n.reduce((e,t)=>{let n=typeof t._def.value;switch(n){case`string`:case`number`:case`boolean`:return[...e,n];case`bigint`:return[...e,`integer`];case`object`:if(t._def.value===null)return[...e,`null`];default:return e}},[]);if(e.length===n.length){let t=e.filter((e,t,n)=>n.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:n.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(n.every(e=>e._def.typeName===`ZodEnum`))return{type:`string`,enum:n.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return Xve(e,t)}var Xve=(e,t)=>{let n=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,n)=>u7(e._def,{...t,currentPath:[...t.currentPath,`anyOf`,`${n}`]})).filter(e=>!!e&&(!t.strictUnions||typeof e==`object`&&Object.keys(e).length>0));return n.length?{anyOf:n}:void 0};function Zve(e,t){if([`ZodString`,`ZodNumber`,`ZodBigInt`,`ZodBoolean`,`ZodNull`].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[l7[e.innerType._def.typeName],`null`]};let n=u7(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`0`]});return n&&{anyOf:[n,{type:`null`}]}}function Qve(e){let t={type:`number`};if(!e.checks)return t;for(let n of e.checks)switch(n.kind){case`int`:t.type=`integer`;break;case`min`:n.inclusive?t.minimum=n.value:t.exclusiveMinimum=n.value;break;case`max`:n.inclusive?t.maximum=n.value:t.exclusiveMaximum=n.value;break;case`multipleOf`:t.multipleOf=n.value;break}return t}function $ve(e,t){let n={type:`object`,properties:{}},r=[],i=e.shape();for(let e in i){let a=i[e];if(a===void 0||a._def===void 0)continue;let o=tye(a),s=u7(a._def,{...t,currentPath:[...t.currentPath,`properties`,e],propertyPath:[...t.currentPath,`properties`,e]});s!==void 0&&(n.properties[e]=s,o||r.push(e))}r.length&&(n.required=r);let a=eye(e,t);return a!==void 0&&(n.additionalProperties=a),n}function eye(e,t){if(e.catchall._def.typeName!==`ZodNever`)return u7(e.catchall._def,{...t,currentPath:[...t.currentPath,`additionalProperties`]});switch(e.unknownKeys){case`passthrough`:return t.allowedAdditionalProperties;case`strict`:return t.rejectedAdditionalProperties;case`strip`:return t.removeAdditionalStrategy===`strict`?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function tye(e){try{return e.isOptional()}catch{return!0}}var nye=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return u7(e.innerType._def,t);let n=u7(e.innerType._def,{...t,currentPath:[...t.currentPath,`anyOf`,`1`]});return n?{anyOf:[{not:Q5()},n]}:Q5()},rye=(e,t)=>{if(t.pipeStrategy===`input`)return u7(e.in._def,t);if(t.pipeStrategy===`output`)return u7(e.out._def,t);let n=u7(e.in._def,{...t,currentPath:[...t.currentPath,`allOf`,`0`]});return{allOf:[n,u7(e.out._def,{...t,currentPath:[...t.currentPath,`allOf`,n?`1`:`0`]})].filter(e=>e!==void 0)}};function iye(e,t){return u7(e.type._def,t)}function aye(e,t){let n={type:`array`,uniqueItems:!0,items:u7(e.valueType._def,{...t,currentPath:[...t.currentPath,`items`]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function oye(e,t){return e.rest?{type:`array`,minItems:e.items.length,items:e.items.map((e,n)=>u7(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[]),additionalItems:u7(e.rest._def,{...t,currentPath:[...t.currentPath,`additionalItems`]})}:{type:`array`,minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,n)=>u7(e._def,{...t,currentPath:[...t.currentPath,`items`,`${n}`]})).reduce((e,t)=>t===void 0?e:[...e,t],[])}}function sye(){return{not:Q5()}}function cye(){return Q5()}var lye=(e,t)=>u7(e.innerType._def,t),uye=(e,t,n)=>{switch(t){case $.ZodString:return r7(e,n);case $.ZodNumber:return Qve(e);case $.ZodObject:return $ve(e,n);case $.ZodBigInt:return Nve(e);case $.ZodBoolean:return Pve();case $.ZodDate:return e7(e,n);case $.ZodUndefined:return sye();case $.ZodNull:return Jve();case $.ZodArray:return Mve(e,n);case $.ZodUnion:case $.ZodDiscriminatedUnion:return Yve(e,n);case $.ZodIntersection:return Vve(e,n);case $.ZodTuple:return oye(e,n);case $.ZodRecord:return c7(e,n);case $.ZodLiteral:return Hve(e);case $.ZodEnum:return zve(e);case $.ZodNativeEnum:return Kve(e);case $.ZodNullable:return Zve(e,n);case $.ZodOptional:return nye(e,n);case $.ZodMap:return Gve(e,n);case $.ZodSet:return aye(e,n);case $.ZodLazy:return()=>e.getter()._def;case $.ZodPromise:return iye(e,n);case $.ZodNaN:case $.ZodNever:return qve();case $.ZodEffects:return Rve(e,n);case $.ZodAny:return Q5();case $.ZodUnknown:return cye();case $.ZodDefault:return Lve(e,n);case $.ZodBranded:return $5(e,n);case $.ZodReadonly:return lye(e,n);case $.ZodCatch:return Fve(e,n);case $.ZodPipeline:return rye(e,n);case $.ZodFunction:case $.ZodVoid:case $.ZodSymbol:return;default:return(e=>void 0)(t)}},dye=(e,t)=>{let n=0;for(;n<e.length&&n<t.length&&e[n]===t[n];n++);return[(e.length-n).toString(),...t.slice(n)].join(`/`)};function u7(e,t,n=!1){let r=t.seen.get(e);if(t.override){let i=t.override?.call(t,e,t,r,n);if(i!==Ave)return i}if(r&&!n){let e=fye(r,t);if(e!==void 0)return e}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let a=uye(e,e.typeName,t),o=typeof a==`function`?u7(a(),t):a;if(o&&pye(e,t,o),t.postProcess){let n=t.postProcess(o,e,t);return i.jsonSchema=o,n}return i.jsonSchema=o,o}var fye=(e,t)=>{switch(t.$refStrategy){case`root`:return{$ref:e.path.join(`/`)};case`relative`:return{$ref:dye(t.currentPath,e.path)};case`none`:case`seen`:return e.path.length<t.currentPath.length&&e.path.every((e,n)=>t.currentPath[n]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join(`/`)}! Defaulting to any`),Q5()):t.$refStrategy===`seen`?Q5():void 0}},pye=(e,t,n)=>(e.description&&(n.description=e.description),n),mye=e=>{let t=jve(e),n=t.name===void 0?t.basePath:[...t.basePath,t.definitionPath,t.name];return{...t,currentPath:n,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}},hye=(e,t)=>{let n=mye(t),r=typeof t==`object`&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:u7(r._def,{...n,currentPath:[...n.basePath,n.definitionPath,t]},!0)??Q5()}),{}):void 0,i=typeof t==`string`?t:t?.nameStrategy===`title`?void 0:t?.name,a=u7(e._def,i===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,i]},!1)??Q5(),o=typeof t==`object`&&t.name!==void 0&&t.nameStrategy===`title`?t.name:void 0;o!==void 0&&(a.title=o);let s=i===void 0?r?{...a,[n.definitionPath]:r}:a:{$ref:[...n.$refStrategy===`relative`?[]:n.basePath,n.definitionPath,i].join(`/`),[n.definitionPath]:{...r,[i]:a}};return s.$schema=`http://json-schema.org/draft-07/schema#`,s},d7=Symbol.for(`vercel.ai.schema`);function gye(e){let t;return()=>(t??=e(),t)}function f7(e,{validate:t}={}){return{[d7]:!0,_type:void 0,get jsonSchema(){return typeof e==`function`&&(e=e()),e},validate:t}}function _ye(e){return typeof e==`object`&&!!e&&d7 in e&&e[d7]===!0&&`jsonSchema`in e&&`validate`in e}function p7(e){return e==null?f7({properties:{},additionalProperties:!1}):_ye(e)?e:`~standard`in e?e[`~standard`].vendor===`zod`?m7(e):vye(e):e()}function vye(e){return f7(()=>Y5(e[`~standard`].jsonSchema.input({target:`draft-07`})),{validate:async t=>{let n=await e[`~standard`].validate(t);return`value`in n?{success:!0,value:n.value}:{success:!1,error:new e3({value:t,cause:n.issues})}}})}function yye(e,t){let n=t?.useReferences??!1;return f7(()=>hye(e,{$refStrategy:n?`root`:`none`}),{validate:async t=>{let n=await e.safeParseAsync(t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function bye(e,t){let n=t?.useReferences??!1;return f7(()=>Y5(jge(e,{target:`draft-7`,io:`input`,reused:n?`ref`:`inline`})),{validate:async t=>{let n=await t8(e,t);return n.success?{success:!0,value:n.data}:{success:!1,error:n.error}}})}function xye(e){return`_zod`in e}function m7(e,t){return xye(e)?bye(e,t):yye(e,t)}async function h7({value:e,schema:t,context:n}){let r=await g7({value:e,schema:t,context:n});if(!r.success)throw e3.wrap({value:e,cause:r.error,context:n});return r.value}async function g7({value:e,schema:t,context:n}){let r=p7(t);try{if(r.validate==null)return{success:!0,value:e,rawValue:e};let t=await r.validate(e);return t.success?{success:!0,value:t.value,rawValue:e}:{success:!1,error:e3.wrap({value:e,cause:t.error,context:n}),rawValue:e}}catch(t){return{success:!1,error:e3.wrap({value:e,cause:t,context:n}),rawValue:e}}}async function _7({text:e,schema:t}){try{let n=kve(e);return t==null?{success:!0,value:n,rawValue:n}:await g7({value:n,schema:t})}catch(t){return{success:!1,error:Y4.isInstance(t)?t:new Y4({text:e,cause:t}),rawValue:void 0}}}function Sye({stream:e,schema:t}){return e.pipeThrough(new TextDecoderStream).pipeThrough(new Sve).pipeThrough(new TransformStream({async transform({data:e},n){e!==`[DONE]`&&n.enqueue(await _7({text:e,schema:t}))}}))}async function v7(e){return typeof e==`function`&&(e=e()),Promise.resolve(e)}var Cye=Object.defineProperty,wye=(e,t)=>{for(var n in t)Cye(e,n,{get:t[n],enumerable:!0})},y7=`AI_NoObjectGeneratedError`,b7=`vercel.ai.error.${y7}`,Tye=Symbol.for(b7),x7,S7=class extends z4{constructor({message:e=`No object generated.`,cause:t,text:n,response:r,usage:i,finishReason:a}){super({name:y7,message:e,cause:t}),this[x7]=!0,this.text=n,this.response=r,this.usage=i,this.finishReason=a}static isInstance(e){return z4.hasMarker(e,b7)}};x7=Tye;var C7=`AI_UIMessageStreamError`,w7=`vercel.ai.error.${C7}`,Eye=Symbol.for(w7),T7,E7=class extends z4{constructor({chunkType:e,chunkId:t,message:n}){super({name:C7,message:n}),this[T7]=!0,this.chunkType=e,this.chunkId=t}static isInstance(e){return z4.hasMarker(e,w7)}};T7=Eye;var D7=y8([Z(),M8(Uint8Array),M8(ArrayBuffer),j8(e=>globalThis.Buffer?.isBuffer(e)??!1,{message:`Must be a Buffer`})]),O7=W_e(()=>y8([y_e(),Z(),h_e(),d8(),x8(Z(),O7.optional()),m8(O7)])),k7=x8(Z(),x8(Z(),O7.optional())),A7=g8({type:w8(`text`),text:Z(),providerOptions:k7.optional()}),Dye=g8({type:w8(`image`),image:y8([D7,M8(URL)]),mediaType:Z().optional(),providerOptions:k7.optional()}),j7=g8({type:w8(`file`),data:y8([D7,M8(URL)]),filename:Z().optional(),mediaType:Z(),providerOptions:k7.optional()}),Oye=g8({type:w8(`reasoning`),text:Z(),providerOptions:k7.optional()}),kye=g8({type:w8(`tool-call`),toolCallId:Z(),toolName:Z(),input:f8(),providerOptions:k7.optional(),providerExecuted:d8().optional()}),Aye=w_e(`type`,[g8({type:w8(`text`),value:Z(),providerOptions:k7.optional()}),g8({type:w8(`json`),value:O7,providerOptions:k7.optional()}),g8({type:w8(`execution-denied`),reason:Z().optional(),providerOptions:k7.optional()}),g8({type:w8(`error-text`),value:Z(),providerOptions:k7.optional()}),g8({type:w8(`error-json`),value:O7,providerOptions:k7.optional()}),g8({type:w8(`content`),value:m8(y8([g8({type:w8(`text`),text:Z(),providerOptions:k7.optional()}),g8({type:w8(`media`),data:Z(),mediaType:Z()}),g8({type:w8(`file-data`),data:Z(),mediaType:Z(),filename:Z().optional(),providerOptions:k7.optional()}),g8({type:w8(`file-url`),url:Z(),providerOptions:k7.optional()}),g8({type:w8(`file-id`),fileId:y8([Z(),x8(Z(),Z())]),providerOptions:k7.optional()}),g8({type:w8(`image-data`),data:Z(),mediaType:Z(),providerOptions:k7.optional()}),g8({type:w8(`image-url`),url:Z(),providerOptions:k7.optional()}),g8({type:w8(`image-file-id`),fileId:y8([Z(),x8(Z(),Z())]),providerOptions:k7.optional()}),g8({type:w8(`custom`),providerOptions:k7.optional()})]))})]),M7=g8({type:w8(`tool-result`),toolCallId:Z(),toolName:Z(),output:Aye,providerOptions:k7.optional()}),jye=g8({type:w8(`tool-approval-request`),approvalId:Z(),toolCallId:Z()}),Mye=g8({type:w8(`tool-approval-response`),approvalId:Z(),approved:d8(),reason:Z().optional()});y8([g8({role:w8(`system`),content:Z(),providerOptions:k7.optional()}),g8({role:w8(`user`),content:y8([Z(),m8(y8([A7,Dye,j7]))]),providerOptions:k7.optional()}),g8({role:w8(`assistant`),content:y8([Z(),m8(y8([A7,j7,Oye,kye,M7,jye]))]),providerOptions:k7.optional()}),g8({role:w8(`tool`),content:m8(y8([M7,Mye])),providerOptions:k7.optional()})]);function N7(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;let n={...e};for(let r in t)if(!(r===`__proto__`||r===`constructor`||r===`prototype`)&&Object.prototype.hasOwnProperty.call(t,r)){let i=t[r];if(i===void 0)continue;let a=r in e?e[r]:void 0,o=typeof i==`object`&&!!i&&!Array.isArray(i)&&!(i instanceof Date)&&!(i instanceof RegExp),s=typeof a==`object`&&!!a&&!Array.isArray(a)&&!(a instanceof Date)&&!(a instanceof RegExp);o&&s?n[r]=N7(a,i):n[r]=i}return n}wye({},{array:()=>Iye,choice:()=>Lye,json:()=>Rye,object:()=>Fye,text:()=>Pye});function Nye(e){let t=[`ROOT`],n=-1,r=null;function i(e,i,a){switch(e){case`"`:n=i,t.pop(),t.push(a),t.push(`INSIDE_STRING`);break;case`f`:case`t`:case`n`:n=i,r=i,t.pop(),t.push(a),t.push(`INSIDE_LITERAL`);break;case`-`:t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=i,t.pop(),t.push(a),t.push(`INSIDE_NUMBER`);break;case`{`:n=i,t.pop(),t.push(a),t.push(`INSIDE_OBJECT_START`);break;case`[`:n=i,t.pop(),t.push(a),t.push(`INSIDE_ARRAY_START`);break}}function a(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_COMMA`);break;case`}`:n=r,t.pop();break}}function o(e,r){switch(e){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=r,t.pop();break}}for(let s=0;s<e.length;s++){let c=e[s];switch(t[t.length-1]){case`ROOT`:i(c,s,`FINISH`);break;case`INSIDE_OBJECT_START`:switch(c){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break;case`}`:n=s,t.pop();break}break;case`INSIDE_OBJECT_AFTER_COMMA`:switch(c){case`"`:t.pop(),t.push(`INSIDE_OBJECT_KEY`);break}break;case`INSIDE_OBJECT_KEY`:switch(c){case`"`:t.pop(),t.push(`INSIDE_OBJECT_AFTER_KEY`);break}break;case`INSIDE_OBJECT_AFTER_KEY`:switch(c){case`:`:t.pop(),t.push(`INSIDE_OBJECT_BEFORE_VALUE`);break}break;case`INSIDE_OBJECT_BEFORE_VALUE`:i(c,s,`INSIDE_OBJECT_AFTER_VALUE`);break;case`INSIDE_OBJECT_AFTER_VALUE`:a(c,s);break;case`INSIDE_STRING`:switch(c){case`"`:t.pop(),n=s;break;case`\\`:t.push(`INSIDE_STRING_ESCAPE`);break;default:n=s}break;case`INSIDE_ARRAY_START`:switch(c){case`]`:n=s,t.pop();break;default:n=s,i(c,s,`INSIDE_ARRAY_AFTER_VALUE`);break}break;case`INSIDE_ARRAY_AFTER_VALUE`:switch(c){case`,`:t.pop(),t.push(`INSIDE_ARRAY_AFTER_COMMA`);break;case`]`:n=s,t.pop();break;default:n=s;break}break;case`INSIDE_ARRAY_AFTER_COMMA`:i(c,s,`INSIDE_ARRAY_AFTER_VALUE`);break;case`INSIDE_STRING_ESCAPE`:t.pop(),n=s;break;case`INSIDE_NUMBER`:switch(c){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n=s;break;case`e`:case`E`:case`-`:case`.`:break;case`,`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&o(c,s),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&a(c,s);break;case`}`:t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`&&a(c,s);break;case`]`:t.pop(),t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&o(c,s);break;default:t.pop();break}break;case`INSIDE_LITERAL`:{let i=e.substring(r,s+1);!`false`.startsWith(i)&&!`true`.startsWith(i)&&!`null`.startsWith(i)?(t.pop(),t[t.length-1]===`INSIDE_OBJECT_AFTER_VALUE`?a(c,s):t[t.length-1]===`INSIDE_ARRAY_AFTER_VALUE`&&o(c,s)):n=s;break}}}let s=e.slice(0,n+1);for(let n=t.length-1;n>=0;n--)switch(t[n]){case`INSIDE_STRING`:s+=`"`;break;case`INSIDE_OBJECT_KEY`:case`INSIDE_OBJECT_AFTER_KEY`:case`INSIDE_OBJECT_AFTER_COMMA`:case`INSIDE_OBJECT_START`:case`INSIDE_OBJECT_BEFORE_VALUE`:case`INSIDE_OBJECT_AFTER_VALUE`:s+=`}`;break;case`INSIDE_ARRAY_START`:case`INSIDE_ARRAY_AFTER_COMMA`:case`INSIDE_ARRAY_AFTER_VALUE`:s+=`]`;break;case`INSIDE_LITERAL`:{let t=e.substring(r,e.length);`true`.startsWith(t)?s+=`true`.slice(t.length):`false`.startsWith(t)?s+=`false`.slice(t.length):`null`.startsWith(t)&&(s+=`null`.slice(t.length))}}return s}async function P7(e){if(e===void 0)return{value:void 0,state:`undefined-input`};let t=await _7({text:e});return t.success?{value:t.value,state:`successful-parse`}:(t=await _7({text:Nye(e)}),t.success?{value:t.value,state:`repaired-parse`}:{value:void 0,state:`failed-parse`})}var Pye=()=>({name:`text`,responseFormat:Promise.resolve({type:`text`}),async parseCompleteOutput({text:e}){return e},async parsePartialOutput({text:e}){return{partial:e}},createElementStreamTransform(){}}),Fye=({schema:e,name:t,description:n})=>{let r=p7(e);return{name:`object`,responseFormat:v7(r.jsonSchema).then(e=>({type:`json`,schema:e,...t!=null&&{name:t},...n!=null&&{description:n}})),async parseCompleteOutput({text:e},t){let n=await _7({text:e});if(!n.success)throw new S7({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});let i=await g7({value:n.value,schema:r});if(!i.success)throw new S7({message:`No object generated: response did not match schema.`,cause:i.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return i.value},async parsePartialOutput({text:e}){let t=await P7(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:return{partial:t.value}}},createElementStreamTransform(){}}},Iye=({element:e,name:t,description:n})=>{let r=p7(e);return{name:`array`,responseFormat:v7(r.jsonSchema).then(e=>{let{$schema:r,...i}=e;return{type:`json`,schema:{$schema:`http://json-schema.org/draft-07/schema#`,type:`object`,properties:{elements:{type:`array`,items:i}},required:[`elements`],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}}),async parseCompleteOutput({text:e},t){let n=await _7({text:e});if(!n.success)throw new S7({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});let i=n.value;if(typeof i!=`object`||!i||!(`elements`in i)||!Array.isArray(i.elements))throw new S7({message:`No object generated: response did not match schema.`,cause:new e3({value:i,cause:`response must be an object with an elements array`}),text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});for(let n of i.elements){let i=await g7({value:n,schema:r});if(!i.success)throw new S7({message:`No object generated: response did not match schema.`,cause:i.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason})}return i.elements},async parsePartialOutput({text:e}){let t=await P7(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:{let e=t.value;if(typeof e!=`object`||!e||!(`elements`in e)||!Array.isArray(e.elements))return;let n=t.state===`repaired-parse`&&e.elements.length>0?e.elements.slice(0,-1):e.elements,i=[];for(let e of n){let t=await g7({value:e,schema:r});t.success&&i.push(t.value)}return{partial:i}}}},createElementStreamTransform(){let e=0;return new TransformStream({transform({partialOutput:t},n){if(t!=null)for(;e<t.length;e++)n.enqueue(t[e])}})}}},Lye=({options:e,name:t,description:n})=>({name:`choice`,responseFormat:Promise.resolve({type:`json`,schema:{$schema:`http://json-schema.org/draft-07/schema#`,type:`object`,properties:{result:{type:`string`,enum:e}},required:[`result`],additionalProperties:!1},...t!=null&&{name:t},...n!=null&&{description:n}}),async parseCompleteOutput({text:t},n){let r=await _7({text:t});if(!r.success)throw new S7({message:`No object generated: could not parse the response.`,cause:r.error,text:t,response:n.response,usage:n.usage,finishReason:n.finishReason});let i=r.value;if(typeof i!=`object`||!i||!(`result`in i)||typeof i.result!=`string`||!e.includes(i.result))throw new S7({message:`No object generated: response did not match schema.`,cause:new e3({value:i,cause:`response must be an object that contains a choice value.`}),text:t,response:n.response,usage:n.usage,finishReason:n.finishReason});return i.result},async parsePartialOutput({text:t}){let n=await P7(t);switch(n.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:{let t=n.value;if(typeof t!=`object`||!t||!(`result`in t)||typeof t.result!=`string`)return;let r=e.filter(e=>e.startsWith(t.result));return n.state===`successful-parse`?r.includes(t.result)?{partial:t.result}:void 0:r.length===1?{partial:r[0]}:void 0}}},createElementStreamTransform(){}}),Rye=({name:e,description:t}={})=>({name:`json`,responseFormat:Promise.resolve({type:`json`,...e!=null&&{name:e},...t!=null&&{description:t}}),async parseCompleteOutput({text:e},t){let n=await _7({text:e});if(!n.success)throw new S7({message:`No object generated: could not parse the response.`,cause:n.error,text:e,response:t.response,usage:t.usage,finishReason:t.finishReason});return n.value},async parsePartialOutput({text:e}){let t=await P7(e);switch(t.state){case`failed-parse`:case`undefined-input`:return;case`repaired-parse`:case`successful-parse`:return t.value===void 0?void 0:{partial:t.value}}},createElementStreamTransform(){}});K5({prefix:`aitxt`,size:24}),TransformStream;var F7=x8(Z(),O7.optional()),zye=gye(()=>m7(y8([_8({type:w8(`text-start`),id:Z(),providerMetadata:k7.optional()}),_8({type:w8(`text-delta`),id:Z(),delta:Z(),providerMetadata:k7.optional()}),_8({type:w8(`text-end`),id:Z(),providerMetadata:k7.optional()}),_8({type:w8(`error`),errorText:Z()}),_8({type:w8(`tool-input-start`),toolCallId:Z(),toolName:Z(),providerExecuted:d8().optional(),providerMetadata:k7.optional(),toolMetadata:F7.optional(),dynamic:d8().optional(),title:Z().optional()}),_8({type:w8(`tool-input-delta`),toolCallId:Z(),inputTextDelta:Z()}),_8({type:w8(`tool-input-available`),toolCallId:Z(),toolName:Z(),input:f8(),providerExecuted:d8().optional(),providerMetadata:k7.optional(),toolMetadata:F7.optional(),dynamic:d8().optional(),title:Z().optional()}),_8({type:w8(`tool-input-error`),toolCallId:Z(),toolName:Z(),input:f8(),providerExecuted:d8().optional(),providerMetadata:k7.optional(),toolMetadata:F7.optional(),dynamic:d8().optional(),errorText:Z(),title:Z().optional()}),_8({type:w8(`tool-approval-request`),approvalId:Z(),toolCallId:Z()}),_8({type:w8(`tool-output-available`),toolCallId:Z(),output:f8(),providerExecuted:d8().optional(),providerMetadata:k7.optional(),toolMetadata:F7.optional(),dynamic:d8().optional(),preliminary:d8().optional()}),_8({type:w8(`tool-output-error`),toolCallId:Z(),errorText:Z(),providerExecuted:d8().optional(),providerMetadata:k7.optional(),toolMetadata:F7.optional(),dynamic:d8().optional()}),_8({type:w8(`tool-output-denied`),toolCallId:Z()}),_8({type:w8(`reasoning-start`),id:Z(),providerMetadata:k7.optional()}),_8({type:w8(`reasoning-delta`),id:Z(),delta:Z(),providerMetadata:k7.optional()}),_8({type:w8(`reasoning-end`),id:Z(),providerMetadata:k7.optional()}),_8({type:w8(`source-url`),sourceId:Z(),url:Z(),title:Z().optional(),providerMetadata:k7.optional()}),_8({type:w8(`source-document`),sourceId:Z(),mediaType:Z(),title:Z(),filename:Z().optional(),providerMetadata:k7.optional()}),_8({type:w8(`file`),url:Z(),mediaType:Z(),providerMetadata:k7.optional()}),_8({type:j8(e=>typeof e==`string`&&e.startsWith(`data-`),{message:`Type must start with "data-"`}),id:Z().optional(),data:f8(),transient:d8().optional()}),_8({type:w8(`start-step`)}),_8({type:w8(`finish-step`)}),_8({type:w8(`start`),messageId:Z().optional(),messageMetadata:f8().optional()}),_8({type:w8(`finish`),finishReason:C8([`stop`,`length`,`content-filter`,`tool-calls`,`error`,`other`]).optional(),messageMetadata:f8().optional()}),_8({type:w8(`abort`),reason:Z().optional()}),_8({type:w8(`message-metadata`),messageMetadata:f8()})])));function Bye(e){return e.type.startsWith(`data-`)}function I7(e){return e.type===`text`}function L7(e){return e.type===`reasoning`}function R7(e){return e.type.startsWith(`tool-`)}function z7(e){return e.type===`dynamic-tool`}function B7(e){return R7(e)||z7(e)}function V7(e){return e.type.split(`-`).slice(1).join(`-`)}function H7(e){return z7(e)?e.toolName:V7(e)}function Vye({lastMessage:e,messageId:t}){return{message:e?.role===`assistant`?e:{id:t,metadata:void 0,role:`assistant`,parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Hye({stream:e,messageMetadataSchema:t,dataPartSchemas:n,runUpdateMessageJob:r,onError:i,onToolCall:a,onData:o}){return e.pipeThrough(new TransformStream({async transform(e,s){await r(async({state:r,write:c})=>{function l(e){let t=r.message.parts.filter(B7).find(t=>t.toolCallId===e);if(t==null)throw new E7({chunkType:`tool-invocation`,chunkId:e,message:`No tool invocation found for tool call ID "${e}".`});return t}function u(e){let t=r.message.parts.find(t=>R7(t)&&t.toolCallId===e.toolCallId),n=e,i=t;if(t!=null){t.state=e.state,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput,i.preliminary=n.preliminary,e.title!==void 0&&(i.title=e.title),e.toolMetadata!==void 0&&(i.toolMetadata=e.toolMetadata),i.providerExecuted=n.providerExecuted??t.providerExecuted;let r=n.providerMetadata;if(r!=null)if(e.state===`output-available`||e.state===`output-error`){let e=t;e.resultProviderMetadata=r}else t.callProviderMetadata=r}else r.message.parts.push({type:`tool-${e.toolName}`,toolCallId:e.toolCallId,state:e.state,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},input:n.input,output:n.output,rawInput:n.rawInput,errorText:n.errorText,providerExecuted:n.providerExecuted,preliminary:n.preliminary,...n.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:n.providerMetadata}:{},...n.providerMetadata!=null&&!(e.state===`output-available`||e.state===`output-error`)?{callProviderMetadata:n.providerMetadata}:{}})}function d(e){let t=r.message.parts.find(t=>t.type===`dynamic-tool`&&t.toolCallId===e.toolCallId),n=e,i=t;if(t!=null){t.state=e.state,i.toolName=e.toolName,i.input=n.input,i.output=n.output,i.errorText=n.errorText,i.rawInput=n.rawInput??i.rawInput,i.preliminary=n.preliminary,e.title!==void 0&&(i.title=e.title),e.toolMetadata!==void 0&&(i.toolMetadata=e.toolMetadata),i.providerExecuted=n.providerExecuted??t.providerExecuted;let r=n.providerMetadata;if(r!=null)if(e.state===`output-available`||e.state===`output-error`){let e=t;e.resultProviderMetadata=r}else t.callProviderMetadata=r}else r.message.parts.push({type:`dynamic-tool`,toolName:e.toolName,toolCallId:e.toolCallId,state:e.state,input:n.input,output:n.output,errorText:n.errorText,preliminary:n.preliminary,providerExecuted:n.providerExecuted,title:e.title,...e.toolMetadata===void 0?{}:{toolMetadata:e.toolMetadata},...n.providerMetadata!=null&&(e.state===`output-available`||e.state===`output-error`)?{resultProviderMetadata:n.providerMetadata}:{},...n.providerMetadata!=null&&!(e.state===`output-available`||e.state===`output-error`)?{callProviderMetadata:n.providerMetadata}:{}})}async function f(e){if(e!=null){let n=r.message.metadata==null?e:N7(r.message.metadata,e);t!=null&&await h7({value:n,schema:t,context:{field:`message.metadata`,entityId:r.message.id}}),r.message.metadata=n}}switch(e.type){case`text-start`:{let t={type:`text`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeTextParts[e.id]=t,r.message.parts.push(t),c();break}case`text-delta`:{let t=r.activeTextParts[e.id];if(t==null)throw new E7({chunkType:`text-delta`,chunkId:e.id,message:`Received text-delta for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`text-end`:{let t=r.activeTextParts[e.id];if(t==null)throw new E7({chunkType:`text-end`,chunkId:e.id,message:`Received text-end for missing text part with ID "${e.id}". Ensure a "text-start" chunk is sent before any "text-end" chunks.`});t.state=`done`,t.providerMetadata=e.providerMetadata??t.providerMetadata,delete r.activeTextParts[e.id],c();break}case`reasoning-start`:{let t={type:`reasoning`,text:``,providerMetadata:e.providerMetadata,state:`streaming`};r.activeReasoningParts[e.id]=t,r.message.parts.push(t),c();break}case`reasoning-delta`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new E7({chunkType:`reasoning-delta`,chunkId:e.id,message:`Received reasoning-delta for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-delta" chunks.`});t.text+=e.delta,t.providerMetadata=e.providerMetadata??t.providerMetadata,c();break}case`reasoning-end`:{let t=r.activeReasoningParts[e.id];if(t==null)throw new E7({chunkType:`reasoning-end`,chunkId:e.id,message:`Received reasoning-end for missing reasoning part with ID "${e.id}". Ensure a "reasoning-start" chunk is sent before any "reasoning-end" chunks.`});t.providerMetadata=e.providerMetadata??t.providerMetadata,t.state=`done`,delete r.activeReasoningParts[e.id],c();break}case`file`:r.message.parts.push({type:`file`,mediaType:e.mediaType,url:e.url,...e.providerMetadata==null?{}:{providerMetadata:e.providerMetadata}}),c();break;case`source-url`:r.message.parts.push({type:`source-url`,sourceId:e.sourceId,url:e.url,title:e.title,providerMetadata:e.providerMetadata}),c();break;case`source-document`:r.message.parts.push({type:`source-document`,sourceId:e.sourceId,mediaType:e.mediaType,title:e.title,filename:e.filename,providerMetadata:e.providerMetadata}),c();break;case`tool-input-start`:{let t=r.message.parts.filter(R7);r.partialToolCalls[e.toolCallId]={text:``,toolName:e.toolName,index:t.length,dynamic:e.dynamic,title:e.title,toolMetadata:e.toolMetadata},e.dynamic?d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}):u({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-streaming`,input:void 0,providerExecuted:e.providerExecuted,title:e.title,toolMetadata:e.toolMetadata,providerMetadata:e.providerMetadata}),c();break}case`tool-input-delta`:{let t=r.partialToolCalls[e.toolCallId];if(t==null)throw new E7({chunkType:`tool-input-delta`,chunkId:e.toolCallId,message:`Received tool-input-delta for missing tool call with ID "${e.toolCallId}". Ensure a "tool-input-start" chunk is sent before any "tool-input-delta" chunks.`});t.text+=e.inputTextDelta;let{value:n}=await P7(t.text);t.dynamic?d({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n,title:t.title,toolMetadata:t.toolMetadata}):u({toolCallId:e.toolCallId,toolName:t.toolName,state:`input-streaming`,input:n,title:t.title,toolMetadata:t.toolMetadata}),c();break}case`tool-input-available`:e.dynamic?d({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}):u({toolCallId:e.toolCallId,toolName:e.toolName,state:`input-available`,input:e.input,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:e.title,toolMetadata:e.toolMetadata}),c(),a&&!e.providerExecuted&&await a({toolCall:e});break;case`tool-input-error`:{let t=r.message.parts.filter(B7).find(t=>t.toolCallId===e.toolCallId);(t==null?e.dynamic:t.type===`dynamic-tool`)?d({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}):u({toolCallId:e.toolCallId,toolName:e.toolName,state:`output-error`,input:void 0,rawInput:e.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,toolMetadata:e.toolMetadata}),c();break}case`tool-approval-request`:{let t=l(e.toolCallId);t.state=`approval-requested`,t.approval={id:e.approvalId},c();break}case`tool-output-denied`:{let t=l(e.toolCallId);t.state=`output-denied`,c();break}case`tool-output-available`:{let t=l(e.toolCallId);t.type===`dynamic-tool`?d({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-available`,input:t.input,output:e.output,preliminary:e.preliminary,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}):u({toolCallId:e.toolCallId,toolName:V7(t),state:`output-available`,input:t.input,output:e.output,providerExecuted:e.providerExecuted,preliminary:e.preliminary,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}),c();break}case`tool-output-error`:{let t=l(e.toolCallId);t.type===`dynamic-tool`?d({toolCallId:e.toolCallId,toolName:t.toolName,state:`output-error`,input:t.input,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}):u({toolCallId:e.toolCallId,toolName:V7(t),state:`output-error`,input:t.input,rawInput:t.rawInput,errorText:e.errorText,providerExecuted:e.providerExecuted,providerMetadata:e.providerMetadata,title:t.title,toolMetadata:t.toolMetadata}),c();break}case`start-step`:r.message.parts.push({type:`step-start`});break;case`finish-step`:r.activeTextParts={},r.activeReasoningParts={};break;case`start`:e.messageId!=null&&(r.message.id=e.messageId),await f(e.messageMetadata),(e.messageId!=null||e.messageMetadata!=null)&&c();break;case`finish`:e.finishReason!=null&&(r.finishReason=e.finishReason),await f(e.messageMetadata),e.messageMetadata!=null&&c();break;case`message-metadata`:await f(e.messageMetadata),e.messageMetadata!=null&&c();break;case`error`:i?.(Error(e.errorText));break;default:if(Bye(e)){if(n?.[e.type]!=null){let t=r.message.parts.findIndex(t=>`id`in t&&`data`in t&&t.id===e.id&&t.type===e.type),i=t>=0?t:r.message.parts.length;await h7({value:e.data,schema:n[e.type],context:{field:`message.parts[${i}].data`,entityName:e.type,entityId:e.id}})}let t=e;if(t.transient){o?.(t);break}let i=t.id==null?void 0:r.message.parts.find(e=>t.type===e.type&&t.id===e.id);i==null?r.message.parts.push(t):i.data=t.data,o?.(t),c()}}s.enqueue(e)})}}))}async function Uye({stream:e,onError:t}){let n=e.getReader();try{for(;;){let{done:e}=await n.read();if(e)break}}catch(e){t?.(e)}finally{n.releaseLock()}}K5({prefix:`aitxt`,size:24}),x8(Z(),O7.optional()),K5({prefix:`aiobj`,size:24});var Wye=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,n)=>{this.queue.push(async()=>{try{await e(),t()}catch(e){n(e)}}),this.processQueue()})}};K5({prefix:`aiobj`,size:24});async function Gye(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw Error(`FileList is not supported in the current environment`);return Promise.all(Array.from(e).map(async e=>{let{name:t,type:n}=e;return{type:`file`,mediaType:n,filename:t,url:await new Promise((t,n)=>{let r=new FileReader;r.onload=e=>{t(e.target?.result)},r.onerror=e=>n(e),r.readAsDataURL(e)})}}))}var Kye=class{constructor({api:e=`/api/chat`,credentials:t,headers:n,body:r,fetch:i,prepareSendMessagesRequest:a,prepareReconnectToStreamRequest:o}){this.api=e,this.credentials=t,this.headers=n,this.body=r,this.fetch=i,this.prepareSendMessagesRequest=a,this.prepareReconnectToStreamRequest=o}async sendMessages({abortSignal:e,...t}){let n=await v7(this.body),r=await v7(this.headers),i=await v7(this.credentials),a={...q5(r),...q5(t.headers)},o=await this.prepareSendMessagesRequest?.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...n,...t.body},headers:a,credentials:i,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId}),s=o?.api??this.api,c=o?.headers===void 0?a:q5(o.headers),l=o?.body===void 0?{...n,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId}:o.body,u=o?.credentials??i,d=await(this.fetch??globalThis.fetch)(s,{method:`POST`,headers:{"Content-Type":`application/json`,...c},body:JSON.stringify(l),credentials:u,signal:e});if(!d.ok)throw Error(await d.text()??`Failed to fetch the chat response.`);if(!d.body)throw Error(`The response body is empty.`);return this.processResponseStream(d.body)}async reconnectToStream(e){let t=await v7(this.body),n=await v7(this.headers),r=await v7(this.credentials),i={...q5(n),...q5(e.headers)},a=await this.prepareReconnectToStreamRequest?.call(this,{api:this.api,id:e.chatId,body:{...t,...e.body},headers:i,credentials:r,requestMetadata:e.metadata}),o=a?.api??`${this.api}/${e.chatId}/stream`,s=a?.headers===void 0?i:q5(a.headers),c=a?.credentials??r,l=await(this.fetch??globalThis.fetch)(o,{method:`GET`,headers:s,credentials:c});if(l.status===204)return null;if(!l.ok)throw Error(await l.text()??`Failed to fetch the chat response.`);if(!l.body)throw Error(`The response body is empty.`);return this.processResponseStream(l.body)}},qye=class extends Kye{constructor(e={}){super(e)}processResponseStream(e){return Sye({stream:e,schema:zye}).pipeThrough(new TransformStream({async transform(e,t){if(!e.success)throw e.error;t.enqueue(e.value)}}))}},Jye=class{constructor({generateId:e=Tve,id:t=e(),transport:n=new qye,messageMetadataSchema:r,dataPartSchemas:i,state:a,onError:o,onToolCall:s,onFinish:c,onData:l,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new Wye,this.sendMessage=async(e,t)=>{if(e==null){await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...t});return}let n;if(n=`text`in e||`files`in e?{parts:[...Array.isArray(e.files)?e.files:await Gye(e.files),...`text`in e&&e.text!=null?[{type:`text`,text:e.text}]:[]]}:e,e.messageId!=null){let t=this.state.messages.findIndex(t=>t.id===e.messageId);if(t===-1)throw Error(`message with id ${e.messageId} not found`);if(this.state.messages[t].role!==`user`)throw Error(`message with id ${e.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,t+1),this.state.replaceMessage(t,{...n,id:e.messageId,role:n.role??`user`,metadata:e.metadata})}else this.state.pushMessage({...n,id:n.id??this.generateId(),role:n.role??`user`,metadata:e.metadata});await this.makeRequest({trigger:`submit-message`,messageId:e.messageId,...t})},this.regenerate=async({messageId:e,...t}={})=>{let n=e==null?this.state.messages.length-1:this.state.messages.findIndex(t=>t.id===e);if(n===-1)throw Error(`message ${e} not found`);this.state.messages=this.state.messages.slice(0,this.messages[n].role===`assistant`?n:n+1),await this.makeRequest({trigger:`regenerate-message`,messageId:e,...t})},this.resumeStream=async(e={})=>{await this.makeRequest({trigger:`resume-stream`,...e})},this.clearError=()=>{this.status===`error`&&(this.state.error=void 0,this.setStatus({status:`ready`}))},this.addToolApprovalResponse=async({id:e,approved:t,reason:n,options:r})=>this.jobExecutor.run(async()=>{let i=this.state.messages,a=i[i.length-1],o=r=>B7(r)&&r.state===`approval-requested`&&r.approval.id===e?{...r,state:`approval-responded`,approval:{id:e,approved:t,reason:n}}:r;this.state.replaceMessage(i.length-1,{...a,parts:a.parts.map(o)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(o)),this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(e=>{e&&this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...r})})}),this.addToolOutput=async({state:e=`output-available`,toolCallId:t,output:n,errorText:r,options:i})=>this.jobExecutor.run(async()=>{let a=this.state.messages,o=a[a.length-1],s=i=>B7(i)&&i.toolCallId===t?{...i,state:e,output:n,errorText:r}:i;this.state.replaceMessage(a.length-1,{...o,parts:o.parts.map(s)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(s)),this.status!==`streaming`&&this.status!==`submitted`&&this.sendAutomaticallyWhen&&this.shouldSendAutomatically().then(e=>{e&&this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,...i})})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{this.status!==`streaming`&&this.status!==`submitted`||this.activeResponse?.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=n,this.generateId=e,this.messageMetadataSchema=r,this.dataPartSchemas=i,this.state=a,this.onError=o,this.onToolCall=s,this.onFinish=c,this.onData=l,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async shouldSendAutomatically(){if(!this.sendAutomaticallyWhen)return!1;let e=this.sendAutomaticallyWhen({messages:this.state.messages});return e&&typeof e==`object`&&`then`in e?await e:e}async makeRequest({trigger:e,metadata:t,headers:n,body:r,messageId:i}){var a;let o;if(e===`resume-stream`)try{let e=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:n,body:r});if(e==null)return;o=e}catch(e){this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e});return}this.setStatus({status:`submitted`,error:void 0});let s=this.lastMessage,c=!1,l=!1,u=!1;try{let a={state:Vye({lastMessage:this.state.snapshot(s),messageId:this.generateId()}),abortController:new AbortController};a.abortController.signal.addEventListener(`abort`,()=>{c=!0}),this.activeResponse=a;let l;l=e===`resume-stream`?o:await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:a.abortController.signal,metadata:t,headers:n,body:r,trigger:e,messageId:i}),await Uye({stream:Hye({stream:l,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:e=>this.jobExecutor.run(()=>e({state:a.state,write:()=>{this.setStatus({status:`streaming`}),a.state.message.id===this.lastMessage?.id?this.state.replaceMessage(this.state.messages.length-1,a.state.message):this.state.pushMessage(a.state.message)}})),onError:e=>{throw e}}),onError:e=>{throw e}}),this.setStatus({status:`ready`})}catch(e){if(c||e.name===`AbortError`)return c=!0,this.setStatus({status:`ready`}),null;u=!0,e instanceof TypeError&&(e.message.toLowerCase().includes(`fetch`)||e.message.toLowerCase().includes(`network`))&&(l=!0),this.onError&&e instanceof Error&&this.onError(e),this.setStatus({status:`error`,error:e})}finally{try{(a=this.onFinish)==null||a.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:c,isDisconnect:l,isError:u,finishReason:this.activeResponse?.state.finishReason})}catch(e){console.error(e)}this.activeResponse=void 0}!u&&await this.shouldSendAutomatically()&&await this.makeRequest({trigger:`submit-message`,messageId:this.lastMessage?.id,metadata:t,headers:n,body:r})}};new TextEncoder;function U7(e){if(typeof e==`object`&&e&&!Array.isArray(e))return e}var W7=class{constructor(e){this.messageId=e.messageId,this._isContinuation=e.continuation??!1,this.parts=e.existingParts?[...e.existingParts]:[],this.metadata=e.existingMetadata?{...e.existingMetadata}:void 0}applyChunk(e){let t=npe(this.parts,e);if(e.type===`tool-approval-request`&&e.toolCallId)return{handled:t,action:{type:`tool-approval-request`,toolCallId:e.toolCallId}};if((e.type===`tool-output-available`||e.type===`tool-output-error`)&&e.toolCallId&&!this.parts.some(t=>`toolCallId`in t&&t.toolCallId===e.toolCallId))return{handled:t,action:{type:`cross-message-tool-update`,updateType:e.type===`tool-output-available`?`output-available`:`output-error`,toolCallId:e.toolCallId,output:e.output,errorText:e.errorText,preliminary:e.preliminary}};if(!t)switch(e.type){case`start`:{e.messageId!=null&&!this._isContinuation&&(this.messageId=e.messageId);let t=U7(e.messageMetadata);return t&&(this.metadata=this.metadata?{...this.metadata,...t}:{...t}),{handled:!0,action:{type:`start`,messageId:e.messageId,metadata:t}}}case`finish`:{let t=U7(e.messageMetadata);return t&&(this.metadata=this.metadata?{...this.metadata,...t}:{...t}),{handled:!0,action:{type:`finish`,finishReason:`finishReason`in e?e.finishReason:void 0,metadata:t}}}case`message-metadata`:{let t=U7(e.messageMetadata);return t&&(this.metadata=this.metadata?{...this.metadata,...t}:{...t}),{handled:!0,action:{type:`message-metadata`,metadata:t??{}}}}case`finish-step`:return{handled:!0};case`error`:return{handled:!0,action:{type:`error`,error:e.errorText??JSON.stringify(e)}}}return{handled:t}}toMessage(){return{id:this.messageId,role:`assistant`,parts:[...this.parts],...this.metadata!=null&&{metadata:this.metadata}}}mergeInto(e){let t=e.findIndex(e=>e.id===this.messageId);if(t<0&&this._isContinuation){for(let n=e.length-1;n>=0;n--)if(e[n].role===`assistant`){t=n;break}}let n={id:t>=0?e[t].id:this.messageId,role:`assistant`,parts:[...this.parts],...this.metadata!=null&&{metadata:this.metadata}};if(t>=0){let r=[...e];return r[t]=n,r}return[...e,n]}};function G7(e,t){switch(t.type){case`clear`:return{state:{status:`idle`},isStreaming:!1};case`resume-fallback`:{let e=new W7({messageId:t.messageId});return{state:{status:`observing`,streamId:t.streamId,accumulator:e},isStreaming:!0}}case`response`:{let n;if(e.status===`idle`||e.streamId!==t.streamId){let e=t.messageId,r,i;if(t.continuation&&t.currentMessages){for(let n=t.currentMessages.length-1;n>=0;n--)if(t.currentMessages[n].role===`assistant`){e=t.currentMessages[n].id,r=[...t.currentMessages[n].parts],t.currentMessages[n].metadata!=null&&(i={...t.currentMessages[n].metadata});break}}n=new W7({messageId:e,continuation:t.continuation,existingParts:r,existingMetadata:i})}else n=e.accumulator;t.chunkData&&n.applyChunk(t.chunkData);let r;return t.done?(r=e=>n.mergeInto(e),{state:{status:`idle`},messagesUpdate:r,isStreaming:!1}):((t.chunkData&&!t.replay||t.replayComplete)&&(r=e=>n.mergeInto(e)),{state:{status:`observing`,streamId:t.streamId,accumulator:n},messagesUpdate:r,isStreaming:!0})}}}var K7={CHAT_MESSAGES:`cf_agent_chat_messages`,USE_CHAT_REQUEST:`cf_agent_use_chat_request`,USE_CHAT_RESPONSE:`cf_agent_use_chat_response`,CHAT_CLEAR:`cf_agent_chat_clear`,CHAT_REQUEST_CANCEL:`cf_agent_chat_request_cancel`,STREAM_RESUMING:`cf_agent_stream_resuming`,STREAM_RESUME_ACK:`cf_agent_stream_resume_ack`,STREAM_RESUME_REQUEST:`cf_agent_stream_resume_request`,STREAM_RESUME_NONE:`cf_agent_stream_resume_none`,TOOL_RESULT:`cf_agent_tool_result`,TOOL_APPROVAL:`cf_agent_tool_approval`,MESSAGE_UPDATED:`cf_agent_message_updated`},Yye=10,Xye=100,Zye=600*1e3,Qye=1440*60*1e3,$ye=new TextEncoder,ebe=class e{constructor(e){this.sql=e,this._activeStreamId=null,this._activeRequestId=null,this._streamChunkIndex=0,this._isLive=!1,this._chunkBuffer=[],this._isFlushingChunks=!1,this._lastCleanupTime=0,this.sql`create table if not exists cf_ai_chat_stream_chunks (
418
+ id text primary key,
419
+ stream_id text not null,
420
+ body text not null,
421
+ chunk_index integer not null,
422
+ created_at integer not null
423
+ )`,this.sql`create table if not exists cf_ai_chat_stream_metadata (
424
+ id text primary key,
425
+ request_id text not null,
426
+ status text not null,
427
+ created_at integer not null,
428
+ completed_at integer
429
+ )`,this.sql`create index if not exists idx_stream_chunks_stream_id
430
+ on cf_ai_chat_stream_chunks(stream_id, chunk_index)`,this.restore()}get activeStreamId(){return this._activeStreamId}get activeRequestId(){return this._activeRequestId}hasActiveStream(){return this._activeStreamId!==null}get isLive(){return this._isLive}start(e){this.flushBuffer();let t=zK();return this._activeStreamId=t,this._activeRequestId=e,this._streamChunkIndex=0,this._isLive=!0,this.sql`
431
+ insert into cf_ai_chat_stream_metadata (id, request_id, status, created_at)
432
+ values (${t}, ${e}, 'streaming', ${Date.now()})
433
+ `,t}complete(e){this.flushBuffer(),this.sql`
434
+ update cf_ai_chat_stream_metadata
435
+ set status = 'completed', completed_at = ${Date.now()}
436
+ where id = ${e}
437
+ `,this._activeStreamId=null,this._activeRequestId=null,this._streamChunkIndex=0,this._isLive=!1,this._maybeCleanupOldStreams()}markError(e){this.flushBuffer(),this.sql`
438
+ update cf_ai_chat_stream_metadata
439
+ set status = 'error', completed_at = ${Date.now()}
440
+ where id = ${e}
441
+ `,this._activeStreamId=null,this._activeRequestId=null,this._streamChunkIndex=0,this._isLive=!1}storeChunk(t,n){let r=$ye.encode(n).byteLength;if(r>e.CHUNK_MAX_BYTES){console.warn(`[ResumableStream] Skipping oversized chunk (${r} bytes) to prevent SQLite row limit crash. Live clients still receive it.`);return}this._chunkBuffer.length>=Xye&&this.flushBuffer(),this._chunkBuffer.push({id:zK(),streamId:t,body:n,index:this._streamChunkIndex}),this._streamChunkIndex++,this._chunkBuffer.length>=Yye&&this.flushBuffer()}flushBuffer(){if(!(this._isFlushingChunks||this._chunkBuffer.length===0)){this._isFlushingChunks=!0;try{let e=this._chunkBuffer;this._chunkBuffer=[];let t=Date.now();for(let n of e)this.sql`
442
+ insert into cf_ai_chat_stream_chunks (id, stream_id, body, chunk_index, created_at)
443
+ values (${n.id}, ${n.streamId}, ${n.body}, ${n.index}, ${t})
444
+ `}finally{this._isFlushingChunks=!1}}}replayChunks(e,t){let n=this._activeStreamId;if(!n)return null;this.flushBuffer();let r=this.sql`
445
+ select * from cf_ai_chat_stream_chunks
446
+ where stream_id = ${n}
447
+ order by chunk_index asc
448
+ `;for(let n of r||[])e.send(JSON.stringify({body:n.body,done:!1,id:t,type:K7.USE_CHAT_RESPONSE,replay:!0}));return this._activeStreamId===n?this._isLive?(e.send(JSON.stringify({body:``,done:!1,id:t,type:K7.USE_CHAT_RESPONSE,replay:!0,replayComplete:!0})),null):(e.send(JSON.stringify({body:``,done:!0,id:t,type:K7.USE_CHAT_RESPONSE,replay:!0})),this.complete(n),n):(e.send(JSON.stringify({body:``,done:!0,id:t,type:K7.USE_CHAT_RESPONSE,replay:!0})),null)}replayCompletedChunksByRequestId(e,t){this.flushBuffer();let n=this.sql`
449
+ select * from cf_ai_chat_stream_metadata
450
+ where request_id = ${t}
451
+ and status = 'completed'
452
+ order by created_at desc
453
+ limit 1
454
+ `[0];if(!n)return!1;let r=this.sql`
455
+ select * from cf_ai_chat_stream_chunks
456
+ where stream_id = ${n.id}
457
+ order by chunk_index asc
458
+ `;for(let n of r||[])e.send(JSON.stringify({body:n.body,done:!1,id:t,type:K7.USE_CHAT_RESPONSE,replay:!0}));return e.send(JSON.stringify({body:``,done:!0,id:t,type:K7.USE_CHAT_RESPONSE,replay:!0})),!0}restore(){let e=this.sql`
459
+ select * from cf_ai_chat_stream_metadata
460
+ where status = 'streaming'
461
+ order by created_at desc
462
+ limit 1
463
+ `;if(e&&e.length>0){let t=e[0];this._activeStreamId=t.id,this._activeRequestId=t.request_id;let n=this.sql`
464
+ select max(chunk_index) as max_index
465
+ from cf_ai_chat_stream_chunks
466
+ where stream_id = ${this._activeStreamId}
467
+ `;this._streamChunkIndex=n&&n[0]?.max_index!=null?n[0].max_index+1:0}}clearAll(){this._chunkBuffer=[],this.sql`delete from cf_ai_chat_stream_chunks`,this.sql`delete from cf_ai_chat_stream_metadata`,this._activeStreamId=null,this._activeRequestId=null,this._streamChunkIndex=0}destroy(){this.flushBuffer(),this.sql`drop table if exists cf_ai_chat_stream_chunks`,this.sql`drop table if exists cf_ai_chat_stream_metadata`,this._activeStreamId=null,this._activeRequestId=null}_maybeCleanupOldStreams(){let e=Date.now();if(e-this._lastCleanupTime<Zye)return;this._lastCleanupTime=e;let t=e-Qye;this.sql`
468
+ delete from cf_ai_chat_stream_chunks
469
+ where stream_id in (
470
+ select id from cf_ai_chat_stream_metadata
471
+ where status in ('completed', 'error') and completed_at < ${t}
472
+ )
473
+ `,this.sql`
474
+ delete from cf_ai_chat_stream_metadata
475
+ where status in ('completed', 'error') and completed_at < ${t}
476
+ `,this.sql`
477
+ delete from cf_ai_chat_stream_chunks
478
+ where stream_id in (
479
+ select id from cf_ai_chat_stream_metadata
480
+ where status = 'streaming' and created_at < ${t}
481
+ )
482
+ `,this.sql`
483
+ delete from cf_ai_chat_stream_metadata
484
+ where status = 'streaming' and created_at < ${t}
485
+ `}getStreamChunks(e){return this.sql`
486
+ select body, chunk_index from cf_ai_chat_stream_chunks
487
+ where stream_id = ${e}
488
+ order by chunk_index asc
489
+ `||[]}getStreamMetadata(e){let t=this.sql`
490
+ select status, request_id from cf_ai_chat_stream_metadata
491
+ where id = ${e}
492
+ `;return t&&t.length>0?t[0]:null}getAllStreamMetadata(){return this.sql`select id, status, request_id, created_at from cf_ai_chat_stream_metadata`||[]}insertStaleStream(e,t,n){let r=Date.now()-n;this.sql`
493
+ insert into cf_ai_chat_stream_metadata (id, request_id, status, created_at)
494
+ values (${e}, ${t}, 'streaming', ${r})
495
+ `}};ebe.CHUNK_MAX_BYTES=18e5,K7.STREAM_RESUME_NONE;var tbe=n(i(((e,t)=>{function n(e,t){if(typeof e!=`function`)throw TypeError(`Expected the first argument to be a \`function\`, got \`${typeof e}\`.`);let n,r=0;return function(...i){clearTimeout(n);let a=Date.now(),o=t-(a-r);o<=0?(r=a,e.apply(this,i)):n=setTimeout(()=>{r=Date.now(),e.apply(this,i)},o)}}t.exports=n}))(),1),q7=(e,t,n)=>{if(!t.has(e))throw TypeError(`Cannot `+n)},J7=(e,t,n)=>(q7(e,t,`read from private field`),n?n.call(e):t.get(e)),Y7=(e,t,n)=>{if(t.has(e))throw TypeError(`Cannot add the same private member more than once`);t instanceof WeakSet?t.add(e):t.set(e,n)},X7=(e,t,n,r)=>(q7(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n);function nbe(e,t){return t==null?e:(0,tbe.default)(e,t)}var Z7,Q7,$7,e9,t9,n9,r9,i9,a9,rbe=class{constructor(e=[]){Y7(this,Z7,void 0),Y7(this,Q7,`ready`),Y7(this,$7,void 0),Y7(this,e9,new Set),Y7(this,t9,new Set),Y7(this,n9,new Set),this.pushMessage=e=>{X7(this,Z7,J7(this,Z7).concat(e)),J7(this,r9).call(this)},this.popMessage=()=>{X7(this,Z7,J7(this,Z7).slice(0,-1)),J7(this,r9).call(this)},this.replaceMessage=(e,t)=>{X7(this,Z7,[...J7(this,Z7).slice(0,e),this.snapshot(t),...J7(this,Z7).slice(e+1)]),J7(this,r9).call(this)},this.snapshot=e=>structuredClone(e),this[`~registerMessagesCallback`]=(e,t)=>{let n=t?nbe(e,t):e;return J7(this,e9).add(n),()=>{J7(this,e9).delete(n)}},this[`~registerStatusCallback`]=e=>(J7(this,t9).add(e),()=>{J7(this,t9).delete(e)}),this[`~registerErrorCallback`]=e=>(J7(this,n9).add(e),()=>{J7(this,n9).delete(e)}),Y7(this,r9,()=>{J7(this,e9).forEach(e=>e())}),Y7(this,i9,()=>{J7(this,t9).forEach(e=>e())}),Y7(this,a9,()=>{J7(this,n9).forEach(e=>e())}),X7(this,Z7,e)}get status(){return J7(this,Q7)}set status(e){X7(this,Q7,e),J7(this,i9).call(this)}get error(){return J7(this,$7)}set error(e){X7(this,$7,e),J7(this,a9).call(this)}get messages(){return J7(this,Z7)}set messages(e){X7(this,Z7,[...e]),J7(this,r9).call(this)}};Z7=new WeakMap,Q7=new WeakMap,$7=new WeakMap,e9=new WeakMap,t9=new WeakMap,n9=new WeakMap,r9=new WeakMap,i9=new WeakMap,a9=new WeakMap;var o9,s9=class extends Jye{constructor({messages:e,...t}){let n=new rbe(e);super({...t,state:n}),Y7(this,o9,void 0),this[`~registerMessagesCallback`]=(e,t)=>J7(this,o9)[`~registerMessagesCallback`](e,t),this[`~registerStatusCallback`]=e=>J7(this,o9)[`~registerStatusCallback`](e),this[`~registerErrorCallback`]=e=>J7(this,o9)[`~registerErrorCallback`](e),X7(this,o9,n)}};o9=new WeakMap;function ibe({experimental_throttle:e,resume:t=!1,...n}={}){let r=(0,L.useRef)(`chat`in n?{}:{onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});`chat`in n||(r.current={onToolCall:n.onToolCall,onData:n.onData,onFinish:n.onFinish,onError:n.onError,sendAutomaticallyWhen:n.sendAutomaticallyWhen});let i={...n,onToolCall:e=>{var t;return(t=r.current).onToolCall?.call(t,e)},onData:e=>{var t;return(t=r.current).onData?.call(t,e)},onFinish:e=>{var t;return(t=r.current).onFinish?.call(t,e)},onError:e=>{var t;return(t=r.current).onError?.call(t,e)},sendAutomaticallyWhen:e=>{var t;return(t=r.current).sendAutomaticallyWhen?.call(t,e)??!1}},a=(0,L.useRef)(`chat`in n?n.chat:new s9(i));(`chat`in n&&n.chat!==a.current||`id`in n&&a.current.id!==n.id)&&(a.current=`chat`in n?n.chat:new s9(i));let o=(0,L.useSyncExternalStore)((0,L.useCallback)(t=>a.current[`~registerMessagesCallback`](t,e),[e,a.current.id]),()=>a.current.messages,()=>a.current.messages),s=(0,L.useSyncExternalStore)(a.current[`~registerStatusCallback`],()=>a.current.status,()=>a.current.status),c=(0,L.useSyncExternalStore)(a.current[`~registerErrorCallback`],()=>a.current.error,()=>a.current.error),l=(0,L.useCallback)(e=>{typeof e==`function`&&(e=e(a.current.messages)),a.current.messages=e},[a]);return(0,L.useEffect)(()=>{t&&a.current.resumeStream()},[t,a]),{id:a.current.id,messages:o,setMessages:l,sendMessage:a.current.sendMessage,regenerate:a.current.regenerate,clearError:a.current.clearError,stop:a.current.stop,error:c,resumeStream:a.current.resumeStream,status:s,addToolResult:a.current.addToolOutput,addToolOutput:a.current.addToolOutput,addToolApprovalResponse:a.current.addToolApprovalResponse}}var abe=class{constructor(e){this._resumeResolver=null,this._resumeNoneResolver=null,this._expectToolContinuation=!1,this._abortToolContinuation=null,this.agent=e.agent,this.prepareBody=e.prepareBody,this.activeRequestIds=e.activeRequestIds}expectToolContinuation(){this._expectToolContinuation=!0}abortActiveToolContinuation(){return this._abortToolContinuation?.()??!1}isAwaitingResume(){return this._resumeResolver!==null||this._resumeNoneResolver!==null}handleStreamResuming(e){return this._resumeResolver?(this._resumeResolver(e),!0):!1}handleStreamResumeNone(){return this._resumeNoneResolver?(this._resumeNoneResolver(),!0):!1}async sendMessages(e){let t=zK(8),n=new AbortController,r=!1,i={};this.prepareBody&&(i=await this.prepareBody({messages:e.messages,trigger:e.trigger,messageId:e.messageId})),e.body&&(i={...i,...e.body});let a=JSON.stringify({messages:e.messages,trigger:e.trigger,...i});this.activeRequestIds?.add(t);let o=this.agent,s=this.activeRequestIds,c=(e,i=!1)=>{if(!r){r=!0;try{e()}catch{}i||s?.delete(t),n.abort()}},l=Error(`Aborted`);l.name=`AbortError`;let u=()=>{if(!r){try{o.send(JSON.stringify({id:t,type:`cf_agent_chat_request_cancel`}))}catch{}c(()=>d.error(l),!0)}},d,f=new ReadableStream({start(e){d=e,o.addEventListener(`message`,n=>{try{let r=JSON.parse(n.data);if(r.type!==`cf_agent_use_chat_response`||r.id!==t)return;if(r.error){c(()=>e.error(Error(r.body||`Stream error`)));return}if(r.body?.trim())try{let t=JSON.parse(r.body);e.enqueue(t)}catch{}r.done&&c(()=>e.close())}catch{}},{signal:n.signal})},cancel(){u()}});return e.abortSignal&&(e.abortSignal.addEventListener(`abort`,u,{once:!0}),e.abortSignal.aborted&&u()),o.send(JSON.stringify({id:t,init:{method:`POST`,body:a},type:`cf_agent_use_chat_request`})),f}async reconnectToStream(e){if(this._expectToolContinuation)return this._expectToolContinuation=!1,this._createToolContinuationStream();let t=this.activeRequestIds;return new Promise(e=>{let n=!1,r,i=t=>{n||(n=!0,this._resumeResolver=null,this._resumeNoneResolver=null,r&&clearTimeout(r),e(t))};this._resumeNoneResolver=()=>i(null),this._resumeResolver=e=>{let n=e.id;t?.add(n);let r=this._createResumeStream(n);this.agent.send(JSON.stringify({type:`cf_agent_stream_resume_ack`,id:n})),i(r)};try{this.agent.send(JSON.stringify({type:`cf_agent_stream_resume_request`}))}catch{}r=setTimeout(()=>i(null),5e3)})}_createToolContinuationStream(){let e=this.agent,t=this.activeRequestIds,n=new AbortController,r=Error(`Aborted`);r.name=`AbortError`;let i=!1,a=null,o,s=null,c=null,l=(e,t)=>{if(e===void 0&&t===void 0){this._resumeResolver=null,this._resumeNoneResolver=null;return}e&&this._resumeResolver===e&&(this._resumeResolver=null),t&&this._resumeNoneResolver===t&&(this._resumeNoneResolver=null)},u=(e,r,o,s=!1)=>{if(!i){i=!0,this._abortToolContinuation=null,l(r,o);try{e()}catch{}a&&!s&&t?.delete(a),n.abort()}};this._abortToolContinuation=()=>{if(i)return!1;if(a===null)return u(()=>o.error(r),s,c),!0;try{e.send(JSON.stringify({type:`cf_agent_chat_request_cancel`,id:a}))}catch{}return u(()=>o.error(r),s,c,!0),!0};let d=this;return new ReadableStream({start(r){o=r;let i,f=()=>{i&&clearTimeout(i),u(()=>r.close(),p,f)},p=n=>{a||(a=n.id,t?.add(a),l(p,f),i&&clearTimeout(i),e.send(JSON.stringify({type:`cf_agent_stream_resume_ack`,id:a})))};s=p,c=f,i=setTimeout(()=>u(()=>r.close(),p,f),5e3),d._resumeResolver=p,d._resumeNoneResolver=f,e.addEventListener(`message`,e=>{try{let t=JSON.parse(e.data);if(t.type!==`cf_agent_use_chat_response`||a==null||t.id!==a)return;if(t.error){u(()=>r.error(Error(t.body||`Stream error`)),p,f);return}if(t.body?.trim())try{let e=JSON.parse(t.body);r.enqueue(e)}catch{}t.done&&u(()=>r.close(),p,f)}catch{}},{signal:n.signal});try{e.send(JSON.stringify({type:`cf_agent_stream_resume_request`}))}catch{u(()=>r.close())}},cancel(){u(()=>{})}})}_createResumeStream(e){let t=this.agent,n=this.activeRequestIds,r=new AbortController,i=!1,a=t=>{if(!i){i=!0;try{t()}catch{}n?.delete(e),r.abort()}};return new ReadableStream({start(n){t.addEventListener(`message`,t=>{try{let r=JSON.parse(t.data);if(r.type!==`cf_agent_use_chat_response`||r.id!==e)return;if(r.error){a(()=>n.error(Error(r.body||`Stream error`)));return}if(r.body?.trim())try{let e=JSON.parse(r.body);n.enqueue(e)}catch{}r.done&&a(()=>n.close())}catch{}},{signal:r.signal})},cancel(){a(()=>{})}})}},c9=new Set;function l9(e,t){c9.has(e)||(c9.add(e),console.warn(`[@cloudflare/ai-chat] Deprecated: ${t}`))}function u9(e){if(!e)return;let t=Object.entries(e).filter(([e,t])=>t.execute).map(([e,t])=>(t.inputSchema&&!t.parameters&&console.warn(`[useAgentChat] Tool "${e}" uses deprecated 'inputSchema'. Please migrate to 'parameters'.`),{name:e,description:t.description,parameters:t.parameters??t.inputSchema}));return t.length>0?t:void 0}var d9=new Map;function obe(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.role===`assistant`)return{index:t,message:n}}return null}function sbe(e,t){let n=e.findIndex(e=>e.id===t);if(n<0||n===e.length-1)return e;let r=[...e],[i]=r.splice(n,1);return i?(r.push(i),r):e}function cbe(e){let{agent:t,getInitialMessages:n,messages:r,onToolCall:i,onData:a,experimental_automaticToolResolution:o,tools:s,toolsRequiringConfirmation:c,autoContinueAfterToolResult:l=!0,autoSendAfterAllConfirmationsResolved:u=!0,resume:d=!0,body:f,prepareSendMessagesRequest:p,...m}=e;c&&l9(`useAgentChat.toolsRequiringConfirmation`,`The 'toolsRequiringConfirmation' option is deprecated. Use needsApproval on server-side tools instead. Will be removed in the next major version.`),o&&l9(`useAgentChat.experimental_automaticToolResolution`,`The 'experimental_automaticToolResolution' option is deprecated. Use the onToolCall callback instead. Will be removed in the next major version.`),e.autoSendAfterAllConfirmationsResolved!==void 0&&l9(`useAgentChat.autoSendAfterAllConfirmationsResolved`,`The 'autoSendAfterAllConfirmationsResolved' option is deprecated. Use sendAutomaticallyWhen from AI SDK instead. Will be removed in the next major version.`);let h=(0,L.useMemo)(()=>c||(s?Object.entries(s).filter(([e,t])=>!t.execute).map(([e])=>e):[]),[c,s]),g=(0,L.useRef)(i);g.current=i;let _=(0,L.useRef)(a);_.current=a;let v=t.getHttpUrl(),y=v?new URL(v):null;y&&y.searchParams.delete(`_pk`);let b=y?.toString()??null,x=Array.isArray(t.path)?JSON.stringify(t.path.map(e=>[e.agent,e.name])):JSON.stringify([[t.agent??``,t.name??``]]),S=y?`${y.origin}${y.pathname}|${x}`:null,C=x,w=(0,L.useRef)(null),T=(0,L.useRef)(null),E=(0,L.useRef)(null),D=x,O=Array.isArray(t.path)&&E.current!==null&&E.current!==x;w.current===null||T.current!==t||O?w.current=S??D:S&&w.current===D&&(w.current=S),T.current=t,E.current=x;let k=(0,L.useRef)(t);k.current=t;async function ee({url:t}){if(!t)return[];let n=new URL(t);n.pathname+=`/get-messages`;let r=await fetch(n.toString(),{credentials:e.credentials,headers:e.headers});if(!r.ok)return console.warn(`Failed to fetch initial messages: ${r.status} ${r.statusText}`),[];let i=await r.text();if(!i.trim())return[];try{return JSON.parse(i)}catch(e){return console.warn(`Failed to parse initial messages JSON:`,e),[]}}let A=n||ee;function j(e,t){if(d9.has(t))return d9.get(t);let n=A(e);return d9.set(t,n),n}let M=n!==null&&(n||b)?j({agent:t.agent,name:t.name,url:b??void 0},C):null,N=M?(0,L.use)(M):r??[];(0,L.useEffect)(()=>{if(M)return d9.set(C,M),()=>{d9.get(C)===M&&d9.delete(C)}},[C,M]);let P=(0,L.useRef)(s);P.current=s;let F=(0,L.useRef)(p);F.current=p;let te=(0,L.useRef)(f);te.current=f;let ne=(0,L.useRef)(new Set),re=(0,L.useRef)(new Set),ie=(0,L.useRef)(new Set),ae=(0,L.useRef)(null);ae.current===null&&(ae.current=new abe({agent:k.current,activeRequestIds:ne.current,prepareBody:async({messages:e,trigger:t,messageId:n})=>{let r={},i=te.current;if(i&&(r={...typeof i==`function`?await i():i}),P.current){let e=u9(P.current);e&&(r.clientTools=e)}if(F.current){let i=await F.current({id:k.current._pk,messages:e,trigger:t,messageId:n});i.body&&Object.assign(r,i.body)}return r}})),ae.current.agent=k.current;let oe=ae.current,se=ibe({...m,onData:a,messages:N,transport:oe,id:w.current,resume:d}),{messages:I,setMessages:ce,addToolResult:le,addToolApprovalResponse:ue,sendMessage:de,resumeStream:fe,status:pe,stop:me}=se,he=(0,L.useRef)(pe);he.current=pe;let ge=(0,L.useRef)(!1),_e=(0,L.useRef)(0),[ve,ye]=(0,L.useState)(!1),be=(0,L.useCallback)(()=>{_e.current++,ge.current=!1,ye(!1)},[]),xe=(0,L.useCallback)(()=>{if(!l||ge.current)return;let e=++_e.current;ge.current=!0,ye(!0),oe.expectToolContinuation(),fe().finally(()=>{_e.current===e&&(ge.current=!1,ye(!1))})},[l,oe,fe]),Se=(0,L.useCallback)(async()=>{try{await me()}finally{oe.abortActiveToolContinuation()}},[me,oe]),Ce=(0,L.useRef)(new Set),we=(0,L.useRef)(!1),[Te,Ee]=(0,L.useState)(0),[De,Oe]=(0,L.useState)(new Map),ke=(0,L.useRef)(I);ke.current=I;let Ae=(0,L.useRef)(N);Ae.current=N;let je=(0,L.useRef)(null),Me=(0,L.useCallback)(()=>{je.current=C},[C]);(0,L.useEffect)(()=>{if(M&&je.current!==C){if(I.length>0){Me();return}Me(),ce(Ae.current)}},[I.length,C,M,Me,ce]);let Ne=(0,L.useRef)(new Map),Pe=(0,L.useRef)(null),Fe=(0,L.useCallback)(e=>{let t=Pe.current;if(!t)return[...e];let n=ke.current.find(e=>e.id===t.assistantId)??e.find(e=>e.id===t.assistantId);return n?[...e.filter(e=>e.id!==t.assistantId),n]:[...e]},[]),Ie=(0,L.useCallback)(()=>{if(he.current!==`streaming`)return;let e=obe(ke.current);e&&(Pe.current?.assistantId!==e.message.id&&(Pe.current={assistantId:e.message.id,anchorMessageId:ke.current[e.index-1]?.id??null}),ce(e=>{let t=Pe.current;return t?sbe(e,t.assistantId):e}))},[ce]),Le=(0,L.useCallback)(e=>{let t=Pe.current;!t||e!==void 0&&t.assistantId!==e||(Pe.current=null,ce(e=>{let n=e.findIndex(e=>e.id===t.assistantId);if(n<0)return e;let r=[...e],[i]=r.splice(n,1);if(!i)return e;if(t.anchorMessageId===null)r.unshift(i);else{let e=r.findIndex(e=>e.id===t.anchorMessageId);r.splice(e>=0?e+1:n,0,i)}return r}))},[ce]),Re=(0,L.useCallback)(e=>{ce(t=>{let n=t[t.length-1];if(!n||n.role!==`assistant`||n.id!==e)return t;ie.current.add(e);let r=[...t];return r[r.length-1]={...n,parts:[]},r})},[ce]),ze=(0,L.useCallback)(e=>{let t=e.parts,n=t.filter((e,n)=>e.type!==`text`||!(`text`in e)||!e.text?!0:!t.some((t,r)=>r<=n||t.type!==`text`||!(`text`in t)||!t.text?!1:t.text.startsWith(e.text)));return n.length===t.length?e:{...e,parts:n}},[]);(0,L.useEffect)(()=>{if(ie.current.size===0)return;let e=new Set(I.filter(e=>ie.current.has(e.id)&&e.role===`assistant`&&ze(e)!==e).map(e=>e.id));e.size!==0&&ce(t=>{let n=!1,r=t.map(t=>{if(!e.has(t.id))return t;let r=ze(t);return r!==t&&(n=!0),r});return n?r:t})},[I,ze,ce]);let Be=(0,L.useCallback)(()=>{Me(),ce([]),Oe(new Map),be(),Ce.current.clear(),Ne.current.clear(),re.current.clear(),ie.current.clear(),Pe.current=null},[Me,ce,be]),Ve=(0,L.useCallback)(async(e,t)=>{let n=de(e,t);return e!==void 0&&!(typeof e==`object`&&e&&`messageId`in e&&e.messageId!=null)&&Ie(),n},[de,Ie]),He=I[I.length-1],Ue=(()=>{if(!He||He.role!==`assistant`)return{messageId:void 0,toolCallIds:new Set};let e=new Set;for(let t of He.parts??[])B7(t)&&t.state===`input-available`&&h.includes(H7(t))&&e.add(t.toolCallId);return{messageId:He.id,toolCallIds:e}})(),We=(0,L.useRef)(Ue);We.current=Ue,(0,L.useEffect)(()=>{if(!o||we.current)return;let e=I[I.length-1];if(!e||e.role!==`assistant`)return;let t=e.parts.filter(e=>B7(e)&&e.state===`input-available`&&!Ce.current.has(e.toolCallId));if(t.length>0){let e=P.current,n=t.filter(t=>B7(t)&&!h.includes(H7(t))&&e?.[H7(t)]?.execute);n.length>0&&(we.current=!0,(async()=>{try{let t=[];for(let r of n)if(B7(r)){let n=null,i=H7(r),a=e?.[i];if(a?.execute&&r.input!==void 0)try{n=await a.execute(r.input)}catch(e){n=`Error executing tool: ${e instanceof Error?e.message:String(e)}`}Ce.current.add(r.toolCallId),t.push({toolCallId:r.toolCallId,toolName:i,output:n})}if(t.length>0){let n=u9(e);for(let e of t)k.current.send(JSON.stringify({type:`cf_agent_tool_result`,toolCallId:e.toolCallId,toolName:e.toolName,output:e.output,autoContinue:l,clientTools:n}));await Promise.all(t.map(e=>le({tool:e.toolName,toolCallId:e.toolCallId,output:e.output}))),Oe(e=>{let n=new Map(e);for(let e of t)n.set(e.toolCallId,e.output);return n}),xe()}}finally{we.current=!1,Ee(e=>e+1)}})())}},[I,o,le,h,l,xe,Te]);let Ge=(0,L.useCallback)((e,t,n,r,i)=>{let a=r===`output-error`?!1:l;k.current.send(JSON.stringify({type:`cf_agent_tool_result`,toolCallId:e,toolName:t,output:n,...r?{state:r}:{},...i===void 0?{}:{errorText:i},autoContinue:a,clientTools:P.current?u9(P.current):void 0})),r!==`output-error`&&Oe(t=>new Map(t).set(e,n)),a&&xe()},[l,xe]),Ke=(0,L.useCallback)((e,t)=>{k.current.send(JSON.stringify({type:`cf_agent_tool_approval`,toolCallId:e,approved:t,autoContinue:l})),l&&xe()},[l,xe]);(0,L.useEffect)(()=>{let e=g.current;if(!e)return;let t=I[I.length-1];if(!t||t.role!==`assistant`)return;let n=t.parts.filter(e=>B7(e)&&e.state===`input-available`&&!Ce.current.has(e.toolCallId));for(let t of n)if(B7(t)){let n=t.toolCallId,r=H7(t);Ce.current.add(n),e({toolCall:{toolCallId:n,toolName:r,input:t.input},addToolOutput:e=>{Ge(e.toolCallId,r,e.output,e.state,e.errorText),le({tool:r,toolCallId:e.toolCallId,output:e.state===`output-error`?e.errorText??`Tool execution denied by user`:e.output})}})}},[I,Ge,le]);let qe=(0,L.useRef)({status:`idle`}),[Je,Ye]=(0,L.useState)(!1);(0,L.useEffect)(()=>{let e=Ne.current;function n(t){if(typeof t.data!=`string`)return;let n;try{n=JSON.parse(t.data)}catch{return}switch(n.type){case`cf_agent_chat_clear`:qe.current=G7(qe.current,{type:`clear`}).state,Ye(!1),Be();break;case`cf_agent_chat_messages`:ce(Fe(n.messages));break;case`cf_agent_message_updated`:ce(e=>{let t=n.message,r=e.findIndex(e=>e.id===t.id);if(r<0){let n=new Set(t.parts.filter(e=>`toolCallId`in e&&e.toolCallId).map(e=>e.toolCallId));n.size>0&&(r=e.findIndex(e=>e.parts.some(e=>`toolCallId`in e&&n.has(e.toolCallId))))}if(r>=0){let n=[...e];return n[r]={...t,id:e[r].id},n}return e});break;case`cf_agent_stream_resume_none`:oe.handleStreamResumeNone();break;case`cf_agent_stream_resuming`:if(!d&&!oe.isAwaitingResume()||(ge.current||re.current.add(n.id),oe.handleStreamResuming(n))||ne.current.has(n.id))return;qe.current=G7(qe.current,{type:`resume-fallback`,streamId:n.id,messageId:zK()}).state,Ye(!0),k.current.send(JSON.stringify({type:`cf_agent_stream_resume_ack`,id:n.id}));break;case`cf_agent_use_chat_response`:{if(ne.current.has(n.id)){if(n.body?.trim())try{let t=JSON.parse(n.body);t.type===`start`&&typeof t.messageId==`string`&&(e.set(n.id,t.messageId),n.replay&&re.current.has(n.id)&&(re.current.delete(n.id),Re(t.messageId)))}catch{}(n.done||n.replayComplete)&&re.current.delete(n.id),n.done&&(Le(e.get(n.id)),e.delete(n.id),ne.current.delete(n.id));return}let t;if(n.replay&&qe.current.status!==`observing`&&!re.current.has(n.id))return;if(n.body?.trim())try{t=JSON.parse(n.body),n.replay&&re.current.has(n.id)&&typeof t.messageId==`string`&&t.type===`start`&&(re.current.delete(n.id),Re(t.messageId)),typeof t.type==`string`&&t.type.startsWith(`data-`)&&_.current&&_.current(t)}catch(e){console.warn(`[useAgentChat] Failed to parse stream chunk:`,e instanceof Error?e.message:e,`body:`,n.body?.slice(0,100))}(n.done||n.replayComplete)&&re.current.delete(n.id);let r=G7(qe.current,{type:`response`,streamId:n.id,messageId:zK(),chunkData:t,done:n.done,error:n.error,replay:n.replay,replayComplete:n.replayComplete,continuation:n.continuation,currentMessages:n.continuation?ke.current:void 0});qe.current=r.state,r.messagesUpdate&&ce(r.messagesUpdate),Ye(r.isStreaming);break}}}return t.addEventListener(`message`,n),()=>{t.removeEventListener(`message`,n),qe.current={status:`idle`},Ye(!1),Pe.current=null,e.clear()}},[t,ce,d,oe,Fe,Re,Le,Be]);let Xe=async e=>{let{toolCallId:t}=e,n=`tool`in e?e.tool:``,r=`output`in e?e.output:void 0;if(k.current.send(JSON.stringify({type:`cf_agent_tool_result`,toolCallId:t,toolName:n,output:r,autoContinue:l,clientTools:P.current?u9(P.current):void 0})),Oe(e=>new Map(e).set(t,r)),le(e),l&&xe(),!l){if(!u){de();return}let e=We.current?.toolCallIds;if(!e){de();return}let n=e.size===1&&e.has(t);e.has(t)&&e.delete(t),(n||e.size===0)&&de()}},Ze=e=>{let{id:t,approved:n}=e,r;for(let e of ke.current){for(let n of e.parts)if(`toolCallId`in n&&`approval`in n&&n.approval?.id===t){r=n.toolCallId;break}if(r)break}r?Ke(r,n):console.warn(`[useAgentChat] addToolApprovalResponse: Could not find toolCallId for approval ID "${t}". Server will not be notified, which may cause duplicate messages.`),ue(e)},Qe=(0,L.useMemo)(()=>De.size===0?I:I.map(e=>({...e,parts:e.parts.map(e=>!(`toolCallId`in e)||!(`state`in e)||e.state!==`input-available`||!De.has(e.toolCallId)?e:{...e,state:`output-available`,output:De.get(e.toolCallId)})})),[I,De]);(0,L.useEffect)(()=>{let e=new Set;for(let t of I)for(let n of t.parts)`toolCallId`in n&&n.toolCallId&&e.add(n.toolCallId);Oe(t=>{if(t.size===0)return t;let n=!1;for(let r of t.keys())if(!e.has(r)){n=!0;break}if(!n)return t;let r=new Map;for(let[n,i]of t)e.has(n)&&r.set(n,i);return r});for(let t of Ce.current)e.has(t)||Ce.current.delete(t)},[I]);let $e=(0,L.useCallback)(e=>{let t=e.toolName??``;Ge(e.toolCallId,t,e.output,e.state,e.errorText),le({tool:t,toolCallId:e.toolCallId,output:e.state===`output-error`?e.errorText??`Tool execution denied by user`:e.output})},[Ge,le]),et=Qe[Qe.length-1],tt=(()=>{let e=!!i;if(!e&&!s||!et||et.role!==`assistant`)return!1;for(let t of et.parts){if(!B7(t)||t.state!==`input-available`)continue;let n=H7(t);if(!h.includes(n)&&(e||s?.[n]?.execute))return!0}return!1})(),nt=Je||tt,rt=pe===`streaming`||nt;return{...se,messages:Qe,isServerStreaming:nt,isStreaming:rt,isToolContinuation:ve,sendMessage:Ve,stop:Se,addToolOutput:$e,addToolResult:Xe,addToolApprovalResponse:Ze,clearHistory:()=>{Be(),t.send(JSON.stringify({type:`cf_agent_chat_clear`}))},setMessages:e=>{let n;n=typeof e==`function`?e(ke.current):e,n.length===0&&Me(),ce(n),t.send(JSON.stringify({messages:n,type:`cf_agent_chat_messages`}))}}}var lbe=new Set([`toJSON`,`then`,`catch`,`finally`,`valueOf`,`toString`,`constructor`,`prototype`,`$$typeof`,`@@toStringTag`,`asymmetricMatch`,`nodeType`]);function ube(e){return typeof e==`symbol`||lbe.has(e)}function f9(e){if(e===e.toUpperCase()&&e!==e.toLowerCase())return e.toLowerCase().replace(/_/g,`-`);let t=e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`);return t=t.startsWith(`-`)?t.slice(1):t,t.replace(/_/g,`-`).replace(/-$/,``)}(!globalThis.EventTarget||!globalThis.Event)&&console.error(`
496
+ PartySocket requires a global 'EventTarget' class to be available!
497
+ You can polyfill this global by adding this to your code before any partysocket imports:
498
+
499
+ \`\`\`
500
+ import 'partysocket/event-target-polyfill';
501
+ \`\`\`
502
+ Please file an issue at https://github.com/partykit/partykit if you're still having trouble.
503
+ `);var p9=class extends Event{message;error;constructor(e,t){super(`error`,t),this.message=e.message,this.error=e}},m9=class extends Event{code;reason;wasClean=!0;constructor(e=1e3,t=``,n){super(`close`,n),this.code=e,this.reason=t}},h9={Event,ErrorEvent:p9,CloseEvent:m9};function dbe(e,t){if(!e)throw Error(t)}function fbe(e){return new e.constructor(e.type,e)}function pbe(e){return`data`in e?new MessageEvent(e.type,e):`code`in e||`reason`in e?new m9(e.code||1999,e.reason||`unknown reason`,e):`error`in e?new p9(e.error,e):new Event(e.type,e)}var mbe=typeof process<`u`&&process.versions?.node!==void 0,hbe=typeof navigator<`u`&&navigator.product===`ReactNative`,g9=mbe||hbe?pbe:fbe,_9={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},v9=!1,gbe=class e extends EventTarget{_ws;_retryCount=-1;_uptimeTimeout;_connectTimeout;_shouldReconnect=!0;_connectLock=!1;_binaryType=`blob`;_closeCalled=!1;_messageQueue=[];_debugLogger=console.log.bind(console);_url;_protocols;_options;constructor(e,t,n={}){super(),this._url=e,this._protocols=t,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._options.debugLogger&&(this._debugLogger=this._options.debugLogger),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return e.CONNECTING}get OPEN(){return e.OPEN}get CLOSING(){return e.CLOSING}get CLOSED(){return e.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((e,t)=>(typeof t==`string`?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:``}get protocol(){return this._ws?this._ws.protocol:``}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING}get url(){return this._ws?this._ws.url:``}get shouldReconnect(){return this._shouldReconnect}onclose=null;onerror=null;onmessage=null;onopen=null;close(e=1e3,t){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug(`close enqueued: no ws instance`);return}if(this._ws.readyState===this.CLOSED){this._debug(`close: already closed`);return}this._ws.close(e,t)}reconnect(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED||this._disconnect(e,t),this._connect()}send(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug(`send`,e),this._ws.send(e);else{let{maxEnqueuedMessages:t=_9.maxEnqueuedMessages}=this._options;this._messageQueue.length<t&&(this._debug(`enqueue`,e),this._messageQueue.push(e))}}_debug(...e){this._options.debug&&this._debugLogger(`RWS>`,...e)}_getNextDelay(){let{reconnectionDelayGrowFactor:e=_9.reconnectionDelayGrowFactor,minReconnectionDelay:t=_9.minReconnectionDelay,maxReconnectionDelay:n=_9.maxReconnectionDelay}=this._options,r=0;return this._retryCount>0&&(r=t*e**(this._retryCount-1),r>n&&(r=n)),this._debug(`next delay`,r),r}_wait(){return new Promise(e=>{setTimeout(e,this._getNextDelay())})}_getNextProtocols(e){if(!e)return Promise.resolve(null);if(typeof e==`string`||Array.isArray(e))return Promise.resolve(e);if(typeof e==`function`){let t=e();if(!t)return Promise.resolve(null);if(typeof t==`string`||Array.isArray(t))return Promise.resolve(t);if(t.then)return t}throw Error(`Invalid protocols`)}_getNextUrl(e){if(typeof e==`string`)return Promise.resolve(e);if(typeof e==`function`){let t=e();if(typeof t==`string`)return Promise.resolve(t);if(t.then)return t}throw Error(`Invalid URL`)}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;let{maxRetries:e=_9.maxRetries,connectionTimeout:t=_9.connectionTimeout}=this._options;if(this._retryCount>=e){this._debug(`max retries reached`,this._retryCount,`>=`,e),this._connectLock=!1;return}this._retryCount++,this._debug(`connect`,this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([e,n])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>`u`&&!v9&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket.
504
+
505
+ For example, if you're using node.js, run \`npm install ws\`, and then in your code:
506
+
507
+ import PartySocket from 'partysocket';
508
+ import WS from 'ws';
509
+
510
+ const partysocket = new PartySocket({
511
+ host: "127.0.0.1:1999",
512
+ room: "test-room",
513
+ WebSocket: WS
514
+ });
515
+
516
+ `),v9=!0);let r=this._options.WebSocket||WebSocket;this._debug(`connect`,{url:e,protocols:n}),this._ws=n?new r(e,n):new r(e),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),t)}).catch(e=>{this._connectLock=!1,this._handleError(new h9.ErrorEvent(Error(e.message),this))})}_handleTimeout(){this._debug(`timeout event`),this._handleError(new h9.ErrorEvent(Error(`TIMEOUT`),this))}_disconnect(e=1e3,t){if(this._clearTimeouts(),this._ws){this._removeListeners();try{(this._ws.readyState===this.OPEN||this._ws.readyState===this.CONNECTING)&&this._ws.close(e,t),this._handleClose(new h9.CloseEvent(e,t,this))}catch{}}}_acceptOpen(){this._debug(`accept open`),this._retryCount=0}_handleOpen=e=>{this._debug(`open event`);let{minUptime:t=_9.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),t),dbe(this._ws,`WebSocket is not defined`),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(e=>{this._ws?.send(e)}),this._messageQueue=[],this.onopen&&this.onopen(e),this.dispatchEvent(g9(e))};_handleMessage=e=>{this._debug(`message event`),this.onmessage&&this.onmessage(e),this.dispatchEvent(g9(e))};_handleError=e=>{this._debug(`error event`,e.message),this._disconnect(void 0,e.message===`TIMEOUT`?`timeout`:void 0),this.onerror&&this.onerror(e),this._debug(`exec error listeners`),this.dispatchEvent(g9(e)),this._connect()};_handleClose=e=>{this._debug(`close event`),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(e),this.dispatchEvent(g9(e))};_removeListeners(){this._ws&&(this._debug(`removeListeners`),this._ws.removeEventListener(`open`,this._handleOpen),this._ws.removeEventListener(`close`,this._handleClose),this._ws.removeEventListener(`message`,this._handleMessage),this._ws.removeEventListener(`error`,this._handleError))}_addListeners(){this._ws&&(this._debug(`addListeners`),this._ws.addEventListener(`open`,this._handleOpen),this._ws.addEventListener(`close`,this._handleClose),this._ws.addEventListener(`message`,this._handleMessage),this._ws.addEventListener(`error`,this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}},_be=e=>e[1]!==null&&e[1]!==void 0;function vbe(){if(crypto?.randomUUID)return crypto.randomUUID();let e=Date.now(),t=performance?.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx`.replace(/[xy]/g,function(n){let r=Math.random()*16;return e>0?(r=(e+r)%16|0,e=Math.floor(e/16)):(r=(t+r)%16|0,t=Math.floor(t/16)),(n===`x`?r:r&3|8).toString(16)})}function y9(e,t,n={}){let{host:r,path:i,protocol:a,room:o,party:s,basePath:c,prefix:l,query:u}=e,d=r.replace(/^(http|https|ws|wss):\/\//,``);if(d.endsWith(`/`)&&(d=d.slice(0,-1)),i?.startsWith(`/`))throw Error(`path must not start with a slash`);let f=s??`main`,p=i?`/${i}`:``,m=a||(d.startsWith(`localhost:`)||d.startsWith(`127.0.0.1:`)||d.startsWith(`192.168.`)||d.startsWith(`10.`)||d.startsWith(`172.`)&&d.split(`.`)[1]>=`16`&&d.split(`.`)[1]<=`31`||d.startsWith(`[::ffff:7f00:1]:`)?t:`${t}s`),h=`${m}://${d}/${c||`${l||`parties`}/${f}/${o}`}${p}`,g=(e={})=>`${h}?${new URLSearchParams([...Object.entries(n),...Object.entries(e).filter(_be)])}`,_=typeof u==`function`?async()=>g(await u()):g(u);return{host:d,path:p,room:o,name:f,protocol:m,partyUrl:h,urlProvider:_}}var ybe=class extends gbe{_pk;_pkurl;name;room;host;path;basePath;constructor(e){let t=b9(e);if(super(t.urlProvider,t.protocols,t.socketOptions),this.partySocketOptions=e,this.setWSProperties(t),!e.startClosed&&!this.room&&!this.basePath)throw this.close(),Error(`Either room or basePath must be provided to connect. Use startClosed: true to create a socket and set them via updateProperties before calling reconnect().`);e.disableNameValidation||(e.party?.includes(`/`)&&console.warn(`PartySocket: party name "${e.party}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`),e.room?.includes(`/`)&&console.warn(`PartySocket: room name "${e.room}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`))}updateProperties(e){let t=b9({...this.partySocketOptions,...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path,basePath:e.basePath??this.basePath});this._url=t.urlProvider,this._protocols=t.protocols,this._options=t.socketOptions,this.setWSProperties(t)}setWSProperties(e){let{_pk:t,_pkurl:n,name:r,room:i,host:a,path:o,basePath:s}=e;this._pk=t,this._pkurl=n,this.name=r,this.room=i,this.host=a,this.path=o,this.basePath=s}reconnect(e,t){if(!this.host)throw Error("The host must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");if(!this.room&&!this.basePath)throw Error("The room (or basePath) must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");super.reconnect(e,t)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,t){let n=y9(e,`http`),r=typeof n.urlProvider==`string`?n.urlProvider:await n.urlProvider();return(e.fetch??fetch)(r,t)}};function b9(e){let{id:t,host:n,path:r,party:i,room:a,protocol:o,query:s,protocols:c,...l}=e,u=t||vbe(),d=y9(e,`ws`,{_pk:u});return{_pk:u,_pkurl:d.partyUrl,name:d.name,room:d.room,host:d.host,path:d.path,basePath:e.basePath,protocols:c,socketOptions:l,urlProvider:d.urlProvider}}function bbe(e){return new Proxy({},{get:(t,n)=>{if(!ube(n))return(...t)=>e(n,t)}})}var xbe=(e,t)=>{let n=(0,L.useRef)(t);n.current=t,(0,L.useEffect)(()=>{let t=e=>n.current?.onOpen?.(e),r=e=>n.current?.onMessage?.(e),i=e=>n.current?.onClose?.(e),a=e=>n.current?.onError?.(e);return e.addEventListener(`open`,t),e.addEventListener(`close`,i),e.addEventListener(`error`,a),e.addEventListener(`message`,r),()=>{e.removeEventListener(`open`,t),e.removeEventListener(`close`,i),e.removeEventListener(`error`,a),e.removeEventListener(`message`,r)}},[e])},Sbe=e=>[e.startClosed,e.minUptime,e.maxRetries,e.connectionTimeout,e.maxEnqueuedMessages,e.maxReconnectionDelay,e.minReconnectionDelay,e.reconnectionDelayGrowFactor,e.debug];function Cbe({options:e,createSocket:t,createSocketMemoKey:n}){let{enabled:r=!0}=e,i=(0,L.useMemo)(()=>e,[n(e)]),[a,o]=(0,L.useState)(()=>t({...i,startClosed:!0})),s=(0,L.useRef)(null),c=(0,L.useRef)(t);c.current=t;let l=(0,L.useRef)(r),u=(0,L.useRef)(i),d=(0,L.useRef)(!1);return(0,L.useEffect)(()=>{let e=u.current!==i;if(u.current=i,!r)return a.close(),l.current=r,e&&(d.current=!0),()=>{a.close()};if(!l.current&&r){l.current=r;let t=e||d.current;if(d.current=!1,!t)return a.reconnect(),()=>{a.close()};let n=c.current({...i,startClosed:!0});return o(n),()=>{n.close()}}if(l.current=r,s.current===a)if(e){let e=c.current({...i,startClosed:!0});return o(e),()=>{e.close()}}else return i.startClosed!==!0&&a.reconnect(),()=>{a.close()};else return s.current?s.current!==a&&a.reconnect():i.startClosed!==!0&&a.reconnect(),s.current=a,()=>{a.close()}},[a,i,r]),a}function wbe(e){let{host:t,...n}=e,r=Cbe({options:{host:t||(typeof window<`u`?window.location.host:`dummy-domain.com`),...n},createSocket:e=>new ybe(e),createSocketMemoKey:e=>JSON.stringify([e.query,e.id,e.host,e.room,e.party,e.path,e.protocol,e.protocols,e.basePath,e.prefix,...Sbe(e)])});return xbe(r,e),r}var x9=new Map;function Tbe(e,t,n,r){if(r===void 0)return JSON.stringify([e,t||`default`,...n]);let i=n;return i.length===0?JSON.stringify([e,t||`default`,...r]):JSON.stringify([e,t||`default`,i.map(e=>[e.agent,e.name]),...r])}function Ebe(e,t){if(e.length===0)return t??``;let n=e.flatMap(e=>[`sub`,f9(e.agent),encodeURIComponent(e.name)]).join(`/`);return t?`${n}/${t.startsWith(`/`)?t.slice(1):t}`:n}function S9(e){let t=x9.get(e);if(t){if(Date.now()>=t.expiresAt){x9.delete(e);return}return t}}function Dbe(e,t,n){let r={promise:t,expiresAt:Date.now()+n};return x9.set(e,r),r}function C9(e){x9.delete(e)}function Obe(e){let t=f9(e.agent),{query:n,queryDeps:r,cacheTtl:i,sub:a,path:o,...s}=e,c=(0,L.useMemo)(()=>(a??[]).map(e=>({agent:e.agent,name:e.name})),[JSON.stringify(a??[])]),l=c.length>0?c[c.length-1].agent:e.agent,u=c.length>0?c[c.length-1].name:e.name||`default`,d=(0,L.useMemo)(()=>[{agent:e.agent,name:e.name||`default`},...c],[e.agent,e.name,c]),f=(0,L.useRef)(new Map),p=(0,L.useMemo)(()=>Tbe(t,e.name,c,r||[]),[t,e.name,c,r]),m=(0,L.useRef)(p);m.current=p;let h=i??300*1e3,[g,_]=(0,L.useState)(0),v=n&&typeof n==`function`,[y,b]=(0,L.useState)(!1),x=(0,L.useMemo)(()=>{if(!n||typeof n!=`function`)return null;let t=S9(p);if(t)return t.promise;let r=n().catch(t=>{throw console.error(`[useAgent] Query failed for agent "${e.agent}":`,t),C9(p),t});return Dbe(p,r,h),r},[p,n,e.agent,h,g]);(0,L.useEffect)(()=>{if(!x||h<=0)return;let e=S9(p);if(!e)return;let t=e.expiresAt-Date.now(),n=setTimeout(()=>{C9(p),_(Date.now())},Math.max(0,t));return()=>clearTimeout(n)},[p,x,h]);let S;if(n)if(typeof n==`function`){let e=(0,L.use)(x);if(e){for(let[t,n]of Object.entries(e))n!=null&&typeof n!=`string`&&typeof n!=`number`&&typeof n!=`boolean`&&console.warn(`[useAgent] Query parameter "${t}" is an object and will be converted to "[object Object]". Query parameters should be string, number, boolean, or null.`);S=e}}else S=n;(0,L.useEffect)(()=>{y&&S!==void 0&&b(!1)},[y,S]);let[C,w]=(0,L.useState)(void 0),[T,E]=(0,L.useState)({name:u,agent:f9(l),identified:!1}),D=(0,L.useRef)({name:null,agent:null}),O=(0,L.useRef)(void 0),k=()=>{let e;O.current={promise:new Promise(t=>{e=t}),resolve:e}};O.current||k();let ee=(0,L.useRef)(null),A=(0,L.useMemo)(()=>Ebe(c,o),[c,o]),j=e.basePath?{basePath:e.basePath,path:A||void 0,query:S,...s}:{party:t,prefix:`agents`,room:e.name||`default`,path:A||void 0,query:S,...s},M=!y&&(s.enabled??!0),N=wbe({...j,enabled:M,onMessage:t=>{if(typeof t.data==`string`){let n;try{n=JSON.parse(t.data)}catch{return e.onMessage?.(t)}if(n.type===`cf_agent_identity`){let t=D.current.name,r=D.current.agent,i=n.name,a=n.agent,o=ee.current;if(o&&(o.name=i,o.agent=a,o.identified=!0),E({name:i,agent:a,identified:!0}),O.current?.resolve(),t!==null&&r!==null&&(t!==i||r!==a))if(e.onIdentityChange)e.onIdentityChange(t,i,r,a);else{let e=r!==a,n=t!==i,o=``;o=e&&n?`agent "${r}" → "${a}", instance "${t}" → "${i}"`:e?`agent "${r}" → "${a}"`:`instance "${t}" → "${i}"`,console.warn(`[agents] Identity changed on reconnect: ${o}. This can happen with server-side routing (e.g., basePath with getAgentByName) where the instance is determined by auth/session. Provide onIdentityChange callback to handle this explicitly, or ignore if this is expected for your routing pattern.`)}D.current={name:i,agent:a},e.onIdentity?.(i,a);return}if(n.type===`cf_agent_state`){w(n.state),e.onStateUpdate?.(n.state,`server`);return}if(n.type===`cf_agent_state_error`){e.onStateUpdateError?.(n.error);return}if(n.type===`cf_agent_mcp_servers`){e.onMcpUpdate?.(n.mcp);return}if(n.type===`rpc`){let e=n,t=f.current.get(e.id);if(!t)return;if(!e.success){t.timeoutId&&clearTimeout(t.timeoutId),t.reject(Error(e.error)),f.current.delete(e.id),t.stream?.onError?.(e.error);return}`done`in e?e.done?(t.timeoutId&&clearTimeout(t.timeoutId),t.resolve(e.result),f.current.delete(e.id),t.stream?.onDone?.(e.result)):t.stream?.onChunk?.(e.result):(t.timeoutId&&clearTimeout(t.timeoutId),t.resolve(e.result),f.current.delete(e.id));return}}e.onMessage?.(t)},onClose:t=>{k(),ee.current&&(ee.current.identified=!1),E(e=>({...e,identified:!1})),v&&b(!0),C9(m.current),_(Date.now());let n=Error(`Connection closed`);for(let e of f.current.values())e.timeoutId&&clearTimeout(e.timeoutId),e.reject(n),e.stream?.onError?.(`Connection closed`);f.current.clear(),e.onClose?.(t)}}),P=(0,L.useCallback)((e,t=[],n)=>new Promise((r,i)=>{let a=crypto.randomUUID(),o,s=n&&(`onChunk`in n||`onDone`in n||`onError`in n),c=s?n:n?.stream,l=s?void 0:n?.timeout;l&&(o=setTimeout(()=>{let t=f.current.get(a);f.current.delete(a);let n=`RPC call to ${e} timed out after ${l}ms`;t?.stream?.onError?.(n),i(Error(n))},l)),f.current.set(a,{reject:i,resolve:r,stream:c,timeoutId:o});let u={args:t,id:a,method:e,type:`rpc`};N.send(JSON.stringify(u))}),[N]);return N.setState=t=>{N.send(JSON.stringify({state:t,type:`cf_agent_state`})),w(t),e.onStateUpdate?.(t,`client`)},N.call=P,N.agent=T.agent,N.name=T.name,N.path=d,N.identified=T.identified,N.ready=O.current.promise,N.state=C,ee.current=N,N.stub=(0,L.useMemo)(()=>bbe(P),[P]),N.getHttpUrl=()=>(N._url||N._pkurl||``).replace(`ws://`,`http://`).replace(`wss://`,`https://`),T.agent!==T.agent.toLowerCase()&&console.warn(`Agent name: `+T.agent+` should probably be in lowercase. Received: `+T.agent),N}function kbe(e){let{agent:t,host:n,basePath:r,chatId:i,authToken:a,toolContext:o,connectionParams:s,welcomeMessage:c,onConnectionStatusChange:l,onOpen:u,onClose:d,onError:f}=e,[p,m]=L.useState(`connecting`),h=L.useCallback(e=>{m(e),l?.(e)},[l]),g={},_=[];a&&(g.Authorization=`Bearer ${a}`,_.push(`bearer`,a));let v=Obe({agent:t,host:n,basePath:r,name:i,query:s??{},queryDeps:Object.keys(s??{}),onOpen:e=>{h(`connected`),u?.(e)},onClose:e=>{if(e.code>=3e3){h(`unauthorized`),v.close(),d?.(e);return}h(`disconnected`),d?.(e)},onError:f,protocols:_}),y=cbe({agent:v,body:o??{},headers:g}),b=L.useRef(!1);return L.useEffect(()=>{c&&p===`connected`&&y.messages.length===0&&!b.current&&(b.current=!0,y.setMessages([{id:`welcome-message`,role:`assistant`,parts:[{type:`text`,text:c}]}]))},[p,y.messages.length,c]),{agent:v,chat:y,connectionStatus:p}}function Abe({part:e,partIndex:t,showTools:n}){if(I7(e))return(0,z.jsx)(aW,{children:e.text},t);if(B7(e)){if(!n)return null;let r=H7(e);return(0,z.jsxs)(Yfe,{defaultOpen:e.state===`output-error`,children:[e.type===`dynamic-tool`?(0,z.jsx)(M4,{state:e.state,title:r,toolName:r,type:`dynamic-tool`}):(0,z.jsx)(M4,{state:e.state,title:r,type:e.type}),(0,z.jsxs)($fe,{children:[(0,z.jsx)(epe,{input:e.input}),(0,z.jsx)(tpe,{errorText:e.errorText,output:e.output})]})]},t)}return e.type===`source-url`?(0,z.jsx)(E2,{href:e.url,title:e.title??e.url},t):e.type===`source-document`?(0,z.jsx)(E2,{href:`#${e.sourceId}`,title:e.title},t):null}function jbe({message:e,isStreaming:t,showTools:n,showReasoning:r,showRatings:i,rating:a,onRate:o}){let s=e.parts.filter(e=>e.type===`source-url`||e.type===`source-document`),c=e.parts.filter(e=>e.type!==`source-url`&&e.type!==`source-document`),l=c.filter(L7),u=c.filter(e=>!L7(e)),d=l.map(e=>e.text).join(`
517
+
518
+ ---
519
+
520
+ `),f=u.some(I7),p=!t&&!f&&l.length>0;return(0,z.jsx)(XU,{from:e.role,children:(0,z.jsxs)(`div`,{children:[s.length>0&&(0,z.jsxs)(ode,{children:[(0,z.jsx)(sde,{count:s.length}),(0,z.jsx)(cde,{children:s.map((e,t)=>e.type===`source-url`?(0,z.jsx)(E2,{href:e.url,title:e.title??e.url},t):(0,z.jsx)(E2,{href:`#${e.sourceId}`,title:e.title},t))})]}),(0,z.jsx)(ZU,{children:p?(0,z.jsx)(aW,{children:d}):(0,z.jsxs)(z.Fragment,{children:[d&&r&&(0,z.jsxs)(C2,{defaultOpen:!1,isStreaming:t,children:[(0,z.jsx)(w2,{}),(0,z.jsx)(T2,{children:d})]}),u.map((e,r)=>(0,z.jsx)(Abe,{isStreaming:t,part:e,partIndex:r,showTools:n},r))]})}),e.role===`assistant`&&!t&&i&&o&&(0,z.jsx)(oW,{messageId:e.id,rating:a,onRate:o})]})})}var Mbe=({attachment:e,onRemove:t})=>(0,z.jsxs)(nf,{data:e,onRemove:(0,L.useCallback)(()=>{t(e.id)},[t,e.id]),children:[(0,z.jsx)(rf,{}),(0,z.jsx)(af,{})]}),Nbe=()=>{let e=KK(),t=(0,L.useCallback)(t=>{e.remove(t)},[e]);return e.files.length===0?null:(0,z.jsx)(tf,{variant:`inline`,children:e.files.map(e=>(0,z.jsx)(Mbe,{attachment:e,onRemove:t},e.id))})},Pbe=({chatId:e,host:t,agentName:n,agentUrl:r,authToken:i,body:a,query:o,welcomeMessage:s,onAgentChange:c,onConnectionStatusChange:l,onRetry:u,onUnauthorized:d,showTools:f=!0,showReasoning:p=!0,showRatings:m=!0})=>{let[h,g]=(0,L.useState)(``),[_,v]=(0,L.useState)(!1),[y,b]=(0,L.useState)({}),{agent:x,chat:S,connectionStatus:C}=kbe({agent:n,host:t,chatId:e,authToken:i,toolContext:a??{},connectionParams:o??{},onConnectionStatusChange:l,welcomeMessage:s,onClose:e=>{e.code>=3e3&&d?.(e.reason??``)}});(0,L.useEffect)(()=>(c?.(x),()=>{c?.(null)}),[x,c]),(0,L.useEffect)(()=>{x&&C===`connected`&&x.call(`getMessageRatings`).then(e=>{e&&typeof e==`object`&&b(e)}).catch(e=>{console.error(`[Chatbot] Failed to load ratings`,e)})},[x,C]);let{messages:w,sendMessage:T,status:E,stop:D}=S,O=(0,L.useMemo)(()=>w.filter(e=>e.role!==`system`),[w]),k=(0,L.useCallback)(e=>{let t=!!e.text?.trim(),n=!!e.files?.length;if(!(t||n))return;let r=[];if(e.text?.trim()&&r.push({type:`text`,text:e.text.trim()}),e.files?.length)for(let t of e.files)r.push({type:`text`,text:`[Attachment: ${t.filename??`file`}]`});T({role:`user`,parts:r}),g(``),e.files?.length&&Ze.success(`Files attached`,{description:`${e.files.length} file(s) attached to message`})},[T]),ee=(0,L.useCallback)(e=>{g(t=>t?`${t} ${e}`:e)},[]),A=(0,L.useCallback)(e=>{g(e.target.value)},[]),j=(0,L.useCallback)(()=>{v(e=>!e)},[]),M=(0,L.useCallback)(async(e,t,n)=>{if(b(r=>({...r,[e]:{rating:t,comment:n}})),x)try{await x.call(`rateMessage`,[e,t,n])}catch(e){console.error(`[Chatbot] Failed to rate message`,e)}},[x]),N=(0,L.useMemo)(()=>String(E)===`idle`||String(E)===`ready`?`ready`:E===`submitted`||E===`streaming`||E===`error`?E:`ready`,[E]),P=(0,L.useMemo)(()=>{if(N!==`submitted`&&N!==`streaming`)return!1;let e=O.at(-1);if(!e||e.role===`user`)return!0;if(e.role===`assistant`){let t=e.parts?.some(e=>e.type===`text`),n=e.parts?.some(e=>e.type===`reasoning`);return!t&&!n}return!1},[N,O]),F=(0,L.useMemo)(()=>!h.trim()||N===`streaming`||N===`submitted`,[h,N]);return C===`connecting`?(0,z.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-center gap-3 text-muted-foreground`,children:[(0,z.jsx)(`div`,{className:`h-6 w-6 rounded-full border-2 border-zinc-300 border-t-zinc-600 animate-spin`}),(0,z.jsx)(`p`,{className:`text-sm`,children:`Connecting to agent...`})]}):C===`disconnected`?(0,z.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-center gap-4`,children:[(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-center`,children:[(0,z.jsx)(`div`,{className:`h-10 w-10 rounded-full bg-red-50 flex items-center justify-center`,children:(0,z.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-red-400`})}),(0,z.jsx)(`h3`,{className:`text-sm font-semibold`,children:`Unable to connect`}),r&&(0,z.jsxs)(`p`,{className:`text-xs text-muted-foreground max-w-xs`,children:[`Could not reach `,(0,z.jsx)(`span`,{className:`font-mono`,children:r}),`. Check the URL and make sure the agent is running.`]})]}),u&&(0,z.jsx)(`button`,{className:`text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground transition-colors`,onClick:u,children:`Try again`})]}):(0,z.jsxs)(`div`,{className:`relative flex size-full flex-col divide-y overflow-hidden`,children:[(0,z.jsxs)(yf,{children:[(0,z.jsxs)(bf,{children:[O.map((e,t)=>(0,z.jsx)(nW,{defaultBranch:0,children:(0,z.jsx)(rW,{children:(0,z.jsx)(jbe,{isStreaming:N===`streaming`&&t===O.length-1,message:e,showTools:f,showReasoning:p,showRatings:m,rating:y[e.id],onRate:M})})},e.id)),P&&(0,z.jsx)(XU,{from:`assistant`,children:(0,z.jsx)(ZU,{children:(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5 text-muted-foreground text-sm`,children:[(0,z.jsx)(LK,{className:`size-3.5 shrink-0`}),(0,z.jsx)(`span`,{children:`Thinking...`})]})})})]}),(0,z.jsx)(xf,{})]}),(0,z.jsx)(`div`,{className:`grid shrink-0 gap-4 pt-4`,children:(0,z.jsx)(`div`,{className:`w-full px-4 pb-4`,children:(0,z.jsxs)(YK,{globalDrop:!0,multiple:!0,onSubmit:k,children:[(0,z.jsx)(QK,{children:(0,z.jsx)(Nbe,{})}),(0,z.jsx)(XK,{children:(0,z.jsx)(ZK,{onChange:A,value:h})}),(0,z.jsxs)($K,{children:[(0,z.jsxs)(eq,{children:[(0,z.jsxs)(nq,{children:[(0,z.jsx)(rq,{}),(0,z.jsx)(iq,{children:(0,z.jsx)(JK,{})})]}),(0,z.jsx)(ude,{className:`shrink-0`,onTranscriptionChange:ee,size:`icon-sm`,variant:`ghost`}),(0,z.jsxs)(tq,{onClick:j,variant:_?`default`:`ghost`,children:[(0,z.jsx)(Od,{size:16}),(0,z.jsx)(`span`,{children:`Search`})]})]}),(0,z.jsx)(aq,{disabled:F,onStop:D,status:N})]})]})})})]})};function Fbe({className:e,size:t=`default`,...n}){return(0,z.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:gi(`group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,e),...n})}function Ibe({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`card-header`,className:gi(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,e),...t})}function Lbe({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`card-title`,className:gi(`text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,e),...t})}function Rbe({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`card-description`,className:gi(`text-sm text-muted-foreground`,e),...t})}function zbe({...e}){return(0,z.jsx)(QW,{"data-slot":`sheet`,...e})}function Bbe({...e}){return(0,z.jsx)(eG,{"data-slot":`sheet-trigger`,...e})}function Vbe({...e}){return(0,z.jsx)(PW,{"data-slot":`sheet-portal`,...e})}function Hbe({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,z.jsx)(Vbe,{children:(0,z.jsxs)(MW,{"data-slot":`sheet-content`,"data-side":n,className:gi(`fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm`,e),...i,children:[t,r&&(0,z.jsx)(gW,{"data-slot":`sheet-close`,render:(0,z.jsxs)(bi,{variant:`ghost`,className:`absolute top-3 right-3`,size:`icon-sm`,children:[(0,z.jsx)(qd,{}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})]})})}function Ube({className:e,...t}){return(0,z.jsx)(`div`,{"data-slot":`sheet-header`,className:gi(`flex flex-col gap-0.5 p-4`,e),...t})}function Wbe({className:e,...t}){return(0,z.jsx)($W,{"data-slot":`sheet-title`,className:gi(`cn-font-heading text-base font-medium text-foreground`,e),...t})}function Gbe({className:e,...t}){return(0,z.jsx)(_W,{"data-slot":`sheet-description`,className:gi(`text-sm text-muted-foreground`,e),...t})}function Kbe(e){return!e||typeof e!=`object`?!1:`durable_object_name`in e||`title`in e||`summary`in e||`created_at`in e||`updated_at`in e}function qbe(e){return Array.isArray(e)?{rows:e.filter(Kbe),supported:!0}:{rows:[],supported:!1}}function Jbe(e){if(e==null||e===``)return`Unknown time`;let t=new Date(e);return Number.isNaN(t.getTime())?`Unknown time`:new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(t)}function Ybe(e){let t=e?.trim();return t?t.length>180?`${t.slice(0,177)}...`:t:`No summary available yet.`}function Xbe(e){return e.title?.trim()||`Untitled conversation`}function Zbe(e){let t=e.indexOf(`:`);return t===-1?e:e.slice(t+1)}function Qbe({agent:e,connectionStatus:t,currentChatId:n,onConversationClick:r}){let[i,a]=(0,L.useState)(!1),[o,s]=(0,L.useState)([]),[c,l]=(0,L.useState)(`disconnected`),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(null),m=(0,L.useMemo)(()=>t===`unauthorized`?{title:`Unauthorized`,description:`Reconnect with valid credentials to load conversations.`}:{title:`Disconnected`,description:`Connect to the agent to load conversations for the active identity.`},[t]),h=(0,L.useCallback)(async()=>{if(!e){l(t===`unauthorized`?`unauthorized`:`disconnected`),d(null);return}if(t!==`connected`){l(t===`unauthorized`?`unauthorized`:`disconnected`),d(null);return}l(`loading`),d(null);try{let{rows:t,supported:n}=qbe(await e.call(`getConversations`));s(t),p(new Date().toISOString()),l(n?t.length>0?`ready`:`empty`:`unsupported`)}catch(e){d(e instanceof Error?e.message:String(e)),l(`error`)}},[e,t]);return(0,L.useEffect)(()=>{if(t===`connected`&&e&&!i){h();return}if(i){if(t===`connected`&&e){h();return}l(t===`unauthorized`?`unauthorized`:`disconnected`),d(null)}},[i,t,h]),(0,z.jsxs)(zbe,{open:i,onOpenChange:a,children:[(0,z.jsxs)(Kf,{children:[(0,z.jsx)(qf,{render:(0,z.jsx)(Bbe,{render:(0,z.jsx)(bi,{"aria-label":`Conversation history`,title:`Conversation history`,size:`icon-sm`,variant:`outline`,className:`relative`})}),children:(0,z.jsx)(Nd,{className:`size-4`})}),(0,z.jsx)(Jf,{children:(0,z.jsx)(`p`,{children:`Conversation history`})})]}),(0,z.jsxs)(Hbe,{className:`gap-0`,children:[(0,z.jsxs)(Ube,{children:[(0,z.jsxs)(Wbe,{children:[`Conversation history`,(0,z.jsx)(bi,{"aria-label":`Refresh conversations`,className:`absolute top-3 right-10`,onClick:()=>void h(),size:`icon-sm`,variant:`ghost`,children:(0,z.jsx)(Rd,{className:`size-4`})})]}),(0,z.jsx)(Gbe,{children:`Recent conversations for the connected identity.`})]}),(0,z.jsx)(`div`,{className:`border-b px-4 pb-3 text-xs text-muted-foreground`,children:f?(0,z.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,z.jsx)(Sd,{className:`size-3.5`}),`Last refreshed`,` `,new Intl.DateTimeFormat(void 0,{timeStyle:`short`}).format(new Date(f))]}):(0,z.jsx)(`span`,{children:`Open the panel to load conversations from the current session.`})}),(0,z.jsxs)(`div`,{className:`overflow-y-auto`,children:[c===`loading`&&(0,z.jsx)(`div`,{className:`flex h-full items-center justify-center px-4`,children:(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,z.jsx)(LK,{className:`size-4`}),`Loading conversations...`]})}),c===`unauthorized`||c===`disconnected`?(0,z.jsx)(`div`,{className:`flex h-full items-center justify-center px-4`,children:(0,z.jsx)(Fbe,{size:`sm`,className:`w-full border-dashed`,children:(0,z.jsxs)(Ibe,{children:[(0,z.jsx)(Lbe,{className:`text-sm`,children:m.title}),(0,z.jsx)(Rbe,{children:m.description})]})})}):null,c===`error`?(0,z.jsxs)(`div`,{className:` items-center justify-center p-4`,children:[(0,z.jsx)(`p`,{className:`text-red-600`,children:`Could not load conversations`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:u??`An unexpected error occurred while loading the conversation list.`}),(0,z.jsx)(bi,{onClick:()=>void h(),size:`sm`,variant:`outline`,children:`Retry`})]}):null,c===`empty`?(0,z.jsxs)(`div`,{className:` items-center justify-center p-4`,children:[(0,z.jsx)(`p`,{children:`No conversations yet`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This identity has not created any saved conversations.`})]}):null,c===`unsupported`?(0,z.jsxs)(`div`,{className:` items-center justify-center p-4`,children:[(0,z.jsx)(`p`,{children:`Conversations unavailable`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This agent does not expose saved conversations for the current identity.`})]}):null,c===`ready`?(0,z.jsx)(`div`,{className:`flex flex-col gap-3 p-4`,children:o.map((e,t)=>{let i=Zbe(e.durable_object_name??``);return(0,z.jsx)(`article`,{className:[`rounded-lg border bg-card p-3 shadow-sm transition-shadow hover:shadow-md cursor-pointer`,n&&i===n?`ring-2 ring-primary border-primary`:``].filter(Boolean).join(` `),onClick:()=>{a(!1),r(i)},children:(0,z.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[(0,z.jsxs)(`div`,{className:`min-w-0 flex gap-x-2 items-center`,children:[(0,z.jsx)(`h3`,{className:`truncate text-sm font-medium`,children:Xbe(e)}),(0,z.jsx)(`time`,{className:`shrink-0 text-[11px] text-muted-foreground ml-auto`,children:Jbe(e.updated_at)})]}),(0,z.jsx)(`p`,{className:`mt-1 line-clamp-3 text-xs leading-relaxed text-muted-foreground`,children:Ybe(e.summary)})]})},e.durable_object_name??`${e.updated_at??t}`)})}):null]})]})]})}var w9=L.createContext(void 0);function T9(e){let t=L.useContext(w9);if(t===void 0&&!e)throw Error(un(47));return t}function $be(){return{...Xl(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}var exe={...Ql,disabled:B(e=>e.disabled),instantType:B(e=>e.instantType),openMethod:B(e=>e.openMethod),openChangeReason:B(e=>e.openChangeReason),modal:B(e=>e.modal),focusManagerModal:B(e=>e.focusManagerModal),stickIfOpen:B(e=>e.stickIfOpen),titleElementId:B(e=>e.titleElementId),descriptionElementId:B(e=>e.descriptionElementId),openOnHover:B(e=>e.openOnHover),closeDelay:B(e=>e.closeDelay),hasViewport:B(e=>e.hasViewport)},txe=class e extends Pl{constructor(e){let t={...$be(),...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:L.createRef(),backdropRef:L.createRef(),internalBackdropRef:L.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:L.createRef(),beforeContentFocusGuardRef:L.createRef(),stickIfOpenTimeout:new Ti,triggerElements:new Jl},exe)}setOpen=(e,t)=>{let n=t.reason===Qi,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let a=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set(`stickIfOpen`,!0),this.context.stickIfOpenTimeout.start(500,()=>{this.set(`stickIfOpen`,!1)}),Ie.flushSync(a)):a(),r||i?this.set(`instantType`,r?`click`:`dismiss`):t.reason===`focus-out`?this.set(`instantType`,`focus`):this.set(`instantType`,void 0)};static useStore(t,n){let r=zt(()=>new e(n)).current,i=t??r;return Ci(r.disposeEffect),i}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()};function E9({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=txe.useStore(s?.store,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});xi(()=>{n===void 0&&u.state.open===!1&&r===!0&&u.update({open:!0,activeTriggerId:l})}),u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a);let{openMethod:p,triggerProps:m}=KW(d);Kl(u);let{forceUnmount:h}=ql(d,u,()=>{u.update({stickIfOpen:!0,openChangeReason:null})});L.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]);let g=L.useCallback(()=>{u.setOpen(!1,ua(la))},[u]);L.useImperativeHandle(e.actionsRef,()=>({unmount:h,close:g}),[h,g]);let _=tu({popupStore:u,onOpenChange:u.setOpen}),{getReferenceProps:v,getFloatingProps:y,getTriggerProps:b}=fu([ac(_,{outsidePressEvent:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),Cu(_)]),x=L.useMemo(()=>v(m),[v,m]),S=L.useMemo(()=>b(m),[b,m]),C=L.useMemo(()=>y(),[y]);u.useSyncedValues({modal:o,openMethod:p,activeTriggerProps:x,inactiveTriggerProps:S,popupProps:C,floatingRootContext:_,nested:Ls()!=null});let w=L.useMemo(()=>({store:u}),[u]);return(0,z.jsx)(w9.Provider,{value:w,children:typeof t==`function`?t({payload:f}):t})}function nxe(e){return T9(!0)?(0,z.jsx)(E9,{props:e}):(0,z.jsx)(Vs,{children:(0,z.jsx)(E9,{props:e})})}var rxe=L.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,nativeButton:a=!0,handle:o,payload:s,openOnHover:c=!1,delay:l=300,closeDelay:u=0,id:d,style:f,...p}=e,m=T9(!0),h=o?.store??m?.store;if(!h)throw Error(un(74));let g=Wu(d),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=L.useRef(null),{registerTrigger:x,isMountedByThisTrigger:S}=Gl(g,b,h,{payload:s,disabled:i,openOnHover:c,closeDelay:u}),C=h.useState(`openChangeReason`),w=h.useState(`stickIfOpen`),T=h.useState(`openMethod`),E=h.useState(`focusManagerModal`),D=du(v,{enabled:v!=null&&c&&(T!==`touch`||C!==`trigger-press`),mouseOnly:!0,move:!1,handleClose:Mu(),restMs:l,delay:{close:u},triggerElementRef:b,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=fu([Qs(v,{enabled:v!=null,stickIfOpen:w})]),k=h.useState(`triggerProps`,S),ee={disabled:i,open:y},{getButtonProps:A,buttonRef:j}=mn({disabled:i,native:a}),M=L.useMemo(()=>({open(e){return e&&C===`trigger-press`?Hu.open(e):Vu.open(e)}}),[C]),N=Mn(`button`,e,{state:ee,ref:[j,t,x,b],props:[O.getReferenceProps(),D,k,{[ws]:``,id:g},p,A],stateAttributesMapping:M}),{preFocusGuardRef:P,handlePreFocusGuardFocus:F,handleFocusTargetFocus:te}=SK(h,b);return _&&!E?(0,z.jsxs)(L.Fragment,{children:[(0,z.jsx)(Ea,{ref:P,onFocus:F}),(0,z.jsx)(L.Fragment,{children:N},g),(0,z.jsx)(Ea,{ref:h.context.triggerFocusTargetRef,onFocus:te})]}):(0,z.jsx)(L.Fragment,{children:N},g)}),D9=L.createContext(void 0);function ixe(){let e=L.useContext(D9);if(e===void 0)throw Error(un(45));return e}var axe=L.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i}=T9();return i.useState(`mounted`)||n?(0,z.jsx)(D9.Provider,{value:n,children:(0,z.jsx)(Ms,{ref:t,...r})}):null}),O9=L.createContext(void 0);function oxe(){let e=L.useContext(O9);if(!e)throw Error(un(46));return e}var sxe=L.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`bottom`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Es,style:g,..._}=e,{store:v}=T9(),y=ixe(),b=zs(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),ee=v.useState(`transitionStatus`),A=v.useState(`hasViewport`),j=L.useRef(null),M=Hl(O,!1,!1),N=ed({anchor:i,floatingRootContext:x,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m,keepMounted:y,nodeId:b,collisionAvoidance:h,adaptiveOrigin:A?Zu:void 0}),P=x.useState(`domReferenceElement`);R(()=>{let e=P,t=j.current;if(e&&(j.current=e),t&&e&&e!==t){v.set(`instantType`,void 0);let e=new AbortController;return M(()=>{v.set(`instantType`,`trigger-change`)},e.signal),()=>{e.abort()}}},[P,M,v]);let F={open:C,side:N.side,align:N.align,anchorHidden:N.anchorHidden,instant:k};cK(C&&E===!0&&w!==`trigger-hover`,D===`touch`,O,T);let te=L.useCallback(e=>{v.set(`positionerElement`,e)},[v]),ne=rd(e,F,{styles:N.positionerStyles,transitionStatus:ee,props:_,refs:[t,te],hidden:!S,inert:!C});return(0,z.jsxs)(O9.Provider,{value:N,children:[S&&E===!0&&w!==`trigger-hover`&&(0,z.jsx)(NW,{ref:v.context.internalBackdropRef,inert:id(!C),cutout:T}),(0,z.jsx)(Bs,{id:b,children:ne})]})}),cxe=L.createContext(void 0);function lxe(){let[e,t]=L.useState(0),n=Ht(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:L.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}function uxe(e){let{value:t,children:n}=e;return(0,z.jsx)(cxe.Provider,{value:t,children:n})}var dxe={...Uu,...Vl},fxe=L.forwardRef(function(e,t){let{className:n,render:r,initialFocus:i,finalFocus:a,style:o,...s}=e,{store:c}=T9(),l=oxe(),u=ZG(!0)!=null,{context:d,hasClosePart:f}=lxe(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`);Ul({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}});let T=c.useState(`disabled`),E=c.useState(`openOnHover`),D=c.useState(`closeDelay`);lu(w,{enabled:E&&!T,closeDelay:D});function O(e){return e===`touch`?c.context.popupRef.current:!0}let k=i===void 0?O:i,ee={open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=L.useCallback(e=>{c.set(`popupElement`,e)},[c]),M=Mn(`div`,e,{state:ee,ref:[t,c.context.popupRef,j],props:[_,{"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&AW.has(e.key)&&e.stopPropagation()}},nd(g),s],stateAttributesMapping:dxe});return(0,z.jsx)(Zs,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:a,restoreFocus:`popup`,previousFocusableElement:yt(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,z.jsx)(uxe,{value:d,children:M})})});function pxe({...e}){return(0,z.jsx)(nxe,{"data-slot":`popover`,...e})}function mxe({...e}){return(0,z.jsx)(rxe,{"data-slot":`popover-trigger`,...e})}function hxe({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,...a}){return(0,z.jsx)(axe,{children:(0,z.jsx)(sxe,{align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,z.jsx)(fxe,{"data-slot":`popover-content`,className:gi(`z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...a})})})}var k9=L.createContext(void 0);function gxe(){let e=L.useContext(k9);if(e===void 0)throw Error(un(63));return e}var A9=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),j9={...pG,checked(e){return e?{[A9.checked]:``}:{[A9.unchecked]:``}}},_xe=L.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i,"aria-labelledby":a,form:o,id:s,inputRef:c,name:l,nativeButton:u=!1,onCheckedChange:d,readOnly:f=!1,required:p=!1,disabled:m=!1,render:h,uncheckedValue:g,value:_,style:v,...y}=e,{clearErrors:b}=_G(),{state:x,setTouched:S,setDirty:C,validityData:w,setFilled:T,setFocused:E,shouldValidateOnChange:D,validationMode:O,disabled:k,name:ee,validation:A}=hG(),{labelId:j}=yG(),M=k||m,N=ee??l,P=Ht(d),F=L.useRef(null),te=_n(F,c,A.inputRef),ne=L.useRef(null),re=Wu(),ie=CG({id:s,implicit:!1,controlRef:ne}),ae=u?void 0:ie,[oe,se]=wG({controlled:n,default:!!i,name:`Switch`,state:`checked`});TG(ne,{id:re,value:oe}),R(()=>{F.current&&T(F.current.checked)},[F,T]),GW(oe,()=>{b(N),C(oe!==w.initialValue),T(oe),D()?A.commit(oe):A.commit(oe,!0)});let{getButtonProps:I,buttonRef:ce}=mn({disabled:M,native:u}),le=bG(a,j,F,!u,ae),ue={id:u?ie:re,role:`switch`,"aria-checked":oe,"aria-readonly":f||void 0,"aria-required":p||void 0,"aria-labelledby":le,onFocus(){M||E(!0)},onBlur(){let e=F.current;!e||M||(S(!0),E(!1),O===`onBlur`&&A.commit(e.checked))},onClick(e){f||M||(e.preventDefault(),F.current?.dispatchEvent(new PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey})))}},de=L.useMemo(()=>Jt({checked:oe,disabled:M,form:o,id:ae,name:N,required:p,style:N?Ta:wa,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,ref:te,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(f){e.preventDefault();return}let t=e.currentTarget.checked,n=ua(Xi,e.nativeEvent);P?.(t,n),!n.isCanceled&&se(t)},onFocus(){ne.current?.focus()}},A.getInputValidationProps,_===void 0?On:{value:_}),[oe,M,o,te,ae,N,P,f,p,se,A,_]),fe=L.useMemo(()=>({...x,checked:oe,disabled:M,readOnly:f,required:p}),[x,oe,M,f,p]),pe=Mn(`span`,e,{state:fe,ref:[t,ne,ce],props:[ue,A.getValidationProps,y,I],stateAttributesMapping:j9});return(0,z.jsxs)(k9.Provider,{value:fe,children:[pe,!oe&&N&&g!==void 0&&(0,z.jsx)(`input`,{type:`hidden`,form:o,name:N,value:g}),(0,z.jsx)(`input`,{...de,suppressHydrationWarning:!0})]})}),vxe=L.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,{state:o}=hG(),s=gxe();return Mn(`span`,e,{state:{...o,...s},ref:t,stateAttributesMapping:j9,props:a})});function M9({className:e,size:t=`default`,...n}){return(0,z.jsx)(_xe,{"data-slot":`switch`,"data-size":t,className:gi(`peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50`,e),...n,children:(0,z.jsx)(vxe,{"data-slot":`switch-thumb`,className:`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground`})})}var yxe=class extends L.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}render(){return this.state.error?(0,z.jsx)(`div`,{className:`flex size-full flex-col items-center justify-center gap-4 text-muted-foreground`,children:(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-center`,children:[(0,z.jsx)(`div`,{className:`h-10 w-10 rounded-full bg-red-50 flex items-center justify-center`,children:(0,z.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-red-400`})}),(0,z.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:`Something went wrong`}),(0,z.jsx)(`p`,{className:`text-xs max-w-xs`,children:`Could not connect to the agent. Check the URL above and try again.`})]})}):this.props.children}};function N9(e){try{let t=JSON.parse(e);return typeof t==`object`&&!!t&&Object.keys(t).length>0}catch{return!1}}var bxe=`{
521
+ "timezone": "Europe/Copenhagen",
522
+ "tokens": {
523
+ "X-EconomicToken": "token_123"
524
+ }
525
+ }`;function xxe({body:e,onChange:t}){let[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(e),o=(0,L.useCallback)(t=>{t&&a(e),r(t)},[e]),s=(0,L.useCallback)(()=>{let e=i.trim();if(e&&e!==`{}`)try{JSON.parse(e)}catch{Ze.error(`Invalid JSON — check the syntax and try again.`);return}t(e),r(!1)},[i,t]),c=N9(e);return(0,z.jsxs)(tG,{open:n,onOpenChange:o,children:[(0,z.jsxs)(Kf,{children:[(0,z.jsxs)(qf,{render:(0,z.jsx)(nG,{render:(0,z.jsx)(bi,{"aria-label":`Request body`,title:`Request body — JSON merged into each chat request (tool execution context)`,size:`icon-sm`,variant:`outline`,className:`relative`})}),children:[(0,z.jsx)(Bd,{className:`size-4`}),c&&(0,z.jsx)(`span`,{className:`absolute -top-1 -right-1 flex h-2.5 w-2.5 items-center justify-center rounded-full bg-blue-500`})]}),(0,z.jsx)(Jf,{children:(0,z.jsx)(`p`,{children:`Request body params`})})]}),(0,z.jsxs)(aG,{className:`!w-2xl !max-w-2xl`,children:[(0,z.jsx)(oG,{children:(0,z.jsx)(cG,{children:`Request body`})}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`JSON object merged into the body of every chat request. Available in tool`,` `,(0,z.jsx)(`code`,{className:`font-mono`,children:`execute`}),` functions via`,` `,(0,z.jsx)(`code`,{className:`font-mono`,children:`experimental_context`}),`.`]}),(0,z.jsx)(kG,{className:`font-mono text-xs min-h-32 max-h-72 break-all w-full`,placeholder:bxe,value:i,onChange:e=>a(e.target.value),spellCheck:!1})]}),(0,z.jsx)(sG,{showCloseButton:!0,children:(0,z.jsx)(bi,{size:`sm`,onClick:s,children:`Save`})})]})]})}function P9(e){if(!e||e===`{}`)return null;let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t||Array.isArray(t))return null;let n=t;for(let e of Object.values(n))if(typeof e!=`string`)return null;return n}function F9(e,t){if(!t?.length)return;let n=e??{};for(let e of t)n[e]?.trim()||Ze.warning(`Query param "${e}" is required for this playground session.`)}function I9(e,t,n){let r=n?.declaredQueryKeys;if(!e||e===`{}`)return F9(null,r),t(e),!0;let i=P9(e);return i===null?(Ze.error(`Invalid query params — use only flat string key/value pairs.`),!1):(F9(i,r),t(e),!0)}function L9(e){let t=P9(e.trim());return!t||Object.keys(t).length===0?[{id:zK(),key:``,value:``}]:Object.entries(t).map(([e,t])=>({id:zK(),key:e,value:t}))}function Sxe(e){let t={},n=new Set;for(let r of e){let e=r.key.trim();if(e){if(n.has(e))return`duplicate`;n.add(e),t[e]=r.value}}return t}function Cxe({query:e,onChange:t,declaredQueryKeys:n,userId:r,onUserIdChange:i,token:a,onTokenChange:o,welcomeMessage:s,onWelcomeMessageChange:c}){let[l,u]=(0,L.useState)(!1),[d,f]=(0,L.useState)(r),[p,m]=(0,L.useState)(a),[h,g]=(0,L.useState)(s),[_,v]=(0,L.useState)(!1),[y,b]=(0,L.useState)(()=>L9(e)),x=(0,L.useCallback)(t=>{t&&(f(r),m(a),g(s),b(L9(e))),u(t)},[e,r,a,s]),S=(0,L.useCallback)(()=>{b(e=>[...e,{id:zK(),key:``,value:``}])},[]),C=(0,L.useCallback)(e=>{b(t=>{let n=t.filter(t=>t.id!==e);return n.length>0?n:[{id:zK(),key:``,value:``}]})},[]),w=(0,L.useCallback)((e,t,n)=>{b(r=>r.map(r=>r.id===e?{...r,[t]:n}:r))},[]),T=(0,L.useCallback)(()=>{let e=d.trim();if(!e){Ze.error(`User ID is required.`);return}let r=Sxe(y);if(r===`duplicate`){Ze.error(`Duplicate parameter keys are not allowed.`);return}I9(JSON.stringify(r),e=>t(e),{declaredQueryKeys:n})&&(i(e),o(p.trim()),c(h.trim()),u(!1))},[y,t,n,d,p,h,i,o,c]),E=N9(e)||!!r||!!a;return(0,z.jsxs)(tG,{open:l,onOpenChange:x,children:[(0,z.jsxs)(Kf,{children:[(0,z.jsxs)(qf,{render:(0,z.jsx)(nG,{render:(0,z.jsx)(bi,{"aria-label":`Connection settings`,title:`Connection settings — user ID, auth token, and query params`,size:`icon-sm`,variant:`outline`,className:`relative`})}),children:[(0,z.jsx)(Ad,{className:`size-4`}),E&&(0,z.jsx)(`span`,{className:`absolute -top-1 -right-1 flex h-2.5 w-2.5 items-center justify-center rounded-full bg-blue-500`})]}),(0,z.jsx)(Jf,{children:(0,z.jsx)(`p`,{children:`Connection settings`})})]}),(0,z.jsxs)(aG,{className:`!w-2xl !max-w-2xl`,children:[(0,z.jsx)(oG,{children:(0,z.jsx)(cG,{children:`Connection settings`})}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Configure your User ID, auth token, and any additional query params for the WebSocket connection. Changes take effect on the next connection after saving, such as starting a new chat or refreshing the page.`}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`label`,{className:`text-xs font-medium text-foreground`,htmlFor:`params-user-id`,children:[`User ID `,(0,z.jsx)(`span`,{className:`text-destructive font-normal`,children:`(required)`})]}),(0,z.jsx)(OG,{autoComplete:`off`,className:`font-mono text-xs`,id:`params-user-id`,onChange:e=>f(e.target.value),placeholder:`e.g. user_123`,spellCheck:!1,value:d})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`label`,{className:`text-xs font-medium text-foreground`,htmlFor:`params-token`,children:[`Auth Token `,(0,z.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(optional)`})]}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(OG,{autoComplete:`off`,className:`font-mono text-xs pr-10`,id:`params-token`,onChange:e=>m(e.target.value),placeholder:`Bearer token for authentication`,spellCheck:!1,type:_?`text`:`password`,value:p}),(0,z.jsx)(bi,{className:`absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7`,onClick:()=>v(e=>!e),size:`icon-sm`,type:`button`,variant:`ghost`,children:_?(0,z.jsx)(Td,{className:`size-4`}):(0,z.jsx)(Ed,{className:`size-4`})})]})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`label`,{className:`text-xs font-medium text-foreground`,htmlFor:`params-welcome-message`,children:[`Welcome Message `,(0,z.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(optional)`})]}),(0,z.jsx)(kG,{className:`text-xs min-h-16 max-h-32`,id:`params-welcome-message`,onChange:e=>g(e.target.value),placeholder:`Hello! How can I help you today?`,spellCheck:!1,value:h})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:`Additional query params`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Flat string key/value pairs appended to the WebSocket URL.`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,1fr)_minmax(0,2fr)_auto] gap-2 text-xs font-medium text-muted-foreground px-0.5`,children:[(0,z.jsx)(`span`,{children:`Name`}),(0,z.jsx)(`span`,{children:`Value`}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Remove`})]}),y.map(e=>(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-[minmax(0,1fr)_minmax(0,2fr)_auto] gap-2 items-center`,children:[(0,z.jsx)(OG,{"aria-label":`Parameter name`,className:`font-mono text-xs h-9`,onChange:t=>w(e.id,`key`,t.target.value),placeholder:`e.g. token`,spellCheck:!1,value:e.key}),(0,z.jsx)(OG,{"aria-label":`Value for ${e.key||`parameter`}`,className:`font-mono text-xs h-9`,onChange:t=>w(e.id,`value`,t.target.value),placeholder:`value`,spellCheck:!1,value:e.value}),(0,z.jsx)(bi,{"aria-label":`Remove row`,className:`shrink-0 justify-self-end sm:justify-self-center`,onClick:()=>C(e.id),size:`icon-sm`,type:`button`,variant:`ghost`,children:(0,z.jsx)(Wd,{className:`size-4 text-muted-foreground`})})]},e.id)),(0,z.jsxs)(bi,{className:`self-start gap-1.5`,onClick:S,size:`sm`,type:`button`,variant:`outline`,children:[(0,z.jsx)(Ld,{className:`size-4`}),`Add param`]})]})]}),(0,z.jsx)(sG,{showCloseButton:!0,children:(0,z.jsx)(bi,{size:`sm`,onClick:T,children:`Save`})})]})]})}var R9=`playground:url`,z9=`playground:body`,B9=`playground:query`,V9=`playground:userId`,H9=`playground:token`,U9=`playground:welcomeMessage`,W9=`playground:showTools`,G9=`playground:showReasoning`,K9=`playground:showRatings`,q9=`{{agent_name}}`,wxe=`http://localhost:8787/agents/${q9}`;function J9(e){if(!e?.trim())return[];let t=new Set,n=[];for(let r of e.split(`,`)){let e=r.trim();e&&(t.has(e)||(t.add(e),n.push(e)))}return n}function Txe(e){return e?.length?J9(e.join(`,`)):[]}function Y9(){let e=window.__PLAYGROUND_CONFIG__,t=Txe(e?.queryParamKeys),n=J9(void 0),r=t.length>0?t:n;return{agentName:e?.agentName,port:e?.port,queryParamKeys:r}}function Exe(e,t){if(t.length===0)return!0;let n=P9(e.trim());return n?t.every(e=>!!n[e]?.trim()):!1}function X9(e,t){return P9(e.trim())?.[t]?.trim()??``}function Z9(e){return`setup-query-${e.replace(/[^a-zA-Z0-9_-]/g,`_`)}`}function Dxe(){return localStorage.getItem(z9)??``}function Oxe(){return localStorage.getItem(B9)??``}function kxe(){return new URLSearchParams(window.location.search).get(`user`)??``}function Axe(){return kxe()||(localStorage.getItem(V9)??``)}function jxe(){return localStorage.getItem(H9)??``}function Mxe(){return localStorage.getItem(U9)??``}function Q9(e){try{let t=new URL(e.includes(`://`)?e:`http://${e}`),n=t.pathname.split(`/`).filter(Boolean);return n[0]===`agents`&&n[1]?{host:t.host,agent:n[1]}:null}catch{return null}}function Nxe(e){return e?Q9(e)||(Ze.error(`Invalid agent URL — expected http://<host>/agents/<name>`),null):null}function Pxe({open:e,urlDraft:t,setUrlDraft:n,onCommitUrl:r,query:i,onPersistQuery:a,requiredParamKeys:o,userId:s,onUserIdChange:c,token:l,onTokenChange:u,welcomeMessage:d,onWelcomeMessageChange:f}){let[p,m]=(0,L.useState)(s),[h,g]=(0,L.useState)(l),[_,v]=(0,L.useState)(d),[y,b]=(0,L.useState)(!1),[x,S]=(0,L.useState)(()=>Object.fromEntries(o.map(e=>[e,X9(i,e)])));(0,L.useEffect)(()=>{m(s)},[s]),(0,L.useEffect)(()=>{g(l)},[l]),(0,L.useEffect)(()=>{v(d)},[d]),(0,L.useEffect)(()=>{S(Object.fromEntries(o.map(e=>[e,X9(i,e)])))},[i,o]);let C=(0,L.useCallback)(()=>{let e=p.trim();if(!e){Ze.error(`User ID is required.`);return}if(r()){if(o.length>0){for(let e of o)if(!x[e]?.trim()){Ze.error(`"${e}" is required for this playground session (WebSocket query param).`);return}let e={...P9(i.trim())??{},...Object.fromEntries(o.map(e=>[e,x[e].trim()]))};a(JSON.stringify(e))}c(e),u(h.trim()),f(_.trim())}},[p,h,_,r,o,x,i,a,c,u,f]);return(0,z.jsx)(tG,{open:e,onOpenChange:e=>{},children:(0,z.jsxs)(aG,{className:`!w-2xl !max-w-2xl`,showCloseButton:!1,children:[(0,z.jsx)(oG,{children:(0,z.jsx)(cG,{children:`Initial setup`})}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,z.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Set your User ID, a valid agent URL, and optionally an auth token.`,` `,o.length>0?(0,z.jsxs)(z.Fragment,{children:[`This CLI session also requires query params:`,` `,(0,z.jsx)(`code`,{className:`font-mono`,children:o.join(`, `)}),`.`]}):(0,z.jsx)(z.Fragment,{children:`Additional query params can be added later via the settings icon in the header.`}),` `,`Fields are pre-filled from saved settings when possible.`]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`label`,{className:`text-xs font-medium text-foreground`,htmlFor:`setup-user-id`,children:[`User ID `,(0,z.jsx)(`span`,{className:`text-destructive font-normal`,children:`(required)`})]}),(0,z.jsx)(OG,{autoComplete:`off`,className:`font-mono text-xs`,id:`setup-user-id`,onChange:e=>m(e.target.value),placeholder:`e.g. user_123`,spellCheck:!1,value:p})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`label`,{className:`text-xs font-medium text-foreground`,htmlFor:`setup-token`,children:[`Auth Token `,(0,z.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(optional)`})]}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(OG,{autoComplete:`off`,className:`font-mono text-xs pr-10`,id:`setup-token`,onChange:e=>g(e.target.value),placeholder:`Bearer token for authentication`,spellCheck:!1,type:y?`text`:`password`,value:h}),(0,z.jsx)(bi,{className:`absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7`,onClick:()=>b(e=>!e),size:`icon-sm`,type:`button`,variant:`ghost`,children:y?(0,z.jsx)(Td,{className:`size-4`}):(0,z.jsx)(Ed,{className:`size-4`})})]})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsx)(`label`,{className:`text-xs font-medium text-foreground`,htmlFor:`setup-agent-url`,children:`Agent URL`}),(0,z.jsx)(OG,{className:`font-mono text-xs`,id:`setup-agent-url`,onChange:e=>n(e.target.value),placeholder:`http://localhost:8787/agents/my-agent`,spellCheck:!1,value:t})]}),(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`label`,{className:`text-xs font-medium text-foreground`,htmlFor:`setup-welcome-message`,children:[`Welcome Message `,(0,z.jsx)(`span`,{className:`text-muted-foreground font-normal`,children:`(optional)`})]}),(0,z.jsx)(kG,{className:`text-xs min-h-16 max-h-32`,id:`setup-welcome-message`,onChange:e=>v(e.target.value),placeholder:`Hello! How can I help you today?`,spellCheck:!1,value:_})]}),o.length>0?(0,z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,z.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:`Required query params`}),o.map(e=>(0,z.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,z.jsxs)(`label`,{className:`text-xs font-medium text-foreground`,htmlFor:Z9(e),children:[(0,z.jsx)(`code`,{className:`font-mono`,children:e}),` `,(0,z.jsx)(`span`,{className:`text-destructive font-normal`,children:`(required)`})]}),(0,z.jsx)(OG,{autoComplete:`off`,className:`font-mono text-xs`,id:Z9(e),onChange:t=>S(n=>({...n,[e]:t.target.value})),placeholder:e,spellCheck:!1,value:x[e]??``})]},e)),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Use the key icon in the header to add more key/value pairs if you need keys beyond this list.`})]}):null]}),(0,z.jsx)(sG,{children:(0,z.jsx)(bi,{size:`sm`,onClick:C,children:`Continue`})})]})})}function Fxe(){let e=Y9();return e.agentName?`http://localhost:${e.port??8787}/agents/${e.agentName}`:wxe}function Ixe(){return localStorage.getItem(R9)??Fxe()}function Lxe(){return new URLSearchParams(window.location.search).get(`chat`)??void 0}function $9(){return zK()}function Rxe(){let[e,t]=(0,L.useState)(()=>Lxe()??$9()),[n,r]=(0,L.useState)(Axe),[i,a]=(0,L.useState)(jxe),[o,s]=(0,L.useState)(Mxe),[c,l]=(0,L.useState)(Ixe),[u,d]=(0,L.useState)(c),[f,p]=(0,L.useState)(`connecting`),[m,h]=(0,L.useState)(null),[g,_]=(0,L.useState)(Dxe),[v,y]=(0,L.useState)(Oxe),[b,x]=(0,L.useState)(null),[S,C]=(0,L.useState)(()=>localStorage.getItem(W9)!==`false`),[w,T]=(0,L.useState)(()=>localStorage.getItem(G9)!==`false`),[E,D]=(0,L.useState)(()=>localStorage.getItem(K9)!==`false`),O=(0,L.useRef)(!1),k=(0,L.useMemo)(()=>Y9().queryParamKeys??[],[]);(0,L.useEffect)(()=>{p(`connecting`),h(null)},[e]);let ee=c.includes(q9),A=ee?null:Q9(c),j=!ee&&A!==null,M=Exe(v,k),N=!j||!M||!n;(0,L.useEffect)(()=>{let t=new URLSearchParams(window.location.search);e&&t.get(`chat`)!==e&&(t.set(`chat`,e),history.replaceState(null,``,`?${t}`))},[e]),(0,L.useEffect)(()=>{let e=new URLSearchParams(window.location.search);n&&e.get(`user`)!==n&&(e.set(`user`,n),history.replaceState(null,``,`?${e}`))},[n]);let P=(0,L.useCallback)(()=>{let e=$9(),n=new URLSearchParams(window.location.search);n.set(`chat`,e),history.pushState(null,``,`?${n}`),t(e),Ze.success(`New chat started`)},[]),F=(0,L.useCallback)(()=>{let e=u.trim();return Nxe(e)?(localStorage.setItem(R9,e),l(e),d(e),O.current=!0,t($9()),!0):!1},[u]),te=(0,L.useCallback)(e=>{localStorage.setItem(V9,e),r(e)},[]),ne=(0,L.useCallback)(e=>{localStorage.setItem(H9,e),a(e)},[]),re=(0,L.useCallback)(e=>{localStorage.setItem(U9,e),s(e)},[]),ie=(0,L.useCallback)(e=>I9(e,e=>{localStorage.setItem(B9,e),y(e)},{declaredQueryKeys:k}),[k]),ae=(0,L.useCallback)(e=>{localStorage.setItem(W9,String(e)),C(e)},[]),oe=(0,L.useCallback)(e=>{localStorage.setItem(G9,String(e)),T(e)},[]),se=(0,L.useCallback)(e=>{localStorage.setItem(K9,String(e)),D(e)},[]),I=(0,L.useCallback)(()=>{let e=!(!S&&!w&&!E);localStorage.setItem(W9,String(!e)),localStorage.setItem(G9,String(!e)),localStorage.setItem(K9,String(!e)),C(!e),T(!e),D(!e)},[S,w,E]),ce=!S&&!w&&!E;return(0,z.jsxs)(`div`,{className:`relative flex h-screen overflow-hidden`,children:[(0,z.jsx)(Pxe,{open:N,query:v,requiredParamKeys:k,setUrlDraft:d,urlDraft:u,onCommitUrl:F,onPersistQuery:ie,userId:n,onUserIdChange:te,token:i,onTokenChange:ne,welcomeMessage:o,onWelcomeMessageChange:re}),(0,z.jsxs)(`div`,{className:`flex-1 flex flex-col`,children:[(0,z.jsx)(`div`,{className:`border-b-2 border-zinc-200 flex items-center justify-between bg-zinc-50`,children:(0,z.jsxs)(`div`,{className:`h-20 flex items-center w-6xl mx-auto border-x-2 border-zinc-200/40 py-6 px-6 justify-between`,children:[(0,z.jsx)(`div`,{className:`flex items-center`,children:c?(0,z.jsx)(z.Fragment,{children:(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`h2`,{className:`text-sm font-semibold mb-0 flex items-center`,children:[(0,z.jsx)(`div`,{className:[`h-2 w-2 rounded-full mr-2`,f===`connected`&&`bg-green-500`,f===`connecting`&&`bg-amber-400 animate-pulse`,(f===`disconnected`||f===`unauthorized`)&&`bg-red-500 animate-pulse`].filter(Boolean).join(` `)}),f===`connected`&&`Connected to agent`,f===`connecting`&&`Connecting...`,f===`disconnected`&&`Unable to connect to agent`,f===`unauthorized`&&`Unauthorized to connect to agent`]}),(0,z.jsx)(`input`,{className:`-ml-1.5 text-xs text-muted-foreground mb-0 py-1 pl-2 pr-10 field-sizing-content rounded-md hover:text-foreground focus:text-foreground hover:bg-white focus:bg-white hover:outline hover:outline-zinc-200 focus:outline focus:outline-zinc-300`,value:u,onChange:e=>d(e.target.value),onKeyDown:e=>{e.key===`Enter`?(F(),e.currentTarget.blur()):e.key===`Escape`&&(d(c),e.currentTarget.blur())},onBlur:()=>{if(O.current){O.current=!1;return}d(c)}})]})}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`h-2 w-2 bg-muted-foreground/50 rounded-full mr-3`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`text-sm font-semibold text-muted-foreground mb-0`,children:`Not Connected`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mb-0`,children:`Enter an agent URL and click Connect`})]})]})}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(bi,{onClick:P,size:`icon-sm`,variant:`outline`,children:(0,z.jsx)(Md,{className:`size-4`})}),(0,z.jsx)(Qbe,{agent:b,connectionStatus:f,currentChatId:e,onConversationClick:t}),(0,z.jsx)(Cxe,{declaredQueryKeys:k,query:v,onChange:e=>{localStorage.setItem(B9,e),y(e)},userId:n,onUserIdChange:te,token:i,onTokenChange:ne,welcomeMessage:o,onWelcomeMessageChange:re}),(0,z.jsx)(xxe,{body:g,onChange:e=>{localStorage.setItem(z9,e),_(e)}}),(0,z.jsxs)(pxe,{children:[(0,z.jsxs)(Kf,{children:[(0,z.jsx)(qf,{render:(0,z.jsx)(mxe,{render:(0,z.jsx)(bi,{"aria-label":`Developer settings`,title:`Developer settings`,size:`icon-sm`,variant:`outline`})}),children:(0,z.jsx)(zd,{className:`size-4`})}),(0,z.jsx)(Jf,{children:(0,z.jsx)(`p`,{children:`Developer settings`})})]}),(0,z.jsx)(hxe,{className:`w-56`,align:`end`,children:(0,z.jsxs)(`div`,{className:`grid gap-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`h4`,{className:`font-medium text-sm`,children:`Display options`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Toggle what you see in the chat.`})]}),(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsx)(`label`,{className:`text-sm`,htmlFor:`show-tools`,children:`Show tool outputs`}),(0,z.jsx)(M9,{id:`show-tools`,checked:S,onCheckedChange:ae})]}),(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsx)(`label`,{className:`text-sm`,htmlFor:`show-reasoning`,children:`Show reasoning`}),(0,z.jsx)(M9,{id:`show-reasoning`,checked:w,onCheckedChange:oe})]}),(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsx)(`label`,{className:`text-sm`,htmlFor:`show-ratings`,children:`Show ratings`}),(0,z.jsx)(M9,{id:`show-ratings`,checked:E,onCheckedChange:se})]}),(0,z.jsx)(wf,{}),(0,z.jsx)(bi,{variant:`outline`,size:`sm`,onClick:I,children:ce?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Td,{className:`size-4 mr-2`}),`Developer view`]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ed,{className:`size-4 mr-2`}),`User view`]})})]})})]})]})]})}),(0,z.jsx)(`div`,{className:`flex-1 overflow-hidden min-h-0 grow`,children:(0,z.jsxs)(`div`,{className:`max-w-6xl w-full mx-auto border-x-2 border-zinc-100 h-full`,children:[f===`unauthorized`&&j&&M&&(0,z.jsx)(`div`,{className:`flex size-full flex-col items-center justify-center gap-4 text-muted-foreground`,children:(0,z.jsxs)(`div`,{className:`flex flex-col items-center gap-2 text-center`,children:[(0,z.jsx)(`div`,{className:`h-10 w-10 rounded-full bg-red-50 flex items-center justify-center`,children:(0,z.jsx)(`div`,{className:`h-4 w-4 rounded-full bg-red-400`})}),(0,z.jsx)(`h3`,{className:`text-sm font-semibold text-foreground`,children:`Unauthorized`}),m?(0,z.jsx)(`p`,{className:`text-xs max-w-xs`,children:m}):(0,z.jsx)(`p`,{className:`text-xs max-w-xs`,children:`You are not authorized to connect to this agent.`})]})}),j&&M&&A?(0,z.jsx)(yxe,{children:(0,z.jsx)(Pbe,{agentName:A.agent,host:A.host,chatId:n?`${n}:${e}`:e,agentUrl:c,authToken:i||void 0,body:g?JSON.parse(g):void 0,query:v?P9(v.trim())??void 0:void 0,welcomeMessage:o||void 0,onAgentChange:x,onConnectionStatusChange:p,onUnauthorized:h,showTools:S,showReasoning:w,showRatings:E},`${n}:${e}:${v}`)},`${n}:${e}:${v}`):(0,z.jsx)(`div`,{className:`flex size-full flex-col items-center justify-center gap-3 text-muted-foreground px-4`,children:j?(0,z.jsxs)(`p`,{className:`text-sm text-center max-w-md`,children:[`Set required WebSocket query params in the setup dialog`,k.length>0?(0,z.jsxs)(z.Fragment,{children:[`: `,(0,z.jsx)(`code`,{className:`font-mono text-xs`,children:k.join(`, `)})]}):null,`.`]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-sm text-center`,children:`Enter an agent URL in the bar above or in the setup dialog.`}),(0,z.jsx)(`p`,{className:`text-xs font-mono text-muted-foreground/60`,children:`e.g. http://localhost:8787/agents/my-agent`})]})})]})})]})]})}(0,Fe.createRoot)(document.getElementById(`app`)).render((0,z.jsx)(L.StrictMode,{children:(0,z.jsxs)(Gf,{children:[(0,z.jsx)(ft,{}),(0,z.jsx)(Rxe,{})]})}));export{wD as a,fD as c,bE as d,xE as f,ke as h,YU as i,ire as l,vi as m,ZV as n,CD as o,SC as p,GU as r,hD as s,CV as t,rre as u};