@hona/openeval 0.5.0 → 0.5.1

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 (174) hide show
  1. package/README.md +2 -2
  2. package/VERIFICATION.md +6 -1
  3. package/package.json +1 -1
  4. package/src/app/input-fingerprints.ts +22 -18
  5. package/src/app/plan-benchmark.ts +17 -0
  6. package/src/app/retry-run.ts +4 -1
  7. package/viewer/assets/{abnfDiagram-VCTEODGH-tXaAmCdr.js → abnfDiagram-VCTEODGH-4dcAM__t.js} +1 -1
  8. package/viewer/assets/{angular-html-CNhJPCRr.js → angular-html-DCa1K9Q5.js} +1 -1
  9. package/viewer/assets/{angular-ts-BnGgGecY.js → angular-ts-BwOaP4mi.js} +1 -1
  10. package/viewer/assets/{apl-ZOvmk1hE.js → apl-BDVbqe8d.js} +1 -1
  11. package/viewer/assets/{arc-BalFY-0o.js → arc-vf_TPbdA.js} +1 -1
  12. package/viewer/assets/architecture-7GRP2DOG-ClUScBK0.js +1 -0
  13. package/viewer/assets/{architectureDiagram-5GKGNRK7-DpSDAEgb.js → architectureDiagram-5GKGNRK7-D9I5g97H.js} +1 -1
  14. package/viewer/assets/{astro-BJzTFZ3R.js → astro-C4AVO9I1.js} +1 -1
  15. package/viewer/assets/{blade-CvS8_w1j.js → blade-1K2d7b5P.js} +1 -1
  16. package/viewer/assets/{blockDiagram-I7D4REHJ-BY3upSR4.js → blockDiagram-I7D4REHJ-CnebaxAP.js} +1 -1
  17. package/viewer/assets/{c-D5ZSBtUG.js → c-CrFxx71c.js} +1 -1
  18. package/viewer/assets/{c4Diagram-7LVT6UL2-CA9keRc2.js → c4Diagram-7LVT6UL2-CZv4bp92.js} +1 -1
  19. package/viewer/assets/channel-DOp5Ibzq.js +1 -0
  20. package/viewer/assets/{chapel-1aYDxJri.js → chapel-CaV_aD0h.js} +1 -1
  21. package/viewer/assets/{chunk-4HAMMTFA-B0uITxv4.js → chunk-4HAMMTFA-1oAN0Hqj.js} +1 -1
  22. package/viewer/assets/{chunk-75Z2AOVW-CbTHx8Lz.js → chunk-75Z2AOVW-DG-4lG9j.js} +1 -1
  23. package/viewer/assets/{chunk-DU6HZSFF-C7mZpnch.js → chunk-DU6HZSFF-K8r4K98Q.js} +1 -1
  24. package/viewer/assets/{chunk-F27PBJKO-iUZG9l9x.js → chunk-F27PBJKO-DOLcDIe-.js} +1 -1
  25. package/viewer/assets/{chunk-GMAD6QVW-BYg8qa71.js → chunk-GMAD6QVW-fbOr8e3A.js} +1 -1
  26. package/viewer/assets/{chunk-GVQU2GXP-rnsdTI4Q.js → chunk-GVQU2GXP-DGskHf86.js} +1 -1
  27. package/viewer/assets/{chunk-IMKFNOWR-D0e2NIBw.js → chunk-IMKFNOWR-BkiL77Of.js} +1 -1
  28. package/viewer/assets/{chunk-L3NEJ4N5-Itlw7HBQ.js → chunk-L3NEJ4N5-rHC84FEy.js} +1 -1
  29. package/viewer/assets/{chunk-OSK3NFVY-DjAAQhPw.js → chunk-OSK3NFVY-CDEFeiSo.js} +1 -1
  30. package/viewer/assets/{chunk-P2QGCYS3-XOxrUS-o.js → chunk-P2QGCYS3-BHNuVs3t.js} +1 -1
  31. package/viewer/assets/{chunk-POPQ4Y6H-SHuwgciA.js → chunk-POPQ4Y6H-8IU6HL0N.js} +1 -1
  32. package/viewer/assets/{chunk-PWAF6VOD-BtrRW-Sl.js → chunk-PWAF6VOD--FR_J-_V.js} +1 -1
  33. package/viewer/assets/{chunk-SHT3W25Y-6Pacfssp.js → chunk-SHT3W25Y-DHfu0YQd.js} +1 -1
  34. package/viewer/assets/{chunk-SVP7TREG-eTVS9a20.js → chunk-SVP7TREG-CZxnTp0N.js} +1 -1
  35. package/viewer/assets/{chunk-TICWLB2K-CPnAfOZj.js → chunk-TICWLB2K-DeYv6m7z.js} +1 -1
  36. package/viewer/assets/{chunk-XXDRQBXY-ciXhM2Hb.js → chunk-XXDRQBXY-B-stp2Jg.js} +1 -1
  37. package/viewer/assets/classDiagram-ZZMXUADV-fi0_kah3.js +1 -0
  38. package/viewer/assets/classDiagram-v2-VYDZK3BY-fi0_kah3.js +1 -0
  39. package/viewer/assets/{cobol-CEoq_5kf.js → cobol-Dfqw6e9L.js} +1 -1
  40. package/viewer/assets/{coffee-CZTWsTxw.js → coffee-B0VyEiZ_.js} +1 -1
  41. package/viewer/assets/{cose-bilkent-JH36ORCC-NCkOcFkY.js → cose-bilkent-JH36ORCC-DwO-FoMO.js} +1 -1
  42. package/viewer/assets/{cpp-Hh-o0ivR.js → cpp-DtAnLTpm.js} +1 -1
  43. package/viewer/assets/{crystal-CL_KTsac.js → crystal-DR276aYT.js} +1 -1
  44. package/viewer/assets/{css-9neLgVLd.js → css-jcQdyKCB.js} +1 -1
  45. package/viewer/assets/{cynefin-OW5HDTMX-Ba1tlgBB.js → cynefin-OW5HDTMX-CkCcLfFW.js} +1 -1
  46. package/viewer/assets/{cynefinDiagram-5FMLGOSQ-CMrzWo3p.js → cynefinDiagram-5FMLGOSQ-Btlq2-ol.js} +1 -1
  47. package/viewer/assets/{dagre-GXQ25YYZ-DwjOnUDD.js → dagre-GXQ25YYZ-BtEJZ3id.js} +1 -1
  48. package/viewer/assets/{diagram-S7CK7UJ4-DA0PXsM6.js → diagram-S7CK7UJ4-BdLily-u.js} +1 -1
  49. package/viewer/assets/{diagram-UQ7AKVKN-C5BBFVvO.js → diagram-UQ7AKVKN-DBfD46yQ.js} +1 -1
  50. package/viewer/assets/{diagram-VSXAHHWV-COgLeOyi.js → diagram-VSXAHHWV-BJuAmu9T.js} +1 -1
  51. package/viewer/assets/{diagram-VX7I27RA-CEu-Pm3B.js → diagram-VX7I27RA-BVEEYjj-.js} +1 -1
  52. package/viewer/assets/{diagram-Z3DM3KII-BGq1_7BE.js → diagram-Z3DM3KII-DqYpuagj.js} +1 -1
  53. package/viewer/assets/{dist-CX8-lyNa.js → dist-B0PK9u1q.js} +1 -1
  54. package/viewer/assets/{ebnfDiagram-PWID7BFC-CGoEp9fJ.js → ebnfDiagram-PWID7BFC-DafUAY97.js} +1 -1
  55. package/viewer/assets/{edge-CTz4kCIs.js → edge-CMwzwqao.js} +1 -1
  56. package/viewer/assets/{elixir-Bi8YL7XX.js → elixir-D0m0fb5e.js} +1 -1
  57. package/viewer/assets/{elm-C-UxMmSh.js → elm-Dm3Vhwyo.js} +1 -1
  58. package/viewer/assets/{erDiagram-RLTQ6QDP-Bb0ICmqZ.js → erDiagram-RLTQ6QDP-BjTQFP-n.js} +1 -1
  59. package/viewer/assets/{erb-ZSq62Y_u.js → erb-BWrVRqIb.js} +1 -1
  60. package/viewer/assets/eventmodeling-NTZA5JFV-QswxRol8.js +1 -0
  61. package/viewer/assets/flowDiagram-HODETNUW-DolIsASs.js +1 -0
  62. package/viewer/assets/{ganttDiagram-EL5Y4UJY-B4KN9ny5.js → ganttDiagram-EL5Y4UJY-cvpUkVwQ.js} +1 -1
  63. package/viewer/assets/{git-rebase-Cw9GoTpw.js → git-rebase-Bx9WSw2T.js} +1 -1
  64. package/viewer/assets/{gitGraph-4MIJSDKK-CI3xWhLt.js → gitGraph-4MIJSDKK-YF9cEiQc.js} +1 -1
  65. package/viewer/assets/{gitGraphDiagram-WWUBYQGX-CPv8-MbI.js → gitGraphDiagram-WWUBYQGX-Cf7LUlAN.js} +1 -1
  66. package/viewer/assets/{glimmer-js-Bb_1emHy.js → glimmer-js-jJ5_T2M9.js} +1 -1
  67. package/viewer/assets/{glimmer-ts-D2kOXMB0.js → glimmer-ts-DqUZ7xnF.js} +1 -1
  68. package/viewer/assets/{glsl-DEqjHGFr.js → glsl-DHzsK5Yf.js} +1 -1
  69. package/viewer/assets/{graphql-Bi0OE4k4.js → graphql-TivQ3Vbm.js} +1 -1
  70. package/viewer/assets/{hack-aU4VRzRW.js → hack-CXzUKlVo.js} +1 -1
  71. package/viewer/assets/{haml-B-2wwgyn.js → haml-DB9hsLVR.js} +1 -1
  72. package/viewer/assets/{handlebars-Bmq7hbFI.js → handlebars-Dfxd-Vhz.js} +1 -1
  73. package/viewer/assets/{html-BBsNbpya.js → html-CwO_HZk6.js} +1 -1
  74. package/viewer/assets/{html-derivative-CkVRX-vn.js → html-derivative-Da9QhqUr.js} +1 -1
  75. package/viewer/assets/{http-cQ-nDL4L.js → http-DaNELgRt.js} +1 -1
  76. package/viewer/assets/{hurl-D5phPwZN.js → hurl-DCibLrD6.js} +1 -1
  77. package/viewer/assets/index-Cc4pf8mQ.js +795 -0
  78. package/viewer/assets/{index-DdaXmlLv.css → index-DVYWRkK6.css} +1 -1
  79. package/viewer/assets/{info-A6RAGUB7-CRDxOY87.js → info-A6RAGUB7-B7Ru1Oky.js} +1 -1
  80. package/viewer/assets/{infoDiagram-27XIBGKW-D6y32CfO.js → infoDiagram-27XIBGKW-RlWd2kYA.js} +1 -1
  81. package/viewer/assets/{ishikawaDiagram-5VMMS53U-BWFBTCh5.js → ishikawaDiagram-5VMMS53U-CS2-lnGi.js} +1 -1
  82. package/viewer/assets/{java-CT3DXSYV.js → java-D2z6ozlO.js} +1 -1
  83. package/viewer/assets/{javascript-BPmsAXaP.js → javascript-CxVsIZNi.js} +1 -1
  84. package/viewer/assets/{jinja-Ct_36dEc.js → jinja-BSUcBlS_.js} +1 -1
  85. package/viewer/assets/{jison-BYrmy85c.js → jison-qcnqXcSy.js} +1 -1
  86. package/viewer/assets/{journeyDiagram-3NMN7TZE-6XCObBEx.js → journeyDiagram-3NMN7TZE-DqPSRu4-.js} +1 -1
  87. package/viewer/assets/{json-BCFP8udh.js → json-eiyev3x0.js} +1 -1
  88. package/viewer/assets/{jsx-Dgzhn0Dq.js → jsx-rDHm7tH3.js} +1 -1
  89. package/viewer/assets/{julia-DIddcjVY.js → julia-cFfLusXt.js} +1 -1
  90. package/viewer/assets/{just-C5t963St.js → just-D6wClmab.js} +1 -1
  91. package/viewer/assets/{kanban-definition-UXKFOSKX-DU1B45HL.js → kanban-definition-UXKFOSKX-BI_a5cRc.js} +1 -1
  92. package/viewer/assets/{latex-BKZooW5w.js → latex-BvnFBRMG.js} +1 -1
  93. package/viewer/assets/{line-lYgs1iW7.js → line-ChPI9Rz5.js} +1 -1
  94. package/viewer/assets/{linear-sHqbNFGm.js → linear-CBr5H_et.js} +1 -1
  95. package/viewer/assets/{liquid-_PLVu-8C.js → liquid-CIOCL1uY.js} +1 -1
  96. package/viewer/assets/{lua-BWNAOGrF.js → lua-Dq6WuAHP.js} +1 -1
  97. package/viewer/assets/{marko-DC7qz2de.js → marko-Nl8_Nklj.js} +1 -1
  98. package/viewer/assets/{mdc-Bn_2wB99.js → mdc-obW39E44.js} +1 -1
  99. package/viewer/assets/{mermaid-parser.core-jzj7JZTj.js → mermaid-parser.core-BFOx64cQ.js} +3 -3
  100. package/viewer/assets/{mermaid.core-DpRyWAPv.js → mermaid.core-BDe6Tfbh.js} +4 -4
  101. package/viewer/assets/{mindmap-definition-YA3MSWOX-CIZjqKbE.js → mindmap-definition-YA3MSWOX-CjzA1VTL.js} +1 -1
  102. package/viewer/assets/{nginx-Ce7JLwNg.js → nginx-Czz1mxQD.js} +1 -1
  103. package/viewer/assets/{nim-CP_MVph6.js → nim-Boz13cJ3.js} +1 -1
  104. package/viewer/assets/{org-BVKft-Jg.js → org-BOlhXpYw.js} +1 -1
  105. package/viewer/assets/{packet-AYTQ26CC-BwRTCCV1.js → packet-AYTQ26CC-MMkKPhzF.js} +1 -1
  106. package/viewer/assets/{pegDiagram-XKGWAZYB-3nilNfrm.js → pegDiagram-XKGWAZYB-q1Rf8_Y9.js} +1 -1
  107. package/viewer/assets/{perl-DRhmHTw_.js → perl-BA7VmyiG.js} +1 -1
  108. package/viewer/assets/{php-CrnivzIK.js → php-dYlaksWx.js} +1 -1
  109. package/viewer/assets/{pie-WAS4IAKB-Dn0ztV-V.js → pie-WAS4IAKB-CLljEA6l.js} +1 -1
  110. package/viewer/assets/{pieDiagram-E7YTZNPT-BFj69QcO.js → pieDiagram-E7YTZNPT-DqzGIO9H.js} +1 -1
  111. package/viewer/assets/{pug-BfP-YwOD.js → pug-WDsqiRUK.js} +1 -1
  112. package/viewer/assets/{qml-BHf9C17M.js → qml-B5P0chYn.js} +1 -1
  113. package/viewer/assets/{quadrantDiagram-AXDQQJYC-2t5I-_4_.js → quadrantDiagram-AXDQQJYC-JV3sYNXt.js} +1 -1
  114. package/viewer/assets/{r-DjPtVJdp.js → r-DmZfBDub.js} +1 -1
  115. package/viewer/assets/{radar-RG4KPBEZ-D14Z-9c0.js → radar-RG4KPBEZ-DH4HiGh1.js} +1 -1
  116. package/viewer/assets/{railroad-74A4TZTK-BuxyK73P.js → railroad-74A4TZTK-BwJg41V9.js} +1 -1
  117. package/viewer/assets/railroad-abnf-HS5TGJTU-Byryy4k9.js +1 -0
  118. package/viewer/assets/railroad-ebnf-LZEXJU2U-BABBdJeJ.js +1 -0
  119. package/viewer/assets/railroad-peg-WCYAUIDC-C7YNbOxe.js +1 -0
  120. package/viewer/assets/{railroadDiagram-O6MQD6OU-Dm2mv6N0.js → railroadDiagram-O6MQD6OU-CrclSzRj.js} +1 -1
  121. package/viewer/assets/{razor-BH3XX51e.js → razor-BLQfBppW.js} +1 -1
  122. package/viewer/assets/{regexp-DPzTmgy2.js → regexp-CePe_vV5.js} +1 -1
  123. package/viewer/assets/{requirementDiagram-BXWQKSXE-BJTZ8ml9.js → requirementDiagram-BXWQKSXE-5QlkAVAN.js} +1 -1
  124. package/viewer/assets/{rst-DQbfRM9X.js → rst-D9pCulha.js} +1 -1
  125. package/viewer/assets/{ruby-DxybHg9D.js → ruby-r3EAH5Rz.js} +1 -1
  126. package/viewer/assets/{sankeyDiagram-P5KCCOFB-eBLIKN_A.js → sankeyDiagram-P5KCCOFB-BJzQ5vkn.js} +1 -1
  127. package/viewer/assets/{sas-DoUzRWOs.js → sas-Dxc2YEvn.js} +1 -1
  128. package/viewer/assets/{scss-BSqQF9Aq.js → scss-rZd3d-ZI.js} +1 -1
  129. package/viewer/assets/{sequenceDiagram-WJ2MYXX4-BxHxbxqV.js → sequenceDiagram-WJ2MYXX4--tS5gMY4.js} +1 -1
  130. package/viewer/assets/{shellscript-DkZJ1HjW.js → shellscript-B-b5xnkP.js} +1 -1
  131. package/viewer/assets/{shellsession-ykUTtcwM.js → shellsession-DlWXnhiW.js} +1 -1
  132. package/viewer/assets/{soy-4rmF0gor.js → soy-DXWgq6qD.js} +1 -1
  133. package/viewer/assets/{sql-wJX-vNm_.js → sql-5vPpIo1-.js} +1 -1
  134. package/viewer/assets/{src-IhQtBUXO.js → src-eDHFRM9C.js} +1 -1
  135. package/viewer/assets/{stata-Bjw5vh7C.js → stata-BPQLlmzg.js} +1 -1
  136. package/viewer/assets/{stateDiagram-D77RDMKH-DNPBpLlw.js → stateDiagram-D77RDMKH-xapk0kUZ.js} +1 -1
  137. package/viewer/assets/stateDiagram-v2-MP3YSRHH-Cb8zYuMi.js +1 -0
  138. package/viewer/assets/{surrealql-B-cZs35d.js → surrealql-CTEIAZfm.js} +1 -1
  139. package/viewer/assets/{svelte-BtYh0aTf.js → svelte-B6EVsDV1.js} +1 -1
  140. package/viewer/assets/{swimlanes-42K2YHIH-CnHbZ76W.js → swimlanes-42K2YHIH-BLyG_o3-.js} +1 -1
  141. package/viewer/assets/swimlanesDiagram-VR7AAH4N-RLMdNA3S.js +8 -0
  142. package/viewer/assets/{templ-eYWdvrUr.js → templ-Bu4quHqE.js} +1 -1
  143. package/viewer/assets/{tex-DQ-rt_Oj.js → tex-Dv_54fPG.js} +1 -1
  144. package/viewer/assets/{timeline-definition-24CTP7MA-vOTFZgf6.js → timeline-definition-24CTP7MA-DBaZM3qq.js} +1 -1
  145. package/viewer/assets/{treeView-Q6P3EWNA-CU_mSunf.js → treeView-Q6P3EWNA-C3zH0Rwt.js} +1 -1
  146. package/viewer/assets/{treemap-WGGIJYW6-BbLri-XL.js → treemap-WGGIJYW6-BTho8OjG.js} +1 -1
  147. package/viewer/assets/{ts-tags-CspMWJ3s.js → ts-tags-0DHV6Smm.js} +1 -1
  148. package/viewer/assets/{tsx-CXUmELmz.js → tsx-CmZ6PB1U.js} +1 -1
  149. package/viewer/assets/{twig-B0yioFX1.js → twig-u99yWuG6.js} +1 -1
  150. package/viewer/assets/{typescript-vMN-etbi.js → typescript-WF79ZIBQ.js} +1 -1
  151. package/viewer/assets/{typst-Cvk0bEbK.js → typst-DQ7XxvRZ.js} +1 -1
  152. package/viewer/assets/{vennDiagram-4TSXK5OY-PBkXHE6T.js → vennDiagram-4TSXK5OY-B5Cb69qm.js} +1 -1
  153. package/viewer/assets/{vue-Ce21QNcM.js → vue-DXac3mhj.js} +1 -1
  154. package/viewer/assets/{vue-html-DsNf3O2s.js → vue-html-FSSTYK94.js} +1 -1
  155. package/viewer/assets/{vue-vine-BsGtGXV3.js → vue-vine-BDF8epqI.js} +1 -1
  156. package/viewer/assets/{wardley-WFR3VGLG-kwPRtpGA.js → wardley-WFR3VGLG-DswcXSmz.js} +1 -1
  157. package/viewer/assets/{wardleyDiagram-VM6X3IG4-BacMGxmX.js → wardleyDiagram-VM6X3IG4-BPgNi0Kp.js} +1 -1
  158. package/viewer/assets/{xml-BmjAaPhA.js → xml-HI856iuk.js} +1 -1
  159. package/viewer/assets/{xsl-CtfA1v1E.js → xsl-Ck-aKGwi.js} +1 -1
  160. package/viewer/assets/{xychartDiagram-S5SC5T6Z-BDIbR1Lm.js → xychartDiagram-S5SC5T6Z-B8UAJr6c.js} +1 -1
  161. package/viewer/assets/{yaml-A9EbijaD.js → yaml-DrPyW5uV.js} +1 -1
  162. package/viewer/index.html +2 -2
  163. package/viewer/assets/architecture-7GRP2DOG-Dwn_SxkP.js +0 -1
  164. package/viewer/assets/channel-CgM1_6P7.js +0 -1
  165. package/viewer/assets/classDiagram-ZZMXUADV-BtFc7wo5.js +0 -1
  166. package/viewer/assets/classDiagram-v2-VYDZK3BY-BtFc7wo5.js +0 -1
  167. package/viewer/assets/eventmodeling-NTZA5JFV-BCWgnTvv.js +0 -1
  168. package/viewer/assets/flowDiagram-HODETNUW-B4hhZ1QN.js +0 -1
  169. package/viewer/assets/index-Dhnl4xDm.js +0 -795
  170. package/viewer/assets/railroad-abnf-HS5TGJTU-BM7gtNXd.js +0 -1
  171. package/viewer/assets/railroad-ebnf-LZEXJU2U-DPlBcoln.js +0 -1
  172. package/viewer/assets/railroad-peg-WCYAUIDC-B6tOGY79.js +0 -1
  173. package/viewer/assets/stateDiagram-v2-MP3YSRHH-sLT-i9tN.js +0 -1
  174. package/viewer/assets/swimlanesDiagram-VR7AAH4N-DIpLefsN.js +0 -8
@@ -1,795 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CNhJPCRr.js","assets/html-BBsNbpya.js","assets/javascript-BPmsAXaP.js","assets/css-9neLgVLd.js","assets/angular-ts-BnGgGecY.js","assets/scss-BSqQF9Aq.js","assets/apl-ZOvmk1hE.js","assets/xml-BmjAaPhA.js","assets/java-CT3DXSYV.js","assets/json-BCFP8udh.js","assets/astro-BJzTFZ3R.js","assets/typescript-vMN-etbi.js","assets/postcss-BXeXVLqQ.js","assets/tsx-CXUmELmz.js","assets/blade-CvS8_w1j.js","assets/html-derivative-CkVRX-vn.js","assets/sql-wJX-vNm_.js","assets/bsl-_VjlB9mv.js","assets/sdbl-bTVj8UrX.js","assets/cairo-DLTphjLi.js","assets/python-gzcpVVnB.js","assets/chapel-1aYDxJri.js","assets/c-D5ZSBtUG.js","assets/cobol-CEoq_5kf.js","assets/coffee-CZTWsTxw.js","assets/cpp-Hh-o0ivR.js","assets/regexp-DPzTmgy2.js","assets/glsl-DEqjHGFr.js","assets/crystal-CL_KTsac.js","assets/shellscript-DkZJ1HjW.js","assets/edge-CTz4kCIs.js","assets/elixir-Bi8YL7XX.js","assets/elm-C-UxMmSh.js","assets/erb-ZSq62Y_u.js","assets/ruby-DxybHg9D.js","assets/haml-B-2wwgyn.js","assets/graphql-Bi0OE4k4.js","assets/jsx-Dgzhn0Dq.js","assets/lua-BWNAOGrF.js","assets/yaml-A9EbijaD.js","assets/erlang-Cphh6RMH.js","assets/markdown-BYOwaDjH.js","assets/fortran-fixed-form-DEKoE2YW.js","assets/fortran-free-form-CYNrtFtB.js","assets/fsharp-D13ZGOAj.js","assets/gdresource-xMC7jr7x.js","assets/gdshader-CBce3t8t.js","assets/gdscript-DYvRD3hg.js","assets/git-commit-BSykSTBG.js","assets/diff-woXpYk--.js","assets/git-rebase-Cw9GoTpw.js","assets/glimmer-js-Bb_1emHy.js","assets/glimmer-ts-D2kOXMB0.js","assets/hack-aU4VRzRW.js","assets/handlebars-Bmq7hbFI.js","assets/http-cQ-nDL4L.js","assets/hurl-D5phPwZN.js","assets/csv-Dx-8-gkx.js","assets/hxml-Dcm88srW.js","assets/haxe-C8oCnwJJ.js","assets/jinja-Ct_36dEc.js","assets/jison-BYrmy85c.js","assets/julia-DIddcjVY.js","assets/r-DjPtVJdp.js","assets/just-C5t963St.js","assets/perl-DRhmHTw_.js","assets/latex-BKZooW5w.js","assets/tex-DQ-rt_Oj.js","assets/liquid-_PLVu-8C.js","assets/marko-DC7qz2de.js","assets/less-DVTAwKKz.js","assets/mdc-Bn_2wB99.js","assets/nextflow-BJtWHP5T.js","assets/nextflow-groovy-DJMQeKeT.js","assets/nginx-Ce7JLwNg.js","assets/nim-CP_MVph6.js","assets/org-BVKft-Jg.js","assets/clojure-DqKBuwfJ.js","assets/csharp-oqKa8noW.js","assets/dart-CnvKMtbv.js","assets/docker-IyjqRm3v.js","assets/go-rLFTqkRN.js","assets/groovy-CacY0gHj.js","assets/ini-B5eOa1yu.js","assets/make-Dixweg8N.js","assets/objective-c-D1A_Heim.js","assets/ocaml-O90oeIOV.js","assets/php-CrnivzIK.js","assets/vb-DOwzaHZ0.js","assets/raku-B3gFvitq.js","assets/rust-Cfkwpbl8.js","assets/scala-BiFt_7mu.js","assets/zig-CMLA9XwU.js","assets/xsl-CtfA1v1E.js","assets/pug-BfP-YwOD.js","assets/qml-BHf9C17M.js","assets/razor-BH3XX51e.js","assets/rst-DQbfRM9X.js","assets/cmake-Bj61d0ZC.js","assets/sas-DoUzRWOs.js","assets/shaderlab-TOUzSsQk.js","assets/hlsl-Cvrh5tZx.js","assets/shellsession-ykUTtcwM.js","assets/soy-4rmF0gor.js","assets/sparql-D_iOobhT.js","assets/turtle-ByJddavk.js","assets/stata-Bjw5vh7C.js","assets/surrealql-B-cZs35d.js","assets/svelte-BtYh0aTf.js","assets/templ-eYWdvrUr.js","assets/ts-tags-CspMWJ3s.js","assets/twig-B0yioFX1.js","assets/typst-Cvk0bEbK.js","assets/bat-qdxAdBWQ.js","assets/bibtex-Ci_nEsc7.js","assets/jsonc-CYpm1nAK.js","assets/log-BNLmms1o.js","assets/powershell-CCSX75yM.js","assets/swift-CyEgAFGc.js","assets/system-verilog-Dh5ihWbf.js","assets/verilog-B2gwz-sJ.js","assets/vue-Ce21QNcM.js","assets/vue-html-DsNf3O2s.js","assets/vue-vine-BsGtGXV3.js","assets/stylus-B6D30XZt.js","assets/mermaid.core-DpRyWAPv.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-IhQtBUXO.js","assets/chunk-DU6HZSFF-C7mZpnch.js","assets/chunk-75Z2AOVW-CbTHx8Lz.js","assets/dist-CX8-lyNa.js","assets/chunk-PWAF6VOD-BtrRW-Sl.js","assets/chunk-GMAD6QVW-BYg8qa71.js","assets/chunk-P2QGCYS3-XOxrUS-o.js","assets/chunk-4HAMMTFA-B0uITxv4.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-GVQU2GXP-rnsdTI4Q.js","assets/chunk-OSK3NFVY-DjAAQhPw.js","assets/line-lYgs1iW7.js","assets/path-fybaL0A-.js","assets/array-BifhSqXX.js","assets/graphlib-DS17s2tU.js","assets/chunk-L3NEJ4N5-Itlw7HBQ.js"])))=>i.map(i=>d[i]);
2
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return d(this.context.count)},getNextContextId(){return d(this.context.count++)}};function d(e){let t=String(e),n=t.length-1;return u.context.id+(n?String.fromCharCode(96+n):``)+t}function f(e){u.context=e}var p=(e,t)=>e===t,m=Symbol(`solid-proxy`),h=typeof Proxy==`function`,g=Symbol(`solid-track`),_={equals:p},v=null,y=Ce,b=1,x=2,S={owned:null,cleanups:null,context:null,owner:null},C={},w=null,T=null,E=null,D=null,O=null,k=0;function ee(e,t){let n=E,r=w,i=e.length===0,a=t===void 0?r:t,o=i?S:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>P(()=>De(o)));w=o,E=null;try{return xe(s,!0)}finally{E=n,w=r}}function A(e,t){t=t?Object.assign({},_,t):_;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[he.bind(n),e=>(typeof e==`function`&&(e=T&&T.running&&T.sources.has(n)?e(n.tValue):e(n.value)),ge(n,e))]}function te(e,t,n){_e(ye(e,t,!0,b))}function j(e,t,n){_e(ye(e,t,!1,b))}function M(e,t,n){y=we;let r=ye(e,t,!1,b),i=me&&R(me);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),O?O.push(r):_e(r)}function N(e,t,n){n=n?Object.assign({},_,n):_;let r=ye(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,_e(r),he.bind(r)}function ne(e){return e&&typeof e==`object`&&`then`in e}function re(e,t,n){let r,i,a;typeof t==`function`?(r=e,i=t,a=n||{}):(r=!0,i=e,a=t||{});let o=null,s=C,c=null,l=!1,d=!1,f=`initialValue`in a,p=typeof r==`function`&&N(r),m=new Set,[h,g]=(a.storage||A)(a.initialValue),[_,v]=A(void 0),[y,b]=A(void 0,{equals:!1}),[x,S]=A(f?`ready`:`unresolved`);w&&F(()=>{for(let e of m.keys())e.decrement();m.clear(),T&&o&&T.promises.delete(o),o=null}),u.context&&(c=u.getNextContextId(),a.ssrLoadFrom===`initial`?s=a.initialValue:u.load&&u.has(c)&&(s=u.load(c)));function D(e,t,n,r){return o===e&&(o=null,r!==void 0&&(f=!0),(e===s||t===s)&&a.onHydrated&&queueMicrotask(()=>a.onHydrated(r,{value:t})),s=C,T&&e&&l?(T.promises.delete(e),l=!1,xe(()=>{T.running=!0,O(t,n)},!1)):O(t,n)),t}function O(e,t){xe(()=>{t===void 0&&g(()=>e),S(t===void 0?f?`ready`:`unresolved`:`errored`),v(t);for(let e of m.keys())e.decrement();m.clear()},!1)}function k(){let e=me&&R(me),t=h(),n=_();if(n!==void 0&&!o)throw n;return E&&!E.user&&e&&te(()=>{y(),o&&(e.resolved&&T&&l?T.promises.add(o):m.has(e)||(e.increment(),m.add(e)))}),t}function ee(e=!0){if(e!==!1&&d)return;d=!1;let t=p?p():r;if(l=T&&T.running,t==null||t===!1){D(o,P(h));return}T&&o&&T.promises.delete(o);let n,a=s===C?P(()=>{try{return i(t,{value:h(),refetching:e})}catch(e){n=e}}):s;if(n!==void 0){D(o,void 0,ke(n),t);return}return ne(a)?(o=a,`v`in a?(a.s===1?D(o,a.v,void 0,t):D(o,void 0,ke(a.v),t),a):(d=!0,queueMicrotask(()=>d=!1),xe(()=>{S(f?`refreshing`:`pending`),b()},!1),a.then(e=>D(a,e,void 0,t),e=>D(a,void 0,ke(e),t)))):(D(o,a,void 0,t),a)}Object.defineProperties(k,{state:{get:()=>x()},error:{get:()=>_()},loading:{get(){let e=x();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return k();let e=_();if(e&&!o)throw e;return h()}}});let j=w;return p?te(()=>(j=w,ee(!1))):ee(!1),[k,{refetch:e=>ue(j,()=>ee(e)),mutate:g}]}function ie(e){return xe(e,!1)}function P(e){if(E===null)return e();let t=E;E=null;try{return e()}finally{E=t}}function ae(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=P(()=>t(o,i,n));return i=o,s}}function oe(e){M(()=>P(e))}function F(e){return w===null||(w.cleanups===null?w.cleanups=[e]:w.cleanups.push(e)),e}function se(e,t){v||=Symbol(`error`),w=ye(void 0,void 0,!0),w.context={...w.context,[v]:[t]},T&&T.running&&T.sources.add(w);try{return e()}catch(e){je(e)}finally{w=w.owner}}function ce(){return E}function le(){return w}function ue(e,t){let n=w,r=E;w=e,E=null;try{return xe(t,!0)}catch(e){je(e)}finally{w=n,E=r}}function de(e){if(T&&T.running)return e(),T.done;let t=E,n=w;return Promise.resolve().then(()=>{E=t,w=n;let r;return me&&(r=T||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||(r.done=new Promise(e=>r.resolve=e)),r.running=!0),xe(e,!1),E=w=null,r?r.done:void 0})}var[fe,I]=A(!1);function L(e,t){let n=Symbol(`context`);return{id:n,Provider:Ne(n),defaultValue:e}}function R(e){let t;return w&&w.context&&(t=w.context[e.id])!==void 0?t:e.defaultValue}function pe(e){let t=N(e),n=N(()=>Me(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var me;function he(){let e=T&&T.running;if(this.sources&&(e?this.tState:this.state)){if((e?this.tState:this.state)===b)_e(this);else{let e=D;D=null,xe(()=>Te(this),!1),D=e}}if(E){let e=this.observers;if(!e||e[e.length-1]!==E){let t=e?e.length:0;E.sources?(E.sources.push(this),E.sourceSlots.push(t)):(E.sources=[this],E.sourceSlots=[t]),e?(e.push(E),this.observerSlots.push(E.sources.length-1)):(this.observers=[E],this.observerSlots=[E.sources.length-1])}}return e&&T.sources.has(this)?this.tValue:this.value}function ge(e,t,n){let r=T&&T.running&&T.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(T){let r=T.running;(r||!n&&T.sources.has(e))&&(T.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&xe(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=T&&T.running;r&&T.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?D.push(n):O.push(n),n.observers&&Ee(n)),r?n.tState=b:n.state=b)}if(D.length>1e6)throw D=[],Error()},!1)}return t}function _e(e){if(!e.fn)return;De(e);let t=k;ve(e,T&&T.running&&T.sources.has(e)?e.tValue:e.value,t),T&&!T.running&&T.sources.has(e)&&queueMicrotask(()=>{xe(()=>{T&&(T.running=!0),E=w=e,ve(e,e.tValue,t),E=w=null},!1)})}function ve(e,t,n){let r,i=w,a=E;E=w=e;try{r=e.fn(t)}catch(t){return e.pure&&(T&&T.running?(e.tState=b,e.tOwned&&e.tOwned.forEach(De),e.tOwned=void 0):(e.state=b,e.owned&&e.owned.forEach(De),e.owned=null)),e.updatedAt=n+1,je(t)}finally{E=a,w=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?ge(e,r,!0):T&&T.running&&e.pure?(T.sources.has(e)||(e.value=r),T.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function ye(e,t,n,r=b,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:w,context:w?w.context:null,pure:n};return T&&T.running&&(a.state=0,a.tState=r),w===null||w!==S&&(T&&T.running&&w.pure?w.tOwned?w.tOwned.push(a):w.tOwned=[a]:w.owned?w.owned.push(a):w.owned=[a]),a}function be(e){let t=T&&T.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===x)return Te(e);if(e.suspense&&P(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<k);){if(t&&T.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(T.disposed.has(t))return}if((t?e.tState:e.state)===b)_e(e);else if((t?e.tState:e.state)===x){let t=D;D=null,xe(()=>Te(e,n[0]),!1),D=t}}}function xe(e,t){if(D)return e();let n=!1;t||(D=[]),O?n=!0:O=[],k++;try{let t=e();return Se(n),t}catch(e){n||(O=null),D=null,je(e)}}function Se(e){if(D&&=(Ce(D),null),e)return;let t;if(T){if(!T.promises.size&&!T.queue.size){let e=T.sources,n=T.disposed;O.push.apply(O,T.effects),t=T.resolve;for(let e of O)`tState`in e&&(e.state=e.tState),delete e.tState;T=null,xe(()=>{for(let e of n)De(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)De(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}I(!1)},!1)}else if(T.running){T.running=!1,T.effects.push.apply(T.effects,O),O=null,I(!0);return}}let n=O;O=null,n.length&&xe(()=>y(n),!1),t&&t()}function Ce(e){for(let t=0;t<e.length;t++)be(e[t])}function we(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:be(r)}if(u.context){if(u.count){u.effects||=[],u.effects.push(...e.slice(0,n));return}f()}for(u.effects&&(u.done||!u.count)&&(e=[...u.effects,...e],n+=u.effects.length,delete u.effects),t=0;t<n;t++)be(e[t])}function Te(e,t){let n=T&&T.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===b?i!==t&&(!i.updatedAt||i.updatedAt<k)&&be(i):e===x&&Te(i,t)}}}function Ee(e){let t=T&&T.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=x:r.state=x,r.pure?D.push(r):O.push(r),r.observers&&Ee(r))}}function De(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)De(e.tOwned[t]);delete e.tOwned}if(T&&T.running&&e.pure)Oe(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)De(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}T&&T.running?e.tState=0:e.state=0}function Oe(e,t){if(t||(e.tState=0,T.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)Oe(e.owned[t])}function ke(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function Ae(e,t,n){try{for(let n of t)n(e)}catch(e){je(e,n&&n.owner||null)}}function je(e,t=w){let n=v&&t&&t.context&&t.context[v],r=ke(e);if(!n)throw r;O?O.push({fn(){Ae(r,n,t)},state:b}):Ae(r,n,t)}function Me(e){if(typeof e==`function`&&!e.length)return Me(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Me(e[n]);if(Array.isArray(r)){if(r.length<32768)t.push.apply(t,r);else for(let e=0;e<r.length;e++)t.push(r[e])}else t.push(r)}return t}return e}function Ne(e,t){return function(t){let n;return j(()=>n=P(()=>(w.context={...w.context,[e]:t.value},pe(()=>t.children))),void 0),n}}var Pe=Symbol(`fallback`);function Fe(e){for(let t=0;t<e.length;t++)e[t]()}function Ie(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return F(()=>Fe(a)),()=>{let c=e()||[],l=c.length,u,d;return c[g],P(()=>{let e,t,p,m,h,g,_,v,y;if(l===0)o!==0&&(Fe(a),a=[],r=[],i=[],o=0,s&&=[]),n.fallback&&(r=[Pe],i[0]=ee(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(l),d=0;d<l;d++)r[d]=c[d],i[d]=ee(f);o=l}else{for(p=Array(l),m=Array(l),s&&(h=Array(l)),g=0,_=Math.min(o,l);g<_&&r[g]===c[g];g++);for(_=o-1,v=l-1;_>=g&&v>=g&&r[_]===c[v];_--,v--)p[v]=i[_],m[v]=a[_],s&&(h[v]=s[_]);for(e=new Map,t=Array(v+1),d=v;d>=g;d--)y=c[d],u=e.get(y),t[d]=u===void 0?-1:u,e.set(y,d);for(u=g;u<=_;u++)y=r[u],d=e.get(y),d!==void 0&&d!==-1?(p[d]=i[u],m[d]=a[u],s&&(h[d]=s[u]),d=t[d],e.set(y,d)):a[u]();for(d=g;d<l;d++)d in p?(i[d]=p[d],a[d]=m[d],s&&(s[d]=h[d],s[d](d))):i[d]=ee(f);i=i.slice(0,o=l),r=c.slice(0)}return i});function f(e){if(a[d]=e,s){let[e,n]=A(d);return s[d]=n,t(c[d],e)}return t(c[d])}}}function Le(e,t,n={}){let r=[],i=[],a=[],o=[],s=0,c;return F(()=>Fe(a)),()=>{let l=e()||[],u=l.length;return l[g],P(()=>{if(u===0)return s!==0&&(Fe(a),a=[],r=[],i=[],s=0,o=[]),n.fallback&&(r=[Pe],i[0]=ee(e=>(a[0]=e,n.fallback())),s=1),i;for(r[0]===Pe&&(a[0](),a=[],r=[],i=[],s=0),c=0;c<u;c++)c<r.length&&r[c]!==l[c]?o[c](()=>l[c]):c>=r.length&&(i[c]=ee(d));for(;c<r.length;c++)a[c]();return s=o.length=a.length=u,r=l.slice(0),i=i.slice(0,s)});function d(e){a[c]=e;let[n,r]=A(l[c]);return o[c]=r,t(n,c)}}}function z(e,t){return P(()=>e(t||{}))}function Re(){return!0}var ze={get(e,t,n){return t===m?n:e.get(t)},has(e,t){return t===m||e.has(t)},set:Re,deleteProperty:Re,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Re,deleteProperty:Re}},ownKeys(e){return e.keys()}};function Be(e){return(e=typeof e==`function`?e():e)?e:{}}function Ve(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function B(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&m in r,e[n]=typeof r==`function`?(t=!0,N(r)):r}if(h&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=Be(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in Be(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(Be(e[n])));return[...new Set(t)]}},ze);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:Ve.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},a=Object.keys(r);for(let e=a.length-1;e>=0;e--){let t=a[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function V(e,...t){let n=t.length;if(h&&m in e){let r=n>1?t.flat():t[0],i=new Set,a=t.map(t=>{let n=t.filter(e=>!i.has(e)&&(i.add(e),!0));return new Proxy({get(t){return n.includes(t)?e[t]:void 0},has(t){return n.includes(t)&&t in e},keys(){return n.filter(t=>t in e)}},ze)});return a.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return!r.includes(t)&&t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},ze)),a}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}var He=0;function Ue(){return u.context?u.getNextContextId():`cl-${He++}`}var We=e=>`Stale read from <${e}>.`;function H(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return N(Ie(()=>e.each,e.children,t||void 0))}function Ge(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return N(Le(()=>e.each,e.children,t||void 0))}function U(e){let t=e.keyed,n=N(()=>e.when,void 0,void 0),r=t?n:N(n,void 0,{equals:(e,t)=>!e==!t});return N(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?P(()=>a(t?i:()=>{if(!P(r))throw We(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function Ke(e){let t=pe(()=>e.children),n=N(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=N(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:N(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return N(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?P(()=>o(a.keyed?i():()=>{if(P(n)()?.[0]!==r)throw We(`Match`);return i()})):o},void 0,void 0)}function qe(e){return e}var Je;function Ye(e){let t;u.context&&u.load&&(t=u.load(u.getContextId()));let[n,r]=A(t,void 0);return Je||=new Set,Je.add(r),F(()=>Je.delete(r)),N(()=>{let t;if(t=n()){let n=e.fallback;return typeof n==`function`&&n.length?P(()=>n(t,()=>r())):n}return se(()=>e.children,r)},void 0,void 0)}var Xe=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Ze=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Qe=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),$e=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function et(e,t){let n=$e[e];return typeof n==`object`?n[t]?n.$:void 0:n}var tt=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),nt=new Set(`altGlyph.altGlyphDef.altGlyphItem.animate.animateColor.animateMotion.animateTransform.circle.clipPath.color-profile.cursor.defs.desc.ellipse.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.filter.font.font-face.font-face-format.font-face-name.font-face-src.font-face-uri.foreignObject.g.glyph.glyphRef.hkern.image.line.linearGradient.marker.mask.metadata.missing-glyph.mpath.path.pattern.polygon.polyline.radialGradient.rect.set.stop.svg.switch.symbol.text.textPath.tref.tspan.use.view.vkern`.split(`.`)),rt={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},W=e=>N(()=>e());function it(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null){if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&(d=l.get(t[c]))!=null&&d===r+u;)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++}else t[o++].remove()}}}var at=`_$DX_DELEGATE`;function ot(e,t,n,r={}){let i;return ee(r=>{i=r,t===document?e():q(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function G(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>P(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function st(e,t=window.document){let n=t[at]||(t[at]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Ct))}}function K(e,t,n){yt(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function ct(e,t,n,r){yt(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function lt(e,t,n){yt(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function ut(e,t){yt(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function dt(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function ft(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];r&&r!==`undefined`&&!t[r]&&(xt(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];i&&i!==`undefined`&&n[i]!==o&&o&&(xt(e,i,!0),n[i]=o)}return n}function pt(e,t,n){if(!t)return n?K(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function mt(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function ht(e,t={},n,r){let i={};return r||j(()=>i.children=wt(e,t.children,i.children)),j(()=>typeof t.ref==`function`&&gt(t.ref,e)),j(()=>_t(e,t,n,!0,i,!0)),i}function gt(e,t,n){return P(()=>e(t,n))}function q(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return wt(e,t,r,n);j(r=>wt(e,t(),r,n),r)}function _t(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=St(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||wt(e,t.children);continue}let s=t[o];i[o]=St(e,o,s,i[o],n,a,t)}}function vt(e){let t,n;return!yt()||!(t=u.registry.get(n=Ot()))?e():(u.completed&&u.completed.add(t),u.registry.delete(n),t)}function yt(e){return!!u.context&&!u.done&&(!e||e.isConnected)}function bt(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function xt(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function St(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return pt(e,n,r);if(t===`classList`)return ft(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=tt.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(dt(e,i,n,a),a&&st([i]))}else if(t.slice(0,5)===`attr:`)K(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)lt(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ze.has(t))||!i&&((u=et(t,e.tagName))||(c=Xe.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(yt(e))return n;t===`class`||t===`className`?ut(e,n):s&&!c&&!l?e[bt(t)]=n:(t===`value`||t===`defaultValue`)&&(e.nodeName===`INPUT`||e.nodeName===`TEXTAREA`)?e[u||t]=n??``:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&rt[t.split(`:`)[0]];r?ct(e,r,t,n):K(e,Qe[t]||t,n)}return n}function Ct(e){if(u.registry&&u.events&&u.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),u.registry&&!u.done&&(u.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function wt(e,t,n,r,i){let a=yt(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=Dt(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=Dt(e,n,r)}else if(o===`function`)return j(()=>{let i=t();for(;typeof i==`function`;)i=i();n=wt(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(Tt(o,t,n,i))return j(()=>n=wt(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=Dt(e,n,r),s)return n}else c?n.length===0?Et(e,o,r):it(e,n,o):(n&&Dt(e),Et(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=Dt(e,n,r,t);Dt(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function Tt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(o!=null&&o!==!0&&o!==!1){if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=Tt(e,o,s)||i;else if(c===`function`){if(r){for(;typeof o==`function`;)o=o();i=Tt(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0}else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}}return i}function Et(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function Dt(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}function Ot(){return u.getNextContextId()}var kt=`http://www.w3.org/2000/svg`;function At(e,t=!1,n=void 0){return t?document.createElementNS(kt,e):document.createElement(e,{is:n})}function jt(e){let{useShadow:t}=e,n=document.createTextNode(``),r=()=>e.mount||document.body,i=le(),a,o=!!u.context;return M(()=>{o&&(le().user=o=!1),a||=ue(i,()=>N(()=>e.children));let s=r();if(s instanceof HTMLHeadElement){let[e,t]=A(!1);ee(t=>q(s,()=>e()?t():a(),null)),F(()=>t(!0))}else{let r=At(e.isSVG?`g`:`div`,e.isSVG),i=t&&r.attachShadow?r.attachShadow({mode:`open`}):r;Object.defineProperty(r,"_$host",{get(){return n.parentNode},configurable:!0}),q(i,a),s.appendChild(r),e.ref&&e.ref(r),F(()=>s.contains(r)&&s.removeChild(r))}},void 0,{render:!o}),n}function Mt(e,t){let n=N(e);return N(()=>{let e=n();switch(typeof e){case`function`:return P(()=>e(t));case`string`:let n=nt.has(e),r=u.context?vt():At(e,n,P(()=>t.is));return ht(r,t,n),r}})}function Nt(e){let[,t]=V(e,[`component`]);return Mt(()=>e.component,t)}var Pt=Symbol(`store-raw`),Ft=Symbol(`store-node`),It=Symbol(`store-has`),Lt=Symbol(`store-self`);function Rt(e){let t=e[m];if(!t&&(Object.defineProperty(e,m,{value:t=new Proxy(e,Kt)}),!Array.isArray(e))){let n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e),i=Object.getPrototypeOf(e),a=i!==null&&typeof e==`object`&&!!e&&!Array.isArray(e)&&i!==Object.prototype;if(a){let e=Object.getOwnPropertyDescriptors(i);n.push(...Object.keys(e)),Object.assign(r,e)}for(let i=0,o=n.length;i<o;i++){let o=n[i];a&&o===`constructor`||r[o].get&&Object.defineProperty(e,o,{configurable:!0,enumerable:r[o].enumerable,get:r[o].get.bind(t)})}}return t}function zt(e){let t;return typeof e==`object`&&!!e&&(e[m]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function Bt(e,t=new Set){let n,r,i,a;if(n=e!=null&&e[Pt])return n;if(!zt(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let n=0,a=e.length;n<a;n++)i=e[n],(r=Bt(i,t))!==i&&(e[n]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let s=0,c=n.length;s<c;s++)a=n[s],!o[a].get&&(i=e[a],(r=Bt(i,t))!==i&&(e[a]=r))}return e}function Vt(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function Ht(e,t,n){if(e[t])return e[t];let[r,i]=A(n,{equals:!1,internal:!0});return r.$=i,e[t]=r}function Ut(e,t){let n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===m||t===Ft?n:(delete n.value,delete n.writable,n.get=()=>e[m][t],n)}function Wt(e){ce()&&Ht(Vt(e,Ft),Lt)()}function Gt(e){return Wt(e),Reflect.ownKeys(e)}var Kt={get(e,t,n){if(t===Pt)return e;if(t===m)return n;if(t===g)return Wt(e),n;let r=Vt(e,Ft),i=r[t],a=i?i():e[t];if(t===Ft||t===It||t===`__proto__`)return a;if(!i){let n=Object.getOwnPropertyDescriptor(e,t);ce()&&(typeof a!=`function`||Object.prototype.hasOwnProperty.call(e,t))&&!(n&&n.get)&&(a=Ht(r,t,a)())}return zt(a)?Rt(a):a},has(e,t){return t===Pt||t===m||t===g||t===Ft||t===It||t===`__proto__`||(ce()&&Ht(Vt(e,It),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Gt,getOwnPropertyDescriptor:Ut};function qt(e,t,n,r=!1){if(t===`__proto__`||!r&&e[t]===n)return;let i=e[t],a=e.length;n===void 0?(delete e[t],e[It]&&e[It][t]&&i!==void 0&&e[It][t].$()):(e[t]=n,e[It]&&e[It][t]&&i===void 0&&e[It][t].$());let o=Vt(e,Ft),s;if((s=Ht(o,t,i))&&s.$(()=>n),Array.isArray(e)&&e.length!==a){for(let t=e.length;t<a;t++)(s=o[t])&&s.$();(s=Ht(o,`length`,a))&&s.$(e.length)}(s=o[Lt])&&s.$()}function Jt(e,t){let n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];Yt(i)||qt(e,i,t[i])}}function Yt(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function Xt(e,t){if(typeof t==`function`&&(t=t(e)),t=Bt(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&qt(e,n,r)}qt(e,`length`,r)}else Jt(e,t)}function Zt(e,t,n=[]){let r,i=e;if(t.length>1){r=t.shift();let a=typeof r,o=Array.isArray(e);if(a===`string`&&(r===`__proto__`||t.length>1&&Yt(r)))return;if(Array.isArray(r)){for(let i=0;i<r.length;i++)Zt(e,[r[i]].concat(t),n);return}if(o&&a===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&Zt(e,[i].concat(t),n);return}if(o&&a===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)Zt(e,[r].concat(t),n);return}if(t.length>1){Zt(e[r],t,[r].concat(n));return}i=e[r],n=[r].concat(n)}let a=t[0];typeof a==`function`&&(a=a(i,n),a===i)||(r!==void 0||a!=null)&&(a=Bt(a),r===void 0||zt(i)&&zt(a)&&!Array.isArray(a)?Jt(i,a):qt(e,r,a))}function Qt(...[e,t]){let n=Bt(e||{}),r=Array.isArray(n),i=Rt(n);function a(...e){ie(()=>{r&&e.length===1?Xt(n,e[0]):Zt(n,e)})}return[i,a]}var $t=Symbol(`store-root`);function en(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function tn(e,t,n,r,i){if(en(n))return;let a=t[n];if(e===a)return;let o=Array.isArray(e);if(n!==$t&&(!zt(e)||!zt(a)||o!==Array.isArray(a)||i&&e[i]!==a[i])){qt(t,n,e);return}if(o){if(e.length&&a.length&&(!r||i&&e[0]&&e[0][i]!=null)){let t,n,o,s,c,l,u,d;for(o=0,s=Math.min(a.length,e.length);o<s&&(a[o]===e[o]||i&&a[o]&&e[o]&&a[o][i]&&a[o][i]===e[o][i]);o++)tn(e[o],a,o,r,i);let f=Array(e.length),p=new Map;for(s=a.length-1,c=e.length-1;s>=o&&c>=o&&(a[s]===e[c]||i&&a[s]&&e[c]&&a[s][i]&&a[s][i]===e[c][i]);s--,c--)f[c]=a[s];if(o>c||o>s){for(n=o;n<=c;n++)qt(a,n,e[n]);for(;n<e.length;n++)qt(a,n,f[n]),tn(e[n],a,n,r,i);a.length>e.length&&qt(a,`length`,e.length);return}for(u=Array(c+1),n=c;n>=o;n--)l=e[n],d=i&&l?l[i]:l,t=p.get(d),u[n]=t===void 0?-1:t,p.set(d,n);for(t=o;t<=s;t++)l=a[t],d=i&&l?l[i]:l,n=p.get(d),n!==void 0&&n!==-1&&(f[n]=a[t],n=u[n],p.set(d,n));for(n=o;n<e.length;n++)n in f?(qt(a,n,f[n]),tn(e[n],a,n,r,i)):qt(a,n,e[n])}else for(let t=0,n=e.length;t<n;t++)tn(e[t],a,t,r,i);a.length>e.length&&qt(a,`length`,e.length);return}let s=Object.keys(e);for(let t=0,n=s.length;t<n;t++)en(s[t])||tn(e[s[t]],a,s[t],r,i);let c=Object.keys(a);for(let t=0,n=c.length;t<n;t++)e[c[t]]===void 0&&qt(a,c[t],void 0)}function nn(e,t={}){let{merge:n,key:r=`id`}=t,i=Bt(e);return e=>{if(!zt(e)||!zt(i))return i;let t=tn(i,{[$t]:e},$t,n,r);return t===void 0?e:t}}var rn=e=>e!=null,an=e=>e.filter(rn);function on(e){return(...t)=>{for(let n of e)n&&n(...t)}}var J=e=>typeof e==`function`&&!e.length?e():e,sn=e=>Array.isArray(e)?e:e?[e]:[];function cn(e,...t){return typeof e==`function`?e(...t):e}var ln=F;function un(e,t,n){if(u.context){let[r,i]=A(e,n);return oe(()=>i(()=>t())),[r,i]}return A(t(),n)}function dn(e,t,n,r){let i=e.length,a=t.length,o=0;if(!a){for(;o<i;o++)n(e[o]);return}if(!i){for(;o<a;o++)r(t[o]);return}for(;o<a&&t[o]===e[o];o++);let s,c;t=t.slice(o),e=e.slice(o);for(s of t)e.includes(s)||r(s);for(c of e)t.includes(c)||n(c)}function fn(e,t,n,r){return e.addEventListener(t,n,r),ln(e.removeEventListener.bind(e,t,n,r))}function pn(e,t,n,r){let i=()=>{sn(J(e)).forEach(e=>{e&&sn(J(t)).forEach(t=>fn(e,t,n,r))})};typeof e==`function`?M(i):j(i)}function mn(e){let t=L();return{provider:n=>{let r=e.init(n);if(!(e.gate??!0))return z(t.Provider,{value:r,get children(){return n.children}});let i=N(()=>{let e=r.ready;return e===void 0||(typeof e==`function`?e():e)});return z(U,{get when(){return i()},get children(){return z(t.Provider,{value:r,get children(){return n.children}})}})},use(){let n=R(t);if(!n)throw Error(`${e.name} context must be used within a context provider`);return n}}}var hn=s({$schema:()=>gn,dark:()=>bn,default:()=>xn,id:()=>vn,light:()=>yn,name:()=>_n}),gn=`https://opencode.ai/desktop-theme.json`,_n=`OC-2`,vn=`oc-2`,yn={palette:{neutral:`#f7f7f7`,ink:`#171311`,primary:`#dcde8d`,success:`#12c905`,warning:`#ffdc17`,error:`#fc533a`,info:`#a753ae`,interactive:`#034cff`,diffAdd:`#9ff29a`,diffDelete:`#fc533a`},overrides:{"text-strong":`#171717`,"text-base":`#6F6F6F`,"text-weak":`#8F8F8F`,"text-weaker":`#C7C7C7`,"text-diff-add-base":`var(--v2-state-fg-success)`,"text-diff-delete-base":`var(--v2-state-fg-danger)`,"border-weak-base":`#DBDBDB`,"border-weaker-base":`#E8E8E8`,"icon-base":`#8F8F8F`,"icon-weak-base":`C7C7C7`,"surface-raised-base":`#F3F3F3`,"surface-raised-base-hover":`#EDEDED`,"surface-base":`#F8F8F8`,"surface-base-hover":`#0000000A`,"surface-interactive-weak":`#F5FAFF`,"icon-success-base":`#0ABE00`,"surface-success-base":`#E6FFE5`,"syntax-comment":`var(--v2-text-text-muted)`,"syntax-keyword":`var(--v2-pink-800)`,"syntax-string":`var(--v2-green-800)`,"syntax-primitive":`var(--v2-pink-800)`,"syntax-property":`var(--v2-orange-800)`,"syntax-type":`var(--v2-purple-800)`,"syntax-constant":`#007b80`,"syntax-critical":`var(--v2-red-800)`,"syntax-diff-add":`var(--v2-state-fg-success)`,"syntax-diff-delete":`var(--v2-state-fg-danger)`,"syntax-diff-unknown":`#a753ae`,"surface-critical-base":`#FFF2F0`},v2Overrides:{"v2-grey-50":`#ffffffff`,"v2-grey-100":`#fafafaff`,"v2-grey-200":`#f2f2f2ff`,"v2-grey-300":`#eeeeeeff`,"v2-grey-400":`#dbdbdbff`,"v2-grey-500":`#aeaeaeff`,"v2-grey-600":`#808080ff`,"v2-grey-700":`#5c5c5cff`,"v2-grey-800":`#3a3a3aff`,"v2-grey-900":`#2e2e2eff`,"v2-grey-1000":`#242424ff`,"v2-grey-1100":`#161616ff`,"v2-grey-1200":`#080808ff`,"v2-red-100":`#fcecebff`,"v2-red-200":`#f6d5d3ff`,"v2-red-300":`#f2bbb7ff`,"v2-red-400":`#f29b96ff`,"v2-red-500":`#f17471ff`,"v2-red-600":`#f1484fff`,"v2-red-700":`#d92e3cff`,"v2-red-800":`#b82d35ff`,"v2-red-900":`#97252bff`,"v2-red-1000":`#7a1f23ff`,"v2-red-1100":`#5f1a1cff`,"v2-red-1200":`#461516ff`,"v2-orange-100":`#fdf2edff`,"v2-orange-200":`#ffe7dcff`,"v2-orange-300":`#ffd8c6ff`,"v2-orange-400":`#ffc1a4ff`,"v2-orange-500":`#ffa478ff`,"v2-orange-600":`#ff8648ff`,"v2-orange-700":`#ee7330ff`,"v2-orange-800":`#d16427ff`,"v2-orange-900":`#b35624ff`,"v2-orange-1000":`#954c27ff`,"v2-orange-1100":`#723d22ff`,"v2-orange-1200":`#5a2c14ff`,"v2-yellow-100":`#fefaecff`,"v2-yellow-200":`#fcefd0ff`,"v2-yellow-300":`#f7e5b5ff`,"v2-yellow-400":`#f3da9bff`,"v2-yellow-500":`#f2cf76ff`,"v2-yellow-600":`#f6c251ff`,"v2-yellow-700":`#e7af36ff`,"v2-yellow-800":`#cb9f34ff`,"v2-yellow-900":`#ac8833ff`,"v2-yellow-1000":`#8e7231ff`,"v2-yellow-1100":`#68552bff`,"v2-yellow-1200":`#4b4025ff`,"v2-green-100":`#e7f9eaff`,"v2-green-200":`#d0f0d5ff`,"v2-green-300":`#b8e9c1ff`,"v2-green-400":`#96e3a6ff`,"v2-green-500":`#6bd586ff`,"v2-green-600":`#49c970ff`,"v2-green-700":`#2eaf5aff`,"v2-green-800":`#198b43ff`,"v2-green-900":`#1d783cff`,"v2-green-1000":`#196130ff`,"v2-green-1100":`#164c26ff`,"v2-green-1200":`#14361dff`,"v2-cyan-100":`#e2f7fbff`,"v2-cyan-200":`#c4edf4ff`,"v2-cyan-300":`#a3e4efff`,"v2-cyan-400":`#65d9ebff`,"v2-cyan-500":`#00c5dfff`,"v2-cyan-600":`#00abcfff`,"v2-cyan-700":`#0096b8ff`,"v2-cyan-800":`#007d9bff`,"v2-cyan-900":`#006c85ff`,"v2-cyan-1000":`#005a6eff`,"v2-cyan-1100":`#004756ff`,"v2-cyan-1200":`#00353fff`,"v2-blue-100":`#f5f8ffff`,"v2-blue-200":`#ecf1feff`,"v2-blue-300":`#c3d4fdff`,"v2-blue-400":`#a2bcffff`,"v2-blue-500":`#7698fdff`,"v2-blue-600":`#3b5cf6ff`,"v2-blue-700":`#0b34f4ff`,"v2-blue-800":`#3250dfff`,"v2-blue-900":`#2c47c8ff`,"v2-blue-1000":`#263fa9ff`,"v2-blue-1100":`#22388fff`,"v2-blue-1200":`#021945ff`,"v2-purple-100":`#ebecfeff`,"v2-purple-200":`#d5d5fcff`,"v2-purple-300":`#b9b8f5ff`,"v2-purple-400":`#9e99f7ff`,"v2-purple-500":`#8271f8ff`,"v2-purple-600":`#7152f4ff`,"v2-purple-700":`#623be2ff`,"v2-purple-800":`#5230c2ff`,"v2-purple-900":`#442aa1ff`,"v2-purple-1000":`#361f83ff`,"v2-purple-1100":`#2b1b6aff`,"v2-purple-1200":`#221358ff`,"v2-pink-100":`#fdecf3ff`,"v2-pink-200":`#f7d5e4ff`,"v2-pink-300":`#fabcd8ff`,"v2-pink-400":`#f799c6ff`,"v2-pink-500":`#f26cb2ff`,"v2-pink-600":`#f64aabff`,"v2-pink-700":`#e4429eff`,"v2-pink-800":`#c83d8bff`,"v2-pink-900":`#aa3576ff`,"v2-pink-1000":`#8c2d61ff`,"v2-pink-1100":`#6f284fff`,"v2-pink-1200":`#5c1d3fff`,"v2-background-bg-base":`var(--v2-grey-50)`,"v2-background-bg-deep":`var(--v2-grey-100)`,"v2-background-bg-layer-01":`var(--v2-grey-100)`,"v2-background-bg-layer-02":`var(--v2-grey-200)`,"v2-background-bg-layer-03":`var(--v2-grey-300)`,"v2-background-bg-layer-04":`var(--v2-grey-400)`,"v2-background-bg-inverse":`var(--v2-grey-1100)`,"v2-background-bg-contrast":`var(--v2-grey-1000)`,"v2-background-bg-icon-button-contrast":`var(--v2-background-bg-contrast)`,"v2-background-bg-button-neutral":`var(--v2-grey-50)`,"v2-background-bg-accent":`var(--v2-blue-600)`,"v2-background-bg-code-path":`var(--v2-cyan-100)`,"v2-text-text-base":`var(--v2-grey-1100)`,"v2-text-text-muted":`var(--v2-grey-700)`,"v2-text-text-faint":`var(--v2-grey-600)`,"v2-text-text-inverse":`var(--v2-grey-50)`,"v2-text-text-contrast":`var(--v2-grey-50)`,"v2-text-text-accent":`var(--v2-blue-600)`,"v2-text-text-accent-hover":`var(--v2-blue-700)`,"v2-text-text-code-accent":`var(--v2-blue-900)`,"v2-text-text-code-path":`var(--v2-blue-900)`,"v2-icon-icon-base":`var(--v2-grey-800)`,"v2-icon-icon-muted":`var(--v2-grey-600)`,"v2-icon-icon-faint":`var(--v2-grey-500)`,"v2-icon-icon-inverse":`var(--v2-grey-50)`,"v2-icon-icon-contrast":`var(--v2-grey-100)`,"v2-icon-icon-accent":`var(--v2-blue-600)`,"v2-icon-icon-accent-hover":`var(--v2-blue-700)`,"v2-border-border-muted":`var(--v2-alpha-dark-8)`,"v2-border-border-base":`var(--v2-alpha-dark-10)`,"v2-border-border-strong":`var(--v2-alpha-dark-20)`,"v2-border-border-inverse":`var(--v2-grey-1000)`,"v2-border-border-focus":`var(--v2-blue-500)`,"v2-overlay-simple-overlay-hover":`var(--v2-alpha-dark-4)`,"v2-overlay-simple-overlay-pressed":`var(--v2-alpha-dark-8)`,"v2-overlay-simple-overlay-contrast-hover":`var(--v2-alpha-light-12)`,"v2-overlay-simple-overlay-contrast-pressed":`var(--v2-alpha-light-24)`,"v2-overlay-simple-overlay-scrim":`var(--v2-alpha-dark-40)`,"v2-overlay-gradient-depth-overlay-depth-top":`var(--v2-alpha-light-100)`,"v2-overlay-gradient-depth-overlay-depth-bot":`var(--v2-alpha-light-0)`,"v2-overlay-simple-tab-active-scrim":`#fafafa00`,"v2-overlay-simple-tab-hover-scrim":`#eeeeee00`,"v2-overlay-simple-tab-scrim":`#fafafa00`,"v2-state-bg-success":`var(--v2-green-100)`,"v2-state-fg-success":`var(--v2-green-800)`,"v2-state-border-success":`var(--v2-green-300)`,"v2-state-bg-warning":`var(--v2-yellow-100)`,"v2-state-fg-warning":`var(--v2-yellow-800)`,"v2-state-border-warning":`var(--v2-yellow-300)`,"v2-state-bg-danger":`var(--v2-red-100)`,"v2-state-fg-danger":`var(--v2-red-800)`,"v2-state-border-danger":`var(--v2-red-300)`,"v2-state-bg-info":`var(--v2-blue-200)`,"v2-state-fg-info":`var(--v2-blue-800)`,"v2-state-border-info":`var(--v2-blue-300)`,"v2-agent-plan-solid":`var(--v2-pink-800)`,"v2-agent-plan-border":`rgba(200, 61, 139, 0.2)`,"v2-agent-plan-background":`rgba(253, 236, 243, 0.1)`,"v2-agent-build-solid":`var(--v2-blue-800)`,"v2-agent-build-border":`rgba(44, 71, 200, 0.1)`,"v2-agent-build-background":`rgba(236, 241, 254, 0.1)`,"v2-agent-explore-solid":`var(--v2-yellow-900)`,"v2-agent-explore-border":`rgba(203, 159, 52, 0.2)`,"v2-agent-explore-background":`rgba(254, 250, 236, 0.1)`,"v2-agent-review-solid":`var(--v2-green-800)`,"v2-agent-writer-solid":`var(--v2-purple-700)`,"v2-avatar-bg-orange":`#ee7330ff`,"v2-avatar-border-orange":`#d16427ff`,"v2-avatar-bg-yellow":`#e7af36ff`,"v2-avatar-border-yellow":`#cb9f34ff`,"v2-avatar-bg-cyan":`#0096b8ff`,"v2-avatar-border-cyan":`#007d9bff`,"v2-avatar-bg-green":`#2eaf5aff`,"v2-avatar-border-green":`#198b43ff`,"v2-avatar-bg-red":`#d92e3cff`,"v2-avatar-border-red":`#b82d35ff`,"v2-avatar-bg-pink":`#e4429eff`,"v2-avatar-border-pink":`#c83d8bff`,"v2-avatar-bg-blue":`#3250dfff`,"v2-avatar-border-blue":`#2c47c8ff`,"v2-avatar-bg-purple":`#623be2ff`,"v2-avatar-border-purple":`#5230c2ff`,"v2-avatar-bg-gray":`#5c5c5cff`,"v2-avatar-border-gray":`#3a3a3aff`,"v2-elevation-raised":`0px 2px 4px 0px var(--v2-alpha-dark-4), 0px 1px 2px -1px var(--v2-alpha-dark-8), 0px 0px 0px 0.5px var(--v2-alpha-dark-12), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-floating":`0px 8px 16px 0px var(--v2-alpha-dark-4), 0px 4px 8px 0px var(--v2-alpha-dark-8), 0px 0px 0px 0.5px var(--v2-alpha-dark-12), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-overlay":`0px 16px 32px 0px var(--v2-alpha-dark-4), 0px 8px 16px 0px var(--v2-alpha-dark-8), 0px 0px 0px 0.5px var(--v2-alpha-dark-12), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-button-neutral":`0px 1px 1.5px 0px var(--v2-alpha-dark-10), 0px 0px 0px 0.5px var(--v2-alpha-dark-14), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-button-contrast":`0px 1px 1.5px 0px var(--v2-alpha-dark-20), 0px 0px 0px 0.5px var(--v2-grey-800), inset 0px 1px 2px 0px var(--v2-alpha-light-14), inset 0px -1px 2px 0px var(--v2-alpha-dark-6), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-elements":`0px 0.5px 0.5px 0px var(--v2-alpha-dark-40)`,"v2-elevation-switch-off":`inset 0px 1px 1px 0px var(--v2-alpha-dark-8), inset 0px 0.5px 0.5px 0px var(--v2-alpha-dark-8), inset 0px 0px 0px 0.5px var(--v2-alpha-dark-10)`,"v2-elevation-switch-on":`inset 0px 2px 2px 0px var(--v2-alpha-dark-10), inset 0px 1px 1px 0px var(--v2-alpha-dark-10), inset 0px 0px 0px 0.5px var(--v2-alpha-dark-20)`,"v2-illustration-illustration-layer-01":`var(--v2-grey-300)`,"v2-illustration-illustration-layer-02":`var(--v2-grey-400)`,"v2-illustration-illustration-layer-03":`var(--v2-grey-500)`,"v2-font-family-code":`var(--font-family-mono)`}},bn={palette:{neutral:`#1f1f1f`,ink:`#f1ece8`,primary:`#fab283`,success:`#12c905`,warning:`#fcd53a`,error:`#fc533a`,info:`#edb2f1`,interactive:`#034cff`,diffAdd:`#c8ffc4`,diffDelete:`#fc533a`},overrides:{"text-strong":`#EDEDED`,"text-base":`#A0A0A0`,"text-weak":`#707070`,"text-weaker":`#505050`,"text-diff-add-base":`var(--v2-state-fg-success)`,"text-diff-delete-base":`var(--v2-state-fg-danger)`,"border-weak-base":`#282828`,"border-weaker-base":`#232323`,"icon-base":`#7E7E7E`,"icon-weak-base":`#343434`,"surface-raised-base":`#232323`,"surface-raised-base-hover":`#282828`,"surface-base":`#1C1C1C`,"surface-base-hover":`#FFFFFF0D`,"surface-interactive-weak":`#0D172B`,"surface-success-base":`#022B00`,"syntax-comment":`var(--v2-text-text-muted)`,"syntax-keyword":`var(--v2-pink-400)`,"syntax-string":`var(--v2-green-400)`,"syntax-primitive":`var(--v2-pink-400)`,"syntax-property":`var(--v2-orange-400)`,"syntax-type":`var(--v2-purple-400)`,"syntax-constant":`#93e9f6`,"syntax-critical":`var(--v2-red-400)`,"syntax-diff-add":`var(--v2-state-fg-success)`,"syntax-diff-delete":`var(--v2-state-fg-danger)`,"syntax-diff-unknown":`#edb2f1`,"surface-critical-base":`#1F0603`},v2Overrides:{"v2-grey-50":`#ffffffff`,"v2-grey-100":`#fafafaff`,"v2-grey-200":`#f2f2f2ff`,"v2-grey-300":`#eeeeeeff`,"v2-grey-400":`#dbdbdbff`,"v2-grey-500":`#aeaeaeff`,"v2-grey-600":`#808080ff`,"v2-grey-700":`#5c5c5cff`,"v2-grey-800":`#3a3a3aff`,"v2-grey-900":`#2e2e2eff`,"v2-grey-1000":`#242424ff`,"v2-grey-1100":`#161616ff`,"v2-grey-1200":`#080808ff`,"v2-red-100":`#fcecebff`,"v2-red-200":`#f6d5d3ff`,"v2-red-300":`#f2bbb7ff`,"v2-red-400":`#f29b96ff`,"v2-red-500":`#f17471ff`,"v2-red-600":`#f1484fff`,"v2-red-700":`#d92e3cff`,"v2-red-800":`#b82d35ff`,"v2-red-900":`#97252bff`,"v2-red-1000":`#7a1f23ff`,"v2-red-1100":`#5f1a1cff`,"v2-red-1200":`#461516ff`,"v2-orange-100":`#fdf2edff`,"v2-orange-200":`#ffe7dcff`,"v2-orange-300":`#ffd8c6ff`,"v2-orange-400":`#ffc1a4ff`,"v2-orange-500":`#ffa478ff`,"v2-orange-600":`#ff8648ff`,"v2-orange-700":`#ee7330ff`,"v2-orange-800":`#d16427ff`,"v2-orange-900":`#b35624ff`,"v2-orange-1000":`#954c27ff`,"v2-orange-1100":`#723d22ff`,"v2-orange-1200":`#5a2c14ff`,"v2-yellow-100":`#fefaecff`,"v2-yellow-200":`#fcefd0ff`,"v2-yellow-300":`#f7e5b5ff`,"v2-yellow-400":`#f3da9bff`,"v2-yellow-500":`#f2cf76ff`,"v2-yellow-600":`#f6c251ff`,"v2-yellow-700":`#e7af36ff`,"v2-yellow-800":`#cb9f34ff`,"v2-yellow-900":`#ac8833ff`,"v2-yellow-1000":`#8e7231ff`,"v2-yellow-1100":`#68552bff`,"v2-yellow-1200":`#4b4025ff`,"v2-green-100":`#e7f9eaff`,"v2-green-200":`#d0f0d5ff`,"v2-green-300":`#b8e9c1ff`,"v2-green-400":`#96e3a6ff`,"v2-green-500":`#6bd586ff`,"v2-green-600":`#49c970ff`,"v2-green-700":`#2eaf5aff`,"v2-green-800":`#198b43ff`,"v2-green-900":`#1d783cff`,"v2-green-1000":`#196130ff`,"v2-green-1100":`#164c26ff`,"v2-green-1200":`#14361dff`,"v2-cyan-100":`#e2f7fbff`,"v2-cyan-200":`#c4edf4ff`,"v2-cyan-300":`#a3e4efff`,"v2-cyan-400":`#65d9ebff`,"v2-cyan-500":`#00c5dfff`,"v2-cyan-600":`#00abcfff`,"v2-cyan-700":`#0096b8ff`,"v2-cyan-800":`#007d9bff`,"v2-cyan-900":`#006c85ff`,"v2-cyan-1000":`#005a6eff`,"v2-cyan-1100":`#004756ff`,"v2-cyan-1200":`#00353fff`,"v2-blue-100":`#f5f8ffff`,"v2-blue-200":`#ecf1feff`,"v2-blue-300":`#c3d4fdff`,"v2-blue-400":`#a2bcffff`,"v2-blue-500":`#7698fdff`,"v2-blue-600":`#3b5cf6ff`,"v2-blue-700":`#0b34f4ff`,"v2-blue-800":`#3250dfff`,"v2-blue-900":`#2c47c8ff`,"v2-blue-1000":`#263fa9ff`,"v2-blue-1100":`#22388fff`,"v2-blue-1200":`#021945ff`,"v2-purple-100":`#ebecfeff`,"v2-purple-200":`#d5d5fcff`,"v2-purple-300":`#b9b8f5ff`,"v2-purple-400":`#9e99f7ff`,"v2-purple-500":`#8271f8ff`,"v2-purple-600":`#7152f4ff`,"v2-purple-700":`#623be2ff`,"v2-purple-800":`#5230c2ff`,"v2-purple-900":`#442aa1ff`,"v2-purple-1000":`#361f83ff`,"v2-purple-1100":`#2b1b6aff`,"v2-purple-1200":`#221358ff`,"v2-pink-100":`#fdecf3ff`,"v2-pink-200":`#f7d5e4ff`,"v2-pink-300":`#fabcd8ff`,"v2-pink-400":`#f799c6ff`,"v2-pink-500":`#f26cb2ff`,"v2-pink-600":`#f64aabff`,"v2-pink-700":`#e4429eff`,"v2-pink-800":`#c83d8bff`,"v2-pink-900":`#aa3576ff`,"v2-pink-1000":`#8c2d61ff`,"v2-pink-1100":`#6f284fff`,"v2-pink-1200":`#5c1d3fff`,"v2-background-bg-base":`var(--v2-grey-1100)`,"v2-background-bg-deep":`var(--v2-grey-1200)`,"v2-background-bg-layer-01":`var(--v2-grey-1000)`,"v2-background-bg-layer-02":`var(--v2-grey-900)`,"v2-background-bg-layer-03":`var(--v2-grey-800)`,"v2-background-bg-layer-04":`var(--v2-grey-700)`,"v2-background-bg-inverse":`var(--v2-grey-50)`,"v2-background-bg-contrast":`var(--v2-grey-700)`,"v2-background-bg-icon-button-contrast":`var(--v2-grey-400)`,"v2-background-bg-button-neutral":`var(--v2-alpha-light-6)`,"v2-background-bg-accent":`var(--v2-blue-600)`,"v2-background-bg-code-path":`var(--v2-cyan-1200)`,"v2-text-text-base":`var(--v2-grey-100)`,"v2-text-text-muted":`var(--v2-grey-500)`,"v2-text-text-faint":`var(--v2-grey-600)`,"v2-text-text-inverse":`var(--v2-grey-1100)`,"v2-text-text-contrast":`var(--v2-grey-50)`,"v2-text-text-accent":`var(--v2-blue-400)`,"v2-text-text-accent-hover":`var(--v2-blue-300)`,"v2-text-text-code-accent":`var(--v2-blue-400)`,"v2-text-text-code-path":`var(--v2-blue-300)`,"v2-icon-icon-base":`var(--v2-grey-400)`,"v2-icon-icon-muted":`var(--v2-grey-600)`,"v2-icon-icon-faint":`var(--v2-grey-700)`,"v2-icon-icon-inverse":`var(--v2-grey-1100)`,"v2-icon-icon-contrast":`var(--v2-grey-100)`,"v2-icon-icon-accent":`var(--v2-blue-400)`,"v2-icon-icon-accent-hover":`var(--v2-blue-300)`,"v2-border-border-muted":`var(--v2-alpha-light-8)`,"v2-border-border-base":`var(--v2-alpha-light-10)`,"v2-border-border-strong":`var(--v2-alpha-light-20)`,"v2-border-border-inverse":`var(--v2-grey-100)`,"v2-border-border-focus":`var(--v2-blue-500)`,"v2-overlay-simple-overlay-hover":`var(--v2-alpha-light-6)`,"v2-overlay-simple-overlay-pressed":`var(--v2-alpha-light-10)`,"v2-overlay-simple-overlay-contrast-hover":`var(--v2-alpha-dark-24)`,"v2-overlay-simple-overlay-contrast-pressed":`var(--v2-alpha-dark-40)`,"v2-overlay-simple-overlay-scrim":`var(--v2-alpha-dark-60)`,"v2-overlay-gradient-depth-overlay-depth-top":`var(--v2-alpha-light-100)`,"v2-overlay-gradient-depth-overlay-depth-bot":`var(--v2-alpha-light-0)`,"v2-overlay-simple-tab-active-scrim":`#24242400`,"v2-overlay-simple-tab-hover-scrim":`#3a3a3a00`,"v2-overlay-simple-tab-scrim":`#08080800`,"v2-state-bg-success":`var(--v2-green-1200)`,"v2-state-fg-success":`var(--v2-green-500)`,"v2-state-border-success":`var(--v2-green-900)`,"v2-state-bg-warning":`var(--v2-yellow-1200)`,"v2-state-fg-warning":`var(--v2-yellow-500)`,"v2-state-border-warning":`var(--v2-yellow-900)`,"v2-state-bg-danger":`var(--v2-red-1200)`,"v2-state-fg-danger":`var(--v2-red-500)`,"v2-state-border-danger":`var(--v2-red-900)`,"v2-state-bg-info":`var(--v2-blue-1200)`,"v2-state-fg-info":`var(--v2-blue-500)`,"v2-state-border-info":`var(--v2-blue-900)`,"v2-agent-plan-solid":`var(--v2-pink-400)`,"v2-agent-plan-border":`rgba(247, 153, 198, 0.2)`,"v2-agent-plan-background":`rgba(170, 53, 118, 0.05)`,"v2-agent-build-solid":`var(--v2-blue-300)`,"v2-agent-build-border":`rgba(162, 188, 255, 0.2)`,"v2-agent-build-background":`rgba(38, 63, 169, 0.05)`,"v2-agent-explore-solid":`var(--v2-yellow-300)`,"v2-agent-explore-border":`rgba(243, 218, 155, 0.2)`,"v2-agent-explore-background":`rgba(172, 136, 51, 0.05)`,"v2-agent-review-solid":`var(--v2-green-300)`,"v2-agent-writer-solid":`var(--v2-purple-400)`,"v2-avatar-bg-orange":`#723d22ff`,"v2-avatar-border-orange":`#ff8648ff`,"v2-avatar-bg-yellow":`#68552bff`,"v2-avatar-border-yellow":`#e7af36ff`,"v2-avatar-bg-cyan":`#005a6eff`,"v2-avatar-border-cyan":`#0096b8ff`,"v2-avatar-bg-green":`#196130ff`,"v2-avatar-border-green":`#49c970ff`,"v2-avatar-bg-red":`#7a1f23ff`,"v2-avatar-border-red":`#d92e3cff`,"v2-avatar-bg-pink":`#8c2d61ff`,"v2-avatar-border-pink":`#e4429eff`,"v2-avatar-bg-blue":`#263fa9ff`,"v2-avatar-border-blue":`#7698fdff`,"v2-avatar-bg-purple":`#361f83ff`,"v2-avatar-border-purple":`#7152f4ff`,"v2-avatar-bg-gray":`#5c5c5cff`,"v2-avatar-border-gray":`#aeaeaeff`,"v2-elevation-raised":`0px 2px 4px 0px var(--v2-alpha-dark-30), 0px 1px 2px 0px var(--v2-alpha-dark-30), 0px 0px 0px 0.5px var(--v2-alpha-light-16), 0px -0.5px 0px 0px var(--v2-alpha-light-6)`,"v2-elevation-floating":`0px 8px 16px 0px var(--v2-alpha-dark-30), 0px 4px 8px 0px var(--v2-alpha-dark-30), 0px 0px 0px 0.5px var(--v2-alpha-light-16), 0px -0.5px 0px 0px var(--v2-alpha-light-6)`,"v2-elevation-overlay":`0px 16px 32px 0px var(--v2-alpha-dark-30), 0px 8px 16px 0px var(--v2-alpha-dark-30), 0px 0px 0px 0.5px var(--v2-alpha-light-16), 0px -0.5px 0px 0px var(--v2-alpha-light-6)`,"v2-elevation-button-neutral":`0px 1px 2px 0px var(--v2-alpha-dark-40), 0px 0px 0px 0.5px var(--v2-alpha-light-20), 0px -0.5px 0px 0px var(--v2-alpha-light-10)`,"v2-elevation-button-contrast":`0px 1px 2px 0px var(--v2-alpha-dark-40), 0px 0px 0px 0.5px var(--v2-alpha-light-40), inset 0px 0px 0px 0px var(--v2-alpha-light-0), inset 0px 0px 0px 0px var(--v2-alpha-light-0), 0px -0.5px 0px 0px var(--v2-alpha-light-30)`,"v2-elevation-elements":`0px 0.5px 0.5px 0px var(--v2-alpha-dark-40)`,"v2-elevation-switch-off":`inset 0px -0.5px 0px 0px var(--v2-alpha-light-10), inset 0px 0px 0px 0px var(--v2-alpha-light-0), inset 0px 0px 0px 0.5px var(--v2-alpha-light-16)`,"v2-elevation-switch-on":`inset 0px -0.5px 0px 0px var(--v2-alpha-light-10), inset 0px 0px 0px 0px var(--v2-alpha-light-0), inset 0px 0px 0px 0.5px var(--v2-alpha-light-16)`,"v2-illustration-illustration-layer-01":`var(--v2-grey-900)`,"v2-illustration-illustration-layer-02":`var(--v2-grey-800)`,"v2-illustration-illustration-layer-03":`var(--v2-grey-700)`}},xn={$schema:gn,name:_n,id:vn,light:yn,dark:bn};function Sn(e,t,n){return Math.max(t,Math.min(n,e))}function Cn(e){return(e%360+360)%360}function wn(e){let t=e.replace(`#`,``),n=t.length===3||t.length===4?t.split(``).map(e=>e+e).join(``):t,r=n.length===8?n.slice(0,6):n,i=parseInt(r,16);return{r:(i>>16&255)/255,g:(i>>8&255)/255,b:(i&255)/255}}function Tn(e,t,n){let r=e=>{let t=Sn(e,0,1);return Math.round(t*255).toString(16).padStart(2,`0`)};return`#${r(e)}${r(t)}${r(n)}`}function En(e){return e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055}function Dn(e){return e<=.04045?e/12.92:((e+.055)/1.055)**2.4}function On(e,t,n){let r=Dn(e),i=Dn(t),a=Dn(n),o=.4122214708*r+.5363325363*i+.0514459929*a,s=.2119034982*r+.6806995451*i+.1073969566*a,c=.0883024619*r+.2817188376*i+.6299787005*a,l=Math.cbrt(o),u=Math.cbrt(s),d=Math.cbrt(c),f=.2104542553*l+.793617785*u-.0040720468*d,p=1.9779984951*l-2.428592205*u+.4505937099*d,m=.0259040371*l+.7827717662*u-.808675766*d,h=Math.sqrt(p*p+m*m),g=180/Math.PI*Math.atan2(m,p);return g<0&&(g+=360),{l:f,c:h,h:g}}function kn(e){let{l:t,c:n,h:r}=e,i=n*Math.cos(r*Math.PI/180),a=n*Math.sin(r*Math.PI/180),o=t+.3963377774*i+.2158037573*a,s=t-.1055613458*i-.0638541728*a,c=t-.0894841775*i-1.291485548*a,l=o*o*o,u=s*s*s,d=c*c*c,f=4.0767416621*l-3.3077115913*u+.2309699292*d,p=-1.2684380046*l+2.6097574011*u-.3413193965*d,m=-.0041960863*l-.7034186147*u+1.707614701*d;return{r:En(f),g:En(p),b:En(m)}}function An(e){let{r:t,g:n,b:r}=wn(e);return On(t,n,r)}function jn(e){let t={l:Sn(e.l,0,1),c:Math.max(0,e.c),h:Cn(e.h)},n=kn(t);if(n.r>=0&&n.r<=1&&n.g>=0&&n.g<=1&&n.b>=0&&n.b<=1)return t;let r=t.c;for(let e=0;e<24;e++){r*=.9;let e={...t,c:r},n=kn(e);if(n.r>=0&&n.r<=1&&n.g>=0&&n.g<=1&&n.b>=0&&n.b<=1)return e}return{...t,c:0}}function Mn(e){let{r:t,g:n,b:r}=kn(jn(e));return Tn(t,n,r)}function Nn(e,t){let n=An(e),r=[],i=t?[.118,.138,.167,.202,.246,.304,.378,.468,Sn(n.l*.825,.53,.705),Sn(n.l*.89,.61,.79),Sn(n.l+.033,.868,.943),.984]:[.993,.983,.962,.936,.906,.866,.811,.74,n.l,Math.max(0,n.l-.036),.49,.27],a=t?[.52,.68,.86,1.02,1.14,1.24,1.36,1.48,1.56,1.64,1.62,1.15]:[.12,.24,.46,.68,.84,.98,1.08,1.16,1.22,1.26,1.18,.98];for(let e=0;e<12;e++)r.push(Mn({l:i[e],c:n.c*a[e],h:n.h}));return r}function Pn(e,t,n){if(n){let r=An(e),i=e=>Mn({l:r.l+(1-r.l)*e,c:r.c*Math.max(0,1-e),h:r.h}),a=t?(e=>Mn({l:r.l*(1-e),c:r.c*Math.max(0,1-e*(t?.12:.3)),h:r.h}))(Sn(.19+Math.max(0,r.l-.12)*.33+r.c*1.95,.17,.27)):r.l<.82?i(.86):i(Sn(.1+r.c*3.2+Math.max(0,.95-r.l)*.35,.1,.28));return(t?[0,.018,.039,.064,.097,.143,.212,.31,.46,.649,.845,.984]:[0,.022,.042,.068,.102,.146,.208,.296,.432,.61,.81,.965]).map(e=>Fn(a,n,e))}let r=An(e),i=[],a=Math.min(r.c,t?.068:.04),o=t?[.138,.156,.178,.202,.232,.272,.326,.404,Sn(r.l*.83,.43,.55),.596,.719,.956]:[.991,.979,.964,.946,.931,.913,.891,.83,r.l,.617,.542,.205];for(let e=0;e<12;e++)i.push(Mn({l:o[e],c:a,h:r.h}));return i}function Fn(e,t,n){let r=An(e),i=An(t),a=((i.h-r.h)%360+540)%360-180;return Mn({l:r.l+(i.l-r.l)*n,c:r.c+(i.c-r.c)*n,h:r.h+a*n})}function In(e,t){let n=An(e);return Mn({l:n.l+(t.l??0),c:n.c*(t.c??1),h:n.h+(t.h??0)})}function Ln(e,t){let n=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4,r=e=>{let{r:t,g:r,b:i}=wn(e);return .2126*n(t)+.587*n(r)+.0722*n(i)},i=r(e),a=r(t),o=Math.max(i,a),s=Math.min(i,a);return(o+.05)/(s+.05)}function Rn(e,t,n){let r=wn(e),i=wn(t);return Tn(r.r*n+i.r*(1-n),r.g*n+i.g*(1-n),r.b*n+i.b*(1-n))}function zn(e,t){let{r:n,g:r,b:i}=wn(e);return`rgba(${Math.round(n*255)}, ${Math.round(r*255)}, ${Math.round(i*255)}, ${t})`}function Bn(e,t){let n=Vn(e),{overrides:r={}}=e,i=Pn(n.neutral,t,n.ink),a=Nn(n.primary,t),o=Nn(n.accent,t),s=Nn(n.success,t),c=Nn(n.warning,t),l=Nn(n.error,t),u=Nn(n.info,t),d=Nn(n.interactive,t),f=Nn(In(n.warning,t?{h:-16,l:-.058,c:1.14}:{h:-22,l:-.082,c:.94}),t),p=Nn(In(n.interactive,{h:-12,l:.128,c:1.12}),t),m=Nn(n.diffAdd??In(n.success,{c:t?.7:.55,l:t?-.18:.14}),t),h=Nn(n.diffDelete??In(n.error,{c:t?.82:.7,l:t?-.08:.08}),t),g=n.ink??n.neutral,_=n.compact?An(g):void 0,v=_?In(g,{l:t?Math.max(0,.88-_.l)*.4:-Math.max(0,_.l-.18)*.24,c:t?1.04:1.02}):void 0,y=r[`background-base`],b=Un(y),x=!!y&&!b,S=(e,n)=>{let r=An(e);return In(t&&r.l>.84?In(e,{c:1.18}):n[10],{l:t?.034:-.024,c:t?1.3:1.18})},C=()=>{if(!n.compact)return t?`#ffba92`:`#FF8C00`;let e=An(n.warning).h,r=An(n.diffDelete??n.error).h;return Math.abs(((r-e)%360+540)%360-180)<48?t?`#ffba92`:`#FF8C00`:S(n.warning,c)},w=(e,t)=>({base:E(e,t.base),weak:E(e,t.weak),weaker:E(e,t.weaker),strong:E(e,t.strong),stronger:E(e,t.stronger)}),T=b??i[0],E=(e,t)=>x?zn(e,t):Rn(e,T,t),D=(e,r)=>E(g,t?Math.min(1,r+.024+(n.compact?.08:0)):Math.min(1,e+.024)),O=w(t?In(n.interactive,{c:.55,l:0}):In(n.interactive,{c:.45,l:.08}),t?{base:.14,weak:.08,weaker:.18,strong:.26,stronger:.42}:{base:.12,weak:.08,weaker:.16,strong:.24,stronger:.36}),k=Hn(i,t),ee=a[8],A=a[9],te=d[t?6:4],j=d[t?7:5],M=d[t?5:3],N=s[t?6:4],ne=s[t?5:3],re=s[10],ie=c[t?6:4],P=c[t?5:3],ae=c[10],oe=l[t?6:4],F=l[t?5:3],se=l[10],ce=u[t?6:4],le=u[t?5:3],ue=u[10],de=e=>{let t=wn(e),n=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4;return .2126*n(t.r)+.7152*n(t.g)+.0722*n(t.b)},fe=(e,t)=>{let n=de(e),r=de(t),i=Math.max(n,r),a=Math.min(n,r);return(i+.05)/(a+.05)},I=e=>{let t=`#ffffff`,n=`#000000`;return fe(t,e)>fe(n,e)?t:n},L={};L[`background-base`]=i[0],L[`background-weak`]=i[2],L[`background-strong`]=i[0],L[`background-stronger`]=t?i[1]:`#fcfcfc`,L[`surface-base`]=k[1],L.base=k[1],L[`surface-base-hover`]=k[2],L[`surface-base-active`]=k[2],L[`surface-base-interactive-active`]=zn(d[2],.3),L.base2=k[1],L.base3=k[1],L[`surface-inset-base`]=k[1],L[`surface-inset-base-hover`]=k[2],L[`surface-inset-strong`]=t?zn(i[0],.5):zn(i[3],.09),L[`surface-inset-strong-hover`]=L[`surface-inset-strong`],L[`surface-raised-base`]=k[0],L[`surface-float-base`]=t?i[1]:i[11],L[`surface-float-base-hover`]=t?i[2]:i[10],L[`surface-raised-base-hover`]=k[1],L[`surface-raised-base-active`]=k[2],L[`surface-raised-strong`]=t?k[3]:i[0],L[`surface-raised-strong-hover`]=t?k[5]:`#ffffff`,L[`surface-raised-stronger`]=t?k[5]:`#ffffff`,L[`surface-raised-stronger-hover`]=t?k[6]:`#ffffff`,L[`surface-weak`]=k[2],L[`surface-weaker`]=k[3],L[`surface-strong`]=t?k[6]:`#ffffff`,L[`surface-raised-stronger-non-alpha`]=t?i[2]:`#ffffff`,L[`surface-brand-base`]=ee,L[`surface-brand-hover`]=A,L[`surface-interactive-base`]=te,L[`surface-interactive-hover`]=j,L[`surface-interactive-weak`]=M,L[`surface-interactive-weak-hover`]=te,L[`surface-success-base`]=N,L[`surface-success-weak`]=ne,L[`surface-success-strong`]=re,L[`surface-warning-base`]=ie,L[`surface-warning-weak`]=P,L[`surface-warning-strong`]=ae,L[`surface-critical-base`]=oe,L[`surface-critical-weak`]=F,L[`surface-critical-strong`]=se,L[`surface-info-base`]=ce,L[`surface-info-weak`]=le,L[`surface-info-strong`]=ue,L[`surface-diff-unchanged-base`]=t?i[0]:`#ffffff00`,L[`surface-diff-skip-base`]=t?k[0]:i[1],L[`surface-diff-hidden-base`]=O.base,L[`surface-diff-hidden-weak`]=O.weak,L[`surface-diff-hidden-weaker`]=O.weaker,L[`surface-diff-hidden-strong`]=O.strong,L[`surface-diff-hidden-stronger`]=O.stronger,L[`surface-diff-add-base`]=m[2],L[`surface-diff-add-weak`]=m[t?3:1],L[`surface-diff-add-weaker`]=m[t?2:0],L[`surface-diff-add-strong`]=m[4],L[`surface-diff-add-stronger`]=m[t?10:8],L[`surface-diff-delete-base`]=h[2],L[`surface-diff-delete-weak`]=h[t?3:1],L[`surface-diff-delete-weaker`]=h[t?2:0],L[`surface-diff-delete-strong`]=h[t?4:5],L[`surface-diff-delete-stronger`]=h[t?10:8],L[`input-base`]=t?i[1]:i[0],L[`input-hover`]=t?i[2]:i[1],L[`input-active`]=t?d[6]:d[0],L[`input-selected`]=t?d[7]:d[3],L[`input-focus`]=t?d[6]:d[0],L[`input-disabled`]=i[3],L[`text-base`]=n.compact?v:i[10],L[`text-weak`]=n.compact?In(v,{l:t?-.11:.11,c:.9}):i[8],L[`text-weaker`]=n.compact?In(v,{l:t?-.2:.21,c:t?.78:.72}):i[7],L[`text-strong`]=n.compact?t?Rn(`#ffffff`,v,.9):In(v,{l:-.07,c:1.04}):i[11],L[`text-invert-base`]=t?i[10]:i[1],L[`text-invert-weak`]=t?i[8]:i[2],L[`text-invert-weaker`]=t?i[7]:i[3],L[`text-invert-strong`]=t?i[11]:i[0],L[`text-interactive-base`]=d[t?10:9],L[`text-on-brand-base`]=I(ee),L[`text-on-interactive-base`]=I(te),L[`text-on-interactive-weak`]=I(te),L[`text-on-success-base`]=I(N),L[`text-on-critical-base`]=I(oe),L[`text-on-critical-weak`]=I(oe),L[`text-on-critical-strong`]=I(se),L[`text-on-warning-base`]=I(ie),L[`text-on-info-base`]=I(ce),L[`text-diff-add-base`]=m[10],L[`text-diff-delete-base`]=h[9],L[`text-diff-delete-strong`]=h[11],L[`text-diff-add-strong`]=m[t?7:11],L[`text-on-info-weak`]=I(ce),L[`text-on-info-strong`]=I(ue),L[`text-on-warning-weak`]=I(ie),L[`text-on-warning-strong`]=I(ae),L[`text-on-success-weak`]=I(N),L[`text-on-success-strong`]=I(re),L[`text-on-brand-weak`]=I(ee),L[`text-on-brand-weaker`]=I(ee),L[`text-on-brand-strong`]=I(A),L[`button-primary-base`]=i[11],L[`button-secondary-base`]=t?i[2]:i[0],L[`button-secondary-hover`]=t?i[3]:i[1],L[`button-ghost-hover`]=k[1],L[`button-ghost-hover2`]=k[2],L[`border-base`]=n.compact?D(.22,.16):k[6],L[`border-hover`]=n.compact?D(.28,.2):k[7],L[`border-active`]=n.compact?D(.34,.24):k[8],L[`border-selected`]=zn(d[8],t?.9:.99),L[`border-disabled`]=n.compact?D(.18,.12):k[7],L[`border-focus`]=n.compact?D(.34,.24):k[8],L[`border-weak-base`]=n.compact?D(.1,.08):k[t?5:4],L[`border-strong-base`]=n.compact?D(.34,.24):k[t?7:6],L[`border-strong-hover`]=n.compact?D(.4,.28):k[7],L[`border-strong-active`]=n.compact?D(.46,.32):k[t?7:6],L[`border-strong-selected`]=zn(d[5],.6),L[`border-strong-disabled`]=n.compact?D(.14,.1):k[5],L[`border-strong-focus`]=n.compact?D(.46,.32):k[t?7:6],L[`border-weak-hover`]=n.compact?D(.16,.12):k[t?6:5],L[`border-weak-active`]=n.compact?D(.22,.16):k[t?7:6],L[`border-weak-selected`]=zn(d[4],t?.6:.5),L[`border-weak-disabled`]=n.compact?D(.08,.06):k[5],L[`border-weak-focus`]=n.compact?D(.22,.16):k[t?7:6],L[`border-weaker-base`]=n.compact?D(.06,.04):k[2],L[`border-interactive-base`]=d[6],L[`border-interactive-hover`]=d[7],L[`border-interactive-active`]=d[8],L[`border-interactive-selected`]=d[8],L[`border-interactive-disabled`]=i[7],L[`border-interactive-focus`]=d[8],L[`border-success-base`]=s[6],L[`border-success-hover`]=s[7],L[`border-success-selected`]=s[8],L[`border-warning-base`]=c[6],L[`border-warning-hover`]=c[7],L[`border-warning-selected`]=c[8],L[`border-critical-base`]=l[6],L[`border-critical-hover`]=l[7],L[`border-critical-selected`]=l[8],L[`border-info-base`]=u[6],L[`border-info-hover`]=u[7],L[`border-info-selected`]=u[8],L[`border-color`]=`#ffffff`,L[`icon-base`]=n.compact&&!t?L[`text-weak`]:i[t?9:8],L[`icon-hover`]=n.compact&&!t?L[`text-base`]:i[10],L[`icon-active`]=n.compact&&!t?L[`text-strong`]:i[11],L[`icon-selected`]=n.compact&&!t?L[`text-strong`]:i[11],L[`icon-disabled`]=i[t?6:7],L[`icon-focus`]=n.compact&&!t?L[`text-strong`]:i[11],L[`icon-invert-base`]=t?i[0]:`#ffffff`,L[`icon-weak-base`]=i[t?5:6],L[`icon-weak-hover`]=i[t?11:7],L[`icon-weak-active`]=i[8],L[`icon-weak-selected`]=i[t?8:9],L[`icon-weak-disabled`]=i[t?3:5],L[`icon-weak-focus`]=i[8],L[`icon-strong-base`]=i[11],L[`icon-strong-hover`]=t?`#f6f3f3`:`#151313`,L[`icon-strong-active`]=t?`#fcfcfc`:`#020202`,L[`icon-strong-selected`]=t?`#fdfcfc`:`#020202`,L[`icon-strong-disabled`]=i[7],L[`icon-strong-focus`]=t?`#fdfcfc`:`#020202`,L[`icon-brand-base`]=t?`#ffffff`:i[11],L[`icon-interactive-base`]=d[8],L[`icon-success-base`]=s[t?8:6],L[`icon-success-hover`]=s[9],L[`icon-success-active`]=s[10],L[`icon-warning-base`]=f[t?8:6],L[`icon-warning-hover`]=f[9],L[`icon-warning-active`]=f[10],L[`icon-critical-base`]=l[t?8:9],L[`icon-critical-hover`]=l[9],L[`icon-critical-active`]=l[10],L[`icon-info-base`]=u[t?8:6],L[`icon-info-hover`]=u[t?9:7],L[`icon-info-active`]=u[10],L[`icon-on-brand-base`]=I(ee),L[`icon-on-brand-hover`]=I(A),L[`icon-on-brand-selected`]=I(A),L[`icon-on-interactive-base`]=I(te),L[`icon-agent-plan-base`]=u[8],L[`icon-agent-docs-base`]=f[8],L[`icon-agent-ask-base`]=p[8],L[`icon-agent-build-base`]=d[t?10:8],L[`icon-on-success-base`]=I(N),L[`icon-on-success-hover`]=I(re),L[`icon-on-success-selected`]=I(re),L[`icon-on-warning-base`]=I(ie),L[`icon-on-warning-hover`]=I(ae),L[`icon-on-warning-selected`]=I(ae),L[`icon-on-critical-base`]=I(oe),L[`icon-on-critical-hover`]=I(se),L[`icon-on-critical-selected`]=I(se),L[`icon-on-info-base`]=I(ce),L[`icon-on-info-hover`]=I(ue),L[`icon-on-info-selected`]=I(ue),L[`icon-diff-add-base`]=m[10],L[`icon-diff-add-hover`]=m[t?9:11],L[`icon-diff-add-active`]=m[t?10:11],L[`icon-diff-delete-base`]=h[9],L[`icon-diff-delete-hover`]=h[10],L[`icon-diff-modified-base`]=C(),n.compact&&(L[`syntax-comment`]=`var(--text-weak)`,L[`syntax-regexp`]=`var(--text-base)`,L[`syntax-string`]=S(n.success,s),L[`syntax-keyword`]=S(n.accent,o),L[`syntax-primitive`]=S(n.primary,a),L[`syntax-operator`]=t?`var(--text-weak)`:`var(--text-base)`,L[`syntax-variable`]=`var(--text-strong)`,L[`syntax-property`]=S(n.info,u),L[`syntax-type`]=S(n.warning,c),L[`syntax-constant`]=S(n.accent,o),L[`syntax-punctuation`]=t?`var(--text-weak)`:`var(--text-base)`,L[`syntax-object`]=`var(--text-strong)`,L[`syntax-success`]=s[10],L[`syntax-warning`]=f[10],L[`syntax-critical`]=l[10],L[`syntax-info`]=S(n.info,u),L[`syntax-diff-add`]=m[10],L[`syntax-diff-delete`]=h[10],L[`syntax-diff-unknown`]=`#ff0000`,L[`markdown-heading`]=S(n.primary,a),L[`markdown-text`]=L[`text-base`],L[`markdown-link`]=S(n.interactive,d),L[`markdown-link-text`]=S(n.info,u),L[`markdown-code`]=S(n.success,s),L[`markdown-block-quote`]=S(n.warning,c),L[`markdown-emph`]=S(n.warning,c),L[`markdown-strong`]=S(n.accent,o),L[`markdown-horizontal-rule`]=L[`border-base`],L[`markdown-list-item`]=S(n.interactive,d),L[`markdown-list-enumeration`]=S(n.info,u),L[`markdown-image`]=S(n.interactive,d),L[`markdown-image-text`]=S(n.info,u),L[`markdown-code-block`]=L[`text-base`]),n.compact||(L[`syntax-comment`]=`var(--text-weak)`,L[`syntax-regexp`]=`var(--text-base)`,L[`syntax-string`]=t?`#00ceb9`:`#006656`,L[`syntax-keyword`]=`var(--text-weak)`,L[`syntax-primitive`]=t?`#ffba92`:`#fb4804`,L[`syntax-operator`]=t?`var(--text-weak)`:`var(--text-base)`,L[`syntax-variable`]=`var(--text-strong)`,L[`syntax-property`]=t?`#ff9ae2`:`#ed6dc8`,L[`syntax-type`]=t?`#ecf58c`:`#596600`,L[`syntax-constant`]=t?`#93e9f6`:`#007b80`,L[`syntax-punctuation`]=t?`var(--text-weak)`:`var(--text-base)`,L[`syntax-object`]=`var(--text-strong)`,L[`syntax-success`]=s[10],L[`syntax-warning`]=f[10],L[`syntax-critical`]=l[10],L[`syntax-info`]=t?`#93e9f6`:`#0092a8`,L[`syntax-diff-add`]=m[10],L[`syntax-diff-delete`]=h[10],L[`syntax-diff-unknown`]=`#ff0000`,L[`markdown-heading`]=t?`#9d7cd8`:`#d68c27`,L[`markdown-text`]=t?`#eeeeee`:`#1a1a1a`,L[`markdown-link`]=t?`#fab283`:`#3b7dd8`,L[`markdown-link-text`]=t?`#56b6c2`:`#318795`,L[`markdown-code`]=t?`#7fd88f`:`#3d9a57`,L[`markdown-block-quote`]=t?`#e5c07b`:`#b0851f`,L[`markdown-emph`]=t?`#e5c07b`:`#b0851f`,L[`markdown-strong`]=t?`#f5a742`:`#d68c27`,L[`markdown-horizontal-rule`]=t?`#808080`:`#8a8a8a`,L[`markdown-list-item`]=t?`#fab283`:`#3b7dd8`,L[`markdown-list-enumeration`]=t?`#56b6c2`:`#318795`,L[`markdown-image`]=t?`#fab283`:`#3b7dd8`,L[`markdown-image-text`]=t?`#56b6c2`:`#318795`,L[`markdown-code-block`]=t?`#eeeeee`:`#1a1a1a`),L[`avatar-background-pink`]=t?`#501b3f`:`#feeef8`,L[`avatar-background-mint`]=t?`#033a34`:`#e1fbf4`,L[`avatar-background-orange`]=t?`#5f2a06`:`#fff1e7`,L[`avatar-background-purple`]=t?`#432155`:`#f9f1fe`,L[`avatar-background-cyan`]=t?`#0f3058`:`#e7f9fb`,L[`avatar-background-lime`]=t?`#2b3711`:`#eefadc`,L[`avatar-text-pink`]=t?`#e34ba9`:`#cd1d8d`,L[`avatar-text-mint`]=t?`#95f3d9`:`#147d6f`,L[`avatar-text-orange`]=t?`#ff802b`:`#ed5f00`,L[`avatar-text-purple`]=t?`#9d5bd2`:`#8445bc`,L[`avatar-text-cyan`]=t?`#369eff`:`#0894b3`,L[`avatar-text-lime`]=t?`#c4f042`:`#5d770d`;for(let[e,t]of Object.entries(r))L[e]=t;if(n.compact&&`text-weak`in r&&!(`text-weaker`in r)){let e=L[`text-weak`];L[`text-weaker`]=e.startsWith(`#`)?In(e,{l:t?-.12:.12,c:.75}):e}return n.compact&&(`markdown-text`in r||(L[`markdown-text`]=L[`text-base`]),`markdown-code-block`in r||(L[`markdown-code-block`]=L[`text-base`])),`text-stronger`in r||(L[`text-stronger`]=L[`text-strong`]),L}function Vn(e){let t=e;if(t.palette&&t.seeds)throw Error("Theme variant cannot define both `palette` and `seeds`");if(e.palette)return{compact:!0,neutral:e.palette.neutral,ink:e.palette.ink,primary:e.palette.primary,accent:e.palette.accent??e.palette.info,success:e.palette.success,warning:e.palette.warning,error:e.palette.error,info:e.palette.info,interactive:e.palette.interactive??e.palette.primary,diffAdd:e.palette.diffAdd,diffDelete:e.palette.diffDelete};if(e.seeds)return{compact:!1,neutral:e.seeds.neutral,ink:void 0,primary:e.seeds.primary,accent:e.seeds.info,success:e.seeds.success,warning:e.seeds.warning,error:e.seeds.error,info:e.seeds.info,interactive:e.seeds.interactive,diffAdd:e.seeds.diffAdd,diffDelete:e.seeds.diffDelete};throw Error("Theme variant requires `palette` or `seeds`")}function Hn(e,t){return(t?[.038,.066,.1,.142,.19,.252,.334,.446,.58,.718,.854,.985]:[.03,.06,.1,.145,.2,.265,.35,.47,.61,.74,.86,.97]).map(t=>Rn(e[11],e[0],t))}function Un(e){if(e?.startsWith(`#`))return e}function Wn(e){return Object.entries(e).map(([e,t])=>`--${e}: ${t};`).join(`
3
- `)}var Gn=`#ffffffff`,Kn={"v2-avatar-fg":Gn,"v2-avatar-bg-orange":`#ee7330ff`,"v2-avatar-border-orange":`#d16427ff`,"v2-avatar-bg-yellow":`#e7af36ff`,"v2-avatar-border-yellow":`#cb9f34ff`,"v2-avatar-bg-cyan":`#0096b8ff`,"v2-avatar-border-cyan":`#007d9bff`,"v2-avatar-bg-green":`#2eaf5aff`,"v2-avatar-border-green":`#198b43ff`,"v2-avatar-bg-red":`#d92e3cff`,"v2-avatar-border-red":`#b82d35ff`,"v2-avatar-bg-pink":`#e4429eff`,"v2-avatar-border-pink":`#c83d8bff`,"v2-avatar-bg-blue":`#3250dfff`,"v2-avatar-border-blue":`#2c47c8ff`,"v2-avatar-bg-purple":`#623be2ff`,"v2-avatar-border-purple":`#5230c2ff`,"v2-avatar-bg-gray":`#5c5c5cff`,"v2-avatar-border-gray":`#3a3a3aff`},qn={"v2-avatar-fg":Gn,"v2-avatar-bg-orange":`#723d22ff`,"v2-avatar-border-orange":`#ff8648ff`,"v2-avatar-bg-yellow":`#68552bff`,"v2-avatar-border-yellow":`#e7af36ff`,"v2-avatar-bg-cyan":`#005a6eff`,"v2-avatar-border-cyan":`#0096b8ff`,"v2-avatar-bg-green":`#196130ff`,"v2-avatar-border-green":`#49c970ff`,"v2-avatar-bg-red":`#7a1f23ff`,"v2-avatar-border-red":`#d92e3cff`,"v2-avatar-bg-pink":`#8c2d61ff`,"v2-avatar-border-pink":`#e4429eff`,"v2-avatar-bg-blue":`#263fa9ff`,"v2-avatar-border-blue":`#7698fdff`,"v2-avatar-bg-purple":`#361f83ff`,"v2-avatar-border-purple":`#7152f4ff`,"v2-avatar-bg-gray":`#5c5c5cff`,"v2-avatar-border-gray":`#aeaeaeff`},Y=e=>`var(--${e})`,Jn={"v2-agent-plan-solid":Y(`v2-pink-800`),"v2-agent-plan-border":`rgba(200, 61, 139, 0.20)`,"v2-agent-plan-background":`rgba(253, 236, 243, 0.10)`,"v2-agent-build-solid":Y(`v2-blue-800`),"v2-agent-build-border":`rgba(44, 71, 200, 0.20)`,"v2-agent-build-background":`rgba(236, 241, 254, 0.10)`,"v2-agent-explore-solid":Y(`v2-yellow-900`),"v2-agent-explore-border":`rgba(203, 159, 52, 0.20)`,"v2-agent-explore-background":`rgba(254, 250, 236, 0.1)`,"v2-agent-review-solid":Y(`v2-green-800`),"v2-agent-writer-solid":Y(`v2-purple-700`)},Yn={"v2-agent-plan-solid":Y(`v2-pink-400`),"v2-agent-plan-border":`rgba(247, 153, 198, 0.20)`,"v2-agent-plan-background":`rgba(170, 53, 118, 0.05)`,"v2-agent-build-solid":Y(`v2-blue-300`),"v2-agent-build-border":`rgba(162, 188, 255, 0.20)`,"v2-agent-build-background":`rgba(38, 63, 169, 0.05)`,"v2-agent-explore-solid":Y(`v2-yellow-300`),"v2-agent-explore-border":`rgba(243, 218, 155, 0.20)`,"v2-agent-explore-background":`rgba(172, 136, 51, 0.05)`,"v2-agent-review-solid":Y(`v2-green-300`),"v2-agent-writer-solid":Y(`v2-purple-400`)},Xn={"v2-background-bg-base":Y(`v2-grey-100`),"v2-background-bg-deep":Y(`v2-grey-200`),"v2-background-bg-layer-01":Y(`v2-grey-300`),"v2-background-bg-layer-02":Y(`v2-grey-400`),"v2-background-bg-layer-03":Y(`v2-grey-500`),"v2-background-bg-layer-04":Y(`v2-grey-600`),"v2-background-bg-inverse":Y(`v2-grey-1000`),"v2-background-bg-contrast":Y(`v2-grey-900`),"v2-background-bg-icon-button-contrast":Y(`v2-background-bg-contrast`),"v2-background-bg-button-neutral":Y(`v2-grey-100`),"v2-background-bg-accent":Y(`v2-blue-600`),"v2-background-bg-code-path":Y(`v2-cyan-100`),"v2-text-text-inverse":Y(`v2-grey-100`),"v2-text-text-contrast":Y(`v2-grey-100`),"v2-text-text-accent":Y(`v2-blue-600`),"v2-text-text-accent-hover":Y(`v2-blue-700`),"v2-text-text-code-accent":Y(`v2-blue-900`),"v2-text-text-code-path":Y(`v2-blue-900`),"v2-border-border-muted":Y(`v2-alpha-dark-8`),"v2-border-border-base":Y(`v2-alpha-dark-10`),"v2-border-border-strong":Y(`v2-alpha-dark-20`),"v2-border-border-inverse":Y(`v2-grey-1000`),"v2-border-border-focus":Y(`v2-blue-500`),"v2-overlay-simple-overlay-hover":Y(`v2-alpha-dark-4`),"v2-overlay-simple-overlay-pressed":Y(`v2-alpha-dark-8`),"v2-overlay-simple-overlay-contrast-hover":Y(`v2-alpha-light-12`),"v2-overlay-simple-overlay-contrast-pressed":Y(`v2-alpha-light-24`),"v2-overlay-simple-overlay-scrim":Y(`v2-alpha-dark-40`),"v2-overlay-gradient-depth-overlay-depth-top":Y(`v2-alpha-light-100`),"v2-overlay-gradient-depth-overlay-depth-bot":Y(`v2-alpha-light-0`),"v2-overlay-simple-tab-active-scrim":`#fafafa00`,"v2-overlay-simple-tab-hover-scrim":`#eeeeee00`,"v2-overlay-simple-tab-scrim":`#fafafa00`,"v2-state-bg-success":Y(`v2-green-100`),"v2-state-fg-success":Y(`v2-green-800`),"v2-state-border-success":Y(`v2-green-300`),"v2-state-bg-warning":Y(`v2-yellow-100`),"v2-state-fg-warning":Y(`v2-yellow-800`),"v2-state-border-warning":Y(`v2-yellow-300`),"v2-state-bg-danger":Y(`v2-red-100`),"v2-state-fg-danger":Y(`v2-red-800`),"v2-state-border-danger":Y(`v2-red-300`),"v2-state-bg-info":Y(`v2-blue-200`),"v2-state-fg-info":Y(`v2-blue-800`),"v2-state-border-info":Y(`v2-blue-300`),...Jn,...Kn,"v2-elevation-raised":`0px 2px 4px 0px var(--v2-alpha-dark-4), 0px 1px 2px -1px var(--v2-alpha-dark-8), 0px 0px 0px 0.5px var(--v2-alpha-dark-12), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-floating":`0px 8px 16px 0px var(--v2-alpha-dark-4), 0px 4px 8px 0px var(--v2-alpha-dark-8), 0px 0px 0px 0.5px var(--v2-alpha-dark-12), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-overlay":`0px 16px 32px 0px var(--v2-alpha-dark-4), 0px 8px 16px 0px var(--v2-alpha-dark-8), 0px 0px 0px 0.5px var(--v2-alpha-dark-12), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-button-neutral":`0px 1px 1.5px 0px var(--v2-alpha-dark-10), 0px 0px 0px 0.5px var(--v2-alpha-dark-14), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-button-contrast":`0px 1px 1.5px 0px var(--v2-alpha-dark-20), 0px 0px 0px 0.5px var(--v2-grey-800), inset 0px 1px 2px 0px var(--v2-alpha-light-14), inset 0px -1px 2px 0px var(--v2-alpha-dark-6), 0px 0px 0px 0px var(--v2-alpha-dark-0)`,"v2-elevation-elements":`0px 0.5px 0.5px 0px var(--v2-alpha-dark-40)`,"v2-elevation-switch-off":`inset 0px 1px 1px 0px var(--v2-alpha-dark-8), inset 0px 0.5px 0.5px 0px var(--v2-alpha-dark-8), inset 0px 0px 0px 0.5px var(--v2-alpha-dark-10)`,"v2-elevation-switch-on":`inset 0px 2px 2px 0px var(--v2-alpha-dark-10), inset 0px 1px 1px 0px var(--v2-alpha-dark-10), inset 0px 0px 0px 0.5px var(--v2-alpha-dark-20)`,"v2-illustration-illustration-layer-01":Y(`v2-grey-300`),"v2-illustration-illustration-layer-02":Y(`v2-grey-400`),"v2-illustration-illustration-layer-03":Y(`v2-grey-500`)},Zn={"v2-background-bg-base":Y(`v2-grey-1000`),"v2-background-bg-deep":Y(`v2-grey-1100`),"v2-background-bg-layer-01":Y(`v2-grey-800`),"v2-background-bg-layer-02":Y(`v2-grey-600`),"v2-background-bg-layer-03":Y(`v2-grey-500`),"v2-background-bg-layer-04":Y(`v2-grey-400`),"v2-background-bg-inverse":Y(`v2-grey-100`),"v2-background-bg-contrast":Y(`v2-grey-700`),"v2-background-bg-icon-button-contrast":Y(`v2-grey-400`),"v2-background-bg-button-neutral":Y(`v2-alpha-light-6`),"v2-background-bg-accent":Y(`v2-blue-600`),"v2-background-bg-code-path":Y(`v2-cyan-1200`),"v2-text-text-inverse":Y(`v2-grey-1000`),"v2-text-text-contrast":Y(`v2-grey-100`),"v2-text-text-accent":Y(`v2-blue-400`),"v2-text-text-accent-hover":Y(`v2-blue-300`),"v2-text-text-code-accent":Y(`v2-blue-400`),"v2-text-text-code-path":Y(`v2-blue-300`),"v2-border-border-muted":Y(`v2-alpha-light-8`),"v2-border-border-base":Y(`v2-alpha-light-10`),"v2-border-border-strong":Y(`v2-alpha-light-20`),"v2-border-border-inverse":Y(`v2-grey-100`),"v2-border-border-focus":Y(`v2-blue-500`),"v2-overlay-simple-overlay-hover":Y(`v2-alpha-light-6`),"v2-overlay-simple-overlay-pressed":Y(`v2-alpha-light-10`),"v2-overlay-simple-overlay-contrast-hover":Y(`v2-alpha-dark-24`),"v2-overlay-simple-overlay-contrast-pressed":Y(`v2-alpha-dark-40`),"v2-overlay-simple-overlay-scrim":Y(`v2-alpha-dark-60`),"v2-overlay-gradient-depth-overlay-depth-top":Y(`v2-alpha-light-100`),"v2-overlay-gradient-depth-overlay-depth-bot":Y(`v2-alpha-light-0`),"v2-overlay-simple-tab-active-scrim":`#24242400`,"v2-overlay-simple-tab-hover-scrim":`#3a3a3a00`,"v2-overlay-simple-tab-scrim":`#08080800`,"v2-state-bg-success":Y(`v2-green-1200`),"v2-state-fg-success":Y(`v2-green-500`),"v2-state-border-success":Y(`v2-green-900`),"v2-state-bg-warning":Y(`v2-yellow-1200`),"v2-state-fg-warning":Y(`v2-yellow-500`),"v2-state-border-warning":Y(`v2-yellow-900`),"v2-state-bg-danger":Y(`v2-red-1200`),"v2-state-fg-danger":Y(`v2-red-500`),"v2-state-border-danger":Y(`v2-red-900`),"v2-state-bg-info":Y(`v2-blue-1200`),"v2-state-fg-info":Y(`v2-blue-500`),"v2-state-border-info":Y(`v2-blue-900`),...Yn,...qn,"v2-elevation-raised":`0px 2px 4px 0px var(--v2-alpha-dark-30), 0px 1px 2px 0px var(--v2-alpha-dark-30), 0px 0px 0px 0.5px var(--v2-alpha-light-16), 0px -0.5px 0px 0px var(--v2-alpha-light-6)`,"v2-elevation-floating":`0px 8px 16px 0px var(--v2-alpha-dark-30), 0px 4px 8px 0px var(--v2-alpha-dark-30), 0px 0px 0px 0.5px var(--v2-alpha-light-16), 0px -0.5px 0px 0px var(--v2-alpha-light-6)`,"v2-elevation-overlay":`0px 16px 32px 0px var(--v2-alpha-dark-30), 0px 8px 16px 0px var(--v2-alpha-dark-30), 0px 0px 0px 0.5px var(--v2-alpha-light-16), 0px -0.5px 0px 0px var(--v2-alpha-light-6)`,"v2-elevation-button-neutral":`0px 1px 2px 0px var(--v2-alpha-dark-40), 0px 0px 0px 0.5px var(--v2-alpha-light-20), 0px -0.5px 0px 0px var(--v2-alpha-light-10)`,"v2-elevation-button-contrast":`0px 1px 2px 0px var(--v2-alpha-dark-40), 0px 0px 0px 0.5px var(--v2-alpha-light-40), inset 0px 0px 0px 0px var(--v2-alpha-light-0), inset 0px 0px 0px 0px var(--v2-alpha-light-0), 0px -0.5px 0px 0px var(--v2-alpha-light-30)`,"v2-elevation-elements":`0px 0.5px 0.5px 0px var(--v2-alpha-dark-40)`,"v2-elevation-switch-off":`inset 0px -0.5px 0px 0px var(--v2-alpha-light-10), inset 0px 0px 0px 0px var(--v2-alpha-light-0), inset 0px 0px 0px 0.5px var(--v2-alpha-light-16)`,"v2-elevation-switch-on":`inset 0px -0.5px 0px 0px var(--v2-alpha-light-10), inset 0px 0px 0px 0px var(--v2-alpha-light-0), inset 0px 0px 0px 0.5px var(--v2-alpha-light-16)`,"v2-illustration-illustration-layer-01":Y(`v2-grey-900`),"v2-illustration-illustration-layer-02":Y(`v2-grey-800`),"v2-illustration-illustration-layer-03":Y(`v2-grey-700`)};function Qn(e){return e?Zn:Xn}function $n(...e){return Object.assign({},...e)}var er=[100,200,300,400,500,600,700,800,900,1e3,1100,1200],tr=e=>`var(--v2-grey-${e})`;function nr(e,t){let n=e[`v2-grey-${t}`];if(typeof n==`string`&&n.startsWith(`#`))return n}function rr(e,t){let n=e.match(/^var\(--v2-grey-(\d+)\)$/)?.[1];if(!n)throw Error(`Expected grey primitive ref, got ${e}`);let r=nr(t,Number(n));if(!r)throw Error(`Missing grey primitive v2-grey-${n}`);return r}function ir(e,t,n,r){let i=er.filter(r=>{let i=nr(e,r);return i&&Ln(i,t)>=n});return i.length===0?r:i.reduce((e,t)=>Math.abs(t-r)<Math.abs(e-r)?t:e)}function ar(e,t,n,r={}){let i=An(e),a=In(e,{l:t?Math.max(0,.88-i.l)*.4:-Math.max(0,i.l-.18)*.24,c:t?1.04:1.02}),o=Qn(t),s=rr(o[`v2-background-bg-base`],n),c=rr(o[`v2-background-bg-contrast`],n),l=rr(o[`v2-background-bg-inverse`],n),u=An(l).l>.55?1100:nr(n,50)?50:100;return{"v2-text-text-base":t?Rn(`#ffffff`,a,.9):In(a,{l:-.07,c:1.04}),"v2-text-text-muted":r[`text-weak`]??In(a,{l:t?-.11:.11,c:.9}),"v2-text-text-faint":In(a,{l:t?-.2:.21,c:t?.78:.72}),"v2-icon-icon-base":tr(ir(n,s,7,t?400:800)),"v2-icon-icon-muted":tr(ir(n,s,3,600)),"v2-icon-icon-faint":tr(ir(n,s,1.5,500)),"v2-icon-icon-inverse":tr(ir(n,l,7,u)),"v2-icon-icon-contrast":tr(ir(n,c,7,100)),"v2-icon-icon-accent":t?`var(--v2-blue-400)`:`var(--v2-blue-600)`,"v2-icon-icon-accent-hover":t?`var(--v2-blue-300)`:`var(--v2-blue-700)`}}var or={"v2-grey-50":`#ffffffff`,"v2-grey-100":`#fafafaff`,"v2-grey-200":`#f2f2f2ff`,"v2-grey-300":`#eeeeeeff`,"v2-grey-400":`#dbdbdbff`,"v2-grey-500":`#aeaeaeff`,"v2-grey-600":`#808080ff`,"v2-grey-700":`#5c5c5cff`,"v2-grey-800":`#3a3a3aff`,"v2-grey-900":`#2e2e2eff`,"v2-grey-1000":`#242424ff`,"v2-grey-1100":`#161616ff`,"v2-grey-1200":`#080808ff`,"v2-red-100":`#fcecebff`,"v2-red-200":`#f6d5d3ff`,"v2-red-300":`#f2bbb7ff`,"v2-red-400":`#f29b96ff`,"v2-red-500":`#f17471ff`,"v2-red-600":`#f1484fff`,"v2-red-700":`#d92e3cff`,"v2-red-800":`#b82d35ff`,"v2-red-900":`#97252bff`,"v2-red-1000":`#7a1f23ff`,"v2-red-1100":`#5f1a1cff`,"v2-red-1200":`#461516ff`,"v2-orange-100":`#fdf2edff`,"v2-orange-200":`#ffe7dcff`,"v2-orange-300":`#ffd8c6ff`,"v2-orange-400":`#ffc1a4ff`,"v2-orange-500":`#ffa478ff`,"v2-orange-600":`#ff8648ff`,"v2-orange-700":`#ee7330ff`,"v2-orange-800":`#d16427ff`,"v2-orange-900":`#b35624ff`,"v2-orange-1000":`#954c27ff`,"v2-orange-1100":`#723d22ff`,"v2-orange-1200":`#5a2c14ff`,"v2-yellow-100":`#fefaecff`,"v2-yellow-200":`#fcefd0ff`,"v2-yellow-300":`#f7e5b5ff`,"v2-yellow-400":`#f3da9bff`,"v2-yellow-500":`#f2cf76ff`,"v2-yellow-600":`#f6c251ff`,"v2-yellow-700":`#e7af36ff`,"v2-yellow-800":`#cb9f34ff`,"v2-yellow-900":`#ac8833ff`,"v2-yellow-1000":`#8e7231ff`,"v2-yellow-1100":`#68552bff`,"v2-yellow-1200":`#4b4025ff`,"v2-green-100":`#e7f9eaff`,"v2-green-200":`#d0f0d5ff`,"v2-green-300":`#b8e9c1ff`,"v2-green-400":`#96e3a6ff`,"v2-green-500":`#6bd586ff`,"v2-green-600":`#49c970ff`,"v2-green-700":`#2eaf5aff`,"v2-green-800":`#198b43ff`,"v2-green-900":`#1d783cff`,"v2-green-1000":`#196130ff`,"v2-green-1100":`#164c26ff`,"v2-green-1200":`#14361dff`,"v2-cyan-100":`#e2f7fbff`,"v2-cyan-200":`#c4edf4ff`,"v2-cyan-300":`#a3e4efff`,"v2-cyan-400":`#65d9ebff`,"v2-cyan-500":`#00c5dfff`,"v2-cyan-600":`#00abcfff`,"v2-cyan-700":`#0096b8ff`,"v2-cyan-800":`#007d9bff`,"v2-cyan-900":`#006c85ff`,"v2-cyan-1000":`#005a6eff`,"v2-cyan-1100":`#004756ff`,"v2-cyan-1200":`#00353fff`,"v2-blue-100":`#f5f8ffff`,"v2-blue-200":`#ecf1feff`,"v2-blue-300":`#c3d4fdff`,"v2-blue-400":`#a2bcffff`,"v2-blue-500":`#7698fdff`,"v2-blue-600":`#3b5cf6ff`,"v2-blue-700":`#0b34f4ff`,"v2-blue-800":`#3250dfff`,"v2-blue-900":`#2c47c8ff`,"v2-blue-1000":`#263fa9ff`,"v2-blue-1100":`#22388fff`,"v2-blue-1200":`#021945ff`,"v2-purple-100":`#ebecfeff`,"v2-purple-200":`#d5d5fcff`,"v2-purple-300":`#b9b8f5ff`,"v2-purple-400":`#9e99f7ff`,"v2-purple-500":`#8271f8ff`,"v2-purple-600":`#7152f4ff`,"v2-purple-700":`#623be2ff`,"v2-purple-800":`#5230c2ff`,"v2-purple-900":`#442aa1ff`,"v2-purple-1000":`#361f83ff`,"v2-purple-1100":`#2b1b6aff`,"v2-purple-1200":`#221358ff`,"v2-pink-100":`#fdecf3ff`,"v2-pink-200":`#f7d5e4ff`,"v2-pink-300":`#fabcd8ff`,"v2-pink-400":`#f799c6ff`,"v2-pink-500":`#f26cb2ff`,"v2-pink-600":`#f64aabff`,"v2-pink-700":`#e4429eff`,"v2-pink-800":`#c83d8bff`,"v2-pink-900":`#aa3576ff`,"v2-pink-1000":`#8c2d61ff`,"v2-pink-1100":`#6f284fff`,"v2-pink-1200":`#5c1d3fff`},sr=[100,200,300,400,500,600,700,800,900,1e3,1100,1200];function cr(e,t,n){return Math.max(t,Math.min(n,e))}function lr(e,t){let n=An(e),r=t?1:1.05,i=[.99,.965,.93,.885,.835,cr(n.l,.48,.72),cr(n.l-.07,.4,.64),cr(n.l-.14,.32,.55),cr(n.l-.21,.24,.46),cr(n.l-.28,.17,.38),cr(n.l-.34,.12,.3),cr(n.l-.4,.08,.22)],a=[.28,.48,.68,.86,1.02,1.28,1.34,1.28,1.18,1.08,.98,.88];return i.map((e,t)=>Mn({l:e,c:n.c*a[t]*r,h:n.h}))}function ur(e,t,n){let r=Pn(e,n,t);return n?r.toReversed():r}function dr(e,t){let n={};for(let r=0;r<sr.length;r++)n[`v2-${e}-${sr[r]}`]=t[r];return n}function fr(e){if(`palette`in e&&e.palette){let t=e.palette;return{neutral:t.neutral,ink:t.ink,primary:t.primary,accent:t.accent??t.info,success:t.success,warning:t.warning,error:t.error,info:t.info,interactive:t.interactive??t.primary,diffAdd:t.diffAdd??In(t.success,{c:.55,l:.14}),diffDelete:t.diffDelete??t.error}}if(`seeds`in e&&e.seeds){let t=e.seeds;return{neutral:t.neutral,ink:t.neutral,primary:t.primary,accent:t.info,success:t.success,warning:t.warning,error:t.error,info:t.info,interactive:t.interactive,diffAdd:t.diffAdd,diffDelete:t.diffDelete}}throw Error("Theme variant requires `palette` or `seeds`")}function pr(e,t){let n=fr(e),r=ur(n.neutral,n.ink,t),i=lr(n.interactive,t),a=lr(n.success,t),o=lr(n.warning,t),s=lr(n.error,t),c=lr(n.accent,t),l=lr(n.info,t),u=lr(In(n.warning,{h:-22,l:-.082,c:.94}),t),d=lr(In(n.info,{h:-12,l:.128,c:1.12}),t);return{...or,...dr(`grey`,r),...dr(`blue`,i),...dr(`green`,a),...dr(`yellow`,o),...dr(`red`,s),...dr(`purple`,c),...dr(`pink`,l),...dr(`orange`,u),...dr(`cyan`,d)}}function mr(e,t){let n=pr(e,t);return $n(n,Qn(t),ar(fr(e).ink,t,n,e.overrides),e.v2Overrides??{})}function hr(e){return Object.entries(e).map(([e,t])=>`--${e}: ${t};`).join(`
4
- `)}var gr=`modulepreload`,_r=function(e){return`/`+e},vr={},X=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=_r(t,n),t=s(t),t in vr)return;vr[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:gr,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},yr={THEME_ID:`opencode-theme-id`,COLOR_SCHEME:`opencode-color-scheme`,THEME_CSS_LIGHT:`opencode-theme-css-light`,THEME_CSS_DARK:`opencode-theme-css-dark`},br=`oc-theme`,xr,Sr,Cr;function wr(){return xr||(xr=Object.assign({"./themes/amoled.json":()=>X(()=>import(`./amoled-DB5yy8ad.js`),[]),"./themes/aura.json":()=>X(()=>import(`./aura-BpwPh8WE.js`),[]),"./themes/ayu.json":()=>X(()=>import(`./ayu-BkUPVVqh.js`),[]),"./themes/carbonfox.json":()=>X(()=>import(`./carbonfox-Bo2FTw5U.js`),[]),"./themes/catppuccin-frappe.json":()=>X(()=>import(`./catppuccin-frappe-DIKI31zD.js`),[]),"./themes/catppuccin-macchiato.json":()=>X(()=>import(`./catppuccin-macchiato-DYnJ67qk.js`),[]),"./themes/catppuccin.json":()=>X(()=>import(`./catppuccin-DK9M8P0P.js`),[]),"./themes/cobalt2.json":()=>X(()=>import(`./cobalt2-DQbhSfAX.js`),[]),"./themes/cursor.json":()=>X(()=>import(`./cursor-t2F-UZH_.js`),[]),"./themes/dracula.json":()=>X(()=>import(`./dracula-C3s659y-.js`),[]),"./themes/everforest.json":()=>X(()=>import(`./everforest-BEfZxV1e.js`),[]),"./themes/flexoki.json":()=>X(()=>import(`./flexoki-Dj5gUbwm.js`),[]),"./themes/github.json":()=>X(()=>import(`./github-DukYz3BY.js`),[]),"./themes/gruvbox.json":()=>X(()=>import(`./gruvbox-mhPG2W60.js`),[]),"./themes/kanagawa.json":()=>X(()=>import(`./kanagawa-D0YhNhTs.js`),[]),"./themes/lucent-orng.json":()=>X(()=>import(`./lucent-orng-DLA2Fg5T.js`),[]),"./themes/material.json":()=>X(()=>import(`./material-BoIUTXek.js`),[]),"./themes/matrix.json":()=>X(()=>import(`./matrix-CeUtxxjs.js`),[]),"./themes/mercury.json":()=>X(()=>import(`./mercury-DIlqACMb.js`),[]),"./themes/monokai.json":()=>X(()=>import(`./monokai-wFuGqe6w.js`),[]),"./themes/nightowl.json":()=>X(()=>import(`./nightowl-D5RifUq0.js`),[]),"./themes/nord.json":()=>X(()=>import(`./nord-BUnqvSkw.js`),[]),"./themes/oc-2.json":()=>X(()=>Promise.resolve().then(()=>hn),void 0),"./themes/one-dark.json":()=>X(()=>import(`./one-dark-MycZLZtN.js`),[]),"./themes/onedarkpro.json":()=>X(()=>import(`./onedarkpro-BWy38d_X.js`),[]),"./themes/opencode.json":()=>X(()=>import(`./opencode-Cy-bxafp.js`),[]),"./themes/orng.json":()=>X(()=>import(`./orng-D2APmIHg.js`),[]),"./themes/osaka-jade.json":()=>X(()=>import(`./osaka-jade-DnfGjKZL.js`),[]),"./themes/palenight.json":()=>X(()=>import(`./palenight-DG9raf7e.js`),[]),"./themes/rosepine.json":()=>X(()=>import(`./rosepine-CVx-z9QY.js`),[]),"./themes/shadesofpurple.json":()=>X(()=>import(`./shadesofpurple-dFPspHnY.js`),[]),"./themes/solarized.json":()=>X(()=>import(`./solarized-19OwMz-R.js`),[]),"./themes/synthwave84.json":()=>X(()=>import(`./synthwave84-D5i2TsvP.js`),[]),"./themes/tokyonight.json":()=>X(()=>import(`./tokyonight-DLjt3AtF.js`),[]),"./themes/vercel.json":()=>X(()=>import(`./vercel-DiG3Swzk.js`),[]),"./themes/vesper.json":()=>X(()=>import(`./vesper-BArq_vZH.js`),[]),"./themes/zenburn.json":()=>X(()=>import(`./zenburn-COSjCZYx.js`),[])}),xr)}function Tr(){return Sr||(Sr=Object.keys(wr()).map(e=>e.slice(9,-5)).sort(),Sr)}function Er(){return Cr||(Cr=new Set(Tr()),Cr)}var Dr={"oc-2":`OC-2`,amoled:`AMOLED`,aura:`Aura`,ayu:`Ayu`,carbonfox:`Carbonfox`,catppuccin:`Catppuccin`,"catppuccin-frappe":`Catppuccin Frappe`,"catppuccin-macchiato":`Catppuccin Macchiato`,cobalt2:`Cobalt2`,cursor:`Cursor`,dracula:`Dracula`,everforest:`Everforest`,flexoki:`Flexoki`,github:`GitHub`,gruvbox:`Gruvbox`,kanagawa:`Kanagawa`,"lucent-orng":`Lucent Orng`,material:`Material`,matrix:`Matrix`,mercury:`Mercury`,monokai:`Monokai`,nightowl:`Night Owl`,nord:`Nord`,"one-dark":`One Dark`,onedarkpro:`One Dark Pro`,opencode:`OpenCode`,orng:`Orng`,"osaka-jade":`Osaka Jade`,palenight:`Palenight`,rosepine:`Rose Pine`,shadesofpurple:`Shades of Purple`,solarized:`Solarized`,synthwave84:`Synthwave '84`,tokyonight:`Tokyonight`,vercel:`Vercel`,vesper:`Vesper`,zenburn:`Zenburn`},Or=xn;function kr(e,t){return e===`oc-2`||e&&(Er().has(e)||t?.[e])?e:`oc-2`}function Ar(e){if(typeof localStorage!=`object`)return null;try{return localStorage.getItem(e)}catch{return null}}function jr(e,t){if(typeof localStorage==`object`)try{localStorage.setItem(e,t)}catch{}}function Mr(e){if(typeof localStorage==`object`)try{localStorage.removeItem(e)}catch{}}function Nr(){Mr(yr.THEME_CSS_LIGHT),Mr(yr.THEME_CSS_DARK)}function Pr(){let e=document.getElementById(br);if(e)return e;let t=document.createElement(`style`);return t.id=br,document.head.appendChild(t),t}function Fr(){return typeof window==`object`&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}function Ir(e,t,n){let r=n===`dark`,i=r?e.dark:e.light,a=Wn(Bn(i,r)),o=hr(mr(i,r));t!==`oc-2`&&jr(r?yr.THEME_CSS_DARK:yr.THEME_CSS_LIGHT,`${a}\n ${o}`);let s=`:root {
5
- color-scheme: ${n};
6
- --text-mix-blend-mode: ${r?`plus-lighter`:`multiply`};
7
- ${a}
8
- ${o}
9
- }`;document.getElementById(`oc-theme-preload`)?.remove(),Pr().textContent=s,document.documentElement.dataset.theme=t,document.documentElement.dataset.colorScheme=n,document.documentElement.style.backgroundColor=r?`#080808`:`#fafafa`;let c=document.querySelector(`meta[name="theme-color"]`);c&&c.setAttribute(`content`,r?`#080808`:`#fafafa`)}function Lr(e,t){if(t!==`oc-2`)for(let t of[`light`,`dark`]){let n=t===`dark`,r=n?e.dark:e.light,i=Wn(Bn(r,n)),a=hr(mr(r,n));jr(n?yr.THEME_CSS_DARK:yr.THEME_CSS_LIGHT,`${i}\n ${a}`)}}var{use:Rr,provider:zr}=mn({name:`Theme`,init:e=>{let t=Ar(yr.THEME_ID)??e.defaultTheme,n=kr(t);t&&t!==n&&(jr(yr.THEME_ID,n),Nr());let r=Ar(yr.COLOR_SCHEME)??`system`,i=r===`system`?Fr():r,[a,o]=Qt({themes:{"oc-2":Or},themeId:n,colorScheme:r,mode:i,previewThemeId:null,previewScheme:null}),s=new Map,c=e=>{let t=e;if(!t)return Promise.resolve(void 0);let n=a.themes[t];if(n)return Promise.resolve(n);let r=s.get(t);if(r)return r;let i=wr()[`./themes/${t}.json`];if(!i)return Promise.resolve(void 0);let c=i().then(e=>{let n=e.default;return o(`themes`,t,n),n}).finally(()=>{s.delete(t)});return s.set(t,c),c},l=(t,n,r,i)=>{Ir(t,n,r),e.onThemeApplied?.(t,r,i)},u=()=>{let e=Object.keys(a.themes).filter(e=>!Er().has(e)).sort(),t=Tr();return e.length===0?t:[...t,...e]},d=()=>Promise.all(Tr().map(c)).then(()=>a.themes),f=e=>{if(e.key===yr.THEME_ID&&e.newValue){let t=kr(e.newValue,a.themes);if(t!==e.newValue&&(jr(yr.THEME_ID,t),Nr()),o(`themeId`,t),t===`oc-2`){Nr();return}c(t).then(e=>{e&&a.themeId===t&&Lr(e,t)})}e.key===yr.COLOR_SCHEME&&e.newValue&&(o(`colorScheme`,e.newValue),o(`mode`,e.newValue===`system`?Fr():e.newValue))};oe(()=>{fn(window,`storage`,f),fn(window.matchMedia(`(prefers-color-scheme: dark)`),`change`,()=>{a.colorScheme===`system`&&o(`mode`,Fr())});let t=Ar(yr.THEME_ID)??e.defaultTheme,n=kr(t,a.themes),r=Ar(yr.COLOR_SCHEME)??`system`;t&&t!==n&&(jr(yr.THEME_ID,n),Nr()),n!==a.themeId&&o(`themeId`,n),r!==a.colorScheme&&o(`colorScheme`,r),o(`mode`,r===`system`?Fr():r),c(n).then(e=>{e&&a.themeId===n&&Lr(e,n)})}),M(()=>{let e=a.themes[a.themeId];e&&l(e,a.themeId,a.mode,a.colorScheme)});let p=e=>{let t=e;if(!t){console.warn(`Theme "${e}" not found`);return}if(t!==`oc-2`&&!Er().has(t)&&!a.themes[t]){console.warn(`Theme "${e}" not found`);return}if(o(`themeId`,t),t===`oc-2`){jr(yr.THEME_ID,t),Nr();return}c(t).then(e=>{e&&a.themeId===t&&(Lr(e,t),jr(yr.THEME_ID,t))})},m=e=>{o(`colorScheme`,e),jr(yr.COLOR_SCHEME,e),o(`mode`,e===`system`?Fr():e)};return{themeId:()=>a.themeId,colorScheme:()=>a.colorScheme,mode:()=>a.mode,ids:u,name:e=>a.themes[e]?.name??Dr[e]??e,loadThemes:d,themes:()=>a.themes,setTheme:p,setColorScheme:m,registerTheme:e=>o(`themes`,e.id,e),previewTheme:e=>{let t=e;t&&(t===`oc-2`||Er().has(t)||a.themes[t])&&(o(`previewThemeId`,t),c(t).then(e=>{if(!e||a.previewThemeId!==t)return;let n=a.previewScheme?a.previewScheme===`system`?Fr():a.previewScheme:a.mode;l(e,t,n,a.previewScheme??a.colorScheme)}))},previewColorScheme:e=>{o(`previewScheme`,e);let t=e===`system`?Fr():e,n=a.previewThemeId??a.themeId;c(n).then(r=>{r&&(a.previewThemeId??a.themeId)===n&&a.previewScheme===e&&l(r,n,t,e)})},commitPreview:()=>{a.previewThemeId&&p(a.previewThemeId),a.previewScheme&&m(a.previewScheme),o(`previewThemeId`,null),o(`previewScheme`,null)},cancelPreview:()=>{o(`previewThemeId`,null),o(`previewScheme`,null),c(a.themeId).then(e=>{e&&l(e,a.themeId,a.mode,a.colorScheme)})}}}}),Br=Symbol(`fallback`);function Vr(e){for(let t of e)t.dispose()}function Hr(e,t,n,r={}){let i=new Map;return F(()=>Vr(i.values())),()=>{let n=e()||[];return n[g],P(()=>{if(!n.length)return Vr(i.values()),i.clear(),r.fallback?[ee(e=>(i.set(Br,{dispose:e}),r.fallback()))]:[];let e=Array(n.length),o=i.get(Br);if(!i.size||o){o?.dispose(),i.delete(Br);for(let r=0;r<n.length;r++){let i=n[r],o=t(i,r);a(e,i,r,o)}return e}let s=new Set(i.keys());for(let r=0;r<n.length;r++){let o=n[r],c=t(o,r);s.delete(c);let l=i.get(c);l?(e[r]=l.mapped,l.setIndex?.(r),l.setItem(()=>o)):a(e,o,r,c)}for(let e of s)i.get(e)?.dispose(),i.delete(e);return e})};function a(e,t,r,a){ee(o=>{let[s,c]=A(t),l={setItem:c,dispose:o};if(n.length>1){let[e,t]=A(r);l.setIndex=t,l.mapped=n(s,e)}else l.mapped=n(s);i.set(a,l),e[r]=l.mapped})}}function Ur(e){let{by:t}=e;return N(Hr(()=>e.each,typeof t==`function`?t:e=>e[t],e.children,`fallback`in e?{fallback:()=>e.fallback}:void 0))}function Wr(e,t=!1){let n=window.matchMedia(e),[r,i]=un(t,()=>n.matches);return fn(n,`change`,()=>i(n.matches)),r}function Gr(e){return Wr(`(prefers-color-scheme: dark)`,e)}Gr.bind(void 0,!1);var Kr=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function qr(e){let t={},n;for(;n=Kr.exec(e);)t[n[1]]=n[2];return t}function Jr(e,t){if(typeof e==`string`){if(typeof t==`string`)return`${e};${t}`;e=qr(e)}else typeof t==`string`&&(t=qr(t));return{...e,...t}}function Yr(...e){return on(e)}function Xr(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Zr(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Qr(e){return typeof e==`number`}function $r(e){return Object.prototype.toString.call(e)===`[object String]`}function ei(e){return typeof e==`function`}function ti(e){return t=>`${e()}-${t}`}function ni(e,t){return e?e===t||e.contains(t):!1}function ri(e,t=!1){let{activeElement:n}=ai(e);if(!n?.nodeName)return null;if(oi(n)&&n.contentDocument)return ri(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ai(n).getElementById(e);if(t)return t}}return n}function ii(e){return ai(e).defaultView||window}function ai(e){return e?e.ownerDocument||e:document}function oi(e){return e.tagName===`IFRAME`}var si=(e=>(e.Escape=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`,e.Space=` `,e.ArrowDown=`ArrowDown`,e.ArrowLeft=`ArrowLeft`,e.ArrowRight=`ArrowRight`,e.ArrowUp=`ArrowUp`,e.End=`End`,e.Home=`Home`,e.PageDown=`PageDown`,e.PageUp=`PageUp`,e))(si||{});function ci(e){return typeof window>`u`||window.navigator==null?!1:window.navigator.userAgentData?.brands.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function li(e){return typeof window<`u`&&window.navigator!=null&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function ui(){return li(/^Mac/i)}function di(){return li(/^iPhone/i)}function fi(){return li(/^iPad/i)||ui()&&navigator.maxTouchPoints>1}function pi(){return di()||fi()}function mi(){return ui()||pi()}function hi(){return ci(/AppleWebKit/i)&&!gi()}function gi(){return ci(/Chrome/i)}function _i(e,t){return t&&(ei(t)?t(e):t[0](t[1],e)),e?.defaultPrevented}function vi(e){return t=>{for(let n of e)_i(t,n)}}function yi(e){return ui()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function bi(e){if(e){if(Si())e.focus({preventScroll:!0});else{let t=Ci(e);e.focus(),wi(t)}}}var xi=null;function Si(){if(xi==null){xi=!1;try{document.createElement(`div`).focus({get preventScroll(){return xi=!0,!0}})}catch{}}return xi}function Ci(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function wi(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Ti=[`input:not([type='hidden']):not([disabled])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`[tabindex]`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable='false'])`],Ei=[...Ti,`[tabindex]:not([tabindex="-1"]):not([disabled])`],Di=`${Ti.join(`:not([hidden]),`)},[tabindex]:not([disabled]):not([hidden])`,Oi=Ei.join(`:not([hidden]):not([tabindex="-1"]),`);function ki(e,t){let n=Array.from(e.querySelectorAll(Di)).filter(Ai);return t&&Ai(e)&&n.unshift(e),n.forEach((e,t)=>{if(oi(e)&&e.contentDocument){let r=e.contentDocument.body,i=ki(r,!1);n.splice(t,1,...i)}}),n}function Ai(e){return ji(e)&&!Mi(e)}function ji(e){return e.matches(Di)&&Ni(e)}function Mi(e){return Number.parseInt(e.getAttribute(`tabindex`)||`0`,10)<0}function Ni(e,t){return e.nodeName!==`#comment`&&Pi(e)&&Fi(e,t)&&(!e.parentElement||Ni(e.parentElement,e))}function Pi(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,r=t!==`none`&&n!==`hidden`&&n!==`collapse`;if(r){if(!e.ownerDocument.defaultView)return r;let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:i}=t(e);r=n!==`none`&&i!==`hidden`&&i!==`collapse`}return r}function Fi(e,t){return!e.hasAttribute(`hidden`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function Ii(e,t){return t.some(t=>t.contains(e))}function Li(e,t,n){let r=t?.tabbable?Oi:Di,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return t?.from?.contains(e)?NodeFilter.FILTER_REJECT:e.matches(r)&&Ni(e)&&(!n||Ii(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(i.currentNode=t.from),i}function Ri(){}function zi(e){return[e.clientX,e.clientY]}function Bi(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=a,o=0,s=e-1;o<e;s=o++){let[a,c]=t[o],[l,u]=t[s],[,d]=t[s===0?e-1:s-1]||[0,0],f=(c-u)*(n-a)-(a-l)*(r-c);if(u<c){if(r>=u&&r<c){if(f===0)return!0;f>0&&(r===u?r>d&&(i=!i):i=!i)}}else if(c<u){if(r>c&&r<=u){if(f===0)return!0;f<0&&(r===u?r<d&&(i=!i):i=!i)}}else if(r===c&&(n>=l&&n<=a||n>=a&&n<=l))return!0}return i}function Vi(e,t){return B(e,t)}var Hi=new Map,Ui=new Set;function Wi(){if(typeof window>`u`||document.body===null)return;let e=e=>{if(!e.target)return;let n=Hi.get(e.target);n||(n=new Set,Hi.set(e.target,n),e.target.addEventListener(`transitioncancel`,t)),n.add(e.propertyName)},t=e=>{if(!e.target)return;let n=Hi.get(e.target);if(n&&(n.delete(e.propertyName),n.size===0&&(e.target.removeEventListener(`transitioncancel`,t),Hi.delete(e.target)),Hi.size===0)){for(let e of Ui)e();Ui.clear()}};document.body.addEventListener(`transitionrun`,e),document.body.addEventListener(`transitionend`,t)}typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,Wi):Wi());function Gi(e,t){let n=Ki(e,t,`left`),r=Ki(e,t,`top`),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,c=o+e.offsetWidth,l=s+e.offsetHeight;n<=o?o=n:n+i>c&&(o+=n+i-c),r<=s?s=r:r+a>l&&(s+=r+a-l),e.scrollLeft=o,e.scrollTop=s}function Ki(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}var qi={border:`0`,clip:`rect(0 0 0 0)`,"clip-path":`inset(50%)`,height:`1px`,margin:`0 -1px -1px 0`,overflow:`hidden`,padding:`0`,position:`absolute`,width:`1px`,"white-space":`nowrap`},Ji=`data-kb-top-layer`,Yi,Xi=!1,Zi=[];function Qi(e){return Zi.findIndex(t=>t.node===e)}function $i(e){return Zi[Qi(e)]}function ea(e){return Zi.length>0&&Zi[Zi.length-1].node===e}function ta(){return Zi.filter(e=>e.isPointerBlocking)}function na(){return[...ta()].slice(-1)[0]}function ra(){return ta().length>0}function ia(e){let t=Qi(na()?.node);return Qi(e)<t}function aa(e){Zi.push(e)}function oa(e){let t=Qi(e);t<0||Zi.splice(t,1)}function sa(){for(let{node:e}of Zi)e.style.pointerEvents=ia(e)?`none`:`auto`}function ca(e){if(ra()&&!Xi){let t=ai(e);Yi=document.body.style.pointerEvents,t.body.style.pointerEvents=`none`,Xi=!0}}function la(e){if(ra())return;let t=ai(e);t.body.style.pointerEvents=Yi,t.body.style.length===0&&t.body.removeAttribute(`style`),Xi=!1}var ua={layers:Zi,isTopMostLayer:ea,hasPointerBlockingLayer:ra,isBelowPointerBlockingLayer:ia,addLayer:aa,removeLayer:oa,indexOf:Qi,find:$i,assignPointerEventToLayers:sa,disableBodyPointerEvents:ca,restoreBodyPointerEvents:la},da=`focusScope.autoFocusOnMount`,fa=`focusScope.autoFocusOnUnmount`,pa={bubbles:!1,cancelable:!0},ma={stack:[],active(){return this.stack[0]},add(e){e!==this.active()&&this.active()?.pause(),this.stack=Zr(this.stack,e),this.stack.unshift(e)},remove(e){this.stack=Zr(this.stack,e),this.active()?.resume()}};function ha(e,t){let[n,r]=A(!1),i={pause(){r(!0)},resume(){r(!1)}},a=null,o=t=>e.onMountAutoFocus?.(t),s=t=>e.onUnmountAutoFocus?.(t),c=()=>ai(t()),l=()=>{let e=c().createElement(`span`);return e.setAttribute(`data-focus-trap`,``),e.tabIndex=0,Object.assign(e.style,qi),e},u=()=>{let e=t();return e?ki(e,!0).filter(e=>!e.hasAttribute(`data-focus-trap`)):[]},d=()=>{let e=u();return e.length>0?e[0]:null},f=()=>{let e=u();return e.length>0?e[e.length-1]:null},p=()=>{let e=t();if(!e)return!1;let n=ri(e);return!n||ni(e,n)?!1:ji(n)};M(()=>{let e=t();if(!e)return;ma.add(i);let n=ri(e);if(!ni(e,n)){let t=new CustomEvent(da,pa);e.addEventListener(da,o),e.dispatchEvent(t),t.defaultPrevented||setTimeout(()=>{bi(d()),ri(e)===n&&bi(e)},0)}F(()=>{e.removeEventListener(da,o),setTimeout(()=>{let t=new CustomEvent(fa,pa);p()&&t.preventDefault(),e.addEventListener(fa,s),e.dispatchEvent(t),t.defaultPrevented||bi(n??c().body),e.removeEventListener(fa,s),ma.remove(i)},0)})}),M(()=>{let r=t();if(!r||!J(e.trapFocus)||n())return;let i=e=>{let t=e.target;t?.closest(`[data-kb-top-layer]`)||(ni(r,t)?a=t:bi(a))},o=e=>{let t=e.relatedTarget??ri(r);t?.closest(`[data-kb-top-layer]`)||ni(r,t)||bi(a)};c().addEventListener(`focusin`,i),c().addEventListener(`focusout`,o),F(()=>{c().removeEventListener(`focusin`,i),c().removeEventListener(`focusout`,o)})}),M(()=>{let r=t();if(!r||!J(e.trapFocus)||n())return;let i=l();r.insertAdjacentElement(`afterbegin`,i);let a=l();r.insertAdjacentElement(`beforeend`,a);function o(e){let t=d(),n=f();e.relatedTarget===t?bi(n):bi(t)}i.addEventListener(`focusin`,o),a.addEventListener(`focusin`,o);let s=new MutationObserver(e=>{for(let t of e)t.previousSibling===a&&(a.remove(),r.insertAdjacentElement(`beforeend`,a)),t.nextSibling===i&&(i.remove(),r.insertAdjacentElement(`afterbegin`,i))});s.observe(r,{childList:!0,subtree:!1}),F(()=>{i.removeEventListener(`focusin`,o),a.removeEventListener(`focusin`,o),i.remove(),a.remove(),s.disconnect()})})}var ga=`data-live-announcer`;function _a(e){M(()=>{J(e.isDisabled)||F(ba(J(e.targets),J(e.root)))})}var va=new WeakMap,ya=[];function ba(e,t=document.body){let n=new Set(e),r=new Set,i=e=>{for(let t of e.querySelectorAll(`[${ga}], [${Ji}]`))n.add(t);let t=e=>{if(n.has(e)||e.parentElement&&r.has(e.parentElement)&&e.parentElement.getAttribute(`role`)!==`row`)return NodeFilter.FILTER_REJECT;for(let t of n)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),o=t(e);if(o===NodeFilter.FILTER_ACCEPT&&a(e),o!==NodeFilter.FILTER_REJECT){let e=i.nextNode();for(;e!=null;)a(e),e=i.nextNode()}},a=e=>{let t=va.get(e)??0;(e.getAttribute(`aria-hidden`)!==`true`||t!==0)&&(t===0&&setTimeout(()=>requestAnimationFrame(()=>e.setAttribute(`aria-hidden`,`true`))),r.add(e),va.set(e,t+1))};ya.length&&ya[ya.length-1].disconnect(),i(t);let o=new MutationObserver(e=>{for(let t of e)if(t.type===`childList`&&t.addedNodes.length!==0&&![...n,...r].some(e=>e.contains(t.target))){for(let e of t.removedNodes)e instanceof Element&&(n.delete(e),r.delete(e));for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&(e.dataset.liveAnnouncer===`true`||e.dataset.reactAriaTopLayer===`true`)?n.add(e):e instanceof Element&&i(e)}});o.observe(t,{childList:!0,subtree:!0});let s={observe(){o.observe(t,{childList:!0,subtree:!0})},disconnect(){o.disconnect()}};return ya.push(s),()=>{o.disconnect();for(let e of r){let t=va.get(e);if(t==null)return;t===1?(setTimeout(()=>requestAnimationFrame(()=>e.removeAttribute(`aria-hidden`))),va.delete(e)):va.set(e,t-1)}s===ya[ya.length-1]?(ya.pop(),ya.length&&ya[ya.length-1].observe()):ya.splice(ya.indexOf(s),1)}}function xa(e){let t=t=>{t.key===si.Escape&&e.onEscapeKeyDown?.(t)};M(()=>{if(J(e.isDisabled))return;let n=e.ownerDocument?.()??ai();n.addEventListener(`keydown`,t),F(()=>{n.removeEventListener(`keydown`,t)})})}var Sa=`interactOutside.pointerDownOutside`,Ca=`interactOutside.focusOutside`;function wa(e,t){let n,r=Ri,i=()=>ai(t()),a=t=>e.onPointerDownOutside?.(t),o=t=>e.onFocusOutside?.(t),s=t=>e.onInteractOutside?.(t),c=n=>{let r=n.target;return!(r instanceof Element)||r.closest(`[data-kb-top-layer]`)||!ni(i(),r)||ni(t(),r)?!1:!e.shouldExcludeElement?.(r)},l=e=>{function n(){let n=t(),r=e.target;if(!n||!r||!c(e))return;let i=vi([a,s]);r.addEventListener(Sa,i,{once:!0});let o=new CustomEvent(Sa,{bubbles:!1,cancelable:!0,detail:{originalEvent:e,isContextMenu:e.button===2||yi(e)&&e.button===0}});r.dispatchEvent(o)}e.pointerType===`touch`?(i().removeEventListener(`click`,n),r=n,i().addEventListener(`click`,n,{once:!0})):n()},u=e=>{let n=t(),r=e.target;if(!n||!r||!c(e))return;let i=vi([o,s]);r.addEventListener(Ca,i,{once:!0});let a=new CustomEvent(Ca,{bubbles:!1,cancelable:!0,detail:{originalEvent:e,isContextMenu:!1}});r.dispatchEvent(a)};M(()=>{J(e.isDisabled)||(n=window.setTimeout(()=>{i().addEventListener(`pointerdown`,l,!0)},0),i().addEventListener(`focusin`,u,!0),F(()=>{window.clearTimeout(n),i().removeEventListener(`click`,r),i().removeEventListener(`pointerdown`,l,!0),i().removeEventListener(`focusin`,u,!0)}))})}function Ta(e){let[t,n]=V(e,[`as`]);if(!t.as)throw Error("[kobalte]: Polymorphic is missing the required `as` prop.");return z(Nt,B(n,{get component(){return t.as}}))}var Ea=L();function Da(){return R(Ea)}function Oa(e){let t,n=Da(),[r,i]=V(e,[`ref`,`disableOutsidePointerEvents`,`excludedElements`,`onEscapeKeyDown`,`onPointerDownOutside`,`onFocusOutside`,`onInteractOutside`,`onDismiss`,`bypassTopMostLayerCheck`]),a=new Set([]),o=e=>{a.add(e);let t=n?.registerNestedLayer(e);return()=>{a.delete(e),t?.()}};wa({shouldExcludeElement:e=>t?r.excludedElements?.some(t=>ni(t(),e))||[...a].some(t=>ni(t,e)):!1,onPointerDownOutside:e=>{t&&!ua.isBelowPointerBlockingLayer(t)&&(r.bypassTopMostLayerCheck||ua.isTopMostLayer(t))&&(r.onPointerDownOutside?.(e),r.onInteractOutside?.(e),e.defaultPrevented||r.onDismiss?.())},onFocusOutside:e=>{r.onFocusOutside?.(e),r.onInteractOutside?.(e),e.defaultPrevented||r.onDismiss?.()}},()=>t),xa({ownerDocument:()=>ai(t),onEscapeKeyDown:e=>{t&&ua.isTopMostLayer(t)&&(r.onEscapeKeyDown?.(e),!e.defaultPrevented&&r.onDismiss&&(e.preventDefault(),r.onDismiss()))}}),oe(()=>{if(!t)return;ua.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});let e=n?.registerNestedLayer(t);ua.assignPointerEventToLayers(),ua.disableBodyPointerEvents(t),F(()=>{t&&(ua.removeLayer(t),e?.(),ua.assignPointerEventToLayers(),ua.restoreBodyPointerEvents(t))})}),M(ae([()=>t,()=>r.disableOutsidePointerEvents],([e,t])=>{if(!e)return;let n=ua.find(e);n&&n.isPointerBlocking!==t&&(n.isPointerBlocking=t,ua.assignPointerEventToLayers()),t&&ua.disableBodyPointerEvents(e),F(()=>{ua.restoreBodyPointerEvents(e)})},{defer:!0}));let s={registerNestedLayer:o};return z(Ea.Provider,{value:s,get children(){return z(Ta,B({as:`div`,ref(e){var n=Yr(e=>t=e,r.ref);typeof n==`function`&&n(e)}},i))}})}function ka(e){let[t,n]=A(e.defaultValue?.()),r=N(()=>e.value?.()!==void 0),i=N(()=>r()?e.value?.():t());return[i,t=>{P(()=>{let a=cn(t,i());return Object.is(a,i())||(r()||n(a),e.onChange?.(a)),a})}]}function Aa(e){let[t,n]=ka(e);return[()=>t()??!1,n]}function ja(e){let[t,n]=ka(e);return[()=>t()??[],n]}function Ma(e={}){let[t,n]=Aa({value:()=>J(e.open),defaultValue:()=>!!J(e.defaultOpen),onChange:t=>e.onOpenChange?.(t)}),r=()=>{n(!0)},i=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:i,toggle:()=>{t()?i():r()}}}function Na(e,t){let[n,r]=A(Pa(t?.()));return M(()=>{r(e()?.tagName.toLowerCase()||Pa(t?.()))}),n}function Pa(e){return $r(e)?e:void 0}var Fa=Object.defineProperty,Ia=(e,t)=>{for(var n in t)Fa(e,n,{get:t[n],enumerable:!0})};Ia({},{Button:()=>Ba,Root:()=>za});var La=[`button`,`color`,`file`,`image`,`reset`,`submit`];function Ra(e){let t=e.tagName.toLowerCase();return t===`button`?!0:t===`input`&&e.type?La.indexOf(e.type)!==-1:!1}function za(e){let t,[n,r]=V(Vi({type:`button`},e),[`ref`,`type`,`disabled`]),i=Na(()=>t,()=>`button`),a=N(()=>{let e=i();return e!=null&&Ra({tagName:e,type:n.type})}),o=N(()=>i()===`input`),s=N(()=>i()===`a`&&t?.getAttribute(`href`)!=null);return z(Ta,B({as:`button`,ref(e){var r=Yr(e=>t=e,n.ref);typeof r==`function`&&r(e)},get type(){return W(()=>!!(a()||o()))()?n.type:void 0},get role(){return!a()&&!s()?`button`:void 0},get tabIndex(){return!a()&&!s()&&!n.disabled?0:void 0},get disabled(){return W(()=>!!(a()||o()))()?n.disabled:void 0},get"aria-disabled"(){return!a()&&!o()&&n.disabled?!0:void 0},get"data-disabled"(){return n.disabled?``:void 0}},r))}var Ba=za;function Va(e){return t=>(e(t),()=>e(void 0))}var Ha=e=>typeof e==`function`?e():e,Ua=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},Wa=new Map,Ga=e=>{M(()=>{let t=Ha(e.style)??{},n=Ha(e.properties)??[],r={};for(let n in t)r[n]=e.element.style[n];let i=Wa.get(e.key);i?i.activeCount++:Wa.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(e=>e.key)}),Object.assign(e.element.style,e.style);for(let t of n)e.element.style.setProperty(t.key,t.value);F(()=>{let t=Wa.get(e.key);if(t){if(t.activeCount!==1){t.activeCount--;return}Wa.delete(e.key);for(let[n,r]of Object.entries(t.originalStyles))e.element.style[n]=r;for(let n of t.properties)e.element.style.removeProperty(n);e.element.style.length===0&&e.element.removeAttribute(`style`),e.cleanup?.()}})})},Ka=(e,t)=>{switch(t){case`x`:return[e.clientWidth,e.scrollLeft,e.scrollWidth];case`y`:return[e.clientHeight,e.scrollTop,e.scrollHeight]}},qa=(e,t)=>{let n=getComputedStyle(e),r=t===`x`?n.overflowX:n.overflowY;return r===`auto`||r===`scroll`||e.tagName===`HTML`&&r===`visible`},Ja=(e,t,n)=>{let r=t===`x`&&window.getComputedStyle(e).direction===`rtl`?-1:1,i=e,a=0,o=0,s=!1;do{let[e,c,l]=Ka(i,t),u=l-e-r*c;(c!==0||u!==0)&&qa(i,t)&&(a+=u,o+=c),i===(n??document.documentElement)?s=!0:i=i._$host??i.parentElement}while(i&&!s);return[a,o]},[Ya,Xa]=A([]),Za=e=>Ya().indexOf(e)===Ya().length-1,Qa=e=>{let t=B({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:`padding`,restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Ue(),r=[0,0],i=null,a=null;M(()=>{Ha(t.enabled)&&(Xa(e=>[...e,n]),F(()=>{Xa(e=>e.filter(e=>e!==n))}))}),M(()=>{if(!Ha(t.enabled)||!Ha(t.hideScrollbar))return;let{documentElement:e}=document,n=window.innerWidth-e.clientWidth;if(Ha(t.preventScrollbarShift)){let r={overflow:`hidden`},i=[];n>0&&(Ha(t.preventScrollbarShiftMode)===`padding`?r.paddingRight=`calc(${window.getComputedStyle(e).paddingRight} + ${n}px)`:r.marginRight=`calc(${window.getComputedStyle(e).marginRight} + ${n}px)`,i.push({key:`--scrollbar-width`,value:`${n}px`}));let a=window.scrollY,o=window.scrollX;Ga({key:`prevent-scroll`,element:e,style:r,properties:i,cleanup:()=>{Ha(t.restoreScrollPosition)&&n>0&&window.scrollTo(o,a)}})}else Ga({key:`prevent-scroll`,element:e,style:{overflow:`hidden`}})}),M(()=>{Za(n)&&Ha(t.enabled)&&(document.addEventListener(`wheel`,s,{passive:!1}),document.addEventListener(`touchstart`,o,{passive:!1}),document.addEventListener(`touchmove`,c,{passive:!1}),F(()=>{document.removeEventListener(`wheel`,s),document.removeEventListener(`touchstart`,o),document.removeEventListener(`touchmove`,c)}))});let o=e=>{r=eo(e),i=null,a=null},s=e=>{let n=e.target,r=Ha(t.element),i=$a(e),a=Math.abs(i[0])>Math.abs(i[1])?`x`:`y`,o=to(n,a,a===`x`?i[0]:i[1],r),s;s=r&&Ua(r,n)?!o:!0,s&&e.cancelable&&e.preventDefault()},c=e=>{let n=Ha(t.element),o=e.target,s;if(e.touches.length===2)s=!Ha(t.allowPinchZoom);else{if(i==null||a===null){let t=eo(e).map((e,t)=>r[t]-e),n=Math.abs(t[0])>Math.abs(t[1])?`x`:`y`;i=n,a=n===`x`?t[0]:t[1]}if(o.type===`range`)s=!1;else{let e=to(o,i,a,n);s=n&&Ua(n,o)?!e:!0}}s&&e.cancelable&&e.preventDefault()}},$a=e=>[e.deltaX,e.deltaY],eo=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],to=(e,t,n,r)=>{let[i,a]=Ja(e,t,r!==null&&Ua(r,e)?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(a)<1)},no=Qa,ro=e=>{let t=N(()=>{let t=Ha(e.element);if(t)return getComputedStyle(t)}),n=()=>t()?.animationName??`none`,[r,i]=A(Ha(e.show)?`present`:`hidden`),a=t=>{i(t),e.onStateChange?.(t)},o=`none`;return M(r=>{let i=Ha(e.show);return P(()=>{if(r===i)return i;let e=o,s=n();i?a(`present`):s===`none`||t()?.display===`none`?a(`hidden`):a(r===!0&&e!==s?`hiding`:`hidden`)}),i},Ha(e.show)),M(()=>{let t=Ha(e.element);if(!t)return;let i=e=>{e.target===t&&(o=n())},s=e=>{let i=n().includes(e.animationName);e.target===t&&i&&r()===`hiding`&&a(`hidden`)};t.addEventListener(`animationstart`,i),t.addEventListener(`animationcancel`,s),t.addEventListener(`animationend`,s),F(()=>{t.removeEventListener(`animationstart`,i),t.removeEventListener(`animationcancel`,s),t.removeEventListener(`animationend`,s)})}),{present:()=>r()===`present`||r()===`hiding`,state:r}};Ia({},{CloseButton:()=>oo,Content:()=>so,Description:()=>co,Dialog:()=>go,Overlay:()=>lo,Portal:()=>uo,Root:()=>po,Title:()=>mo,Trigger:()=>ho,useDialogContext:()=>ao});var io=L();function ao(){let e=R(io);if(e===void 0)throw Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function oo(e){let t=ao(),[n,r]=V(e,[`aria-label`,`onClick`]);return z(za,B({get"aria-label"(){return n[`aria-label`]||t.translations().dismiss},onClick:e=>{_i(e,n.onClick),t.close()}},r))}function so(e){let t,n=ao(),[r,i]=V(Vi({id:n.generateId(`content`)},e),[`ref`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onPointerDownOutside`,`onFocusOutside`,`onInteractOutside`]),a=!1,o=!1,s=e=>{r.onPointerDownOutside?.(e),n.modal()&&e.detail.isContextMenu&&e.preventDefault()},c=e=>{r.onFocusOutside?.(e),n.modal()&&e.preventDefault()},l=e=>{r.onInteractOutside?.(e),!n.modal()&&(e.defaultPrevented||(a=!0,e.detail.originalEvent.type===`pointerdown`&&(o=!0)),ni(n.triggerRef(),e.target)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o&&e.preventDefault())};return _a({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),no({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),ha({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:r.onOpenAutoFocus,onUnmountAutoFocus:e=>{r.onCloseAutoFocus?.(e),n.modal()?(e.preventDefault(),bi(n.triggerRef())):(e.defaultPrevented||(a||bi(n.triggerRef()),e.preventDefault()),a=!1,o=!1)}},()=>t),M(()=>F(n.registerContentId(i.id))),z(U,{get when(){return n.contentPresent()},get children(){return z(Oa,B({ref(e){var i=Yr(e=>{n.setContentRef(e),t=e},r.ref);typeof i==`function`&&i(e)},role:`dialog`,tabIndex:-1,get disableOutsidePointerEvents(){return W(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?``:void 0},get"data-closed"(){return n.isOpen()?void 0:``},onPointerDownOutside:s,onFocusOutside:c,onInteractOutside:l,get onDismiss(){return n.close}},i))}})}function co(e){let t=ao(),[n,r]=V(Vi({id:t.generateId(`description`)},e),[`id`]);return M(()=>F(t.registerDescriptionId(n.id))),z(Ta,B({as:`p`,get id(){return n.id}},r))}function lo(e){let t=ao(),[n,r]=V(e,[`ref`,`style`,`onPointerDown`]),i=e=>{_i(e,n.onPointerDown),e.target===e.currentTarget&&e.preventDefault()};return z(U,{get when(){return t.overlayPresent()},get children(){return z(Ta,B({as:`div`,ref(e){var r=Yr(t.setOverlayRef,n.ref);typeof r==`function`&&r(e)},get style(){return Jr({"pointer-events":`auto`},n.style)},get"data-expanded"(){return t.isOpen()?``:void 0},get"data-closed"(){return t.isOpen()?void 0:``},onPointerDown:i},r))}})}function uo(e){let t=ao();return z(U,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return z(jt,e)}})}var fo={dismiss:`Dismiss`};function po(e){let t=Vi({id:`dialog-${Ue()}`,modal:!0,translations:fo},e),[n,r]=A(),[i,a]=A(),[o,s]=A(),[c,l]=A(),[u,d]=A(),[f,p]=A(),m=Ma({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:e=>t.onOpenChange?.(e)}),h=()=>t.forceMount||m.isOpen(),{present:g}=ro({show:h,element:()=>c()??null}),{present:_}=ro({show:h,element:()=>u()??null}),v={translations:()=>t.translations??fo,isOpen:m.isOpen,modal:()=>t.modal??!0,preventScroll:()=>t.preventScroll??v.modal(),contentId:n,titleId:i,descriptionId:o,triggerRef:f,overlayRef:c,setOverlayRef:l,contentRef:u,setContentRef:d,overlayPresent:g,contentPresent:_,close:m.close,toggle:m.toggle,setTriggerRef:p,generateId:ti(()=>t.id),registerContentId:Va(r),registerTitleId:Va(a),registerDescriptionId:Va(s)};return z(io.Provider,{value:v,get children(){return t.children}})}function mo(e){let t=ao(),[n,r]=V(Vi({id:t.generateId(`title`)},e),[`id`]);return M(()=>F(t.registerTitleId(n.id))),z(Ta,B({as:`h2`,get id(){return n.id}},r))}function ho(e){let t=ao(),[n,r]=V(e,[`ref`,`onClick`]);return z(za,B({ref(e){var r=Yr(t.setTriggerRef,n.ref);typeof r==`function`&&r(e)},"aria-haspopup":`dialog`,get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return W(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?``:void 0},get"data-closed"(){return t.isOpen()?void 0:``},onClick:e=>{_i(e,n.onClick),t.toggle()}},r))}var go=Object.assign(po,{CloseButton:oo,Content:so,Description:co,Overlay:lo,Portal:uo,Title:mo,Trigger:ho}),_o=G(`<div style=position:fixed;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none>`),vo=G(`<div data-component=dialog-stack>`),yo=L();function bo(){let[e,t]=A([]),n={current:void 0},r={value:!1};F(()=>{n.current!==void 0&&(clearTimeout(n.current),n.current=void 0)});let i=i=>{let a=e(),o=i?a.find(e=>e.id===i):a.at(-1);if(!o||r.value)return;r.value=!0,o.onClose?.(),o.setClosing(!0);let s=o.id;n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),n.current=setTimeout(()=>{n.current=void 0,o.dispose(),t(e=>e.filter(e=>e.id!==s)),r.value=!1},100)};M(()=>{e().length!==0&&fn(window,`keydown`,e=>{e.key===`Escape`&&(i(),e.preventDefault(),e.stopPropagation())},{capture:!0})});let a=(n,r,a,o)=>{let s=Math.random().toString(36).slice(2),c=50+o*10,l,u,d=ue(r,()=>ee(t=>{l=t;let[r,a]=A(!1);return u=a,z(go,{get modal(){return e().at(-1)?.id===s},get open(){return!r()},onOpenChange:t=>{t||e().at(-1)?.id!==s||i(s)},get children(){return z(go.Portal,{get children(){return[z(go.Overlay,{"data-component":`dialog-overlay`,get style(){return{"z-index":String(c)}},onClick:()=>i(s)}),(()=>{var e=_o();return K(e,`data-dialog-layer`,o),q(e,n),j(t=>mt(e,`z-index`,String(c))),e})()]}})}})}));if(!l||!u)return;let f={id:s,node:d,dispose:l,owner:r,onClose:a,setClosing:u};t(e=>[...e,f])};return{stack:e,close:i,show:(i,o,s)=>{for(let t of e())t.dispose();t([]),n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),r.value=!1,a(i,o,s,0)},push:(t,i,o)=>{n.current!==void 0&&(clearTimeout(n.current),n.current=void 0),r.value=!1,a(t,i,o,e().length)}}}function xo(e){let t=bo();return z(yo.Provider,{value:t,get children(){return[W(()=>e.children),(()=>{var e=vo();return q(e,z(H,{get each(){return t.stack()},children:e=>e.node})),e})()]}})}function So(){let e=R(yo),t=le();if(!t||!e)throw Error(`useDialog must be used within a DialogProvider`);return{get active(){return e.stack().at(-1)},show(n,r){let i=e.stack().at(-1)?.owner??t;return de(()=>e.show(n,i,r))},push(n,r){let i=e.stack().at(-1)?.owner??t;return de(()=>e.push(n,i,r))},close(){e.close()}}}var Co={"align-right":`<path d="M12.292 6.04167L16.2503 9.99998L12.292 13.9583M2.91699 9.99998H15.6253M17.0837 3.75V16.25" stroke="currentColor" stroke-linecap="square"/>`,"arrow-up":`<path fill-rule="evenodd" clip-rule="evenodd" d="M9.99991 2.24121L16.0921 8.33343L15.2083 9.21731L10.6249 4.63397V17.5001H9.37492V4.63398L4.7916 9.21731L3.90771 8.33343L9.99991 2.24121Z" fill="currentColor"/>`,"arrow-left":`<path d="M8.33464 4.58398L2.91797 10.0007L8.33464 15.4173M3.33464 10.0007H17.0846" stroke="currentColor" stroke-linecap="square"/>`,"arrow-right":`<path d="M11.6654 4.58398L17.082 10.0007L11.6654 15.4173M16.6654 10.0007H2.91536" stroke="currentColor" stroke-linecap="square"/>`,archive:`<path d="M16.8747 6.24935H17.3747V5.74935H16.8747V6.24935ZM16.8747 16.8743V17.3743H17.3747V16.8743H16.8747ZM3.12467 16.8743H2.62467V17.3743H3.12467V16.8743ZM3.12467 6.24935V5.74935H2.62467V6.24935H3.12467ZM2.08301 2.91602V2.41602H1.58301V2.91602H2.08301ZM17.9163 2.91602H18.4163V2.41602H17.9163V2.91602ZM17.9163 6.24935V6.74935H18.4163V6.24935H17.9163ZM2.08301 6.24935H1.58301V6.74935H2.08301V6.24935ZM8.33301 9.08268H7.83301V10.0827H8.33301V9.58268V9.08268ZM11.6663 10.0827H12.1663V9.08268H11.6663V9.58268V10.0827ZM16.8747 6.24935H16.3747V16.8743H16.8747H17.3747V6.24935H16.8747ZM16.8747 16.8743V16.3743H3.12467V16.8743V17.3743H16.8747V16.8743ZM3.12467 16.8743H3.62467V6.24935H3.12467H2.62467V16.8743H3.12467ZM3.12467 6.24935V6.74935H16.8747V6.24935V5.74935H3.12467V6.24935ZM2.08301 2.91602V3.41602H17.9163V2.91602V2.41602H2.08301V2.91602ZM17.9163 2.91602H17.4163V6.24935H17.9163H18.4163V2.91602H17.9163ZM17.9163 6.24935V5.74935H2.08301V6.24935V6.74935H17.9163V6.24935ZM2.08301 6.24935H2.58301V2.91602H2.08301H1.58301V6.24935H2.08301ZM8.33301 9.58268V10.0827H11.6663V9.58268V9.08268H8.33301V9.58268Z" fill="currentColor"/>`,"bubble-5":`<path d="M18.3327 9.99935C18.3327 5.57227 15.0919 2.91602 9.99935 2.91602C4.90676 2.91602 1.66602 5.57227 1.66602 9.99935C1.66602 11.1487 2.45505 13.1006 2.57637 13.3939C2.58707 13.4197 2.59766 13.4434 2.60729 13.4697C2.69121 13.6987 3.04209 14.9354 1.66602 16.7674C3.51787 17.6528 5.48453 16.1973 5.48453 16.1973C6.84518 16.9193 8.46417 17.0827 9.99935 17.0827C15.0919 17.0827 18.3327 14.4264 18.3327 9.99935Z" stroke="currentColor" stroke-linecap="square"/>`,prompt:`<path d="M14.5841 12.0807H17.9193V2.91406H5.6276V6.2474M14.5859 6.2474H2.08594V15.4141H5.0026V17.4974L8.7526 15.4141H14.5859V6.2474Z" stroke="currentColor" stroke-linecap="square"/>`,brain:`<path d="M13.332 8.7487C11.4911 8.7487 9.9987 7.25631 9.9987 5.41536M6.66536 11.2487C8.50631 11.2487 9.9987 12.7411 9.9987 14.582M9.9987 2.78209L9.9987 17.0658M16.004 15.0475C17.1255 14.5876 17.9154 13.4849 17.9154 12.1978C17.9154 11.3363 17.5615 10.5575 16.9913 9.9987C17.5615 9.43991 17.9154 8.66108 17.9154 7.79962C17.9154 6.21199 16.7136 4.90504 15.1702 4.73878C14.7858 3.21216 13.4039 2.08203 11.758 2.08203C11.1171 2.08203 10.5162 2.25337 9.9987 2.55275C9.48117 2.25337 8.88032 2.08203 8.23944 2.08203C6.59353 2.08203 5.21157 3.21216 4.82722 4.73878C3.28377 4.90504 2.08203 6.21199 2.08203 7.79962C2.08203 8.66108 2.43585 9.43991 3.00609 9.9987C2.43585 10.5575 2.08203 11.3363 2.08203 12.1978C2.08203 13.4849 2.87191 14.5876 3.99339 15.0475C4.46688 16.7033 5.9917 17.9154 7.79962 17.9154C8.61335 17.9154 9.36972 17.6698 9.9987 17.2488C10.6277 17.6698 11.384 17.9154 12.1978 17.9154C14.0057 17.9154 15.5305 16.7033 16.004 15.0475Z" stroke="currentColor"/>`,fork:`<path d="M2.91602 7.91406L2.91602 2.91406H7.91602M12.0827 2.91406H17.0827L17.0827 7.91406M9.99935 9.9974L9.99935 17.0807M9.99935 9.9974L3.33268 3.33073M9.99935 9.9974L16.666 3.33073" stroke="currentColor" stroke-linecap="square"/>`,"workspace-isolated":`<g transform="translate(2 2)"><path d="M10.5 10.5V5.5H5.5V10.5H10.5Z" fill="currentColor"/><rect x="2.5" y="2.5" width="11" height="11" stroke="currentColor"/></g>`,"bullet-list":`<path d="M9.58329 13.7497H17.0833M9.58329 6.24967H17.0833M6.24996 6.24967C6.24996 7.17015 5.50377 7.91634 4.58329 7.91634C3.66282 7.91634 2.91663 7.17015 2.91663 6.24967C2.91663 5.3292 3.66282 4.58301 4.58329 4.58301C5.50377 4.58301 6.24996 5.3292 6.24996 6.24967ZM6.24996 13.7497C6.24996 14.6701 5.50377 15.4163 4.58329 15.4163C3.66282 15.4163 2.91663 14.6701 2.91663 13.7497C2.91663 12.8292 3.66282 12.083 4.58329 12.083C5.50377 12.083 6.24996 12.8292 6.24996 13.7497Z" stroke="currentColor" stroke-linecap="square"/>`,"check-small":`<path d="M6.5 11.4412L8.97059 13.5L13.5 6.5" stroke="currentColor" stroke-linecap="square"/>`,"chevron-down":`<path d="M6.6665 8.33325L9.99984 11.6666L13.3332 8.33325" stroke="currentColor" stroke-linecap="square"/>`,"chevron-left":`<path d="M12 15L7 10L12 5" stroke="currentColor" stroke-linecap="square"/>`,"chevron-right":`<path d="M8 15L13 10L8 5" stroke="currentColor" stroke-linecap="square"/>`,"chevron-grabber-vertical":`<path d="M6.66675 12.4998L10.0001 15.8332L13.3334 12.4998M6.66675 7.49984L10.0001 4.1665L13.3334 7.49984" stroke="currentColor" stroke-linecap="square"/>`,"chevron-double-right":`<path d="M11.6654 13.3346L14.9987 10.0013L11.6654 6.66797M5.83203 13.3346L9.16536 10.0013L5.83203 6.66797" stroke="currentColor" stroke-linecap="square"/>`,"circle-x":`<path fill-rule="evenodd" clip-rule="evenodd" d="M1.6665 10.0003C1.6665 5.39795 5.39746 1.66699 9.99984 1.66699C14.6022 1.66699 18.3332 5.39795 18.3332 10.0003C18.3332 14.6027 14.6022 18.3337 9.99984 18.3337C5.39746 18.3337 1.6665 14.6027 1.6665 10.0003ZM7.49984 6.91107L6.91058 7.50033L9.41058 10.0003L6.91058 12.5003L7.49984 13.0896L9.99984 10.5896L12.4998 13.0896L13.0891 12.5003L10.5891 10.0003L13.0891 7.50033L12.4998 6.91107L9.99984 9.41107L7.49984 6.91107Z" fill="currentColor"/>`,close:`<path d="M3.75 3.75L16.25 16.25M16.25 3.75L3.75 16.25" stroke="currentColor" stroke-linecap="square"/>`,"close-small":`<path d="M6 6L14 14M14 6L6 14" stroke="currentColor" stroke-linecap="square"/>`,checklist:`<path d="M9.58342 13.7498H17.0834M9.58342 6.24984H17.0834M2.91675 6.6665L4.58341 7.9165L7.08341 4.1665M2.91675 14.1665L4.58341 15.4165L7.08341 11.6665" stroke="currentColor" stroke-linecap="square"/>`,console:`<path d="M3.75 5.4165L8.33333 9.99984L3.75 14.5832M10.4167 14.5832H16.25" stroke="currentColor" stroke-linecap="square"/>`,terminal:`<path d="M6.5 8L8.64286 10L6.5 12M10.9286 12H13.5M2 18H18V2H2V18Z" stroke="currentColor" stroke-linecap="square"/>`,"terminal-active":`<path d="M2 18H18V2H2V18Z" fill="currentColor" fill-opacity="0.1"/>
10
- <path d="M6.5 8L8.64286 10L6.5 12M10.9286 12H13.5M2 18H18V2H2V18Z" stroke="currentColor" stroke-linecap="square"/>`,review:`<path d="M7 14.5H13M7 7.99512H10.0049M10.0049 7.99512H13M10.0049 7.99512V5M10.0049 7.99512V11M18 18V2L2 2L2 18H18Z" stroke="currentColor"/>`,"review-active":`<path d="M18 18V2L2 2L2 18H18Z" fill="currentColor" fill-opacity="0.1"/>
11
- <path d="M7 14.5H13M7 7.99512H10.0049M10.0049 7.99512H13M10.0049 7.99512V5M10.0049 7.99512V11M18 18V2L2 2L2 18H18Z" stroke="currentColor"/>`,expand:`<path d="M4.58301 10.4163V15.4163H9.58301M10.4163 4.58301H15.4163V9.58301" stroke="currentColor" stroke-linecap="square"/>`,collapse:`<path d="M16.666 8.33398H11.666V3.33398" stroke="currentColor" stroke-linecap="square"/><path d="M8.33398 16.666V11.666H3.33398" stroke="currentColor" stroke-linecap="square"/>`,code:`<path d="M8.7513 7.5013L6.2513 10.0013L8.7513 12.5013M11.2513 7.5013L13.7513 10.0013L11.2513 12.5013M2.91797 2.91797H17.0846V17.0846H2.91797V2.91797Z" stroke="currentColor"/>`,"code-lines":`<path d="M2.08325 3.75H11.2499M14.5833 3.75H17.9166M2.08325 10L7.08325 10M10.4166 10L17.9166 10M2.08325 16.25L8.74992 16.25M12.0833 16.25L17.9166 16.25" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"/>`,"circle-ban-sign":`<path d="M15.3675 4.63087L4.55742 15.441M17.9163 9.9987C17.9163 14.371 14.3719 17.9154 9.99967 17.9154C7.81355 17.9154 5.83438 17.0293 4.40175 15.5966C2.96911 14.164 2.08301 12.1848 2.08301 9.9987C2.08301 5.62644 5.62742 2.08203 9.99967 2.08203C12.1858 2.08203 14.165 2.96813 15.5976 4.40077C17.0302 5.8334 17.9163 7.81257 17.9163 9.9987Z" stroke="currentColor" stroke-linecap="round"/>`,"edit-small-2":`<path d="M17.0834 17.0833V17.5833H17.5834V17.0833H17.0834ZM2.91675 17.0833H2.41675V17.5833H2.91675V17.0833ZM2.91675 2.91659V2.41659H2.41675V2.91659H2.91675ZM9.58341 3.41659H10.0834V2.41659H9.58341V2.91659V3.41659ZM17.5834 10.4166V9.91659H16.5834V10.4166H17.0834H17.5834ZM10.4167 7.08325L10.0632 6.7297L9.91675 6.87615V7.08325H10.4167ZM10.4167 9.58325H9.91675V10.0833H10.4167V9.58325ZM12.9167 9.58325V10.0833H13.1239L13.2703 9.93681L12.9167 9.58325ZM15.4167 2.08325L15.7703 1.7297L15.4167 1.37615L15.0632 1.7297L15.4167 2.08325ZM17.9167 4.58325L18.2703 4.93681L18.6239 4.58325L18.2703 4.2297L17.9167 4.58325ZM17.0834 17.0833V16.5833H2.91675V17.0833V17.5833H17.0834V17.0833ZM2.91675 17.0833H3.41675V2.91659H2.91675H2.41675V17.0833H2.91675ZM2.91675 2.91659V3.41659H9.58341V2.91659V2.41659H2.91675V2.91659ZM17.0834 10.4166H16.5834V17.0833H17.0834H17.5834V10.4166H17.0834ZM10.4167 7.08325H9.91675V9.58325H10.4167H10.9167V7.08325H10.4167ZM10.4167 9.58325V10.0833H12.9167V9.58325V9.08325H10.4167V9.58325ZM10.4167 7.08325L10.7703 7.43681L15.7703 2.43681L15.4167 2.08325L15.0632 1.7297L10.0632 6.7297L10.4167 7.08325ZM15.4167 2.08325L15.0632 2.43681L17.5632 4.93681L17.9167 4.58325L18.2703 4.2297L15.7703 1.7297L15.4167 2.08325ZM17.9167 4.58325L17.5632 4.2297L12.5632 9.2297L12.9167 9.58325L13.2703 9.93681L18.2703 4.93681L17.9167 4.58325Z" fill="currentColor"/>`,eye:`<path d="M10 4.58325C5.83333 4.58325 2.5 9.99992 2.5 9.99992C2.5 9.99992 5.83333 15.4166 10 15.4166C14.1667 15.4166 17.5 9.99992 17.5 9.99992C17.5 9.99992 14.1667 4.58325 10 4.58325Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><circle cx="10" cy="10" r="2.5" stroke="currentColor"/>`,enter:`<path d="M5.83333 15.8334L2.5 12.5L5.83333 9.16671M3.33333 12.5H17.9167V4.58337H10" stroke="currentColor" stroke-linecap="square"/>`,folder:`<path d="M2.08301 2.91675V16.2501H17.9163V5.41675H9.99967L8.33301 2.91675H2.08301Z" stroke="currentColor" stroke-linecap="round"/>`,"file-tree":`<path d="M18 18V5H9.5L7.5 2H2L2 18H5M18 18H5M18 18V8.5H5V18" stroke="currentColor" stroke-linecap="square"/>`,"file-tree-active":`<path d="M2 2L2 18H5L6.5 8.5H18V5H9.5L7.5 2H2Z" fill="currentColor" fill-opacity="0.1"/>
12
- <path d="M5 18H18L19.5 8.5H18M5 18H2L2 2H7.5L9.5 5H18V8.5M5 18L6.5 8.5H18" stroke="currentColor" stroke-linecap="square"/>`,"magnifying-glass":`<path d="M13 13L10.6418 10.6418M11.9552 7.47761C11.9552 9.95053 9.95053 11.9552 7.47761 11.9552C5.0047 11.9552 3 9.95053 3 7.47761C3 5.0047 5.0047 3 7.47761 3C9.95053 3 11.9552 5.0047 11.9552 7.47761Z" stroke="currentColor" stroke-linecap="square" vector-effect="non-scaling-stroke"/>`,"plus-small":`<path d="M9.99984 5.41699V10.0003M9.99984 10.0003V14.5837M9.99984 10.0003H5.4165M9.99984 10.0003H14.5832" stroke="currentColor" stroke-linecap="square"/>`,plus:`<path d="M9.9987 2.20703V9.9987M9.9987 9.9987V17.7904M9.9987 9.9987H2.20703M9.9987 9.9987H17.7904" stroke="currentColor" stroke-linecap="square"/>`,"new-session":`<path d="M12 2H2V18H18V8M6 11.3818V14H8.61818L18 4.61818L15.3818 2L6 11.3818Z" stroke="currentColor"/>`,"new-session-active":`<path d="M6 11.3818V14H8.61818L18 4.61818L15.3818 2L6 11.3818Z" fill="currentColor" fill-opacity="0.1"/>
13
- <path d="M12 2H2V18H18V8M6 11.3818V14H8.61818L18 4.61818L15.3818 2L6 11.3818Z" stroke="currentColor"/>`,"pencil-line":`<path d="M9.58301 17.9166H17.9163M17.9163 5.83325L14.1663 2.08325L2.08301 14.1666V17.9166H5.83301L17.9163 5.83325Z" stroke="currentColor" stroke-linecap="square"/>`,mcp:`<g><path d="M0.972656 9.37176L9.5214 1.60019C10.7018 0.527151 12.6155 0.527151 13.7957 1.60019C14.9761 2.67321 14.9761 4.41295 13.7957 5.48599L7.3397 11.3552" stroke="currentColor" stroke-linecap="round"/><path d="M7.42871 11.2747L13.7957 5.48643C14.9761 4.41338 16.8898 4.41338 18.0702 5.48643L18.1147 5.52688C19.2951 6.59993 19.2951 8.33966 18.1147 9.4127L10.3831 16.4414C9.98966 16.7991 9.98966 17.379 10.3831 17.7366L11.9707 19.1799" stroke="currentColor" stroke-linecap="round"/><path d="M11.6587 3.54346L5.33619 9.29119C4.15584 10.3642 4.15584 12.1039 5.33619 13.177C6.51649 14.25 8.43019 14.25 9.61054 13.177L15.9331 7.42923" stroke="currentColor" stroke-linecap="round"/></g>`,glasses:`<path d="M0.416626 7.91667H1.66663M19.5833 7.91667H18.3333M11.866 7.57987C11.3165 7.26398 10.6793 7.08333 9.99996 7.08333C9.32061 7.08333 8.68344 7.26398 8.13389 7.57987M8.74996 10C8.74996 12.0711 7.07103 13.75 4.99996 13.75C2.92889 13.75 1.24996 12.0711 1.24996 10C1.24996 7.92893 2.92889 6.25 4.99996 6.25C7.07103 6.25 8.74996 7.92893 8.74996 10ZM18.75 10C18.75 12.0711 17.071 13.75 15 13.75C12.9289 13.75 11.25 12.0711 11.25 10C11.25 7.92893 12.9289 6.25 15 6.25C17.071 6.25 18.75 7.92893 18.75 10Z" stroke="currentColor" stroke-linecap="square"/>`,"magnifying-glass-menu":`<path d="M2.08325 10.0002H4.58325M2.08325 5.41683H5.41659M2.08325 14.5835H5.41659M16.4583 13.9585L18.7499 16.2502M17.9166 10.0002C17.9166 12.9917 15.4915 15.4168 12.4999 15.4168C9.50838 15.4168 7.08325 12.9917 7.08325 10.0002C7.08325 7.00862 9.50838 4.5835 12.4999 4.5835C15.4915 4.5835 17.9166 7.00862 17.9166 10.0002Z" stroke="currentColor" stroke-linecap="square"/>`,"window-cursor":`<path d="M17.5 10.4167V3.75H2.5V17.0833H10.4166M17.9166 13.5897L11.6666 11.6667L13.5897 17.9167L15.032 15.0321L17.9166 13.5897Z" stroke="currentColor" stroke-linecap="square"/><path d="M5.41675 6.125C5.71576 6.12518 5.95777 6.36795 5.95777 6.66699C5.95759 6.96589 5.71565 7.20783 5.41675 7.20801C5.11771 7.20801 4.87494 6.966 4.87476 6.66699C4.87476 6.36784 5.1176 6.125 5.41675 6.125ZM8.33276 6.125C8.63191 6.125 8.87476 6.36784 8.87476 6.66699C8.87458 6.966 8.63181 7.20801 8.33276 7.20801C8.03386 7.20783 7.79192 6.96589 7.79175 6.66699C7.79175 6.36795 8.03376 6.12518 8.33276 6.125ZM11.2498 6.125C11.5489 6.125 11.7917 6.36784 11.7917 6.66699C11.7916 6.966 11.5488 7.20801 11.2498 7.20801C10.9507 7.20801 10.7079 6.966 10.7078 6.66699C10.7078 6.36784 10.9506 6.125 11.2498 6.125Z" fill="currentColor" stroke="currentColor" stroke-width="0.25" stroke-linecap="square"/>`,task:`<path d="M9.99992 2.0835V17.9168M7.08325 3.75016H2.08325V16.2502H7.08325M12.9166 16.2502H17.9166V3.75016H12.9166" stroke="currentColor" stroke-linecap="square"/>`,subagent:`<path d="M4.5 5C4.5 4.72386 4.72386 4.5 5 4.5H11C11.2761 4.5 11.5 4.72386 11.5 5V11C11.5 11.2761 11.2761 11.5 11 11.5H5C4.72386 11.5 4.5 11.2761 4.5 11V5Z" fill="currentColor"/><path d="M13.5 2C13.7761 2 14 2.22386 14 2.5V13.5C14 13.7761 13.7761 14 13.5 14H2.5C2.22386 14 2 13.7761 2 13.5V2.5C2 2.22386 2.22386 2 2.5 2H13.5ZM3 13H13V3H3V13Z" fill="currentColor"/>`,stop:`<rect x="5" y="5" width="10" height="10" fill="currentColor"/>`,status:`<path d="M2 10V18H18V10M2 10V2H18V10M2 10H18M5 6H9M5 14H9" stroke="currentColor"/>`,"status-active":`<path d="M18 2H2V10H18V2Z" fill="currentColor" fill-opacity="0.1"/>
14
- <path d="M2 18H18V10H2V18Z" fill="currentColor" fill-opacity="0.1"/>
15
- <path d="M2 10V18H18V10M2 10V2H18V10M2 10H18M5 6H9M5 14H9" stroke="currentColor"/>`,sidebar:`<path d="M7.86667 2H5.2H2V18H5.2H7.86667M7.86667 2H18V18H7.86667M7.86667 2V18" stroke="currentColor"/>`,"sidebar-active":`<path d="M2 2V18H5.2H7.86667V2H5.2H2Z" fill="currentColor" fill-opacity="0.1"/>
16
- <path d="M7.86667 2H5.2H2V18H5.2H7.86667M7.86667 2H18V18H7.86667M7.86667 2V18" stroke="currentColor"/>`,"layout-left":`<path d="M2.91675 2.91699L2.91675 2.41699L2.41675 2.41699L2.41675 2.91699L2.91675 2.91699ZM17.0834 2.91699L17.5834 2.91699L17.5834 2.41699L17.0834 2.41699L17.0834 2.91699ZM17.0834 17.0837L17.0834 17.5837L17.5834 17.5837L17.5834 17.0837L17.0834 17.0837ZM2.91675 17.0837L2.41675 17.0837L2.41675 17.5837L2.91675 17.5837L2.91675 17.0837ZM7.41674 17.0837L7.41674 17.5837L8.41674 17.5837L8.41674 17.0837L7.91674 17.0837L7.41674 17.0837ZM8.41674 2.91699L8.41674 2.41699L7.41674 2.41699L7.41674 2.91699L7.91674 2.91699L8.41674 2.91699ZM2.91675 2.91699L2.91675 3.41699L17.0834 3.41699L17.0834 2.91699L17.0834 2.41699L2.91675 2.41699L2.91675 2.91699ZM17.0834 2.91699L16.5834 2.91699L16.5834 17.0837L17.0834 17.0837L17.5834 17.0837L17.5834 2.91699L17.0834 2.91699ZM17.0834 17.0837L17.0834 16.5837L2.91675 16.5837L2.91675 17.0837L2.91675 17.5837L17.0834 17.5837L17.0834 17.0837ZM2.91675 17.0837L3.41675 17.0837L3.41675 2.91699L2.91675 2.91699L2.41675 2.91699L2.41675 17.0837L2.91675 17.0837ZM7.91674 17.0837L8.41674 17.0837L8.41674 2.91699L7.91674 2.91699L7.41674 2.91699L7.41674 17.0837L7.91674 17.0837Z" fill="currentColor"/>`,"layout-left-partial":`<path d="M2.91732 2.91602L7.91732 2.91602L7.91732 17.0827H2.91732L2.91732 2.91602Z" fill="currentColor" fill-opacity="16%" /><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M2.91732 2.91602L7.91732 2.91602M17.084 2.91602L17.084 17.0827M17.084 2.91602L7.91732 2.91602M17.084 17.0827L2.91732 17.0827M17.084 17.0827L7.91732 17.0827M2.91732 17.0827H7.91732M7.91732 17.0827L7.91732 2.91602" stroke="currentColor" stroke-linecap="square"/>`,"layout-left-full":`<path d="M2.91732 2.91602L7.91732 2.91602L7.91732 17.0827H2.91732L2.91732 2.91602Z" fill="currentColor"/><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M2.91732 2.91602L7.91732 2.91602M17.084 2.91602L17.084 17.0827M17.084 2.91602L7.91732 2.91602M17.084 17.0827L2.91732 17.0827M17.084 17.0827L7.91732 17.0827M2.91732 17.0827H7.91732M7.91732 17.0827L7.91732 2.91602" stroke="currentColor" stroke-linecap="square"/>`,"layout-right":`<path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor"/>`,"layout-right-partial":`<path d="M17.082 17.0807L6.9987 17.0807V2.91406H17.082V17.0807Z" fill="currentColor" fill-opacity="16%" /><path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor" />`,"layout-right-full":`<path d="M17.082 17.0807L6.9987 17.0807V2.91406H17.082V17.0807Z" fill="currentColor" /><path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor" />`,"square-arrow-top-right":`<path d="M7.91675 2.9165H2.91675V17.0832H17.0834V12.0832M12.0834 2.9165H17.0834V7.9165M9.58342 10.4165L16.6667 3.33317" stroke="currentColor" stroke-linecap="square"/>`,"open-file":`<path d="M7.91602 2.91406H2.91602V17.0807H17.0827V12.0807M12.0827 2.91406H17.0827V7.91406M9.58268 10.4141L16.666 3.33073" stroke="currentColor" stroke-linecap="square"/>`,"speech-bubble":`<path d="M18.3334 10.0003C18.3334 5.57324 15.0927 2.91699 10.0001 2.91699C4.90749 2.91699 1.66675 5.57324 1.66675 10.0003C1.66675 11.1497 2.45578 13.1016 2.5771 13.3949C2.5878 13.4207 2.59839 13.4444 2.60802 13.4706C2.69194 13.6996 3.04282 14.9364 1.66675 16.7684C3.5186 17.6538 5.48526 16.1982 5.48526 16.1982C6.84592 16.9202 8.46491 17.0837 10.0001 17.0837C15.0927 17.0837 18.3334 14.4274 18.3334 10.0003Z" stroke="currentColor" stroke-linecap="square"/>`,comment:`<path d="M16.25 3.75H3.75V16.25L6.875 14.4643H16.25V3.75Z" stroke="currentColor" stroke-linecap="square"/>`,"folder-add-left":`<path d="M2.08333 9.58268V2.91602H8.33333L10 5.41602H17.9167V16.2493H8.75M3.75 12.0827V14.5827M3.75 14.5827V17.0827M3.75 14.5827H1.25M3.75 14.5827H6.25" stroke="currentColor" stroke-linecap="square"/>`,github:`<path d="M10.0001 1.62549C14.6042 1.62549 18.3334 5.35465 18.3334 9.95882C18.333 11.7049 17.785 13.4068 16.7666 14.8251C15.7482 16.2434 14.3107 17.3066 12.6563 17.8651C12.2397 17.9484 12.0834 17.688 12.0834 17.4692C12.0834 17.188 12.0938 16.2922 12.0938 15.1776C12.0938 14.3963 11.8334 13.8963 11.5313 13.6359C13.3855 13.4276 15.3334 12.7192 15.3334 9.52132C15.3334 8.60465 15.0105 7.86507 14.4792 7.28174C14.5626 7.0734 14.8542 6.21924 14.3959 5.0734C14.3959 5.0734 13.698 4.84424 12.1042 5.92757C11.4376 5.74007 10.7292 5.64632 10.0209 5.64632C9.31258 5.64632 8.60425 5.74007 7.93758 5.92757C6.34383 4.85465 5.64592 5.0734 5.64592 5.0734C5.18758 6.21924 5.47925 7.0734 5.56258 7.28174C5.03133 7.86507 4.70842 8.61507 4.70842 9.52132C4.70842 12.7088 6.64592 13.4276 8.50008 13.6359C8.2605 13.8442 8.04175 14.2088 7.96883 14.7505C7.48967 14.9692 6.29175 15.3234 5.54175 14.063C5.3855 13.813 4.91675 13.1984 4.2605 13.2088C3.56258 13.2192 3.97925 13.6047 4.27092 13.7609C4.62508 13.9588 5.03133 14.6984 5.12508 14.938C5.29175 15.4067 5.83342 16.3026 7.92717 15.9172C7.92717 16.6151 7.93758 17.2713 7.93758 17.4692C7.93758 17.688 7.78133 17.938 7.36467 17.8651C5.70491 17.3126 4.26126 16.2515 3.23851 14.8324C2.21576 13.4133 1.66583 11.7081 1.66675 9.95882C1.66675 5.35465 5.39592 1.62549 10.0001 1.62549Z" fill="currentColor"/>`,discord:`<path d="M16.0742 4.45014C14.9244 3.92097 13.7106 3.54556 12.4638 3.3335C12.2932 3.64011 12.1388 3.95557 12.0013 4.27856C10.6732 4.07738 9.32261 4.07738 7.99451 4.27856C7.85694 3.9556 7.70257 3.64014 7.53203 3.3335C6.28441 3.54735 5.06981 3.92365 3.91889 4.45291C1.63401 7.85128 1.01462 11.1652 1.32431 14.4322C2.6624 15.426 4.16009 16.1819 5.7523 16.6668C6.11082 16.1821 6.42806 15.6678 6.70066 15.1295C6.18289 14.9351 5.68315 14.6953 5.20723 14.4128C5.33249 14.3215 5.45499 14.2274 5.57336 14.136C6.95819 14.7907 8.46965 15.1302 9.99997 15.1302C11.5303 15.1302 13.0418 14.7907 14.4266 14.136C14.5463 14.2343 14.6688 14.3284 14.7927 14.4128C14.3159 14.6957 13.8152 14.9361 13.2965 15.1309C13.5688 15.669 13.8861 16.1828 14.2449 16.6668C15.8385 16.1838 17.3373 15.4283 18.6756 14.4335C19.039 10.645 18.0549 7.36145 16.0742 4.45014ZM7.09294 12.423C6.22992 12.423 5.51693 11.6357 5.51693 10.6671C5.51693 9.69852 6.20514 8.90427 7.09019 8.90427C7.97524 8.90427 8.68272 9.69852 8.66758 10.6671C8.65244 11.6357 7.97248 12.423 7.09294 12.423ZM12.907 12.423C12.0426 12.423 11.3324 11.6357 11.3324 10.6671C11.3324 9.69852 12.0206 8.90427 12.907 8.90427C13.7934 8.90427 14.4954 9.69852 14.4803 10.6671C14.4651 11.6357 13.7865 12.423 12.907 12.423Z" fill="currentColor"/>`,"layout-bottom":`<path d="M2.91699 17.0832L2.41699 17.0832L2.41699 17.5832L2.91699 17.5832L2.91699 17.0832ZM2.91699 2.91653L2.91699 2.41653L2.41699 2.41653L2.41699 2.91653L2.91699 2.91653ZM17.0837 2.91653L17.5837 2.91653L17.5837 2.41653L17.0837 2.41653L17.0837 2.91653ZM17.0837 17.0832L17.5837 17.0832L17.5837 17.5832L17.0837 17.5832L17.0837 17.0832ZM17.0837 12.5827L17.5837 12.5827L17.5837 11.5827L17.0837 11.5827L17.0837 12.0827L17.0837 12.5827ZM2.91699 11.5827L2.41699 11.5827L2.41699 12.5827L2.91699 12.5827L2.91699 12.0827L2.91699 11.5827ZM2.91699 17.0832L3.41699 17.0832L3.41699 2.91653L2.91699 2.91653L2.41699 2.91653L2.41699 17.0832L2.91699 17.0832ZM2.91699 2.91653L2.91699 3.41653L17.0837 3.41653L17.0837 2.91653L17.0837 2.41653L2.91699 2.41653L2.91699 2.91653ZM17.0837 2.91653L16.5837 2.91653L16.5837 17.0832L17.0837 17.0832L17.5837 17.0832L17.5837 2.91653L17.0837 2.91653ZM17.0837 17.0832L17.0837 16.5832L2.91699 16.5832L2.91699 17.0832L2.91699 17.5832L17.0837 17.5832L17.0837 17.0832ZM17.0837 12.0827L17.0837 11.5827L2.91699 11.5827L2.91699 12.0827L2.91699 12.5827L17.0837 12.5827L17.0837 12.0827Z" fill="currentColor"/>`,"layout-bottom-partial":`<path d="M2.91732 12.0827L17.084 12.0827L17.084 17.0827H2.91732L2.91732 12.0827Z" fill="currentColor" fill-opacity="16%" /><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M17.084 2.91602L17.084 17.0827M17.084 17.0827L2.91732 17.0827M2.91732 12.0827L17.084 12.0827" stroke="currentColor" stroke-linecap="square"/>`,"layout-bottom-full":`<path d="M2.91732 12.0827L17.084 12.0827L17.084 17.0827H2.91732L2.91732 12.0827Z" fill="currentColor"/><path d="M2.91732 2.91602L17.084 2.91602M2.91732 2.91602L2.91732 17.0827M17.084 2.91602L17.084 17.0827M17.084 17.0827L2.91732 17.0827M2.91732 12.0827L17.084 12.0827" stroke="currentColor" stroke-linecap="square"/>`,"dot-grid":`<path d="M2.08398 9.16602H3.75065V10.8327H2.08398V9.16602Z" fill="currentColor"/><path d="M10.834 9.16602H9.16732V10.8327H10.834V9.16602Z" fill="currentColor"/><path d="M16.2507 9.16602H17.9173V10.8327H16.2507V9.16602Z" fill="currentColor"/><path d="M2.08398 9.16602H3.75065V10.8327H2.08398V9.16602Z" stroke="currentColor"/><path d="M10.834 9.16602H9.16732V10.8327H10.834V9.16602Z" stroke="currentColor"/><path d="M16.2507 9.16602H17.9173V10.8327H16.2507V9.16602Z" stroke="currentColor"/>`,"circle-check":`<path d="M12.4987 7.91732L8.7487 12.5007L7.08203 10.834M17.9154 10.0007C17.9154 14.3729 14.371 17.9173 9.9987 17.9173C5.62644 17.9173 2.08203 14.3729 2.08203 10.0007C2.08203 5.6284 5.62644 2.08398 9.9987 2.08398C14.371 2.08398 17.9154 5.6284 17.9154 10.0007Z" stroke="currentColor" stroke-linecap="square"/>`,copy:`<path d="M6.2513 6.24935V2.91602H17.0846V13.7493H13.7513M13.7513 6.24935V17.0827H2.91797V6.24935H13.7513Z" stroke="currentColor" stroke-linecap="round"/>`,check:`<path d="M5 11.9657L8.37838 14.7529L15 5.83398" stroke="currentColor" stroke-linecap="square"/>`,photo:`<path d="M16.6665 16.6666L11.6665 11.6666L9.99984 13.3333L6.6665 9.99996L3.08317 13.5833M2.9165 2.91663H17.0832V17.0833H2.9165V2.91663ZM13.3332 7.49996C13.3332 8.30537 12.6803 8.95829 11.8748 8.95829C11.0694 8.95829 10.4165 8.30537 10.4165 7.49996C10.4165 6.69454 11.0694 6.04163 11.8748 6.04163C12.6803 6.04163 13.3332 6.69454 13.3332 7.49996Z" stroke="currentColor" stroke-linecap="square"/>`,share:`<path d="M10.0013 12.0846L10.0013 3.33464M13.7513 6.66797L10.0013 2.91797L6.2513 6.66797M17.0846 10.418V17.0846H2.91797V10.418" stroke="currentColor" stroke-linecap="square"/>`,shield:`<path d="M7.49935 9.3737L9.16602 11.0404L12.4994 7.70703M9.99935 2.08203L17.0827 4.3737V9.92565C17.0827 14.0694 13.3327 16.2487 9.99935 18.047C6.66602 16.2487 2.91602 14.0694 2.91602 9.92565V4.3737L9.99935 2.08203Z" stroke="currentColor" stroke-linecap="square"/>`,download:`<path d="M13.9583 10.6257L10 14.584L6.04167 10.6257M10 2.08398V13.959M16.25 17.9173H3.75" stroke="currentColor" stroke-linecap="square"/>`,menu:`<path d="M2.5 5H17.5M2.5 10H17.5M2.5 15H17.5" stroke="currentColor" stroke-linecap="square"/>`,server:`<rect x="3.35547" y="1.92969" width="13.2857" height="16.1429" stroke="currentColor"/><rect x="3.35547" y="11.9297" width="13.2857" height="6.14286" stroke="currentColor"/><rect x="12.8555" y="14.2852" width="1.42857" height="1.42857" fill="currentColor"/><rect x="10" y="14.2852" width="1.42857" height="1.42857" fill="currentColor"/>`,branch:`<path d="M14.2036 7.19987L14.2079 6.69989L13.2079 6.69132L13.2036 7.1913L13.7036 7.19559L14.2036 7.19987ZM8.14804 5.09032H7.64804C7.64804 5.75797 7.06861 6.34471 6.29619 6.34471V6.84471V7.34471C7.56926 7.34471 8.64804 6.36051 8.64804 5.09032H8.14804ZM6.29619 6.84471V6.34471C5.52376 6.34471 4.94434 5.75797 4.94434 5.09032H4.44434H3.94434C3.94434 6.36051 5.02311 7.34471 6.29619 7.34471V6.84471ZM4.44434 5.09032H4.94434C4.94434 4.42267 5.52376 3.83594 6.29619 3.83594V3.33594V2.83594C5.02311 2.83594 3.94434 3.82013 3.94434 5.09032H4.44434ZM6.29619 3.33594V3.83594C7.06861 3.83594 7.64804 4.42267 7.64804 5.09032H8.14804H8.64804C8.64804 3.82013 7.56926 2.83594 6.29619 2.83594V3.33594ZM8.14804 14.9149H7.64804C7.64804 15.5825 7.06861 16.1693 6.29619 16.1693V16.6693V17.1693C7.56926 17.1693 8.64804 16.1851 8.64804 14.9149H8.14804ZM6.29619 16.6693V16.1693C5.52376 16.1693 4.94434 15.5825 4.94434 14.9149H4.44434H3.94434C3.94434 16.1851 5.02311 17.1693 6.29619 17.1693V16.6693ZM4.44434 14.9149H4.94434C4.94434 14.2472 5.52376 13.6605 6.29619 13.6605V13.1605V12.6605C5.02311 12.6605 3.94434 13.6447 3.94434 14.9149H4.44434ZM6.29619 13.1605V13.6605C7.06861 13.6605 7.64804 14.2472 7.64804 14.9149H8.14804H8.64804C8.64804 13.6447 7.56926 12.6605 6.29619 12.6605V13.1605ZM15.5554 5.09032H15.0554C15.0554 5.75797 14.476 6.34471 13.7036 6.34471V6.84471V7.34471C14.9767 7.34471 16.0554 6.36051 16.0554 5.09032H15.5554ZM13.7036 6.84471V6.34471C12.9312 6.34471 12.3517 5.75797 12.3517 5.09032H11.8517H11.3517C11.3517 6.36051 12.4305 7.34471 13.7036 7.34471V6.84471ZM11.8517 5.09032H12.3517C12.3517 4.42267 12.9312 3.83594 13.7036 3.83594V3.33594V2.83594C12.4305 2.83594 11.3517 3.82013 11.3517 5.09032H11.8517ZM13.7036 3.33594V3.83594C14.476 3.83594 15.0554 4.42267 15.0554 5.09032H15.5554H16.0554C16.0554 3.82013 14.9767 2.83594 13.7036 2.83594V3.33594ZM13.7036 7.19559L13.2036 7.1913L13.1544 12.9277L13.6544 12.932L14.1544 12.9363L14.2036 7.19987L13.7036 7.19559ZM6.29619 6.84471H5.79619V13.1605H6.29619H6.79619V6.84471H6.29619ZM11.6545 14.9149V14.4149H8.14804V14.9149V15.4149H11.6545V14.9149ZM13.6544 12.932L13.1544 12.9277C13.1474 13.7511 12.4779 14.4149 11.6545 14.4149V14.9149V15.4149C13.0269 15.4149 14.1426 14.3086 14.1544 12.9363L13.6544 12.932Z" fill="currentColor"/>`,edit:`<path d="M17.0832 17.0807V17.5807H17.5832V17.0807H17.0832ZM2.9165 17.0807H2.4165V17.5807H2.9165V17.0807ZM2.9165 2.91406V2.41406H2.4165V2.91406H2.9165ZM9.58317 3.41406H10.0832V2.41406H9.58317V2.91406V3.41406ZM17.5832 10.4141V9.91406H16.5832V10.4141H17.0832H17.5832ZM6.24984 11.2474L5.89628 10.8938L5.74984 11.0403V11.2474H6.24984ZM6.24984 13.7474H5.74984V14.2474H6.24984V13.7474ZM8.74984 13.7474V14.2474H8.95694L9.10339 14.101L8.74984 13.7474ZM15.2082 2.28906L15.5617 1.93551L15.2082 1.58196L14.8546 1.93551L15.2082 2.28906ZM17.7082 4.78906L18.0617 5.14262L18.4153 4.78906L18.0617 4.43551L17.7082 4.78906ZM17.0832 17.0807V16.5807H2.9165V17.0807V17.5807H17.0832V17.0807ZM2.9165 17.0807H3.4165V2.91406H2.9165H2.4165V17.0807H2.9165ZM2.9165 2.91406V3.41406H9.58317V2.91406V2.41406H2.9165V2.91406ZM17.0832 10.4141H16.5832V17.0807H17.0832H17.5832V10.4141H17.0832ZM6.24984 11.2474H5.74984V13.7474H6.24984H6.74984V11.2474H6.24984ZM6.24984 13.7474V14.2474H8.74984V13.7474V13.2474H6.24984V13.7474ZM6.24984 11.2474L6.60339 11.6009L15.5617 2.64262L15.2082 2.28906L14.8546 1.93551L5.89628 10.8938L6.24984 11.2474ZM15.2082 2.28906L14.8546 2.64262L17.3546 5.14262L17.7082 4.78906L18.0617 4.43551L15.5617 1.93551L15.2082 2.28906ZM17.7082 4.78906L17.3546 4.43551L8.39628 13.3938L8.74984 13.7474L9.10339 14.101L18.0617 5.14262L17.7082 4.78906Z" fill="currentColor"/>`,help:`<path d="M7.91683 7.91927V6.2526H12.0835V8.7526L10.0002 10.0026V12.0859M10.0002 13.7526V13.7609M17.9168 10.0026C17.9168 14.3749 14.3724 17.9193 10.0002 17.9193C5.62791 17.9193 2.0835 14.3749 2.0835 10.0026C2.0835 5.63035 5.62791 2.08594 10.0002 2.08594C14.3724 2.08594 17.9168 5.63035 17.9168 10.0026Z" stroke="currentColor" stroke-linecap="square"/>`,"settings-gear":`<path d="M7.62516 4.46094L5.05225 3.86719L3.86475 5.05469L4.4585 7.6276L2.0835 9.21094V10.7943L4.4585 12.3776L3.86475 14.9505L5.05225 16.138L7.62516 15.5443L9.2085 17.9193H10.7918L12.3752 15.5443L14.9481 16.138L16.1356 14.9505L15.5418 12.3776L17.9168 10.7943V9.21094L15.5418 7.6276L16.1356 5.05469L14.9481 3.86719L12.3752 4.46094L10.7918 2.08594H9.2085L7.62516 4.46094Z" stroke="currentColor"/><path d="M12.5002 10.0026C12.5002 11.3833 11.3809 12.5026 10.0002 12.5026C8.61945 12.5026 7.50016 11.3833 7.50016 10.0026C7.50016 8.62189 8.61945 7.5026 10.0002 7.5026C11.3809 7.5026 12.5002 8.62189 12.5002 10.0026Z" stroke="currentColor"/>`,dash:`<rect x="5" y="9.5" width="10" height="1" fill="currentColor"/>`,"cloud-upload":`<path d="M12.0833 16.25H15C17.0711 16.25 18.75 14.5711 18.75 12.5C18.75 10.5649 17.2843 8.97217 15.4025 8.77133C15.2 6.13103 12.8586 4.08333 10 4.08333C7.71532 4.08333 5.76101 5.49781 4.96501 7.49881C2.84892 7.90461 1.25 9.76559 1.25 11.6667C1.25 13.9813 3.30203 16.25 5.83333 16.25H7.91667M10 16.25V10.4167M12.0833 11.875L10 9.79167L7.91667 11.875" stroke="currentColor" stroke-linecap="square"/>`,trash:`<path d="M4.58342 17.9134L4.58369 17.4134L4.22787 17.5384L4.22766 18.0384H4.58342V17.9134ZM15.4167 17.9134V18.0384H15.7725L15.7723 17.5384L15.4167 17.9134ZM2.08342 3.95508V3.45508H1.58342V3.95508H2.08342V4.45508V3.95508ZM17.9167 4.45508V4.95508H18.4167V4.45508H17.9167V3.95508V4.45508ZM4.16677 4.58008L3.66701 4.5996L4.22816 17.5379L4.72792 17.4934L5.22767 17.4489L4.66652 4.54055L4.16677 4.58008ZM4.58342 18.0384V17.9134H15.4167V18.0384V18.5384H4.58342V18.0384ZM15.4167 17.9134L15.8332 17.5379L16.2498 4.5996L15.7501 4.58008L15.2503 4.56055L14.8337 17.4989L15.4167 17.9134ZM15.8334 4.58008V4.08008H4.16677V4.58008V5.08008H15.8334V4.58008ZM2.08342 4.45508V4.95508H4.16677V4.58008V4.08008H2.08342V4.45508ZM15.8334 4.58008V5.08008H17.9167V4.45508V3.95508H15.8334V4.58008ZM6.83951 4.35149L7.432 4.55047C7.79251 3.47701 8.80699 2.70508 10.0001 2.70508V2.20508V1.70508C8.25392 1.70508 6.77335 2.83539 6.24702 4.15251L6.83951 4.35149ZM10.0001 2.20508V2.70508C11.1932 2.70508 12.2077 3.47701 12.5682 4.55047L13.1607 4.35149L13.7532 4.15251C13.2269 2.83539 11.7463 1.70508 10.0001 1.70508V2.20508Z" fill="currentColor"/>`,sliders:`<path d="M11.7778 4.66797H14.4444M11.7778 4.66797C11.7778 5.77254 10.8823 6.66797 9.77776 6.66797C8.67319 6.66797 7.77776 5.77254 7.77776 4.66797M11.7778 4.66797C11.7778 3.5634 10.8823 2.66797 9.77776 2.66797C8.67319 2.66797 7.77776 3.5634 7.77776 4.66797M1.55554 4.66797H7.77776M4.22221 11.3346H1.55554M4.22221 11.3346C4.22221 12.4392 5.11764 13.3346 6.22221 13.3346C7.32678 13.3346 8.22221 12.4392 8.22221 11.3346M4.22221 11.3346C4.22221 10.2301 5.11764 9.33464 6.22221 9.33464C7.32678 9.33464 8.22221 10.2301 8.22221 11.3346M14.4444 11.3346H8.22221" stroke="currentColor"/>`,keyboard:`<path d="M5.125 7.375V4.375H14.875V2.875M8.3125 13.9375H11.6875M8.125 13.9375H11.875M2.125 7.375H17.875V17.125H2.125V7.375ZM5.5 10.375H5.125V10.75H5.5V10.375ZM8.5 10.375H8.125V10.75H8.5V10.375ZM11.875 10.375H11.5V10.75H11.875V10.375ZM14.875 10.375H14.5V10.75H14.875V10.375ZM14.875 13.75H14.5V14.125H14.875V13.75ZM5.5 13.75H5.125V14.125H5.5V13.75Z" stroke="currentColor" stroke-linecap="square"/>`,selector:`<path d="M6.66626 12.5033L9.99959 15.8366L13.3329 12.5033M6.66626 7.50326L9.99959 4.16992L13.3329 7.50326" stroke="currentColor" stroke-linecap="square"/>`,"arrow-down-to-line":`<path d="M15.2083 11.6667L10 16.875L4.79167 11.6667M10 16.25V3.125" stroke="currentColor" stroke-width="1.25" stroke-linecap="square"/>`,warning:`<path d="M10 7.91667V11.6667M10 13.7417V13.75M10 2.5L1.875 16.25H18.125L10 2.5Z" stroke="currentColor" stroke-linecap="square"/>`,reset:`<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>`,link:`<path d="M2.08334 12.0833L1.72979 11.7298L1.37624 12.0833L1.72979 12.4369L2.08334 12.0833ZM7.91668 17.9167L7.56312 18.2702L7.91668 18.6238L8.27023 18.2702L7.91668 17.9167ZM17.9167 7.91666L18.2702 8.27022L18.6238 7.91666L18.2702 7.56311L17.9167 7.91666ZM12.0833 2.08333L12.4369 1.72977L12.0833 1.37622L11.7298 1.72977L12.0833 2.08333ZM8.39646 5.06311L8.0429 5.41666L8.75001 6.12377L9.10356 5.77021L8.75001 5.41666L8.39646 5.06311ZM5.77023 9.10355L6.12378 8.74999L5.41668 8.04289L5.06312 8.39644L5.41668 8.74999L5.77023 9.10355ZM14.2298 10.8964L13.8762 11.25L14.5833 11.9571L14.9369 11.6035L14.5833 11.25L14.2298 10.8964ZM11.6036 14.9369L11.9571 14.5833L11.25 13.8762L10.8965 14.2298L11.25 14.5833L11.6036 14.9369ZM7.14646 12.1464L6.7929 12.5L7.50001 13.2071L7.85356 12.8535L7.50001 12.5L7.14646 12.1464ZM12.8536 7.85355L13.2071 7.49999L12.5 6.79289L12.1465 7.14644L12.5 7.49999L12.8536 7.85355ZM2.08334 12.0833L1.72979 12.4369L7.56312 18.2702L7.91668 17.9167L8.27023 17.5631L2.4369 11.7298L2.08334 12.0833ZM17.9167 7.91666L18.2702 7.56311L12.4369 1.72977L12.0833 2.08333L11.7298 2.43688L17.5631 8.27022L17.9167 7.91666ZM12.0833 2.08333L11.7298 1.72977L8.39646 5.06311L8.75001 5.41666L9.10356 5.77021L12.4369 2.43688L12.0833 2.08333ZM5.41668 8.74999L5.06312 8.39644L1.72979 11.7298L2.08334 12.0833L2.4369 12.4369L5.77023 9.10355L5.41668 8.74999ZM14.5833 11.25L14.9369 11.6035L18.2702 8.27022L17.9167 7.91666L17.5631 7.56311L14.2298 10.8964L14.5833 11.25ZM7.91668 17.9167L8.27023 18.2702L11.6036 14.9369L11.25 14.5833L10.8965 14.2298L7.56312 17.5631L7.91668 17.9167ZM7.50001 12.5L7.85356 12.8535L12.8536 7.85355L12.5 7.49999L12.1465 7.14644L7.14646 12.1464L7.50001 12.5Z" fill="currentColor"/>`,providers:`<path d="M5.11115 3.33252H10.8889M5.11115 3.33252L3.33337 3.33254V12.6658H5.11115M5.11115 3.33252L5.11108 1.55469M10.8889 3.33252L12.6667 3.33252V12.6658H10.8889M10.8889 3.33252L10.8889 1.55469M10.8889 12.6658H5.11115M10.8889 12.6658L10.8889 14.4435M5.11115 12.6658L5.11108 14.4435M8 1.55469V3.33247M14.4444 7.99915H12.6666M14.4444 5.11023H12.6666M14.4444 10.8881H12.6666M8 14.4435V12.6658M1.55554 7.99915H3.33332M1.55554 10.8881H3.33332M1.55554 5.11023H3.33332M6 9.99915V5.99915H10V9.99915H6Z" stroke="currentColor"/>`,models:`<path fill-rule="evenodd" clip-rule="evenodd" d="M14 8C9.83336 8 8 9.83336 8 14C8 9.83336 6.16666 8 2 8C6.16666 8 8 6.16666 8 2C8 6.16666 9.83336 8 14 8Z" stroke="currentColor"/>`,appearance:`<path d="M2.00012 13.9997L13.9998 2" stroke="currentColor" stroke-linecap="square"/><path d="M2.00012 8.35278L8.3529 2" stroke="currentColor" stroke-linecap="square"/><path d="M2.00012 2.70586L2.70599 2" stroke="currentColor" stroke-linecap="square"/><path d="M7.64722 14.0012L14 7.64844" stroke="currentColor" stroke-linecap="square"/><path d="M13.2935 13.9988L13.9993 13.293" stroke="currentColor" stroke-linecap="square"/>`,notifications:`<path d="M14.8889 6.77778V9.11112C14.8889 10.093 14.8889 10.8889 14.8889 10.8889H11.3334M5.55558 10.8889H2C2 10.8889 2.00001 10.093 2.00001 9.11112V3.77778C2.00001 2.79594 2.00009 2 2.00009 2H9.44531M5.55558 10.8889V13.1111H8.44447H11.3334V10.8889M5.55558 10.8889H11.3334" stroke="currentColor"/><path d="M13 5C14.1046 5 15 4.10457 15 3C15 1.89543 14.1046 1 13 1C11.8954 1 11 1.89543 11 3C11 4.10457 11.8954 5 13 5Z" stroke="currentColor"/>`,extensions:`<path d="M8 6.75047V9.25047M10.668 6.75047V9.25047M5.33398 6.75047V9.25047M1.33398 2.44531V13.5553H14.6673V2.44531H1.33398Z" stroke="currentColor" stroke-linecap="square"/>`,cube:`<path d="M10 2.5L16.5 6.25V13.75L10 17.5L3.5 13.75V6.25L10 2.5Z" stroke="currentColor"/><path d="M10 10L16.5 6.25M10 10V17.5M10 10L3.5 6.25" stroke="currentColor"/>`,"post-skill":`<rect x="2.5" y="3.5" width="15" height="13" rx="1.5" stroke="currentColor"/><path d="M5.5 7.5H10.5M5.5 10.5H14.5" stroke="currentColor"/>`,"arrow-undo-down":`<path d="M4.08333 11.0859L1.75 8.7526L4.08333 6.41927M2.33333 8.7526L12.5417 8.7526L12.5417 3.21094L7 3.21094" stroke="currentColor" stroke-width="1" stroke-linecap="square"/>`};function wo(e){return e===`magnifying-glass`||e===`arrow-undo-down`||e===`subagent`||e===`notifications`||e===`appearance`||e===`extensions`||e===`sliders`||e===`providers`||e===`models`?`0 0 16 16`:`0 0 20 20`}var To=G(`<svg><use>`),Eo={lock:{viewBox:`0 0 16 16`,body:`<rect x="3.5" y="7" width="9" height="7" rx="1" stroke="currentColor"/><path d="M5 7V5a3 3 0 0 1 6 0v2M8 10v1" stroke="currentColor" stroke-linecap="round"/>`},globe:{viewBox:`0 0 16 16`,body:`<circle cx="8" cy="8" r="6" stroke="currentColor"/><ellipse cx="8" cy="8" rx="2.5" ry="6" stroke="currentColor"/><path d="M2 8h12" stroke="currentColor"/>`},flask:{viewBox:`0 0 16 16`,body:`<path d="M5.5 2H10.5M6 2V6L2.5 12C2 13 2.5 14 3.5 14H12.5C13.5 14 14 13 13.5 12L10 6V2M4.25 9H11.75" stroke="currentColor" stroke-linecap="square" stroke-linejoin="round"/>`},edit:{viewBox:`0 0 16 16`,body:`<path d="M13.5556 8.21529V13.5556H2.44446L2.44446 2.44445H7.78474M6.00002 8.16216V10H7.83786L14 3.83784L12.1622 2L6.00002 8.16216Z" stroke="currentColor"/>`},"folder-add-left":{viewBox:`0 0 16 16`,body:`<path d="M7.5 13.3333H1.5V2H6.83333L8.83333 4H14.8333V6M10.1667 11.3333H15.5M12.8333 8.66667V14" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`},folder:{viewBox:`0 0 16 16`,body:`<path d="M1.33337 2V13.3333H14.6667V4H8.66671L6.66671 2H1.33337Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`},branch:{viewBox:`0 0 16 16`,body:`<path d="M5.118 5.686V10.314M5.118 5.686C5.97 5.686 6.661 4.995 6.661 4.143C6.661 3.291 5.97 2.6 5.118 2.6C4.266 2.6 3.575 3.291 3.575 4.143C3.575 4.995 4.266 5.686 5.118 5.686ZM5.118 10.314C4.266 10.314 3.575 11.005 3.575 11.857C3.575 12.709 4.266 13.4 5.118 13.4C5.97 13.4 6.661 12.709 6.661 11.857M5.118 10.314C5.97 10.314 6.661 11.005 6.661 11.857M10.882 5.686C11.734 5.686 12.425 4.995 12.425 4.143C12.425 3.291 11.734 2.6 10.882 2.6C10.03 2.6 9.339 3.291 9.339 4.143C9.339 4.995 10.03 5.686 10.882 5.686ZM10.882 5.686V9.457C10.882 10.783 9.807 11.857 8.482 11.857H6.661" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>`},"branch-out":{viewBox:`0 0 16 16`,body:`<path d="M10.4225 3.35355L12.9024 5.83344L10.4225 8.31333" stroke="currentColor"/><path d="M1 12.2852H4.23042C4.89912 12.2852 5.52359 11.951 5.89452 11.3946L9.00783 6.72462C8.37877 6.16823 10.0032 5.83402 10.6719 5.83402H12.9024" stroke="currentColor"/><path d="M8.5 12.2852H14" stroke="currentColor" stroke-linejoin="round"/>`},"grid-plus":{viewBox:`0 0 16 16`,body:`<path d="M13.9948 11.668H9.32812M11.6641 9.33203V13.9987M6.66667 9.33203V13.9987H2V9.33203H6.66667ZM6.66667 2V6.66667H2V2H6.66667ZM13.9948 2V6.66667H9.32812V2H13.9948Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`},help:{viewBox:`0 0 16 16`,body:`<path d="M6.33345 6.33349V5.00015H9.66679V7.00015L8.00015 8.00015V9.66679M8.27485 11.6819H7.71897M14.4446 8.00011C14.4446 11.5593 11.5593 14.4446 8.00011 14.4446C4.44094 14.4446 1.55566 11.5593 1.55566 8.00011C1.55566 4.44094 4.44094 1.55566 8.00011 1.55566C11.5593 1.55566 14.4446 4.44094 14.4446 8.00011Z" stroke="currentColor" stroke-linecap="square"/>`},info:{viewBox:`0 0 16 16`,body:`<g transform="translate(2 2)"><path d="M12 12H0V0H12V12ZM1 1V11H11V1H1ZM6.5791 4.81641V9.37207H5.5791V5.81641H4.46777V4.81641H6.5791ZM6.85645 2.62891V3.62891H5.30078V2.62891H6.85645Z" fill="currentColor"/></g>`},"circle-exclamation":{viewBox:`0 0 16 16`,body:`<path d="M8.75 11.75H7.25V10.25H8.75V11.75Z" fill="currentColor"/><path d="M8.75 9.25H7.25V4.25H8.75V9.25Z" fill="currentColor"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8 1C9.93286 1 11.684 1.7836 12.9502 3.0498C14.2164 4.31601 15 6.06714 15 8C15 11.866 11.866 15 8 15C6.06714 15 4.31601 14.2164 3.0498 12.9502C1.7836 11.684 1 9.93286 1 8C1 4.13401 4.13401 1 8 1ZM8 2C4.68629 2 2 4.68629 2 8C2 9.65699 2.67148 11.1559 3.75781 12.2422C4.84415 13.3285 6.34301 14 8 14C11.3137 14 14 11.3137 14 8C14 6.34301 13.3285 4.84415 12.2422 3.75781C11.1559 2.67148 9.65699 2 8 2Z" fill="currentColor"/>`},"circle-xmark":{viewBox:`0 0 16 16`,body:`<path fill-rule="evenodd" clip-rule="evenodd" d="M1.33334 8.00016C1.33334 4.31826 4.31811 1.3335 8.00001 1.3335C11.6819 1.3335 14.6667 4.31826 14.6667 8.00016C14.6667 11.6821 11.6819 14.6668 8.00001 14.6668C4.31811 14.6668 1.33334 11.6821 1.33334 8.00016ZM6.00001 5.29306L5.2929 6.00016L7.2929 8.00016L5.2929 10.0002L6.00001 10.7073L8.00001 8.70727L10 10.7073L10.7071 10.0002L8.70712 8.00016L10.7071 6.00016L10 5.29306L8.00001 7.29306L6.00001 5.29306Z" fill="currentColor"/>`},"sidebar-right":{viewBox:`0 0 20 20`,body:`<path d="M2.91536 2.91406H2.36536V2.36406H2.91536V2.91406ZM2.91536 17.0807V17.6307H2.36536V17.0807H2.91536ZM17.082 17.0807H17.632V17.6307H17.082V17.0807ZM17.082 2.91406V2.36406H17.632V2.91406H17.082ZM6.9987 2.91406H6.4487V2.36406H6.9987V2.91406ZM6.9987 17.0807V17.6307H6.4487V17.0807H6.9987ZM2.91536 2.91406H3.46536V17.0807H2.91536H2.36536V2.91406H2.91536ZM2.91536 17.0807V16.5307H17.082V17.0807V17.6307H2.91536V17.0807ZM17.082 17.0807H16.532V2.91406H17.082H17.632V17.0807H17.082ZM17.082 2.91406V3.46406H2.91536V2.91406V2.36406H17.082V2.91406ZM6.9987 2.91406H7.5487V17.0807H6.9987H6.4487V2.91406H6.9987ZM17.082 17.0807L17.082 17.6307L6.9987 17.6307V17.0807V16.5307L17.082 16.5307L17.082 17.0807ZM6.9987 2.91406V2.36406H17.082V2.91406V3.46406H6.9987V2.91406Z" fill="currentColor"/>`},status:{viewBox:`0 0 20 20`,body:`<path d="M2 10V18H18V10M2 10V2H18V10M2 10H18M5 6H9M5 14H9" stroke="currentColor"/>`},"status-active":{viewBox:`0 0 20 20`,body:`<path d="M18 2H2V10H18V2Z" fill="currentColor" fill-opacity="0.1"/><path d="M2 18H18V10H2V18Z" fill="currentColor" fill-opacity="0.1"/><path d="M2 10V18H18V10M2 10V2H18V10M2 10H18M5 6H9M5 14H9" stroke="currentColor"/>`},"magnifying-glass":{viewBox:`0 0 16 16`,body:`<path d="M14 14L10.3454 10.3454M6.88889 11.7778C9.58889 11.7778 11.7778 9.58889 11.7778 6.88889C11.7778 4.18889 9.58889 2 6.88889 2C4.18889 2 2 4.18889 2 6.88889C2 9.58889 4.18889 11.7778 6.88889 11.7778Z" stroke="currentColor"/>`},menu:{viewBox:`0 0 16 16`,body:`<path d="M2 8H14M2 4.664H14M2 11.336H14" stroke="currentColor"/>`},plus:{viewBox:`0 0 16 16`,body:`<path d="M8 2.88867V13.1109" stroke="currentColor" stroke-linejoin="round"/><path d="M2.88867 8H13.1109" stroke="currentColor" stroke-linejoin="round"/>`},"settings-gear":{viewBox:`0 0 16 16`,body:`<path d="M7.99998 1.3335L14 4.66683V11.3335L7.99998 14.6668L2 11.3335V4.66683L7.99998 1.3335Z" stroke="currentColor"/><path d="M9.99998 8.00016C9.99998 9.10476 9.10458 10.0002 7.99998 10.0002C6.89538 10.0002 5.99998 9.10476 5.99998 8.00016C5.99998 6.89556 6.89538 6.00016 7.99998 6.00016C9.10458 6.00016 9.99998 6.89556 9.99998 8.00016Z" stroke="currentColor"/>`},"chevron-down":{viewBox:`0 0 16 16`,body:`<path d="M5 6.5L8 9.5L11 6.5" stroke="currentColor"/>`},collapse:{viewBox:`0 0 16 16`,body:`<path d="M8 1V6M11 3L8 6L5 3" stroke="currentColor"/><path d="M8 15V10M11 13L8 10L5 13" stroke="currentColor"/><path d="M4 8H6" stroke="currentColor"/><path d="M7 8H9" stroke="currentColor"/><path d="M10 8H12" stroke="currentColor"/>`},check:{viewBox:`0 0 16 16`,body:`<path d="M3.53613 8.17857L6.39328 11.75L12.4647 4.25" stroke="currentColor"/>`},monitor:{viewBox:`0 0 16 16`,body:`<path d="M4.05559 9.38889H0.500007C0.500007 9.38889 0.500017 8.59298 0.500017 7.61112V2.27778C0.500017 1.29594 0.500102 0.5 0.500102 0.5H13.3889C13.3889 0.5 13.3889 1.29594 13.3889 2.27778V7.61112C13.3889 8.59298 13.3889 9.38889 13.3889 9.38889H9.83336M4.05559 9.38889V11.6111H6.94448H9.83336V9.38889M4.05559 9.38889H9.83336" transform="translate(1.05556 1.94444)" stroke="currentColor"/>`},"workspace-new":{viewBox:`0 0 16 16`,body:`<path d="M2 10.7578V14.0011H5.24324M13.9991 5.24324V2H10.7559M13.9991 10.7578V14.0011H10.7559M2 5.24324V2H5.24324" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/><path d="M8 4.5V11.5M4.5 8H11.5" stroke="currentColor" stroke-linejoin="round"/>`},"workspace-isolated":{viewBox:`0 0 16 16`,body:`<path d="M10.5 10.5V5.5H5.5V10.5H10.5Z" fill="currentColor"/><rect x="2.5" y="2.5" width="11" height="11" stroke="currentColor"/>`},workspace:{viewBox:`0 0 16 16`,body:`<path d="M2 10.668V14.0013H10.6667M13.9974 10.6667V2H2.66406M13.9974 10.668V14.0013H10.6641M2 10V2H5.33333" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/><path d="M10.6693 10.6654V5.33203H5.33594V10.6654H10.6693Z" fill="currentColor"/>`},"outline-worktree":{viewBox:`0 0 16 16`,body:`<path d="M12 3.11133L14.3885 5.49977L12 7.88822M14.5 5.49972H10.058L5.13456 11.8139M14.5 11.6606L8.5 11.6606M5.50012 11.6597H1.5" stroke="currentColor"/>`},"outline-trash":{viewBox:`0 0 16 16`,body:`<path d="M2.44434 4.22224H13.5554M5.99994 4.22224V2.44446C5.99994 1.95557 5.99992 1.55557 5.99992 1.55557H9.99989C9.99989 1.55557 9.99994 1.95557 9.99994 2.44446V4.22224M6.55545 7.77779L6.7485 11.7778M9.44437 7.77779L9.2513 11.7778M12.1756 6.88891L11.8666 12.7556C11.8168 13.7068 11.7748 14.4445 11.7748 14.4445H4.22511C4.22511 14.4445 4.18392 13.7067 4.13414 12.7556L3.82509 6.88891" stroke="currentColor"/>`},close:{viewBox:`0 0 20 20`,body:`<path d="M14.4446 5.55566L5.55566 14.4446M5.55566 5.55566L14.4446 14.4446" stroke="currentColor" stroke-linejoin="round"/>`},"xmark-small":{viewBox:`0 0 16 16`,body:`<path d="M4.25 11.75L11.75 4.25M11.75 11.75L4.25 4.25" stroke="currentColor"/>`},"outline-xmark":{viewBox:`0 0 16 16`,body:`<path fill-rule="evenodd" clip-rule="evenodd" d="M4.99487 5.70186L7.29297 7.99995L4.99487 10.2981L5.70198 11.0052L8.00008 8.70706L10.2982 11.0052L11.0053 10.2981L8.70718 7.99995L11.0053 5.70186L10.2982 4.99475L8.00008 7.29285L5.70198 4.99475L4.99487 5.70186Z" fill="currentColor"/>`},"outline-chevron-down":{viewBox:`0 0 16 16`,body:`<path d="M5 6.5L8 9.5L11 6.5" stroke="currentColor"/>`},"outline-dots":{viewBox:`0 0 16 16`,body:`<path d="M2.5 7.5H3.5V8.5H2.5V7.5Z" stroke="currentColor"/><path d="M7.5 7.5H8.5V8.5H7.5V7.5Z" stroke="currentColor"/><path d="M12.5 7.5H13.5V8.5H12.5V7.5Z" stroke="currentColor"/>`},expand:{viewBox:`0 0 16 16`,body:`<path d="M8.25 6.17773V1.17773M11.25 4.17773L8.25 1.17773L5.25 4.17773" stroke="currentColor"/><path d="M8.25 9.17773V14.1777M11.25 11.1777L8.25 14.1777L5.25 11.1777" stroke="currentColor"/><path d="M4.25 7.67773H12.25" stroke="currentColor"/>`},filetree:{viewBox:`0 0 16 16`,body:`<path d="M2.5 1.5V12.2484H6.75M2.5 4.74838H6.75" stroke="currentColor"/><rect x="8.5" y="3.2168" width="6" height="3" fill="none" stroke="currentColor"/><rect x="8.5" y="10.75" width="6" height="3" fill="none" stroke="currentColor"/>`},split:{viewBox:`0 0 16 16`,body:`<path d="M1 14H15L15 2H1V14Z" stroke="currentColor"/><rect x="3" y="4" width="4" height="8" fill="currentColor" fill-opacity="0.5"/><rect x="9" y="4" width="4" height="8" fill="currentColor" fill-opacity="0.5"/>`},unified:{viewBox:`0 0 16 16`,body:`<path d="M3.00001 4.00045L12.9998 4L13 6.99955L3 7L3.00001 4.00045Z" fill="currentColor" fill-opacity="0.5"/><path d="M3.0001 9H13L12.9999 12H3L3.0001 9Z" fill="currentColor" fill-opacity="0.5"/><path d="M1 14H15L15 2H1V14Z" stroke="currentColor"/>`},review:{viewBox:`0 0 20 20`,body:`<path d="M7 14.5H13M7 7.99512H10.0049M10.0049 7.99512H13M10.0049 7.99512V5M10.0049 7.99512V11M18 18V2L2 2L2 18H18Z" stroke="currentColor"/>`},"window-analytics":{viewBox:`0 0 16 16`,body:`<path d="M14.5 9.8333V13.5H1.5V2.5H7.1667M9.5 2.5V7.5H14.5V2.5H9.5Z" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="square"/>`},"graduation-cap":{viewBox:`0 0 16 16`,body:`<path d="M12.3327 7.50065V11.0007L7.99935 13.6673L3.66602 11.0007V7.50065M14.3327 9.83398V6.16732M7.99935 2.33398L1.66602 6.00065L7.99935 10.0007L14.3327 6.00065L7.99935 2.33398Z" stroke="currentColor" stroke-linecap="square"/>`},"code-slash":{viewBox:`0 0 16 16`,body:`<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0812 2.10803L6.55974 14.0809L5.92016 13.8928L9.44161 1.91992L10.0812 2.10803ZM4.13793 4.97275L1.44666 8.00045L4.13793 11.0281L3.63966 11.471L0.554688 8.00045L3.63966 4.52984L4.13793 4.97275ZM12.3617 4.52984L15.4467 8.00045L12.3617 11.471L11.8634 11.0281L14.5547 8.00045L11.8634 4.97275L12.3617 4.52984Z" fill="currentColor"/>`},trash:{viewBox:`0 0 20 20`,body:`<path d="M4.58342 17.9134L4.58369 17.4134L4.22787 17.5384L4.22766 18.0384H4.58342V17.9134ZM15.4167 17.9134V18.0384H15.7725L15.7723 17.5384L15.4167 17.9134ZM2.08342 3.95508V3.45508H1.58342V3.95508H2.08342V4.45508V3.95508ZM17.9167 4.45508V4.95508H18.4167V4.45508H17.9167V3.95508V4.45508ZM4.16677 4.58008L3.66701 4.5996L4.22816 17.5379L4.72792 17.4934L5.22767 17.4489L4.66652 4.54055L4.16677 4.58008ZM4.58342 18.0384V17.9134H15.4167V18.0384V18.5384H4.58342V18.0384ZM15.4167 17.9134L15.8332 17.5379L16.2498 4.5996L15.7501 4.58008L15.2503 4.56055L14.8337 17.4989L15.4167 17.9134ZM15.8334 4.58008V4.08008H4.16677V4.58008V5.08008H15.8334V4.58008ZM2.08342 4.45508V4.95508H4.16677V4.58008V4.08008H2.08342V4.45508ZM15.8334 4.58008V5.08008H17.9167V4.45508V3.95508H15.8334V4.58008ZM6.83951 4.35149L7.432 4.55047C7.79251 3.47701 8.80699 2.70508 10.0001 2.70508V2.20508V1.70508C8.25392 1.70508 6.77335 2.83539 6.24702 4.15251L6.83951 4.35149ZM10.0001 2.20508V2.70508C11.1932 2.70508 12.2077 3.47701 12.5682 4.55047L13.1607 4.35149L13.7532 4.15251C13.2269 2.83539 11.7463 1.70508 10.0001 1.70508V2.20508Z" fill="currentColor"/>`},"outline-sliders":{viewBox:`0 0 16 16`,body:`<path d="M11.7779 4.66675H14.4446M11.7779 4.66675C11.7779 5.77132 10.8825 6.66675 9.77789 6.66675C8.67332 6.66675 7.77789 5.77132 7.77789 4.66675M11.7779 4.66675C11.7779 3.56218 10.8825 2.66675 9.77789 2.66675C8.67332 2.66675 7.77789 3.56218 7.77789 4.66675M1.55566 4.66675H7.77789M4.22233 11.3334H1.55566M4.22233 11.3334C4.22233 12.438 5.11776 13.3334 6.22233 13.3334C7.3269 13.3334 8.22233 12.438 8.22233 11.3334M4.22233 11.3334C4.22233 10.2288 5.11776 9.33341 6.22233 9.33341C7.3269 9.33341 8.22233 10.2288 8.22233 11.3334M14.4446 11.3334H8.22233" stroke="currentColor"/>`},"outline-copy":{viewBox:`0 0 16 16`,body:`<path d="M4.14908 11.0081H1.76282V1.51758H9.1038V2.55588M14.2225 4.99681H6.75397V14.4873H14.2225V4.99681Z" stroke="currentColor"/>`},"arrow-up-right":{viewBox:`0 0 16 16`,body:`<path d="M11 9.56V5H6.44M11 5L5 11" stroke="currentColor"/>`},"outline-square-arrow":{viewBox:`0 0 16 16`,body:`<path d="M13.5555 6.66656V2.44434H9.33326M13.5555 2.44434L7.99993 7.99989M13.5555 9.33324V13.5555C13.5555 13.5555 12.7599 13.5555 11.7777 13.5555H2.44438C2.44438 13.5555 2.44438 12.7599 2.44438 11.7777V4.22213C2.44438 3.2399 2.44434 2.44435 2.44434 2.44435H6.66661" stroke="currentColor"/>`},"outline-arrow-to-corner-top-right":{viewBox:`0 0 16 16`,body:`<path d="M2 8.5V2H14V14H8M5 5.66667H10.3333V11M3.66797 12.333L9.94292 6.05806" stroke="currentColor" stroke-linecap="square"/>`},"outline-hexagonal-warning":{viewBox:`0 0 16 16`,body:`<path d="M10.6667 1.33325H5.33272L1.33334 5.33325L1.33342 10.6917L5.3327 14.691L10.6667 14.6909L14.6911 10.6917V5.33255L10.6667 1.33325Z" stroke="currentColor"/><path d="M8 10.6667H8.00667" stroke="currentColor" stroke-linecap="square"/><path d="M8 7.99992V5.33325" stroke="currentColor" stroke-linecap="square"/>`},"outline-share":{viewBox:`0 0 16 16`,body:`<path d="M13.5554 10.4445V13.5556C13.5554 13.5556 12.7599 13.5556 11.7777 13.5556H4.22211C3.23989 13.5556 2.44434 13.5556 2.44434 13.5556V10.4445M4.88878 5.55557L7.99989 2.44446L11.111 5.55557M7.99989 2.44446L7.99989 9.11112" stroke="currentColor"/>`},"outline-eye":{viewBox:`0 0 20 20`,body:`<path d="M2.5 10s3.33-5.42 7.5-5.42S17.5 10 17.5 10s-3.33 5.42-7.5 5.42S2.5 10 2.5 10Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><circle cx="10" cy="10" r="2.5" stroke="currentColor"/>`},"outline-eye-slash":{viewBox:`0 0 20 20`,body:`<path d="M2.5 10s3.33-5.42 7.5-5.42S17.5 10 17.5 10s-3.33 5.42-7.5 5.42S2.5 10 2.5 10Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/><circle cx="10" cy="10" r="2.5" stroke="currentColor"/><path d="M3 3 17 17" stroke="currentColor" stroke-linecap="round"/>`},refresh:{viewBox:`0 0 20 20`,body:`<path d="M16.25 7.5A6.5 6.5 0 1 0 16.5 11M16.25 3.5v4h-4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>`},reset:{viewBox:`0 0 20 20`,body:`<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>`},"outline-reset":{viewBox:`0 0 20 20`,body:`<path d="M5.83333 4.16406L2.5 7.4974L5.83333 10.8307M3.33333 7.4974H17.9167V15.4141H10" stroke="currentColor" stroke-linecap="square"/>`},"fill-triangle-down":{viewBox:`0 0 16 16`,body:`<path d="M5.37624 6.75194C5.18184 6.41861 5.42224 6 5.80814 6H10.1921C10.578 6 10.8184 6.41861 10.624 6.75194L8.43203 10.5096C8.23909 10.8404 7.76119 10.8404 7.56825 10.5096L5.37624 6.75194Z" fill="currentColor"/>`},archive:{viewBox:`0 0 16 16`,body:`<path d="M13.1112 13.5555V14.0555H13.6112V13.5555H13.1112ZM2.889 13.5555H2.389L2.389 14.0555H2.889V13.5555ZM3.38901 5.55546L3.38901 5.05546L2.38901 5.05546L2.38901 5.55546L2.88901 5.55546L3.38901 5.55546ZM14.4446 2.44434H14.9446V1.94434L14.4446 1.94434L14.4446 2.44434ZM14.4446 5.55545L14.4446 6.05545L14.9446 6.05545V5.55545H14.4446ZM1.55566 5.55546L1.05566 5.55545L1.05566 6.05546L1.55566 6.05546L1.55566 5.55546ZM1.5557 2.44436L1.5557 1.94436L1.05571 1.94436L1.0557 2.44435L1.5557 2.44436ZM13.1112 5.55546H12.6112V13.5555H13.1112H13.6112V5.55546H13.1112ZM2.889 13.5555H3.389L3.38901 5.55546L2.88901 5.55546L2.38901 5.55546L2.389 13.5555H2.889ZM14.4446 2.44434H13.9446V5.55545H14.4446H14.9446V2.44434H14.4446ZM1.55566 5.55546L2.05566 5.55547L2.0557 2.44436L1.5557 2.44436L1.0557 2.44435L1.05566 5.55545L1.55566 5.55546ZM6.22234 8.22213V8.72213H9.7779V8.22213V7.72213H6.22234V8.22213ZM13.1112 13.5555V13.0555H2.889V13.5555V14.0555H13.1112V13.5555ZM1.5557 2.44436L1.5557 2.94436L14.4446 2.94434L14.4446 2.44434L14.4446 1.94434L1.5557 1.94436L1.5557 2.44436ZM14.4446 5.55545L14.4446 5.05545L1.55566 5.05546L1.55566 5.55546L1.55566 6.05546L14.4446 6.05545L14.4446 5.55545Z" fill="currentColor"/>`}},Do=`opencode-v2-icon-sprite`,Oo=e=>`opencode-v2-icon-${e}`,ko=!1;function Ao(e){return Eo[e]||{body:Co[e],viewBox:wo(e)}}function jo(){return Array.from(new Set([...Object.keys(Co),...Object.keys(Eo)])).map(e=>`<symbol id="${Oo(e)}" viewBox="${Ao(e).viewBox}">${Ao(e).body}</symbol>`).join(``)}function Mo(){if(ko||typeof document>`u`)return;let e=document.getElementById(Do);if(e){e.innerHTML=jo(),ko=!0;return}let t=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);t.id=Do,t.setAttribute(`aria-hidden`,`true`),t.setAttribute(`width`,`0`),t.setAttribute(`height`,`0`),t.style.position=`absolute`,t.style.overflow=`hidden`,t.innerHTML=jo(),document.body.insertBefore(t,document.body.firstChild),ko=!0}function No(e){let[t,n]=V(e,[`name`,`size`]),r=()=>Eo[t.name]||Co[t.name]?t.name:`plus`,i=()=>Ao(r()),a=t.size===`small`?14:t.size===`large`?20:16;return oe(Mo),(()=>{var e=To(),t=e.firstChild;return ht(e,B(n,{"data-slot":`icon-svg`,get"data-directional"(){return r()===`arrow-left`||r()===`arrow-right`||r()===`chevron-left`||r()===`chevron-right`?``:void 0},width:a,height:a,get viewBox(){return i().viewBox},fill:`none`,xmlns:`http://www.w3.org/2000/svg`,get"aria-hidden"(){return n[`aria-hidden`]??`true`}}),!0,!0),j(()=>K(t,`href`,`#${Oo(r())}`)),e})()}function Po(e){let[t,n]=V(e,[`variant`,`size`,`icon`,`class`,`classList`]);return z(za,B(n,{"data-component":`button-v2`,get"data-size"(){return t.size||`normal`},get"data-variant"(){return t.variant||`neutral`},get"data-icon"(){return t.icon},get classList(){return{...t.classList,[t.class??``]:!!t.class}},get children(){return[z(U,{get when(){return t.icon},children:e=>z(No,{get name(){return e()}})}),W(()=>e.children)]}}))}var Fo=G(`<span>`);function Io(e){let[t,n]=V(e,[`class`,`classList`,`children`,`appearance`,`variant`]);return(()=>{var e=Fo();return ht(e,B(n,{"data-component":`tag`,get"data-appearance"(){return t.appearance??`compact`},get"data-variant"(){return t.variant??`neutral`},get classList(){return{...t.classList,[t.class??``]:!!t.class}}}),!1,!0),q(e,()=>t.children),e})()}function Lo(e){let[t,n]=V(e,[`variant`,`size`,`icon`,`class`,`classList`,`state`]);return z(za,B(n,{"data-component":`icon-button-v2`,get"data-size"(){return t.size||`normal`},get"data-variant"(){return t.variant||`neutral`},get"data-state"(){return t.state},get classList(){return{...t.classList,[t.class??``]:!!t.class}},get children(){return t.icon}}))}var Ro=new Set([`Avst`,`Arab`,`Armi`,`Syrc`,`Samr`,`Mand`,`Thaa`,`Mend`,`Nkoo`,`Adlm`,`Rohg`,`Hebr`]),zo=new Set([`ae`,`ar`,`arc`,`bcc`,`bqi`,`ckb`,`dv`,`fa`,`glk`,`he`,`ku`,`mzn`,`nqo`,`pnb`,`ps`,`sd`,`ug`,`ur`,`yi`]);function Bo(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize().script??``;return Ro.has(t)}let t=e.split(`-`)[0];return zo.has(t)}function Vo(e){return Bo(e)?`rtl`:`ltr`}function Ho(){let e=typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return{locale:e,direction:Vo(e)}}var Uo=Ho(),Wo=new Set;function Go(){Uo=Ho();for(let e of Wo)e(Uo)}function Ko(){let[e,t]=A(Uo),n=N(()=>e());return oe(()=>{Wo.size===0&&window.addEventListener(`languagechange`,Go),Wo.add(t),F(()=>{Wo.delete(t),Wo.size===0&&window.removeEventListener(`languagechange`,Go)})}),{locale:()=>n().locale,direction:()=>n().direction}}var qo=L();function Jo(){let e=Ko();return R(qo)||e}var Yo=new Map;function Xo(e){let{locale:t}=Jo(),n=N(()=>t()+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():``));return N(()=>{let r=n(),i;return Yo.has(r)&&(i=Yo.get(r)),i||(i=new Intl.Collator(t(),e),Yo.set(r,i)),i})}var Zo=[`top`,`right`,`bottom`,`left`],Qo=Math.min,$o=Math.max,es=Math.round,ts=Math.floor,ns=e=>({x:e,y:e}),rs={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function is(e,t,n){return $o(e,Qo(t,n))}function as(e,t){return typeof e==`function`?e(t):e}function os(e){return e.split(`-`)[0]}function ss(e){return e.split(`-`)[1]}function cs(e){return e===`x`?`y`:`x`}function ls(e){return e===`y`?`height`:`width`}function us(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ds(e){return cs(us(e))}function fs(e,t,n){n===void 0&&(n=!1);let r=ss(e),i=ds(e),a=ls(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=xs(o)),[o,xs(o)]}function ps(e){let t=xs(e);return[ms(e),t,ms(t)]}function ms(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var hs=[`left`,`right`],gs=[`right`,`left`],_s=[`top`,`bottom`],vs=[`bottom`,`top`];function ys(e,t,n){switch(e){case`top`:case`bottom`:return n?t?gs:hs:t?hs:gs;case`left`:case`right`:return t?_s:vs;default:return[]}}function bs(e,t,n,r){let i=ss(e),a=ys(os(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ms)))),a}function xs(e){let t=os(e);return rs[t]+e.slice(t.length)}function Ss(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Cs(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ss(e)}function ws(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 Ts(e,t,n){let{reference:r,floating:i}=e,a=us(t),o=ds(t),s=ls(o),c=os(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}}let m=ss(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Es(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}=as(t,e),p=Cs(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=ws(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=ws(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 Ds=50,Os=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Es},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ts(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<Ds&&(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}=Ts(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},ks=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}=as(e,t)||{};if(l==null)return{};let d=Cs(u),f={x:n,y:r},p=ds(i),m=ls(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Qo(d[_],T),D=Qo(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,ee=is(E,k,O),A=!c.arrow&&ss(i)!=null&&k!==ee&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,te=A?k<E?k-E:k-O:0;return{[p]:f[p]+te,data:{[p]:ee,centerOffset:k-ee-te,...A&&{alignmentOffset:te}},reset:A}}}),As=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}=as(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=os(r),_=us(o),v=os(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[xs(o)]:ps(o)),x=p!==`none`;!d&&x&&b.push(...bs(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=fs(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`||_===us(t)||T.every(e=>us(e.placement)!==_||e.overflows[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=us(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}if(r!==n)return{reset:{placement:n}}}return{}}}};function js(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ms(e){return Zo.some(t=>e[t]>=0)}var Ns=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=as(e,t);switch(i){case`referenceHidden`:{let e=js(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ms(e)}}}case`escaped`:{let e=js(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ms(e)}}}default:return{}}}}},Ps=new Set([`left`,`top`]);async function Fs(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=os(n),s=ss(n),c=us(n)===`y`,l=Ps.has(o)?-1:1,u=a&&c?-1:1,d=as(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 Is=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 Fs(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}}}}},Ls=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}=as(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=us(i),p=cs(f),m=u[p],h=u[f],g=(e,t)=>is(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Rs=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=as(e,t),c=await i.detectOverflow(t,s),l=os(n),u=ss(n),d=us(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Qo(p-c[m],g),y=Qo(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*$o(c.left,c.right):S=p-2*$o(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function zs(){return typeof window<`u`}function Bs(e){return Us(e)?(e.nodeName||``).toLowerCase():`#document`}function Vs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hs(e){return((Us(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Us(e){return zs()?e instanceof Node||e instanceof Vs(e).Node:!1}function Ws(e){return zs()?e instanceof Element||e instanceof Vs(e).Element:!1}function Gs(e){return zs()?e instanceof HTMLElement||e instanceof Vs(e).HTMLElement:!1}function Ks(e){return!zs()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Vs(e).ShadowRoot}function qs(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ic(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Js(e){return/^(table|td|th)$/.test(Bs(e))}function Ys(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Xs=/transform|translate|scale|rotate|perspective|filter/,Zs=/paint|layout|strict|content/,Qs=e=>!!e&&e!==`none`,$s;function ec(e){let t=Ws(e)?ic(e):e;return Qs(t.transform)||Qs(t.translate)||Qs(t.scale)||Qs(t.rotate)||Qs(t.perspective)||!nc()&&(Qs(t.backdropFilter)||Qs(t.filter))||Xs.test(t.willChange||``)||Zs.test(t.contain||``)}function tc(e){let t=oc(e);for(;Gs(t)&&!rc(t);){if(ec(t))return t;if(Ys(t))return null;t=oc(t)}return null}function nc(){return $s??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),$s}function rc(e){return/^(html|body|#document)$/.test(Bs(e))}function ic(e){return Vs(e).getComputedStyle(e)}function ac(e){return Ws(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function oc(e){if(Bs(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ks(e)&&e.host||Hs(e);return Ks(t)?t.host:t}function sc(e){let t=oc(e);return rc(t)?(e.ownerDocument||e).body:Gs(t)&&qs(t)?t:sc(t)}function cc(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=sc(e),i=r===e.ownerDocument?.body,a=Vs(r);if(i){let e=lc(a);return t.concat(a,a.visualViewport||[],qs(r)?r:[],e&&n?cc(e):[])}return t.concat(r,cc(r,[],n))}function lc(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uc(e){let t=ic(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Gs(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=es(n)!==a||es(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function dc(e){return Ws(e)?e:e.contextElement}function fc(e){let t=dc(e);if(!Gs(t))return ns(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=uc(t),o=(a?es(n.width):n.width)/r,s=(a?es(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var pc=ns(0);function mc(e){let t=Vs(e);return!nc()||!t.visualViewport?pc:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hc(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Vs(e)}function gc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=dc(e),o=ns(1);t&&(r?Ws(r)&&(o=fc(r)):o=fc(e));let s=hc(a,n,r)?mc(a):ns(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&&r){let e=Vs(a),t=Ws(r)?Vs(r):r,n=e,i=lc(n);for(;i&&t!==n;){let e=fc(i),t=i.getBoundingClientRect(),r=ic(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=Vs(i),i=lc(n)}}return ws({width:u,height:d,x:c,y:l})}function _c(e,t){let n=ac(e).scrollLeft;return t?t.left+n:gc(Hs(e)).left+n}function vc(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-_c(e,n),y:n.top+t.scrollTop}}function yc(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Hs(r),s=t?Ys(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ns(1),u=ns(0),d=Gs(r);if((d||!a)&&((Bs(r)!==`body`||qs(o))&&(c=ac(r)),d)){let e=gc(r);l=fc(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?vc(o,c):ns(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 bc(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function xc(e){let t=ac(e),n=e.ownerDocument.body,r=$o(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=$o(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+_c(e),o=-t.scrollTop;return ic(n).direction===`rtl`&&(a+=$o(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Sc=25;function Cc(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Vs(e),a=Hs(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!nc()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(_c(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Sc&&(s-=o)}return{width:s,height:c,x:l,y:u}}function wc(e,t){let n=gc(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=fc(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Tc(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Cc(e,n,t);else if(t===`document`)r=xc(Hs(e));else if(Ws(t))r=wc(t,n);else{let n=mc(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return ws(r)}function Ec(e,t){let n=t.get(e);if(n)return n;let r=cc(e,[],!1).filter(e=>Ws(e)&&Bs(e)!==`body`),i=null,a=ic(e).position===`fixed`,o=a?oc(e):e;for(;Ws(o)&&!rc(o);){let e=ic(o),t=ec(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=oc(o)}return t.set(e,r),r}function Dc(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ys(t)?[]:Ec(t,this._c):[].concat(n),r],o=Tc(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=Tc(t,a[e],i);s=$o(n.top,s),c=Qo(n.right,c),l=Qo(n.bottom,l),u=$o(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Oc(e){let{width:t,height:n}=uc(e);return{width:t,height:n}}function kc(e,t,n){let r=Gs(t),i=Hs(t),a=n===`fixed`,o=gc(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ns(0);if((r||!a)&&((Bs(t)!==`body`||qs(i))&&(s=ac(t)),r)){let e=gc(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=_c(i));let l=i&&!r&&!a?vc(i,s):ns(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ac(e){return ic(e).position===`static`}function jc(e,t){if(!Gs(e)||ic(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Hs(e)===n&&(n=n.ownerDocument.body),n}function Mc(e,t){let n=Vs(e);if(Ys(e))return n;if(!Gs(e)){let t=oc(e);for(;t&&!rc(t);){if(Ws(t)&&!Ac(t))return t;t=oc(t)}return n}let r=jc(e,t);for(;r&&Js(r)&&Ac(r);)r=jc(r,t);return r&&rc(r)&&Ac(r)&&!ec(r)?n:r||tc(e)||n}var Nc=async function(e){let t=this.getOffsetParent||Mc,n=this.getDimensions,r=await n(e.floating);return{reference:kc(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pc(e){return ic(e).direction===`rtl`}var Fc={convertOffsetParentRelativeRectToViewportRelativeRect:yc,getDocumentElement:Hs,getClippingRect:Dc,getOffsetParent:Mc,getElementRects:Nc,getClientRects:bc,getDimensions:Oc,getScale:fc,isElement:Ws,isRTL:Pc};function Ic(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lc(e,t,n){let r=null,i,a=Hs(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=ts(d),h=ts(a.clientWidth-(u+f)),g=ts(a.clientHeight-(d+p)),_=ts(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:$o(0,Qo(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ic(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Vs(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Rc(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=dc(e),u=i||a?[...l?cc(l):[],...t?cc(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Lc(l,n,a):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?gc(e):null;c&&g();function g(){let t=gc(e);h&&!Ic(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 zc=Is,Bc=Ls,Vc=As,Hc=Rs,Uc=Ns,Wc=ks,Gc=(e,t,n)=>{let r=new Map,i=n??{},a={...Fc,...i.platform,_c:r};return Os(e,t,{...i,platform:a})},Kc=G(`<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>`),qc=L();function Jc(){let e=R(qc);if(e===void 0)throw Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var Yc=30,Xc=Yc/2,Zc={top:180,right:-90,bottom:0,left:90};function Qc(e){let t=Jc(),[n,r]=V(Vi({size:Yc},e),[`ref`,`style`,`size`]),i=()=>t.currentPlacement().split(`-`)[0],a=$c(t.contentRef),o=()=>a()?.getPropertyValue(`background-color`)||`none`,s=()=>a()?.getPropertyValue(`border-${i()}-color`)||`none`,c=()=>a()?.getPropertyValue(`border-${i()}-width`)||`0px`,l=()=>Number.parseInt(c())*2*(Yc/n.size),u=()=>`rotate(${Zc[i()]} ${Xc} ${Xc}) translate(0 2)`;return z(Ta,B({as:`div`,ref(e){var r=Yr(t.setArrowRef,n.ref);typeof r==`function`&&r(e)},"aria-hidden":`true`,get style(){return Jr({position:`absolute`,"font-size":`${n.size}px`,width:`1em`,height:`1em`,"pointer-events":`none`,fill:o(),stroke:s(),"stroke-width":l()},n.style)}},r,{get children(){var e=Kc(),t=e.firstChild;return t.firstChild.nextSibling,j(()=>K(t,`transform`,u())),e}}))}function $c(e){let[t,n]=A();return M(()=>{let t=e();t&&n(ii(t).getComputedStyle(t))}),t}function el(e){let t=Jc(),[n,r]=V(e,[`ref`,`style`]);return z(Ta,B({as:`div`,ref(e){var r=Yr(t.setPositionerRef,n.ref);typeof r==`function`&&r(e)},"data-popper-positioner":``,get style(){return Jr({position:`absolute`,top:0,left:0,"min-width":`max-content`},n.style)}},r))}function tl(e){let{x:t=0,y:n=0,width:r=0,height:i=0}=e??{};if(typeof DOMRect==`function`)return new DOMRect(t,n,r,i);let a={x:t,y:n,width:r,height:i,top:n,right:t+r,bottom:n+i,left:t};return{...a,toJSON:()=>a}}function nl(e,t){return{contextElement:e,getBoundingClientRect:()=>{let n=t(e);return n?tl(n):e?e.getBoundingClientRect():tl()}}}function rl(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var il={top:`bottom`,right:`left`,bottom:`top`,left:`right`};function al(e,t){let[n,r]=e.split(`-`),i=il[n];return r?n===`left`||n===`right`?`${i} ${r===`start`?`top`:`bottom`}`:r===`start`?`${i} ${t===`rtl`?`right`:`left`}`:`${i} ${t===`rtl`?`left`:`right`}`:`${i} center`}function ol(e){let t=Vi({getAnchorRect:e=>e?.getBoundingClientRect(),placement:`bottom`,gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=A(),[i,a]=A(),[o,s]=A(t.placement),c=()=>nl(t.anchorRef?.(),t.getAnchorRect),{direction:l}=Jo();async function u(){let e=c(),r=n(),a=i();if(!e||!r)return;let o=(a?.clientHeight||0)/2,u=typeof t.gutter==`number`?t.gutter+o:t.gutter??o;r.style.setProperty(`--kb-popper-content-overflow-padding`,`${t.overflowPadding}px`),e.getBoundingClientRect();let d=[zc(({placement:e})=>{let n=!!e.split(`-`)[1];return{mainAxis:u,crossAxis:n?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){let e=typeof t.flip==`string`?t.flip.split(` `):void 0;if(e!==void 0&&!e.every(rl))throw Error("`flip` expects a spaced-delimited list of placements");d.push(Vc({padding:t.overflowPadding,fallbackPlacements:e}))}(t.slide||t.overlap)&&d.push(Bc({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),d.push(Hc({padding:t.overflowPadding,apply({availableWidth:e,availableHeight:n,rects:i}){let a=Math.round(i.reference.width);e=Math.floor(e),n=Math.floor(n),r.style.setProperty(`--kb-popper-anchor-width`,`${a}px`),r.style.setProperty(`--kb-popper-content-available-width`,`${e}px`),r.style.setProperty(`--kb-popper-content-available-height`,`${n}px`),t.sameWidth&&(r.style.width=`${a}px`),t.fitViewport&&(r.style.maxWidth=`${e}px`,r.style.maxHeight=`${n}px`)}})),t.hideWhenDetached&&d.push(Uc({padding:t.detachedPadding})),a&&d.push(Wc({element:a,padding:t.arrowPadding}));let f=await Gc(e,r,{placement:t.placement,strategy:`absolute`,middleware:d,platform:{...Fc,isRTL:()=>l()===`rtl`}});if(s(f.placement),t.onCurrentPlacementChange?.(f.placement),!r)return;r.style.setProperty(`--kb-popper-content-transform-origin`,al(f.placement,l()));let p=Math.round(f.x),m=Math.round(f.y),h;if(t.hideWhenDetached&&(h=f.middlewareData.hide?.referenceHidden?`hidden`:`visible`),Object.assign(r.style,{top:`0`,left:`0`,transform:`translate3d(${p}px, ${m}px, 0)`,visibility:h}),a&&f.middlewareData.arrow){let{x:e,y:t}=f.middlewareData.arrow,n=f.placement.split(`-`)[0];Object.assign(a.style,{left:e==null?``:`${e}px`,top:t==null?``:`${t}px`,[n]:`100%`})}}M(()=>{let e=c(),t=n();e&&t&&F(Rc(e,t,u,{elementResize:typeof ResizeObserver==`function`}))}),M(()=>{let e=n(),r=t.contentRef?.();e&&r&&queueMicrotask(()=>{e.style.zIndex=getComputedStyle(r).zIndex})});let d={currentPlacement:o,contentRef:()=>t.contentRef?.(),setPositionerRef:r,setArrowRef:a};return z(qc.Provider,{value:d,get children(){return t.children}})}var sl=Object.assign(ol,{Arrow:Qc,Context:qc,usePopperContext:Jc,Positioner:el});Ia({},{Arrow:()=>Qc,Content:()=>ul,Portal:()=>dl,Root:()=>yl,Tooltip:()=>xl,Trigger:()=>bl,useTooltipContext:()=>ll});var cl=L();function ll(){let e=R(cl);if(e===void 0)throw Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function ul(e){let t=ll(),[n,r]=V(Vi({id:t.generateId(`content`)},e),[`ref`,`style`]);return M(()=>F(t.registerContentId(r.id))),z(U,{get when(){return t.contentPresent()},get children(){return z(sl.Positioner,{get children(){return z(Oa,B({ref(e){var r=Yr(e=>{t.setContentRef(e)},n.ref);typeof r==`function`&&r(e)},role:`tooltip`,disableOutsidePointerEvents:!1,get style(){return Jr({"--kb-tooltip-content-transform-origin":`var(--kb-popper-content-transform-origin)`,position:`relative`},n.style)},onFocusOutside:e=>e.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),r))}})}})}function dl(e){let t=ll();return z(U,{get when(){return t.contentPresent()},get children(){return z(jt,e)}})}function fl(e,t,n){let r=e.split(`-`)[0],i=t.getBoundingClientRect(),a=n.getBoundingClientRect(),o=[],s=i.left+i.width/2,c=i.top+i.height/2;switch(r){case`top`:o.push([i.left,c]),o.push([a.left,a.bottom]),o.push([a.left,a.top]),o.push([a.right,a.top]),o.push([a.right,a.bottom]),o.push([i.right,c]);break;case`right`:o.push([s,i.top]),o.push([a.left,a.top]),o.push([a.right,a.top]),o.push([a.right,a.bottom]),o.push([a.left,a.bottom]),o.push([s,i.bottom]);break;case`bottom`:o.push([i.left,c]),o.push([a.left,a.top]),o.push([a.left,a.bottom]),o.push([a.right,a.bottom]),o.push([a.right,a.top]),o.push([i.right,c]);break;case`left`:o.push([s,i.top]),o.push([a.right,a.top]),o.push([a.left,a.top]),o.push([a.left,a.bottom]),o.push([a.right,a.bottom]),o.push([s,i.bottom])}return o}var pl={},ml=0,hl=!1,gl,_l,vl;function yl(e){let t=`tooltip-${Ue()}`,n=`${++ml}`,r=Vi({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[i,a]=V(r,[`id`,`open`,`defaultOpen`,`onOpenChange`,`disabled`,`triggerOnFocusOnly`,`openDelay`,`closeDelay`,`skipDelayDuration`,`ignoreSafeArea`,`forceMount`,`onCurrentPlacementChange`]),o,[s,c]=A(),[l,u]=A(),[d,f]=A(),[p,m]=A(a.placement),h=Ma({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:e=>i.onOpenChange?.(e)}),{present:g}=ro({show:()=>i.forceMount||h.isOpen(),element:()=>d()??null}),_=()=>{pl[n]=y},v=()=>{for(let e in pl)e!==n&&(pl[e](!0),delete pl[e])},y=(e=!1)=>{e||i.closeDelay&&i.closeDelay<=0?(window.clearTimeout(o),o=void 0,h.close()):o||=window.setTimeout(()=>{o=void 0,h.close()},i.closeDelay),window.clearTimeout(gl),gl=void 0,i.skipDelayDuration&&i.skipDelayDuration>=0&&(vl=window.setTimeout(()=>{window.clearTimeout(vl),vl=void 0},i.skipDelayDuration)),hl&&(window.clearTimeout(_l),_l=window.setTimeout(()=>{delete pl[n],_l=void 0,hl=!1},i.closeDelay))},b=()=>{clearTimeout(o),o=void 0,v(),_(),hl=!0,h.open(),window.clearTimeout(gl),gl=void 0,window.clearTimeout(_l),_l=void 0,window.clearTimeout(vl),vl=void 0},x=()=>{v(),_(),!h.isOpen()&&!gl&&!hl?gl=window.setTimeout(()=>{gl=void 0,hl=!0,b()},i.openDelay):h.isOpen()||b()},S=(e=!1)=>{!e&&i.openDelay&&i.openDelay>0&&!o&&!vl?x():b()},C=()=>{window.clearTimeout(gl),gl=void 0,hl=!1},w=()=>{window.clearTimeout(o),o=void 0},T=e=>ni(l(),e)||ni(d(),e),E=e=>{let t=l(),n=d();if(t&&n)return fl(e,t,n)},D=e=>{let t=e.target;if(T(t)){w();return}if(!i.ignoreSafeArea){let t=E(p());if(t&&Bi(zi(e),t)){w();return}}o||y()};M(()=>{if(!h.isOpen())return;let e=ai();e.addEventListener(`pointermove`,D,!0),F(()=>{e.removeEventListener(`pointermove`,D,!0)})}),M(()=>{let e=l();if(!e||!h.isOpen())return;let t=t=>{let n=t.target;ni(n,e)&&y(!0)},n=ii();n.addEventListener(`scroll`,t,{capture:!0}),F(()=>{n.removeEventListener(`scroll`,t,{capture:!0})})}),F(()=>{clearTimeout(o),pl[n]&&delete pl[n]});let O={dataset:N(()=>({"data-expanded":h.isOpen()?``:void 0,"data-closed":h.isOpen()?void 0:``})),isOpen:h.isOpen,isDisabled:()=>i.disabled??!1,triggerOnFocusOnly:()=>i.triggerOnFocusOnly??!1,contentId:s,contentPresent:g,openTooltip:S,hideTooltip:y,cancelOpening:C,generateId:ti(()=>r.id),registerContentId:Va(c),isTargetOnTooltip:T,setTriggerRef:u,setContentRef:f};return z(cl.Provider,{value:O,get children(){return z(sl,B({anchorRef:l,contentRef:d,onCurrentPlacementChange:e=>{m(e),i.onCurrentPlacementChange?.(e)}},a))}})}function bl(e){let t,n=ll(),[r,i]=V(e,[`ref`,`onPointerEnter`,`onPointerLeave`,`onPointerDown`,`onClick`,`onFocus`,`onBlur`]),a=!1,o=!1,s=!1,c=()=>{a=!1},l=()=>{!n.isOpen()&&(o||s)&&n.openTooltip(s)},u=e=>{n.isOpen()&&!o&&!s&&n.hideTooltip(e)};return F(()=>{ai(t).removeEventListener(`pointerup`,c)}),z(Ta,B({as:`button`,ref(e){var i=Yr(e=>{n.setTriggerRef(e),t=e},r.ref);typeof i==`function`&&i(e)},get"aria-describedby"(){return W(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:e=>{_i(e,r.onPointerEnter),!(e.pointerType===`touch`||n.triggerOnFocusOnly()||n.isDisabled()||e.defaultPrevented)&&(o=!0,l())},onPointerLeave:e=>{_i(e,r.onPointerLeave),e.pointerType!==`touch`&&(o=!1,s=!1,n.isOpen()?u():n.cancelOpening())},onPointerDown:e=>{_i(e,r.onPointerDown),a=!0,ai(t).addEventListener(`pointerup`,c,{once:!0})},onClick:e=>{_i(e,r.onClick),o=!1,s=!1,u(!0)},onFocus:e=>{_i(e,r.onFocus),!(n.isDisabled()||e.defaultPrevented||a)&&(s=!0,l())},onBlur:e=>{_i(e,r.onBlur);let t=e.relatedTarget;n.isTargetOnTooltip(t)||(o=!1,s=!1,u(!0))},type:`button`},()=>n.dataset(),i))}var xl=Object.assign(yl,{Arrow:Qc,Content:ul,Portal:dl,Trigger:bl});function Sl(e){let t,[n,r]=Qt({open:!1,block:!1,expand:!1}),[i,a]=V(e,[`children`,`appearance`,`class`,`contentClass`,`contentStyle`,`inactive`,`forceOpen`,`triggerTabIndex`,`ignoreSafeArea`,`value`]),o=()=>r(`open`,!1),s=()=>i.forceOpen!==void 0,c=()=>{let e=document.activeElement;return!t||!e?!1:t.contains(e)},l=(e=n.expand)=>{!e&&n.block&&(t?.matches(`:hover`)||c()||r(`block`,!1))},u=()=>{let e=!!t?.querySelector(`[aria-expanded="true"], [data-expanded]`);if(r(`expand`,e),e){r(`block`,!0),o();return}l(e)},d=()=>{r(`block`,!0),o()},f=()=>{c()||o(),l()};M(()=>{if(!t)return;P(u);let e=new MutationObserver(u);e.observe(t,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-expanded`,`data-expanded`]}),F(()=>e.disconnect())});let p=!1;return z(Ke,{get children(){return[z(qe,{get when(){return i.inactive},get children(){return i.children}}),z(qe,{when:!0,get children(){return z(yl,B({gutter:4,openDelay:400,skipDelayDuration:300},a,{closeDelay:0,get ignoreSafeArea(){return i.ignoreSafeArea??!0},get open(){return W(()=>!!s())()?i.forceOpen:n.open},onOpenChange:e=>{if(!s()&&!(n.block&&e)){if(p){p=!1;return}r(`open`,e)}},get children(){return[z(bl,{ref(e){var n=t;typeof n==`function`?n(e):t=e},as:`div`,get tabIndex(){return i.triggerTabIndex},"data-component":`tooltip-v2-trigger`,get class(){return i.class},onPointerDownCapture:d,onKeyDownCapture:e=>{(e.key===`Enter`||e.key===` `)&&d()},onPointerLeave:f,onFocusOut:()=>requestAnimationFrame(()=>l()),get children(){return i.children}}),z(dl,{get children(){return z(ul,{ref:e=>{let n=t?.closest(`[data-theme]`)?.getAttribute(`data-theme`);n&&e.setAttribute(`data-theme`,n)},"data-component":`tooltip-v2`,get"data-appearance"(){return i.appearance??`compact`},get"data-placement"(){return e.placement},get"data-force-open"(){return i.forceOpen},get class(){return i.contentClass},get style(){return i.contentStyle},onPointerDownOutside:e=>{(t===e.target||e.target instanceof Node&&t?.contains(e.target))&&(p=!0),e.preventDefault()},get children(){return i.value}})}})]}}))}})]}})}var Cl={"ui.sessionReview.title":`Session changes`,"ui.sessionReview.title.git":`Git changes`,"ui.sessionReview.title.branch":`Branch changes`,"ui.sessionReview.title.lastTurn":`Last turn changes`,"ui.sessionReview.diffStyle.unified":`Unified`,"ui.sessionReview.diffStyle.split":`Split`,"ui.sessionReview.expandAll":`Expand all`,"ui.sessionReview.collapseAll":`Collapse all`,"ui.sessionReview.change.added":`Added`,"ui.sessionReview.change.removed":`Removed`,"ui.sessionReview.change.modified":`Modified`,"ui.sessionReview.image.loading":`Loading…`,"ui.sessionReview.image.placeholder":`Image`,"ui.sessionReview.largeDiff.title":`Diff too large to render`,"ui.sessionReview.largeDiff.meta":`Limit: {{limit}} changed lines. Current: {{current}} changed lines.`,"ui.sessionReview.largeDiff.renderAnyway":`Render anyway`,"ui.sessionReviewV2.expandMode":`Expand or collapse diff`,"ui.sessionReviewV2.filterFiles":`Filter files`,"ui.sessionReviewV2.toggleSidebar":`Toggle file tree`,"ui.sessionReviewV2.showAllLines":`Show all lines`,"ui.sessionReviewV2.hideNonDiffLines":`Hide non-diff lines`,"ui.sessionReviewV2.unifiedDiff":`Unified diff`,"ui.sessionReviewV2.splitDiff":`Split diff`,"ui.sessionReviewV2.previousFile":`Previous file`,"ui.sessionReviewV2.nextFile":`Next file`,"ui.sessionReviewV2.diffView":`Diff view`,"ui.sessionReviewV2.empty.noGit.title":`No tracked changes`,"ui.sessionReviewV2.empty.noGit.description":`Track, review, and undo changes in this project`,"ui.sessionReviewV2.empty.noGit.action":`Create Git repository`,"ui.sessionReviewV2.empty.noGit.actionLoading":`Creating Git repository…`,"ui.sessionReviewV2.empty.changes.title":`No file changes yet`,"ui.sessionReviewV2.empty.changes.description":`Project changes will appear here`,"ui.sessionReview.openFile":`Open file`,"ui.sessionReview.selection.line":`line {{line}}`,"ui.sessionReview.selection.lines":`lines {{start}}-{{end}}`,"ui.fileMedia.kind.image":`image`,"ui.fileMedia.kind.audio":`audio`,"ui.fileMedia.state.removed":`Removed {{kind}} file.`,"ui.fileMedia.state.loading":`Loading {{kind}}…`,"ui.fileMedia.state.error":`Unable to load {{kind}}.`,"ui.fileMedia.state.unavailable":`{{kind}} preview unavailable.`,"ui.fileMedia.binary.title":`Binary file`,"ui.fileMedia.binary.description.path":`{{path}} is binary.`,"ui.fileMedia.binary.description.default":`Binary content`,"ui.lineComment.label.prefix":`Comment on `,"ui.lineComment.label.suffix":``,"ui.lineComment.editorLabel.prefix":`Commenting on `,"ui.lineComment.editorLabel.suffix":``,"ui.lineComment.placeholder":`Add comment`,"ui.lineComment.contextPlaceholder":`Add context for this change`,"ui.lineComment.submit":`Comment`,"ui.lineComment.cancel":`Cancel`,"ui.sessionTurn.steps.show":`Show steps`,"ui.sessionTurn.steps.hide":`Hide steps`,"ui.sessionTurn.summary.response":`Response`,"ui.sessionTurn.diff.showMore":`Show more changes ({{count}})`,"ui.sessionTurn.diffs.changed.one":`{{count}} Changed file`,"ui.sessionTurn.diffs.changed.other":`{{count}} Changed files`,"ui.sessionTurn.diffs.showAll":`Show all`,"ui.sessionTurn.diffs.showLess":`Show less`,"ui.sessionTurn.diffs.more":`+{{count}} more files`,"ui.sessionTurn.retry.retrying":`retrying`,"ui.sessionTurn.retry.inSeconds":`in {{seconds}}s`,"ui.sessionTurn.retry.attempt":`attempt #{{attempt}}`,"ui.sessionTurn.retry.attemptLine":`{{line}} - attempt #{{attempt}}`,"ui.sessionTurn.retry.attemptLabel":`Attempt {{attempt}}`,"ui.sessionTurn.retry.attemptRetrying":`Attempt {{attempt}} - {{line}}`,"ui.sessionTurn.retry.geminiHot":`gemini is way too hot right now`,"ui.sessionTurn.error.freeUsageExceeded":`Free usage exceeded`,"ui.sessionTurn.error.addCredits":`Add credits`,"dialog.usageExceeded.freeTier.title":`Free limit reached`,"dialog.usageExceeded.freeTier.description":`Subscribe to OpenCode Go for reliable access to the best open-source models, starting at $5/month.`,"dialog.usageExceeded.freeTier.actionLabel":`Subscribe`,"dialog.usageExceeded.accountRateLimit.title":`Go limit reached`,"dialog.usageExceeded.accountRateLimit.description":`Usage limit reached. To continue using this model now, enable usage from your available balance`,"dialog.usageExceeded.accountRateLimit.actionLabel":`Open settings`,"ui.sessionTurn.status.delegating":`Delegating work`,"ui.sessionTurn.status.planning":`Planning next steps`,"ui.sessionTurn.status.gatheringContext":`Exploring`,"ui.sessionTurn.status.gatheredContext":`Explored`,"ui.sessionTurn.status.searchingCodebase":`Searching the codebase`,"ui.sessionTurn.status.searchingWeb":`Searching the web`,"ui.sessionTurn.status.makingEdits":`Making edits`,"ui.sessionTurn.status.runningCommands":`Running commands`,"ui.sessionTurn.status.thinking":`Thinking`,"ui.sessionTurn.status.thinkingWithTopic":`Thinking - {{topic}}`,"ui.sessionTurn.status.gatheringThoughts":`Gathering thoughts`,"ui.sessionTurn.status.consideringNextSteps":`Considering next steps`,"ui.messagePart.diagnostic.error":`Error`,"ui.messagePart.title.edit":`Edit`,"ui.messagePart.title.write":`Write`,"ui.messagePart.option.typeOwnAnswer":`Type your own answer`,"ui.messagePart.review.title":`Review your answers`,"ui.messagePart.questions.dismissed":`Questions dismissed`,"ui.messagePart.compaction":`Session compacted`,"ui.messagePart.compaction.started":`Session compaction started`,"ui.messagePart.compaction.running":`Compacting`,"ui.messagePart.compaction.failed":`Session compaction failed`,"ui.messagePart.compaction.cancelled":`Session compaction cancelled`,"ui.messagePart.compaction.interrupted":`Session compaction interrupted`,"ui.messagePart.providerCompaction":`Session compacted by provider`,"ui.messagePart.compaction.usage":`{{input}} in · {{output}} out`,"ui.messagePart.context.details":`Details`,"ui.messagePart.context.read.one":`{{count}} read`,"ui.messagePart.context.read.other":`{{count}} reads`,"ui.messagePart.context.search.one":`{{count}} search`,"ui.messagePart.context.search.other":`{{count}} searches`,"ui.messagePart.context.list.one":`{{count}} list`,"ui.messagePart.context.list.other":`{{count}} lists`,"ui.messagePart.context.notice.one":`{{count}} Notice`,"ui.messagePart.context.notice.other":`{{count}} Notices`,"ui.messagePart.context.thought.one":`Thought`,"ui.messagePart.context.thought.other":`Thoughts`,"ui.messagePart.context.match.one":`({{count}} match)`,"ui.messagePart.context.match.other":`({{count}} matches)`,"ui.messagePart.tools.used.one":`Used {{count}} {{tools}}`,"ui.messagePart.tools.used.other":`Used {{count}} {{tools}}`,"ui.list.loading":`Loading`,"ui.list.empty":`No results`,"ui.list.clearFilter":`Clear filter`,"ui.list.emptyWithFilter.prefix":`No results for`,"ui.list.emptyWithFilter.suffix":``,"ui.fileSearch.placeholder":`Find`,"ui.fileSearch.previousMatch":`Previous match`,"ui.fileSearch.nextMatch":`Next match`,"ui.fileSearch.close":`Close search`,"ui.messageNav.newMessage":`New message`,"ui.promptInput.noMatchingItems":`No matching items`,"ui.promptInput.commands":`Commands`,"ui.promptInput.dropFiles":`Drop files to add`,"ui.promptInput.dropFiles.image":`Drop images or files to add`,"ui.promptInput.dropFiles.pdf":`Drop PDFs or files to add`,"ui.promptInput.dropFiles.imagePdf":`Drop images, PDFs, or files to add`,"ui.promptInput.removeAttachment":`Remove attachment`,"ui.promptInput.label":`Prompt`,"ui.promptInput.placeholder.shell":`Enter shell command…`,"ui.promptInput.placeholder.normal":`Ask anything, {{slash}} for commands, {{at}} for context…`,"ui.promptInput.placeholder.followUp":`Add follow-up, {{slash}} for commands, {{at}} for context…`,"ui.promptInput.add":`Add images and files`,"ui.promptInput.attachments":`Images and files`,"ui.promptInput.context":`Context`,"ui.promptInput.shell":`Shell command`,"ui.promptInput.chooseAgent":`Choose agent`,"ui.promptInput.chooseModel":`Choose model`,"ui.promptInput.chooseVariant":`Choose model variant`,"ui.promptInput.send":`Send`,"ui.promptInput.stop":`Stop`,"ui.promptInput.exitShell":`Exit`,"ui.promptInput.steer":`Steer`,"ui.promptInput.queue":`Queue`,"ui.promptInput.steerHint":`Send without interrupting`,"ui.tabs.close":`Close tab`,"ui.textField.copyToClipboard":`Copy to clipboard`,"ui.textField.copyLink":`Copy link`,"ui.textField.copied":`Copied`,"ui.imagePreview.alt":`Image preview`,"ui.scrollView.ariaLabel":`scrollable content`,"ui.tool.read":`Read`,"ui.tool.loaded":`Loaded`,"ui.tool.loadedFile":`Loaded {{path}}`,"ui.tool.loadedSkill":`Loaded {{name}} skill`,"ui.tool.loadedSkills.one":`Loaded {{name}} skill`,"ui.tool.loadedSkills.other":`Loaded {{name}} skills`,"ui.tool.list":`List`,"ui.tool.glob":`Glob`,"ui.tool.grep":`Grep`,"ui.tool.task":`Task`,"ui.tool.browser":`Browser`,"ui.tool.webfetch":`Webfetch`,"ui.tool.websearch":`Web Search`,"ui.tool.websearch.provider":`{{provider}} Web Search`,"ui.tool.shell":`Shell`,"ui.tool.shell.writingCommand":`Writing command…`,"ui.tool.shell.exit":`Command exited with code {{code}}`,"ui.tool.shell.timeout":`Command timed out`,"ui.tool.shell.cancelled":`Command cancelled`,"ui.tool.execute":`Execute`,"ui.tool.patch":`Patch`,"ui.tool.questions":`Questions`,"ui.tool.questions.numbered":`Questions {{number}}`,"ui.tool.agent":`{{type}} Agent`,"ui.tool.agent.default":`Agent`,"ui.tool.agent.delegating":`Delegating agent…`,"ui.tool.skill":`Skill`,"ui.basicTool.called":"Called `{{tool}}`","ui.toolErrorCard.failed":`Failed`,"ui.toolErrorCard.copyError":`Copy error`,"ui.common.file.one":`file`,"ui.common.file.other":`files`,"ui.common.question.one":`question`,"ui.common.question.other":`questions`,"ui.common.add":`Add`,"ui.common.clear":`Clear`,"ui.common.file":`File`,"ui.common.back":`Back`,"ui.common.cancel":`Cancel`,"ui.common.confirm":`Confirm`,"ui.common.dismiss":`Dismiss`,"ui.common.close":`Close`,"ui.common.next":`Next`,"ui.common.submit":`Submit`,"ui.common.showMore":`Show more`,"ui.common.moreCount.one":`+{{count}} more`,"ui.common.moreCount.other":`+{{count}} more`,"ui.permission.deny":`Deny`,"ui.permission.allowAlways":`Allow always`,"ui.permission.allowOnce":`Allow once`,"ui.message.expand":`Expand message`,"ui.message.collapse":`Collapse message`,"ui.message.copy":`Copy`,"ui.message.copyMessage":`Copy message`,"ui.message.forkMessage":`Fork to new session`,"ui.message.revertMessage":`Revert message`,"ui.message.copyResponse":`Copy response`,"ui.message.copied":`Copied`,"ui.message.thought":`Thought`,"ui.message.duration.seconds":`{{count}}s`,"ui.message.duration.minutesSeconds":`{{minutes}}m {{seconds}}s`,"ui.message.interrupted":`Interrupted`,"ui.sessionTimeline.notice.model":`Model`,"ui.sessionTimeline.notice.modelSwitched":`Switched to {{model}}`,"ui.sessionTimeline.notice.agentChanged":`Agent changed`,"ui.sessionTimeline.notice.movedTo":`Moved to`,"ui.sessionTimeline.notice.movedTooltip":`Session working directory changed`,"ui.sessionTimeline.notice.failed":`{{actor}} failed`,"ui.sessionTimeline.notice.cancelled":`{{actor}} cancelled`,"ui.sessionTimeline.notice.finished":`{{actor}} finished`,"ui.sessionTimeline.notice.instructionsUpdated":`Instructions updated`,"ui.message.queued":`Queued`,"ui.message.attachment.alt":`attachment`,"ui.patch.action.deleted":`Deleted`,"ui.patch.action.created":`Created`,"ui.patch.action.moved":`Moved`,"ui.patch.action.patched":`Patched`,"ui.question.subtitle.answered":`{{count}} answered`,"ui.question.answer.none":`(no answer)`,"ui.question.review.notAnswered":`(not answered)`,"ui.question.multiHint":`Select all answers that apply`,"ui.question.singleHint":`Select one answer`,"ui.question.custom.placeholder":`Type your answer…`},wl=new Map;function Tl(e,t){let n=wl.get(e);if(n)return n.select(t);let r=new Intl.PluralRules(e);return wl.size>=32&&wl.delete(wl.keys().next().value),wl.set(e,r),r.select(t)}function El(e,t){return`${e}.${t}`}function Dl(e,t){return t?e.replace(/{{\s*([^}]+?)\s*}}/g,(e,n)=>{let r=t[String(n)];return r===void 0?``:String(r)}):e}var Ol={locale:()=>`en`,t:(e,t)=>Dl(Cl[e]??String(e),t),plural:(e,t,n)=>Ol.pluralForm(e,Tl(Ol.locale(),t),{...n,count:t}),pluralForm:(e,t,n)=>{let r=Cl;return Dl(r[El(e,t)]??r[`${e}.other`]??`${e}.other`,n)}},kl=L(Ol);function Al(){return R(kl)}var jl=G(`<span data-slot=text-input-v2-leading-icon>`),Ml=G(`<button type=button data-slot=text-input-v2-icon-button>`),Nl=G(`<div data-component=text-input-v2><div data-slot=text-input-v2-value><input>`);function Pl(e){let t=Al(),[n,r]=V(e,[`class`,`classList`,`leadingIcon`,`showCopyButton`,`showClearButton`,`clearIcon`,`copyLabel`,`clearLabel`,`onCopyClick`,`onClearClick`,`numeric`,`invalid`,`appearance`,`disabled`]);return(()=>{var e=Nl(),i=e.firstChild,a=i.firstChild;return q(i,z(U,{get when(){return n.leadingIcon},get children(){var e=jl();return q(e,()=>n.leadingIcon),e}}),a),ht(a,B(r,{get type(){return r.type??`text`},get disabled(){return n.disabled},get"aria-invalid"(){return n.invalid?!0:void 0},"data-slot":`text-input-v2-input`}),!1,!1),q(e,z(U,{get when(){return n.showClearButton||n.showCopyButton},get children(){var e=Ml();return e.$$click=e=>{if(n.showClearButton){n.onClearClick?.(e);return}n.onCopyClick?.(e)},e.$$mousedown=e=>{n.showClearButton&&e.preventDefault()},q(e,z(No,{get name(){return W(()=>!!n.showClearButton)()?n.clearIcon??`xmark-small`:`copy`}})),j(r=>{var i=n.showClearButton?`clear`:`copy`,a=n.showClearButton?n.clearLabel??t.t(`ui.common.clear`):n.copyLabel??t.t(`ui.message.copy`),o=n.disabled;return i!==r.e&&K(e,`data-variant`,r.e=i),a!==r.t&&K(e,`aria-label`,r.t=a),o!==r.a&&(e.disabled=r.a=o),r},{e:void 0,t:void 0,a:void 0}),e}}),null),j(t=>{var r=n.disabled?``:void 0,i=n.invalid?``:void 0,a=n.numeric?``:void 0,o=n.appearance??`base`,s=n.leadingIcon?``:void 0,c={...n.classList,[n.class??``]:!!n.class};return r!==t.e&&K(e,`data-disabled`,t.e=r),i!==t.t&&K(e,`data-invalid`,t.t=i),a!==t.a&&K(e,`data-numeric`,t.a=a),o!==t.o&&K(e,`data-appearance`,t.o=o),s!==t.i&&K(e,`data-leading-icon`,t.i=s),t.n=ft(e,c,t.n),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),e})()}st([`mousedown`,`click`]);var Fl=class{collection;direction;orientation;constructor(e,t,n){this.collection=e,this.direction=t,this.orientation=n}flipDirection(){return this.direction()===`rtl`&&this.orientation()===`horizontal`}getKeyLeftOf(e){if(this.flipDirection())return this.getNextKey(e);if(this.orientation()===`horizontal`)return this.getPreviousKey(e)}getKeyRightOf(e){if(this.flipDirection())return this.getPreviousKey(e);if(this.orientation()===`horizontal`)return this.getNextKey(e)}getKeyAbove(e){if(this.orientation()===`vertical`)return this.getPreviousKey(e)}getKeyBelow(e){if(this.orientation()===`vertical`)return this.getNextKey(e)}getFirstKey(){let e=this.collection().getFirstKey();if(e!=null)return this.collection().getItem(e)?.disabled&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection().getLastKey();if(e!=null)return this.collection().getItem(e)?.disabled&&(e=this.getPreviousKey(e)),e}getNextKey(e){let t=e,n;do if(t=this.collection().getKeyAfter(t)??this.collection().getFirstKey(),t==null||(n=this.collection().getItem(t),n==null))return;while(n.disabled);return t}getPreviousKey(e){let t=e,n;do if(t=this.collection().getKeyBefore(t)??this.collection().getLastKey(),t==null||(n=this.collection().getItem(t),n==null))return;while(n.disabled);return t}};function Il(e){let t=e.startIndex??0,n=e.startLevel??0,r=[],i=t=>{if(t==null)return``;let n=e.getKey??`key`,r=$r(n)?t[n]:n(t);return r==null?``:String(r)},a=t=>{if(t==null)return``;let n=e.getTextValue??`textValue`,r=$r(n)?t[n]:n(t);return r==null?``:String(r)},o=t=>{if(t==null)return!1;let n=e.getDisabled??`disabled`;return($r(n)?t[n]:n(t))??!1},s=t=>{if(t!=null)return $r(e.getSectionChildren)?t[e.getSectionChildren]:e.getSectionChildren?.(t)};for(let c of e.dataSource){if($r(c)||Qr(c)){r.push({type:`item`,rawValue:c,key:String(c),textValue:String(c),disabled:o(c),level:n,index:t}),t++;continue}if(s(c)!=null){r.push({type:`section`,rawValue:c,key:``,textValue:``,disabled:!1,level:n,index:t}),t++;let i=s(c)??[];if(i.length>0){let a=Il({dataSource:i,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...a),t+=a.length}}else r.push({type:`item`,rawValue:c,key:i(c),textValue:a(c),disabled:o(c),level:n,index:t}),t++}return r}function Ll(e,t=[]){return N(()=>{let n=Il({dataSource:J(e.dataSource),getKey:J(e.getKey),getTextValue:J(e.getTextValue),getDisabled:J(e.getDisabled),getSectionChildren:J(e.getSectionChildren)});for(let e=0;e<t.length;e++)t[e]();return e.factory(n)})}var Rl=class e extends Set{anchorKey;currentKey;constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}};function zl(e){let[t,n]=ka(e);return[()=>t()??new Rl,n]}function Bl(e){return mi()?e.altKey:e.ctrlKey}function Vl(e){return ui()?e.metaKey:e.ctrlKey}function Hl(e){return new Rl(e)}function Ul(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Wl(e){let t=Vi({selectionMode:`none`,selectionBehavior:`toggle`},e),[n,r]=A(!1),[i,a]=A(),[o,s]=zl({value:N(()=>{let e=J(t.selectedKeys);return e==null?e:Hl(e)}),defaultValue:N(()=>{let e=J(t.defaultSelectedKeys);return e==null?new Rl:Hl(e)}),onChange:e=>t.onSelectionChange?.(e)}),[c,l]=A(J(t.selectionBehavior));return M(()=>{let e=o();J(t.selectionBehavior)===`replace`&&c()===`toggle`&&typeof e==`object`&&e.size===0&&l(`replace`)}),M(()=>{l(J(t.selectionBehavior)??`toggle`)}),{selectionMode:()=>J(t.selectionMode),disallowEmptySelection:()=>J(t.disallowEmptySelection)??!1,selectionBehavior:c,setSelectionBehavior:l,isFocused:n,setFocused:r,focusedKey:i,setFocusedKey:a,selectedKeys:o,setSelectedKeys:e=>{(J(t.allowDuplicateSelectionEvents)||!Ul(e,o()))&&s(e)}}}function Gl(e){let[t,n]=A(``),[r,i]=A(-1);return{typeSelectHandlers:{onKeyDown:a=>{if(J(e.isDisabled))return;let o=J(e.keyboardDelegate),s=J(e.selectionManager);if(!o.getKeyForSearch)return;let c=Kl(a.key);if(!c||a.ctrlKey||a.metaKey)return;c===` `&&t().trim().length>0&&(a.preventDefault(),a.stopPropagation());let l=n(e=>e+c),u=o.getKeyForSearch(l,s.focusedKey())??o.getKeyForSearch(l);u==null&&ql(l)&&(l=l[0],u=o.getKeyForSearch(l,s.focusedKey())??o.getKeyForSearch(l)),u!=null&&(s.setFocusedKey(u),e.onTypeSelect?.(u)),clearTimeout(r()),i(window.setTimeout(()=>n(``),500))}}}}function Kl(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function ql(e){return e.split(``).every(t=>t===e[0])}function Jl(e,t,n){let r=B({selectOnFocus:()=>J(e.selectionManager).selectionBehavior()===`replace`},e),i=()=>n?.()??t(),{direction:a}=Jo(),o={top:0,left:0};pn(()=>J(r.isVirtualized)?void 0:i(),`scroll`,()=>{let e=i();e&&(o={top:e.scrollTop,left:e.scrollLeft})});let{typeSelectHandlers:s}=Gl({isDisabled:()=>J(r.disallowTypeAhead),keyboardDelegate:()=>J(r.keyboardDelegate),selectionManager:()=>J(r.selectionManager)}),c=()=>J(r.orientation)??`vertical`,l=e=>{_i(e,s.onKeyDown),e.altKey&&e.key===`Tab`&&e.preventDefault();let n=t();if(!n?.contains(e.target))return;let i=J(r.selectionManager),o=J(r.selectOnFocus),l=t=>{t!=null&&(i.setFocusedKey(t),e.shiftKey&&i.selectionMode()===`multiple`?i.extendSelection(t):o&&!Bl(e)&&i.replaceSelection(t))},u=J(r.keyboardDelegate),d=J(r.shouldFocusWrap),f=i.focusedKey();switch(e.key){case c()===`vertical`?`ArrowDown`:`ArrowRight`:if(u.getKeyBelow){e.preventDefault();let t;t=f==null?u.getFirstKey?.():u.getKeyBelow(f),t==null&&d&&(t=u.getFirstKey?.(f)),l(t)}break;case c()===`vertical`?`ArrowUp`:`ArrowLeft`:if(u.getKeyAbove){e.preventDefault();let t;t=f==null?u.getLastKey?.():u.getKeyAbove(f),t==null&&d&&(t=u.getLastKey?.(f)),l(t)}break;case c()===`vertical`?`ArrowLeft`:`ArrowUp`:if(u.getKeyLeftOf){e.preventDefault();let t=a()===`rtl`,n;n=f==null?t?u.getFirstKey?.():u.getLastKey?.():u.getKeyLeftOf(f),l(n)}break;case c()===`vertical`?`ArrowRight`:`ArrowDown`:if(u.getKeyRightOf){e.preventDefault();let t=a()===`rtl`,n;n=f==null?t?u.getLastKey?.():u.getFirstKey?.():u.getKeyRightOf(f),l(n)}break;case`Home`:if(u.getFirstKey){e.preventDefault();let t=u.getFirstKey(f,Vl(e));t!=null&&(i.setFocusedKey(t),Vl(e)&&e.shiftKey&&i.selectionMode()===`multiple`?i.extendSelection(t):o&&i.replaceSelection(t))}break;case`End`:if(u.getLastKey){e.preventDefault();let t=u.getLastKey(f,Vl(e));t!=null&&(i.setFocusedKey(t),Vl(e)&&e.shiftKey&&i.selectionMode()===`multiple`?i.extendSelection(t):o&&i.replaceSelection(t))}break;case`PageDown`:u.getKeyPageBelow&&f!=null&&(e.preventDefault(),l(u.getKeyPageBelow(f)));break;case`PageUp`:u.getKeyPageAbove&&f!=null&&(e.preventDefault(),l(u.getKeyPageAbove(f)));break;case`a`:Vl(e)&&i.selectionMode()===`multiple`&&J(r.disallowSelectAll)!==!0&&(e.preventDefault(),i.selectAll());break;case`Escape`:!e.defaultPrevented&&!J(r.disallowEmptySelection)&&(e.preventDefault(),i.clearSelection());break;case`Tab`:if(!J(r.allowsTabNavigation)){if(e.shiftKey)n.focus();else{let e=Li(n,{tabbable:!0}),t,r;do r=e.lastChild(),r&&(t=r);while(r);t&&!t.contains(document.activeElement)&&bi(t)}break}}},u=e=>{let t=J(r.selectionManager),n=J(r.keyboardDelegate),a=J(r.selectOnFocus);if(t.isFocused()){e.currentTarget.contains(e.target)||t.setFocused(!1);return}if(e.currentTarget.contains(e.target)){if(t.setFocused(!0),t.focusedKey()==null){let r=e=>{e!=null&&(t.setFocusedKey(e),a&&t.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?r(t.lastSelectedKey()??n.getLastKey?.()):r(t.firstSelectedKey()??n.getFirstKey?.())}else if(!J(r.isVirtualized)){let e=i();if(e){e.scrollTop=o.top,e.scrollLeft=o.left;let n=e.querySelector(`[data-key="${t.focusedKey()}"]`);n&&(bi(n),Gi(e,n))}}}},d=e=>{let t=J(r.selectionManager);e.currentTarget.contains(e.relatedTarget)||t.setFocused(!1)},f=e=>{i()===e.target&&e.preventDefault()},p=()=>{let e=J(r.autoFocus);if(!e)return;let n=J(r.selectionManager),i=J(r.keyboardDelegate),a;e===`first`&&(a=i.getFirstKey?.()),e===`last`&&(a=i.getLastKey?.());let o=n.selectedKeys();o.size&&(a=o.values().next().value),n.setFocused(!0),n.setFocusedKey(a);let s=t();s&&a==null&&!J(r.shouldUseVirtualFocus)&&bi(s)};return oe(()=>{r.deferAutoFocus?setTimeout(p,0):p()}),M(ae([i,()=>J(r.isVirtualized),()=>J(r.selectionManager).focusedKey()],e=>{let[t,n,i]=e;if(n)i&&r.scrollToKey?.(i);else if(i&&t){let e=t.querySelector(`[data-key="${i}"]`);e&&Gi(t,e)}})),{tabIndex:N(()=>{if(!J(r.shouldUseVirtualFocus))return J(r.selectionManager).focusedKey()==null?0:-1}),onKeyDown:l,onMouseDown:f,onFocusIn:u,onFocusOut:d}}function Yl(e,t){let n=()=>J(e.selectionManager),r=()=>J(e.key),i=()=>J(e.shouldUseVirtualFocus),a=e=>{n().selectionMode()!==`none`&&(n().selectionMode()===`single`?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):e?.shiftKey?n().extendSelection(r()):n().selectionBehavior()===`toggle`||Vl(e)||`pointerType`in e&&e.pointerType===`touch`?n().toggleSelection(r()):n().replaceSelection(r()))},o=()=>n().isSelected(r()),s=()=>J(e.disabled)||n().isDisabled(r()),c=()=>!s()&&n().canSelectItem(r()),l=null,u=t=>{c()&&(l=t.pointerType,t.pointerType===`mouse`&&t.button===0&&!J(e.shouldSelectOnPressUp)&&a(t))},d=t=>{c()&&t.pointerType===`mouse`&&t.button===0&&J(e.shouldSelectOnPressUp)&&J(e.allowsDifferentPressOrigin)&&a(t)},f=t=>{c()&&(J(e.shouldSelectOnPressUp)&&!J(e.allowsDifferentPressOrigin)||l!==`mouse`)&&a(t)},p=e=>{c()&&[`Enter`,` `].includes(e.key)&&(Bl(e)?n().toggleSelection(r()):a(e))},m=e=>{s()&&e.preventDefault()},h=e=>{let a=t();i()||s()||!a||e.target===a&&n().setFocusedKey(r())},g=N(()=>{if(!(i()||s()))return r()===n().focusedKey()?0:-1}),_=N(()=>J(e.virtualized)?void 0:r());return M(ae([t,r,i,()=>n().focusedKey(),()=>n().isFocused()],([t,n,r,i,a])=>{t&&n===i&&a&&!r&&document.activeElement!==t&&(e.focus?e.focus():bi(t))})),{isSelected:o,isDisabled:s,allowsSelection:c,tabIndex:g,dataKey:_,onPointerDown:u,onPointerUp:d,onClick:f,onKeyDown:p,onMouseDown:m,onFocus:h}}var Xl=class{collection;state;constructor(e,t){this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()===`none`)return!1;let t=this.getKey(e);return t!=null&&this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;let e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(let t of this.state.selectedKeys()){let n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index<e.index;(!e||r)&&(e=n)}return e?.key}lastSelectedKey(){let e;for(let t of this.state.selectedKeys()){let n=this.collection().getItem(t),r=n?.index!=null&&e?.index!=null&&n.index>e.index;(!e||r)&&(e=n)}return e?.key}extendSelection(e){if(this.selectionMode()===`none`)return;if(this.selectionMode()===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=this.state.selectedKeys(),r=n.anchorKey||t,i=new Rl(n,r,t);for(let e of this.getKeyRange(r,n.currentKey||t))i.delete(e);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&i.add(e);this.state.setSelectedKeys(i)}getKeyRange(e,t){let n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){let n=[],r=e;for(;r!=null;){let e=this.collection().getItem(r);if(e&&e.type===`item`&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){let t=this.collection().getItem(e);return t?!t||t.type!==`item`?null:t.key:e}toggleSelection(e){if(this.selectionMode()===`none`)return;if(this.selectionMode()===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new Rl(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new Rl([t],t,t):new Rl;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()===`none`)return;let t=new Rl;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode()===`single`))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()===`multiple`&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){let e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new Rl)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!==`none`&&(this.selectionMode()===`single`?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()===`toggle`||t&&t.pointerType===`touch`?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;let t=this.selectedKeys();if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()===`none`)return!1;let t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){let t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){let e=[];return(t=>{for(;t!=null;){if(this.canSelectItem(t)){let n=this.collection().getItem(t);if(!n)continue;n.type===`item`&&e.push(t)}t=this.collection().getKeyAfter(t)}})(this.collection().getFirstKey()),e}},Zl=class{keyMap=new Map;iterable;firstKey;lastKey;constructor(e){this.iterable=e;for(let t of e)this.keyMap.set(t.key,t);if(this.keyMap.size===0)return;let t,n=0;for(let[e,r]of this.keyMap)t?(t.nextKey=e,r.prevKey=t.key):(this.firstKey=e,r.prevKey=void 0),r.type===`item`&&(r.index=n++),t=r,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){return this.keyMap.get(e)?.prevKey}getKeyAfter(e){return this.keyMap.get(e)?.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}};function Ql(e){let t=Wl(e),n=Ll({dataSource:()=>J(e.dataSource),getKey:()=>J(e.getKey),getTextValue:()=>J(e.getTextValue),getDisabled:()=>J(e.getDisabled),getSectionChildren:()=>J(e.getSectionChildren),factory:t=>e.filter?new Zl(e.filter(t)):new Zl(t)},[()=>e.filter]),r=new Xl(n,t);return te(()=>{let e=t.focusedKey();e!=null&&!n().getItem(e)&&t.setFocusedKey(void 0)}),{collection:n,selectionManager:()=>r}}var $l=L();function eu(){return R($l)}function tu(){let e=eu();if(e===void 0)throw Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function nu(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function ru(e,t){let n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){let t=e[r]?.ref();if(t&&nu(t,n))return r+1}return 0}function iu(e){let t=e.map((e,t)=>[t,e]),n=!1;return t.sort(([e,t],[r,i])=>{let a=t.ref(),o=i.ref();return a===o||!a||!o?0:nu(a,o)?(e>r&&(n=!0),-1):(e<r&&(n=!0),1)}),n?t.map(([e,t])=>t):e}function au(e,t){let n=iu(e);e!==n&&t(n)}function ou(e){let t=e[0],n=e[e.length-1]?.ref(),r=t?.ref()?.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return ai(r).body}function su(e,t){M(()=>{let n=setTimeout(()=>{au(e(),t)});F(()=>clearTimeout(n))})}function cu(e,t){if(typeof IntersectionObserver!=`function`){su(e,t);return}let n=[];M(()=>{let r=()=>{let r=!!n.length;n=e(),r&&au(e(),t)},i=ou(e()),a=new IntersectionObserver(r,{root:i});for(let t of e()){let e=t.ref();e&&a.observe(e)}F(()=>a.disconnect())})}function lu(e={}){let[t,n]=ja({value:()=>J(e.items),onChange:t=>e.onItemsChange?.(t)});cu(t,n);let r=e=>(n(t=>Xr(t,e,ru(t,e))),()=>{n(t=>{let n=t.filter(t=>t.ref()!==e.ref());return t.length===n.length?t:n})});return{DomCollectionProvider:e=>z($l.Provider,{value:{registerItem:r},get children(){return e.children}})}}function uu(e){let t=tu(),n=Vi({shouldRegisterItem:!0},e);M(()=>{n.shouldRegisterItem&&F(t.registerItem(n.getItem()))})}function du(e,t){let n=new ResizeObserver(e);return F(n.disconnect.bind(n)),{observe:e=>n.observe(e,t),unobserve:n.unobserve.bind(n)}}function fu(e,t,n){let r=new WeakMap,{observe:i,unobserve:a}=du(e=>{for(let n of e){let{contentRect:e,target:i}=n,a=Math.round(e.width),o=Math.round(e.height),s=r.get(i);(!s||s.width!==a||s.height!==o)&&(t(e,i,n),r.set(i,{width:a,height:o}))}},n);M(t=>{let n=an(sn(J(e)));return dn(n,t,i,a),n},[])}Ia({},{Content:()=>hu,Indicator:()=>gu,List:()=>_u,Root:()=>yu,Tabs:()=>xu,Trigger:()=>bu,useTabsContext:()=>mu});var pu=L();function mu(){let e=R(pu);if(e===void 0)throw Error("[kobalte]: `useTabsContext` must be used within a `Tabs` component");return e}function hu(e){let[t,n]=A(),r=mu(),[i,a]=V(e,[`ref`,`id`,`value`,`forceMount`]),[o,s]=A(0),c=()=>i.id??r.generateContentId(i.value),l=()=>r.listState().selectedKey()===i.value,{present:u}=ro({show:()=>i.forceMount||l(),element:()=>t()??null});return M(ae([()=>t(),()=>u()],([e,t])=>{if(e==null||!t)return;let n=()=>{let t=Li(e,{tabbable:!0});s(t.nextNode()?void 0:0)};n();let r=new MutationObserver(n);r.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabindex`,`disabled`]}),F(()=>{r.disconnect()})})),M(ae([()=>i.value,c],([e,t])=>{r.contentIdsMap().set(e,t)})),z(U,{get when(){return u()},get children(){return z(Ta,B({as:`div`,ref(e){var t=Yr(n,i.ref);typeof t==`function`&&t(e)},get id(){return c()},role:`tabpanel`,get tabIndex(){return o()},get"aria-labelledby"(){return r.triggerIdsMap().get(i.value)},get"data-orientation"(){return r.orientation()},get"data-selected"(){return l()?``:void 0}},a))}})}function gu(e){let t=mu(),[n,r]=V(e,[`style`]),[i,a]=A(),{direction:o}=Jo(),s=()=>{let e=t.selectedTab();if(e==null||e.getClientRects().length===0)return;let n={transform:void 0,width:void 0,height:void 0,transition:i()==null?`none`:void 0},r=o()===`rtl`?-1*(e.offsetParent?.offsetWidth-e.offsetWidth-e.offsetLeft):e.offsetLeft;n.transform=t.orientation()===`vertical`?`translateY(${e.offsetTop}px)`:`translateX(${r}px)`,t.orientation()===`horizontal`?n.width=`${e.offsetWidth}px`:n.height=`${e.offsetHeight}px`,a(n)};M(ae([t.selectedTab,t.orientation,o],()=>{i()!=null&&s()},{defer:!0}));let[c,l]=A(!1),u=null,d=null;return fu(t.selectedTab,(e,t)=>{if(d!==t){d=t,s();return}l(!0),u&&clearTimeout(u),u=setTimeout(()=>{u=null,l(!1)},1),s()}),z(Ta,B({as:`div`,role:`presentation`,get style(){return Jr(i()??{visibility:`hidden`},n.style)},get"data-orientation"(){return t.orientation()},get"data-resizing"(){return c()}},r))}function _u(e){let t,n=mu(),[r,i]=V(e,[`ref`,`onKeyDown`,`onMouseDown`,`onFocusIn`,`onFocusOut`]),{direction:a}=Jo(),o=new Fl(()=>n.listState().collection(),a,n.orientation),s=Jl({selectionManager:()=>n.listState().selectionManager(),keyboardDelegate:()=>o,selectOnFocus:()=>n.activationMode()===`automatic`,shouldFocusWrap:!1,disallowEmptySelection:!0},()=>t);return M(()=>{if(t==null)return;let e=t.querySelector(`[data-key="${n.listState().selectedKey()}"]`);e!=null&&n.setSelectedTab(e)}),z(Ta,B({as:`div`,ref(e){var n=Yr(e=>t=e,r.ref);typeof n==`function`&&n(e)},role:`tablist`,get"aria-orientation"(){return n.orientation()},get"data-orientation"(){return n.orientation()},get onKeyDown(){return vi([r.onKeyDown,s.onKeyDown])},get onMouseDown(){return vi([r.onMouseDown,s.onMouseDown])},get onFocusIn(){return vi([r.onFocusIn,s.onFocusIn])},get onFocusOut(){return vi([r.onFocusOut,s.onFocusOut])}},i))}function vu(e){let[t,n]=ka({value:()=>J(e.selectedKey),defaultValue:()=>J(e.defaultSelectedKey),onChange:t=>e.onSelectionChange?.(t)}),r=N(()=>{let e=t();return e==null?[]:[e]}),[,i]=V(e,[`onSelectionChange`]),{collection:a,selectionManager:o}=Ql(B(i,{selectionMode:`single`,disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:r=>{let i=r.values().next().value;i!==void 0&&(i===t()&&e.onSelectionChange?.(i),n(i))}}));return{collection:a,selectionManager:o,selectedKey:t,setSelectedKey:n,selectedItem:N(()=>{let e=t();return e==null?void 0:a().getItem(e)})}}function yu(e){let[t,n]=V(Vi({id:`tabs-${Ue()}`,orientation:`horizontal`,activationMode:`automatic`},e),[`value`,`defaultValue`,`onChange`,`orientation`,`activationMode`,`disabled`]),[r,i]=A([]),[a,o]=A(),{DomCollectionProvider:s}=lu({items:r,onItemsChange:i}),c=vu({selectedKey:()=>t.value,defaultSelectedKey:()=>t.defaultValue,onSelectionChange:e=>t.onChange?.(String(e)),dataSource:r}),l=c.selectedKey();M(ae([()=>c.selectionManager(),()=>c.collection(),()=>c.selectedKey()],([e,t,n])=>{let r=n;if(e.isEmpty()||r==null||!t.getItem(r)){r=t.getFirstKey();let n=r==null?void 0:t.getItem(r);for(;n?.disabled&&n.key!==t.getLastKey();)r=t.getKeyAfter(n.key),n=r==null?void 0:t.getItem(r);n?.disabled&&r===t.getLastKey()&&(r=t.getFirstKey()),r!=null&&e.setSelectedKeys([r])}(e.focusedKey()==null||!e.isFocused()&&r!==l)&&e.setFocusedKey(r),l=r}));let u=new Map,d=new Map,f={isDisabled:()=>t.disabled??!1,orientation:()=>t.orientation,activationMode:()=>t.activationMode,triggerIdsMap:()=>u,contentIdsMap:()=>d,listState:()=>c,selectedTab:a,setSelectedTab:o,generateTriggerId:e=>`${n.id}-trigger-${e}`,generateContentId:e=>`${n.id}-content-${e}`};return z(s,{get children(){return z(pu.Provider,{value:f,get children(){return z(Ta,B({as:`div`,get"data-orientation"(){return f.orientation()}},n))}})}})}function bu(e){let t,n=mu(),[r,i]=V(Vi({type:`button`},e),[`ref`,`id`,`value`,`disabled`,`onPointerDown`,`onPointerUp`,`onClick`,`onKeyDown`,`onMouseDown`,`onFocus`]),a=()=>r.id??n.generateTriggerId(r.value),o=()=>n.listState().selectionManager().focusedKey()===r.value,s=()=>r.disabled||n.isDisabled(),c=()=>n.contentIdsMap().get(r.value);uu({getItem:()=>({ref:()=>t,type:`item`,key:r.value,textValue:``,disabled:s()})});let l=Yl({key:()=>r.value,selectionManager:()=>n.listState().selectionManager(),disabled:s},()=>t),u=e=>{hi()&&bi(e.currentTarget)};return M(ae([()=>r.value,a],([e,t])=>{n.triggerIdsMap().set(e,t)})),z(Ta,B({as:`button`,ref(e){var n=Yr(e=>t=e,r.ref);typeof n==`function`&&n(e)},get id(){return a()},role:`tab`,get tabIndex(){return W(()=>!s())()?l.tabIndex():void 0},get disabled(){return s()},get"aria-selected"(){return l.isSelected()},get"aria-disabled"(){return s()||void 0},get"aria-controls"(){return W(()=>!!l.isSelected())()?c():void 0},get"data-key"(){return l.dataKey()},get"data-orientation"(){return n.orientation()},get"data-selected"(){return l.isSelected()?``:void 0},get"data-highlighted"(){return o()?``:void 0},get"data-disabled"(){return s()?``:void 0},get onPointerDown(){return vi([r.onPointerDown,l.onPointerDown])},get onPointerUp(){return vi([r.onPointerUp,l.onPointerUp])},get onClick(){return vi([r.onClick,l.onClick,u])},get onKeyDown(){return vi([r.onKeyDown,l.onKeyDown])},get onMouseDown(){return vi([r.onMouseDown,l.onMouseDown])},get onFocus(){return vi([r.onFocus,l.onFocus])}},i))}var xu=Object.assign(yu,{Content:hu,Indicator:gu,List:_u,Trigger:bu}),Su=G(`<span class="inline-flex items-center gap-2"data-slot=tabs-v2-trigger-content>`),Cu=G(`<div>`),wu=G(`<span data-slot=tabs-v2-subtext class="ms-2 text-xs text-text-weak">`),Tu=G(`<button type=button><svg width=14 height=14 viewBox="0 0 14 14"fill=none xmlns=http://www.w3.org/2000/svg aria-hidden=true><path d="M10.8889 3.11108L3.11108 10.8889"stroke=currentColor stroke-linejoin=round></path><path d="M3.11108 3.11108L10.8889 10.8889"stroke=currentColor stroke-linejoin=round>`),Eu=L({current:()=>!1});function Du(e){let[t,n]=V(e,[`class`,`classList`,`variant`,`orientation`,`children`]),r=()=>t.variant??`panel`,i=()=>r()===`line`||r()===`pill`||r()===`settings`,a=()=>r()===`panel`||r()===`line`?`normal`:r()===`underline`?`alt`:r()===`surface`?`pill`:r();return z(Eu.Provider,{value:{current:i},get children(){return z(yu,B(n,{get orientation(){return t.orientation},get"data-component"(){return i()?`tabs-v2`:`tabs`},get"data-variant"(){return a()},get"data-orientation"(){return t.orientation||`horizontal`},get classList(){return{...t.classList,[t.class??``]:!!t.class}},get children(){return t.children}}))}})}function Ou(e){let t=R(Eu),[n,r]=V(e,[`class`,`classList`]);return z(_u,B(r,{get"data-slot"(){return t.current()?`tabs-v2-list`:`tabs-list`},get classList(){return{...n.classList,[n.class??``]:!!n.class}}}))}function ku(e){let t=R(Eu),[n,r]=V(e,[`class`,`classList`,`classes`,`children`,`closeButton`,`hideCloseButton`,`onMiddleClick`,`subtext`,`dir`]),i=()=>t.current()?`tabs-v2-trigger-wrapper`:`tabs-trigger-wrapper`,a=()=>t.current()?`tabs-v2-trigger`:`tabs-trigger`,o=()=>t.current()?`tabs-v2-trigger-close-button`:`tabs-trigger-close-button`;return(()=>{var s=Cu();return s.addEventListener(`auxclick`,e=>{e.button===1&&n.onMiddleClick&&(e.preventDefault(),n.onMiddleClick())}),s.$$mousedown=e=>{e.button===1&&n.onMiddleClick&&e.preventDefault()},q(s,z(bu,B(r,{get dir(){return n.dir??`auto`},get"data-slot"(){return a()},get"data-value"(){return e.value},get classList(){return{[n.classes?.button??``]:!!n.classes?.button}},get children(){return z(U,{get when(){return t.current()},get fallback(){return n.children},get children(){var e=Su();return q(e,()=>n.children,null),q(e,z(U,{get when(){return n.subtext},children:e=>(()=>{var t=wu();return q(t,e),t})()}),null),e}})}})),null),q(s,z(U,{get when(){return n.closeButton},children:e=>(()=>{var t=Cu();return q(t,e),j(e=>{var r=o(),i=n.hideCloseButton?``:void 0;return r!==e.e&&K(t,`data-slot`,e.e=r),i!==e.t&&K(t,`data-hidden`,e.t=i),e},{e:void 0,t:void 0}),t})()}),null),j(t=>{var r=i(),a=e.value,o={...n.classList,[n.class??``]:!!n.class};return r!==t.e&&K(s,`data-slot`,t.e=r),a!==t.t&&K(s,`data-value`,t.t=a),t.a=ft(s,o,t.a),t},{e:void 0,t:void 0,a:void 0}),s})()}function Au(e){let t=Al(),[n,r]=V(e,[`class`,`classList`,`onClick`,`onPointerDown`,`aria-label`]);return(()=>{var e=Tu();return ht(e,B(r,{get"aria-label"(){return n[`aria-label`]??t.t(`ui.tabs.close`)},"data-slot":`tabs-close-button`,get classList(){return{[n.class??``]:!!n.class,...n.classList}},onPointerDown:e=>{e.stopPropagation(),typeof n.onPointerDown==`function`&&n.onPointerDown(e)},onClick:e=>{e.preventDefault(),e.stopPropagation(),typeof n.onClick==`function`&&n.onClick(e)}}),!1,!0),e})()}function ju(e){let t=R(Eu),[n,r]=V(e,[`class`,`classList`,`children`]);return z(hu,B(r,{get"data-slot"(){return t.current()?`tabs-v2-content`:`tabs-content`},get classList(){return{...n.classList,[n.class??``]:!!n.class}},get children(){return n.children}}))}var Mu=Object.assign(Du,{List:Ou,Trigger:ku,CloseButton:Au,Content:ju,SectionTitle:e=>{let t=R(Eu);return(()=>{var n=Cu();return q(n,()=>e.children),j(()=>K(n,`data-slot`,t.current()?`tabs-v2-section-title`:`tabs-section-title`)),n})()}});st([`mousedown`]);var Nu=[`id`,`name`,`validationState`,`required`,`disabled`,`readOnly`];function Pu(e){let t=Vi({id:`form-control-${Ue()}`},e),[n,r]=A(),[i,a]=A(),[o,s]=A(),[c,l]=A();return{formControlContext:{name:()=>J(t.name)??J(t.id),dataset:N(()=>({"data-valid":J(t.validationState)===`valid`?``:void 0,"data-invalid":J(t.validationState)===`invalid`?``:void 0,"data-required":J(t.required)?``:void 0,"data-disabled":J(t.disabled)?``:void 0,"data-readonly":J(t.readOnly)?``:void 0})),validationState:()=>J(t.validationState),isRequired:()=>J(t.required),isDisabled:()=>J(t.disabled),isReadOnly:()=>J(t.readOnly),labelId:n,fieldId:i,descriptionId:o,errorMessageId:c,getAriaLabelledBy:(e,t,r)=>{let i=r!=null||n()!=null;return[r,n(),i&&t!=null?e:void 0].filter(Boolean).join(` `)||void 0},getAriaDescribedBy:e=>[o(),c(),e].filter(Boolean).join(` `)||void 0,generateId:ti(()=>J(t.id)),registerLabel:Va(r),registerField:Va(a),registerDescription:Va(s),registerErrorMessage:Va(l)}}}var Fu=L();function Iu(){let e=R(Fu);if(e===void 0)throw Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Lu(e){let t=Iu(),n=Vi({id:t.generateId(`description`)},e);return M(()=>F(t.registerDescription(n.id))),z(Ta,B({as:`div`},()=>t.dataset(),n))}var Ru=G(`<option>`),zu=G(`<div aria-hidden=true><input type=text style=font-size:16px><select tabindex=-1><option>`);function Bu(e){let t,[n,r]=V(e,[`ref`,`onChange`,`collection`,`selectionManager`,`isOpen`,`isMultiple`,`isVirtualized`,`focusTrigger`]),i=Iu(),[a,o]=A(!1),s=e=>{let t=n.collection.getItem(e);return z(U,{get when(){return t?.type===`item`},get children(){var r=Ru();return r.value=e,q(r,()=>t?.textValue),j(()=>r.selected=n.selectionManager.isSelected(e)),r}})};return M(ae(()=>n.selectionManager.selectedKeys(),(e,n)=>{n&&Ul(e,n)||(o(!0),t?.dispatchEvent(new Event(`input`,{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event(`change`,{bubbles:!0,cancelable:!0})))},{defer:!0})),(()=>{var e=zu(),c=e.firstChild,l=c.nextSibling;l.firstChild,c.addEventListener(`focus`,()=>n.focusTrigger()),l.addEventListener(`change`,e=>{_i(e,n.onChange),a()||n.selectionManager.setSelectedKeys(new Set([e.target.value])),o(!1)});var u=Yr(e=>t=e,n.ref);return typeof u==`function`&&gt(u,l),ht(l,B({get multiple(){return n.isMultiple},get name(){return i.name()},get required(){return i.isRequired()},get disabled(){return i.isDisabled()},get size(){return n.collection.getSize()},get value(){return n.selectionManager.firstSelectedKey()??``}},r),!1,!0),q(l,z(U,{get when(){return n.isVirtualized},get fallback(){return z(H,{get each(){return[...n.collection.getKeys()]},children:s})},get children(){return z(H,{get each(){return[...n.selectionManager.selectedKeys()]},children:s})}}),null),j(t=>{var r=qi,a=n.selectionManager.isFocused()||n.isOpen?-1:0,o=i.isRequired(),s=i.isDisabled(),l=i.isReadOnly();return t.e=pt(e,r,t.e),a!==t.t&&K(c,`tabindex`,t.t=a),o!==t.a&&(c.required=t.a=o),s!==t.o&&(c.disabled=t.o=s),l!==t.i&&(c.readOnly=t.i=l),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e})()}var Vu=new WeakMap;function Hu(e){let t=Vu.get(e);if(t!=null)return t;t=0;for(let n of e)n.type===`item`&&t++;return Vu.set(e,t),t}var Uu=class{collection;ref;collator;constructor(e,t,n){this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){let e=this.collection().getItem(t);if(e&&e.type===`item`&&!e.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){let e=this.collection().getItem(t);if(e&&e.type===`item`&&!e.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){let t=this.collection().getItem(e);if(t&&t.type===`item`&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){let t=this.collection().getItem(e);if(t&&t.type===`item`&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){return this.ref?.()?.querySelector(`[data-key="${e}"]`)??null}getKeyPageAbove(e){let t=this.ref?.(),n=this.getItem(e);if(!t||!n)return;let r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight),i=e;for(;i&&n&&n.offsetTop>r;)i=this.getKeyAbove(i),n=i==null?null:this.getItem(i);return i}getKeyPageBelow(e){let t=this.ref?.(),n=this.getItem(e);if(!t||!n)return;let r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight),i=e;for(;i&&n&&n.offsetTop<r;)i=this.getKeyBelow(i),n=i==null?null:this.getItem(i);return i}getKeyForSearch(e,t){let n=this.collator?.();if(!n)return;let r=t==null?this.getFirstKey():this.getKeyBelow(t);for(;r!=null;){let t=this.collection().getItem(r);if(t){let i=t.textValue.slice(0,e.length);if(t.textValue&&n.compare(i,e)===0)return r}r=this.getKeyBelow(r)}}};function Wu(e,t,n){let r=Xo({usage:`search`,sensitivity:`base`});return Jl({selectionManager:()=>J(e.selectionManager),keyboardDelegate:N(()=>J(e.keyboardDelegate)||new Uu(e.collection,t,r)),autoFocus:()=>J(e.autoFocus),deferAutoFocus:()=>J(e.deferAutoFocus),shouldFocusWrap:()=>J(e.shouldFocusWrap),disallowEmptySelection:()=>J(e.disallowEmptySelection),selectOnFocus:()=>J(e.selectOnFocus),disallowTypeAhead:()=>J(e.disallowTypeAhead),shouldUseVirtualFocus:()=>J(e.shouldUseVirtualFocus),allowsTabNavigation:()=>J(e.allowsTabNavigation),isVirtualized:()=>J(e.isVirtualized),scrollToKey:t=>J(e.scrollToKey)?.(t),orientation:()=>J(e.orientation)},t,n)}Ia({},{Item:()=>Yu,ItemDescription:()=>Xu,ItemIndicator:()=>Zu,ItemLabel:()=>Qu,Listbox:()=>td,Root:()=>$u,Section:()=>ed,useListboxContext:()=>Ku});var Gu=L();function Ku(){let e=R(Gu);if(e===void 0)throw Error("[kobalte]: `useListboxContext` must be used within a `Listbox` component");return e}var qu=L();function Ju(){let e=R(qu);if(e===void 0)throw Error("[kobalte]: `useListboxItemContext` must be used within a `Listbox.Item` component");return e}function Yu(e){let t,n=Ku(),[r,i]=V(Vi({id:`${n.generateId(`item`)}-${Ue()}`},e),[`ref`,`item`,`aria-label`,`aria-labelledby`,`aria-describedby`,`onPointerMove`,`onPointerDown`,`onPointerUp`,`onClick`,`onKeyDown`,`onMouseDown`,`onFocus`]),[a,o]=A(),[s,c]=A(),l=()=>n.listState().selectionManager(),u=()=>l().focusedKey()===r.item.key,d=Yl({key:()=>r.item.key,selectionManager:l,shouldSelectOnPressUp:n.shouldSelectOnPressUp,allowsDifferentPressOrigin:()=>n.shouldSelectOnPressUp()&&n.shouldFocusOnHover(),shouldUseVirtualFocus:n.shouldUseVirtualFocus,disabled:()=>r.item.disabled},()=>t),f=()=>{if(l().selectionMode()!==`none`)return d.isSelected()},p=N(()=>!(ui()&&hi())),m=()=>p()?r[`aria-label`]:void 0,h=()=>p()?a():void 0,g=()=>p()?s():void 0,_=()=>{if(!n.isVirtualized())return;let e=n.listState().collection().getItem(r.item.key)?.index;return e==null?void 0:e+1},v=()=>{if(n.isVirtualized())return Hu(n.listState().collection())},y=e=>{_i(e,r.onPointerMove),e.pointerType===`mouse`&&!d.isDisabled()&&n.shouldFocusOnHover()&&(bi(e.currentTarget),l().setFocused(!0),l().setFocusedKey(r.item.key))},b=N(()=>({"data-disabled":d.isDisabled()?``:void 0,"data-selected":d.isSelected()?``:void 0,"data-highlighted":u()?``:void 0})),x={isSelected:d.isSelected,dataset:b,generateId:ti(()=>i.id),registerLabelId:Va(o),registerDescriptionId:Va(c)};return z(qu.Provider,{value:x,get children(){return z(Ta,B({as:`li`,ref(e){var n=Yr(e=>t=e,r.ref);typeof n==`function`&&n(e)},role:`option`,get tabIndex(){return d.tabIndex()},get"aria-disabled"(){return d.isDisabled()},get"aria-selected"(){return f()},get"aria-label"(){return m()},get"aria-labelledby"(){return h()},get"aria-describedby"(){return g()},get"aria-posinset"(){return _()},get"aria-setsize"(){return v()},get"data-key"(){return d.dataKey()},get onPointerDown(){return vi([r.onPointerDown,d.onPointerDown])},get onPointerUp(){return vi([r.onPointerUp,d.onPointerUp])},get onClick(){return vi([r.onClick,d.onClick])},get onKeyDown(){return vi([r.onKeyDown,d.onKeyDown])},get onMouseDown(){return vi([r.onMouseDown,d.onMouseDown])},get onFocus(){return vi([r.onFocus,d.onFocus])},onPointerMove:y},b,i))}})}function Xu(e){let t=Ju(),n=Vi({id:t.generateId(`description`)},e);return M(()=>F(t.registerDescriptionId(n.id))),z(Ta,B({as:`div`},()=>t.dataset(),n))}function Zu(e){let t=Ju(),[n,r]=V(Vi({id:t.generateId(`indicator`)},e),[`forceMount`]);return z(U,{get when(){return n.forceMount||t.isSelected()},get children(){return z(Ta,B({as:`div`,"aria-hidden":`true`},()=>t.dataset(),r))}})}function Qu(e){let t=Ju(),n=Vi({id:t.generateId(`label`)},e);return M(()=>F(t.registerLabelId(n.id))),z(Ta,B({as:`div`},()=>t.dataset(),n))}function $u(e){let t,n=Vi({id:`listbox-${Ue()}`,selectionMode:`single`,virtualized:!1},e),[r,i]=V(n,`ref.children.renderItem.renderSection.value.defaultValue.onChange.options.optionValue.optionTextValue.optionDisabled.optionGroupChildren.state.keyboardDelegate.autoFocus.selectionMode.shouldFocusWrap.shouldUseVirtualFocus.shouldSelectOnPressUp.shouldFocusOnHover.allowDuplicateSelectionEvents.disallowEmptySelection.selectionBehavior.selectOnFocus.disallowTypeAhead.allowsTabNavigation.virtualized.scrollToItem.scrollRef.onKeyDown.onMouseDown.onFocusIn.onFocusOut`.split(`.`)),a=N(()=>r.state?r.state:Ql({selectedKeys:()=>r.value,defaultSelectedKeys:()=>r.defaultValue,onSelectionChange:r.onChange,allowDuplicateSelectionEvents:()=>J(r.allowDuplicateSelectionEvents),disallowEmptySelection:()=>J(r.disallowEmptySelection),selectionBehavior:()=>J(r.selectionBehavior),selectionMode:()=>J(r.selectionMode),dataSource:()=>r.options??[],getKey:()=>r.optionValue,getTextValue:()=>r.optionTextValue,getDisabled:()=>r.optionDisabled,getSectionChildren:()=>r.optionGroupChildren})),o=Wu({selectionManager:()=>a().selectionManager(),collection:()=>a().collection(),autoFocus:()=>J(r.autoFocus),shouldFocusWrap:()=>J(r.shouldFocusWrap),keyboardDelegate:()=>r.keyboardDelegate,disallowEmptySelection:()=>J(r.disallowEmptySelection),selectOnFocus:()=>J(r.selectOnFocus),disallowTypeAhead:()=>J(r.disallowTypeAhead),shouldUseVirtualFocus:()=>J(r.shouldUseVirtualFocus),allowsTabNavigation:()=>J(r.allowsTabNavigation),isVirtualized:()=>r.virtualized,scrollToKey:()=>r.scrollToItem},()=>t,()=>r.scrollRef?.()),s={listState:a,generateId:ti(()=>i.id),shouldUseVirtualFocus:()=>n.shouldUseVirtualFocus,shouldSelectOnPressUp:()=>n.shouldSelectOnPressUp,shouldFocusOnHover:()=>n.shouldFocusOnHover,isVirtualized:()=>r.virtualized};return z(Gu.Provider,{value:s,get children(){return z(Ta,B({as:`ul`,ref(e){var n=Yr(e=>t=e,r.ref);typeof n==`function`&&n(e)},role:`listbox`,get tabIndex(){return o.tabIndex()},get"aria-multiselectable"(){return a().selectionManager().selectionMode()===`multiple`||void 0},get onKeyDown(){return vi([r.onKeyDown,o.onKeyDown])},get onMouseDown(){return vi([r.onMouseDown,o.onMouseDown])},get onFocusIn(){return vi([r.onFocusIn,o.onFocusIn])},get onFocusOut(){return vi([r.onFocusOut,o.onFocusOut])}},i,{get children(){return z(U,{get when(){return!r.virtualized},get fallback(){return r.children?.(a().collection)},get children(){return z(Ur,{get each(){return[...a().collection()]},by:`key`,children:e=>z(Ke,{get children(){return[z(qe,{get when(){return e().type===`section`},get children(){return r.renderSection?.(e())}}),z(qe,{get when(){return e().type===`item`},get children(){return r.renderItem?.(e())}})]}})})}})}}))}})}function ed(e){return z(Ta,B({as:`li`,role:`presentation`},e))}var td=Object.assign($u,{Item:Yu,ItemDescription:Xu,ItemIndicator:Zu,ItemLabel:Qu,Section:ed}),nd=[`id`,`aria-label`,`aria-labelledby`,`aria-describedby`];function rd(e){let t=Iu(),n=Vi({id:t.generateId(`field`)},e);return j(()=>F(t.registerField(J(n.id)))),{fieldProps:{id:()=>J(n.id),ariaLabel:()=>J(n[`aria-label`]),ariaLabelledBy:()=>t.getAriaLabelledBy(J(n.id),J(n[`aria-label`]),J(n[`aria-labelledby`])),ariaDescribedBy:()=>t.getAriaDescribedBy(J(n[`aria-describedby`]))}}}function id(e){let t,n=Iu(),[r,i]=V(Vi({id:n.generateId(`label`)},e),[`ref`]),a=Na(()=>t,()=>`label`);return M(()=>F(n.registerLabel(i.id))),z(Ta,B({as:`label`,ref(e){var n=Yr(e=>t=e,r.ref);typeof n==`function`&&n(e)},get for(){return W(()=>a()===`label`)()?n.fieldId():void 0}},()=>n.dataset(),i))}function ad(e,t){M(ae(e,e=>{if(e==null)return;let n=od(e);n!=null&&(n.addEventListener(`reset`,t,{passive:!0}),F(()=>{n.removeEventListener(`reset`,t)}))}))}function od(e){return sd(e)?e.form:e.closest(`form`)}function sd(e){return e.matches(`textarea, input, select, button`)}function cd(e){let t=Iu(),[n,r]=V(Vi({id:t.generateId(`error-message`)},e),[`forceMount`]),i=()=>t.validationState()===`invalid`;return M(()=>{i()&&F(t.registerErrorMessage(r.id))}),z(U,{get when(){return n.forceMount||i()},get children(){return z(Ta,B({as:`div`},()=>t.dataset(),r))}})}Ia({},{Arrow:()=>Qc,Content:()=>dd,Description:()=>Lu,ErrorMessage:()=>cd,HiddenSelect:()=>fd,Icon:()=>pd,Item:()=>Yu,ItemDescription:()=>Xu,ItemIndicator:()=>Zu,ItemLabel:()=>Qu,Label:()=>md,Listbox:()=>hd,Portal:()=>gd,Root:()=>vd,Section:()=>ed,Select:()=>Sd,Trigger:()=>yd,Value:()=>bd,useSelectContext:()=>ud});var ld=L();function ud(){let e=R(ld);if(e===void 0)throw Error("[kobalte]: `useSelectContext` must be used within a `Select` component");return e}function dd(e){let t,n=ud(),[r,i]=V(e,[`ref`,`style`,`onCloseAutoFocus`,`onFocusOutside`]),a=e=>{n.close()},o=e=>{r.onFocusOutside?.(e),n.isOpen()&&n.isModal()&&e.preventDefault()};return _a({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),no({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),ha({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:e=>{r.onCloseAutoFocus?.(e),e.defaultPrevented||(bi(n.triggerRef()),e.preventDefault())}},()=>t),z(U,{get when(){return n.contentPresent()},get children(){return z(sl.Positioner,{get children(){return z(Oa,B({ref(e){var i=Yr(e=>{n.setContentRef(e),t=e},r.ref);typeof i==`function`&&i(e)},get disableOutsidePointerEvents(){return W(()=>!!n.isModal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get style(){return Jr({"--kb-select-content-transform-origin":`var(--kb-popper-content-transform-origin)`,position:`relative`},r.style)},onEscapeKeyDown:a,onFocusOutside:o,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function fd(e){let t=ud();return z(Bu,B({get collection(){return t.listState().collection()},get selectionManager(){return t.listState().selectionManager()},get isOpen(){return t.isOpen()},get isMultiple(){return t.isMultiple()},get isVirtualized(){return t.isVirtualized()},focusTrigger:()=>t.triggerRef()?.focus()},e))}function pd(e){let t=ud();return z(Ta,B({as:`span`,"aria-hidden":`true`},()=>t.dataset(),Vi({children:`▼`},e)))}function md(e){let t=ud(),[n,r]=V(e,[`onClick`]);return z(id,B({as:`span`,onClick:e=>{_i(e,n.onClick),t.isDisabled()||t.triggerRef()?.focus()}},r))}function hd(e){let t=ud(),[n,r]=V(Vi({id:t.generateId(`listbox`)},e),[`ref`,`id`,`onKeyDown`]);return M(()=>F(t.registerListboxId(n.id))),z($u,B({ref(e){var r=Yr(t.setListboxRef,n.ref);typeof r==`function`&&r(e)},get id(){return n.id},get state(){return t.listState()},get virtualized(){return t.isVirtualized()},get autoFocus(){return t.autoFocus()},shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,get shouldFocusWrap(){return t.shouldFocusWrap()},get disallowTypeAhead(){return t.disallowTypeAhead()},get"aria-labelledby"(){return t.listboxAriaLabelledBy()},get renderItem(){return t.renderItem},get renderSection(){return t.renderSection},onKeyDown:e=>{_i(e,n.onKeyDown),e.key===`Escape`&&e.preventDefault()}},r))}function gd(e){let t=ud();return z(U,{get when(){return t.contentPresent()},get children(){return z(jt,e)}})}function _d(e){let[t,n,r,i]=V(Vi({id:`select-${Ue()}`,selectionMode:`single`,disallowEmptySelection:!1,closeOnSelection:e.selectionMode===`single`,allowDuplicateSelectionEvents:!0,gutter:8,sameWidth:!0,modal:!1},e),`itemComponent.sectionComponent.open.defaultOpen.onOpenChange.value.defaultValue.onChange.placeholder.options.optionValue.optionTextValue.optionDisabled.optionGroupChildren.keyboardDelegate.allowDuplicateSelectionEvents.disallowEmptySelection.closeOnSelection.disallowTypeAhead.shouldFocusWrap.selectionBehavior.selectionMode.virtualized.modal.preventScroll.forceMount`.split(`.`),[`getAnchorRect`,`placement`,`gutter`,`shift`,`flip`,`slide`,`overlap`,`sameWidth`,`fitViewport`,`hideWhenDetached`,`detachedPadding`,`arrowPadding`,`overflowPadding`],Nu),[a,o]=A(),[s,c]=A(),[l,u]=A(),[d,f]=A(),[p,m]=A(),[h,g]=A(),[_,v]=A(),[y,b]=A(!0),x=e=>{let n=t.optionValue;return String(n==null?e:ei(n)?n(e):e[n])},S=N(()=>{let e=t.optionGroupChildren;return e==null?t.options:t.options.flatMap(t=>t[e]??t)}),C=N(()=>S().map(e=>x(e))),w=e=>[...e].map(e=>S().find(t=>x(t)===e)).filter(e=>e!=null),T=Ma({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:e=>t.onOpenChange?.(e)}),E=Ql({selectedKeys:()=>t.value==null?t.value:t.value.map(x),defaultSelectedKeys:()=>t.defaultValue==null?t.defaultValue:t.defaultValue.map(x),onSelectionChange:e=>{t.onChange?.(w(e)),t.closeOnSelection&&j()},allowDuplicateSelectionEvents:()=>J(t.allowDuplicateSelectionEvents),disallowEmptySelection:()=>J(t.disallowEmptySelection),selectionBehavior:()=>J(t.selectionBehavior),selectionMode:()=>t.selectionMode,dataSource:()=>t.options??[],getKey:()=>t.optionValue,getTextValue:()=>t.optionTextValue,getDisabled:()=>t.optionDisabled,getSectionChildren:()=>t.optionGroupChildren}),D=N(()=>w(E.selectionManager().selectedKeys())),O=e=>{E.selectionManager().toggleSelection(x(e))},{present:k}=ro({show:()=>t.forceMount||T.isOpen(),element:()=>p()??null}),ee=()=>{let e=h();e&&bi(e)},te=e=>{if(t.options.length<=0)return;b(e),T.open();let n=E.selectionManager().firstSelectedKey();n??(e===`first`?n=E.collection().getFirstKey():e===`last`&&(n=E.collection().getLastKey())),ee(),E.selectionManager().setFocused(!0),E.selectionManager().setFocusedKey(n)},j=()=>{T.close(),E.selectionManager().setFocused(!1),E.selectionManager().setFocusedKey(void 0)},ne=e=>{T.isOpen()?j():te(e)},{formControlContext:re}=Pu(r);ad(d,()=>{let e=t.defaultValue?[...t.defaultValue].map(x):new Rl;E.selectionManager().setSelectedKeys(e)});let ie=Xo({usage:`search`,sensitivity:`base`}),P=N(()=>J(t.keyboardDelegate)||new Uu(E.collection,void 0,ie)),oe=e=>t.itemComponent?.({item:e}),F=e=>t.sectionComponent?.({section:e});M(ae([C],([e])=>{let t=[...E.selectionManager().selectedKeys()].filter(t=>e.includes(t));E.selectionManager().setSelectedKeys(t)},{defer:!0}));let se=N(()=>({"data-expanded":T.isOpen()?``:void 0,"data-closed":T.isOpen()?void 0:``})),ce={dataset:se,isOpen:T.isOpen,isDisabled:()=>re.isDisabled()??!1,isMultiple:()=>J(t.selectionMode)===`multiple`,isVirtualized:()=>t.virtualized??!1,isModal:()=>t.modal??!1,preventScroll:()=>t.preventScroll??ce.isModal(),disallowTypeAhead:()=>t.disallowTypeAhead??!1,shouldFocusWrap:()=>t.shouldFocusWrap??!1,selectedOptions:D,contentPresent:k,autoFocus:y,triggerRef:d,listState:()=>E,keyboardDelegate:P,triggerId:a,valueId:s,listboxId:l,listboxAriaLabelledBy:_,setListboxAriaLabelledBy:v,setTriggerRef:f,setContentRef:m,setListboxRef:g,open:te,close:j,toggle:ne,placeholder:()=>t.placeholder,renderItem:oe,renderSection:F,removeOptionFromSelection:O,generateId:ti(()=>J(r.id)),registerTriggerId:Va(o),registerValueId:Va(c),registerListboxId:Va(u)};return z(Fu.Provider,{value:re,get children(){return z(ld.Provider,{value:ce,get children(){return z(sl,B({anchorRef:d,contentRef:p},n,{get children(){return z(Ta,B({as:`div`,role:`group`,get id(){return J(r.id)}},()=>re.dataset(),se,i))}}))}})}})}function vd(e){let[t,n]=V(e,[`value`,`defaultValue`,`onChange`,`multiple`]),r=N(()=>t.value==null||t.multiple?t.value:[t.value]),i=N(()=>t.defaultValue==null||t.multiple?t.defaultValue:[t.defaultValue]);return z(_d,B({get value(){return r()},get defaultValue(){return i()},onChange:e=>{e!==r()&&(t.multiple?t.onChange?.(e??[]):t.onChange?.(e[0]??null))},get selectionMode(){return t.multiple?`multiple`:`single`}},n))}function yd(e){let t=Iu(),n=ud(),[r,i,a]=V(Vi({id:n.generateId(`trigger`)},e),[`ref`,`disabled`,`onPointerDown`,`onClick`,`onKeyDown`,`onFocus`,`onBlur`],nd),o=()=>n.listState().selectionManager(),s=()=>n.keyboardDelegate(),c=()=>r.disabled||n.isDisabled(),{fieldProps:l}=rd(i),{typeSelectHandlers:u}=Gl({keyboardDelegate:s,selectionManager:o,onTypeSelect:e=>o().select(e)}),d=()=>[n.listboxAriaLabelledBy(),n.valueId()].filter(Boolean).join(` `)||void 0;return M(()=>F(n.registerTriggerId(l.id()))),M(()=>{n.setListboxAriaLabelledBy([l.ariaLabelledBy(),l.ariaLabel()&&!l.ariaLabelledBy()?l.id():null].filter(Boolean).join(` `)||void 0)}),z(za,B({ref(e){var t=Yr(n.setTriggerRef,r.ref);typeof t==`function`&&t(e)},get id(){return l.id()},get disabled(){return c()},"aria-haspopup":`listbox`,get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return W(()=>!!n.isOpen())()?n.listboxId():void 0},get"aria-label"(){return l.ariaLabel()},get"aria-labelledby"(){return d()},get"aria-describedby"(){return l.ariaDescribedBy()},onPointerDown:e=>{_i(e,r.onPointerDown),e.currentTarget.dataset.pointerType=e.pointerType,!c()&&e.pointerType!==`touch`&&e.button===0&&(e.preventDefault(),n.toggle(!0))},onClick:e=>{_i(e,r.onClick),!c()&&e.currentTarget.dataset.pointerType===`touch`&&n.toggle(!0)},onKeyDown:e=>{if(_i(e,r.onKeyDown),!c())switch(_i(e,u.onKeyDown),e.key){case`Enter`:case` `:case`ArrowDown`:e.stopPropagation(),e.preventDefault(),n.toggle(`first`);break;case`ArrowUp`:e.stopPropagation(),e.preventDefault(),n.toggle(`last`);break;case`ArrowLeft`:{if(e.preventDefault(),n.isMultiple())return;let t=o().firstSelectedKey(),r=t==null?s().getFirstKey?.():s().getKeyAbove?.(t);r!=null&&o().select(r);break}case`ArrowRight`:{if(e.preventDefault(),n.isMultiple())return;let t=o().firstSelectedKey(),r=t==null?s().getFirstKey?.():s().getKeyBelow?.(t);r!=null&&o().select(r);break}}},onFocus:e=>{_i(e,r.onFocus),!o().isFocused()&&o().setFocused(!0)},onBlur:e=>{_i(e,r.onBlur),!n.isOpen()&&o().setFocused(!1)}},()=>n.dataset(),()=>t.dataset(),a))}function bd(e){let t=Iu(),n=ud(),[r,i]=V(Vi({id:n.generateId(`value`)},e),[`id`,`children`]),a=()=>n.listState().selectionManager(),o=()=>{let e=a().selectedKeys();return e.size===1&&e.has(``)?!0:a().isEmpty()};return M(()=>F(n.registerValueId(r.id))),z(Ta,B({as:`span`,get id(){return r.id},get"data-placeholder-shown"(){return o()?``:void 0}},()=>t.dataset(),i,{get children(){return z(U,{get when(){return!o()},get fallback(){return n.placeholder()},get children(){return z(xd,{state:{selectedOption:()=>n.selectedOptions()[0],selectedOptions:()=>n.selectedOptions(),remove:e=>n.removeOptionFromSelection(e),clear:()=>a().clearSelection()},get children(){return r.children}})}})}}))}function xd(e){return W(pe(()=>{let t=e.children;return ei(t)?t(e.state):t}))}var Sd=Object.assign(vd,{Arrow:Qc,Content:dd,Description:Lu,ErrorMessage:cd,HiddenSelect:fd,Icon:pd,Item:Yu,ItemDescription:Xu,ItemIndicator:Zu,ItemLabel:Qu,Label:md,Listbox:hd,Portal:gd,Section:ed,Trigger:yd,Value:bd}),Cd=G(`<svg width=16 height=16 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg aria-hidden=true><path d="M11 9.5L8 6.5L5 9.5"stroke=currentColor stroke-width=1 stroke-linecap=round stroke-linejoin=round>`),wd=G(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none xmlns=http://www.w3.org/2000/svg aria-hidden=true><path d="M3.53564 8.17857L6.39279 11.75L12.4642 4.25"stroke=currentColor stroke-width=1 stroke-linecap=round stroke-linejoin=round>`),Td=G(`<div data-slot=select-v2-value>`),Ed=G(`<span data-slot=select-v2-chevron aria-hidden=true>`),Dd=G(`<div data-slot=menu-v2-group-label>`);function Od(e,t){if(!t)return[{category:``,options:e}];let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i?i.push(r):n.set(e,[r])}return[...n.entries()].map(([e,t])=>({category:e,options:t}))}var kd=()=>Cd(),Ad=()=>wd();function jd(e){let[t,n]=V(e,[`class`,`classList`,`placeholder`,`options`,`current`,`value`,`label`,`groupBy`,`onSelect`,`onHighlight`,`onOpenChange`,`children`,`invalid`,`numeric`,`disabled`,`valueClass`,`contentClass`,`placement`,`gutter`,`sameWidth`,`flip`,`slide`,`fitViewport`]),r={},i=()=>{r.cleanup?.(),r.cleanup=void 0,r.key=void 0},a=e=>t.value?t.value(e):String(e),o=e=>{if(!t.onHighlight)return;if(!e){i();return}let n=a(e);r.key!==n&&(r.cleanup?.(),r.cleanup=t.onHighlight(e),r.key=n)};F(i);let s=N(()=>Od(t.options,t.groupBy));return z(vd,B(n,{multiple:!1,allowDuplicateSelectionEvents:!1,get disabled(){return t.disabled},"data-component":`select-v2-root`,get placement(){return t.placement??`bottom-end`},get gutter(){return t.gutter??4},get sameWidth(){return t.sameWidth??!1},get flip(){return t.flip??!0},get slide(){return t.slide??!0},get fitViewport(){return t.fitViewport??!1},get value(){return t.current},get options(){return s()},optionValue:e=>t.value?t.value(e):String(e),optionTextValue:e=>t.label?t.label(e):String(e),optionGroupChildren:`options`,get placeholder(){return t.placeholder},sectionComponent:e=>z(ed,{get children(){return z(U,{get when(){return e.section.rawValue.category},get children(){var t=Dd();return q(t,()=>e.section.rawValue.category),t}})}}),itemComponent:e=>z(Yu,B(e,{"data-component":`menu-v2-item`,onPointerEnter:()=>o(e.item.rawValue),onPointerMove:()=>o(e.item.rawValue),onFocus:()=>o(e.item.rawValue),get children(){return[z(Qu,{"data-slot":`menu-v2-item-content`,as:`span`,get children(){return W(()=>!!t.children)()?t.children(e.item.rawValue):W(()=>!!t.label)()?t.label(e.item.rawValue):String(e.item.rawValue)}}),z(Zu,{"data-slot":`menu-v2-item-indicator`,forceMount:!0,get children(){return z(Ad,{})}})]}})),onChange:e=>{let n=e==null?null:Array.isArray(e)?e[0]??null:e;t.onSelect?.(n),i()},onOpenChange:e=>{t.onOpenChange?.(e),e||i()},get children(){return[z(yd,{as:`div`,get"aria-label"(){return e[`aria-label`]},get"aria-labelledby"(){return e[`aria-labelledby`]},"data-component":`select-v2`,"data-appearance":`inline`,get"data-invalid"(){return t.invalid?``:void 0},get"data-numeric"(){return t.numeric?``:void 0},get disabled(){return t.disabled},get"data-disabled"(){return t.disabled?``:void 0},get classList(){return{...t.classList,[t.class??``]:!!t.class}},get children(){return[(()=>{var e=Td();return q(e,z(bd,{"data-slot":`select-v2-value-text`,get class(){return t.valueClass},children:e=>{let n=e.selectedOption();return t.label&&n!=null?t.label(n):n??``}})),e})(),(()=>{var e=Ed();return q(e,z(kd,{})),e})()]}}),z(gd,{get children(){return z(dd,{get class(){return t.contentClass},"data-component":`menu-v2-content`,"data-slot":`select-v2-content`,get children(){return z(hd,{"data-slot":`select-v2-listbox`})}})}})]}}))}var Md=`/assets/sprite-B9ixRF_T.svg`,Nd=`zhipuai.zhipuai-coding-plan.zenmux.zai.zai-coding-plan.xiaomi.xai.wandb.vultr.vivgrid.vercel.venice.v0.upstage.togetherai.synthetic.submodel.stepfun.stackit.siliconflow.siliconflow-cn.scaleway.sap-ai-core.requesty.qiniu-ai.qihang-ai.privatemode-ai.poe.perplexity.ovhcloud.openrouter.llmgateway.opencode.opencode-go.openai.ollama-cloud.nvidia.novita-ai.nova.nebius.nano-gpt.morph.moonshotai.moonshotai-cn.modelscope.moark.mistral.minimax.minimax-coding-plan.minimax-cn.minimax-cn-coding-plan.meganova.lucidquery.lmstudio.llama.kuae-cloud-coding-plan.kimi-for-coding.kilo.jiekou.io-net.inference.inception.iflowcn.huggingface.helicone.groq.google.google-vertex.google-vertex-anthropic.gitlab.github-models.github-copilot.friendli.firmware.fireworks-ai.fastrouter.evroc.digitalocean.deepseek.deepinfra.cortecs.cohere.cloudflare-workers-ai.cloudflare-ai-gateway.cloudferro-sherlock.chutes.cerebras.berget.baseten.bailing.azure.azure-cognitive-services.anthropic.amazon-bedrock.alibaba.alibaba-cn.aihubmix.abacus.302ai`.split(`.`),Pd=G(`<svg data-component=provider-icon><use>`),Fd=e=>{let[t,n]=V(e,[`id`,`class`,`classList`]),r=N(()=>Nd.includes(t.id)?t.id:`synthetic`);return(()=>{var e=Pd(),i=e.firstChild;return ht(e,B(n,{get classList(){return{...t.classList,[t.class??``]:!!t.class}}}),!0,!0),j(()=>K(i,`href`,`${Md}#${r()}`)),e})()};function Id(e){let t=e.filter(e=>Number.isFinite(e.start)&&(e.end===void 0||Number.isFinite(e.end)&&e.end>=e.start)).map(e=>({...e})).sort((e,t)=>e.start-t.start),n=[];for(let e of t){let t=n.at(-1);!t||e.start>(t.end??1/0)?n.push(e):t.end=t.end===void 0||e.end===void 0?void 0:Math.max(t.end,e.end)}return n}var Ld=(e,t)=>Id(e).reduce((e,n)=>e+Math.max(0,Math.min(n.end??t,t)-n.start),0),Rd=e=>{let t=e===void 0?NaN:Date.parse(e);return Number.isFinite(t)?t:void 0};function zd(e,t,n=!0){let r=typeof t==`number`?Number.isFinite(t)?t:void 0:Rd(t);return r!==void 0&&(!n||e-r>3e4)?Math.min(e,r):e}var Bd=e=>e.trim().toLowerCase(),Vd=(e,t)=>!!e.categories?.some(e=>t.includes(Bd(e)));function Hd(e,t,n=[...new Set(t.map(e=>e.eval))],r=[]){let i=[...new Set(n)],a=i.filter(e=>r.includes(e)||!t.some(t=>t.eval===e)),o=t.length&&!a.length&&t.every(e=>e.value!==null)?i.reduce((e,n)=>{let r=t.filter(e=>e.eval===n);return e+r.reduce((e,t)=>e+t.value,0)/r.length},0):null,s=o===null?null:100*o/i.length;return{model:e,components:t,unscoredEvals:a,earned:o,maximum:i.length,percentage:s,bounds:s===null?Gd(t,i,a):{lower:s,upper:s,coverage:100}}}var Ud=e=>e.bounds;function Wd(e,t){let n=e.components.filter(e=>Vd(e,t)),r=[...new Set(n.map(e=>e.eval))];return Hd(e.model,n,r,e.unscoredEvals.filter(e=>r.includes(e)))}function Gd(e,t,n){if(!t.length)return{lower:0,upper:100,coverage:0};let r=0,i=n.length,a=0;for(let t of e){if(n.includes(t.eval))continue;let o=1/e.filter(e=>e.eval===t.eval).length;if(!t.expected){i+=o;continue}r+=o*t.scoredSum/t.expected,i+=o*(t.scoredSum+t.expected-t.scored)/t.expected,a+=o*t.scored/t.expected}let o=100/t.length;return{lower:r*o,upper:i*o,coverage:a*o}}var Kd=e=>{let t=e.reduce((e,t)=>e+(t?.reportedUSD??0),0),n=e.every(e=>e?.complete===!0);return{reportedUSD:t,complete:n,usd:n?t:null}},qd=(e,t)=>Ld(e.runtime,t),[Jd,Yd]=A({}),Xd=e=>Yd(e??{}),Zd=e=>e.slice(e.indexOf(`/`)+1).split(`#`)[0].replace(/^omen-alpha$/i,`Omen Alpha`).replace(/^big-pickle$/i,`Big Pickle`).replace(/^gpt-/i,`GPT-`).replace(/^gemini-/,`Gemini `).replace(/^grok-/,`Grok `).replace(/^deepseek-v(\d+)-pro-(\d+)$/,`DeepSeek V$1 Pro $2`).replace(/^deepseek-v(\d+(?:\.\d+)?)-flash(?:-expires-on-\d+)?$/,`DeepSeek V$1 Flash`).replace(/^glm-/,`GLM-`).replace(/^muse-spark-/,`Muse Spark `).replace(/^claude-fable-(\d+)-(\d+)$/,`Claude Fable $1.$2`).replace(/-astra$/,` Astra`).replace(/-luna$/,` Luna`).replace(/-pro-preview$/,` Pro Preview`).replace(/-flash$/,` Flash`),Qd=e=>Jd()[e.split(`#`)[0]]??Zd(e),$d=e=>/deepseek/.test(e)?`deepseek`:/glm/.test(e)?`zai`:/grok/.test(e)?`xai`:/gpt|o[134]-/.test(e)?`openai`:/gemini/.test(e)?`google`:/claude/.test(e)?`anthropic`:/muse|llama/.test(e)?`llama`:e.split(`/`)[0],ef=e=>e.split(`#`)[1]??`default`,tf=e=>{let t=e.slice(e.indexOf(`/`)+1).split(`#`)[0].toLowerCase(),n=[[/^big-pickle$/,`OpenCode Zen`,`Big Pickle`],[/^omen-/,`OpenCode Go`,`Omen`],[/^gemini-/,`Google`,`Gemini`],[/^gpt-/,`OpenAI`,`GPT`],[/^o\d(?:-|$)/,`OpenAI`,`o-series`],[/^claude-/,`Anthropic`,`Claude`],[/^muse-/,`Meta`,`Muse`],[/^llama-/,`Meta`,`Llama`],[/^deepseek-/,`DeepSeek`,`DeepSeek`],[/^glm-/,`Z.ai`,`GLM`],[/^grok-/,`xAI`,`Grok`],[/^qwen/,`Alibaba`,`Qwen`],[/^kimi/,`Moonshot AI`,`Kimi`],[/^(?:mistral|devstral|codestral|magistral)/,`Mistral AI`,`Mistral`],[/^minimax/,`MiniMax`,`MiniMax`]].find(([e])=>e.test(t));return{lab:n?.[1]??e.split(`/`)[0],family:n?.[2]??t.split(`-`)[0]}},nf=(e,t)=>{if(!t.length)return!0;let n=tf(e);return t.includes(`lab:${n.lab}`)||t.includes(`family:${n.family}`)},rf=e=>e===null?`—`:Number(e.toFixed(2)).toString(),af=e=>e===null?`Pending`:`${rf(e)}%`,of=e=>e==null?`—`:new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:4}).format(e),sf=e=>new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),cf=e=>{let t=Math.round(e/1e3);return t<60?`${(e/1e3).toFixed(1)}s`:t<3600?`${Math.floor(t/60)}m ${t%60}s`:`${Math.floor(t/3600)}h ${Math.floor(t/60)%60}m ${t%60}s`},lf=e=>({waiting:`Waiting`,watching:`Watching evidence`,stopped:`Stopped early`,blocked:`Blocked`,timed_out:`Timed out`,queued:`Queued`,in_progress:`In progress`,completed:`Completed`,failed:`Failed`,cancelled:`Cancelled`,interrupted:`Interrupted`})[e]??e,uf=G(`<div class=criterion-legend><span></span><ol aria-label="Criteria in bar order">`),df=G(`<div class=score-chart role=group aria-label="Model scores from zero to one hundred percent"><div class=chart-scale><span>Model</span><div></div><span>Score`),ff=G(`<span class=category-chips>`),pf=G(`<li>`),mf=G(`<span class=category-chip>`),hf=G(`<span>%`),gf=G(`<div class=chart-range>`),_f=G(`<span class=chart-points>`),vf=G(`<div class=chart-model><button class=chart-row><div class=model-identity><span class=provider-mark></span><div><strong></strong><small></small></div></div><div class=chart-track aria-hidden=true><div class=chart-grid></div><div class=chart-bar></div></div><div class=chart-score><span>`),yf=G(`<i>`),bf=G(`<button class="chart-row criterion-row"><div class=chart-track aria-hidden=true><div class=chart-bar></div></div><span class=criterion-score>`);function xf(e){let t=N(()=>e.criteria?e.scores[0]?.components??[]:[]),n=()=>[...e.scores].sort((e,t)=>Ud(t).lower-Ud(e).lower),r=e=>{let t=e.components.reduce((e,t)=>e+t.expected,0),n=e.components.reduce((e,t)=>e+t.scored,0);return t?new Set(e.components.map(e=>e.eval)).size>1?`${n}/${t} checks scored`:n===t&&e.components.every(e=>e.passed!==void 0)?`${e.components.reduce((e,t)=>e+t.passed,0)}/${t} passed`:`${e.components.every(e=>e.passed!==void 0)?`${e.components.reduce((e,t)=>e+t.passed,0)} passed · `:``}${n}/${t} scored`:``},i=e=>{let t=Ud(e);return t.upper-t.lower>1e-6?`${rf(t.lower)}–${af(t.upper)}`:af(t.lower)};return(()=>{var a=df(),o=a.firstChild,s=o.firstChild.nextSibling;return q(a,z(U,{get when(){return t().length},get children(){var e=uf(),n=e.firstChild,r=n.nextSibling;return q(n,()=>t().length>1?`Criteria · top to bottom`:`Criterion`),q(r,z(H,{get each(){return t()},children:e=>(()=>{var t=pf();return q(t,()=>e.name??e.criterion,null),q(t,z(U,{get when(){return e.categories?.length},get children(){var t=ff();return q(t,z(H,{get each(){return e.categories},children:e=>(()=>{var t=mf();return q(t,e),t})()})),t}}),null),t})()})),e}}),o),q(s,z(H,{each:[0,25,50,75,100],children:e=>(()=>{var t=hf(),n=t.firstChild;return q(t,e,n),t})()})),q(a,z(H,{get each(){return n()},children:t=>(()=>{var n=vf(),a=n.firstChild,o=a.firstChild,s=o.firstChild,c=s.nextSibling.firstChild,l=c.nextSibling,u=o.nextSibling,d=u.firstChild,f=d.nextSibling,p=u.nextSibling,m=p.firstChild;return a.$$click=()=>e.onSelect?.(t.model),q(s,z(Fd,{get id(){return $d(t.model)}})),q(c,()=>Qd(t.model)),q(l,()=>ef(t.model)),q(d,z(H,{each:[0,25,50,75,100],children:e=>(()=>{var t=yf();return mt(t,`left`,`${e}%`),t})()})),q(u,z(U,{get when(){return Ud(t).upper>Ud(t).lower+1e-6},get children(){var e=gf();return j(n=>{var r=`${Ud(t).lower}%`,i=`${Ud(t).upper-Ud(t).lower}%`;return r!==n.e&&mt(e,`left`,n.e=r),i!==n.t&&mt(e,`width`,n.t=i),n},{e:void 0,t:void 0}),e}}),null),q(u,z(U,{get when(){return!e.public},get children(){var e=_f();return q(e,()=>r(t)),e}}),null),q(m,()=>i(t)),q(p,z(U,{get when(){return e.onSelect},get children(){return z(No,{name:`chevron-right`})}}),null),q(n,z(U,{get when(){return W(()=>!!e.criteria)()&&t.components.length>1},get children(){return z(H,{get each(){return t.components},children:(n,a)=>{let o=()=>Hd(t.model,[n]),s=()=>`${a()+1}. ${n.name??n.criterion}: ${i(o())}${e.public?``:`, ${r(o())}`}`;return(()=>{var n=bf(),r=n.firstChild,a=r.firstChild,c=r.nextSibling;return n.$$click=()=>e.onSelect?.(t.model),q(r,z(U,{get when(){return Ud(o()).upper>Ud(o()).lower+1e-6},get children(){var e=gf();return j(t=>{var n=`${Ud(o()).lower}%`,r=`${Ud(o()).upper-Ud(o()).lower}%`;return n!==t.e&&mt(e,`left`,t.e=n),r!==t.t&&mt(e,`width`,t.t=r),t},{e:void 0,t:void 0}),e}}),null),q(c,()=>i(o())),j(r=>{var i=!e.onSelect,c=`${Qd(t.model)}, ${s()}`,l=s(),u=`${Ud(o()).lower}%`;return i!==r.e&&(n.disabled=r.e=i),c!==r.t&&K(n,`aria-label`,r.t=c),l!==r.a&&K(n,`title`,r.a=l),u!==r.o&&mt(a,`width`,r.o=u),r},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()}})}}),null),j(n=>{var o=`chart:${t.model}`,s=!!e.onSelect,c=!e.onSelect,l=`${Qd(t.model)}, ${i(t)}${e.public?``:`, ${r(t)}`}${e.onSelect?`, inspect eval run`:``}`,u=`Earned ${af(Ud(t).lower)}. Possible final score ${i(t)}.`,d=`${Ud(t).lower}%`,m=t.percentage===null;return o!==n.e&&K(a,`data-run-key`,n.e=o),s!==n.t&&a.classList.toggle(`inspectable`,n.t=s),c!==n.a&&(a.disabled=n.a=c),l!==n.o&&K(a,`aria-label`,n.o=l),u!==n.i&&K(a,`title`,n.i=u),d!==n.n&&mt(f,`width`,n.n=d),m!==n.s&&p.classList.toggle(`range`,n.s=m),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),n})()}),null),a})()}st([`click`]);var Sf=mn({name:`FileComponent`,init:e=>e.component}),Cf=Sf.provider,wf=Sf.use;function Tf(e){if(!e)return;let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function Ef(e,t=5e5){if(!e)return;if(e.length<=t)return Tf(e);let n=4096;return`${e.length}:${[0,Math.floor(e.length*.25),Math.floor(e.length*.5),Math.floor(e.length*.75),e.length-n].map(t=>{let r=Math.max(0,Math.min(e.length-n,t-2048));return Tf(e.slice(r,r+n))??``}).join(`:`)}`}var Df=`diffs-container`,Of=/(?=^From [a-f0-9]+ .+$)/m,kf=/(?=^diff --git)/gm,Af=/(?<=\n)/,jf=/^(---|\+\+\+)\s+([^\t\r\n]+)/,Mf=/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,Nf=/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,Pf=/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,Ff=`header-prefix`,If=`header-metadata`,Lf=`header-custom`,Rf={dark:`pierre-dark`,light:`pierre-light`},zf=`data-theme-css`,Bf=`data-unsafe-css`,Vf=`data-diffs-scrollbar-measure`,Hf=`--diffs-scrollbar-gutter-measured`,Uf=1e5,Wf={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...Wf});var Gf=Object.freeze({fromStart:0,fromEnd:0}),Kf={startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},qf={startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},Jf=new Set,Yf=null;function Xf(e){Jf.add(e),Yf??=requestAnimationFrame(Zf)}function Zf(e){let t=new Set(Jf);Jf.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}Yf=Jf.size>0?requestAnimationFrame(Zf):null}function Qf(e,t,n){if(e===t||e==null||t==null)return e===t;let r=new Set(n),i=Object.keys(e),a=new Set(Object.keys(t));for(let n of i)if(a.delete(n),!r.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!r.has(e))return!1;return!0}function $f(e,t){return e==null||t==null||typeof e==`string`||typeof t==`string`?e===t:e.dark===t.dark&&e.light===t.light}function ep(e,t){let n=e?.theme??Rf,r=t?.theme??Rf,i=tp(e),a=tp(t);return $f(n,r)&&Qf(e,t,[`theme`,`parseDiffOptions`])&&Qf(i,a)}function tp(e){if(e!=null&&`parseDiffOptions`in e)return e.parseDiffOptions}function np(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function rp({scrollTop:e,scrollHeight:t,height:n,fitPerfectly:r=!1,fitPerfectlyOverscroll:i=0,overscrollSize:a}){let o=n+a*2,s=r?n+i*2:o;if(t=Math.max(t,s),o>=t||r){let n=Math.max(e-i,0),r=Math.min(e+s,t);return{top:n,bottom:Math.max(r,n)}}let c=e+n/2-o/2,l=c+o;return c<0&&(c=0),l>t&&(l=t),c=Math.floor(Math.max(c,0)),{top:c,bottom:Math.ceil(Math.max(Math.min(l,t),c))}}function ip(e){return{type:`text`,value:e}}function ap({tagName:e,children:t=[],properties:n={}}){return{type:`element`,tagName:e,properties:n,children:t}}function op({name:e,width:t=16,height:n=16,properties:r}){return ap({tagName:`svg`,properties:{width:t,height:n,viewBox:`0 0 16 16`,...r},children:[ap({tagName:`use`,properties:{href:`#${e.replace(/^#/,``)}`}})]})}function sp(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t;t=`children`in t?t.children[0]:null}}function cp(e){return ap({tagName:`div`,properties:{"data-gutter":``},children:e})}function lp(e,t,n,r={}){return ap({tagName:`div`,properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...r},children:t==null?void 0:[ap({tagName:`span`,properties:{"data-line-number-content":``},children:[ip(`${t}`)]})]})}function up(e,t,n){return ap({tagName:`div`,properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":t===`annotation`?void 0:e,style:t===`annotation`?`grid-row: span ${n};`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})}function dp(){return ap({tagName:`button`,properties:{"data-utility-button":``,type:`button`},children:[op({name:`diffs-icon-plus`,properties:{"data-icon":``}})]})}function fp(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side}var pp=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],mp=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};mp.prototype.normal={},mp.prototype.property={},mp.prototype.space=void 0;function hp(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new mp(n,r,t)}function gp(e){return e.toLowerCase()}var _p=class{constructor(e,t){this.attribute=t,this.property=e}};_p.prototype.attribute=``,_p.prototype.booleanish=!1,_p.prototype.boolean=!1,_p.prototype.commaOrSpaceSeparated=!1,_p.prototype.commaSeparated=!1,_p.prototype.defined=!1,_p.prototype.mustUseProperty=!1,_p.prototype.number=!1,_p.prototype.overloadedBoolean=!1,_p.prototype.property=``,_p.prototype.spaceSeparated=!1,_p.prototype.space=void 0;var vp=s({boolean:()=>Z,booleanish:()=>bp,commaOrSpaceSeparated:()=>wp,commaSeparated:()=>Cp,number:()=>Q,overloadedBoolean:()=>xp,spaceSeparated:()=>Sp}),yp=0,Z=Tp(),bp=Tp(),xp=Tp(),Q=Tp(),Sp=Tp(),Cp=Tp(),wp=Tp();function Tp(){return 2**++yp}var Ep=Object.keys(vp),Dp=class extends _p{constructor(e,t,n,r){let i=-1;if(super(e,t),Op(this,`space`,r),typeof n==`number`)for(;++i<Ep.length;){let e=Ep[i];Op(this,Ep[i],(n&vp[e])===vp[e])}}};Dp.prototype.defined=!0;function Op(e,t,n){n&&(e[t]=n)}function kp(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Dp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[gp(r)]=r,n[gp(a.attribute)]=r}return new mp(t,n,e.space)}var Ap=kp({properties:{ariaActiveDescendant:null,ariaAtomic:bp,ariaAutoComplete:null,ariaBusy:bp,ariaChecked:bp,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:Sp,ariaCurrent:null,ariaDescribedBy:Sp,ariaDetails:null,ariaDisabled:bp,ariaDropEffect:Sp,ariaErrorMessage:null,ariaExpanded:bp,ariaFlowTo:Sp,ariaGrabbed:bp,ariaHasPopup:null,ariaHidden:bp,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Sp,ariaLevel:Q,ariaLive:null,ariaModal:bp,ariaMultiLine:bp,ariaMultiSelectable:bp,ariaOrientation:null,ariaOwns:Sp,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:bp,ariaReadOnly:bp,ariaRelevant:null,ariaRequired:bp,ariaRoleDescription:Sp,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:bp,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function jp(e,t){return t in e?e[t]:t}function Mp(e,t){return jp(e,t.toLowerCase())}var Np=kp({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Cp,acceptCharset:Sp,accessKey:Sp,action:null,allow:null,allowFullScreen:Z,allowPaymentRequest:Z,allowUserMedia:Z,alpha:Z,alt:null,as:null,async:Z,autoCapitalize:null,autoComplete:Sp,autoFocus:Z,autoPlay:Z,blocking:Sp,capture:null,charSet:null,checked:Z,cite:null,className:Sp,closedBy:null,colorSpace:null,cols:Q,colSpan:Q,command:null,commandFor:null,content:null,contentEditable:bp,controls:Z,controlsList:Sp,coords:Q|Cp,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Z,defer:Z,dir:null,dirName:null,disabled:Z,download:xp,draggable:bp,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Z,formTarget:null,headers:Sp,height:Q,hidden:xp,high:Q,href:null,hrefLang:null,htmlFor:Sp,httpEquiv:Sp,id:null,imageSizes:null,imageSrcSet:null,inert:Z,inputMode:null,integrity:null,is:null,isMap:Z,itemId:null,itemProp:Sp,itemRef:Sp,itemScope:Z,itemType:Sp,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Z,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:Z,muted:Z,name:null,nonce:null,noModule:Z,noValidate:Z,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:Z,optimum:Q,pattern:null,ping:Sp,placeholder:null,playsInline:Z,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Z,referrerPolicy:null,rel:Sp,required:Z,reversed:Z,rows:Q,rowSpan:Q,sandbox:Sp,scope:null,scoped:Z,seamless:Z,selected:Z,shadowRootClonable:Z,shadowRootCustomElementRegistry:Z,shadowRootDelegatesFocus:Z,shadowRootMode:null,shadowRootSerializable:Z,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:bp,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:Z,useMap:null,value:bp,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Sp,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Z,declare:Z,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:Z,noHref:Z,noShade:Z,noWrap:Z,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:bp,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Z,disablePictureInPicture:Z,disableRemotePlayback:Z,exportParts:Cp,part:Sp,prefix:null,property:null,results:Q,security:null,unselectable:null},space:`html`,transform:Mp}),Pp=kp({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`,maskType:`mask-type`,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:wp,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:Sp,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:Z,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:Cp,g2:Cp,glyphName:Cp,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:wp,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Sp,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wp,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wp,rev:wp,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wp,requiredFeatures:wp,requiredFonts:wp,requiredFormats:wp,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:wp,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wp,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wp,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:jp}),Fp=kp({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()}}),Ip=kp({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Mp}),Lp=kp({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Rp=/[A-Z]/g,zp=/-[a-z]/g,Bp=/^data[-\w.:]+$/i;function Vp(e,t){let n=gp(t),r=t,i=_p;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Bp.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(zp,Up);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!zp.test(e)){let n=e.replace(Rp,Hp);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Dp}return new i(r,t)}function Hp(e){return`-`+e.toLowerCase()}function Up(e){return e.charAt(1).toUpperCase()}var Wp=hp([Ap,Np,Fp,Ip,Lp],`html`),Gp=hp([Ap,Pp,Fp,Ip,Lp],`svg`),Kp={}.hasOwnProperty;function qp(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Kp.call(t,e)){let n=String(t[e]);i=Kp.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 Jp=/["&'<>`]/g,Yp=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xp=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Zp=/[|\\{}()[\]^$+*?.]/g,Qp=new WeakMap;function $p(e,t){if(e=e.replace(t.subset?em(t.subset):Jp,r),t.subset||t.escapeOnly)return e;return e.replace(Yp,n).replace(Xp,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 em(e){let t=Qp.get(e);return t||(t=tm(e),Qp.set(e,t)),t}function tm(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Zp,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var nm=/[\dA-Fa-f]/;function rm(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!nm.test(String.fromCharCode(t))?r:r+`;`}var im=/\d/;function am(e,t,n){let r=`&#`+String(e);return n&&t&&!im.test(String.fromCharCode(t))?r:r+`;`}var om=`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(`.`),sm={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:`€`},cm=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],lm={}.hasOwnProperty,um={},dm;for(dm in sm)lm.call(sm,dm)&&(um[sm[dm]]=dm);var fm=/[^\dA-Za-z]/;function pm(e,t,n,r){let i=String.fromCharCode(e);if(lm.call(um,i)){let e=um[i],a=`&`+e;return n&&om.includes(e)&&!cm.includes(e)&&(!r||t&&t!==61&&fm.test(String.fromCharCode(t)))?a:a+`;`}return``}function mm(e,t,n){let r=rm(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=pm(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=am(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function hm(e,t){return $p(e,Object.assign({format:mm},t))}var gm=/^>|^->|<!--|-->|--!>|<!-$/g,_m=[`>`],vm=[`<`,`>`];function ym(e,t,n,r){return r.settings.bogusComments?`<?`+hm(e.value,Object.assign({},r.settings.characterReferences,{subset:_m}))+`>`:`<!--`+e.value.replace(gm,i)+`-->`;function i(e){return hm(e,Object.assign({},r.settings.characterReferences,{subset:vm}))}}function bm(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function xm(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 Sm(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function Cm(e){return e.join(` `).trim()}var wm=/[ \t\n\f\r]/g;function Tm(e){return typeof e==`object`?e.type===`text`&&Em(e.value):Em(e)}function Em(e){return e.replace(wm,``)===``}var Dm=Am(1),Om=Am(-1),km=[];function Am(e){return t;function t(t,n,r){let i=t?t.children:km,a=(n||0)+e,o=i[a];if(!r)for(;o&&Tm(o);)a+=e,o=i[a];return o}}var jm={}.hasOwnProperty;function Mm(e){return t;function t(t,n,r){return jm.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Nm=Mm({body:Im,caption:Pm,colgroup:Pm,dd:Bm,dt:zm,head:Pm,html:Fm,li:Rm,optgroup:Hm,option:Um,p:Lm,rp:Vm,rt:Vm,tbody:Gm,td:Jm,tfoot:Km,th:Jm,thead:Wm,tr:qm});function Pm(e,t,n){let r=Dm(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Tm(r.value.charAt(0)))}function Fm(e,t,n){let r=Dm(n,t);return!r||r.type!==`comment`}function Im(e,t,n){let r=Dm(n,t);return!r||r.type!==`comment`}function Lm(e,t,n){let r=Dm(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 Rm(e,t,n){let r=Dm(n,t);return!r||r.type===`element`&&r.tagName===`li`}function zm(e,t,n){let r=Dm(n,t);return!(!r||r.type!==`element`||r.tagName!==`dt`&&r.tagName!==`dd`)}function Bm(e,t,n){let r=Dm(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Vm(e,t,n){let r=Dm(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Hm(e,t,n){let r=Dm(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Um(e,t,n){let r=Dm(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Wm(e,t,n){let r=Dm(n,t);return!(!r||r.type!==`element`||r.tagName!==`tbody`&&r.tagName!==`tfoot`)}function Gm(e,t,n){let r=Dm(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Km(e,t,n){return!Dm(n,t)}function qm(e,t,n){let r=Dm(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Jm(e,t,n){let r=Dm(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Ym=Mm({body:Qm,colgroup:$m,head:Zm,html:Xm,tbody:eh});function Xm(e){let t=Dm(e,-1);return!t||t.type!==`comment`}function Zm(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 Qm(e){let t=Dm(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Tm(t.value.charAt(0)))&&(t.type!==`element`||t.tagName!==`meta`&&t.tagName!==`link`&&t.tagName!==`script`&&t.tagName!==`style`&&t.tagName!==`template`)}function $m(e,t,n){let r=Om(n,t),i=Dm(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Nm(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function eh(e,t,n){let r=Om(n,t),i=Dm(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Nm(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var th={name:[[`
17
- \f\r &/=>`.split(``),`
18
- \f\r "&'/=>\``.split(``)],[`\0
19
- \f\r "&'/<=>`.split(``),`\0
20
- \f\r "&'/<=>\``.split(``)]],unquoted:[[`
21
- \f\r &>`.split(``),`\0
22
- \f\r "&'<=>\``.split(``)],[`\0
23
- \f\r "&'<=>\``.split(``),`\0
24
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function nh(e,t,n,r){let i=r.schema,a=i.space!==`svg`&&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=Gp);let l=rh(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!Ym(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||!Nm(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function rh(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=ih(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 ih(e,t,n){let r=Vp(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=hm(r.attribute,Object.assign({},e.settings.characterReferences,{subset:th.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Sm:Cm)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=hm(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:th.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&xm(n,o)>xm(n,e.alternative)&&(o=e.alternative),s=o+hm(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?th.single:th.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var ah=[`<`,`&`];function oh(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:hm(e.value,Object.assign({},r.settings.characterReferences,{subset:ah}))}function sh(e,t,n,r){return r.settings.allowDangerousHtml?e.value:oh(e,t,n,r)}function ch(e,t,n,r){return r.all(e)}var lh=qp(`type`,{invalid:uh,unknown:dh,handlers:{comment:ym,doctype:bm,element:nh,raw:sh,root:ch,text:oh}});function uh(e){throw Error("Expected node, not `"+e+"`")}function dh(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var fh={},ph={},mh=[];function hh(e,t){let n=t||fh,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:gh,all:_h,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||pp,characterReferences:n.characterReferences||ph,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Gp:Wp,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function gh(e,t,n){return lh(e,t,n,this)}function _h(e){let t=[],n=e&&e.children||mh,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var vh=class{hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;proposedSelectedRange;renderedSelectionRange;selectionAnchor;queuedSelectionRender;pointerSession={mode:`idle`};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener(`click`,this.handlePointerClick),this.pre?.removeEventListener(`pointerdown`,this.handlePointerDown),this.pre?.removeEventListener(`pointermove`,this.handlePointerMove),this.pre?.removeEventListener(`pointerleave`,this.handlePointerLeave),this.pre?.removeAttribute(`data-interactive-lines`),this.pre?.removeAttribute(`data-interactive-line-numbers`),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):this.gutterUtilityContainer!=null&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.pointerSession.mode===`gutterSelecting`&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectionRange=void 0}isSelectionDirty(){return this.renderedSelectionRange===null}setSelection(e,t){let n=!(e===this.selectedRange||np(e??void 0,this.selectedRange??void 0));(this.isSelectionDirty()||n)&&(this.proposedSelectedRange=void 0,this.selectedRange=e,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(e!=null){if(this.mode===`diff`&&e.type===`diff-line`)return{lineNumber:e.lineNumber,side:e.annotationSide};if(this.mode===`file`&&e.type===`line`)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:r,onTokenClick:i,onMergeConflictActionClick:a}=this.options;(t!=null||n!=null||r!=null||a!=null||i!=null)&&(this.options.onGutterUtilityClick!=null&&Fh(e.composedPath())||(Ih(this.options.__debugPointerEvents,`click`,`FileDiff.DEBUG.handlePointerClick:`,e),this.handlePointerEvent({eventType:`click`,event:e})))};handlePointerMove=e=>{if(e.pointerType!==`mouse`)return;let{lineHoverHighlight:t=`disabled`,onLineEnter:n,onLineLeave:r,onTokenEnter:i,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;(t!==`disabled`||o||n!=null||r!=null||i!=null||a!=null)&&(Ih(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(Ih(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){Ih(t,`move`,`FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token`);return}this.hoveredToken!=null&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),this.hoveredLine!=null&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility()};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,r=t.composedPath();Ih(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);Ih(n,e,`FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:`,i);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:c,onTokenClick:l,onTokenEnter:u,onTokenLeave:d,onHunkExpand:f,onMergeConflictActionClick:p}=this.options;switch(e){case`move`:{let e=Ch(i)&&this.hoveredLine?.lineElement===i.lineElement;Sh(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),Sh(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),Ch(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(Th(i)&&p!=null){p(i);break}if(wh(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!Ch(i))break;Sh(i)&&l!=null&&l(this.toTokenEventBaseProps(i),t);let e=this.toEventBaseProps(i);o!=null&&i.numberColumn?o({...e,event:t}):a?.({...e,event:t});break}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n=`disabled`,onLineClick:r,onLineNumberClick:i,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:c,onTokenLeave:l,onHunkExpand:u,onMergeConflictActionClick:d,enableGutterUtility:f=!1,enableLineSelection:p=!1,onGutterUtilityClick:m}=this.options,h=m!=null,g=n!==`disabled`||r!=null||i!=null||a!=null||o!=null||s!=null||c!=null||l!=null||u!=null||d!=null||f||p||h;g&&!this.hasPointerListeners?(e.addEventListener(`click`,this.handlePointerClick),e.addEventListener(`pointerdown`,this.handlePointerDown),e.addEventListener(`pointermove`,this.handlePointerMove),e.addEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!0,Ih(t,`click`,`FileDiff.DEBUG.attachEventListeners: Attaching click events for:`,(()=>{let e=[];return(t===`both`||t===`click`)&&(r!=null&&e.push(`onLineClick`),i!=null&&e.push(`onLineNumberClick`),u!=null&&e.push(`expandable hunk separators`),d!=null&&e.push(`merge conflict actions`)),e})()),Ih(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),Ih(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event`)):!g&&this.hasPointerListeners&&(e.removeEventListener(`click`,this.handlePointerClick),e.removeEventListener(`pointerdown`,this.handlePointerDown),e.removeEventListener(`pointermove`,this.handlePointerMove),e.removeEventListener(`pointerleave`,this.handlePointerLeave),this.hasPointerListeners=!1);let _=this.pointerSession.mode===`selecting`||this.pointerSession.mode===`pendingSingleLineUnselect`,v=this.pointerSession.mode===`gutterSelecting`;(!p&&_||!h&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(this.pre==null)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,r=e!=null,i=t!=null||n;r&&!this.interactiveLinesAttr?(this.pre.setAttribute(`data-interactive-lines`,``),this.interactiveLinesAttr=!0):!r&&this.interactiveLinesAttr&&(this.pre.removeAttribute(`data-interactive-lines`),this.interactiveLinesAttr=!1),i&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute(`data-interactive-line-numbers`,``),this.interactiveLineNumbersAttr=!0):!i&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute(`data-interactive-line-numbers`),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if(e.pointerType===`mouse`&&e.button!==0||this.pre==null||this.pointerSession.mode!==`idle`)return;let t=e.composedPath();Fh(t)&&this.options.onGutterUtilityClick!=null?this.startGutterSelectionFromPointerDown(e):(e.pointerType!==`mouse`&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:`event-path`,requireNumberColumn:!0});if(n==null)return;let{pre:r}=this;if(r==null)return;e.preventDefault();let{lineNumber:i,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&this.selectedRange!=null){let t=this.getIndexesFromSelection(this.selectedRange,r.getAttribute(`data-diff-type`)===`split`);if(t==null)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===i&&this.selectedRange?.end===i){let t={lineNumber:i,side:a};this.selectionAnchor=t,this.pointerSession={mode:`pendingSingleLineUnselect`,pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}this.options.controlledSelection===!0?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:i,side:a},this.updateSelection(i,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:`selecting`,pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;if(n==null)return;let r=this.currentSelectionEnds(),i=r?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),a=r?.top??i;i!=null&&a!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:a,current:i},t&&(this.selectionAnchor={lineNumber:a.lineNumber,side:a.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange())),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{let{enableLineSelection:t=!1}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let n=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(n==null)return;this.pointerSession.current=n,t===!0&&this.updateSelection(n.lineNumber,n.side);return}case`selecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;this.updateSelection(t.lineNumber,t.eventSide);return}case`pendingSingleLineUnselect`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:`coordinates-first`,requireNumberColumn:!1});if(t==null||this.selectionAnchor==null)return;let n={lineNumber:t.lineNumber,side:t.eventSide};if(fp(this.pointerSession.pending,n))return;this.updateSelection(t.lineNumber,t.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:`selecting`,pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{enableLineSelection:t=!1,onGutterUtilityClick:n}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(this.pointerSession.current=r,t&&this.updateSelection(r.lineNumber,r.side)),n?.(this.buildSelectedLineRange(this.pointerSession.anchor,this.pointerSession.current)),this.selectionAnchor=void 0,t&&(this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case`pendingSingleLineUnselect`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection();return;case`selecting`:if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:case`selecting`:case`pendingSingleLineUnselect`:if(`pointerId`in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){this.hoveredLine!=null&&(this.hoveredLine.lineElement.removeAttribute(`data-hovered`),this.hoveredLine.numberElement.removeAttribute(`data-hovered`),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t=`disabled`}=this.options;this.hoveredLine!=null&&this.clearHoveredLine(),this.hoveredLine=e,t!==`disabled`&&((t===`both`||t===`line`)&&this.hoveredLine.lineElement.setAttribute(`data-hovered`,``),(t===`both`||t===`number`)&&this.hoveredLine.numberElement.setAttribute(`data-hovered`,``))}clearHoveredToken(){this.hoveredToken!=null&&(this.hoveredToken=void 0)}setHoveredToken(e){this.hoveredToken!=null&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(this.gutterUtilityContainer??(this.gutterUtilityContainer=document.createElement(`div`),this.gutterUtilityContainer.setAttribute(`data-gutter-utility-slot`,``)),e)this.gutterUtilityButton!=null&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),this.gutterUtilitySlot??(this.gutterUtilitySlot=document.createElement(`slot`),this.gutterUtilitySlot.name=`gutter-utility-slot`),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,this.gutterUtilityButton==null){let e=document.createElement(`div`);e.innerHTML=hh(dp());let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error(`InteractionManager.ensureGutterUtilityNode: Node element should be a button`);t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);xh(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}placeUtility(){if(!this.placeUtilityFromSelection()){if(this.hoveredLine!=null){this.showUtilityOnLine(this.hoveredLine);return}this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(e==null)return!1;let t=this.targetForSelectionPoint(e.bottom);return t==null?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){this.gutterUtilityContainer!=null&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return e==null?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},r=this.selectionPointRowIndex(t),i=this.selectionPointRowIndex(n);if(r!=null&&i!=null)return r>i?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(t!=null)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(this.pre==null)return;let t=this.getLineIndex(e.lineNumber,e.side);if(t==null)return;let n=this.mode===`diff`?`${t[0]},${t[1]}`:`${t[0]}`,r=this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`);for(let t of r){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(Oh(t));if(xh(n)&&(this.mode!==`diff`||e.side==null||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||=(document.addEventListener(`pointermove`,this.handleDocumentPointerMove),document.addEventListener(`pointerup`,this.handleDocumentPointerUp),document.addEventListener(`pointercancel`,this.handleDocumentPointerCancel),!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&=(document.removeEventListener(`pointermove`,this.handleDocumentPointerMove),document.removeEventListener(`pointerup`,this.handleDocumentPointerUp),document.removeEventListener(`pointercancel`,this.handleDocumentPointerCancel),!1)}clearPointerSession(){this.pointerSession={mode:`idle`}}clearPendingSingleLineState(){this.pointerSession.mode===`pendingSingleLineUnselect`&&(this.pointerSession={mode:`idle`})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(xh(n)&&(!t||n.numberColumn)&&n.splitLineIndex!=null)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:this.mode===`diff`?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionInfoFromPath(n,t.requireNumberColumn)}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(xh(t))return{lineNumber:t.lineNumber,side:this.mode===`diff`?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return n==null?void 0:this.selectionPointFromPath(n)}resolveSelectionPath(e,t){let n=t.excludeUtility!==!1;switch(t.source){case`event-path`:return this.pathFromEventPath(e.composedPath(),n);case`coordinates-first`:{let t=this.pathFromCoordinates(e,n);return t===void 0?this.pathFromEventPath(e.composedPath(),n):t??void 0}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(n!==void 0)return n===null?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&Fh(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=Oh(e);if(t&&Fh(n))return;let r=kh(e);return r==null?this.pathFromAnnotationSlot(e):Oh(r)}pathFromAnnotationSlot(e){let t=jh(Ah(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:Oh(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=Mh(t)?t:Mh(document)?document:void 0;if(n!=null)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return n==null?[e-1,e-1]:n(e,t)}getCurrentSelectionRange(){return this.proposedSelectedRange===void 0?this.selectedRange:this.proposedSelectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,n=!0){let r=this.getCurrentSelectionRange(),i;if(e==null)i=null;else{let n=this.selectionAnchor?.side??t,r=this.selectionAnchor?.lineNumber??e;i=this.buildSelectionRange(r,e,n,t)}np(r??void 0,i??void 0)||(this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,this.queuedSelectionRender??=requestAnimationFrame(this.renderSelection)),this.placeUtility(),n&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(this.pre==null)return;let n=this.getLineIndex(e.start,e.side),r=this.getLineIndex(e.end,e.endSide??e.side);return n!=null&&r!=null?{start:t?n[1]:n[0],end:t?r[1]:r[0]}:void 0}renderSelection=()=>{if(this.queuedSelectionRender!=null&&(cancelAnimationFrame(this.queuedSelectionRender),this.queuedSelectionRender=void 0),this.pre==null||this.renderedSelectionRange===this.selectedRange)return;let e=this.pre.querySelectorAll(`[data-selected-line]`);for(let t of e)t.removeAttribute(`data-selected-line`);if(this.renderedSelectionRange=this.selectedRange,this.selectedRange==null)return;let{children:t}=this.pre;if(t.length===0)return;if(t.length>2)throw console.error(t),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let n=this.pre.getAttribute(`data-diff-type`)===`split`,r=this.getIndexesFromSelection(this.selectedRange,n);if(r==null)throw console.error({rowRange:r,selectedRange:this.selectedRange}),Error(`InteractionManager.renderSelection: No valid rowRange`);let i=r.start===r.end,a=Math.min(r.start,r.end),o=Math.max(r.start,r.end);for(let e of t){let[t,r]=e.children,s=r.children.length;if(s!==t.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);for(let e=0;e<s;e++){let s=r.children[e],c=t.children[e];if(!(s instanceof HTMLElement)||!(c instanceof HTMLElement))continue;let l=this.parseLineIndex(s,n);if((l??0)>o)break;if(l==null||l<a)continue;let u=i?`single`:l===a?`first`:l===o?`last`:``;s.setAttribute(`data-selected-line`,u),c.setAttribute(`data-selected-line`,u),c.nextSibling instanceof HTMLElement&&s.nextSibling instanceof HTMLElement&&(s.nextSibling.hasAttribute(`data-line-annotation`)||s.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(i?(u=`last`,s.setAttribute(`data-selected-line`,`first`)):l===a?u=``:l===o&&s.setAttribute(`data-selected-line`,``),s.nextSibling.setAttribute(`data-selected-line`,u),c.nextSibling.setAttribute(`data-selected-line`,u))}}};notifySelectionCommitted(){this.options.onLineSelected?.(this.getCurrentSelectionRange()??null)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return this.mode===`file`?{type:`line`,lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:`diff-line`,annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}){return this.mode===`file`?{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:i,tokenText:a}:{type:`token`,lineCharEnd:e,lineCharStart:t,lineNumber:n,side:r,tokenElement:i,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,r){return{start:e,end:t,...n==null?{}:{side:n},...n!==r&&r!=null?{endSide:r}:{}}}resolvePointerTarget(e){let t=!1,n,r,i,a,o,s,c,l,u,d;for(let f of e){if(!(f instanceof HTMLElement))continue;if(d==null&&f.hasAttribute(`data-merge-conflict-action`)){let e=f.getAttribute(`data-merge-conflict-action`)??void 0,t=f.getAttribute(`data-merge-conflict-conflict-index`)??void 0,n=t==null?NaN:Number.parseInt(t,10);Eh(e)&&Number.isFinite(n)&&(d={kind:`merge-conflict-action`,resolution:e,conflictIndex:n})}if(s==null&&f.hasAttribute(`data-char`)){s=f;let e=f.getAttribute(`data-char`);if(e!=null){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??``,n=t+e.length;(e.trim()!==``||this.options.enableTokenInteractionsOnWhitespace===!0)&&(c={tokenElement:s,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=o==null?f.getAttribute(`data-column-number`)??void 0:void 0;if(e!=null){o=f,u=Number.parseInt(e,10),t=!0,n=Ph(f),a=f.getAttribute(`data-line-index`)??void 0;continue}let p=i==null?f.getAttribute(`data-line`)??void 0:void 0;if(p!=null){i=f,u=Number.parseInt(p,10),n=Ph(f),a=f.getAttribute(`data-line-index`)??void 0;continue}if(l==null&&(f.hasAttribute(`data-expand-button`)||f.hasAttribute(`data-unmodified-lines`))){l={hunkIndex:void 0,direction:f.hasAttribute(`data-expand-up`)?`up`:f.hasAttribute(`data-expand-down`)?`down`:`both`,all:f.hasAttribute(`data-expand-all-button`)};continue}let m=l==null?void 0:f.getAttribute(`data-expand-index`)??void 0;if(l!=null&&m!=null){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(r==null&&f.hasAttribute(`data-code`)){r=f;break}}if(d!=null)return d;if(l?.hunkIndex!=null)return{type:`line-info`,hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=a==null?void 0:Dh(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:Dh(r,`[data-column-number][data-line-index="${a}"]`),r==null||i==null||o==null||n==null||u==null||Number.isNaN(u))return;let f=this.parseLineIndex(i,this.isSplitDiff());return c==null?this.mode===`file`?{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f}:{kind:`line`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Nh(n,r),splitLineIndex:f}:this.mode===`file`?{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:void 0,splitLineIndex:f,...c}:{kind:`token`,lineType:n,lineElement:i,lineNumber:u,numberColumn:t,numberElement:o,side:Nh(n,r),splitLineIndex:f,...c}}isSplitDiff(){return this.pre?.getAttribute(`data-diff-type`)===`split`}parseLineIndex(e,t){let n=(e.getAttribute(`data-line-index`)??``).split(`,`).map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));if(t&&n.length===2)return n[1];if(!t)return n[0]}};function yh({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:r,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,renderGutterUtility:d,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v},y,b,x){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:bh({enableGutterUtility:t,renderGutterUtility:d,onGutterUtilityClick:r}),usesCustomGutterUtility:d!=null,lineHoverHighlight:n,onGutterUtilityClick:r,onHunkExpand:y,onMergeConflictActionClick:x,onLineClick:i,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:c,onTokenEnter:l,onTokenLeave:u,__debugPointerEvents:f,enableLineSelection:p,controlledSelection:m,onLineSelected:h,onLineSelectionStart:g,onLineSelectionChange:_,onLineSelectionEnd:v,getLineIndex:b}}function bh({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(n!=null&&t!=null)throw Error(`Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.`);return e??!1}function xh(e){return e!=null&&`kind`in e&&e.kind===`line`}function Sh(e){return e!=null&&`kind`in e&&e.kind===`token`}function Ch(e){return xh(e)||Sh(e)}function wh(e){return`type`in e&&e.type===`line-info`}function Th(e){return`kind`in e&&e.kind===`merge-conflict-action`}function Eh(e){return e===`current`||e===`incoming`||e===`both`}function Dh(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function Oh(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function kh(e){let t=e.closest(`[data-line], [data-column-number]`);if(t instanceof HTMLElement)return t;let n=e.closest(`[data-line-annotation], [data-gutter-buffer="annotation"]`);if(!(n instanceof HTMLElement))return;let r=n.previousElementSibling;return r instanceof HTMLElement&&(r.hasAttribute(`data-line`)||r.hasAttribute(`data-column-number`))?r:void 0}function Ah(e){let t=e.closest(`[slot^="annotation-"]`);if(t instanceof HTMLElement)return t.getAttribute(`slot`)??void 0;if(e instanceof HTMLElement){let t=e.getAttribute(`name`)??void 0;return t!=null&&t.startsWith(`annotation-`)?t:void 0}}function jh(e){if(e==null)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(t==null)return;let n=Number.parseInt(t[2],10);if(Number.isFinite(n))return{lineNumber:n,side:t[1]}}function Mh(e){return e!=null&&typeof e.elementFromPoint==`function`}function Nh(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function Ph(e){let t=e.getAttribute(`data-line-type`);if(t!=null)switch(t){case`change-deletion`:case`change-addition`:case`context`:case`context-expanded`:return t;default:return}}function Fh(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute(`data-utility-button`)||t.hasAttribute(`data-gutter-utility-slot`)||t.getAttribute(`slot`)===`gutter-utility-slot`||t.getAttribute(`name`)===`gutter-utility-slot`))return!0;return!1}function Ih(e=`none`,t,...n){switch(e){case`none`:return;case`both`:break;case`click`:if(t!==`click`)return;break;case`move`:if(t!==`move`)return}console.log(...n)}var Lh=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let r of t){let t=e.managersByElement.get(r.target);if(t==null)continue;let i=n.get(t);i==null?n.set(t,[r]):i.push(r)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,t){let n=new Set,r=0,i=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(r===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;r++;let n=i.get(e);if(n!=null&&n.type!==`code`)throw Error(`ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible`);let a=e.firstElementChild;a instanceof HTMLElement||(a=null),n==null?(n={type:`code`,codeElement:e,numberElement:a,codeWidth:`auto`,numberWidth:0},this.observedNodes.set(e,n),this.observe(e),a!=null&&(this.observedNodes.set(a,n),this.observe(a))):(this.observedNodes.set(e,n),i.delete(e),n.numberElement===a?n.numberElement==null?n.numberWidth=0:(i.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),i.delete(n.numberElement)),a!=null&&(this.observe(a),i.delete(a),this.observedNodes.set(a,n)),n.numberElement=a,n.numberWidth=0))}if(r>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),r=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute(`data-line-annotation`)??``;if(!/^\d+,\d+$/.test(t)){console.error(`DiffFileRenderer.setupResizeObserver: Invalid element or annotation`,{lineAnnotation:t,element:e});continue}let n=r.get(t);n??(n=[],r.set(t,n)),n.push(e)}for(let[e,t]of r){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[r,a]=t,o=r.firstElementChild,s=a.firstElementChild;if(!(r instanceof HTMLElement)||!(a instanceof HTMLElement)||!(o instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=i.get(o);if(c!=null){this.observedNodes.set(o,c),this.observedNodes.set(s,c),i.delete(o),i.delete(s);continue}let l=o.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:r,child:o,childHeight:l},column2:{container:a,child:s,childHeight:u},currentHeight:`auto`},n.add({child1:o,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of n)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);n.clear()}for(let[e,t]of i)this.unobserve(e),t.type===`code`?Bh(t):Vh(t);i.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,r=n.get(t);if(r!==this){if(r!=null&&r!==this)throw Error(`ResizeManager.observe: element is already owned by another ResizeManager`);n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:r}=e,i=n.get(t);if(i!=null){if(i!==this)throw Error(`ResizeManager.unobserve: element is owned by another ResizeManager`);n.delete(t),r?.unobserve(t),r!=null&&n.size===0&&(r.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let r of e){let{target:e,borderBoxSize:i,contentBoxSize:a}=r;if(!(e instanceof HTMLElement)){console.error(`ResizeManager.handleResizeEntries: Invalid element for ResizeObserver`,r);continue}let o=this.observedNodes.get(e);if(o==null){console.error(`ResizeManager.handleResizeEntries: Not a valid observed node`,r);continue}if(o.type===`annotations`){let t=(()=>{if(e===o.column1.child)return o.column1;if(e===o.column2.child)return o.column2})();if(t==null){console.error(`ResizeManager.handleResizeEntries: Couldn't find a column for`,{item:o,target:e});continue}t.childHeight=i[0].blockSize,n.add(o)}else if(o.type===`code`){let n=t.get(o)??{},r=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=r:e===o.numberElement&&(n.numberInlineSize=r),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=n.codeInlineSize==null?t.codeWidth:Rh(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:zh(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;if((i||a)&&(t.codeWidth=e,t.numberWidth=r,i&&t.codeElement.style.setProperty(`--diffs-column-width`,`${typeof e==`number`?`${e}px`:`auto`}`),a&&t.codeElement.style.setProperty(`--diffs-column-number-width`,`${r===0?`auto`:`${r}px`}`),i||a&&e!==`auto`)){let n=typeof e==`number`?Math.max(e-r,0):0;t.codeElement.style.setProperty(`--diffs-column-content-width`,`${n>0?`${n}px`:`auto`}`)}}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`),e.column2.container.style.setProperty(`--diffs-annotation-min-height`,`${e.currentHeight}px`))}};function Rh(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function zh(e){return Math.max(Math.ceil(e),0)}function Bh(e){e.codeElement.isConnected&&(e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`))}function Vh(e){e.column1.container.isConnected&&e.column1.container.style.removeProperty(`--diffs-annotation-min-height`),e.column2.container.isConnected&&e.column2.container.style.removeProperty(`--diffs-annotation-min-height`)}var Hh=new Map,Uh=new Map,Wh=new Map,Gh=new Set;function Kh(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!Gh.has(t))return!1;return!0}function qh(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(Gh.has(n.name))continue;let e=Hh.get(n.name);e??(e=n,Hh.set(n.name,e)),Gh.add(e.name),t.loadLanguageSync(e.data)}}function Jh(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var Yh=Object.defineProperty,Xh=Object.getOwnPropertyDescriptor,Zh=Object.getOwnPropertyNames,Qh=Object.prototype.hasOwnProperty,$h=(e,t)=>{let n={};for(var r in e)Yh(n,r,{get:e[r],enumerable:!0});return t||Yh(n,Symbol.toStringTag,{value:`Module`}),n},eg=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=Zh(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Qh.call(e,s)&&s!==n&&Yh(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Xh(t,s))||r.enumerable});return e},tg=(e,t,n)=>(eg(e,t,`default`),n&&eg(n,t,`default`)),ng=[{id:`abap`,name:`ABAP`,import:(()=>X(()=>import(`./abap-CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>X(()=>import(`./actionscript-3-Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>X(()=>import(`./ada-C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>X(()=>import(`./ahk-CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>X(()=>import(`./ahk2-_6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>X(()=>import(`./angular-html-CNhJPCRr.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>X(()=>import(`./angular-ts-BnGgGecY.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>X(()=>import(`./apache-U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>X(()=>import(`./apex-KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>X(()=>import(`./apl-ZOvmk1hE.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>X(()=>import(`./applescript-CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>X(()=>import(`./ara-4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>X(()=>import(`./asciidoc-SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>X(()=>import(`./asm-Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>X(()=>import(`./astro-BJzTFZ3R.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>X(()=>import(`./awk-BWXHIvNe.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>X(()=>import(`./ballerina-B7ZEbQpA.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>X(()=>import(`./bat-qdxAdBWQ.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>X(()=>import(`./beancount-D-usSTwE.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>X(()=>import(`./berry-DKpUyyne.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>X(()=>import(`./bibtex-Ci_nEsc7.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>X(()=>import(`./bicep-CUHmPFLl.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>X(()=>import(`./bird2-CYIUgYqB.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>X(()=>import(`./blade-CvS8_w1j.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>X(()=>import(`./bsl-_VjlB9mv.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>X(()=>import(`./c-D5ZSBtUG.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>X(()=>import(`./c3-D0apG41V.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>X(()=>import(`./cadence-CQ2zXKGN.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>X(()=>import(`./cairo-DLTphjLi.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>X(()=>import(`./chapel-1aYDxJri.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>X(()=>import(`./clarity-CtfBBspg.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>X(()=>import(`./clojure-DqKBuwfJ.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>X(()=>import(`./cmake-Bj61d0ZC.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>X(()=>import(`./cobol-CEoq_5kf.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>X(()=>import(`./codeowners-C8r90Shi.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>X(()=>import(`./codeql-oeQT6MSM.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>X(()=>import(`./coffee-CZTWsTxw.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>X(()=>import(`./common-lisp-Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>X(()=>import(`./coq-DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>X(()=>import(`./cpp-Hh-o0ivR.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>X(()=>import(`./crystal-CL_KTsac.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>X(()=>import(`./csharp-oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>X(()=>import(`./css-9neLgVLd.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>X(()=>import(`./csv-Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>X(()=>import(`./cue-CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>X(()=>import(`./cypher-ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>X(()=>import(`./d-qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>X(()=>import(`./dart-CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>X(()=>import(`./dax-BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>X(()=>import(`./desktop-Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>X(()=>import(`./diff-woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>X(()=>import(`./docker-IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>X(()=>import(`./dotenv-_5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>X(()=>import(`./dream-maker-DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>X(()=>import(`./edge-CTz4kCIs.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>X(()=>import(`./elixir-Bi8YL7XX.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>X(()=>import(`./elm-C-UxMmSh.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>X(()=>import(`./emacs-lisp-c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>X(()=>import(`./erb-ZSq62Y_u.js`),__vite__mapDeps([33,1,2,3,34,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`erlang`,name:`Erlang`,aliases:[`erl`],import:(()=>X(()=>import(`./erlang-Cphh6RMH.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>X(()=>import(`./fennel-DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>X(()=>import(`./fish-BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>X(()=>import(`./fluent-C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>X(()=>import(`./fortran-fixed-form-DEKoE2YW.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>X(()=>import(`./fortran-free-form-CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>X(()=>import(`./fsharp-D13ZGOAj.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>X(()=>import(`./gdresource-xMC7jr7x.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>X(()=>import(`./gdscript-DYvRD3hg.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>X(()=>import(`./gdshader-CBce3t8t.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>X(()=>import(`./genie-CV2tkWYe.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>X(()=>import(`./gherkin-DExj1W_8.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>X(()=>import(`./git-commit-BSykSTBG.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>X(()=>import(`./git-rebase-Cw9GoTpw.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>X(()=>import(`./gleam-CSRkHgEL.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>X(()=>import(`./glimmer-js-Bb_1emHy.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>X(()=>import(`./glimmer-ts-D2kOXMB0.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>X(()=>import(`./glsl-DEqjHGFr.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>X(()=>import(`./gn-ilITqXS6.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>X(()=>import(`./gnuplot-7GGW24-e.js`),[]))},{id:`go`,name:`Go`,import:(()=>X(()=>import(`./go-rLFTqkRN.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>X(()=>import(`./graphql-Bi0OE4k4.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>X(()=>import(`./groovy-CacY0gHj.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>X(()=>import(`./hack-aU4VRzRW.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>X(()=>import(`./haml-B-2wwgyn.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>X(()=>import(`./handlebars-Bmq7hbFI.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>X(()=>import(`./haskell-D8IpX4py.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>X(()=>import(`./haxe-C8oCnwJJ.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>X(()=>import(`./hcl-Dh228itO.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>X(()=>import(`./hjson-CxZEssPk.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>X(()=>import(`./hlsl-Cvrh5tZx.js`),[]))},{id:`html`,name:`HTML`,import:(()=>X(()=>import(`./html-BBsNbpya.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>X(()=>import(`./html-derivative-CkVRX-vn.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>X(()=>import(`./http-cQ-nDL4L.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>X(()=>import(`./hurl-D5phPwZN.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>X(()=>import(`./hxml-Dcm88srW.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>X(()=>import(`./hy-CZbG8q4J.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>X(()=>import(`./imba-DsUTQ-LC.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>X(()=>import(`./ini-B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>X(()=>import(`./java-CT3DXSYV.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>X(()=>import(`./javascript-BPmsAXaP.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>X(()=>import(`./jinja-Ct_36dEc.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>X(()=>import(`./jison-BYrmy85c.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>X(()=>import(`./json-BCFP8udh.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>X(()=>import(`./json5-BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>X(()=>import(`./jsonc-CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>X(()=>import(`./jsonl-CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>X(()=>import(`./jsonnet-CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>X(()=>import(`./jssm-DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>X(()=>import(`./jsx-Dgzhn0Dq.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>X(()=>import(`./julia-DIddcjVY.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>X(()=>import(`./just-C5t963St.js`),__vite__mapDeps([64,2,11,20,29,34,3,1,7,8,16,22,25,26,27,35,36,13,37,38,39,65])))},{id:`kdl`,name:`KDL`,import:(()=>X(()=>import(`./kdl-CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>X(()=>import(`./kotlin-DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>X(()=>import(`./kusto-C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>X(()=>import(`./latex-BKZooW5w.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>X(()=>import(`./lean-CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>X(()=>import(`./less-DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>X(()=>import(`./liquid-_PLVu-8C.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>X(()=>import(`./llvm-DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>X(()=>import(`./log-BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>X(()=>import(`./logo-Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>X(()=>import(`./lua-BWNAOGrF.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>X(()=>import(`./luau-C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>X(()=>import(`./make-Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>X(()=>import(`./markdown-BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>X(()=>import(`./marko-DC7qz2de.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>X(()=>import(`./matlab-D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>X(()=>import(`./mdc-Bn_2wB99.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>X(()=>import(`./mdx-DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>X(()=>import(`./mermaid-BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>X(()=>import(`./mipsasm-BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>X(()=>import(`./mojo-fg40_ntQ.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>X(()=>import(`./moonbit-DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>X(()=>import(`./move-BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>X(()=>import(`./narrat-_X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>X(()=>import(`./nextflow-BJtWHP5T.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>X(()=>import(`./nextflow-groovy-DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>X(()=>import(`./nginx-Ce7JLwNg.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>X(()=>import(`./nim-CP_MVph6.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>X(()=>import(`./nix-IvuFDN5E.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>X(()=>import(`./nsis-CjNLYCLg.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>X(()=>import(`./nushell-DHYfO66s.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>X(()=>import(`./objective-c-D1A_Heim.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>X(()=>import(`./objective-cpp-BsSzOQcm.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>X(()=>import(`./ocaml-O90oeIOV.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>X(()=>import(`./odin-B1RWQWA5.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>X(()=>import(`./openscad-BUDT5pXO.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>X(()=>import(`./org-BVKft-Jg.js`),__vite__mapDeps([76,2,3,1,5,8,7,9,11,13,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,48,50,81,82,83,63,65,66,67,70,84,75,85,86,87,88,89,90,91,92,93])))},{id:`pascal`,name:`Pascal`,import:(()=>X(()=>import(`./pascal-4ZHwLPI5.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>X(()=>import(`./perl-DRhmHTw_.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>X(()=>import(`./php-CrnivzIK.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>X(()=>import(`./pkl-ot-7Btpt.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>X(()=>import(`./plsql-DGHpHOYJ.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>X(()=>import(`./po-BiJDBrnU.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>X(()=>import(`./polar-C7UOKdEL.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>X(()=>import(`./postcss-BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>X(()=>import(`./powerquery-DNMTfnFr.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>X(()=>import(`./powershell-CCSX75yM.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>X(()=>import(`./prisma-DMgNhnYS.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>X(()=>import(`./prolog-iXnhIJG7.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>X(()=>import(`./proto-DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>X(()=>import(`./pug-BfP-YwOD.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>X(()=>import(`./puppet-CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>X(()=>import(`./purescript-9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>X(()=>import(`./python-gzcpVVnB.js`),[]))},{id:`qml`,name:`QML`,import:(()=>X(()=>import(`./qml-BHf9C17M.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>X(()=>import(`./qmldir-DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>X(()=>import(`./qss-Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>X(()=>import(`./r-DjPtVJdp.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>X(()=>import(`./racket-DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>X(()=>import(`./raku-B3gFvitq.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>X(()=>import(`./razor-BH3XX51e.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>X(()=>import(`./rbs-C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>X(()=>import(`./reg-CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>X(()=>import(`./regexp-DPzTmgy2.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>X(()=>import(`./rel-BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>X(()=>import(`./riscv-Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>X(()=>import(`./ron-VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>X(()=>import(`./rosmsg-CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>X(()=>import(`./rst-DQbfRM9X.js`),__vite__mapDeps([97,2,15,1,3,20,98,25,26,27,22,29,39,34,7,8,16,35,36,11,13,37,38])))},{id:`ruby`,name:`Ruby`,aliases:[`rb`],import:(()=>X(()=>import(`./ruby-DxybHg9D.js`),__vite__mapDeps([34,2,3,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39])))},{id:`rust`,name:`Rust`,aliases:[`rs`],import:(()=>X(()=>import(`./rust-Cfkwpbl8.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>X(()=>import(`./sas-DoUzRWOs.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>X(()=>import(`./sass-DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>X(()=>import(`./scala-BiFt_7mu.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>X(()=>import(`./scheme-DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>X(()=>import(`./scss-BSqQF9Aq.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>X(()=>import(`./sdbl-bTVj8UrX.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>X(()=>import(`./shaderlab-TOUzSsQk.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>X(()=>import(`./shellscript-DkZJ1HjW.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>X(()=>import(`./shellsession-ykUTtcwM.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>X(()=>import(`./smalltalk-BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>X(()=>import(`./smithy-Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>X(()=>import(`./solidity-Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>X(()=>import(`./soy-4rmF0gor.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>X(()=>import(`./sparql-D_iOobhT.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>X(()=>import(`./splunk-BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>X(()=>import(`./sql-wJX-vNm_.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>X(()=>import(`./ssh-config-BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>X(()=>import(`./stata-Bjw5vh7C.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>X(()=>import(`./stylus-B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>X(()=>import(`./surrealql-B-cZs35d.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>X(()=>import(`./svelte-BtYh0aTf.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>X(()=>import(`./swift-CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>X(()=>import(`./system-verilog-Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>X(()=>import(`./systemd-BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>X(()=>import(`./talonscript-CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>X(()=>import(`./tasl-DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>X(()=>import(`./tcl-CZd0xW_V.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>X(()=>import(`./templ-eYWdvrUr.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>X(()=>import(`./terraform-DswuEJGm.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>X(()=>import(`./tex-DQ-rt_Oj.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>X(()=>import(`./toml-CcmNWLt0.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>X(()=>import(`./ts-tags-CspMWJ3s.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>X(()=>import(`./tsv-sltzmVWM.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>X(()=>import(`./tsx-CXUmELmz.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>X(()=>import(`./turtle-ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>X(()=>import(`./twig-B0yioFX1.js`),__vite__mapDeps([111,2,3,5,20,34,1,7,8,16,22,25,26,27,29,35,36,11,13,37,38,39,87,9])))},{id:`typescript`,name:`TypeScript`,aliases:[`ts`,`cts`,`mts`],import:(()=>X(()=>import(`./typescript-vMN-etbi.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>X(()=>import(`./typespec-BRdr0IET.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>X(()=>import(`./typst-Cvk0bEbK.js`),__vite__mapDeps([112,2,3,1,5,8,7,9,11,13,113,114,16,22,20,77,24,26,25,27,29,78,79,49,80,31,38,39,34,35,36,37,41,40,44,48,50,81,82,54,83,115,63,62,65,66,67,70,116,84,85,87,88,89,90,91,93,117,94,118,119,111,120])))},{id:`v`,name:`V`,import:(()=>X(()=>import(`./v-DBj4K9d_.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>X(()=>import(`./vala-zf12oZj6.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>X(()=>import(`./vb-DOwzaHZ0.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>X(()=>import(`./verilog-B2gwz-sJ.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>X(()=>import(`./vhdl-BroJfC0k.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>X(()=>import(`./viml-DvXPmvsu.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>X(()=>import(`./vue-Ce21QNcM.js`),__vite__mapDeps([121,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>X(()=>import(`./vue-html-DsNf3O2s.js`),__vite__mapDeps([122,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>X(()=>import(`./vue-vine-BsGtGXV3.js`),__vite__mapDeps([123,2,3,5,12,70,124])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>X(()=>import(`./vyper-CgoNMtux.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>X(()=>import(`./wasm-ByWQv1Qj.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>X(()=>import(`./wenyan-C8pVoKbM.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>X(()=>import(`./wgsl-BsKzXJz4.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>X(()=>import(`./wikitext-ClFFjSW2.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>X(()=>import(`./wit-DdvCle-K.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>X(()=>import(`./wolfram-DLL8P-h_.js`),[]))},{id:`xml`,name:`XML`,import:(()=>X(()=>import(`./xml-BmjAaPhA.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>X(()=>import(`./xsl-CtfA1v1E.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>X(()=>import(`./yaml-A9EbijaD.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>X(()=>import(`./zenscript-BnlCZFoB.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>X(()=>import(`./zig-CMLA9XwU.js`),[]))}],rg=Object.fromEntries(ng.map(e=>[e.id,e.import])),ig=Object.fromEntries(ng.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),ag={...rg,...ig},og=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>X(()=>import(`./andromeeda-vGVdxbeo.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>X(()=>import(`./aurora-x-CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>X(()=>import(`./ayu-dark-DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>X(()=>import(`./ayu-light-C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>X(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>X(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>X(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>X(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>X(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>X(()=>import(`./dark-plus-Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>X(()=>import(`./dracula-BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>X(()=>import(`./dracula-soft-5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>X(()=>import(`./everforest-dark-sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>X(()=>import(`./everforest-light-Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>X(()=>import(`./github-dark-C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>X(()=>import(`./github-dark-default-DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>X(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>X(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>X(()=>import(`./github-light-EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>X(()=>import(`./github-light-default-BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>X(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>X(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>X(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>X(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>X(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>X(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>X(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>X(()=>import(`./horizon-CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>X(()=>import(`./horizon-bright-DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>X(()=>import(`./houston-CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>X(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>X(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>X(()=>import(`./kanagawa-wave-BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>X(()=>import(`./laserwave-C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>X(()=>import(`./light-plus-DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>X(()=>import(`./material-theme-Bm3Qr25_.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>X(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>X(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>X(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>X(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>X(()=>import(`./min-dark-BSWPekZh.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>X(()=>import(`./min-light-DDpmG2fV.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>X(()=>import(`./monokai-B_bV9PQ9.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>X(()=>import(`./night-owl-DhmEMT88.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>X(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>X(()=>import(`./nord-Cb4Vim4T.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>X(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>X(()=>import(`./one-light-D7Lr4KcI.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>X(()=>import(`./plastic-DQwYfKfQ.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>X(()=>import(`./poimandres-DRFjx7u4.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>X(()=>import(`./red-DX1BQOs8.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>X(()=>import(`./rose-pine-aMsaMD1D.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>X(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>X(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>X(()=>import(`./slack-dark-DnToyrRv.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>X(()=>import(`./slack-ochin-B2OO5cIa.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>X(()=>import(`./snazzy-light-4G7pJPwS.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>X(()=>import(`./solarized-dark-UdsmMDCL.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>X(()=>import(`./solarized-light-C1IUL_tW.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>X(()=>import(`./synthwave-84-nFMaYfgc.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>X(()=>import(`./tokyo-night-oM2G3aXe.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>X(()=>import(`./vesper-DdrHHSXu.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>X(()=>import(`./vitesse-black-fwtXNY1n.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>X(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>X(()=>import(`./vitesse-light-VbXTXTou.js`),[]))}].map(e=>[e.id,e.import])),sg=s({createOnigurumaEngine:()=>Fg,getDefaultWasmLoader:()=>Pg,loadWasm:()=>Og,setDefaultWasmLoader:()=>Ng}),cg=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function lg(){return 2147483648}function ug(){return typeof performance<`u`?performance.now():Date.now()}var dg=(e,t)=>e+(t-e%t)%t;async function fg(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=lg();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,dg(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:ug,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 pg=Object.defineProperty,mg=(e,t,n)=>t in e?pg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,hg=(e,t,n)=>mg(e,typeof t==`symbol`?t:t+``,n),gg=null;function _g(e){throw new cg(e.UTF8ToString(e.getLastOnigError()))}var vg=class e{constructor(t){hg(this,`utf16Length`),hg(this,`utf8Length`),hg(this,`utf16Value`),hg(this,`utf8Value`),hg(this,`utf16OffsetToUtf8`),hg(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)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},yg=class e{constructor(t){if(hg(this,`id`,++e.LAST_ID),hg(this,`_onigBinding`),hg(this,`content`),hg(this,`utf16Length`),hg(this,`utf8Length`),hg(this,`utf16OffsetToUtf8`),hg(this,`utf8OffsetToUtf16`),hg(this,`ptr`),!gg)throw new cg(`Must invoke loadWasm first.`);this._onigBinding=gg,this.content=t;let n=new vg(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=gg.omalloc(1e4),e._sharedPtrInUse=!0,gg.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(gg)}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)}};hg(yg,`LAST_ID`,0),hg(yg,`_sharedPtr`,0),hg(yg,`_sharedPtrInUse`,!1);var bg=yg,xg=class{constructor(e){if(hg(this,`_onigBinding`),hg(this,`_ptr`),!gg)throw new cg(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new vg(e[r]);t[r]=i.createString(gg),n[r]=i.utf8Length}let r=gg.omalloc(4*e.length);gg.HEAPU32.set(t,r/4);let i=gg.omalloc(4*e.length);gg.HEAPU32.set(n,i/4);let a=gg.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)gg.ofree(t[n]);gg.ofree(i),gg.ofree(r),a===0&&_g(gg),this._onigBinding=gg,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 bg(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 Sg(e){return typeof e.instantiator==`function`}function Cg(e){return typeof e.default==`function`}function wg(e){return e.data!==void 0}function Tg(e){return typeof Response<`u`&&e instanceof Response}function Eg(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 Dg;function Og(e){if(Dg)return Dg;async function t(){gg=await fg(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Sg(n)?n=await n.instantiator(t):Cg(n)?n=await n.default(t):(wg(n)&&(n=n.data),Tg(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Ag(n)(t):await jg(n)(t):Eg(n)||n instanceof WebAssembly.Module?n=await kg(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await kg(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Dg=t(),Dg}function kg(e){return t=>WebAssembly.instantiate(e,t)}function Ag(e){return t=>WebAssembly.instantiateStreaming(e,t)}function jg(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Mg;function Ng(e){Mg=e}function Pg(){return Mg}async function Fg(e){return e&&await Og(e),{createScanner(e){return new xg(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new bg(e)}}}var Ig=$h({});tg(Ig,sg);var Lg=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Rg(e){return zg(e)}function zg(e){return Array.isArray(e)?Bg(e):e instanceof RegExp?e:typeof e==`object`?Vg(e):e}function Bg(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=zg(e[n]);return t}function Vg(e){let t={};for(let n in e)t[n]=zg(e[n]);return t}function Hg(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Ug(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Ug(e.substring(0,e.length-1)):e.substr(~t+1)}var Wg=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Gg=class{static hasCaptures(e){return e!==null&&(Wg.lastIndex=0,Wg.test(e))}static replaceCaptures(e,t,n){return e.replace(Wg,(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 Kg(e,t){return e<t?-1:+(e>t)}function qg(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=Kg(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Jg(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 Yg(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Xg=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}},Zg=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(n_(e),t)}static createFromParsedTheme(e,t){return a_(e,t)}_cachedMatchRoot=new Xg(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=>$g(e.parent,t.parentScopes));return n?new t_(n.fontStyle,n.foreground,n.background):null}},Qg=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||this.parent!==null&&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 $g(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&&!e_(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function e_(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var t_=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function n_(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}}let s=null;typeof i.settings.foreground==`string`&&Jg(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Jg(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 r_(l,u,e,o,s,c)}}return n}var r_=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}},i_=(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))(i_||{});function a_(e,t){e.sort((e,t)=>{let n=Kg(e.scope,t.scope);return n!==0||(n=qg(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 o_(t),o=new t_(n,a.getId(r),a.getId(i)),s=new l_(new c_(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 Zg(a,o,s)}var o_=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)}},s_=Object.freeze([]),c_=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||s_,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)}},l_=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(),c_.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(qg(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 c_(e,t,n,r,i))}},u_=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)}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=f_(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 d_(e){return e}function f_(e){return e}function p_(e,t){let n=[],r=h_(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(m_(i)){let e=[];do e.push(i),i=r.next();while(m_(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 m_(e){return!!e&&!!e.match(/[\w\.:]+/)}function h_(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 g_(e){typeof e.dispose==`function`&&e.dispose()}var __=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},v_=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},y_=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))}},b_=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new __(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new y_;for(let n of e)x_(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof __){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 x_(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 __?C_({baseGrammar:a,selfGrammar:i},r):S_(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 __(e))}function S_(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];w_([r],t,n)}}function C_(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&w_(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&w_(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function w_(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?Hg({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&w_(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=A_(i);switch(a.kind){case 0:C_({...t,selfGrammar:t.baseGrammar},n);break;case 1:C_(t,n);break;case 2:S_(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?S_(a.ruleName,i,n):C_(i,n)}else a.kind===4?n.add(new v_(a.scopeName,a.ruleName)):n.add(new __(a.scopeName))}}}var T_=class{kind=0},E_=class{kind=1},D_=class{constructor(e){this.ruleName=e}kind=2},O_=class{constructor(e){this.scopeName=e}kind=3},k_=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function A_(e){if(e===`$base`)return new T_;if(e===`$self`)return new E_;let t=e.indexOf(`#`);return t===-1?new O_(e):t===0?new D_(e.substring(1)):new k_(e.substring(0,t),e.substring(t+1))}var j_=/\\(\d+)/,M_=/\\(\d+)/g,N_=-1,P_=-2;function F_(e){return e}function I_(e){return e}var L_=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Gg.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Gg.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Ug(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:Gg.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Gg.replaceCaptures(this._contentName,e,t)}},R_=class extends L_{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!`)}},z_=class extends L_{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new W_(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 G_,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},B_=class extends L_{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 G_,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},V_=class extends L_{_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 W_(i,this.id),this.beginCaptures=a,this._end=new W_(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 G_;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}},H_=class extends L_{_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 W_(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new W_(o,P_),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 G_;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 G_,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},U_=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new R_(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new z_(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=Hg({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new B_(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new H_(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 V_(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=A_(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)}}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof B_||e instanceof V_||e instanceof H_)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},W_=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._anchorCache=this.hasAnchor?this._buildAnchorCache():null,this.ruleId=t,this.hasBackReferences=typeof this.source==`string`&&j_.test(this.source)}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 M_.lastIndex=0,this.source.replace(M_,(e,t)=>Yg(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}},G_=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 K_(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 K_(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},K_=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(`
25
- `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},q_=class{constructor(e,t){this.languageId=e,this.tokenType=t}},J_=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new q_(e,8),this._embeddedLanguagesMatcher=new Y_(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 q_(0,0);_getBasicScopeAttributes=new Xg(e=>new q_(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/},Y_=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])=>Yg(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 X_=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Z_(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Q_(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 X_(i,!0);f()}return new X_(i,!1);function f(){let o=$_(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===N_){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),iv(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 V_){let r=o;iv(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 H_){let r=o;iv(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(iv(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 Q_(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 H_&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=rv(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==P_){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),iv(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 $_(e,t,n,r,i,a){let o=ev(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=tv(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 ev(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=nv(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 tv(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}=nv(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 nv(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function rv(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function iv(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));Z_(e,p,n&&d.start===0,d.start,f,i,!1,0),g_(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 av(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var av=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function ov(e,t,n,r,i,a,o,s){return new uv(e,t,n,r,i,a,o,s)}function sv(e,t,n,r,i){let a=p_(t,cv),o=U_.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 cv(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(lv(t[r],e))return n=r+1,!0;return!1})}function lv(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 uv=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new J_(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=dv(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=p_(e,cv);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)sv(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&&sv(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(F_(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[I_(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]=dv(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=U_.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===pv.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=u_.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?fv.createRootAndLookUpScopeName(a,r,this):fv.createRoot(`unknown`,r),t=new pv(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
26
- `;let a=this.createOnigString(e),o=a.content.length,s=new hv(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Z_(this,a,i,0,t,s,!0,r);return g_(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function dv(e,t){return e=Rg(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 fv=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=Qg.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Qg(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Qg(null,t),o=r.themeProvider.themeMatch(a),s=e.mergeAttributes(n,i,o);return new e(null,a,s)}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(1)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),u_.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),s=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,a,s)}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}},pv=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&&e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?fv.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(1)}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:I_(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=fv.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,F_(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,fv.fromExtension(r,n.contentNameScopesList))}},mv=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):p_(e,cv).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>p_(e,cv).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}},hv=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=u_.set(n,0,d_(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=u_.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}},gv=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,ov(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},_v=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new gv(Zg.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Zg.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 mv(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new b_(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)}},vv=pv.NULL;function yv(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 bv(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function xv(e){return Array.isArray(e)?e:[e]}async function Sv(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function Cv(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function wv(e){return e===`ansi`||Cv(e)}function Tv(e){return e===`none`}function Ev(e){return Tv(e)}var Dv=/(\r?\n)/g;function Ov(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(Dv),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 kv={light:`#333333`,dark:`#bbbbbb`},Av={light:`#fffffe`,dark:`#1e1e1e`},jv=`__shiki_resolved`;function Mv(e){if(e?.[jv])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`?kv.light:kv.dark,n||=t.type===`light`?Av.light:Av.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,jv,{enumerable:!1,writable:!1,value:!0}),t}async function Nv(e){return[...new Set((await Promise.all(e.filter(e=>!wv(e)).map(async e=>await Sv(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function Pv(e){return(await Promise.all(e.map(async e=>Ev(e)?null:Mv(await Sv(e))))).filter(e=>!!e)}function Fv(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 Lg(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var Iv=class extends _v{_resolver;_themes;_langs;_alias;_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=Mv(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=Zg.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=Fv(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=[...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 Lg(`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))}},Lv=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}},Rv=0;function zv(e){Rv+=1,e.warnings!==!1&&Rv>=10&&Rv%10==0&&console.warn(`[Shiki] ${Rv} 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 Lg("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Mv),i=new Iv(new Lv(e.engine,n),r,n,e.langAlias),a;function o(t){return Fv(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Lg(`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 Lg(`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 Nv(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await Pv(e))}function g(){if(t)throw new Lg(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--Rv)}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 Bv(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([Pv(e.themes||[]),Nv(e.langs||[]),e.engine]);return zv({...e,themes:t,langs:n,engine:r})}var Vv=new WeakMap;function Hv(e,t){Vv.set(e,t)}function Uv(e){return Vv.get(e)}var Wv=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(xv(n).map(e=>[e,vv])),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 Gv(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Gv(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 Kv(e,t){if(!(e instanceof Wv))throw new Lg(`Invalid grammar state`);return e.getInternalStack(t)}var qv=/,/,Jv=/ /;function Yv(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(Cv(e.resolveLangAlias(n.lang||`text`))||Tv(r))return Ov(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 Lg(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Lg(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Zv(t,o,i,a,n)}function Xv(...e){if(e.length===2)return Uv(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(Cv(i)||Tv(a))throw new Lg(`Plain language does not have grammar state`);if(i===`ansi`)throw new Lg(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new Wv(Qv(n,c,o,s,r).stateStack,c.name,o.name)}function Zv(e,t,n,r,i){let a=Qv(e,t,n,r,i),o=new Wv(a.stateStack,t.name,n.name);return Hv(a.tokens,o),a.tokens}function Qv(e,t,n,r,i){let a=yv(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=Ov(e),u=i.grammarState?Kv(i.grammarState,n.name)??vv:i.grammarContextCode==null?vv:Qv(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,d=[],f=[];for(let e=0,i=l.length;e<i;e++){let[i,p]=l[e];if(i===``){d=[],f.push([]);continue}if(o>0&&i.length>=o){d=[],f.push([{content:i,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;c&&c!==`tokenType`&&(m=t.tokenizeLine(i,u,s),h=m.tokens,g=0);let _=t.tokenizeLine2(i,u,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]:i.length;if(t===o)continue;let s=_.tokens[2*e+1],l=bv(r[u_.getForeground(s)],a),u=u_.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=u_.getTokenType(s);else if(c){let e=[];if(c!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(qv).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(Jv))})}f.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=i.substring(t.startIndex,t.endIndex);r+=n.length,f.explanation.push({content:n,scopes:c===`scopeName`?$v(t.scopes):ey(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function $v(e){return e.map(e=>({scopeName:e}))}function ey(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:ry(e,i,t.slice(0,r))}}return n}function ty(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function ny(e,t,n){if(!ty(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)ty(e[r],n[i])&&--r,--i;return r===-1}function ry(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(ny(e,t,n)){r.push(a);break}return r}function iy(e,t,n,r=Yv){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:Uv(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=ay(...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 Wv(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&Hv(s,c),s}function ay(...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}var oy=/\s+/g;function sy(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(oy)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(oy);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var cy=/:?lang=["']([^"']+)["']/g,ly=/(?:```|~~~)([\w-]+)/g,uy=/\\begin\{([\w-]+)\}/g,dy=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,fy=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function py(e){let t=Ov(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t.at(-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 my(e,t,n){let r=new Set;for(let t of e.matchAll(cy)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(ly)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(uy)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(dy)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(fy.test(e)&&r.add(`yaml`),!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var hy=[`color`,`background-color`];function gy(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 _y(e,t){let n=0,r=e.length;for(;n<r;){let i=n+(r-n>>1);e[i]<=t?n=i+1:r=i}return n}function vy(e,t){let n=[...t instanceof Set?t:new Set(t)].sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=e.offset+e.content.length,r=_y(n,e.offset),i=r;for(;i<n.length&&n[i]<t;)i++;if(r===i)return e;let a=n.slice(r,i);for(let t=0;t<a.length;t++)a[t]-=e.offset;return gy(e,a)})):e}function yy(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>by(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&&hy.includes(a)){if(r===`light-dark()`&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new Lg('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||`inherit`,d=o[r][a]||`inherit`;c[a]=`light-dark(${u}, ${d})`,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 by(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&i_.Italic&&(t[`font-style`]=`italic`),e.fontStyle&i_.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&i_.Underline&&n.push(`underline`),e.fontStyle&i_.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function xy(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function Sy(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=py(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new Lg(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}{let t=n.lines[e.line];if(t===void 0)throw new Lg(`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 Lg(`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)}));Cy(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 vy(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=[...e.children].filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new Lg(`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+=wy(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new Lg(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new Lg(`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&&sy(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 Cy(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new Lg(`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 Lg(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function wy(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(wy).join(``):``}var Ty=[Sy()];function Ey(e){let t=Dy(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Ty]}function Dy(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 Oy=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],ky={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function Ay(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 jy(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}}if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function My(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)ky[r]&&t.push({type:`setDecoration`,value:ky[r]});else if(r<=29){let e=ky[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:Oy[r-30]}});else if(r===38){let n=jy(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:Oy[r-40]}});else if(r===48){let n=jy(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:Oy[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:Oy[r-100+8]}})}}return t}function Ny(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=Ay(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=My(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 Py={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 Fy(e=Py){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<Oy.length;e++)r.push(t(Oy[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 Iy=/#([0-9a-f]{3,8})/i,Ly=/var\((--[\w-]+-ansi-[\w-]+)\)/,Ry={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 zy(e,t,n){let r=yv(e,n),i=Ov(t),a=Fy(Object.fromEntries(Oy.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Ry[t]]}))),o=Ny();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=bv(i,r),o=bv(o,r),n.decorations.has(`dim`)&&(i=By(i));let s=i_.None;return n.decorations.has(`bold`)&&(s|=i_.Bold),n.decorations.has(`italic`)&&(s|=i_.Italic),n.decorations.has(`underline`)&&(s|=i_.Underline),n.decorations.has(`strikethrough`)&&(s|=i_.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function By(e){let t=e.match(Iy);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}`}if(e.length===6)return`#${e}80`;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`)}`}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(Ly);return n?`var(${n[1]}-dim)`:e}function Vy(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!Cv(r)&&!Tv(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return zy(r,t,n)}return Yv(e,t,n)}function Hy(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 Lg("`themes` option must not be empty");let p=iy(e,t,n,Vy);if(c=Uv(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new Lg(`\`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=>yy(e,h,u,l,d))),c&&Hv(a,c);let g=f.map(e=>yv(e.theme,n));i=Uy(f,m,g,u,l,`fg`,d),r=Uy(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=yv(n.theme,n);a=Vy(e,t,n);let l=e.getTheme(n.theme);r=bv(l.bg,s),i=bv(l.fg,s),o=l.name,c=Uv(a)}else throw new Lg("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Uy(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=bv(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===`light-dark()`&&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 Lg('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${bv(t[r][a],n[r])||`inherit`}, ${bv(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var Wy=/^\s+$/,Gy=/^(\s*)(.*?)(\s*)$/;function Ky(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Ky(e,t,n),codeToTokens:(t,n)=>Hy(e,t,n)}){let i=t;for(let e of Ey(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Hy(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Jy(a):d===`never`&&(a=Yy(a)),f&&(a=Xy(a));let p={...r,get source(){return i}};for(let e of Ey(n))a=e.tokens?.call(p,a)||a;return qy(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function qy(e,t,n,r=Uv(e)){let i=Ey(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(l.style=t.rootStyle==null?`background-color:${t.bg};color:${t.fg}`: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:sy,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:`
27
- `}));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=xy(a.htmlStyle||by(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&&Hv(m,r),m}function Jy(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&i_.Underline||i.fontStyle&i_.Strikethrough));o&&Wy.test(i.content)&&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 Yy(e){return e.map(e=>e.flatMap(e=>{if(Wy.test(e.content))return e;let t=e.content.match(Gy);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 Xy(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t.at(-1),r=xy(e.htmlStyle||by(e)),i=xy(n.htmlStyle||by(n)),a=e.fontStyle&&(e.fontStyle&i_.Underline||e.fontStyle&i_.Strikethrough),o=n.fontStyle&&(n.fontStyle&i_.Underline||n.fontStyle&i_.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Zy=hh;function Qy(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Ky(e,t,n),codeToTokens:(t,n)=>Hy(e,t,n)},i=Zy(Ky(e,t,n,r));for(let e of Ey(n))i=e.postprocess?.call(r,i,n)||i;return i}async function $y(e){let t=await Bv(e);return{getLastGrammarState:(...e)=>Xv(t,...e),codeToTokensBase:(e,n)=>Vy(t,e,n),codeToTokensWithThemes:(e,n)=>iy(t,e,n),codeToTokens:(e,n)=>Hy(t,e,n),codeToHast:(e,n)=>Ky(t,e,n),codeToHtml:(e,n)=>Qy(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function eb(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,wv(n))return[];let r=t[n];if(!r)throw new Lg(`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(Ev(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Lg(`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 $y({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 tb(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}{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 nb(e,t){let n=tb(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 rb=eb({langs:ag,themes:og,engine:()=>(0,Ig.createOnigurumaEngine)(X(()=>import(`./wasm-BnjxR4X6.js`),[]))}),{codeToHtml:ib,codeToHast:ab,codeToTokens:ob,codeToTokensBase:sb,codeToTokensWithThemes:cb,getSingletonHighlighter:lb,getLastGrammarState:ub}=nb(rb,{guessEmbeddedLanguages:my}),db=4294967295,fb=class{patterns;options;regexps;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}})}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:db,end:db,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 pb(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function mb(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var hb=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),gb=String.raw;function _b(e,t){if(e==null)throw Error(t??`Value expected`);return e}var vb=gb`\[\^?`,yb=`c.? | C(?:-.?)?|${gb`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${gb`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${gb`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${gb`o\{[^\}]*\}?`}|${gb`\d{1,3}`}`,bb=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,xb=new RegExp(gb`
28
- \\ (?:
29
- ${yb}
30
- | [gk]<[^>]*>?
31
- | [gk]'[^']*'?
32
- | .
33
- )
34
- | \( (?:
35
- \? (?:
36
- [:=!>({]
37
- | <[=!]
38
- | <[^>]*>
39
- | '[^']*'
40
- | ~\|?
41
- | #(?:[^)\\]|\\.?)*
42
- | [^:)]*[:)]
43
- )?
44
- | \*[^\)]*\)?
45
- )?
46
- | (?:${bb.source})+
47
- | ${vb}
48
- | .
49
- `.replace(/\s+/g,``),`gsu`),Sb=new RegExp(gb`
50
- \\ (?:
51
- ${yb}
52
- | .
53
- )
54
- | \[:(?:\^?\p{Alpha}+|\^):\]
55
- | ${vb}
56
- | &&
57
- | .
58
- `.replace(/\s+/g,``),`gsu`);function Cb(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=$b(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(xb.lastIndex=0;s=xb.exec(e);){let t=wb(a,e,s[0],xb.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),t.lastIndex!==void 0&&(xb.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`?tx(e,u):e).flat(),flags:r}}function wb(e,t,n,r){let[i,a]=n;if(n===`[`||n===`[^`){let e=Tb(t,n,r);return{tokens:e.tokens,lastIndex:e.lastIndex}}if(i===`\\`){if(`AbBGyYzZ`.includes(a))return{token:kb(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Ub(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:Ab(n)}}if(a===`K`)return{token:Lb(`keep`,n)};if(a===`N`||a===`R`)return{token:Ib(`newline`,n,{negate:a===`N`})};if(a===`O`)return{token:Ib(`any`,n)};if(a===`X`)return{token:Ib(`text_segment`,n)};let e=Db(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if(i===`(`){if(a===`*`)return{token:Jb(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:qb(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n===`(`&&!e.captureGroup||n===`(?:`)return{token:Bb(`group`,n)};if(n===`(?>`)return{token:Bb(`atomic`,n)};if(n===`(?=`||n===`(?!`||n===`(?<=`||n===`(?<!`)return{token:Bb(n[2]===`<`?`lookbehind`:`lookahead`,n,{negate:n.endsWith(`!`)})};if(n===`(`&&e.captureGroup||n.startsWith(`(?<`)&&n.endsWith(`>`)||n.startsWith(`(?'`)&&n.endsWith(`'`))return{token:Bb(`capturing`,n,{...n!==`(`&&{name:n.slice(3,-1)}})};if(n.startsWith(`(?~`)){if(n===`(?~|`)throw Error(`Unsupported absence function kind "${n}"`);return{token:Bb(`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:zb(n)}}if(e.getCurrentModX()){if(n===`#`){let e=t.indexOf(`
59
- `,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:Ib(`dot`,n)}:n===`^`||n===`$`?{token:kb(e.singleline?{"^":gb`\A`,$:gb`\Z`}[n]:n,n)}:n===`|`?{token:Ob(n)}:bb.test(n)?{tokens:nx(n)}:{token:jb(pb(n),n)}}function Tb(e,t,n){let r=[Fb(t[1]===`^`,t)],i=1,a;for(Sb.lastIndex=n;a=Sb.exec(e);){let e=a[0];if(e[0]===`[`&&e[1]!==`:`)i++,r.push(Fb(e[1]===`^`,e));else if(e===`]`){if(r.at(-1).type===`CharacterClassOpen`)r.push(jb(93,e));else if(i--,r.push(Mb(e)),!i)break}else{let t=Eb(e);Array.isArray(t)?r.push(...t):r.push(t)}}return{tokens:r,lastIndex:Sb.lastIndex||e.length}}function Eb(e){if(e[0]===`\\`)return Db(e,{inCharClass:!0});if(e[0]===`[`){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!hb.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return Ib(`posix`,e,{value:t.groups.name,negate:!!t.groups.negate})}return e===`-`?Nb(e):e===`&&`?Pb(e):jb(pb(e),e)}function Db(e,{inCharClass:t}){let n=e[1];if(n===`c`||n===`C`)return Kb(e);if(`dDhHsSwW`.includes(n))return Xb(e);if(e.startsWith(gb`\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 Zb(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 jb(pb(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n===`u`||n===`x`)return jb(ex(e),e);if(Gb.has(n))return jb(Gb.get(n),e);if(/\d/.test(n))return Rb(t,e);if(e===`\\`)throw Error(gb`Incomplete escape "\"`);if(n===`M`)throw Error(`Unsupported meta "${e}"`);if([...e].length===2)return jb(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function Ob(e){return{type:`Alternator`,raw:e}}function kb(e,t){return{type:`Assertion`,kind:e,raw:t}}function Ab(e){return{type:`Backreference`,raw:e}}function jb(e,t){return{type:`Character`,value:e,raw:t}}function Mb(e){return{type:`CharacterClassClose`,raw:e}}function Nb(e){return{type:`CharacterClassHyphen`,raw:e}}function Pb(e){return{type:`CharacterClassIntersector`,raw:e}}function Fb(e,t){return{type:`CharacterClassOpen`,negate:e,raw:t}}function Ib(e,t,n={}){return{type:`CharacterSet`,kind:e,...n,raw:t}}function Lb(e,t,n={}){return e===`keep`?{type:`Directive`,kind:e,raw:t}:{type:`Directive`,kind:e,flags:_b(n.flags),raw:t}}function Rb(e,t){return{type:`EscapedNumber`,inCharClass:e,raw:t}}function zb(e){return{type:`GroupClose`,raw:e}}function Bb(e,t,n={}){return{type:`GroupOpen`,kind:e,...n,raw:t}}function Vb(e,t,n,r){return{type:`NamedCallout`,kind:e,tag:t,arguments:n,raw:r}}function Hb(e,t,n,r){return{type:`Quantifier`,kind:e,min:t,max:n,raw:r}}function Ub(e){return{type:`Subroutine`,raw:e}}var Wb=new Set([`COUNT`,`CMP`,`ERROR`,`FAIL`,`MAX`,`MISMATCH`,`SKIP`,`TOTAL_COUNT`]),Gb=new Map([[`a`,7],[`b`,8],[`e`,27],[`f`,12],[`n`,10],[`r`,13],[`t`,9],[`v`,11]]);function Kb(e){let t=e[1]===`c`?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${e}"`);return jb(pb(t.toUpperCase())-64,e)}function qb(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=Qb(n),o=Qb(r),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(`)`))return t.replaceCurrentModX(i),Lb(`flags`,e,{flags:s});if(e.endsWith(`:`))return t.pushModX(i),t.numOpenGroups++,Bb(`group`,e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}function Jb(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=Wb.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 Vb(l,r??null,i?.split(`,`)??null,e)}function Yb(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 Hb(t,n,r,e)}function Xb(e){let t=e[1].toLowerCase();return Ib({d:`digit`,h:`hex`,s:`space`,w:`word`}[t],e,{negate:e[1]!==t})}function Zb(e){let{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Ib(`property`,e,{value:r,negate:t===`P`&&!n||t===`p`&&!!n})}function Qb(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 $b(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 ex(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 tx(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[Ab(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(gb`Octal encoded byte above 177 unsupported "${n}"`)}else r=pb(t);a.push(jb(r,(e===0?`\\`:``)+t))}return a}function nx(e){let t=[],n=new RegExp(bb,`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(Yb(e.slice(0,-1)));continue}}}t.push(Yb(e))}return t}function rx(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 ix(e){return ax.has(e.type)}var ax=new Set([`AbsenceFunction`,`Backreference`,`CapturingGroup`,`Character`,`CharacterClass`,`CharacterSet`,`Group`,`Quantifier`,`Subroutine`]);function ox(e,t={}){let n={flags:``,normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=Cb(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 gx();case`Assertion`:return sx(n);case`Backreference`:return cx(n,a);case`Character`:return bx(n.value,{useLastValid:!!t.isCheckingRangeEnd});case`CharacterClassHyphen`:return lx(n,a,t);case`CharacterClassOpen`:return ux(n,a,t);case`CharacterSet`:return dx(n,a);case`Directive`:return wx(n.kind,{flags:n.flags});case`GroupOpen`:return fx(n,a,t);case`NamedCallout`:return Ox(n.kind,n.tag,n.arguments);case`Quantifier`:return px(n,a);case`Subroutine`:return mx(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=jx(Tx(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(gb`Subroutine uses a duplicate group name "\g<${e}>"`);u.get(e)[0].isSubroutined=!0}else throw Error(gb`Subroutine uses a group name that's not defined "\g<${e}>"`);return o}function sx({kind:e}){return _x(_b({"^":`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===gb`\B`||e===gb`\Y`})}function cx({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,vx(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 vx(r)}return i(+r)}function lx(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(),Sx(o,e);throw Error(`Invalid character class range`)}return bx(pb(`-`))}function ux({negate:e},t,n){let{tokens:r,walk:i}=t,a=[xx()],o=r[t.nextIndex],s=Hx(o);for(;s.type!==`CharacterClassClose`;){if(s.type===`CharacterClassIntersector`)a.push(xx()),t.nextIndex++;else{let e=a.at(-1);e.body.push(i(e,n))}s=Hx(r[t.nextIndex],o)}let c=xx({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 dx({kind:e,negate:t,value:n},r){let{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o}=r;if(e===`property`){let r=Vx(n);if(hb.has(r)&&!o?.has(r))e=`posix`,n=r;else return Nx(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:a,unicodePropertyMap:o})}return e===`posix`?kx(n,{negate:t}):Cx(e,{negate:t})}function fx(e,t,n){let{tokens:r,capturingGroups:i,namedGroupsByName:a,skipLookbehindValidation:o,walk:s}=t,c=Px(e),l=c.type===`AbsenceFunction`,u=Rx(c),d=u&&c.negate;if(c.type===`CapturingGroup`&&(i.push(c),c.name&&mb(a,c.name,[]).push(c)),l&&n.isInAbsenceFunction)throw Error(`Nested absence function not supported by Oniguruma`);let f=Ux(r[t.nextIndex]);for(;f.type!==`GroupClose`;){if(f.type===`Alternator`)c.body.push(gx()),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(Lx(t)||t.type===`CapturingGroup`)throw Error(e)}else if(Lx(t)||Rx(t)&&t.negate)throw Error(e)}}f=Ux(r[t.nextIndex])}return t.nextIndex++,c}function px({kind:e,min:t,max:n},r){let i=r.parent,a=i.body.at(-1);if(!a||!ix(a))throw Error(`Quantifier requires a repeatable token`);let o=Ax(e,t,n,a);return i.body.pop(),o}function mx({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=Mx(i);return r.push(o),o}function hx(e,t){if(e!==`repeater`)throw Error(`Unexpected absence function kind "${e}"`);return{type:`AbsenceFunction`,kind:e,body:Fx(t?.body)}}function gx(e){return{type:`Alternative`,body:Ix(e?.body)}}function _x(e,t){let n={type:`Assertion`,kind:e};return(e===`word_boundary`||e===`text_segment_boundary`)&&(n.negate=!!t?.negate),n}function vx(e,t){let n=!!t?.orphan;return{type:`Backreference`,ref:e,...n&&{orphan:n}}}function yx(e,t){let n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!zx(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:Fx(t?.body)}}function bx(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 xx(e){let t={kind:`union`,negate:!1,...e};return{type:`CharacterClass`,kind:t.kind,negate:t.negate,body:Ix(e?.body)}}function Sx(e,t){if(t.value<e.value)throw Error(`Character class range out of order`);return{type:`CharacterClassRange`,min:e,max:t}}function Cx(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 wx(e,t={}){if(e===`keep`)return{type:`Directive`,kind:e};if(e===`flags`)return{type:`Directive`,kind:e,flags:_b(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}function Tx(e){return{type:`Flags`,...e}}function Ex(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:Fx(e?.body)}}function Dx(e){let t={behind:!1,negate:!1,...e};return{type:`LookaroundAssertion`,kind:t.behind?`lookbehind`:`lookahead`,negate:t.negate,body:Fx(e?.body)}}function Ox(e,t,n){return{type:`NamedCallout`,kind:e,tag:t,arguments:n}}function kx(e,t){let n=!!t?.negate;if(!hb.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:`CharacterSet`,kind:`posix`,value:e,negate:n}}function Ax(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 jx(e,t){return{type:`Regex`,body:Fx(t?.body),flags:e}}function Mx(e){return{type:`Subroutine`,ref:e}}function Nx(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},r=n.unicodePropertyMap?.get(Vx(e));if(!r){if(n.normalizeUnknownPropertyNames)r=Bx(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(gb`Invalid Unicode property "\p{${e}}"`)}return{type:`CharacterSet`,kind:`property`,value:r??e,negate:n.negate}}function Px({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case`absence_repeater`:return hx(`repeater`);case`atomic`:return Ex({atomic:!0});case`capturing`:return yx(i,{name:n});case`group`:return Ex({flags:e});case`lookahead`:case`lookbehind`:return Dx({behind:t===`lookbehind`,negate:r});default:throw Error(`Unexpected group kind "${t}"`)}}function Fx(e){if(e===void 0)e=[gx()];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 Ix(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 Lx(e){return e.type===`LookaroundAssertion`&&e.kind===`lookahead`}function Rx(e){return e.type===`LookaroundAssertion`&&e.kind===`lookbehind`}function zx(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function Bx(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 Vx(e){return e.replace(/[- _]+/g,``).toLowerCase()}function Hx(e,t){let n=t;return _b(e,`Unclosed character class${n?.type===`Character`&&n.value===93&&n.raw===`]`?` (started with "]")`:``}`)}function Ux(e){return _b(e,`Unclosed group`)}function Wx(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(){Gx(c).splice(Math.max(0,Kx(s)+l),1),l--,u=!0},removeAllNextSiblings(){return Gx(c).splice(Kx(s)+1)},removeAllPrevSiblings(){let e=Kx(s)+l;return l-=e,Gx(c).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;c?c[Math.max(0,Kx(s)+l)]=e:_b(o,`Can't replace root node`)[s]=e,n&&i(e,o,s,c),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(Gx(c).splice(Math.max(0,Kx(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,Kx(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 Gx(e){if(!Array.isArray(e))throw Error(`Container expected`);return e}function Kx(e){if(typeof e!=`number`)throw Error(`Numeric key expected`);return e}var qx=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function Jx(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Yx(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}var Xx=Object.freeze({DEFAULT:`DEFAULT`,CHAR_CLASS:`CHAR_CLASS`});function Zx(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===Xx.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?Xx.CHAR_CLASS:Xx.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 Qx(e,t,n,r){Zx(e,t,n,r)}function $x(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===Xx.DEFAULT==!a))return o;e===`[`?a++:e===`]`&&a&&a--,i.lastIndex==o.index&&i.lastIndex++}return null}function eS(e,t,n){return!!$x(e,t,0,n)}function tS(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 nS=new RegExp(String.raw`(?<noncapturingStart>${qx})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,`gsu`);function rS(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(nS.lastIndex=Number.isNaN(c)?0:c+7;f=nS.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),Jx(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=Zx(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}`},Xx.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}var iS=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,aS=new RegExp(String.raw`
60
- \\(?: \d+
61
- | c[A-Za-z]
62
- | [gk]<[^>]+>
63
- | [pPu]\{[^\}]+\}
64
- | u[A-Fa-f\d]{4}
65
- | x[A-Fa-f\d]{2}
66
- )
67
- | \((?: \? (?: [:=!>]
68
- | <(?:[=!]|[^>]+>)
69
- | [A-Za-z\-]+:
70
- | \(DEFINE\)
71
- ))?
72
- | (?<qBase>${iS})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
73
- | \\?.
74
- `.replace(/\s+/g,``),`gsu`);function oS(e){if(!RegExp(`${iS}\\+`).test(e))return{pattern:e};let t=[],n=null,r=null,i=``,a=0,o;for(aS.lastIndex=0;o=aS.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=Yx(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}aS.lastIndex+=t}else s[0]===`(`?t.push(c):s===`)`&&(n=t.length?t.pop():null)}i=s}return{pattern:e}}var sS=String.raw,cS=sS`\(\?R=(?<rDepth>[^\)]+)\)|${sS`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`}`,lS=sS`\(\?<(?![=!])(?<captureName>[^>]+)>`,uS=sS`${lS}|(?<unnamed>\()(?!\?)`,dS=new RegExp(sS`${lS}|${cS}|\(\?|\\?.`,`gsu`),fS=`Cannot use multiple overlapping recursions`;function pS(e,t){let{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:`plugin`,...t},i=t?.captureTransfers??new Map;if(!new RegExp(cS,`su`).test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r===`plugin`&&eS(e,sS`\(\?\(DEFINE\)`,Xx.DEFAULT))throw Error(`DEFINE groups cannot be used with recursion`);let a=[],o=eS(e,sS`\\[1-9]`,Xx.DEFAULT),s=new Map,c=[],l=!1,u=0,d=0,f;for(dS.lastIndex=0;f=dS.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(mS(m),l)throw Error(fS);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(dS.lastIndex);if(eS(s,cS,Xx.DEFAULT))throw Error(fS);let c=m-1;e=hS(t,s,c,!1,n,a,d),i=vS(i,t,c,a.length,0,d);break}if(h){mS(g);let u=!1;for(let e of c)if(e.name===h||e.num===+h){if(u=!0,e.hasRecursedWithin)throw Error(fS);break}if(!u)throw Error(sS`Recursive \g cannot be used outside the referenced group "${r===`external`?h:sS`\g<${h}&R=${g}>`}"`);let p=s.get(h),m=tS(e,p);if(o&&eS(m,sS`${lS}|\((?!\?)`,Xx.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=hS(_,v,b,!0,n,a,d);i=vS(i,_,b,a.length-y,y,d),e=`${e.slice(0,p)}${x}${e.slice(p+m.length)}`,dS.lastIndex+=x.length-t.length-_.length-v.length,c.forEach(e=>e.hasRecursedWithin=!0),l=!0}else if(p)d++,s.set(String(d),dS.lastIndex),s.set(p,dS.lastIndex),c.push({num:d,name:p});else if(t[0]===`(`){let e=t===`(`;e&&(d++,s.set(String(d),dS.lastIndex)),c.push(e?{num:d}:{})}else t===`)`&&c.pop()}}return n.push(...a),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function mS(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 hS(e,t,n,r,i,a,o){let s=new Set;r&&Qx(e+t,lS,({groups:{captureName:e}})=>{s.add(e)},Xx.DEFAULT);let c=[n,r?s:null,i,a,o];return`${e}${gS(`(?:${e}`,`forward`,...c)}(?:)${gS(`${t})`,`backward`,...c)}${t}`}function gS(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+=Zx(e,sS`${uS}|\\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),_S(i,n),s?e:`(?<${t}${l}>`}return sS`\k<${c}${l}>`},Xx.DEFAULT)}return c}function _S(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function vS(e,t,n,r,i,a){if(e.size&&r){let o=0;Qx(t,uS,()=>o++,Xx.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 yS=String.fromCodePoint,bS=String.raw,xS={},SS=globalThis.RegExp;xS.flagGroups=(()=>{try{new SS(`(?i:)`)}catch{return!1}return!0})(),xS.unicodeSets=(()=>{try{new SS(`[[]]`,`v`)}catch{return!1}return!0})(),xS.bugFlagVLiteralHyphenIsRange=xS.unicodeSets?(()=>{try{new SS(bS`[\d\-a]`,`v`)}catch{return!0}return!1})():!1,xS.bugNestedClassIgnoresNegation=xS.unicodeSets&&new SS(`[[^a]]`,`v`).test(`a`);function CS(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function wS(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function TS(e,t){return DS[e]>=DS[t]}function ES(e,t){if(e==null)throw Error(t??`Value expected`);return e}var DS={ES2025:2025,ES2024:2024,ES2018:2018},OS={auto:`auto`,ES2025:`ES2025`,ES2024:`ES2024`,ES2018:`ES2018`};function kS(e={}){if({}.toString.call(e)!==`[object Object]`)throw Error(`Unexpected options`);if(e.target!==void 0&&!OS[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=xS.flagGroups?`ES2025`:xS.unicodeSets?`ES2024`:`ES2018`),t}var AS=`[ -\r ]`,jS=new Set([yS(304),yS(305)]),MS=bS`[\p{L}\p{M}\p{N}\p{Pc}]`;function NS(e){if(jS.has(e))return[e];let t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=LS.get(n),a=FS.get(n),o=IS.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 PS=new Map(`C Other
75
- Cc Control cntrl
76
- Cf Format
77
- Cn Unassigned
78
- Co Private_Use
79
- Cs Surrogate
80
- L Letter
81
- LC Cased_Letter
82
- Ll Lowercase_Letter
83
- Lm Modifier_Letter
84
- Lo Other_Letter
85
- Lt Titlecase_Letter
86
- Lu Uppercase_Letter
87
- M Mark Combining_Mark
88
- Mc Spacing_Mark
89
- Me Enclosing_Mark
90
- Mn Nonspacing_Mark
91
- N Number
92
- Nd Decimal_Number digit
93
- Nl Letter_Number
94
- No Other_Number
95
- P Punctuation punct
96
- Pc Connector_Punctuation
97
- Pd Dash_Punctuation
98
- Pe Close_Punctuation
99
- Pf Final_Punctuation
100
- Pi Initial_Punctuation
101
- Po Other_Punctuation
102
- Ps Open_Punctuation
103
- S Symbol
104
- Sc Currency_Symbol
105
- Sk Modifier_Symbol
106
- Sm Math_Symbol
107
- So Other_Symbol
108
- Z Separator
109
- Zl Line_Separator
110
- Zp Paragraph_Separator
111
- Zs Space_Separator
112
- ASCII
113
- ASCII_Hex_Digit AHex
114
- Alphabetic Alpha
115
- Any
116
- Assigned
117
- Bidi_Control Bidi_C
118
- Bidi_Mirrored Bidi_M
119
- Case_Ignorable CI
120
- Cased
121
- Changes_When_Casefolded CWCF
122
- Changes_When_Casemapped CWCM
123
- Changes_When_Lowercased CWL
124
- Changes_When_NFKC_Casefolded CWKCF
125
- Changes_When_Titlecased CWT
126
- Changes_When_Uppercased CWU
127
- Dash
128
- Default_Ignorable_Code_Point DI
129
- Deprecated Dep
130
- Diacritic Dia
131
- Emoji
132
- Emoji_Component EComp
133
- Emoji_Modifier EMod
134
- Emoji_Modifier_Base EBase
135
- Emoji_Presentation EPres
136
- Extended_Pictographic ExtPict
137
- Extender Ext
138
- Grapheme_Base Gr_Base
139
- Grapheme_Extend Gr_Ext
140
- Hex_Digit Hex
141
- IDS_Binary_Operator IDSB
142
- IDS_Trinary_Operator IDST
143
- ID_Continue IDC
144
- ID_Start IDS
145
- Ideographic Ideo
146
- Join_Control Join_C
147
- Logical_Order_Exception LOE
148
- Lowercase Lower
149
- Math
150
- Noncharacter_Code_Point NChar
151
- Pattern_Syntax Pat_Syn
152
- Pattern_White_Space Pat_WS
153
- Quotation_Mark QMark
154
- Radical
155
- Regional_Indicator RI
156
- Sentence_Terminal STerm
157
- Soft_Dotted SD
158
- Terminal_Punctuation Term
159
- Unified_Ideograph UIdeo
160
- Uppercase Upper
161
- Variation_Selector VS
162
- White_Space space
163
- XID_Continue XIDC
164
- XID_Start XIDS`.split(/\s/).map(e=>[Vx(e),e])),FS=new Map([[`s`,yS(383)],[yS(383),`s`]]),IS=new Map([[yS(223),yS(7838)],[yS(107),yS(8490)],[yS(229),yS(8491)],[yS(969),yS(8486)]]),LS=new Map([BS(453),BS(456),BS(459),BS(498),...VS(8072,8079),...VS(8088,8095),...VS(8104,8111),BS(8124),BS(8140),BS(8188)]),RS=new Map([[`alnum`,bS`[\p{Alpha}\p{Nd}]`],[`alpha`,bS`\p{Alpha}`],[`ascii`,bS`\p{ASCII}`],[`blank`,bS`[\p{Zs}\t]`],[`cntrl`,bS`\p{Cc}`],[`digit`,bS`\p{Nd}`],[`graph`,bS`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],[`lower`,bS`\p{Lower}`],[`print`,bS`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],[`punct`,bS`[\p{P}\p{S}]`],[`space`,bS`\p{space}`],[`upper`,bS`\p{Upper}`],[`word`,bS`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],[`xdigit`,bS`\p{AHex}`]]);function zS(e,t){let n=[];for(let r=e;r<=t;r++)n.push(r);return n}function BS(e){let t=yS(e);return[t.toLowerCase(),t]}function VS(e,t){return zS(e,t).map(e=>BS(e))}var HS=new Set([`Lower`,`Lowercase`,`Upper`,`Uppercase`,`Ll`,`Lowercase_Letter`,`Lt`,`Titlecase_Letter`,`Lu`,`Uppercase_Letter`]);function US(e,t){let n={accuracy:`default`,asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:`ES2025`,...t};qS(e);let r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:TS(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};Wx(e,WS,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 Wx(e,GS,a),Wx(e,KS,{groupsByName:a.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:a.reffedNodesByReferencer}),e._originMap=a.groupOriginByCopy,e._strategy=r.strategy,e}var WS={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:r,kind:i}=e;if(i===`repeater`){let e=Ex();e.body[0].body.push(Dx({negate:!0,body:r}),Nx(`Any`));let i=Ex();i.body[0].body.push(Ax(`greedy`,0,1/0,e)),n(fC(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];wS(r,n,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=eC(t.get(e));if(n){let t=Ex({flags:n});t.body[0].body=e.body,e.body=[fC(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(fC(Dx({body:[gx({body:[_x(`string_end`)]}),gx({body:[bx(10)]})]}),t));else if(c===`line_start`)o(fC(lC(bS`(?<=\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&&oC(e))o(fC(Dx({negate:!0}),t));else if(d)throw Error(bS`Uses "\G" in a way that requires a subclass`);else o(dC(_x(`string_start`),t)),s.strategy=`clip_search`}}else if(c!==`string_end`&&c!==`string_start`){if(c===`string_end_newline`)o(fC(lC(bS`(?=\n?\z)`),t));else if(c===`word_boundary`){if(!p&&!u){let e=`(?:(?<=${MS})(?!${MS})|(?<!${MS})(?=${MS}))`,n=`(?:(?<=${MS})(?=${MS})|(?<!${MS})(?!${MS}))`;o(fC(lC(l?n:e),t))}}else throw Error(`Unexpected assertion kind "${c}"`)}},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!cC(n)&&(n=$S(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!cC(r)&&(r=$S(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(fC(xx({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(dC(Cx(`digit`,{negate:l}),t));return}if(o&&(c===`space`||u===`space`)){n(fC(uC(lC(AS),l),t));return}if(s&&(c===`word`||u===`word`)){n(dC(Cx(`word`,{negate:l}),t));return}if(c===`any`)n(dC(Nx(`Any`),t));else if(c===`digit`)n(dC(Nx(`Nd`,{negate:l}),t));else if(c!==`dot`){if(c===`text_segment`){if(r===`strict`)throw Error(bS`Use of "\X" requires non-strict accuracy`);let e=`\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?`,a=bS`\p{RI}{2}|${e}(?:\u200D${e})*`;n(fC(lC(bS`(?>\r\n|${i?bS`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c===`hex`)n(dC(Nx(`AHex`,{negate:l}),t));else if(c===`newline`)n(fC(lC(l?`[^
165
- ]`:`(?>\r
166
- ?|[
167
- \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-${yS(e.codePointAt(0)-1)}${yS(e.codePointAt(2)+1)}-\u{10FFFF}`),n(fC(lC(`[${e}]`),t))}else n(fC(uC(lC(RS.get(u)),l),t))}else if(c===`property`)PS.has(Vx(u))||(e.key=`sc`);else if(c===`space`)n(dC(Nx(`space`,{negate:l}),t));else if(c===`word`)n(fC(uC(lC(MS),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=Ex({flags:c});e.body[0].body=o(),i(fC(e,t),{traverse:!0})}}else if(s===`keep`){let e=n.body[0],r=n.body.length===1&&rx(e,{type:`Group`})&&e.body[0].body.length===1?e.body[0]:n;if(t.parent!==r||r.body.length>1)throw Error(bS`Uses "\K" in a way that's unsupported`);let o=Dx({behind:!0});o.body[0].body=a(),i(fC(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(fC(Dx({negate:!0}),t));else throw Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type===`Quantifier`){let t=Ex();t.body[0].body.push(e.body),e.body=fC(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=rC(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(bS`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n==`string`&&!cC(n)&&(n=$S(n,t),e.ref=n)}},GS={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=dC(ZS(e.number),t);c.set(r,s.get(e.number)),n(r);return}s.set(e.number,e),o.set(e.number,[]),e.name&&wS(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=wS(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=CS(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?ZS(0):XS(o,r.groupOriginByCopy,null),l=c;if(!s){let e=eC(QS(o,e=>e.type===`Group`&&!!e.flags)),t=e?CS(r.globalFlags,e):r.globalFlags;JS(t,r.currentFlags)||(l=Ex({flags:tC(t)}),l.body[0].body.push(c))}n(fC(l,t),{traverse:!s})}},KS={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=>YS(t,e));i.length?i.length>1?n(fC(Ex({atomic:!0,body:i.reverse().map(e=>gx({body:[vx(e.number)]}))}),t)):e.ref=i[0].number:n(fC(Dx({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=yx();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&e.ref!==0&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function qS(e){Wx(e,{"*"({node:e,parent:t}){e.parent=t}})}function JS(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function YS(e,t){let n=t;do{if(n.type===`Regex`)return!1;if(n.type===`Alternative`)continue;if(n===e)return!1;let t=nC(n.parent);for(let r of t){if(r===n)break;if(r===e||iC(r,e))return!0}}while(n=n.parent);throw Error(`Unexpected path`)}function XS(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]=XS(o,t,i,n):(a===`type`&&o===`CapturingGroup`&&t.set(i,t.get(e)??e),i[a]=o);return i}function ZS(e){let t=Mx(e);return t.isRecursive=!0,t}function QS(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function $S(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 eC(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 tC({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 nC(e){if(!e)throw Error(`Node expected`);let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function rC(e){let t=e.find(e=>e.kind===`search_start`||sC(e,{negate:!1})||!aC(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=rC(n.body);if(!t)return null;Array.isArray(t)?e.push(...t):e.push(t)}return e}return null}function iC(e,t){let n=nC(e)??[];for(let e of n)if(e===t||iC(e,t))return!0;return!1}function aC({type:e}){return e===`Assertion`||e===`Directive`||e===`LookaroundAssertion`}function oC(e){let t=[`Character`,`CharacterClass`,`CharacterSet`];return t.includes(e.type)||e.type===`Quantifier`&&e.min&&t.includes(e.body.type)}function sC(e,t){let n={negate:null,...t};return e.type===`LookaroundAssertion`&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&rx(e.body[0],{type:`Assertion`,kind:`search_start`})}function cC(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function lC(e,t){let n=ox(e,{...t,unicodePropertyMap:PS}).body;return n.length>1||n[0].body.length>1?Ex({body:n}):n[0].body[0]}function uC(e,t){return e.negate=t,e}function dC(e,t){return e.parent=t,e}function fC(e,t){return qS(e),e.parent=t,e}function pC(e,t){let n=kS(t),r=TS(n.target,`ES2024`),i=TS(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];Wx(e,mC,{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,ES(hC[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&&wS(f._captureTransfers,e.transferTo,[]).push(t)}),f}var mC={"*":{enter({node:e},t){if(DC(e)){let n=t.getCurrentModI();t.pushModI(e.flags?CS({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){DC(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){xC(yS(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),SC(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind===`property`&&HS.has(e.value)&&t.setHasCasedChar()}},hC={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?bS`\B`:bS`\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=yS(e),r=CC(e,{escDigit:t.lastNode.type===`Backreference`,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&xC(n)){let e=NS(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`);xS.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(kC)&&(o=[bx(45),...o.filter(e=>!kC(e))]);let s=()=>`[${i?`^`:``}${o.map(n).join(r===`intersection`?`&&`:``)}]`;if(!t.inCharClass){if((!t.useFlagV||xS.bugNestedClassIgnoresNegation)&&!i){let t=o.filter(e=>e.type===`CharacterClass`&&e.kind===`union`&&e.negate);if(t.length){let r=Ex(),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=gx({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`&&!(xS.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=CC(n,i),o=CC(r,i),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&wC(SC(e)).forEach(e=>{s.add(Array.isArray(e)?`${CC(e[0],i)}-${CC(e[1],i)}`:CC(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?`.`:`[^]`:bS`[^\n]`;if(e===`digit`)return t?bS`\D`:bS`\d`;if(e===`property`){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&HS.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?bS`\P`:bS`\p`}{${r?`${r}=`:``}${n}}`}if(e===`word`)return t?bS`\W`:bS`\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=CS(o,n));let s=t.map(a).join(`|`),c=!i.verbose&&t.length===1&&r.type!==`Quantifier`&&!e&&(!i.useFlagMods||!n)?s:`(?${TC(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)+EC(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})`:bS`\g<${t}&R=${r}>`}},gC=new Set([`$`,`(`,`)`,`*`,`+`,`.`,`?`,`[`,`\\`,`]`,`^`,`{`,`|`,`}`]),_C=new Set([`-`,`\\`,`]`,`^`,`[`]),vC=new Set("()-/[\\]^{|}!#$%&*+,.:;<=>?@`~".split(``)),yC=new Map([[9,bS`\t`],[10,bS`\n`],[11,bS`\v`],[12,bS`\f`],[13,bS`\r`],[8232,bS`\u2028`],[8233,bS`\u2029`],[65279,bS`\uFEFF`]]),bC=/^\p{Cased}$/u;function xC(e){return bC.test(e)}function SC(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=yS(e);if(!xC(t))continue;let o=NS(t).filter(e=>{let t=e.codePointAt(0);return t<r||t>i});if(o.length&&(a.push(...o),n))break}return a}function CC(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(yC.has(e))return yC.get(e);if(e<32||e>126&&e<160||e>262143||t&&OC(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,`0`)}`;let i=n?r?vC:_C:gC,a=yS(e);return(i.has(a)?`\\`:``)+a}function wC(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 TC(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 EC({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 DC({type:e}){return e===`CapturingGroup`||e===`Group`||e===`LookaroundAssertion`}function OC(e){return e>47&&e<58}function kC({type:e,value:t}){return e===`Character`&&t===45}var AC=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=MC(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&&(jC(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||=NC(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 jC(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 MC(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)wS(n,t,{}).transferTo=e;return n}function NC(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 PC(e,t){let n=FC(e,t);return n.options?new AC(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function FC(e,t){let n=kS(t),r=US(ox(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:PS}),{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=pC(r,n),a=pS(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:`external`}),o=rS(oS(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}function IC(e,t){return PC(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function LC(e={}){let t={target:`auto`,cache:new Map,...e};return t.regexConstructor||=e=>IC(e,{target:t.target}),{createScanner(e){return new fb(e,t)},createString(e){return{content:e}}}}async function RC(e){if(Jh())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=Uh.get(e);if(t!=null)return t;try{let t=Wh.get(e);if(t==null&&Object.prototype.hasOwnProperty.call(ag,e)&&(t=ag[e]),t==null)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return Hh.has(e)||Hh.set(e,n),n});return Uh.set(e,n),await n}finally{Uh.delete(e)}}function zC(e){return Hh.get(e)??RC(e)}var BC=new Set;function VC(e){let t=[],n=new Set;for(let r of HC(e.themes)){let e=GC(r)?r.getThemes():[r];for(let r of e){if(n.has(r.name))throw Error(`Theme collection already contains theme "${r.name}"`);n.add(r.name),t.push(r)}}let r=Object.freeze([...t]),i=Object.freeze(r.filter(e=>e.colorScheme===`light`)),a=Object.freeze(r.filter(e=>e.colorScheme===`dark`)),o=new Map(r.map(e=>[e.name,e])),s=Object.freeze(r.map(e=>e.name)),c=Object.freeze(i.map(e=>e.name)),l=Object.freeze(a.map(e=>e.name));function u(e){if(e==null)return r;let{colorScheme:t,collection:n}=e;return n==null?t===`light`?i:t===`dark`?a:r:r.filter(e=>e.collection===n?t==null||e.colorScheme===t:!1)}return{getTheme(e){return o.get(e)},getThemes(e){return u(e)},getThemeNames(e){return e?.collection==null?e?.colorScheme===`light`?c:e?.colorScheme===`dark`?l:s:u(e).map(e=>e.name)},hasTheme(e){return o.has(e)},orderBy(e){return VC({themes:r.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let r=e(t.descriptor,n.descriptor);return r===0?t.index-n.index:r}).map(e=>e.descriptor)})},pick(e){let t=[],n=new Set;for(let r of e){if(n.has(r))throw Error(`Theme collection pick already includes theme "${r}"`);n.add(r);let e=o.get(r);if(e==null)throw Error(`Theme collection does not contain theme "${r}"`);t.push(e)}return VC({themes:t})},registerInto(e){for(let t of r)e.registerThemeIfAbsent(t.name,t.load)}}}function HC(e){return UC(e)?[e]:e}function UC(e){return GC(e)||WC(e)}function WC(e){return typeof e.name==`string`&&typeof e.load==`function`}function GC(e){return typeof e.getThemes==`function`}function KC(e){return typeof e==`object`&&e&&`default`in e?e.default:e}var qC=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name=`DuplicateThemeError`}},JC=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name=`UnregisteredThemeError`}},YC=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name=`UnresolvedThemeError`}};function XC(){let e=new Map,t=new Map,n=new Map,r=0;function i(t,n){if(e.has(t))throw new qC(t);e.set(t,n)}function a(t,n){return!e.has(t)&&(e.set(t,n),!0)}function o(t){return e.has(t)}function s(i){let a=t.get(i);if(a!==void 0)return Promise.resolve(a);let o=n.get(i);if(o!==void 0)return o;let s=e.get(i);if(s===void 0)return Promise.reject(new JC(i));let c=r,l=s().then(e=>{let a=KC(e);return c===r&&t.set(i,a),n.get(i)===l&&n.delete(i),a}).catch(e=>{throw n.get(i)===l&&n.delete(i),e});return n.set(i,l),l}function c(e){return Promise.all(e.map(e=>s(e)))}function l(e,n){t.set(e,n)}function u(e){for(let[t,n]of e)l(t,n)}function d(e){return t.get(e)}function f(e){let n=[];for(let r of e){let e=t.get(r);if(e===void 0)throw new YC(r);n.push(e)}return n}function p(e){return t.has(e)}function m(e){for(let n of e)if(!t.has(n))return!1;return!0}function h(e){let n=t.get(e);return n===void 0?s(e):n}function g(){r++,t.clear(),n.clear()}return{clearResolvedThemes:g,getResolvedOrResolveTheme:h,getResolvedTheme:d,getResolvedThemes:f,hasRegisteredTheme:o,hasResolvedTheme:p,hasResolvedThemes:m,registerTheme:i,registerThemeIfAbsent:a,resolveTheme:s,resolveThemes:c,seedResolvedTheme:l,seedResolvedThemes:u}}var ZC=XC();function QC(e,t){e=Array.isArray(e)?e:[e];for(let n of e){let e;if(typeof n==`string`){if(e=ZC.getResolvedTheme(n),e==null)throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,ZC.getResolvedTheme(n)??ZC.seedResolvedTheme(n,e);BC.has(n)||(BC.add(n),t.loadThemeSync(e))}}function $C({name:e,load:t,colorScheme:n,collection:r,displayName:i}){return{name:e,colorScheme:n,collection:r,displayName:i,load:ew(t)}}function ew(e){return async()=>Mv(KC(await e()))}var tw=`pierre`,nw=[`pierre-light`,`pierre-light-soft`],rw=[`pierre-dark`,`pierre-dark-soft`],iw=[...nw,...rw],aw=new Set(nw);function ow(e){return aw.has(e)?`light`:`dark`}var sw={"pierre-dark":`Pierre Dark`,"pierre-dark-soft":`Pierre Dark Soft`,"pierre-dark-vibrant":`Pierre Dark Vibrant`,"pierre-light":`Pierre Light`,"pierre-light-soft":`Pierre Light Soft`,"pierre-light-vibrant":`Pierre Light Vibrant`},cw={"pierre-dark":()=>X(()=>import(`./pierre-dark-sU4Zdns8.js`),[]),"pierre-dark-soft":()=>X(()=>import(`./pierre-dark-soft-HXgun5vs.js`),[]),"pierre-dark-vibrant":()=>X(()=>import(`./pierre-dark-vibrant-D4RhcSIK.js`),[]),"pierre-light":()=>X(()=>import(`./pierre-light-DWBk51d8.js`),[]),"pierre-light-soft":()=>X(()=>import(`./pierre-light-soft-CodEzPxf.js`),[]),"pierre-light-vibrant":()=>X(()=>import(`./pierre-light-vibrant-B76X7i5Y.js`),[])};function lw(e){return async()=>({...(await cw[e]()).default,name:e})}function uw(e){return $C({name:e,collection:tw,colorScheme:ow(e),displayName:sw[e],load:lw(e)})}var dw=VC({themes:iw.map(e=>uw(e))}),fw=`shiki`,pw=[`ayu-light`,`catppuccin-latte`,`everforest-light`,`github-light`,`github-light-default`,`github-light-high-contrast`,`gruvbox-light-hard`,`gruvbox-light-medium`,`gruvbox-light-soft`,`horizon-bright`,`kanagawa-lotus`,`light-plus`,`material-theme-lighter`,`min-light`,`night-owl-light`,`one-light`,`rose-pine-dawn`,`slack-ochin`,`snazzy-light`,`solarized-light`,`vitesse-light`],mw=`andromeeda.aurora-x.ayu-dark.ayu-mirage.catppuccin-frappe.catppuccin-macchiato.catppuccin-mocha.dark-plus.dracula.dracula-soft.everforest-dark.github-dark.github-dark-default.github-dark-dimmed.github-dark-high-contrast.gruvbox-dark-hard.gruvbox-dark-medium.gruvbox-dark-soft.horizon.houston.kanagawa-dragon.kanagawa-wave.laserwave.material-theme.material-theme-darker.material-theme-ocean.material-theme-palenight.min-dark.monokai.night-owl.nord.one-dark-pro.plastic.poimandres.red.rose-pine.rose-pine-moon.slack-dark.solarized-dark.synthwave-84.tokyo-night.vesper.vitesse-black.vitesse-dark`.split(`.`),hw=new Set(pw);function gw(e){return hw.has(e)?`light`:`dark`}var _w={andromeeda:()=>X(()=>import(`./andromeeda-vGVdxbeo.js`),[]),"aurora-x":()=>X(()=>import(`./aurora-x-CDeNXAV0.js`),[]),"ayu-dark":()=>X(()=>import(`./ayu-dark-DluEY0Gj.js`),[]),"ayu-light":()=>X(()=>import(`./ayu-light-C3h-C4tm.js`),[]),"ayu-mirage":()=>X(()=>import(`./ayu-mirage-Bqwy1Gya.js`),[]),"catppuccin-frappe":()=>X(()=>import(`./catppuccin-frappe-C9Q5zVZY.js`),[]),"catppuccin-latte":()=>X(()=>import(`./catppuccin-latte-CtsyrtPq.js`),[]),"catppuccin-macchiato":()=>X(()=>import(`./catppuccin-macchiato-R8nAf1vR.js`),[]),"catppuccin-mocha":()=>X(()=>import(`./catppuccin-mocha-DjuaAJKi.js`),[]),"dark-plus":()=>X(()=>import(`./dark-plus-Cs2F2srj.js`),[]),dracula:()=>X(()=>import(`./dracula-BHWKrbxM.js`),[]),"dracula-soft":()=>X(()=>import(`./dracula-soft-5eyTD99u.js`),[]),"everforest-dark":()=>X(()=>import(`./everforest-dark-sB-x3p7T.js`),[]),"everforest-light":()=>X(()=>import(`./everforest-light-Df2xbC6M.js`),[]),"github-dark":()=>X(()=>import(`./github-dark-C-LZuMrd.js`),[]),"github-dark-default":()=>X(()=>import(`./github-dark-default-DXG-b-1a.js`),[]),"github-dark-dimmed":()=>X(()=>import(`./github-dark-dimmed-Bx1FflLF.js`),[]),"github-dark-high-contrast":()=>X(()=>import(`./github-dark-high-contrast-B_tTalzw.js`),[]),"github-light":()=>X(()=>import(`./github-light-EUqPIrTm.js`),[]),"github-light-default":()=>X(()=>import(`./github-light-default-BXViO-2h.js`),[]),"github-light-high-contrast":()=>X(()=>import(`./github-light-high-contrast-B68TUdTA.js`),[]),"gruvbox-dark-hard":()=>X(()=>import(`./gruvbox-dark-hard-C820rvS2.js`),[]),"gruvbox-dark-medium":()=>X(()=>import(`./gruvbox-dark-medium-BPjhmG05.js`),[]),"gruvbox-dark-soft":()=>X(()=>import(`./gruvbox-dark-soft-MrdJrrXF.js`),[]),"gruvbox-light-hard":()=>X(()=>import(`./gruvbox-light-hard-BC_s9l72.js`),[]),"gruvbox-light-medium":()=>X(()=>import(`./gruvbox-light-medium-BAWPOn9u.js`),[]),"gruvbox-light-soft":()=>X(()=>import(`./gruvbox-light-soft-BSMLrYjP.js`),[]),horizon:()=>X(()=>import(`./horizon-CE9ld1lL.js`),[]),"horizon-bright":()=>X(()=>import(`./horizon-bright-DSNQnXHK.js`),[]),houston:()=>X(()=>import(`./houston-CsvMBhTu.js`),[]),"kanagawa-dragon":()=>X(()=>import(`./kanagawa-dragon-Bozd7klA.js`),[]),"kanagawa-lotus":()=>X(()=>import(`./kanagawa-lotus-BmuOG9ZW.js`),[]),"kanagawa-wave":()=>X(()=>import(`./kanagawa-wave-BML5mF2J.js`),[]),laserwave:()=>X(()=>import(`./laserwave-C_8bwKvT.js`),[]),"light-plus":()=>X(()=>import(`./light-plus-DVQuIRkW.js`),[]),"material-theme":()=>X(()=>import(`./material-theme-Bm3Qr25_.js`),[]),"material-theme-darker":()=>X(()=>import(`./material-theme-darker-2IIEA8gg.js`),[]),"material-theme-lighter":()=>X(()=>import(`./material-theme-lighter-uhdI0v04.js`),[]),"material-theme-ocean":()=>X(()=>import(`./material-theme-ocean-CHQ94UKr.js`),[]),"material-theme-palenight":()=>X(()=>import(`./material-theme-palenight-B5W6OYN7.js`),[]),"min-dark":()=>X(()=>import(`./min-dark-BSWPekZh.js`),[]),"min-light":()=>X(()=>import(`./min-light-DDpmG2fV.js`),[]),monokai:()=>X(()=>import(`./monokai-B_bV9PQ9.js`),[]),"night-owl":()=>X(()=>import(`./night-owl-DhmEMT88.js`),[]),"night-owl-light":()=>X(()=>import(`./night-owl-light-eJ-hLW7d.js`),[]),nord:()=>X(()=>import(`./nord-Cb4Vim4T.js`),[]),"one-dark-pro":()=>X(()=>import(`./one-dark-pro-CLwyXe_n.js`),[]),"one-light":()=>X(()=>import(`./one-light-D7Lr4KcI.js`),[]),plastic:()=>X(()=>import(`./plastic-DQwYfKfQ.js`),[]),poimandres:()=>X(()=>import(`./poimandres-DRFjx7u4.js`),[]),red:()=>X(()=>import(`./red-DX1BQOs8.js`),[]),"rose-pine":()=>X(()=>import(`./rose-pine-aMsaMD1D.js`),[]),"rose-pine-dawn":()=>X(()=>import(`./rose-pine-dawn-8PwUyIlP.js`),[]),"rose-pine-moon":()=>X(()=>import(`./rose-pine-moon-DO-qXg-I.js`),[]),"slack-dark":()=>X(()=>import(`./slack-dark-DnToyrRv.js`),[]),"slack-ochin":()=>X(()=>import(`./slack-ochin-B2OO5cIa.js`),[]),"snazzy-light":()=>X(()=>import(`./snazzy-light-4G7pJPwS.js`),[]),"solarized-dark":()=>X(()=>import(`./solarized-dark-UdsmMDCL.js`),[]),"solarized-light":()=>X(()=>import(`./solarized-light-C1IUL_tW.js`),[]),"synthwave-84":()=>X(()=>import(`./synthwave-84-nFMaYfgc.js`),[]),"tokyo-night":()=>X(()=>import(`./tokyo-night-oM2G3aXe.js`),[]),vesper:()=>X(()=>import(`./vesper-DdrHHSXu.js`),[]),"vitesse-black":()=>X(()=>import(`./vitesse-black-fwtXNY1n.js`),[]),"vitesse-dark":()=>X(()=>import(`./vitesse-dark-BZCL-v6S.js`),[]),"vitesse-light":()=>X(()=>import(`./vitesse-light-VbXTXTou.js`),[])};function vw(e){return $C({name:e,collection:fw,colorScheme:gw(e),load:_w[e]})}var yw=VC({themes:Object.freeze([...pw.map(e=>vw(e)),...mw.map(e=>vw(e))])});function bw(e){if(Jh())throw Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(ZC.hasRegisteredTheme(e))return;let t=yw.getTheme(e);if(t!=null){ZC.registerThemeIfAbsent(t.name,t.load);return}throw Error(`No valid theme loader registered for "${e}"`)}function xw(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function Sw(e){bw(e);let t=await ZC.resolveTheme(e);return xw(e,t),t}function Cw(e){return ZC.getResolvedTheme(e)??Sw(e)}var ww;async function Tw({themes:e,langs:t,preferredHighlighter:n=`shiki-js`}){ww??=rb({themes:[],langs:[`text`],engine:n===`shiki-wasm`?Fg(X(()=>import(`./wasm-BnjxR4X6.js`),[])):LC()});let r=Dw(ww)?await ww:ww;ww=r;let i=[];for(let e of t){if(e===`text`||e===`ansi`)continue;let t=zC(e);`then`in t?i.push(t):qh(t,r)}let a=[];for(let t of e){let e=Cw(t);`then`in e?a.push(e):QC(e,ww)}return(i.length>0||a.length>0)&&await Promise.all([Promise.all(i).then(e=>{qh(e,r)}),Promise.all(a).then(e=>{QC(e,r)})]),r}function Ew(){if(ww!=null&&!(`then`in ww))return ww}function Dw(e=ww){return e!=null&&`then`in e}for(let e of dw.getThemes())ZC.registerThemeIfAbsent(e.name,e.load);function Ow(e=Rf){let t=[];return typeof e==`string`?t.push(e):(t.push(e.dark),t.push(e.light)),t}function kw(e){for(let t of Ow(e))if(!BC.has(t))return!1;return!0}function Aw(e){return ZC.hasResolvedThemes(e)}function jw(e,t){return $f(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength}function Mw(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}function Nw(e,t){return e==null||t==null?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}function Pw(e){return ap({tagName:`div`,children:[ap({tagName:`div`,children:e.annotations?.map(e=>ap({tagName:`slot`,properties:{name:e}})),properties:{"data-annotation-content":``}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}function Fw(e){switch(e){case`file`:return`diffs-icon-file-code`;case`change`:return`diffs-icon-symbol-modified`;case`new`:return`diffs-icon-symbol-added`;case`deleted`:return`diffs-icon-symbol-deleted`;case`rename-pure`:case`rename-changed`:return`diffs-icon-symbol-moved`}}function Iw({fileOrDiff:e,mode:t,stickyHeader:n}){let r=`type`in e?e:void 0,i={"data-diffs-header":t,"data-change-type":r?.type,"data-sticky":n?``:void 0};return ap({tagName:`div`,children:[t===`custom`?ap({tagName:`slot`,properties:{name:Lf}}):Lw({name:e.name,prevName:`prevName`in e?e.prevName:void 0,iconType:r?.type??`file`}),...t===`custom`?[]:[Rw(r)]],properties:i})}function Lw({name:e,prevName:t,iconType:n}){let r=[ap({tagName:`slot`,properties:{name:Ff}}),op({name:Fw(n),properties:{"data-change-icon":n}})];return t!=null&&(r.push(ap({tagName:`div`,children:[ap({tagName:`bdi`,children:[ip(t)]})],properties:{"data-prev-name":``}})),r.push(op({name:`diffs-icon-arrow-right-short`,properties:{"data-rename-icon":``}}))),r.push(ap({tagName:`div`,children:[ap({tagName:`bdi`,children:[ip(e)]})],properties:{"data-title":``}})),ap({tagName:`div`,children:r,properties:{"data-header-content":``}})}function Rw(e){let t=[];if(e!=null){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||n===0)&&t.push(ap({tagName:`span`,children:[ip(`-${r}`)],properties:{"data-deletions-count":``}})),(n>0||r===0)&&t.push(ap({tagName:`span`,children:[ip(`+${n}`)],properties:{"data-additions-count":``}}))}return t.push(ap({tagName:`slot`,properties:{name:If}})),ap({tagName:`div`,children:t,properties:{"data-metadata":``}})}function zw(e){return ap({tagName:`pre`,properties:Bw(e)})}function Bw({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:r,split:i,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":o===`diff`?``:void 0,"data-file":o===`file`?``:void 0,"data-diff-type":o===`diff`?i?`split`:`single`:void 0,"data-overflow":r,"data-disable-line-numbers":n?``:void 0,"data-background":t?void 0:``,"data-indicators":e===`bars`||e===`classic`?e:void 0,tabIndex:0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}var Vw=new Map,Hw=0,Uw={"1c":`1c`,abap:`abap`,as:`actionscript-3`,ada:`ada`,adb:`ada`,ads:`ada`,adoc:`asciidoc`,asciidoc:`asciidoc`,"component.html":`angular-html`,"component.ts":`angular-ts`,conf:`nginx`,htaccess:`apache`,cls:`tex`,trigger:`apex`,apl:`apl`,applescript:`applescript`,scpt:`applescript`,ara:`ara`,asm:`asm`,s:`riscv`,astro:`astro`,awk:`awk`,bal:`ballerina`,sh:`zsh`,bash:`zsh`,bat:`cmd`,cmd:`cmd`,be:`berry`,beancount:`beancount`,bib:`bibtex`,bicep:`bicep`,"blade.php":`blade`,bsl:`bsl`,c:`c`,h:`objective-cpp`,cs:`csharp`,cpp:`cpp`,hpp:`cpp`,cc:`cpp`,cxx:`cpp`,hh:`cpp`,cdc:`cdc`,cairo:`cairo`,clar:`clarity`,clj:`clojure`,cljs:`clojure`,cljc:`clojure`,soy:`soy`,cmake:`cmake`,"CMakeLists.txt":`cmake`,cob:`cobol`,cbl:`cobol`,cobol:`cobol`,CODEOWNERS:`codeowners`,ql:`ql`,coffee:`coffeescript`,lisp:`lisp`,cl:`lisp`,lsp:`lisp`,log:`log`,v:`verilog`,cql:`cql`,cr:`crystal`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cypher`,cyp:`cypher`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,patch:`diff`,Dockerfile:`dockerfile`,dockerfile:`dockerfile`,env:`dotenv`,dm:`dream-maker`,edge:`edge`,el:`emacs-lisp`,ex:`elixir`,exs:`elixir`,elm:`elm`,erb:`erb`,erl:`erlang`,hrl:`erlang`,f:`fortran-fixed-form`,for:`fortran-fixed-form`,fs:`fsharp`,fsi:`fsharp`,fsx:`fsharp`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`fortran-free-form`,f95:`fortran-free-form`,fnl:`fennel`,fish:`fish`,ftl:`ftl`,tres:`gdresource`,res:`gdresource`,gd:`gdscript`,gdshader:`gdshader`,gs:`genie`,feature:`gherkin`,COMMIT_EDITMSG:`git-commit`,"git-rebase-todo":`git-rebase`,gjs:`glimmer-js`,gleam:`gleam`,gts:`glimmer-ts`,glsl:`glsl`,vert:`glsl`,frag:`glsl`,shader:`shaderlab`,gp:`gnuplot`,plt:`gnuplot`,gnuplot:`gnuplot`,go:`go`,graphql:`graphql`,gql:`graphql`,groovy:`groovy`,gvy:`groovy`,hack:`hack`,haml:`haml`,hbs:`handlebars`,handlebars:`handlebars`,hs:`haskell`,lhs:`haskell`,hx:`haxe`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,fx:`hlsl`,html:`html`,htm:`html`,http:`http`,rest:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,cfg:`ini`,jade:`pug`,pug:`pug`,java:`java`,js:`javascript`,mjs:`javascript`,cjs:`javascript`,jinja:`jinja`,jinja2:`jinja`,j2:`jinja`,jison:`jison`,jl:`julia`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,libsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,kt:`kotlin`,kts:`kts`,kql:`kusto`,tex:`tex`,ltx:`tex`,lean:`lean4`,less:`less`,liquid:`liquid`,lit:`lit`,ll:`llvm`,logo:`logo`,lua:`lua`,luau:`luau`,Makefile:`makefile`,mk:`makefile`,makefile:`makefile`,md:`markdown`,markdown:`markdown`,marko:`marko`,m:`wolfram`,mat:`matlab`,mdc:`mdc`,mdx:`mdx`,wiki:`wikitext`,mediawiki:`wikitext`,mmd:`mermaid`,mermaid:`mermaid`,mips:`mipsasm`,mojo:`mojo`,"🔥":`mojo`,move:`move`,nar:`narrat`,nf:`nextflow`,nim:`nim`,nims:`nim`,nimble:`nim`,nix:`nix`,nu:`nushell`,mm:`objective-cpp`,ml:`ocaml`,mli:`ocaml`,mll:`ocaml`,mly:`ocaml`,pas:`pascal`,p:`pascal`,pl:`prolog`,pm:`perl`,t:`perl`,raku:`raku`,p6:`raku`,pl6:`raku`,php:`php`,phtml:`php`,pls:`plsql`,sql:`sql`,po:`po`,polar:`polar`,pcss:`postcss`,pot:`pot`,potx:`potx`,pq:`powerquery`,pqm:`powerquery`,ps1:`powershell`,psm1:`powershell`,psd1:`powershell`,prisma:`prisma`,pro:`prolog`,P:`prolog`,properties:`properties`,proto:`protobuf`,pp:`puppet`,purs:`purescript`,py:`python`,pyw:`python`,pyi:`python`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,R:`r`,rkt:`racket`,rktl:`racket`,razor:`razor`,cshtml:`razor`,rb:`ruby`,rbw:`ruby`,reg:`reg`,regex:`regexp`,rel:`rel`,rs:`rust`,rst:`rst`,rake:`ruby`,gemspec:`ruby`,jbuilder:`ruby`,builder:`ruby`,rabl:`ruby`,arb:`ruby`,ru:`ruby`,podspec:`ruby`,Gemfile:`ruby`,Rakefile:`ruby`,Guardfile:`ruby`,Capfile:`ruby`,Berksfile:`ruby`,Brewfile:`ruby`,Vagrantfile:`ruby`,Thorfile:`ruby`,Appraisals:`ruby`,Dangerfile:`ruby`,sas:`sas`,sass:`sass`,scala:`scala`,sc:`scala`,scm:`scheme`,ss:`scheme`,sld:`scheme`,scss:`scss`,sdbl:`sdbl`,shadergraph:`shader`,st:`smalltalk`,sol:`solidity`,sparql:`sparql`,rq:`sparql`,spl:`splunk`,config:`ssh-config`,do:`stata`,ado:`stata`,dta:`stata`,styl:`stylus`,stylus:`stylus`,svelte:`svelte`,swift:`swift`,sv:`system-verilog`,svh:`system-verilog`,service:`systemd`,socket:`systemd`,device:`systemd`,timer:`systemd`,talon:`talonscript`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`typescript`,tsp:`typespec`,tsv:`tsv`,tsx:`tsx`,ttl:`turtle`,twig:`twig`,typ:`typst`,vv:`v`,vala:`vala`,vapi:`vala`,vb:`vb`,vbs:`vb`,bas:`vb`,vh:`verilog`,vhd:`vhdl`,vhdl:`vhdl`,vim:`vimscript`,vue:`vue`,"vine.ts":`vue-vine`,vy:`vyper`,wasm:`wasm`,wat:`wasm`,wy:`文言`,wgsl:`wgsl`,wit:`wit`,wl:`wolfram`,nb:`wolfram`,xml:`xml`,xsl:`xsl`,xslt:`xsl`,yaml:`yaml`,yml:`yml`,zs:`zenscript`,zig:`zig`,zsh:`zsh`,sty:`tex`};function Ww(e){if(Vw.has(e))return Vw.get(e)??`text`;if(Uw[e]!=null)return Uw[e];let t=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(t!=null){if(Vw.has(t[1]))return Vw.get(t[1])??`text`;if(Uw[t[1]]!=null)return Uw[t[1]]??`text`}let n=e.match(/\.([^.]+)$/)?.[1]??``;return Vw.has(n)?Vw.get(n)??`text`:Uw[n]??`text`}function Gw(){return Hw}function Kw(){return Object.fromEntries(Vw)}function qw(e,{theme:t,preferredHighlighter:n=`shiki-js`}){return{langs:[e??`text`],themes:Ow(t),preferredHighlighter:n}}function Jw(e){return`annotation-${`side`in e?`${e.side}-`:``}${e.lineNumber}`}function Yw(e){return e.replace(/\n$|\r\n$/,``)}function Xw(e,t,n){let r=typeof n.lineInfo==`function`?n.lineInfo(t):n.lineInfo[t-1];if(r==null){let r=`processLine: line ${t}, contains no state.lineInfo`;throw console.error(r,{node:e,line:t,state:n}),Error(r)}return e.tagName=`div`,e.properties[`data-line`]=r.lineNumber,e.properties[`data-alt-line`]=r.altLineNumber,e.properties[`data-line-type`]=r.type,e.properties[`data-line-index`]=r.lineIndex,e.children.length===0&&e.children.push(ip(`
168
- `)),e}var Zw=Symbol(`no-token`),Qw=Symbol(`multiple-tokens`);function $w(e){let t=eT(e);if(t!=null)return t;let n=Zw,r=[],i=[],a,o=()=>{if(i.length===0||a==null){i=[],a=void 0;return}if(i.length===1){let e=i[0];if(e?.type===`element`){nT(e,a);for(let t of e.children)tT(t)}else tT(e);r.push(e),i=[],a=void 0;return}for(let e of i)tT(e);r.push(ap({tagName:`span`,properties:{"data-char":a},children:i})),i=[],a=void 0},s=e=>{if(e!==Zw){if(e===Qw){n=Qw;return}if(n===Zw){n=e;return}n!==e&&(n=Qw)}};for(let t of e.children){let e=t.type===`element`?$w(t):Zw;if(s(e),typeof e!=`number`){o(),r.push(t);continue}a!=null&&a!==e&&o(),a??=e,i.push(t)}return o(),e.children=r,n}function eT(e){let t=e.properties[`data-char`];if(typeof t==`number`)return t}function tT(e){if(e.type===`element`){e.properties[`data-char`]=void 0;for(let t of e.children)tT(t)}}function nT(e,t){e.properties[`data-char`]=t}function rT(e={}){let{classPrefix:t=`__shiki_`,classSuffix:n=``,classReplacer:r=e=>e}=e,i=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function o(e){let o=typeof e==`string`?e:a(e),s=t+iT(o)+n;return s=r(s),i.has(s)||i.set(s,typeof e==`string`?e:{...e}),s}return{name:`@shikijs/transformers:style-to-class`,pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry(){return i},getCSS(){let e=``;for(let[t,n]of i.entries())e+=`.${t}{${typeof n==`string`?n:a(n)}}`;return e},clearRegistry(){i.clear()}}}function iT(e,t=0){let n=3735928559^t,r=1103547991^t;for(let t=0,i;t<e.length;t++)i=e.charCodeAt(t),n=Math.imul(n^i,2654435761),r=Math.imul(r^i,1597334677);return n=Math.imul(n^n>>>16,2246822507),n^=Math.imul(r^r>>>13,3266489909),r=Math.imul(r^r>>>16,2246822507),r^=Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&r)+(n>>>0)).toString(36).slice(0,6)}function aT(e=!1,t=!1){let n={lineInfo:[]},r=[{line(e){return delete e.properties.class,e},pre(t){let r=sp(t),i=[];if(r!=null){let t=1;for(let a of r.children)a.type===`element`&&(e&&$w(a),i.push(Xw(a,t,n)),t++);r.children=i}return t},...e?{tokens(e){for(let t of e){let e=0;for(let n of t){let t=n;t.__lineChar??=e,e+=n.content.length}}},preprocess(e,t){t.mergeWhitespaces=`never`},span(e,t,n,r,i){if(i?.offset!=null&&i.content!=null){let t=i.__lineChar;return t!=null&&(e.properties[`data-char`]=t),e}return e}}:null}];return t&&r.push(sT,oT),{state:n,transformers:r,toClass:oT}}var oT=rT({classPrefix:`hl-`}),sT={name:`token-style-normalizer`,tokens(e){for(let t of e)for(let e of t){if(e.htmlStyle!=null)continue;let t={};e.color!=null&&(t.color=e.color),e.bgColor!=null&&(t[`background-color`]=e.bgColor),e.fontStyle!=null&&e.fontStyle!==0&&(e.fontStyle&1&&(t[`font-style`]=`italic`),e.fontStyle&2&&(t[`font-weight`]=`bold`),e.fontStyle&4&&(t[`text-decoration`]=`underline`)),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function cT(e){return`--${e===`token`?`diffs-token`:`diffs`}-`}var lT=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,uT=/^0(?:\.0+)?%?$/;function dT(e){let t=e.indexOf(`(`);if(t<=0||!e.endsWith(`)`))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let r=e.slice(t+1,-1).trim();if(r.length===0)return;let i=r.lastIndexOf(`/`);if(i!==-1)return r.slice(i+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=r.split(`,`);if(e.length===4)return e[3]?.trim()}}function fT(e){let t=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(t==null)return null;let n=t[1],r,i=1;return n.length===3?r=n.split(``).map(e=>e+e).join(``):n.length===6?r=n:(r=n.slice(0,6),i=parseInt(n.slice(6,8),16)/255),[parseInt(r.slice(0,2),16),parseInt(r.slice(2,4),16),parseInt(r.slice(4,6),16),i]}function pT(e){if(e==null)return null;let t=fT(e);if(t==null)return null;let n=t[0]/255,r=t[1]/255,i=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(r)+.0722*a(i)}function mT(e){if(e==null)return!1;let t=e.trim().toLowerCase();if(t===`transparent`||lT.test(t))return!0;let n=dT(t);return n!=null&&uT.test(n)}function hT(e,t,n){if(t==null||n==null)return!1;let r=pT(e),i=pT(t),a=pT(n);return r==null||i==null||a==null?!1:Math.abs(r-a)<Math.abs(r-i)}var gT=new WeakMap;function _T(e){let t=gT.get(e);if(t!=null)return t;let n=e.colors??{},r={...n},i=n[`editor.background`]??e.bg,a=n[`editor.foreground`]??e.fg,o=n[`sideBar.background`]??i,s=n[`sideBar.foreground`]??a;vT(r,`editor.background`,i),vT(r,`editor.foreground`,a),vT(r,`sideBar.background`,o),vT(r,`sideBar.foreground`,s),vT(r,`input.background`,n[`input.background`]??o),vT(r,`sideBarSectionHeader.foreground`,n[`sideBarSectionHeader.foreground`]??s),vT(r,`list.activeSelectionForeground`,n[`list.activeSelectionForeground`]??s),vT(r,`gitDecoration.addedResourceForeground`,yT(n[`gitDecoration.addedResourceForeground`],n[`terminal.ansiGreen`],n[`editorGutter.addedBackground`])),vT(r,`gitDecoration.modifiedResourceForeground`,yT(n[`gitDecoration.modifiedResourceForeground`],n[`terminal.ansiBlue`],n[`editorGutter.modifiedBackground`])),vT(r,`gitDecoration.deletedResourceForeground`,yT(n[`gitDecoration.deletedResourceForeground`],n[`terminal.ansiRed`],n[`editorGutter.deletedBackground`]));let c=(mT(n[`list.focusOutline`])?void 0:n[`list.focusOutline`])??(mT(n.focusBorder)?void 0:n.focusBorder);c==null?delete r[`list.focusOutline`]:r[`list.focusOutline`]=c;let l=n[`list.hoverBackground`];l!=null&&(bT(l,o)||hT(l,o,s))&&delete r[`list.hoverBackground`];let u=Object.freeze({...e,colors:Object.freeze(r)});return gT.set(e,u),u}function vT(e,t,n){n!=null&&n!==``&&(e[t]=n)}function yT(...e){for(let t of e)if(t!=null&&t!==``)return t}function bT(e,t){return t!=null&&e.toLowerCase()===t.toLowerCase()}function xT({theme:e=Rf,highlighter:t,prefix:n}){let r=``;if(typeof e==`string`){let i=t.getTheme(e),a=_T(i);r+=`color:${a.fg};`,r+=`background-color:${a.bg};`,r+=`${cT(`global`)}fg:${a.fg};`,r+=`${cT(`global`)}bg:${a.bg};`,r+=ST(i,n)}else{let n=t.getTheme(e.dark),i=_T(n);r+=`${cT(`global`)}dark:${i.fg};`,r+=`${cT(`global`)}dark-bg:${i.bg};`,r+=ST(n,`dark`),n=t.getTheme(e.light),i=_T(n),r+=`${cT(`global`)}light:${i.fg};`,r+=`${cT(`global`)}light-bg:${i.bg};`,r+=ST(n,`light`)}return r}function ST(e,t){t=t==null?``:`${t}-`;let n=``,r=e.colors?.[`gitDecoration.addedResourceForeground`]??e.colors?.[`terminal.ansiGreen`];r!=null&&(n+=`${cT(`global`)}${t}addition-color:${r};`);let i=e.colors?.[`gitDecoration.deletedResourceForeground`]??e.colors?.[`terminal.ansiRed`];i!=null&&(n+=`${cT(`global`)}${t}deletion-color:${i};`);let a=e.colors?.[`gitDecoration.modifiedResourceForeground`]??e.colors?.[`terminal.ansiBlue`];return a!=null&&(n+=`${cT(`global`)}${t}modified-color:${a};`),n}function CT(e){let t=e.children[0];for(;t!=null;){if(t.type===`element`&&t.tagName===`code`)return t.children;t=`children`in t?t.children[0]:null}throw console.error(e),Error(`getLineNodes: Unable to find children`)}function wT({lines:e,startingLine:t=0,totalLines:n=1/0,callback:r}){let i=Math.min(t+n,e.length),a=(()=>{let t=e.at(-1);return t===``||t===`
169
- `||t===`\r
170
- `||t===`\r`?Math.max(0,e.length-2):e.length-1})();for(let n=t;n<i;n++){let t=n===a;if(r({lineIndex:n,lineNumber:n+1,content:e[n],isLastLine:t})===!0||t)break}}function TT(e){return e===``?[]:e.split(Af)}var ET={forcePlainText:!1};function DT(e,t,{theme:n=Rf,tokenizeMaxLineLength:r,useTokenTransformer:i},{forcePlainText:a,startingLine:o,totalLines:s,lines:c}=ET){a?(o??=0,s??=1/0):(o=0,s=1/0);let l=o>0||s<1/0,{state:u,transformers:d}=aT(i),f=a?`text`:e.lang??Ww(e.name),p=typeof n==`string`?t.getTheme(n).type:void 0,m=xT({theme:n,highlighter:t});u.lineInfo=e=>({type:`context`,lineIndex:e-1+o,lineNumber:e+o});let h=typeof n==`string`?{lang:f,theme:n,transformers:d,defaultColor:!1,cssVariablePrefix:cT(`token`),tokenizeMaxLineLength:r}:{lang:f,themes:n,transformers:d,defaultColor:!1,cssVariablePrefix:cT(`token`),tokenizeMaxLineLength:r},g=CT(t.codeToHast(l?OT(c??TT(e.contents),o,s):Yw(e.contents),h)),_=l?Array(o):g;return l&&_.push(...g),{code:_,themeStyles:m,baseThemeType:p}}function OT(e,t,n){let r=``;return wT({lines:e,startingLine:t,totalLines:n,callback({content:e}){r+=e}}),r}function kT(e,t){return ap({tagName:`div`,children:e,properties:{"data-content":``,style:`grid-row: span ${t}`}})}function AT(e){return(e.lang??Ww(e.name))===`text`}function jT(e){return e.useTokenTransformer===!0||e.onTokenClick!=null||e.onTokenEnter!=null||e.onTokenLeave!=null}var MT=-1,NT=class{__id=`file-renderer:${++MT}`;highlighter;renderCache;computedLang=`text`;lineAnnotations={};lineCache;constructor(e={theme:Rf},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=kw(e.theme??Rf)?Ew():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){this.lineAnnotations={};for(let t of e){let e=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=e,e.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0}clearRenderCache(){this.renderCache=void 0}hydrate(e){let{options:t}=this.getRenderOptions(e),n=PT(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength()),r=this.workerManager?.getFileResultCache(e);r!=null&&!jw(t,r.options)&&(r=void 0),this.renderCache??={file:e,options:t,highlighted:!n&&!AT(e),result:n?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightFileAST(this,e):this.highlighter??(this.computedLang=e.lang??Ww(e.name),this.initializeHighlighter())}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();let{theme:e=Rf,tokenizeMaxLineLength:t=1e3}=this.options;return{theme:e,useTokenTransformer:jT(this.options),tokenizeMaxLineLength:t}})(),{renderCache:n}=this;return n?.result==null||!Mw(e,n.file)||!jw(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}getOrCreateLineCache(e){if(e.cacheKey==null)return this.lineCache=void 0,TT(e.contents);let{lineCache:t}=this;return(t==null||t.cacheKey!==e.cacheKey)&&(t={cacheKey:e.cacheKey,lines:TT(e.contents)}),this.lineCache=t,t.lines}renderFile(e=this.renderCache?.file,t=Kf){if(e==null)return;let{options:n,forceHighlight:r}=this.getRenderOptions(e),i=this.getMatchingWorkerResultCache(e,n);i!=null&&!this.hasHighlightedRenderCache(e,n)&&(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...i},r=!1),this.renderCache??={file:e,highlighted:!1,options:n,result:void 0,renderRange:void 0};let a=this.getOrCreateLineCache(e),o=e.contents.length>0,s=!o||AT(e)||PT(a.length,this.getTokenizeMaxLength()),c=!Mw(e,this.renderCache.file),l=!Nw(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(s||this.renderCache.result==null||!this.renderCache.highlighted&&(c||l))&&(this.renderCache.file=e,this.renderCache.options=n,this.renderCache.highlighted=!1,(this.renderCache.result==null||c||l||r)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,t.startingLine,t.totalLines,a)),this.renderCache.renderRange=t),!s&&o&&(!this.renderCache.highlighted||r)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??Ww(e.name);let t=this.highlighter!=null&&kw(n.theme),i=this.highlighter!=null&&Kh(this.computedLang),a=!s&&i;if(this.highlighter!=null&&t&&(r||s||!this.renderCache.highlighted&&a||this.renderCache.result==null)){let{result:t,options:n}=this.renderFileWithHighlighter(e,this.highlighter,s||!i);this.renderCache={file:e,options:n,highlighted:a,result:t,renderRange:void 0}}(!t||!s&&!i)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,t,n,!s)})}return this.renderCache.result==null?void 0:this.processFileResult(this.renderCache.file,t,this.renderCache.result)}async asyncRender(e,t=Kf){let{result:n}=await this.asyncHighlight(e);return this.processFileResult(e,t,n)}async asyncHighlight(e){let t=PT(this.getOrCreateLineCache(e).length,this.getTokenizeMaxLength());this.computedLang=t?`text`:e.lang??Ww(e.name);let n=this.highlighter!=null&&Aw(Ow(this.options.theme)),r=t||this.highlighter!=null&&Kh(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,t)}renderFileWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e);return{result:DT(e,t,r,{forcePlainText:n}),options:r}}processFileResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{disableFileHeader:a=!1}=this.options,o=[],s=cp(),c=this.getOrCreateLineCache(e),l=0;return wT({lines:c,startingLine:t.startingLine,totalLines:t.totalLines,callback:({lineIndex:t,lineNumber:r})=>{let i=n[t];if(i==null){let n=`FileRenderer.processFileResult: Line doesnt exist`;throw console.error(n,{name:e.name,lineIndex:t,lineNumber:r,lines:c}),Error(n)}if(i!=null){s.children.push(lp(`context`,r,`${t}`)),o.push(i),l++;let e=this.lineAnnotations[r];e!=null&&(s.children.push(up(`context`,`annotation`,1)),o.push(Pw({type:`annotation`,hunkIndex:0,lineIndex:r,annotations:e.map(e=>Jw(e))})),l++)}}}),s.properties.style=`grid-row: span ${l}`,{gutterAST:s.children??[],contentAST:o,preAST:this.createPreElement(c.length),headerAST:a?void 0:this.renderHeader(e),totalLines:c.length,rowCount:l,themeStyles:r,baseThemeType:i,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderHeader(e){let{headerRenderMode:t=`default`,stickyHeader:n=!1}=this.options;return Iw({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return hh(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push(ap({tagName:`code`,children:this.renderCodeAST(e),properties:{"data-code":``}})),{...e.preAST,children:t}}renderCodeAST(e){let t=cp();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,kT(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return hh(t?ap({tagName:`code`,children:e,properties:{"data-code":``}}):e)}async initializeHighlighter(){return this.highlighter=await Tw(qw(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,n,r=!0){if(this.renderCache==null)return;let i=!Mw(e,this.renderCache.file)||!this.renderCache.highlighted||!jw(n,this.renderCache.options);this.renderCache={file:e,options:n,highlighted:r,result:t,renderRange:void 0},i&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){let n=this.workerManager?.getFileResultCache(e);if(n!=null&&jw(t,n.options))return n}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&Mw(e,n.file)&&jw(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){let{disableLineNumbers:t=!1,overflow:n=`scroll`}=this.options;return zw({type:`file`,diffIndicators:`none`,disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};function PT(e,t){return e>t}var FT=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
171
- <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
172
- <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
173
- </symbol>
174
- <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
175
- <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
176
- </symbol>
177
- <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
178
- <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
179
- </symbol>
180
- <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
181
- <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
182
- </symbol>
183
- <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
184
- <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
185
- </symbol>
186
- <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
187
- <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
188
- </symbol>
189
- <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
190
- <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
191
- </symbol>
192
- <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
193
- <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
194
- </symbol>
195
- <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
196
- <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
197
- </symbol>
198
- <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
199
- <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
200
- </symbol>
201
- <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
202
- <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
203
- </symbol>
204
- <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
205
- <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
206
- </symbol>
207
- <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
208
- <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
209
- </symbol>
210
- <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
211
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
212
- </symbol>
213
- <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
214
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
215
- </symbol>
216
- <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
217
- <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
218
- </symbol>
219
- <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
220
- <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
221
- </symbol>
222
- </svg>`;function IT(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}function LT(e,t){return e==null||t==null?e===t:zT(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackground===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}var RT={};function zT(e=RT,t=RT){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(e[r]!==t[r])return!1;return!0}function BT(e){let t=document.createElement(`div`);return t.dataset.annotationSlot=``,t.slot=e,t.style.whiteSpace=`normal`,t}function VT(){let e=document.createElement(`div`);return e.slot=`gutter-utility-slot`,e.style.position=`absolute`,e.style.top=`0`,e.style.bottom=`0`,e.style.textAlign=`center`,e.style.whiteSpace=`normal`,e.style.touchAction=`none`,e}function HT(){let e=document.createElement(`style`);return e.setAttribute(Bf,``),e}var UT=`@layer base,theme,rendered,unsafe;@layer base{:host{--diffs-font-fallback:"SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono", "Courier New", monospace;--diffs-header-font-fallback:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;--diffs-mixer:light-dark(#000,#fff);--diffs-gap-fallback:8px;--diffs-scrollbar-gutter-fallback:6px;--diffs-scrollbar-gutter:var(--diffs-scrollbar-gutter-override,var(--diffs-scrollbar-gutter-measured,var(--diffs-scrollbar-gutter-fallback)));--diffs-added-light:#0dbe4e;--diffs-added-dark:#5ecc71;--diffs-modified-light:#009fff;--diffs-modified-dark:#69b1ff;--diffs-deleted-light:#ff2e3f;--diffs-deleted-dark:#ff6762;color-scheme:light dark;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);font-feature-settings:var(--diffs-font-features);--diffs-bg:light-dark(var(--diffs-light-bg,#fff),var(--diffs-dark-bg,#000));--diffs-bg-buffer:var(--diffs-bg-buffer-override,light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));--diffs-bg-context:var(--diffs-bg-context-override,light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));--diffs-bg-context-gutter:var(--diffs-bg-context-gutter-override,light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)),color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));--diffs-bg-separator:var(--diffs-bg-separator-override,light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));--diffs-fg:light-dark(var(--diffs-light,#000),var(--diffs-dark,#fff));--diffs-fg-number:var(--diffs-fg-number-override,light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)),color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));--diffs-fg-conflict-marker:var(--diffs-fg-conflict-marker-override,var(--diffs-fg-number));--diffs-deletion-base:var(--diffs-deletion-color-override,light-dark(var(--diffs-light-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-light))),var(--diffs-dark-deletion-color,var(--diffs-deletion-color,var(--diffs-deleted-dark)))));--diffs-addition-base:var(--diffs-addition-color-override,light-dark(var(--diffs-light-addition-color,var(--diffs-addition-color,var(--diffs-added-light))),var(--diffs-dark-addition-color,var(--diffs-addition-color,var(--diffs-added-dark)))));--diffs-modified-base:var(--diffs-modified-color-override,light-dark(var(--diffs-light-modified-color,var(--diffs-modified-color,var(--diffs-modified-light))),var(--diffs-dark-modified-color,var(--diffs-modified-color,var(--diffs-modified-dark)))));--diffs-bg-deletion:var(--diffs-bg-deletion-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));--diffs-bg-deletion-emphasis:var(--diffs-bg-deletion-emphasis-override,light-dark(rgb(from var(--diffs-deletion-base) r g b / .15),rgb(from var(--diffs-deletion-base) r g b / .2)));--diffs-bg-addition:var(--diffs-bg-addition-override,light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)),color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));--diffs-bg-addition-emphasis:var(--diffs-bg-addition-emphasis-override,light-dark(rgb(from var(--diffs-addition-base) r g b / .15),rgb(from var(--diffs-addition-base) r g b / .2)));--diffs-selection-base:var(--diffs-modified-base);--diffs-selection-number-fg:light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)),color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));background-color:var(--diffs-bg);color:var(--diffs-fg);display:block}pre,code,[data-error-wrapper]{isolation:isolate;font-family:var(--diffs-font-family,var(--diffs-font-fallback));outline:none;margin:0;padding:0;display:block}pre,code{background-color:var(--diffs-bg)}code{contain:content}*,:before,:after{box-sizing:border-box}[data-icon-sprite]{display:none}[data-diffs-header],[data-separator]{font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback))}[data-diffs-header][data-sticky]{z-index:1;background-color:var(--diffs-bg);position:sticky;top:0}[data-file-info]{color:var(--fg);background-color:color-mix(in lab, var(--bg) 98%, var(--fg));border-block:1px solid color-mix(in lab, var(--bg) 95%, var(--fg));padding:10px;font-weight:700}[data-diff],[data-file]{--diffs-grid-number-column-width:minmax(min-content, max-content);--diffs-code-grid:var(--diffs-grid-number-column-width) 1fr}[data-dehydrated]:is([data-diff],[data-file]){--diffs-code-grid:var(--diffs-grid-number-column-width) minmax(0, 1fr)}:is([data-diff],[data-file]):hover [data-code]::-webkit-scrollbar-thumb{background-color:var(--diffs-bg-context)}@supports (-webkit-touch-callout:none){:host{--diffs-scrollbar-gutter-fallback:0px}}[data-line] span{color:light-dark(var(--diffs-token-light,var(--diffs-light)),var(--diffs-token-dark,var(--diffs-dark)));background-color:light-dark(var(--diffs-token-light-bg,inherit),var(--diffs-token-dark-bg,inherit));font-weight:light-dark(var(--diffs-token-light-font-weight,inherit),var(--diffs-token-dark-font-weight,inherit));font-style:light-dark(var(--diffs-token-light-font-style,inherit),var(--diffs-token-dark-font-style,inherit));-webkit-text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit));text-decoration:light-dark(var(--diffs-token-light-text-decoration,inherit),var(--diffs-token-dark-text-decoration,inherit))}[data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);color:var(--diffs-fg);background-color:var(--diffs-line-bg,var(--diffs-bg))}@media (pointer:fine){:is([data-line],[data-gutter-buffer],[data-column-number],[data-line-annotation],[data-no-newline],[data-merge-conflict],[data-merge-conflict-actions]):where([data-hovered]){--diffs-computed-hovered-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-selected-line-bg) 97%, var(--diffs-bg-hover-override,var(--diffs-mixer))),color-mix(in lab, var(--diffs-computed-selected-line-bg) 91%, var(--diffs-bg-hover-override,var(--diffs-mixer))));--diffs-line-bg:var(--diffs-computed-hovered-line-bg,inherit)}}[data-decoration-bg]:is([data-line],[data-no-newline]){--mix-deco-light:92%;--mix-deco-dark:85%}[data-decoration-bg][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]){--mix-deco-light:88%;--mix-deco-dark:80%}[data-decoration-bg][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]){--mix-deco-light:85%;--mix-deco-dark:78%}@media (pointer:fine){[data-decoration-bg][data-hovered]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:85%;--mix-deco-dark:85%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="2"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:83%;--mix-deco-dark:83%}[data-decoration-bg][data-hovered][data-decoration-bg-depth="3"]:is([data-line],[data-no-newline]):not([data-selected-line]){--mix-deco-light:81%;--mix-deco-dark:81%}}[data-decoration-bg]:is([data-line],[data-no-newline]){--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) var(--mix-deco-light), var(--diffs-decoration-bg)),color-mix(in lab, var(--diffs-bg) var(--mix-deco-dark), var(--diffs-decoration-bg)));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-line-annotation],[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context);--diffs-computed-decoration-bg:var(--diffs-annotation-bg);--diffs-computed-diff-line-bg:var(--diffs-annotation-bg);--diffs-computed-selected-line-bg:var(--diffs-annotation-bg);--diffs-line-bg:var(--diffs-annotation-bg)}[data-merge-conflict-actions],[data-gutter-buffer=merge-conflict-action],[data-gutter-buffer=merge-conflict-marker-base],[data-gutter-buffer=merge-conflict-marker-separator],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator]{--diffs-computed-decoration-bg:var(--diffs-bg-context);--diffs-computed-diff-line-bg:var(--diffs-bg-context);--diffs-computed-selected-line-bg:var(--diffs-bg-context);--diffs-line-bg:var(--diffs-bg-context)}[data-gutter-buffer=merge-conflict-marker-start],[data-merge-conflict=marker-start]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-current-header-override,var(--diffs-addition-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-gutter-buffer=merge-conflict-marker-end],[data-merge-conflict=marker-end]{--diffs-computed-decoration-bg:light-dark(color-mix(in lab, var(--diffs-bg) 78%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))),color-mix(in lab, var(--diffs-bg) 68%, var(--conflict-bg-incoming-header-override,var(--diffs-modified-base))));--diffs-computed-diff-line-bg:var(--diffs-computed-decoration-bg);--diffs-computed-selected-line-bg:var(--diffs-computed-decoration-bg);--diffs-line-bg:var(--diffs-computed-decoration-bg)}[data-has-merge-conflict] [data-line-annotation],[data-has-merge-conflict] [data-gutter-buffer=annotation]{--diffs-computed-decoration-bg:var(--diffs-bg);--diffs-computed-diff-line-bg:var(--diffs-bg);--diffs-computed-selected-line-bg:var(--diffs-bg);--diffs-line-bg:var(--diffs-bg)}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number]{--mix-light:91%;--mix-dark:85%}:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--mix-light:88%;--mix-dark:80%}:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]{--diffs-diff-line-mix-target:var(--diffs-bg)}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-deletion-override,var(--diffs-deletion-base))}@media (pointer:fine){[data-line-type=change-deletion][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:75%}}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-deletion-override,var(--diffs-deletion-base));--diffs-diff-line-mix-target:var(--diffs-bg-deletion-number-override,var(--diffs-deletion-base))}[data-line-type=change-deletion]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--diffs-bg-addition-override,var(--diffs-addition-base))}@media (pointer:fine){[data-line-type=change-addition][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--diffs-bg-addition-number-override,var(--diffs-addition-base))}[data-line-type=change-addition]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-current-override,var(--diffs-addition-base))}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-fg-number-addition-override,var(--diffs-addition-base));--diffs-diff-line-mix-target:var(--conflict-bg-current-number-override,var(--diffs-addition-base))}@media (pointer:fine){[data-merge-conflict=current][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=current]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-diff-line-mix-target:var(--conflict-bg-incoming-override,var(--diffs-modified-base))}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]):where([data-gutter-buffer],[data-column-number]){color:var(--diffs-modified-base);--diffs-diff-line-mix-target:var(--conflict-bg-incoming-number-override,var(--diffs-modified-base))}@media (pointer:fine){[data-merge-conflict=incoming][data-hovered]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--mix-light:80%;--mix-dark:70%}}[data-merge-conflict=incoming]:is(:where([data-background]) [data-gutter-buffer],:where([data-background]) [data-column-number],:where([data-background]) [data-line],:where([data-background]) [data-no-newline]){--diffs-computed-diff-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-light), var(--diffs-diff-line-mix-target)),color-mix(in lab, var(--diffs-computed-decoration-bg) var(--mix-dark), var(--diffs-diff-line-mix-target)));--diffs-computed-selected-line-bg:var(--diffs-computed-diff-line-bg);--diffs-line-bg:var(--diffs-computed-diff-line-bg,inherit)}[data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]{--diffs-selection-mix-target:var(--diffs-bg-selection-override,var(--diffs-selection-base))}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--mix-selection-light:82%;--mix-selection-dark:75%}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:75%;--mix-selection-dark:70%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]){--mix-selection-light:75%;--mix-selection-dark:60%;--diffs-selection-mix-target:var(--diffs-bg-selection-number-override,var(--diffs-selection-base))}@media (pointer:fine){[data-selected-line][data-hovered]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]):where([data-gutter-buffer],[data-column-number]):not([data-merge-conflict],[data-line-type=change-addition],[data-line-type=change-deletion]){--mix-selection-light:70%;--mix-selection-dark:55%}}[data-selected-line]:is([data-gutter-buffer],[data-column-number],[data-line],[data-line-annotation],[data-merge-conflict],[data-merge-conflict-actions],[data-no-newline]){--diffs-computed-selected-line-bg:light-dark(color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-light), var(--diffs-selection-mix-target)),color-mix(in lab, var(--diffs-computed-diff-line-bg) var(--mix-selection-dark), var(--diffs-selection-mix-target)));--diffs-line-bg:var(--diffs-computed-selected-line-bg,inherit)}[data-selected-line]:is([data-gutter-buffer],[data-column-number]){color:var(--diffs-selection-number-fg)}[data-no-newline]{-webkit-user-select:none;user-select:none}[data-no-newline] span{opacity:.6}[data-diff-type=split][data-overflow=scroll]{grid-template-columns:1fr 1fr;display:grid}[data-diff-type=split][data-overflow=scroll] [data-additions]{border-left:1px solid var(--diffs-bg)}[data-diff-type=split][data-overflow=scroll] [data-deletions]{border-right:1px solid var(--diffs-bg)}[data-code]{grid-auto-flow:dense;grid-template-columns:var(--diffs-code-grid);overflow:var(--diffs-overflow-override,scroll) clip;overscroll-behavior-x:none;tab-size:var(--diffs-tab-size,2);padding-top:var(--diffs-gap-block,var(--diffs-gap-fallback));padding-bottom:max(0px, calc(var(--diffs-gap-block,var(--diffs-gap-fallback)) - var(--diffs-scrollbar-gutter)));scrollbar-gutter:stable;align-self:flex-start;display:grid}[data-diffs-scrollbar-measure]{opacity:0;pointer-events:none;scrollbar-gutter:auto;grid-template-columns:none;width:100px;height:100px;padding:0;position:absolute;top:-200px;left:-200px}[data-container-size]{container-type:inline-size}[data-code]::-webkit-scrollbar{width:0;height:var(--diffs-scrollbar-gutter)}[data-code]::-webkit-scrollbar-track{background:0 0}[data-code]::-webkit-scrollbar-thumb{background-color:#0000;background-clip:content-box;border:1px solid #0000;border-radius:3px}[data-code]::-webkit-scrollbar-corner{background-color:#0000}@supports ((-moz-appearance:none)){[data-code]{scrollbar-width:thin;scrollbar-color:var(--diffs-bg-context) transparent;padding-bottom:var(--diffs-gap-block,var(--diffs-gap-fallback))}}:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]) [data-code],[data-overflow=wrap]:is([data-diffs-header]~[data-diff],[data-diffs-header]~[data-file]){padding-top:0}[data-gutter]{grid-template-rows:subgrid;grid-template-columns:subgrid;z-index:3;background-color:var(--diffs-bg);grid-column:1;display:grid;position:relative}[data-gutter] [data-gutter-buffer],[data-gutter] [data-column-number]{border-right:var(--diffs-gap-style,2px solid var(--diffs-bg))}[data-content]{grid-template-rows:subgrid;grid-template-columns:subgrid;background-color:var(--diffs-bg);grid-column:2;min-width:0;display:grid}[data-diff-type=split][data-overflow=wrap]{grid-auto-flow:dense;grid-template-columns:repeat(2, var(--diffs-code-grid));padding-block:var(--diffs-gap-block,var(--diffs-gap-fallback));display:grid}[data-diff-type=split][data-overflow=wrap] [data-deletions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-gutter]{grid-column:1}:is([data-diff-type=split][data-overflow=wrap] [data-deletions]) [data-content]{border-right:1px solid var(--diffs-bg);grid-column:2}[data-diff-type=split][data-overflow=wrap] [data-additions]{display:contents}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-gutter]{border-left:1px solid var(--diffs-bg);grid-column:3}:is([data-diff-type=split][data-overflow=wrap] [data-additions]) [data-content]{grid-column:4}[data-overflow=scroll] [data-gutter]{position:sticky;left:0}[data-interactive-lines] [data-line]{cursor:pointer}[data-interactive-line-numbers] [data-column-number]{cursor:pointer;touch-action:none}[data-content-buffer],[data-gutter-buffer]{-webkit-user-select:none;user-select:none;min-height:1lh;position:relative}[data-gutter-buffer]{padding-left:2ch;padding-right:1ch}[data-gutter-buffer]:before{content:"";min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));display:block}[data-gutter-buffer=annotation]{--diffs-annotation-bg:var(--diffs-bg-context-gutter);min-height:0}[data-gutter-buffer=buffer]{--diffs-line-bg:var(--diffs-bg-context-gutter)}[data-content-buffer]{background-position:5px 0;background-size:8px 8px;background-origin:border-box;background-image:repeating-linear-gradient(-45deg, transparent, transparent 4.242px, var(--diffs-bg-buffer) 4.242px, var(--diffs-bg-buffer) 5.656px);grid-column:1}[data-separator]{box-sizing:content-box;background-color:var(--diffs-bg)}[data-separator=simple]{min-height:4px}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata],[data-separator=simple]{background-color:var(--diffs-bg-separator)}[data-separator=line-info],[data-separator=line-info-basic],[data-separator=metadata]{height:32px;position:relative}[data-separator-wrapper]{-webkit-user-select:none;user-select:none;fill:currentColor;background-color:var(--diffs-bg);align-items:center;height:100%;display:flex;position:absolute;inset-inline:0}[data-content] [data-separator-wrapper]{display:none}[data-separator=metadata] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;color:var(--diffs-fg-number);white-space:nowrap;text-overflow:ellipsis;min-width:min-content;padding-inline:1ch;inset-inline:100% auto;overflow:hidden}[data-separator=line-info]{margin-block:var(--diffs-gap-block,var(--diffs-gap-fallback))}[data-separator=line-info] [data-separator-wrapper]{min-width:16px}[data-separator=line-info-basic],[data-separator=metadata]{margin-block:0}[data-separator=line-info][data-separator-first]{margin-top:0}[data-separator=line-info][data-separator-last]{margin-bottom:0}[data-expand-index] [data-separator-wrapper]{grid-template-columns:32px auto;display:grid}[data-expand-index] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:32px 32px auto}[data-expand-button],[data-separator-content]{background-color:var(--diffs-bg-separator);flex:none;align-items:center;display:flex}[data-expand-index] [data-separator-content]:hover{cursor:pointer;text-decoration:underline}[data-expand-button]{cursor:pointer;min-width:32px;color:var(--diffs-fg-number);border-right:2px solid var(--diffs-bg);flex-shrink:0;justify-content:center;align-self:stretch}[data-expand-button]:hover{color:var(--diffs-fg)}[data-expand-button][data-expand-all-button]{display:none}[data-expand-down] [data-icon]{transform:scaleY(-1)}[data-separator-content]{height:100%;color:var(--diffs-fg-number);flex:auto;justify-content:flex-start;padding:0 1ch;overflow:hidden}:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-content]{-webkit-user-select:none;user-select:none;height:100%;overflow:clip}[data-unmodified-lines]{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}@supports (width:1cqi){[data-unified] [data-separator=line-info] [data-separator-wrapper]{padding-inline:var(--diffs-gap-inline,var(--diffs-gap-fallback));width:100cqi}:is([data-unified] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content]{border-radius:6px}[data-unified] [data-separator=line-info][data-expand-index] [data-separator-wrapper] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-gutter] [data-separator=line-info] [data-separator-wrapper]{padding-left:var(--diffs-gap-inline,var(--diffs-gap-fallback))}[data-gutter] [data-separator=line-info] [data-separator-content]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-gutter] [data-separator=line-info][data-expand-index] [data-separator-content]{border-top-left-radius:unset;border-bottom-left-radius:unset}[data-additions] [data-content] [data-separator=line-info]{background-color:var(--diffs-bg)}:is([data-additions] [data-content] [data-separator=line-info]) [data-separator-wrapper]{display:none}[data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);border-top-right-radius:6px;border-bottom-right-radius:6px;height:100%;display:block}:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}[data-overflow=scroll] [data-additions] [data-gutter] [data-separator=line-info] [data-separator-wrapper]{width:calc(100cqi - var(--diffs-gap-inline,var(--diffs-gap-fallback)))}[data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]{background-color:var(--diffs-bg-separator);height:100%;margin-right:var(--diffs-gap-inline,var(--diffs-gap-fallback));border-top-right-radius:6px;border-bottom-right-radius:6px;display:block}:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-separator-content],:is([data-overflow=wrap] [data-additions] [data-content] [data-separator=line-info] [data-separator-wrapper]) [data-expand-button]{display:none}:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}@media (pointer:fine){[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:unset}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:6px;border-top-left-radius:unset}}}@media (pointer:coarse){[data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px 34px auto}:is([data-separator=line-info-basic] [data-separator-wrapper][data-separator-multi-button]) [data-separator-content]{grid-column:unset;grid-row:unset}@supports (width:1cqi){:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-both],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down],:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up],[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-up]{border-top-left-radius:6px;border-bottom-left-radius:6px}[data-separator-multi-button]:is([data-separator=line-info] [data-separator-wrapper]) [data-expand-down]{border-bottom-left-radius:unset;border-top-left-radius:unset}}}@media (pointer:fine){[data-separator-wrapper][data-separator-multi-button]{grid-template-rows:50% 50%;display:grid}[data-separator-wrapper][data-separator-multi-button] [data-separator-content]{grid-area:1/2/-1;min-width:min-content}[data-separator-wrapper][data-separator-multi-button] [data-expand-button]{grid-column:1}[data-separator=line-info] [data-separator-wrapper],[data-separator=line-info] [data-separator-wrapper][data-separator-multi-button]{grid-template-columns:34px auto}[data-separator=line-info-basic][data-expand-index] [data-separator-wrapper]{grid-template-columns:100% auto}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-up]{border-bottom:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}:is(:is([data-separator=line-info],[data-separator=line-info-basic]) [data-separator-multi-button]) [data-expand-down]{border-top:1px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg)}}[data-additions] [data-gutter] [data-separator-wrapper],[data-additions] [data-separator=line-info-basic] [data-separator-wrapper],[data-content] [data-separator-wrapper]{display:none}[data-line-annotation]{min-height:var(--diffs-annotation-min-height,0);z-index:2}[data-merge-conflict-actions]{z-index:2}[data-separator=custom]{grid-template-columns:subgrid;display:grid}[data-line],[data-column-number],[data-no-newline]{padding-inline:1ch;position:relative}[data-indicators=classic] [data-line]{padding-inline-start:2ch}:is([data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion]),[data-line]:is([data-indicators=classic] [data-line-type=change-addition],[data-indicators=classic] [data-line-type=change-deletion])):before{-webkit-user-select:none;user-select:none;width:1ch;height:1lh;display:inline-block;position:absolute;top:0;left:0}:is([data-line]:is([data-indicators=classic] [data-line-type=change-addition]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-addition])):before{content:"+";color:var(--diffs-addition-base)}:is([data-line]:is([data-indicators=classic] [data-line-type=change-deletion]),[data-no-newline]:is([data-indicators=classic] [data-line-type=change-deletion])):before{content:"-";color:var(--diffs-deletion-base)}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion],[data-indicators=bars] [data-line-type=change-addition]):before{content:"";-webkit-user-select:none;user-select:none;contain:strict;width:4px;height:100%;display:block;position:absolute;top:0;left:0}[data-column-number]:is([data-indicators=bars] [data-line-type=change-deletion]):before{background-image:linear-gradient(0deg, var(--diffs-bg-deletion) 50%, var(--diffs-deletion-base) 50%);background-repeat:repeat;background-size:2px 2px;background-size:calc(1lh/round(1lh / 2px)) calc(1lh/round(1lh / 2px))}[data-column-number]:is([data-indicators=bars] [data-line-type=change-addition]):before{background-color:var(--diffs-addition-base)}[data-overflow=wrap] [data-line],[data-overflow=wrap] [data-annotation-content]{white-space:pre-wrap;word-break:break-word}[data-overflow=scroll] [data-line]{white-space:pre;min-height:1lh}[data-column-number]{box-sizing:content-box;text-align:right;-webkit-user-select:none;user-select:none;color:var(--diffs-fg-number);padding-left:2ch}[data-line-number-content]{min-width:var(--diffs-min-number-column-width,var(--diffs-min-number-column-width-default,3ch));z-index:1;display:inline-block;position:relative}[data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]{min-width:4px;padding:0}:is([data-disable-line-numbers] [data-gutter-buffer],[data-disable-line-numbers] [data-column-number]):before{min-width:0}[data-disable-line-numbers] [data-line-number-content]{display:none}[data-disable-line-numbers] [data-gutter-utility-slot]{right:unset;justify-content:flex-start;left:0}[data-disable-line-numbers][data-indicators=bars] [data-gutter-utility-slot]{left:6px}[data-file][data-disable-line-numbers] [data-gutter-buffer],[data-file][data-disable-line-numbers] [data-column-number]{border-right:0;min-width:0}[data-diff-span]{-webkit-box-decoration-break:clone;box-decoration-break:clone;border-radius:3px}[data-line-type=change-addition] [data-diff-span]{background-color:var(--diffs-bg-addition-emphasis)}[data-line-type=change-deletion] [data-diff-span]{background-color:var(--diffs-bg-deletion-emphasis)}[data-merge-conflict=marker-start],[data-merge-conflict=marker-base],[data-merge-conflict=marker-separator],[data-merge-conflict=marker-end]{color:var(--diffs-fg);padding-left:1ch}[data-merge-conflict=marker-start],[data-merge-conflict=marker-end]{align-items:center;display:flex}:is([data-merge-conflict=marker-start],[data-merge-conflict=marker-end]):after{color:var(--diffs-fg-conflict-marker);font-size:.75rem;font-style:normal;line-height:1.25rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));padding-left:1ch}[data-merge-conflict=marker-start]:after{content:"(Current Change)"}[data-merge-conflict=marker-end]:after{content:"(Incoming Change)"}[data-merge-conflict-actions-content]{min-height:1.75rem;font-family:var(--diffs-header-font-family,var(--diffs-header-font-fallback));color:var(--diffs-fg);align-items:center;gap:.25rem;padding-inline:.5rem;font-size:.75rem;line-height:1.2;display:flex}[data-merge-conflict-action]{appearance:none;color:var(--diffs-fg-number);font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-style:normal}[data-merge-conflict-action]:hover{color:var(--diffs-fg)}[data-merge-conflict-action=current]:hover{color:var(--diffs-addition-base)}[data-merge-conflict-action=incoming]:hover{color:var(--diffs-modified-base)}[data-merge-conflict-action-separator]{color:var(--diffs-fg-number);opacity:.6;-webkit-user-select:none;user-select:none}[data-diffs-header=default]{background-color:var(--diffs-bg);justify-content:space-between;align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));min-height:calc(1lh + var(--diffs-gap-block,var(--diffs-gap-fallback))*3);z-index:2;flex-direction:row;padding-inline:16px;display:flex;position:relative;top:0}[data-header-content]{align-items:center;gap:var(--diffs-gap-inline,var(--diffs-gap-fallback));white-space:nowrap;flex-direction:row;min-width:0;display:flex}[data-header-content] [data-prev-name],[data-header-content] [data-title]{text-overflow:ellipsis;white-space:nowrap;direction:rtl;min-width:0;overflow:hidden}[data-prev-name]{opacity:.7}[data-rename-icon]{fill:currentColor;flex-grow:0;flex-shrink:0}[data-diffs-header=default] [data-metadata]{white-space:nowrap;align-items:center;gap:1ch;display:flex}[data-diffs-header=default] [data-additions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-addition-base)}[data-diffs-header=default] [data-deletions-count]{font-family:var(--diffs-font-family,var(--diffs-font-fallback));color:var(--diffs-deletion-base)}[data-change-icon]{fill:currentColor;flex-shrink:0}[data-change-icon=change],[data-change-icon=rename-pure],[data-change-icon=rename-changed]{color:var(--diffs-modified-base)}[data-change-icon=new]{color:var(--diffs-addition-base)}[data-change-icon=deleted]{color:var(--diffs-deletion-base)}[data-change-icon=file]{opacity:.6}[data-annotation-content]{z-index:2;isolation:isolate;align-self:flex-start;min-width:0;display:flow-root;position:relative}[data-overflow=scroll] [data-annotation-content],[data-overflow=scroll] [data-merge-conflict-actions-content]{width:var(--diffs-column-content-width,auto);left:var(--diffs-column-number-width,0);position:sticky}[data-annotation-slot]{text-wrap-mode:wrap;word-break:normal;white-space-collapse:collapse}[data-gutter-utility-slot]{touch-action:none;justify-content:flex-end;display:flex;position:absolute;top:0;bottom:0;right:0}[data-utility-button]{appearance:none;cursor:pointer;width:1lh;height:1lh;font-size:var(--diffs-font-size,13px);line-height:var(--diffs-line-height,20px);background-color:var(--diffs-modified-base);color:var(--diffs-bg);fill:currentColor;z-index:4;touch-action:none;border:none;border-radius:4px;justify-content:center;align-items:center;margin-right:calc(1ch - 1lh);padding:0;display:flex;position:relative}[data-utility-button]:before{content:"";display:block;position:absolute;inset:0 0 0 -4px}[data-decoration-bar-stack]{pointer-events:none;isolation:isolate;z-index:1;background-color:var(--diffs-decoration-bar-color,transparent);box-sizing:content-box;border-left:2px solid var(--diffs-bg);border-right:2px solid var(--diffs-bg);width:6px;position:absolute;top:0;bottom:0;right:-2px}[data-decoration-bar-depth="1"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 20%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="2"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 45%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-depth="3"] [data-decoration-bar-stack]{background-color:color-mix(in lab, var(--diffs-bg) 65%, var(--diffs-decoration-bar-color,transparent))}[data-decoration-bar-start] [data-decoration-bar-stack]{border-top-left-radius:5px;border-top-right-radius:5px}[data-decoration-bar-end] [data-decoration-bar-stack]{z-index:3;border-bottom-right-radius:5px;border-bottom-left-radius:5px}[data-placeholder]{contain:strict}[data-error-wrapper]{padding:var(--diffs-gap-block,var(--diffs-gap-fallback)) var(--diffs-gap-inline,var(--diffs-gap-fallback));scrollbar-width:none;max-height:400px;overflow:auto}[data-error-wrapper] [data-error-message]{color:var(--diffs-deletion-base);font-size:18px;font-weight:700}[data-error-wrapper] [data-error-stack]{color:var(--diffs-fg-number)}}@layer theme,rendered,unsafe;`,WT;function GT(e){if(WT!=null)return WT;let t=e.host;if(typeof HTMLElement<`u`&&t instanceof HTMLElement&&!t.isConnected)return;let n=document.createElement(`div`);n.setAttribute(`data-code`,``),n.setAttribute(Vf,`true`);let r=document.createElement(`div`);return r.style.position=`relative`,r.style.width=`200%`,r.style.height=`200%`,n.appendChild(r),e.appendChild(n),WT=Math.max(n.offsetHeight-n.clientHeight,0),n.remove(),WT}function KT(e){return`${Hf}: ${e==null?`var(--diffs-scrollbar-gutter-fallback)`:`${e}px`};`}var qT=`@layer base, theme, rendered, unsafe;`,JT=RegExp(`${QT(Hf)}\\s*:\\s*[^;]+;`);function YT(e){return`${qT}
223
- @layer unsafe {
224
- ${e}
225
- }`}function XT(e,t=`system`,n){return`${qT}
226
- @layer rendered {
227
- :host {${t===`system`?``:`
228
- color-scheme: ${t};`}
229
- ${KT(n)}
230
- ${e}
231
- }
232
- }`}function ZT(e,t){let n=KT(t);return e.replace(JT,n)}function QT(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function $T({code:e,pre:t,columnType:n,rowSpan:r,containerSize:i=!1}={}){return e??(e=document.createElement(`code`),e.setAttribute(`data-code`,``),n!=null&&e.setAttribute(`data-${n}`,``),t?.appendChild(e)),r==null?e.style.removeProperty(`grid-row`):e.style.setProperty(`grid-row`,`span ${r}`),i?e.setAttribute(`data-container-size`,``):e.removeAttribute(`data-container-size`),e}function eE(e,t){if(t==null)return;let n=e.shadowRoot??e.attachShadow({mode:`open`});n.innerHTML===``&&(n.innerHTML=t)}function tE(e,{type:t,diffIndicators:n,disableBackground:r,disableLineNumbers:i,overflow:a,split:o,totalLines:s,customProperties:c}){if(c!=null)for(let t in c){let n=c[t];n!=null&&e.setAttribute(t,`${n}`)}switch(t===`diff`?(e.setAttribute(`data-diff`,``),e.removeAttribute(`data-file`)):(e.setAttribute(`data-file`,``),e.removeAttribute(`data-diff`)),n){case`bars`:case`classic`:e.setAttribute(`data-indicators`,n);break;case`none`:e.removeAttribute(`data-indicators`)}return i?e.setAttribute(`data-disable-line-numbers`,``):e.removeAttribute(`data-disable-line-numbers`),r?e.removeAttribute(`data-background`):e.setAttribute(`data-background`,``),t===`diff`?e.setAttribute(`data-diff-type`,o?`split`:`single`):e.removeAttribute(`data-diff-type`),e.setAttribute(`data-overflow`,a),e.tabIndex=0,e.style.setProperty(`--diffs-min-number-column-width-default`,`${`${s}`.length}ch`),e}function nE(e){if(typeof HTMLStyleElement<`u`&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return typeof t==`string`&&t.toLowerCase()===`style`}function rE(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,themeType:e?.themeType,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,unsafeCSS:e?.unsafeCSS,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}function iE({shadowRoot:e,currentNode:t,themeCSS:n}){if(n.trim()===``){t?.remove();return}return t??=aE(),t.textContent=n,t.parentNode!==e&&e.appendChild(t),t}function aE(){let e=document.createElement(`style`);return e.setAttribute(zf,``),e}if(typeof HTMLElement<`u`&&customElements.get(`diffs-container`)==null){let e;class t extends HTMLElement{constructor(){if(super(),this.shadowRoot!=null)return;let t=this.attachShadow({mode:`open`});e??(e=new CSSStyleSheet,e.replaceSync(UT)),t.adoptedStyleSheets=[e]}connectedCallback(){GT(this.shadowRoot??this.attachShadow({mode:`open`}))}}customElements.define(Df,t)}var oE=[],sE=-1,cE=class{static LoadedCustomComponent=!0;__id=`file:${++sE}`;type=`file`;fileContainer;spriteSVG;pre;code;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;errorWrapper;placeHolder;lastRenderedHeaderHTML;cachedHeaderHTML;appliedPreAttributes;lastRowCount;mounted=!1;headerElement;headerCustom;headerPrefix;headerMetadata;fileRenderer;resizeManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;file;renderRange;enabled=!0;constructor(e={theme:Rf},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.fileRenderer=new NT(e,this.handleHighlightRender,this.workerManager),this.resizeManager=new Lh,this.interactionManager=new vh(`file`,yh(e)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){this.enabled&&this.file!=null&&this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(e){e!=null&&(this.options=e,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(yh(this.options))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!$f(this.appliedThemeCSS.theme,this.options.theme??Rf)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{overflow:e=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,e===`wrap`),this.managersDirty=!1}cleanUp(e=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,this.lineAnnotations=[],this.annotationCache.clear(),this.pre=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.placeHolder=void 0,this.unsafeCSSStyle=void 0,e?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){let{fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,file:i,lineAnnotations:a}=e;this.hydrateElements(t,n),lE(this.pre,i,this.options.collapsed)||uE(this.headerElement,i,this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({file:i,lineAnnotations:a}),r||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),eE(e,t);for(let t of Array.from(e.shadowRoot?.children??[])){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t,this.appliedPreAttributes=void 0;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}if(`diffsHeader`in t.dataset){this.headerElement=t,this.lastRenderedHeaderHTML=void 0;continue}}}this.pre!=null&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({file:e,lineAnnotations:t}){this.lineAnnotations=t??this.lineAnnotations,this.file=e,this.fileRenderer.setOptions(rE(this.options)),this.syncInteractionOptions(),this.pre!=null&&(this.fileRenderer.hydrate(e),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(e=this.file){return e==null?oE:this.fileRenderer.getOrCreateLineCache(e)}render({file:e,fileContainer:t,forceRender:n=!1,preventEmit:r=!1,containerWrapper:i,deferManagers:a=!1,lineAnnotations:o,renderRange:s}){let{collapsed:c=!1,themeType:l=`system`}=this.options;if(!this.enabled)throw Error(`File.render: attempting to call render after cleaned up`);let u=c?void 0:s,d=this.renderRange,f=this.hasThemeChanged(),p=o!=null&&(o.length>0||this.lineAnnotations.length>0)&&o!==this.lineAnnotations,m=!Mw(this.file,e);if(!c&&!n&&Nw(u,this.renderRange)&&!m&&!p&&!f)return this.applyCachedThemeState(l);this.renderRange=u,m&&(this.cachedHeaderHTML=void 0),this.file=e,this.fileRenderer.setOptions(rE(this.options)),this.syncInteractionOptions(),o!=null&&this.setLineAnnotations(o),this.fileRenderer.setLineAnnotations(this.lineAnnotations);let{disableErrorHandling:h=!1,disableFileHeader:g=!1}=this.options;if(g&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),t=this.getOrCreateFileContainerNode(t,i),this.applyCachedThemeState(l),c){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let n=this.fileRenderer.renderFile(e,qf);n!=null&&this.applyThemeState(t,n.themeStyles,l,n.baseThemeType),n?.headerAST!=null&&this.applyHeaderToDOM(n.headerAST,t),this.injectUnsafeCSS()}catch(e){if(h)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,t)}return r||this.emitPostRender(),!0}try{let r=this.getOrCreatePreNode(t);if(!this.canPartiallyRender(n,p,m||f)||!this.applyPartialRender(d,u)){let n=this.fileRenderer.renderFile(e,u);if(n==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(t,n.themeStyles,l,n.baseThemeType),n.headerAST!=null&&this.applyHeaderToDOM(n.headerAST,t),this.applyFullRender(n,r)}this.applyBuffers(r,u),this.injectUnsafeCSS(),this.managersDirty=!0,a||this.flushManagers(),this.renderAnnotations(),this.renderGutterUtility()}catch(e){if(h)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,t)}return r||this.emitPostRender(),!0}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;n?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}removeRenderedCode(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.code?.remove(),this.code=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(e,t,n){return!(e||t||n)}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}primeHighlightCache(){let{file:e,workerManager:t}=this;e==null||e.cacheKey==null||t==null||AT(e)||this.fileRenderer.getOrCreateLineCache(e).length>(this.options.tokenizeMaxLength??1e5)||t.primeFileHighlightCache(e)}cleanChildNodes(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.code?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.code=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(let[n,r]of this.lineAnnotations.entries()){let i=`${n}-${Jw(r)}`,a=this.annotationCache.get(i);if(a==null||!IT(r,a.annotation)){a?.element.remove();let e=t(r);if(e==null)continue;a={element:BT(Jw(r)),annotation:r},a.element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(i,a)}e.delete(i)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=VT();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=HT(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=YT(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.options.theme??Rf,s=typeof o==`string`?o:{...o},c=GT(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=iE({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:XT(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=ZT(this.themeCSSStyle.textContent??``,GT(e)))}applyFullRender(e,t){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,e),this.code=$T({code:this.code}),this.code.innerHTML=this.fileRenderer.renderPartialHTML(this.fileRenderer.renderCodeAST(e)),t.replaceChildren(this.code),this.lastRowCount=e.rowCount}applyPartialRender(e,t){if(e==null||t==null)return!1;let{file:n,code:r}=this,i=r==null?void 0:this.getColumns(r);if(n==null||r==null||i==null)return!1;let a=e.startingLine,o=t.startingLine,s=e.totalLines===1/0?1/0:a+e.totalLines,c=t.totalLines===1/0?1/0:o+t.totalLines,l=Math.max(a,o),u=Math.min(s,c);if(u<=l||!this.trimDOMToOverlap(i.gutter,l,u)||!this.trimDOMToOverlap(i.content,l,u))return!1;let{length:d}=i.content.children,f=(e,t)=>{if(!(t<=0))return this.fileRenderer.renderFile(n,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},p=o<l?f(o,l-o):void 0;if(p===void 0&&o<l)return!1;let m=c===1/0?1/0:Math.max(0,c-u),h=c>u?f(u,m):void 0;return h===void 0&&c>u?!1:(this.cleanupErrorWrapper(),p!=null&&(i.gutter.insertAdjacentHTML(`afterbegin`,this.fileRenderer.renderPartialHTML(p.gutterAST)),i.content.insertAdjacentHTML(`afterbegin`,this.fileRenderer.renderPartialHTML(p.contentAST)),d+=p.rowCount),h!=null&&(i.gutter.insertAdjacentHTML(`beforeend`,this.fileRenderer.renderPartialHTML(h.gutterAST)),i.content.insertAdjacentHTML(`beforeend`,this.fileRenderer.renderPartialHTML(h.contentAST)),d+=h.rowCount),this.lastRowCount!==d&&(i.gutter.style.setProperty(`grid-row`,`span ${d}`),i.content.style.setProperty(`grid-row`,`span ${d}`),this.lastRowCount=d),!0)}getColumns(e){let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}trimDOMToOverlap(e,t,n){let r=this.getDOMBoundaryIndices(e,[t,n]),i=r.get(t)??e.children.length,a=r.get(n)??e.children.length;if(i>a)return!1;for(let t=e.children.length-1;t>=a;--t)e.children[t]?.remove();for(let t=i-1;t>=0;--t)e.children[t]?.remove();return!0}getDOMBoundaryIndices(e,t){let n=[...new Set(t)].sort((e,t)=>e-t),r=new Map;if(n.length===0)return r;let i=0,a=n[i],{children:o}=e;for(let e=0;e<o.length;e+=1){let t=o[e];if(!(t instanceof HTMLElement))continue;let s=this.getLineIndexFromDOMNode(t);if(s!=null){for(;a!=null&&s>=a;)r.set(a,e),i+=1,a=n[i];if(i>=n.length)break}}for(let e of n)r.has(e)||r.set(e,o.length);return r}getLineIndexFromDOMNode(e){let t=e.dataset.lineIndex;if(t==null)return;let n=Number(t);return Number.isNaN(n)?void 0:n}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyHeaderToDOM(e,t){let{file:n}=this;if(n==null)return;this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let r=this.cachedHeaderHTML??hh(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged)return;let{renderHeaderPrefix:i,renderCustomHeader:a,renderHeaderMetadata:o}=this.options;if(a!=null){let e=a(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,Lf,e),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0}else{let e=i?.(n)??void 0,r=o?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,Ff,e),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,If,r),this.headerCustom?.remove(),this.headerCustom=void 0}}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}getOrCreateFileContainerNode(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:nE(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):nE(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=FT;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.code=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(e.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(e){this.code=void 0;for(let t of Array.from(e.children))if(t instanceof HTMLElement&&t.hasAttribute(`data-code`)){this.code=t;return}}applyPreNodeAttributes(e,{totalLines:t}){let{overflow:n=`scroll`,disableLineNumbers:r=!1}=this.options,i={type:`file`,split:!1,overflow:n,disableLineNumbers:r,diffIndicators:`none`,disableBackground:!0,totalLines:t};LT(i,this.appliedPreAttributes)||(tE(e,i),this.appliedPreAttributes=i)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function lE(e,t,n=!1){return!n&&e==null&&t!=null}function uE(e,t,n=!1){return e==null&&t!=null&&!n}function dE(e){return{...Wf,...e}}function fE(e,t){let n=pE(e,t);return t?n:e.diffHeaderHeight+n}function pE(e,t){return e.paddingTop??(t?e.spacing:0)}function mE(e){return e.paddingBottom??e.spacing}function hE(e){switch(e){case`simple`:return 4;case`metadata`:case`line-info`:case`line-info-basic`:case`custom`:return 32}}var gE=5e3,_E=-1;function vE(e,t){return(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||e.unsafeCSS!==t.unsafeCSS}var yE=class extends cE{__id=`virtualized-file:${++_E}`;top;height=0;cache={heights:new Map,checkpoints:[]};isVisible=!1;isSetup=!1;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n=Wf,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=n}setMetrics(e,t=!1){(t||!Qf(this.metrics,e))&&(this.metrics=e,this.resetLayoutCache())}getLineHeight(e,t=!1){let n=this.cache.heights.get(e);if(n!=null)return n;let r=t?2:1;return this.metrics.lineHeight*r}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!ep(t,e),r=vE(t,e);super.setOptions(e),r&&this.resetLayoutCache(!0),n&&(this.forceRenderOverride=!0),n&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error(`VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.`);super.setThemeType(e)}resetLayoutCache(e=!1){this.layoutDirty=!0,this.cache.heights.size>0&&this.cache.heights.clear(),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;if(this.fileContainer==null||this.file==null)return this.height!==0&&(e=!0),this.height=0,e;let{overflow:t=`scroll`}=this.options;if(this.top=this.getVirtualizedTop(),t===`scroll`&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled()||this.code==null)return e;let n=this.code.children[1];if(!(n instanceof HTMLElement))return e;for(let t of n.children){if(!(t instanceof HTMLElement))continue;let n=t.dataset.lineIndex;if(n==null)continue;let r=Number(n),i=t.getBoundingClientRect().height,a=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(a=!0),i+=t.nextElementSibling.getBoundingClientRect().height);let o=this.getLineHeight(r,a);i!==o&&(e=!0,i===this.metrics.lineHeight*(a?2:1)?this.cache.heights.delete(r):this.cache.heights.set(r,i))}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer==null||this.file==null?!1:(e&&(this.top=this.getVirtualizedTop()),this.render({file:this.file}));prepareCodeViewItem(e,t,n){let r=n?.resetFileLayoutCache===!0;n?.metrics!=null&&(this.metrics=n.metrics,r=!0);let{collapsed:i=!1}=this.options;return this.currentCollapsed!==i&&(this.currentCollapsed=i,r=!0),r&&this.resetLayoutCache(),this.file!==e&&(this.layoutDirty=!0),this.file=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e){if(this.file==null)return;let{disableFileHeader:t=!1,collapsed:n=!1}=this.options,r=bE(this.getOrCreateLineCache(this.file)),i=fE(this.metrics,t);if(n||r<0)return{top:i,height:0};let a=Math.min(Math.max(e-1,0),r),{overflow:o=`scroll`}=this.options,{lineHeight:s}=this.metrics;if(o===`scroll`&&this.lineAnnotations.length===0)return{top:i+a*s,height:s};let c=this.getLayoutCheckpointBeforeLineIndex(a);i=c?.top??i;for(let e=c?.lineIndex??0;e<a;e++)i+=this.getLineHeight(e,!1);return{top:i,height:this.getLineHeight(a,!1)}}getNumericScrollAnchor(e){if(this.file==null||this.renderRange==null)return;let{disableFileHeader:t=!1,collapsed:n=!1,overflow:r=`scroll`}=this.options;if(n||this.renderRange.totalLines<=0)return;let i=bE(this.getOrCreateLineCache(this.file));if(i<0)return;let a=fE(this.metrics,t),o=Math.min(this.renderRange.startingLine,i),s=Math.min(o+this.renderRange.totalLines-1,i);if(s<o)return;if(r===`scroll`&&this.lineAnnotations.length===0){let{lineHeight:t}=this.metrics,n=a+this.renderRange.bufferBefore,r=o+Math.max(Math.ceil((e-n)/t),0);return r>s?void 0:{lineNumber:r+1,top:a+r*t}}let c=a+this.renderRange.bufferBefore;for(let t=o;t<=s;t++){if(c>=e)return{lineNumber:t+1,top:c};c+=this.getLineHeight(t)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.file==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let t=e==null?this.renderRange:this.computeRenderRangeFromWindow(this.file,this.top,e);if(t==null)return;let{bufferBefore:n,bufferAfter:r,totalLines:i}=t,a=0;if(i===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(a=r)}return{topOffset:this.top+n+a,height:this.height-(n+r)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||(this.layoutDirty=!0),this.isSetup=!1,super.cleanUp(e)}computeApproximateSize(e=!1){let t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;let n=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.file==null){this.layoutDirty=!1;return}let{disableFileHeader:r=!1,collapsed:i=!1,overflow:a=`scroll`}=this.options,{lineHeight:o}=this.metrics,s=this.getOrCreateLineCache(this.file),c=fE(this.metrics,r),l=mE(this.metrics);if(this.height+=c,i){this.layoutDirty=!1;return}if(a===`scroll`&&this.lineAnnotations.length===0?this.height+=this.getOrCreateLineCache(this.file).length*o:wT({lines:s,callback:({lineIndex:e})=>{this.addLayoutCheckpoint(e,this.height),this.height+=this.getLineHeight(e,!1)}}),s.length>0&&(this.height+=l),this.fileContainer!=null&&t&&!n){let e=this.fileContainer.getBoundingClientRect();e.height===this.height?console.log(`VirtualizedFile.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFile.computeApproximateSize: computed height doesnt match`,{name:this.file.name,elementHeight:e.height,computedHeight:this.height})}this.layoutDirty=!1}setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){this.enabled&&this.file!=null&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}render({fileContainer:e,file:t,forceRender:n=!1,...r}){let{forceRenderOverride:i,isSetup:a}=this;if(this.forceRenderOverride=void 0,this.file??=t,e=this.getOrCreateFileContainerNode(e),this.file==null)return console.error(`VirtualizedFile.render: attempting to virtually render when we dont have file`),!1;if(a)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFile.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);let o=this.virtualizer.getWindowSpecs(),s=this.top??0,c=this.computeRenderRangeFromWindow(this.file,s,o);return super.render({file:this.file,fileContainer:e,renderRange:c,forceRender:i??n,...r})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type===`simple`}isAdvancedMode(){return this.virtualizer.type===`advanced`}addLayoutCheckpoint(e,t){e%gE===0&&this.cache.checkpoints.push({lineIndex:e,top:t})}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFile: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFile: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFile: invalid checkpoint index`);if(n.lineIndex%t===0)return n}}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}getSimpleVirtualizer(){return this.virtualizer.type===`simple`?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,overflow:a=`scroll`}=this.options,{hunkLineCount:o,lineHeight:s}=this.metrics,c=this.getOrCreateLineCache(e),l=c.length,u=this.height,d=fE(this.metrics,i),f=l>0?mE(this.metrics):0;if(t<n-u||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:u-d-f};if(l<=o)return{startingLine:0,totalLines:o,bufferBefore:0,bufferAfter:0};let p=Math.ceil(Math.max(r-n,0)/s),m=Math.ceil(p/o)*o+o*2,h=m/o,g=(n+r)/2;if(a===`scroll`&&this.lineAnnotations.length===0){let e=Math.floor((g-(t+d))/s),n=Math.floor(e/o)-Math.floor(h/2),r=Math.ceil(l/o),i=Math.max(0,Math.min(n,r))*o,a=n<0?m+n*o:m,c=i*s,u=Math.min(a,l-i);return{startingLine:i,totalLines:a,bufferBefore:c,bufferAfter:Math.max(0,(l-i-u)*s)}}let _=h,v=[],y=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-m*s*2),o),b=t+(y?.top??d),x=y?.lineIndex??0,S,C,w;if(wT({lines:c,startingLine:y?.lineIndex??0,callback:({lineIndex:e})=>{let i=x%o===0,a=Math.floor(x/o);if(i&&(v[a]=b-(t+d),w!=null)){if(w<=0)return!0;w--}let s=this.getLineHeight(e,!1);return b>n-s&&b<r&&(S??=a),b+s>g&&(C??=a),w==null&&b>=r&&i&&(w=_),x++,b+=s,!1}}),S==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:u-d-f};C??=S;let T=Math.round(C-h/2),E=Math.max(0,Math.ceil(l/o)-h),D=Math.max(0,Math.min(T,E)),O=D*o,k=T<0?m+T*o:m,ee=v[D]??0,A=D+k/o;return{startingLine:O,totalLines:k,bufferBefore:ee,bufferAfter:A<v.length?u-d-v[A]-f:u-(b-t)-f}}};function bE(e){let t=e.at(-1);return t==null||t===``||t===`
233
- `||t===`\r
234
- `||t===`\r`?e.length-2:e.length-1}function xE(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}var SE=new TextEncoder,CE=new TextDecoder(`utf-8`,{ignoreBOM:!0}),wE=/[\uD800-\uDFFF]/,TE=1024,EE=new Uint8Array(TE);function DE(){EE.length!==TE&&(EE=new Uint8Array(TE))}function OE(e){if(e.length===0)return e;if(wE.test(e))return JSON.parse(JSON.stringify(e));let t=e.length*3;EE.length<t&&(EE=new Uint8Array(t));let{written:n}=SE.encodeInto(e,EE);return CE.decode(EE.subarray(0,n))}function kE(e,t,n){try{return AE(e,t,n)}finally{DE()}}function AE(e,t,n=!1){let r=JE(e),i=r?LE(e):RE(e),a,o=[];for(let e of i){if(r&&!kf.test(e)){if(a==null)a=OE(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}if(!r&&!zE(e)){if(a==null)a=OE(e);else if(n)throw Error(`parsePatchContent: unknown file blob`);else console.error(`parsePatchContent: unknown file blob:`,e);continue}let i=ME(e,{cacheKey:t==null?void 0:`${t}-${o.length}`,isGitDiff:r,throwOnError:n});i!=null&&o.push(i)}return{patchMetadata:a,files:o}}function jE(e,t){try{return ME(e,t)}finally{DE()}}function ME(e,{cacheKey:t,isGitDiff:n=kf.test(e),oldFile:r,newFile:i,throwOnError:a=!1}={}){let o=0,s=YE(e,`@@ `),c,l=r==null||i==null,u=0,d=0;for(let e of s){let s=IE(e),f=s[0];if(f==null){if(a)throw Error(`parsePatchContent: invalid hunk`);console.error(`parsePatchContent: invalid hunk`,e);continue}let p=GE(f),m=0,h=0;if(p==null||c==null){if(c!=null){if(a)throw Error(`parsePatchContent: Invalid hunk`);console.error(`parsePatchContent: Invalid hunk`,e);continue}c={name:``,type:`change`,hunks:[],splitLineCount:0,unifiedLineCount:0,isPartial:l,additionLines:!l&&r!=null&&i!=null?FE(i.contents):[],deletionLines:!l&&r!=null&&i!=null?FE(r.contents):[],cacheKey:ZE(t)},c.additionLines.length===1&&i?.contents===``&&(c.additionLines.length=0),c.deletionLines.length===1&&r?.contents===``&&(c.deletionLines.length=0);for(let e of s){if(e.startsWith(`diff --git`)){let t=e.trim().match(Nf),n=t?.[1]??t?.[2],r=t?.[3]??t?.[4];if(n==null||r==null){if(a)throw Error(`parsePatchContent: invalid git diff header`);console.error(`parsePatchContent: invalid git diff header`,e);continue}c.name=OE(r.trim()),n!==r&&(c.prevName=OE(n.trim()));continue}let t=e.startsWith(`---`)||e.startsWith(`+++`)?e.match(n?Mf:jf):null;if(t!=null){let[,e,n]=t;if(e===`---`&&n!==`/dev/null`){let e=OE(n.trim());c.prevName=e,c.name=e}else e===`+++`&&n!==`/dev/null`&&(c.name=OE(n.trim()))}else if(n){if(e.startsWith(`new mode `)&&(c.mode=OE(e.slice(8).trim())),e.startsWith(`old mode `)&&(c.prevMode=OE(e.slice(8).trim())),e.startsWith(`new file mode`)&&(c.type=`new`,c.mode=OE(e.slice(13).trim())),e.startsWith(`deleted file mode`)&&(c.type=`deleted`,c.mode=OE(e.slice(17).trim())),e.startsWith(`similarity index`)&&(e.startsWith(`similarity index 100%`)?c.type=`rename-pure`:c.type=`rename-changed`),e.startsWith(`index `)){let[,t,n,r]=e.trim().match(Pf)??[];t!=null&&(c.prevObjectId=OE(t)),n!=null&&(c.newObjectId=OE(n)),r!=null&&(c.mode=OE(r))}e.startsWith(`rename from `)&&(c.prevName=OE(e.slice(12).trim())),e.startsWith(`rename to `)&&(c.name=OE(e.slice(10).trim()))}}continue}let g,_;for(;s.length>0&&(s[s.length-1]===`
235
- `||s[s.length-1]===`\r`||s[s.length-1]===`\r
236
- `||s[s.length-1]===``);)s.pop();let{additionStart:v,deletionStart:y}=p;u=l?u:y-1,d=l?d:v-1;let b={collapsedBefore:0,splitLineCount:0,splitLineStart:0,unifiedLineCount:0,unifiedLineStart:0,additionCount:p.additionCount,additionStart:v,additionLines:m,deletionCount:p.deletionCount,deletionStart:y,deletionLines:h,deletionLineIndex:u,additionLineIndex:d,hunkContent:[],hunkContext:ZE(p.hunkContext),hunkSpecs:OE(f),noEOFCRAdditions:!1,noEOFCRDeletions:!1},x=0,S=0;for(let e=1;e<s.length;e++){let t=s[e];if(x>=b.additionCount&&S>=b.deletionCount&&!t.startsWith(`\\`)){if(a&&UE(t)&&!WE(t))throw Error(`parsePatchContent: hunk has more lines than expected`);break}let n=t[0];if(n!==`+`&&n!==`-`&&n!==` `&&n!==`\\`){if(a)throw Error(`parsePatchContent: invalid hunk line`);console.error(`parseLineType: Invalid firstChar: "${n}", full line: "${t}"`),console.error(`processFile: invalid rawLine:`,t);continue}let r=QE(n);if(r===`addition`){if(a&&x>=b.additionCount)throw Error(`parsePatchContent: hunk has too many addition lines`);let e=$E(t);(g==null||g.type!==`change`)&&(g=eD(`change`,u,d),b.hunkContent.push(g)),d++,x++,l&&c.additionLines.push(e),g.additions++,m++,_=`addition`}else if(r===`deletion`){if(a&&S>=b.deletionCount)throw Error(`parsePatchContent: hunk has too many deletion lines`);let e=$E(t);(g==null||g.type!==`change`)&&(g=eD(`change`,u,d),b.hunkContent.push(g)),u++,S++,l&&c.deletionLines.push(e),g.deletions++,h++,_=`deletion`}else if(r===`context`){if(a&&(S>=b.deletionCount||x>=b.additionCount))throw Error(`parsePatchContent: hunk has too many context lines`);let e=$E(t);(g==null||g.type!==`context`)&&(g=eD(`context`,u,d),b.hunkContent.push(g)),d++,u++,x++,S++,l&&(c.deletionLines.push(e),c.additionLines.push(e)),g.lines++,_=`context`}else if(r===`metadata`&&g!=null){if(g.type===`context`?(b.noEOFCRAdditions=!0,b.noEOFCRDeletions=!0):_===`deletion`?b.noEOFCRDeletions=!0:_===`addition`&&(b.noEOFCRAdditions=!0),l&&(_===`addition`||_===`context`)){let e=c.additionLines.length-1;e>=0&&(c.additionLines[e]=Yw(c.additionLines[e]))}if(l&&(_===`deletion`||_===`context`)){let e=c.deletionLines.length-1;e>=0&&(c.deletionLines[e]=Yw(c.deletionLines[e]))}}}if(a&&(x!==b.additionCount||S!==b.deletionCount))throw Error(`parsePatchContent: hunk line count mismatch`);b.additionLines=m,b.deletionLines=h,b.collapsedBefore=Math.max(b.additionStart-1-o,0),c.hunks.push(b),o=b.additionStart+b.additionCount-1;for(let e of b.hunkContent)e.type===`context`?(b.splitLineCount+=e.lines,b.unifiedLineCount+=e.lines):(b.splitLineCount+=Math.max(e.additions,e.deletions),b.unifiedLineCount+=e.deletions+e.additions);b.splitLineStart=c.splitLineCount+b.collapsedBefore,b.unifiedLineStart=c.unifiedLineCount+b.collapsedBefore,c.splitLineCount+=b.collapsedBefore+b.splitLineCount,c.unifiedLineCount+=b.collapsedBefore+b.unifiedLineCount}if(c!=null){if(a&&l&&!n&&c.hunks.length===0)throw Error(`parsePatchContent: unified file has no hunks`);if(c.hunks.length>0&&!l&&c.additionLines.length>0&&c.deletionLines.length>0){let e=c.hunks[c.hunks.length-1],t=e.additionStart+e.additionCount-1,n=c.additionLines.length,r=Math.max(n-t,0);c.splitLineCount+=r,c.unifiedLineCount+=r}return n||(c.prevName!=null&&c.name!==c.prevName?c.hunks.length>0?c.type=`rename-changed`:c.type=`rename-pure`:(r==null||r.contents===``)&&i!=null&&i.contents!==``?c.type=`new`:r!=null&&r.contents!==``&&(i==null||i.contents===``)&&(c.type=`deleted`)),c.type!==`rename-pure`&&c.type!==`rename-changed`&&(c.prevName=void 0),c}}function NE(e,t,n=!1){let r=[],i=PE(e)?e.split(Of):[e];for(let e of i)try{r.push(kE(e,t==null?void 0:`${t}-${r.length}`,n))}catch(e){if(n)throw e;console.error(e)}return r}function PE(e){return e.startsWith(`From `)||e.includes(`
237
- From `)}function FE(e){let t=IE(e);for(let e=0;e<t.length;e++)t[e]=OE(t[e]);return t}function IE(e){if(e.length===0)return[``];let t=[],n=0;for(;;){let r=e.indexOf(`
238
- `,n);if(r===-1)break;t.push(e.slice(n,r+1)),n=r+1}return n<e.length&&t.push(e.slice(n)),t}function LE(e){return YE(e,`diff --git`)}function RE(e){if(e.length===0)return[``];let t=[],n=0,r=0,i=0,a=0,o=!1;for(;r<e.length;){let s=HE(e,r);if(i<=0&&a<=0){if(BE(e,r)){r>n&&t.push(e.slice(n,r)),n=r,o=!0,r=HE(e,s);continue}if(o&&e.startsWith(`@@ -`,r)){let t=GE(e.slice(r,s));t!=null&&(i=t.deletionCount,a=t.additionCount)}r=s;continue}let c=e[r];if(c===`\\`){r=s;continue}c===` `?(i=Math.max(i-1,0),a=Math.max(a-1,0)):c===`-`?i=Math.max(i-1,0):c===`+`&&(a=Math.max(a-1,0)),r=s}return t.push(e.slice(n)),t}function zE(e){return BE(e,0)}function BE(e,t){let n=HE(e,t);return VE(e,t,`---`)&&VE(e,n,`+++`)}function VE(e,t,n){if(!e.startsWith(n,t))return!1;let r=e[t+n.length];if(r!==` `&&r!==` `)return!1;for(let r=t+n.length+1;r<e.length;r++){let t=e[r];if(t===`
239
- `||t===`\r`)break;if(t!==` `&&t!==` `)return!0}return!1}function HE(e,t){let n=e.indexOf(`
240
- `,t);return n===-1?e.length:n+1}function UE(e){let t=e[0];return t===`+`||t===`-`||t===` `}function WE(e){if(!e.startsWith(`--`))return!1;for(let t=2;t<e.length;t++){let n=e[t];if(n!==` `&&n!==` `&&n!==`
241
- `&&n!==`\r`)return!1}return!0}function GE(e){if(!e.startsWith(`@@ -`))return;let t=4,n=KE(e,t);if(n==null)return;let r=n.value;t=n.endIndex;let i=1;if(e[t]===`,`){let n=KE(e,t+1);if(n==null)return;i=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`+`)return;t+=2;let a=KE(e,t);if(a==null)return;let o=a.value;t=a.endIndex;let s=1;if(e[t]===`,`){let n=KE(e,t+1);if(n==null)return;s=n.value,t=n.endIndex}if(e[t]!==` `||e[t+1]!==`@`||e[t+2]!==`@`)return;let c,l=t+3;return e[l]===` `&&(c=qE(e.slice(l+1))),{additionCount:s,additionStart:o,deletionCount:i,deletionStart:r,hunkContext:c}}function KE(e,t){let n=t,r=0;for(;n<e.length;n++){let t=e.charCodeAt(n)-48;if(t<0||t>9)break;r=r*10+t}if(n!==t)return{value:r,endIndex:n}}function qE(e){return e.endsWith(`\r
242
- `)?e.slice(0,-2):e.endsWith(`
243
- `)?e.slice(0,-1):e}function JE(e){return e.startsWith(`diff --git`)||e.includes(`
244
- diff --git`)}function YE(e,t){if(e.length===0)return[``];let n=`\n${t}`,r=e.startsWith(t)?0:XE(e,n,0);if(r===-1)return[e];let i=[];r>0&&i.push(e.slice(0,r));let a=r;for(;;){let t=XE(e,n,a+1);if(t===-1)break;i.push(e.slice(a,t)),a=t}return i.push(e.slice(a)),i}function XE(e,t,n){let r=e.indexOf(t,n);return r===-1?-1:r+1}function ZE(e){return e==null?e:OE(e)}function QE(e){return e===` `?`context`:e===`\\`?`metadata`:e===`+`?`addition`:`deletion`}function $E(e){let t=e.slice(1);return OE(t===``?`
245
- `:t)}function eD(e,t,n){return e===`change`?{type:`change`,additions:0,deletions:0,additionLineIndex:n,deletionLineIndex:t}:{type:`context`,lines:0,additionLineIndex:n,deletionLineIndex:t}}var tD=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},nD=new class extends tD{};function rD(e,t,n){return nD.diff(e,t,n)}function iD(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function aD(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function oD(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function sD(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function cD(e,t){return oD(e,t,``)}function lD(e,t){return sD(e,t,``)}function uD(e,t){return t.slice(0,dD(e,t))}function dD(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function fD(e){let t;for(t=e.length-1;t>=0&&e[t].match(/\s/);t--);return e.substring(t+1)}function pD(e){let t=e.match(/^\s*/);return t?t[0]:``}var mD=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,hD=RegExp(`[${mD}]+|\\s+|[^${mD}]`,`ug`);new class extends tD{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=[];for(let t of Array.from(r.segment(e))){let e=t.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}}else n=e.match(hD)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&gD(n,i,r,e),n=e,r=null,i=null)}),(r||i)&&gD(n,i,r,null),e}};function gD(e,t,n,r){if(t&&n){let i=pD(t.value),a=fD(t.value),o=pD(n.value),s=fD(n.value);if(e){let r=iD(i,o);e.value=sD(e.value,o,r),t.value=cD(t.value,r),n.value=cD(n.value,r)}if(r){let e=aD(a,s);r.value=oD(r.value,s,e),t.value=lD(t.value,e),n.value=lD(n.value,e)}}else if(n){if(e){let e=pD(n.value);n.value=n.value.substring(e.length)}if(r){let e=pD(r.value);r.value=r.value.substring(e.length)}}else if(e&&r){let n=pD(r.value),i=pD(t.value),a=fD(t.value),o=iD(n,i);t.value=cD(t.value,o);let s=aD(cD(n,o),a);t.value=lD(t.value,s),r.value=oD(r.value,n,s),e.value=sD(e.value,n,n.slice(0,n.length-s.length))}else if(r){let e=pD(r.value),n=uD(fD(t.value),e);t.value=lD(t.value,n)}else if(e){let n=uD(fD(e.value),pD(t.value));t.value=cD(t.value,n)}}var _D=new class extends tD{tokenize(e){let t=RegExp(`(\\r?\\n)|[${mD}]+|[^\\S\\n\\r]+|[^${mD}]`,`ug`);return e.match(t)||[]}};function vD(e,t,n){return _D.diff(e,t,n)}var yD=new class extends tD{constructor(){super(...arguments),this.tokenize=xD}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
246
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
247
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
248
- `)&&(e=e.slice(0,-1)),t.endsWith(`
249
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function bD(e,t,n){return yD.diff(e,t,n)}function xD(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
250
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function SD(e){return e==`.`||e==`!`||e==`?`}new class extends tD{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(SD(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends tD{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends tD{constructor(){super(...arguments),this.tokenize=xD}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(CD(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function CD(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a=0;for(;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=CD(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=CD(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends tD{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};var wD={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function TD(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;bD(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(bD(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||OD(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
251
- `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function ED(e,t){if(t||=wD,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>ED(e,t)).join(`
252
- `)}let n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`),t.includeFileHeaders&&(n.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),n.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,n.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
253
- `)+`
254
- `}function DD(e,t,n,r,i,a,o){if(typeof o==`function`&&(o={callback:o}),o?.callback){let{callback:s}=o;TD(e,t,n,r,i,a,Object.assign(Object.assign({},o),{callback:e=>{s(e?ED(e,o.headerOptions):void 0)}}))}else{let s=TD(e,t,n,r,i,a,o);return s?ED(s,o?.headerOptions):void 0}}function OD(e){let t=e.endsWith(`
255
- `),n=e.split(`
256
- `).map(e=>e+`
257
- `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}function kD(e,t,n,r=!1){let i=jE(DD(e.name,t.name,e.contents,t.contents,e.header,t.header,n),{cacheKey:(()=>{if(e.cacheKey!=null&&t.cacheKey!=null)return`${e.cacheKey}:${t.cacheKey}`})(),oldFile:e,newFile:t,throwOnError:r});if(i==null)throw Error(`parseDiffFrom: FileInvalid diff -- probably need to fix something -- if the files are the same maybe?`);return t.lang!=null&&(i.lang=t.lang),i}var AD=class{isDeletionsScrolling=!1;isAdditionsScrolling=!1;timeoutId=-1;codeDeletions;codeAdditions;enabled=!1;cleanUp(){this.enabled&&=(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),clearTimeout(this.timeoutId),this.codeDeletions=void 0,this.codeAdditions=void 0,!1)}setup(e,t,n){if(t==null||n==null)for(let r of e.children??[])r instanceof HTMLElement&&(`deletions`in r.dataset?t=r:`additions`in r.dataset&&(n=r));if(n==null||t==null){this.cleanUp();return}this.codeDeletions!==t&&(this.codeDeletions?.removeEventListener(`scroll`,this.handleDeletionsScroll),this.codeDeletions=t,t.addEventListener(`scroll`,this.handleDeletionsScroll,{passive:!0})),this.codeAdditions!==n&&(this.codeAdditions?.removeEventListener(`scroll`,this.handleAdditionsScroll),this.codeAdditions=n,n.addEventListener(`scroll`,this.handleAdditionsScroll,{passive:!0})),this.enabled=!0}handleDeletionsScroll=()=>{this.isAdditionsScrolling||(this.isDeletionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isDeletionsScrolling=!1},300),this.codeAdditions?.scrollTo({left:this.codeDeletions?.scrollLeft}))};handleAdditionsScroll=()=>{this.isDeletionsScrolling||(this.isAdditionsScrolling=!0,clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{this.isAdditionsScrolling=!1},300),this.codeDeletions?.scrollTo({left:this.codeAdditions?.scrollLeft}))}};function jD(e,t){return $f(e.theme,t.theme)&&e.useTokenTransformer===t.useTokenTransformer&&e.tokenizeMaxLineLength===t.tokenizeMaxLineLength&&e.lineDiffType===t.lineDiffType&&e.maxLineDiffLength===t.maxLineDiffLength}function MD(e){return ap({tagName:`div`,properties:{"data-content-buffer":``,"data-buffer-size":e,style:`grid-row: span ${e};min-height:calc(${e} * 1lh)`}})}function ND(e){return ap({tagName:`div`,children:[ap({tagName:`span`,children:[ip(`No newline at end of file`)]})],properties:{"data-no-newline":``,"data-line-type":e,"data-column-content":``}})}function PD(e){return ap({tagName:`div`,children:[op({name:e===`both`?`diffs-icon-expand-all`:`diffs-icon-expand`,properties:{"data-icon":``}})],properties:{role:`button`,"data-expand-button":``,"data-expand-both":e===`both`?``:void 0,"data-expand-up":e===`up`?``:void 0,"data-expand-down":e===`down`?``:void 0}})}function FD({type:e,content:t,expandIndex:n,chunked:r=!1,slotName:i,isFirstHunk:a,isLastHunk:o}){let s=0,c=[];if(e===`metadata`&&t!=null&&c.push(ap({tagName:`div`,children:[ip(t)],properties:{"data-separator-wrapper":``}})),(e===`line-info`||e===`line-info-basic`)&&t!=null){let e=[];n!=null&&(r?(a||(e.push(PD(`up`)),s++),o||(e.push(PD(`down`)),s++)):(e.push(PD(!a&&!o?`both`:a?`down`:`up`)),s++)),e.push(ap({tagName:`div`,children:[ap({tagName:`span`,children:[ip(t)],properties:{"data-unmodified-lines":``}})],properties:{"data-separator-content":``}})),r&&n!=null&&e.push(ap({tagName:`div`,children:[ip(`Expand all`)],properties:{role:`button`,"data-expand-button":``,"data-expand-all-button":``}})),c.push(ap({tagName:`div`,children:e,properties:{"data-separator-wrapper":``,"data-separator-multi-button":s>1?``:void 0}}))}return e===`custom`&&i!=null&&c.push(ap({tagName:`slot`,properties:{name:i}})),ap({tagName:`div`,children:c,properties:{"data-separator":c.length===0?`simple`:e,"data-expand-index":n,"data-separator-first":a?``:void 0,"data-separator-last":o?``:void 0}})}function ID(e,t){return`hunk-separator-${e}-${t}`}function LD(e){let t=e.at(-1);return t==null?0:Math.max(t.additionStart+t.additionCount,t.deletionStart+t.deletionCount)}function RD(e){return e.startingLine===0&&e.totalLines===1/0&&e.bufferBefore===0&&e.bufferAfter===0}function zD({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":``},alwaysWrap:!0}}function BD({item:e,arr:t,enableJoin:n,isNeutral:r=!1,isLastItem:i=!1}){let a=t[t.length-1];if(a==null||i||!n){t.push([+!r,e.value]);return}let o=a[0]===0;if(r===o||r&&e.value.length===1&&!o){a[1]+=e.value;return}t.push([+!r,e.value])}function VD({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:r,collapsedContextThreshold:i}){let a=Math.max(t,0);if(a===0||e)return{fromStart:0,fromEnd:0,rangeSize:a,collapsedLines:a,renderAll:!1};if(n===!0||a<=i)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(r),s=Math.min(Math.max(o?.fromStart??0,0),a),c=Math.min(Math.max(o?.fromEnd??0,0),a),l=s+c,u=l>=a;return{fromStart:u?a:s,fromEnd:u?0:c,rangeSize:a,collapsedLines:Math.max(a-l,0),renderAll:u}}function HD({fileDiff:e,errorPrefix:t}){let n=e.hunks[e.hunks.length-1];if(n==null||e.isPartial||e.additionLines.length===0||e.deletionLines.length===0)return 0;let r=e.additionLines.length-(n.additionLineIndex+n.additionCount),i=e.deletionLines.length-(n.deletionLineIndex+n.deletionCount);if(r<=0&&i<=0)return 0;if(r!==i)throw Error(`${t}: trailing context mismatch (additions=${r}, deletions=${i}) for ${e.name}`);return Math.min(r,i)}function UD({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:r,errorPrefix:i}){if(t!==e.hunks.length-1)return;let a=HD({fileDiff:e,errorPrefix:i});if(a<=0)return;if(n===!0||a<=r)return{fromStart:a,fromEnd:0,rangeSize:a,collapsedLines:0,renderAll:!0};let o=n?.get(e.hunks.length),s=Math.min(Math.max(o?.fromStart??0,0),a);return{fromStart:s,fromEnd:0,rangeSize:a,collapsedLines:a-s,renderAll:s>=a}}function WD({type:e,metrics:t}){return t.hunkSeparatorHeight??hE(e)}function GD({type:e,metrics:t}){return e===`simple`||e===`metadata`||e===`line-info-basic`?0:t.spacing}function KD({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case`simple`:return t>0;case`metadata`:return n!=null;case`line-info`:case`line-info-basic`:case`custom`:return!0}}function qD(e){return e!==`simple`&&e!==`metadata`}function JD({type:e,metrics:t,hunkIndex:n,hunkSpecs:r}){if(!KD({type:e,hunkIndex:n,hunkSpecs:r}))return;let i=WD({type:e,metrics:t}),a=GD({type:e,metrics:t}),o=n>0?a:0,s=a;return{height:i,gapBefore:o,gapAfter:s,totalHeight:o+i+s}}function YD({type:e,metrics:t}){if(!qD(e))return;let n=WD({type:e,metrics:t}),r=GD({type:e,metrics:t});return{height:n,gapBefore:r,gapAfter:0,totalHeight:r+n}}function XD({diff:e,diffStyle:t,startingLine:n=0,totalLines:r=1/0,expandedHunks:i,collapsedContextThreshold:a=1,callback:o}){let s=ZD({diff:e,diffStyle:t,startingLine:n,expandedHunks:i,collapsedContextThreshold:a}),c={viewportStart:n,viewportEnd:n+r,isWindowedHighlight:n>0||r<1/0,splitCount:s.splitCount,unifiedCount:s.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!c.isWindowedHighlight)return!1;let e=c.unifiedCount>=n+r,i=c.splitCount>=n+r;return t===`unified`?e:(t===`split`||e)&&i},shouldSkip(e,r){if(!c.isWindowedHighlight)return!1;let i=c.unifiedCount+e<n,a=c.splitCount+r<n;return t===`unified`?i:(t===`split`||i)&&a},incrementCounts(e,n){(t===`unified`||t===`both`)&&(c.unifiedCount+=e),(t===`split`||t===`both`)&&(c.splitCount+=n)},isInWindow(e,n){if(!c.isWindowedHighlight)return!0;let r=c.isInUnifiedWindow(e),i=c.isInSplitWindow(n);return t===`unified`?r:t===`split`?i:r||i},isInUnifiedWindow(e){return!c.isWindowedHighlight||c.unifiedCount>=n-e&&c.unifiedCount<n+r},isInSplitWindow(e){return!c.isWindowedHighlight||c.splitCount>=n-e&&c.splitCount<n+r},emit(e,n=!1){return n||(t===`unified`?c.incrementCounts(1,0):t===`split`?c.incrementCounts(0,1):c.incrementCounts(1,1)),o(e)??!1}};hunkIterator:for(let n=s.hunkIndex;n<e.hunks.length;n++){let r=e.hunks[n];if(r==null)throw Error(`iterateOverDiff: invalid hunk index`);if(c.shouldBreak())break;let o=VD({isPartial:e.isPartial,rangeSize:r.collapsedBefore,expandedHunks:i,hunkIndex:n,collapsedContextThreshold:a}),s=n===c.finalHunkIndex?UD({fileDiff:e,hunkIndex:n,expandedHunks:i,collapsedContextThreshold:a,errorPrefix:`iterateOverDiff`}):void 0,l=o.fromStart+o.fromEnd;function u(e,n){return s==null||s.collapsedLines<=0||s.fromStart+s.fromEnd>0?0:t===`unified`?e===r.unifiedLineStart+r.unifiedLineCount-1?s.collapsedLines:0:n===r.splitLineStart+r.splitLineCount-1?s.collapsedLines:0}let d=o.collapsedLines===0;function f(){return d?0:(d=!0,o.collapsedLines)}if(c.shouldSkip(l,l))c.incrementCounts(l,l),f();else{let e=r.unifiedLineStart-o.rangeSize,i=r.splitLineStart-o.rangeSize,a=r.deletionLineIndex-o.rangeSize,s=r.additionLineIndex-o.rangeSize,l=r.deletionStart-o.rangeSize,u=r.additionStart-o.rangeSize;if(eO(c,o.fromStart,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:0,collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:l+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:s+t,lineNumber:u+t,noEOFCR:!1}}))||(e=r.unifiedLineStart-o.fromEnd,i=r.splitLineStart-o.fromEnd,a=r.deletionLineIndex-o.fromEnd,s=r.additionLineIndex-o.fromEnd,l=r.deletionStart-o.fromEnd,u=r.additionStart-o.fromEnd,eO(c,o.fromEnd,t,t=>c.emit({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:0,type:`context-expanded`,deletionLine:{lineNumber:l+t,lineIndex:a+t,noEOFCR:!1,unifiedLineIndex:e+t,splitLineIndex:i+t},additionLine:{unifiedLineIndex:e+t,splitLineIndex:i+t,lineIndex:s+t,lineNumber:u+t,noEOFCR:!1}}),()=>{f()})))break hunkIterator}let p=r.unifiedLineStart,m=r.splitLineStart,h=r.deletionLineIndex,g=r.additionLineIndex,_=r.deletionStart,v=r.additionStart,y=r.hunkContent.at(-1);for(let e of r.hunkContent){if(c.shouldBreak())break hunkIterator;let i=e===y;if(e.type===`context`){if(c.shouldSkip(e.lines,e.lines))c.incrementCounts(e.lines,e.lines),f();else if(eO(c,e.lines,t,t=>{let a=i&&t===e.lines-1,o=p+t,s=m+t;return c.emit({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:u(o,s),type:`context`,deletionLine:{lineNumber:_+t,lineIndex:h+t,noEOFCR:a&&r.noEOFCRDeletions,unifiedLineIndex:o,splitLineIndex:s},additionLine:{unifiedLineIndex:o,splitLineIndex:s,lineIndex:g+t,lineNumber:v+t,noEOFCR:a&&r.noEOFCRAdditions}})},()=>{f()}))break hunkIterator;p+=e.lines,m+=e.lines,h+=e.lines,g+=e.lines,_+=e.lines,v+=e.lines}else{let a=Math.max(e.deletions,e.additions),o=e.deletions+e.additions;if(!c.shouldSkip(o,a)){let s=tO(c,e,t);(s[0]?.[0]??0)>0&&f();for(let[l,d]of s)for(let s=l;s<d;s++){let l=u(p+s,t===`unified`?m+(s<e.deletions?s:s-e.deletions):m+s);if(c.emit(nO({hunkIndex:n,hunk:r,collapsedBefore:f(),collapsedAfter:l,diffStyle:t,index:s,unifiedLineIndex:p,splitLineIndex:m,additionLineIndex:g,deletionLineIndex:h,additionLineNumber:v,deletionLineNumber:_,content:e,isLastContent:i,unifiedCount:o,splitCount:a}),!0))break hunkIterator}}f(),c.incrementCounts(o,a),p+=o,m+=a,h+=e.deletions,g+=e.additions,_+=e.deletions,v+=e.additions}}if(s!=null){let{collapsedLines:n,fromStart:r,fromEnd:i}=s,a=r+i;if(eO(c,a,t,t=>{let r=t===a-1;return c.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:r?n:0,type:`context-expanded`,deletionLine:{lineNumber:_+t,lineIndex:h+t,noEOFCR:!1,unifiedLineIndex:p+t,splitLineIndex:m+t},additionLine:{unifiedLineIndex:p+t,splitLineIndex:m+t,lineIndex:g+t,lineNumber:v+t,noEOFCR:!1}})},void 0,()=>c.shouldBreak()))break hunkIterator}}}function ZD({diff:e,diffStyle:t,startingLine:n,expandedHunks:r,collapsedContextThreshold:i}){if(n<=0||t===`both`)return{hunkIndex:0,splitCount:0,unifiedCount:0};let a=QD({diff:e,expandedHunks:r,collapsedContextThreshold:i}),o=0,s=e.hunks.length-1,c=e.hunks.length;for(;o<=s;){let e=o+s>>1,r=a[e+1];if(r==null)throw Error(`iterateOverDiff: invalid hunk prefix index`);(t===`unified`?r.unifiedCount:r.splitCount)>n?(c=e,s=e-1):o=e+1}if(c>=e.hunks.length){let t=a[e.hunks.length];if(t==null)throw Error(`iterateOverDiff: invalid terminal hunk prefix index`);return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let l=a[c];if(l==null)throw Error(`iterateOverDiff: invalid selected hunk prefix index`);return{hunkIndex:c,splitCount:l.splitCount,unifiedCount:l.unifiedCount}}function QD({diff:e,expandedHunks:t,collapsedContextThreshold:n}){let r=0,i=0,a=e.hunks.length-1,o=[{splitCount:0,unifiedCount:0}];for(let s=0;s<e.hunks.length;s++){let c=e.hunks[s];if(c==null)throw Error(`iterateOverDiff: invalid hunk summary index`);let l=VD({isPartial:e.isPartial,rangeSize:c.collapsedBefore,expandedHunks:t,hunkIndex:s,collapsedContextThreshold:n}),u=l.fromStart+l.fromEnd;r+=u+c.splitLineCount,i+=u+c.unifiedLineCount;let d=s===a?UD({fileDiff:e,hunkIndex:s,expandedHunks:t,collapsedContextThreshold:n,errorPrefix:`iterateOverDiff`}):void 0;if(d!=null){let e=d.fromStart+d.fromEnd;r+=e,i+=e}o.push({splitCount:r,unifiedCount:i})}return o}function $D(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let r=[];function i(n){let i=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>i&&r.push([i,a])}if(n!==`split`&&i(e.unifiedCount),n!==`unified`&&i(e.splitCount),r.length===0)return[0,0];let a=r[0][0],o=r[0][1];for(let e=1;e<r.length;e++){let t=r[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}function eO(e,t,n,r,i,a){let[o,s]=$D(e,t,n);o>0&&(e.incrementCounts(o,o),i?.());let c=o;for(;c<t;){if(a?.()===!0)return!0;if(c>=s){e.incrementCounts(t-c,t-c);break}if(e.isInWindow(0,0)){if(r(c)===!0)return!0}else e.incrementCounts(1,1);c++}return!1}function tO(e,t,n){if(!e.isWindowedHighlight)return[[0,n===`unified`?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let r=n!==`split`,i=n!==`unified`,a=n===`unified`?`unified`:`split`,o=[];function s(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let r=Math.max(0,e.viewportStart-t),i=Math.min(n,e.viewportEnd-t);return i>r?[r,i]:void 0}function c(e,n){return a===`split`?e:n===`additions`?[e[0]+t.deletions,e[1]+t.deletions]:e}function l(e,t){if(e==null)return;let[n,r]=c(e,t);r>n&&o.push([n,r])}if(r&&(l(s(e.unifiedCount,t.deletions),`deletions`),l(s(e.unifiedCount+t.deletions,t.additions),`additions`)),i&&(l(s(e.splitCount,t.deletions),`deletions`),l(s(e.splitCount,t.additions),`additions`)),o.length===0)return o;o.sort((e,t)=>e[0]-t[0]);let u=[o[0]];for(let[e,t]of o.slice(1)){let n=u[u.length-1];e<=n[1]?n[1]=Math.max(n[1],t):u.push([e,t])}return u}function nO({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,diffStyle:i,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:c,deletionLineIndex:l,additionLineNumber:u,deletionLineNumber:d,content:f,isLastContent:p,unifiedCount:m,splitCount:h}){let g=a<f.deletions?o+a:void 0,_=i===`unified`?a>=f.deletions?o+a:void 0:a<f.additions?o+f.deletions+a:void 0,v=i===`unified`?s+(a<f.deletions?a:a-f.deletions):s+a,y=a<f.deletions?l+a:void 0,b=a<f.deletions?d+a:void 0,x=i===`unified`?a>=f.deletions?c+(a-f.deletions):void 0:a<f.additions?c+a:void 0,S=i===`unified`?a>=f.deletions?u+(a-f.deletions):void 0:a<f.additions?u+a:void 0,C=i===`unified`?p&&a===f.deletions-1&&t.noEOFCRDeletions:p&&a===h-1&&t.noEOFCRDeletions,w=i===`unified`?p&&a===m-1&&t.noEOFCRAdditions:p&&a===h-1&&t.noEOFCRAdditions,T=y!=null&&b!=null&&g!=null?{lineNumber:b,lineIndex:y,noEOFCR:C,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=x!=null&&S!=null&&_!=null?{unifiedLineIndex:_,splitLineIndex:v,lineIndex:x,lineNumber:S,noEOFCR:w}:void 0;if(T==null&&E!=null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:void 0,additionLine:E};if(T!=null&&E==null)return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:void 0};if(T==null||E==null)throw Error(`iterateOverDiff: missing change line data`);return{type:`change`,hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:r,deletionLine:T,additionLine:E}}var rO={forcePlainText:!1};function iO(e,t,n,{forcePlainText:r,startingLine:i,totalLines:a,expandedHunks:o,collapsedContextThreshold:s=1}=rO){r?(i??=0,a??=1/0):(i=0,a=1/0);let c=i>0||a<1/0,l=typeof n.theme==`string`?t.getTheme(n.theme).type:void 0,u=xT({theme:n.theme,highlighter:t}),d=r&&!c&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?`none`:n.lineDiffType,f={deletionLines:[],additionLines:[]},{maxLineDiffLength:p}=n,m=!r&&!e.isPartial,h=r?o:void 0,g=new Map;function _(e){let t=m?0:e,n=g.get(t)??oO();return g.set(t,n),n}function v(e,t,n,r){if(c){let e=n.at(-1);(e==null||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:r.length,count:0},n.push(e)),e.count++}r.push(e)}XD({diff:e,diffStyle:`both`,startingLine:i,totalLines:a,expandedHunks:!c||h,collapsedContextThreshold:s,callback:({hunkIndex:t,additionLine:n,deletionLine:r,type:i})=>{let a=_(t),o=n==null?r.splitLineIndex:n.splitLineIndex;i===`change`&&n!=null&&r!=null&&aO({additionLine:e.additionLines[n.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:a.deletionContent.length,additionLineIndex:a.additionContent.length,deletionDecorations:a.deletionDecorations,additionDecorations:a.additionDecorations,lineDiffType:d,maxLineDiffLength:p}),r!=null&&(v(e.deletionLines[r.lineIndex],r.lineIndex,a.deletionSegments,a.deletionContent),a.deletionInfo.push({type:i===`change`?`change-deletion`:i,lineNumber:r.lineNumber,altLineNumber:i===`change`?void 0:n.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${o}`})),n!=null&&(v(e.additionLines[n.lineIndex],n.lineIndex,a.additionSegments,a.additionContent),a.additionInfo.push({type:i===`change`?`change-addition`:i,lineNumber:n.lineNumber,altLineNumber:i===`change`?void 0:r.lineNumber??void 0,lineIndex:`${n.unifiedLineIndex},${o}`}))}});for(let i of g.values()){if(i.deletionContent.length===0&&i.additionContent.length===0)continue;let a={name:e.prevName??e.name,contents:i.deletionContent.value},o={name:e.name,contents:i.additionContent.value},{deletionLines:s,additionLines:c}=sO({deletionFile:a,deletionInfo:i.deletionInfo,deletionDecorations:i.deletionDecorations,additionFile:o,additionInfo:i.additionInfo,additionDecorations:i.additionDecorations,highlighter:t,options:n,languageOverride:r?`text`:e.lang});if(m){f.deletionLines=s,f.additionLines=c;continue}if(i.deletionSegments.length>0)for(let e of i.deletionSegments)for(let t=0;t<e.count;t++)f.deletionLines[e.targetIndex+t]=s[e.originalOffset+t];else f.deletionLines.push(...s);if(i.additionSegments.length>0)for(let e of i.additionSegments)for(let t=0;t<e.count;t++)f.additionLines[e.targetIndex+t]=c[e.originalOffset+t];else f.additionLines.push(...c)}return{code:f,themeStyles:u,baseThemeType:l}}function aO({deletionLine:e,additionLine:t,deletionLineIndex:n,additionLineIndex:r,deletionDecorations:i,additionDecorations:a,lineDiffType:o,maxLineDiffLength:s}){if(e==null||t==null||o===`none`||(e=Yw(e),t=Yw(t),e.length>s||t.length>s))return;let c=o===`char`?rD(e,t):vD(e,t),l=[],u=[],d=o===`word-alt`,f=c.at(-1);for(let e of c){let t=e===f;!e.added&&!e.removed?(BD({item:e,arr:l,enableJoin:d,isNeutral:!0,isLastItem:t}),BD({item:e,arr:u,enableJoin:d,isNeutral:!0,isLastItem:t})):e.removed?BD({item:e,arr:l,enableJoin:d,isLastItem:t}):BD({item:e,arr:u,enableJoin:d,isLastItem:t})}let p=0;for(let e of l)e[0]===1&&i.push(zD({line:n,spanStart:p,spanLength:e[1].length})),p+=e[1].length;p=0;for(let e of u)e[0]===1&&a.push(zD({line:r,spanStart:p,spanLength:e[1].length})),p+=e[1].length}function oO(){return{deletionContent:{push(e){this.value+=e,this.length++},value:``,length:0},additionContent:{push(e){this.value+=e,this.length++},value:``,length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]}}function sO({deletionFile:e,additionFile:t,deletionInfo:n,additionInfo:r,highlighter:i,deletionDecorations:a,additionDecorations:o,languageOverride:s,options:{theme:c=Rf,...l}}){let u=s??Ww(e.name),d=s??Ww(t.name),{state:f,transformers:p}=aT(l.useTokenTransformer),m=typeof c==`string`?{...l,lang:`text`,theme:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:cT(`token`)}:{...l,lang:`text`,themes:c,transformers:p,decorations:void 0,defaultColor:!1,cssVariablePrefix:cT(`token`)};return{deletionLines:e.contents===``?[]:(m.lang=u,f.lineInfo=n,m.decorations=a,CT(i.codeToHast(Yw(e.contents),m))),additionLines:t.contents===``?[]:(m.lang=d,m.decorations=o,f.lineInfo=r,CT(i.codeToHast(Yw(t.contents),m)))}}function cO(e){let t=e.lang??Ww(e.name),n=e.lang??(e.prevName==null?`text`:Ww(e.prevName));return t===`text`&&n===`text`}var lO=-1,uO=class{__id=`diff-hunks-renderer:${++lO}`;highlighter;diff;expandedHunks=new Map;deletionAnnotations={};additionAnnotations={};computedLang=`text`;renderCache;constructor(e={theme:Rf},t,n){this.options=e,this.onRenderUpdate=t,this.workerManager=n,n?.isWorkingPool()!==!0&&(this.highlighter=kw(e.theme??Rf)?Ew():void 0)}cleanUp(){this.recycle(),this.expandedHunks.clear(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.highlighter=void 0,this.diff=void 0,this.clearRenderCache(),this.additionAnnotations={},this.deletionAnnotations={},this.workerManager?.cleanUpTasks(this)}clearRenderCache(){this.renderCache=void 0}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}expandHunk(e,t,n=this.getOptionsWithDefaults().expansionLineCount){let r={...this.expandedHunks.get(e)??{fromStart:0,fromEnd:0}};(t===`up`||t===`both`)&&(r.fromStart+=n),(t===`down`||t===`both`)&&(r.fromEnd+=n),this.renderCache?.highlighted!==!0&&this.clearRenderCache(),this.expandedHunks.set(e,r)}getExpandedHunk(e){return this.expandedHunks.get(e)??Gf}getExpandedHunksMap(){return this.expandedHunks}setLineAnnotations(e){this.additionAnnotations={},this.deletionAnnotations={};for(let t of e){let e=(()=>{switch(t.side){case`deletions`:return this.deletionAnnotations;case`additions`:return this.additionAnnotations}})(),n=e[t.lineNumber]??[];e[t.lineNumber]=n,n.push(t)}}getUnifiedLineDecoration({lineType:e}){return{gutterLineType:e}}getSplitLineDecoration({side:e,type:t}){return t===`change`?{gutterLineType:e===`deletions`?`change-deletion`:`change-addition`}:{gutterLineType:t}}createAnnotationElement(e){return Pw(e)}getOptionsWithDefaults(){let{diffIndicators:e=`bars`,diffStyle:t=`split`,disableBackground:n=!1,disableFileHeader:r=!1,disableLineNumbers:i=!1,disableVirtualizationBuffers:a=!1,collapsed:o=!1,expandUnchanged:s=!1,collapsedContextThreshold:c=1,expansionLineCount:l=100,hunkSeparators:u=`line-info`,lineDiffType:d=`word-alt`,maxLineDiffLength:f=1e3,overflow:p=`scroll`,stickyHeader:m=!1,theme:h=Rf,headerRenderMode:g=`default`,tokenizeMaxLineLength:_=1e3,tokenizeMaxLength:v=Uf,useTokenTransformer:y=!1,useCSSClasses:b=!1}=this.options;return{diffIndicators:e,diffStyle:t,disableBackground:n,disableFileHeader:r,disableLineNumbers:i,disableVirtualizationBuffers:a,collapsed:o,expandUnchanged:s,collapsedContextThreshold:c,expansionLineCount:l,hunkSeparators:u,lineDiffType:d,maxLineDiffLength:f,overflow:p,stickyHeader:m,theme:this.workerManager?.getDiffRenderOptions().theme??h,headerRenderMode:g,tokenizeMaxLineLength:_,tokenizeMaxLength:v,useTokenTransformer:y,useCSSClasses:b}}async initializeHighlighter(){return this.highlighter=await Tw(qw(this.computedLang,this.options)),this.highlighter}hydrate(e){if(e==null)return;this.diff=e;let{options:t}=this.getRenderOptions(e),n=_O(e,this.getTokenizeMaxLength()),r=this.workerManager?.getDiffResultCache(e);r!=null&&!jD(t,r.options)&&(r=void 0),this.renderCache??={diff:e,highlighted:!n&&!cO(e),options:t,result:n?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?this.renderCache.result==null&&!n&&this.workerManager.highlightDiffAST(this,this.diff):this.highlighter??(this.computedLang=e.lang??Ww(e.name),this.initializeHighlighter())}getRenderOptions(e){let t=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getDiffRenderOptions();let{theme:e,tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}=this.getOptionsWithDefaults();return{theme:e,useTokenTransformer:jT(this.options),tokenizeMaxLineLength:t,lineDiffType:n,maxLineDiffLength:r}})();this.getOptionsWithDefaults();let{renderCache:n}=this;return n?.result==null||!xE(e,n.diff)||!jD(t,n.options)?{options:t,forceHighlight:!0}:{options:t,forceHighlight:!1}}renderDiff(e=this.renderCache?.diff,t=Kf){if(e==null)return;let{expandUnchanged:n=!1,collapsedContextThreshold:r}=this.getOptionsWithDefaults(),{options:i,forceHighlight:a}=this.getRenderOptions(e),o=this.getMatchingWorkerResultCache(e,i);o!=null&&!this.hasHighlightedRenderCache(e,i)&&(this.renderCache={diff:e,highlighted:!0,renderRange:void 0,...o},a=!1),this.renderCache??={diff:e,highlighted:!1,options:i,result:void 0,renderRange:void 0};let s=e.additionLines.length>0||e.deletionLines.length>0,c=!s||cO(e)||_O(e,this.getTokenizeMaxLength()),l=!xE(e,this.renderCache.diff),u=!Nw(this.renderCache.renderRange,t);if(this.workerManager?.isWorkingPool()===!0)(c||this.renderCache.result==null||!this.renderCache.highlighted&&(l||u))&&(this.renderCache.diff=e,this.renderCache.options=i,this.renderCache.highlighted=!1,(this.renderCache.result==null||l||u||a)&&(this.renderCache.result=this.workerManager.getPlainDiffAST(e,t.startingLine,t.totalLines,RD(t)||n?!0:this.expandedHunks,r)),this.renderCache.renderRange=t),!c&&s&&(!this.renderCache.highlighted||a)&&this.workerManager.highlightDiffAST(this,e);else{this.computedLang=e.lang??Ww(e.name);let t=this.highlighter!=null&&kw(i.theme),n=this.highlighter!=null&&Kh(this.computedLang),r=!c&&n;if(this.highlighter!=null&&t&&(a||c||!this.renderCache.highlighted&&r||this.renderCache.result==null)){let{result:t,options:i}=this.renderDiffWithHighlighter(e,this.highlighter,c||!n);this.renderCache={diff:e,options:i,highlighted:r,result:t,renderRange:void 0}}(!t||!c&&!n)&&this.asyncHighlight(e).then(({result:t,options:n})=>{this.renderCache!=null&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,t,n,!c)})}return this.renderCache.result==null?void 0:this.processDiffResult(this.renderCache.diff,t,this.renderCache.result)}async asyncRender(e,t=Kf){let{result:n}=await this.asyncHighlight(e);return this.processDiffResult(e,t,n)}createPreElement(e,t,n){let{diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o}=this.getOptionsWithDefaults();return zw({type:`diff`,diffIndicators:r,disableBackground:i,disableLineNumbers:a,overflow:o,split:e,totalLines:t,customProperties:n})}async asyncHighlight(e){let t=_O(e,this.getTokenizeMaxLength());this.computedLang=t?`text`:e.lang??Ww(e.name);let n=this.highlighter!=null&&kw(this.options.theme??Rf),r=t||this.highlighter!=null&&Kh(this.computedLang);return(this.highlighter==null||!n||!r)&&(this.highlighter=await this.initializeHighlighter()),this.renderDiffWithHighlighter(e,this.highlighter,t)}renderDiffWithHighlighter(e,t,n=!1){let{options:r}=this.getRenderOptions(e),{collapsedContextThreshold:i}=this.getOptionsWithDefaults();return{result:iO(e,t,r,{forcePlainText:n,expandedHunks:n?!0:void 0,collapsedContextThreshold:i}),options:r}}onHighlightSuccess(e,t,n,r=!0){if(this.renderCache==null)return;let i=!this.renderCache.highlighted||!jD(this.renderCache.options,n)||!xE(this.renderCache.diff,e);this.renderCache={diff:e,options:n,highlighted:r,result:t,renderRange:void 0},i&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){let n=this.workerManager?.getDiffResultCache(e);if(n!=null&&jD(t,n.options))return n}hasHighlightedRenderCache(e,t){let{renderCache:n}=this;return n?.result!=null&&n.highlighted&&xE(e,n.diff)&&jD(t,n.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}processDiffResult(e,t,{code:n,themeStyles:r,baseThemeType:i}){let{diffStyle:a,disableFileHeader:o,expandUnchanged:s,expansionLineCount:c,collapsedContextThreshold:l,hunkSeparators:u}=this.getOptionsWithDefaults();this.diff=e;let d=a===`unified`,f=[],p=[],m=[],h=[],{additionLines:g,deletionLines:_}=n,v={rowCount:0,hunkSeparators:u,additionsContentAST:f,deletionsContentAST:p,unifiedContentAST:m,unifiedGutterAST:cp(),deletionsGutterAST:cp(),additionsGutterAST:cp(),expansionLineCount:c,hunkData:h,incrementRowCount(e=1){v.rowCount+=e},pushToGutter(e,t){switch(e){case`unified`:v.unifiedGutterAST.children.push(t);break;case`deletions`:v.deletionsGutterAST.children.push(t);break;case`additions`:v.additionsGutterAST.children.push(t)}}},y=HD({fileDiff:e,errorPrefix:`DiffHunksRenderer.processDiffResult`}),b={size:0,side:void 0,increment(){this.size+=1},flush(){if(a!==`unified`){if(this.size<=0||this.side==null){this.side=void 0,this.size=0;return}this.side===`additions`?(v.pushToGutter(`additions`,up(void 0,`buffer`,this.size)),f?.push(MD(this.size))):(v.pushToGutter(`deletions`,up(void 0,`buffer`,this.size)),p?.push(MD(this.size))),this.size=0,this.side=void 0}}},x=(e,t,n,r,i)=>{v.pushToGutter(e,lp(t,n,r,i))};function S(e){b.flush(),a===`unified`?hO(`unified`,e,v):(hO(`deletions`,e,v),hO(`additions`,e,v))}XD({diff:e,diffStyle:a,startingLine:t.startingLine,totalLines:t.totalLines,expandedHunks:s?!0:this.expandedHunks,collapsedContextThreshold:l,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,additionLine:o,deletionLine:s,type:c})=>{let l=s==null?o.splitLineIndex:s.splitLineIndex,d=o==null?s.unifiedLineIndex:o.unifiedLineIndex;a===`split`&&c!==`change`&&b.flush(),r>0&&S({hunkIndex:t,collapsedLines:r,rangeSize:Math.max(n?.collapsedBefore??0,0),hunkSpecs:n?.hunkSpecs,isFirstHunk:t===0,isLastHunk:!1,isExpandable:!e.isPartial});let f=a===`unified`?d:l,p={type:c,hunkIndex:t,lineIndex:f,unifiedLineIndex:d,splitLineIndex:l,deletionLine:s,additionLine:o};if(a===`unified`){let n=this.getUnifiedInjectedRowsForLine?.(p);n?.before!=null&&fO(n.before,v);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex];if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let a=c===`change`?o==null?`change-deletion`:`change-addition`:c,u=this.getUnifiedLineDecoration({type:c,lineType:a,additionLineIndex:o?.lineIndex,deletionLineIndex:s?.lineIndex});x(`unified`,u.gutterLineType,o==null?s.lineNumber:o.lineNumber,`${d},${l}`,u.gutterProperties),i==null?r!=null&&(r=gO(r,u.contentProperties)):i=gO(i,u.contentProperties),mO({diffStyle:`unified`,type:c,deletionLine:r,additionLine:i,unifiedSpan:this.getAnnotations(`unified`,s?.lineNumber,o?.lineNumber,t,f),createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&fO(n.after,v)}else{let n=this.getSplitInjectedRowsForLine?.(p);n?.before!=null&&pO(n.before,v,b);let r=s==null?void 0:_[s.lineIndex],i=o==null?void 0:g[o.lineIndex],a=this.getSplitLineDecoration({side:`deletions`,type:c,lineIndex:s?.lineIndex}),u=this.getSplitLineDecoration({side:`additions`,type:c,lineIndex:o?.lineIndex});if(r==null&&i==null){let t=`DiffHunksRenderer.processDiffResult: deletionLine and additionLine are null, something is wrong`;throw console.error(t,{file:e.name}),Error(t)}let d=(()=>{if(c===`change`){if(i==null)return`additions`;if(r==null)return`deletions`}})();if(d!=null){if(b.side!=null&&b.side!==d)throw Error(`DiffHunksRenderer.processDiffResult: iterateOverDiff, invalid pending splits`);b.side=d,b.increment()}let m=this.getAnnotations(`split`,s?.lineNumber,o?.lineNumber,t,f);if(m!=null&&b.size>0&&b.flush(),s!=null){let e=gO(r,a.contentProperties);x(`deletions`,a.gutterLineType,s.lineNumber,`${s.unifiedLineIndex},${l}`,a.gutterProperties),e!=null&&(r=e)}if(o!=null){let e=gO(i,u.contentProperties);x(`additions`,u.gutterLineType,o.lineNumber,`${o.unifiedLineIndex},${l}`,u.gutterProperties),e!=null&&(i=e)}mO({diffStyle:`split`,type:c,additionLine:i,deletionLine:r,...m,createAnnotationElement:e=>this.createAnnotationElement(e),context:v}),n?.after!=null&&pO(n.after,v,b)}let m=a===`split`&&n!=null&&l===n.splitLineStart+n.splitLineCount-1,h=m?n.noEOFCRDeletions:!1,C=m?n.noEOFCRAdditions:!1,w=(s?.noEOFCR??!1)||h,T=(o?.noEOFCR??!1)||C;if(T||w){if(a===`split`&&b.flush(),w){let e=c===`context`||c===`context-expanded`?c:`change-deletion`;a===`unified`?(v.unifiedContentAST.push(ND(e)),v.pushToGutter(`unified`,up(e,`metadata`,1))):(v.deletionsContentAST.push(ND(e)),v.pushToGutter(`deletions`,up(e,`metadata`,1)),T||(v.pushToGutter(`additions`,up(void 0,`buffer`,1)),v.additionsContentAST.push(MD(1))))}if(T){let e=c===`context`||c===`context-expanded`?c:`change-addition`;a===`unified`?(v.unifiedContentAST.push(ND(e)),v.pushToGutter(`unified`,up(e,`metadata`,1))):(v.additionsContentAST.push(ND(e)),v.pushToGutter(`additions`,up(e,`metadata`,1)),w||(v.pushToGutter(`deletions`,up(void 0,`buffer`,1)),v.deletionsContentAST.push(MD(1))))}v.incrementRowCount(1)}i>0&&u!==`simple`&&S({hunkIndex:c===`context-expanded`?t:t+1,collapsedLines:i,rangeSize:y,hunkSpecs:void 0,isFirstHunk:!1,isLastHunk:!0,isExpandable:!e.isPartial}),v.incrementRowCount(1)}}),a===`split`&&b.flush();let C=Math.max(LD(e.hunks),e.additionLines.length??0,e.deletionLines.length??0),w=t.bufferBefore>0||t.bufferAfter>0,T=!d&&e.type!==`deleted`,E=!d&&e.type!==`new`,D=v.rowCount>0||w;f=T&&D?f:void 0,p=E&&D?p:void 0,m=d&&D?m:void 0;let O=this.createPreElement(p!=null&&f!=null,C);return{unifiedGutterAST:d&&D?v.unifiedGutterAST.children:void 0,unifiedContentAST:m,deletionsGutterAST:E&&D?v.deletionsGutterAST.children:void 0,deletionsContentAST:p,additionsGutterAST:T&&D?v.additionsGutterAST.children:void 0,additionsContentAST:f,hunkData:h,preNode:O,themeStyles:r,baseThemeType:i,headerElement:o?void 0:this.renderHeader(this.diff),totalLines:C,rowCount:v.rowCount,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:``}}renderCodeAST(e,t){let n=e===`unified`?t.unifiedGutterAST:e===`deletions`?t.deletionsGutterAST:t.additionsGutterAST,r=e===`unified`?t.unifiedContentAST:e===`deletions`?t.deletionsContentAST:t.additionsContentAST;if(n==null||r==null)return;let i=cp(n);return i.properties.style=`grid-row: span ${t.rowCount}`,[i,kT(r,t.rowCount)]}renderFullAST(e,t=[]){let n=this.getOptionsWithDefaults().hunkSeparators===`line-info`,r=this.renderCodeAST(`unified`,e);if(r!=null)return t.push(ap({tagName:`code`,children:r,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-unified":``}})),{...e.preNode,children:t};let i=this.renderCodeAST(`deletions`,e);i!=null&&t.push(ap({tagName:`code`,children:i,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-deletions":``}}));let a=this.renderCodeAST(`additions`,e);return a!=null&&t.push(ap({tagName:`code`,children:a,properties:{"data-code":``,"data-container-size":n?``:void 0,"data-additions":``}})),{...e.preNode,children:t}}renderFullHTML(e,t=[]){return hh(this.renderFullAST(e,t))}renderPartialHTML(e,t){return hh(t==null?e:ap({tagName:`code`,children:e,properties:{"data-code":``,"data-container-size":this.getOptionsWithDefaults().hunkSeparators===`line-info`?``:void 0,[`data-${t}`]:``}}))}getAnnotations(e,t,n,r,i){let a={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(t!=null)for(let e of this.deletionAnnotations[t]??[])a.annotations.push(Jw(e));let o={type:`annotation`,hunkIndex:r,lineIndex:i,annotations:[]};if(n!=null)for(let t of this.additionAnnotations[n]??[])(e===`unified`?a:o).annotations.push(Jw(t));if(e===`unified`)return a.annotations.length>0?a:void 0;if(o.annotations.length!==0||a.annotations.length!==0)return{deletionSpan:a,additionSpan:o}}renderHeader(e){let{headerRenderMode:t,stickyHeader:n}=this.getOptionsWithDefaults();return Iw({fileOrDiff:e,mode:t,stickyHeader:n})}};function dO(e){return`${e} unmodified line${e>1?`s`:``}`}function fO(e,t){for(let n of e)t.unifiedContentAST.push(n.content),t.pushToGutter(`unified`,n.gutter),t.incrementRowCount(1)}function pO(e,t,n){for(let{deletion:r,addition:i}of e){if(r==null&&i==null)continue;let e=r!=null&&i!=null?void 0:r==null?`deletions`:`additions`;(e==null||n.side!==e)&&n.flush(),r!=null&&(t.deletionsContentAST.push(r.content),t.pushToGutter(`deletions`,r.gutter)),i!=null&&(t.additionsContentAST.push(i.content),t.pushToGutter(`additions`,i.gutter)),e!=null&&(n.side=e,n.increment()),t.incrementRowCount(1)}}function mO({diffStyle:e,type:t,deletionLine:n,additionLine:r,unifiedSpan:i,deletionSpan:a,additionSpan:o,createAnnotationElement:s,context:c}){let l=!1;if(e===`unified`){if(r==null?n!=null&&c.unifiedContentAST.push(n):c.unifiedContentAST.push(r),i!=null){let e=t===`change`?n==null?`change-addition`:`change-deletion`:t;c.unifiedContentAST.push(s(i)),c.pushToGutter(`unified`,up(e,`annotation`,1)),l=!0}}else if(e===`split`){if(n!=null&&c.deletionsContentAST.push(n),r!=null&&c.additionsContentAST.push(r),a!=null){let e=t===`change`?n==null?`context`:`change-deletion`:t;c.deletionsContentAST.push(s(a)),c.pushToGutter(`deletions`,up(e,`annotation`,1)),l=!0}if(o!=null){let e=t===`change`?r==null?`context`:`change-addition`:t;c.additionsContentAST.push(s(o)),c.pushToGutter(`additions`,up(e,`annotation`,1)),l=!0}}l&&c.incrementRowCount(1)}function hO(e,{hunkIndex:t,collapsedLines:n,rangeSize:r,hunkSpecs:i,isFirstHunk:a,isLastHunk:o,isExpandable:s},c){if(n<=0)return;let l=e===`unified`?c.unifiedContentAST:e===`deletions`?c.deletionsContentAST:c.additionsContentAST;if(c.hunkSeparators===`metadata`){i!=null&&(c.pushToGutter(e,FD({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),l.push(FD({type:`metadata`,content:i,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1));return}if(c.hunkSeparators===`simple`){t>0&&(c.pushToGutter(e,FD({type:`simple`,isFirstHunk:a,isLastHunk:!1})),l.push(FD({type:`simple`,isFirstHunk:a,isLastHunk:!1})),e!==`additions`&&c.incrementRowCount(1));return}let u=ID(e,t),d=r>c.expansionLineCount,f=s?t:void 0;c.pushToGutter(e,FD({type:c.hunkSeparators,content:dO(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),l.push(FD({type:c.hunkSeparators,content:dO(n),expandIndex:f,chunked:d,slotName:u,isFirstHunk:a,isLastHunk:o})),e!==`additions`&&c.incrementRowCount(1),c.hunkData.push({slotName:u,hunkIndex:t,lines:n,type:e,expandable:s?{up:!a,down:!o,chunked:d}:void 0})}function gO(e,t){return e==null||e.type!==`element`||t==null?e:{...e,properties:{...e.properties,...t}}}function _O(e,t){return Math.max(e.additionLines.length,e.deletionLines.length)>t}function vO(e,t){return e.lineNumber===t.lineNumber&&e.side===t.side&&e.metadata===t.metadata}function yO(e,t){return e.slotName===t.slotName&&e.hunkIndex===t.hunkIndex&&e.lines===t.lines&&e.type===t.type&&e.expandable?.chunked===t.expandable?.chunked&&e.expandable?.up===t.expandable?.up&&e.expandable?.down===t.expandable?.down}function bO(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,diffStyle:e?.diffStyle,diffIndicators:e?.diffIndicators,disableBackground:e?.disableBackground,hunkSeparators:typeof e?.hunkSeparators==`function`?`custom`:e?.hunkSeparators,expandUnchanged:e?.expandUnchanged,collapsedContextThreshold:e?.collapsedContextThreshold,lineDiffType:e?.lineDiffType,maxLineDiffLength:e?.maxLineDiffLength,expansionLineCount:e?.expansionLineCount,headerRenderMode:e?.renderCustomHeader==null?`default`:`custom`}}var xO=-1,SO=class{static LoadedCustomComponent=!0;__id=`file-diff:${++xO}`;type=`file-diff`;fileContainer;spriteSVG;pre;codeUnified;codeDeletions;codeAdditions;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;headerElement;headerPrefix;headerMetadata;headerCustom;separatorCache=new Map;errorWrapper;placeHolder;hunksRenderer;resizeManager;scrollSyncManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;deletionFile;additionFile;fileDiff;renderRange;appliedPreAttributes;lastRenderedHeaderHTML;cachedHeaderHTML;lastRowCount;mounted=!1;enabled=!0;constructor(e={theme:Rf},t,n=!1){this.options=e,this.workerManager=t,this.isContainerManaged=n,this.hunksRenderer=this.createHunksRenderer(e),this.resizeManager=new Lh,this.scrollSyncManager=new AD,this.interactionManager=new vh(`diff`,yh(e,typeof e.hunkSeparators==`function`||(e.hunkSeparators??`line-info`)===`line-info`||e.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex)),this.workerManager?.subscribeToThemeChanges(this),this.enabled=!0}handleHighlightRender=()=>{this.rerender()};getHunksRendererOptions(e){return bO(e)}createHunksRenderer(e){return new uO(this.getHunksRendererOptions(e),this.handleHighlightRender,this.workerManager)}getLineIndex=(e,t=`additions`)=>{if(this.fileDiff==null)return;let n=this.fileDiff.hunks.at(-1),r,i;hunkIterator:for(let a of this.fileDiff.hunks){let o=t===`deletions`?a.deletionStart:a.additionStart,s=t===`deletions`?a.deletionCount:a.additionCount,c=a.splitLineStart,l=a.unifiedLineStart;if(e<o){let t=o-e;r=Math.max(l-t,0),i=Math.max(c-t,0);break hunkIterator}if(e>=o+s){if(a===n){let t=e-(o+s);r=l+a.unifiedLineCount+t,i=c+a.splitLineCount+t;break hunkIterator}continue}for(let n of a.hunkContent)if(n.type===`context`){if(e<o+n.lines){let t=e-o;i=c+t,r=l+t;break hunkIterator}o+=n.lines,c+=n.lines,l+=n.lines}else{let a=t===`deletions`?n.deletions:n.additions;if(e<o+a){let a=e-o;r=l+(t===`additions`?n.deletions:0)+a,i=c+a;break hunkIterator}o+=a,c+=Math.max(n.deletions,n.additions),l+=n.deletions+n.additions}break hunkIterator}if(r!=null&&i!=null)return[r,i]};setOptions(e){e!=null&&(this.options=e,this.cachedHeaderHTML=void 0,this.hunksRenderer.setOptions(this.getHunksRendererOptions(e)),this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions(yh(this.options,typeof this.options.hunkSeparators==`function`||(this.options.hunkSeparators??`line-info`)===`line-info`||this.options.hunkSeparators===`line-info-basic`?this.handleExpandHunk:void 0,this.getLineIndex))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return this.appliedThemeCSS!=null&&!$f(this.appliedThemeCSS.theme,this.options.theme??Rf)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}canPartiallyRender(e,t,n){return!(e||t||n||typeof this.options.hunkSeparators==`function`)}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}flushManagers(){if(!this.managersDirty||this.pre==null){this.managersDirty=!1;return}let{diffStyle:e=`split`,overflow:t=`scroll`}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,t===`wrap`),t===`scroll`&&e===`split`?this.scrollSyncManager.setup(this.pre,this.codeDeletions,this.codeAdditions):this.scrollSyncManager.cleanUp(),this.managersDirty=!1}cleanUp(e=!1){this.emitPostRender(!0),this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,this.lineAnnotations=[],this.clearAuxiliaryNodes(),this.annotationCache.clear(),this.pre=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,this.bufferBefore=void 0,this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.placeHolder=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper=void 0,this.spriteSVG=void 0,this.lastRowCount=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,e?this.hunksRenderer.recycle():(this.hunksRenderer.cleanUp(),this.workerManager=void 0,this.fileDiff=void 0,this.deletionFile=void 0,this.additionFile=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){let{fileContainer:t,prerenderedHTML:n,preventEmit:r=!1,lineAnnotations:i,oldFile:a,newFile:o,fileDiff:s}=e;this.hydrateElements(t,n),TO(this.pre,CO({fileDiff:s,oldFile:a,newFile:o}),this.options.collapsed)||EO(this.headerElement,wO({fileDiff:s,oldFile:a,newFile:o}),this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({fileDiff:s,oldFile:a,newFile:o,lineAnnotations:i}),r||this.emitPostRender()}hydrateElements(e,t){this.fileContainer!==e&&this.emitPostRender(!0),eE(e,t);for(let t of e.shadowRoot?.children??[]){if(t instanceof SVGElement){this.spriteSVG=t;continue}if(t instanceof HTMLElement){if(t instanceof HTMLPreElement){this.pre=t;for(let e of t.children)e instanceof HTMLElement&&e.tagName.toLowerCase()===`code`&&(`deletions`in e.dataset&&(this.codeDeletions=e),`additions`in e.dataset&&(this.codeAdditions=e),`unified`in e.dataset&&(this.codeUnified=e));continue}if(`diffsHeader`in t.dataset){this.headerElement=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-theme-css`)){this.themeCSSStyle=t;continue}if(t instanceof HTMLStyleElement&&t.hasAttribute(`data-unsafe-css`)){this.unsafeCSSStyle=t,this.appliedUnsafeCSS=t.textContent;continue}}}this.pre!=null&&(this.syncCodeNodesFromPre(this.pre),this.pre.removeAttribute(`data-dehydrated`)),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({fileDiff:e,oldFile:t,newFile:n,lineAnnotations:r}){this.lineAnnotations=r??this.lineAnnotations,this.additionFile=n,this.deletionFile=t,this.fileDiff=e??(t!=null&&n!=null?kD(t,n,this.options.parseDiffOptions):void 0),this.pre!=null&&(this.syncInteractionOptions(),this.hunksRenderer.hydrate(this.fileDiff),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||this.render({forceRender:!0,renderRange:this.renderRange})}onThemeChange(){this.hunksRenderer.clearRenderCache(),this.rerender()}handleExpandHunk=(e,t,n)=>{this.expandHunk(e,t,n)};expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.rerender()};render({oldFile:e,newFile:t,fileDiff:n,deferManagers:r=!1,forceRender:i=!1,preventEmit:a=!1,lineAnnotations:o,fileContainer:s,containerWrapper:c,renderRange:l}){if(!this.enabled)throw Error(`FileDiff.render: attempting to call render after cleaned up`);let{collapsed:u=!1,themeType:d=`system`}=this.options,f=u?void 0:l,p=this.hasThemeChanged(),m=e!=null&&t!=null&&(!Mw(e,this.deletionFile)||!Mw(t,this.additionFile)),h=n!=null&&n!==this.fileDiff,g=o!=null&&(o.length>0||this.lineAnnotations.length>0)&&o!==this.lineAnnotations;if(!u&&Nw(f,this.renderRange)&&!i&&!g&&!p&&(n!=null&&n===this.fileDiff||n==null&&!m))return this.applyCachedThemeState(d);let{renderRange:_}=this;if(this.renderRange=f,this.deletionFile=e,this.additionFile=t,n==null?e!=null&&t!=null&&m&&(h=!0,this.fileDiff=kD(e,t,this.options.parseDiffOptions)):this.fileDiff=n,h&&(this.cachedHeaderHTML=void 0),o!=null&&this.setLineAnnotations(o),this.fileDiff==null)return!1;this.hunksRenderer.setOptions(this.getHunksRendererOptions(this.options)),this.syncInteractionOptions(),this.hunksRenderer.setLineAnnotations(this.lineAnnotations);let{disableErrorHandling:v=!1,disableFileHeader:y=!1}=this.options;if(y&&(this.headerElement!=null&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),s=this.getOrCreateFileContainer(s,c),this.applyCachedThemeState(d),u){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let e=this.hunksRenderer.renderDiff(this.fileDiff,qf);e!=null&&this.applyThemeState(s,e.themeStyles,d,e.baseThemeType),e?.headerElement!=null&&this.applyHeaderToDOM(e.headerElement,s),this.renderSeparators([]),this.injectUnsafeCSS()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,s)}return a||this.emitPostRender(),!0}try{let e=this.getOrCreatePreNode(s);if(!(this.canPartiallyRender(i,g,m||h||p)&&this.applyPartialRender({previousRenderRange:_,renderRange:f}))){let t=this.hunksRenderer.renderDiff(this.fileDiff,f);if(t==null)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(s,t.themeStyles,d,t.baseThemeType),t.headerElement!=null&&this.applyHeaderToDOM(t.headerElement,s),t.additionsContentAST!=null||t.deletionsContentAST!=null||t.unifiedContentAST!=null?this.applyHunksToDOM(e,t):this.pre!=null&&(this.pre.remove(),this.pre=void 0),this.renderSeparators(t.hunkData)}this.applyBuffers(e,f),this.injectUnsafeCSS(),this.renderAnnotations(),this.renderGutterUtility(),this.managersDirty=!0,r||this.flushManagers()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,s)}return a||this.emitPostRender(),!0}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,t==null))return;this.options.onPostRender?.(t,this,`unmount`);return}if(t==null)return;let r=this.mounted?`update`:`mount`;this.mounted=!0,n?.(t,this,r)}removeRenderedCode(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}renderPlaceholder(e){if(this.fileContainer==null)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),this.placeHolder==null){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:`open`});this.placeHolder=document.createElement(`div`),this.placeHolder.dataset.placeholder=``,e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty(`height`,`${e}px`),!0}primeHighlightCache(){let{fileDiff:e,workerManager:t}=this;if(e==null||t==null||cO(e))return;let n=this.options.tokenizeMaxLength??1e5;Math.max(e.additionLines.length,e.deletionLines.length)>n||t.primeDiffHighlightCache(e)}cleanChildNodes(){this.resizeManager.cleanUp(),this.scrollSyncManager.cleanUp(),this.interactionManager.cleanUp(),this.clearAuxiliaryNodes(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.codeAdditions?.remove(),this.codeDeletions?.remove(),this.codeUnified?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.codeAdditions=void 0,this.codeDeletions=void 0,this.codeUnified=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderSeparators(e){let{hunkSeparators:t}=this.options;if(this.isContainerManaged||this.fileContainer==null||typeof t!=`function`){for(let{element:e}of this.separatorCache.values())e.remove();this.separatorCache.clear();return}let n=new Map(this.separatorCache);for(let r of e){let e=r.slotName,i=this.separatorCache.get(e);if(i==null||!yO(r,i.hunkData)){i?.element.remove();let n=document.createElement(`div`);n.style.display=`contents`,n.slot=r.slotName;let a=t(r,this);a!=null&&n.appendChild(a),this.fileContainer.appendChild(n),i={element:n,hunkData:r},this.separatorCache.set(e,i)}n.delete(e)}for(let[e,{element:t}]of n.entries())this.separatorCache.delete(e),t.remove()}renderAnnotations(){if(this.isContainerManaged||this.fileContainer==null){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(t!=null&&this.lineAnnotations.length>0)for(let[n,r]of this.lineAnnotations.entries()){let i=`${n}-${Jw(r)}`,a=this.annotationCache.get(i);if(a==null||!vO(r,a.annotation)){a?.element.remove();let e=t(r);if(e==null)continue;a={element:BT(Jw(r)),annotation:r},a.element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(i,a)}e.delete(i)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(this.fileContainer==null||e==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(t!=null&&this.gutterUtilityContent!=null)return;if(t==null){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=VT();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}getOrCreateFileContainer(e,t){let{fileContainer:n}=this,r=e??n??document.createElement(`diffs-container`),i=n!==r;return i&&this.emitPostRender(!0),this.fileContainer=r,n!=null&&i&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),t!=null&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),i&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(t!=null)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:nE(e)&&e.hasAttribute(`data-theme-css`)?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):nE(e)&&e.hasAttribute(`data-unsafe-css`)&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});if(this.spriteSVG==null){let e=document.createElement(`div`);e.innerHTML=FT;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}this.spriteSVG!=null&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:`open`});return this.pre==null?(this.pre=document.createElement(`pre`),this.appliedPreAttributes=void 0,this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(t.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodesFromPre(e){this.codeUnified=void 0,this.codeDeletions=void 0,this.codeAdditions=void 0;for(let t of Array.from(e.children))t instanceof HTMLElement&&(t.hasAttribute(`data-unified`)?this.codeUnified=t:t.hasAttribute(`data-deletions`)?this.codeDeletions=t:t.hasAttribute(`data-additions`)&&(this.codeAdditions=t))}applyHeaderToDOM(e,t){this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let{fileDiff:n}=this,r=this.cachedHeaderHTML??hh(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){let e=document.createElement(`div`);e.innerHTML=r;let n=e.firstElementChild;if(!(n instanceof HTMLElement))return;this.headerElement==null?t.shadowRoot?.prepend(n):t.shadowRoot?.replaceChild(n,this.headerElement),this.headerElement=n,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged||n==null)return;let{renderCustomHeader:i,renderHeaderPrefix:a,renderHeaderMetadata:o}=this.options;if(i!=null){let e=i(n)??void 0;this.headerCustom=this.upsertHeaderSlotElement(t,this.headerCustom,Lf,e),this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0;return}let s=a?.(n)??void 0,c=o?.(n)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(t,this.headerPrefix,Ff,s),this.headerMetadata=this.upsertHeaderSlotElement(t,this.headerMetadata,If,c),this.headerCustom?.remove(),this.headerCustom=void 0}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,r){if(r==null){t?.remove();return}let i=t??this.createHeaderSlotElement(n);return t??e.appendChild(i),this.replaceHeaderSlotContent(i,r),i}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement(`div`);return t.slot=e,t}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(t!=null){if(e==null||e===``){this.unsafeCSSStyle!=null&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=HT(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=YT(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.options.theme??Rf,s=typeof o==`string`?o:{...o},c=GT(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===i){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c};return}this.themeCSSStyle=iE({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:XT(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;e!=null&&this.themeCSSStyle!=null&&(this.themeCSSStyle.textContent=ZT(this.themeCSSStyle.textContent??``,GT(e)))}applyHunksToDOM(e,t){let{overflow:n=`scroll`}=this.options,r=(this.options.hunkSeparators??`line-info`)===`line-info`,i=n===`wrap`?t.rowCount:void 0;this.cleanupErrorWrapper(),this.applyPreNodeAttributes(e,t);let a=!1,o=[],s=this.hunksRenderer.renderCodeAST(`unified`,t),c=this.hunksRenderer.renderCodeAST(`deletions`,t),l=this.hunksRenderer.renderCodeAST(`additions`,t);s==null?c!=null||l!=null?(c==null?(this.codeDeletions?.remove(),this.codeDeletions=void 0):(a=this.codeDeletions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions=$T({code:this.codeDeletions,columnType:`deletions`,rowSpan:i,containerSize:r}),this.codeDeletions.innerHTML=this.hunksRenderer.renderPartialHTML(c),o.push(this.codeDeletions)),l==null?(this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=a||this.codeAdditions==null||this.codeUnified!=null,this.codeUnified?.remove(),this.codeUnified=void 0,this.codeAdditions=$T({code:this.codeAdditions,columnType:`additions`,rowSpan:i,containerSize:r}),this.codeAdditions.innerHTML=this.hunksRenderer.renderPartialHTML(l),o.push(this.codeAdditions))):(this.codeUnified?.remove(),this.codeUnified=void 0,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0):(a=this.codeUnified==null||this.codeAdditions!=null||this.codeDeletions!=null,this.codeDeletions?.remove(),this.codeDeletions=void 0,this.codeAdditions?.remove(),this.codeAdditions=void 0,this.codeUnified=$T({code:this.codeUnified,columnType:`unified`,rowSpan:i,containerSize:r}),this.codeUnified.innerHTML=this.hunksRenderer.renderPartialHTML(s),o.push(this.codeUnified)),o.length===0?e.textContent=``:a&&e.replaceChildren(...o),this.lastRowCount=t.rowCount}applyPartialRender({previousRenderRange:e,renderRange:t}){let{pre:n,codeUnified:r,codeAdditions:i,codeDeletions:a,options:{diffStyle:o=`split`}}=this;if(n==null||e==null||t==null||!Number.isFinite(e.totalLines)||!Number.isFinite(t.totalLines)||this.lastRowCount==null)return!1;let s=this.getCodeColumns(o,r,a,i);if(s==null)return!1;let c=e.startingLine,l=t.startingLine,u=c+e.totalLines,d=l+t.totalLines,f=Math.max(c,l),p=Math.min(u,d);if(p<=f)return!1;let m=Math.max(0,f-c),h=Math.max(0,u-p),g=this.trimColumns({columns:s,trimStart:m,trimEnd:h,previousStart:c,overlapStart:f,overlapEnd:p,diffStyle:o});if(g<0)throw Error(`applyPartialRender: failed to trim to overlap`);if(this.lastRowCount<g)throw Error(`applyPartialRender: trimmed beyond DOM row count`);let _=this.lastRowCount-g,v=(e,t)=>{if(!(t<=0||this.fileDiff==null))return this.hunksRenderer.renderDiff(this.fileDiff,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},y=v(l,Math.max(f-l,0));if(y==null&&l<f)return!1;let b=v(p,Math.max(d-p,0));if(b==null&&d>p)return!1;let x=(e,t)=>{if(e!=null){if(o===`unified`&&!Array.isArray(s))this.insertPartialHTML(o,s,e,t);else if(o===`split`&&Array.isArray(s))this.insertPartialHTML(o,s,e,t);else throw Error(`FileDiff.applyPartialRender.applyChunk: invalid chunk application`);_+=e.rowCount}};return this.cleanupErrorWrapper(),x(y,`afterbegin`),x(b,`beforeend`),this.lastRowCount!==_&&(this.applyRowSpan(o,s,_),this.lastRowCount=_),!0}insertPartialHTML(e,t,n,r){if(e===`unified`&&!Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`unified`,n);this.renderPartialColumn(t,e,r)}else if(e===`split`&&Array.isArray(t)){let e=this.hunksRenderer.renderCodeAST(`deletions`,n),i=this.hunksRenderer.renderCodeAST(`additions`,n);this.renderPartialColumn(t[0],e,r),this.renderPartialColumn(t[1],i,r)}else throw Error(`FileDiff.insertPartialHTML: Invalid argument composition`)}renderPartialColumn(e,t,n){if(e==null||t==null)return;let r=DO(t[0]),i=DO(t[1]);if(r==null||i==null)throw Error(`FileDiff.insertPartialHTML: Unexpected AST structure`);let a=i.at(0);n===`beforeend`&&a?.type===`element`&&typeof a.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(a.properties[`data-buffer-size`],e.content.children[e.content.children.length-1],e.gutter.children[e.gutter.children.length-1],r,i,!0);let o=i.at(-1);n===`afterbegin`&&o?.type===`element`&&typeof o.properties[`data-buffer-size`]==`number`&&this.mergeBuffersIfNecessary(o.properties[`data-buffer-size`],e.content.children[0],e.gutter.children[0],r,i,!1),e.gutter.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(r)),e.content.insertAdjacentHTML(n,this.hunksRenderer.renderPartialHTML(i))}mergeBuffersIfNecessary(e,t,n,r,i,a){if(!(t instanceof HTMLElement)||!(n instanceof HTMLElement))return;let o=this.getBufferSize(t.dataset);o!=null&&(a?(r.shift(),i.shift()):(r.pop(),i.pop()),this.updateBufferSize(t,o+e),this.updateBufferSize(n,o+e))}applyRowSpan(e,t,n){let r=e=>{e!=null&&(e.gutter.style.setProperty(`grid-row`,`span ${n}`),e.content.style.setProperty(`grid-row`,`span ${n}`))};if(e===`unified`&&!Array.isArray(t))r(t);else if(e===`split`&&Array.isArray(t))r(t[0]),r(t[1]);else throw Error(`dun fuuuuked up`)}trimColumnRows(e,t,n){let r=0,i=0,a=0,o=!1,s=n>=0;if(e==null)return 0;let c=Array.from(e.content.children),l=Array.from(e.gutter.children);if(c.length!==l.length)throw Error(`FileDiff.trimColumnRows: columns do not match`);for(;a<c.length&&!(t<=0&&!s&&!o);){let e=l[a],u=c[a];if(a++,!(e instanceof HTMLElement)||!(u instanceof HTMLElement))throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: invalid row elements`);if(o&&(o=!1,e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset||e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset)){e.remove(),u.remove(),i++;continue}if(`lineIndex`in e.dataset&&`lineIndex`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),t>0&&(t--,t===0&&(o=!0)),i++),r++;continue}if(`separator`in e.dataset&&`separator`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`annotation`&&`lineAnnotation`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`metadata`&&`noNewline`in u.dataset){(t>0||s&&r>=n)&&(e.remove(),u.remove(),i++);continue}if(e.dataset.gutterBuffer===`buffer`&&`contentBuffer`in u.dataset){let a=this.getBufferSize(u.dataset);if(a==null)throw Error(`FileDiff.trimColumnRows: invalid element`);if(t>0){let n=Math.min(t,a),r=a-n;r>0?(this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=n):(e.remove(),u.remove(),i+=a),t-=n,t===0&&r===0&&(o=!0)}else if(s){let t=r,o=r+a-1;if(n<=t)e.remove(),u.remove(),i+=a;else if(n<=o){let t=o-n+1,r=a-t;this.updateBufferSize(e,r),this.updateBufferSize(u,r),i+=t}}r+=a;continue}throw console.error({gutterElement:e,contentElement:u}),Error(`FileDiff.trimColumnRows: unknown row elements`)}return i}trimColumns({columns:e,diffStyle:t,overlapEnd:n,overlapStart:r,previousStart:i,trimEnd:a,trimStart:o}){let s=Math.max(0,r-i),c=n-i;if(c<0)throw Error(`FileDiff.trimColumns: overlap ends before previous`);let l=o>0,u=a>0;if(!l&&!u)return 0;let d=l?s:0,f=u?c:-1;if(t===`unified`&&!Array.isArray(e))return this.trimColumnRows(e,d,f);if(t===`split`&&Array.isArray(e)){let t=this.trimColumnRows(e[0],d,f),n=this.trimColumnRows(e[1],d,f);if(e[0]!=null&&e[1]!=null&&t!==n)throw Error(`FileDiff.trimColumns: split columns out of sync`);return e[0]==null?n:t}throw console.error({diffStyle:t,columns:e}),Error(`FileDiff.trimColumns: Invalid columns for diffType`)}getBufferSize(e){let t=Number.parseInt(e?.bufferSize??``,10);return Number.isNaN(t)?void 0:t}updateBufferSize(e,t){e.dataset.bufferSize=`${t}`,e.style.setProperty(`grid-row`,`span ${t}`),e.style.setProperty(`min-height`,`calc(${t} * 1lh)`)}getCodeColumns(e,t,n,r){function i(e){if(e==null)return;let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&t.dataset.gutter!=null&&n.dataset.content!=null)return{gutter:t,content:n}}if(e===`unified`)return i(t);{let e=i(n),t=i(r);return e!=null||t!=null?[e,t]:void 0}}applyBuffers(e,t){if(t==null||this.shouldDisableVirtualizationBuffers()){this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(this.bufferBefore??(this.bufferBefore=document.createElement(`div`),this.bufferBefore.dataset.virtualizerBuffer=`before`,e.before(this.bufferBefore)),this.bufferBefore.style.setProperty(`height`,`${t.bufferBefore}px`),this.bufferBefore.style.setProperty(`contain`,`strict`)):this.bufferBefore!=null&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(this.bufferAfter??(this.bufferAfter=document.createElement(`div`),this.bufferAfter.dataset.virtualizerBuffer=`after`,e.after(this.bufferAfter)),this.bufferAfter.style.setProperty(`height`,`${t.bufferAfter}px`),this.bufferAfter.style.setProperty(`contain`,`strict`)):this.bufferAfter!=null&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyPreNodeAttributes(e,{additionsContentAST:t,deletionsContentAST:n,totalLines:r},i){let{diffIndicators:a=`bars`,disableBackground:o=!1,disableLineNumbers:s=!1,overflow:c=`scroll`,diffStyle:l=`split`}=this.options,u={type:`diff`,diffIndicators:a,disableBackground:o,disableLineNumbers:s,overflow:c,split:l!==`unified`&&t!=null&&n!=null,totalLines:r,customProperties:i};LT(u,this.appliedPreAttributes)||(tE(e,u),this.appliedPreAttributes=u)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:`open`});this.errorWrapper??=document.createElement(`div`),this.errorWrapper.dataset.errorWrapper=``,this.errorWrapper.textContent=``,n.appendChild(this.errorWrapper);let r=document.createElement(`div`);r.dataset.errorMessage=``,r.innerText=e.message,this.errorWrapper.appendChild(r);let i=document.createElement(`pre`);i.dataset.errorStack=``,i.innerText=e.stack??`No Error Stack`,this.errorWrapper.appendChild(i)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};function CO({fileDiff:e,oldFile:t,newFile:n}){return e!=null&&e.hunks.length>0||t!=null||n!=null}function wO({fileDiff:e,oldFile:t,newFile:n}){return e!=null||t!=null||n!=null}function TO(e,t,n=!1){return!n&&e==null&&t}function EO(e,t,n=!1){return e==null&&t&&!n}function DO(e){if(e!=null&&e.type===`element`)return e.children??[]}function OO({fileDiff:e,metrics:t,disableFileHeader:n,hunkSeparators:r,expandUnchanged:i,expandedHunks:a,collapsedContextThreshold:o}){let s=fE(t,n),c=s,l=i?!0:a,u=e.hunks.length-1;for(let n=0;n<e.hunks.length;n++){let i=e.hunks[n];if(i==null)throw Error(`computeEstimatedDiffHeights: invalid hunk index`);let a=VD({isPartial:e.isPartial,rangeSize:i.collapsedBefore,expandedHunks:l,hunkIndex:n,collapsedContextThreshold:o}),d=(a.fromStart+a.fromEnd)*t.lineHeight;if(s+=d,c+=d,a.collapsedLines>0){let e=JD({type:r,metrics:t,hunkIndex:n,hunkSpecs:i.hunkSpecs})?.totalHeight??0;s+=e,c+=e}s+=i.splitLineCount*t.lineHeight,c+=i.unifiedLineCount*t.lineHeight;let f=kO(i);s+=f.split*t.lineHeight,c+=f.unified*t.lineHeight;let p=n===u?UD({fileDiff:e,hunkIndex:n,expandedHunks:l,collapsedContextThreshold:o,errorPrefix:`computeEstimatedDiffHeights`}):void 0;if(p!=null){let e=(p.fromStart+p.fromEnd)*t.lineHeight;if(s+=e,c+=e,p.collapsedLines>0){let e=YD({type:r,metrics:t})?.totalHeight??0;s+=e,c+=e}}}if(e.hunks.length>0){let e=mE(t);s+=e,c+=e}return{splitHeight:s,unifiedHeight:c}}function kO(e){if(!e.noEOFCRAdditions&&!e.noEOFCRDeletions)return{split:0,unified:0};let t=e.hunkContent.at(-1);if(t==null)return{split:0,unified:0};if(t.type===`context`){let e=+(t.lines>0);return{split:e,unified:e}}return AO(e,t)}function AO(e,t){let n=(t.deletions>0&&e.noEOFCRDeletions?1:0)+(t.additions>0&&e.noEOFCRAdditions?1:0),r=t.deletions>0&&e.noEOFCRDeletions,i=t.additions>0&&e.noEOFCRAdditions;return{split:r||i?1:0,unified:n}}var jO=5e3,MO=-1,NO=class extends SO{__id=`little-virtualized-file-diff:${++MO}`;top;height=0;metrics;cache={heightDeltas:new Map,measuredHeightDeltaTotal:0,estimatedSplitHeight:void 0,estimatedUnifiedHeight:void 0,checkpoints:[],totalLines:0};isVisible=!1;isSetup=!1;virtualizer;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,t,n,r,i=!1){super(e,r,i),this.virtualizer=t,this.metrics=dE(n)}setMetrics(e,t=!1){let n=dE(e);(t||!Qf(this.metrics,n))&&(this.metrics=n,this.resetLayoutCache({includeEstimatedHeights:!0}))}getLineHeight(e,t=!1){return this.getEstimatedLineHeight(t)+(this.cache.heightDeltas.get(e)??0)}getEstimatedLineHeight(e=!1){let t=e?2:1;return this.metrics.lineHeight*t}setOptions(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setOptions cannot be used inside CodeView. Update CodeView options instead.`);if(e==null)return;let{options:t}=this,n=!ep(t,e),r=n&&BO(t,e);super.setOptions(e),r&&this.resetLayoutCache({forceSimpleRecompute:!0,includeEstimatedHeights:VO(t,e)}),n&&(this.forceRenderOverride=!0),n&&this.isSimpleMode()&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error(`VirtualizedFileDiff.setThemeType cannot be used inside CodeView. Update CodeView options instead.`);super.setThemeType(e)}resetLayoutCache({forceSimpleRecompute:e=!1,includeEstimatedHeights:t=!1}={}){this.layoutDirty=!0,this.cache.heightDeltas.size>0&&this.cache.heightDeltas.clear(),this.cache.measuredHeightDeltaTotal!==0&&(this.cache.measuredHeightDeltaTotal=0),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),this.cache.totalLines!==0&&(this.cache.totalLines=0),t&&(this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0),this.renderRange!=null&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1,{overflow:t=`scroll`}=this.options;if(this.fileContainer==null||this.fileDiff==null)return this.height!==0&&(e=!0),this.height=0,e;if(this.top=this.getVirtualizedTop(),t===`scroll`&&this.lineAnnotations.length===0&&!this.isResizeDebuggingEnabled())return e;let n=this.getDiffStyle(),r=n===`split`?[this.codeDeletions,this.codeAdditions]:[this.codeUnified];for(let t of r){if(t==null)continue;let r=t.children[1];if(r instanceof HTMLElement)for(let t of r.children){if(!(t instanceof HTMLElement))continue;let r=t.dataset.lineIndex;if(r==null)continue;let i=UO(r,n),a=t.getBoundingClientRect().height,o=!1;t.nextElementSibling instanceof HTMLElement&&(`lineAnnotation`in t.nextElementSibling.dataset||`noNewline`in t.nextElementSibling.dataset)&&(`noNewline`in t.nextElementSibling.dataset&&(o=!0),a+=t.nextElementSibling.getBoundingClientRect().height);let s=this.getEstimatedLineHeight(o),c=this.cache.heightDeltas.get(i)??0,l=a-s;l!==c&&(e=!0,this.cache.measuredHeightDeltaTotal+=l-c,l===0?this.cache.heightDeltas.delete(i):this.cache.heightDeltas.set(i,l))}}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>this.fileContainer!=null&&(e&&(this.top=this.getVirtualizedTop()),this.render());prepareCodeViewItem(e,t,n){let r=!xE(this.fileDiff,e),i=n?.resetDiffLayoutCache===!0||r,a=r||n?.resetDiffLayoutCache===!0&&n.includeEstimatedDiffHeights;n?.metrics!=null&&(this.metrics=dE(n.metrics),i=!0,a=!0);let{collapsed:o=!1}=this.options;return this.currentCollapsed!==o&&(this.currentCollapsed=o,i=!0),i&&this.resetLayoutCache({includeEstimatedHeights:a}),this.fileDiff=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e,t=`additions`){if(this.fileDiff==null)return;let n=this.getLineIndex(e,t);if(n==null)return;let{disableFileHeader:r=!1,expandUnchanged:i=!1,collapsed:a=!1,collapsedContextThreshold:o=1}=this.options,s=this.getDiffStyle(),c=this.getHunkSeparatorType(),l=s===`split`?n[1]:n[0];this.approximateLayoutCheckpoints();let u=this.getLayoutCheckpointBeforeLineIndex(l),d=u?.top??fE(this.metrics,r);if(a)return{top:d,height:0};let f;return XD({diff:this.fileDiff,diffStyle:s,startingLine:u?.renderedLineIndex??0,expandedHunks:i?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:e,hunk:t,collapsedBefore:n,collapsedAfter:r,deletionLine:i,additionLine:a})=>{let o=s===`split`?a?.splitLineIndex??i?.splitLineIndex:a?.unifiedLineIndex??i?.unifiedLineIndex;if(o==null)throw Error(`VirtualizedFileDiff.getLinePosition: missing line index data`);if(n>0){let r=JD({type:c,metrics:this.metrics,hunkIndex:e,hunkSpecs:t?.hunkSpecs});if(r!=null){if(d+=r.gapBefore,l>=o-n&&l<o)return f={top:d,height:r.height},!0;d+=r.height+r.gapAfter}}let u=this.getLineHeight(o,(a?.noEOFCR??!1)||(i?.noEOFCR??!1));if(o===l)return f={top:d,height:u},!0;if(d+=u,r>0){let e=YD({type:c,metrics:this.metrics});if(e!=null){if(l>o&&l<=o+r)return f={top:d+e.gapBefore,height:e.height},!0;d+=e.totalHeight}}return!1}}),f}getNumericScrollAnchor(e){if(this.fileDiff==null)return;let{disableFileHeader:t=!1,expandUnchanged:n=!1,collapsed:r=!1,collapsedContextThreshold:i=1}=this.options;if(r)return;let a=this.getDiffStyle(),o=this.getHunkSeparatorType();this.approximateLayoutCheckpoints();let s=this.getLayoutCheckpointBeforeTop(e),c=s?.top??fE(this.metrics,t),l;return XD({diff:this.fileDiff,diffStyle:a,startingLine:s?.renderedLineIndex??0,expandedHunks:n?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:i,callback:({hunkIndex:t,hunk:n,collapsedBefore:r,collapsedAfter:i,deletionLine:s,additionLine:u})=>{let d=a===`split`?u?.splitLineIndex??s?.splitLineIndex:u?.unifiedLineIndex??s?.unifiedLineIndex;if(d==null)throw Error(`VirtualizedFileDiff.getNumericScrollAnchor: missing line index data`);if(r>0){let e=JD({type:o,metrics:this.metrics,hunkIndex:t,hunkSpecs:n?.hunkSpecs});e!=null&&(c+=e.totalHeight)}if(c>=e&&(s==null?u!=null&&(l={lineNumber:u.lineNumber,side:`additions`,top:c}):l={lineNumber:s.lineNumber,side:`deletions`,top:c},l!=null))return!0;let f=this.getLineHeight(d,(u?.noEOFCR??!1)||(s?.noEOFCR??!1));if(c+=f,i>0){let e=YD({type:o,metrics:this.metrics});e!=null&&(c+=e.totalHeight)}return!1}}),l}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(this.top==null||this.fileDiff==null)return;if(this.options.collapsed===!0)return{topOffset:this.top,height:this.height};let t=e==null?this.renderRange:this.computeRenderRangeFromWindow(this.fileDiff,this.top,e);if(t==null)return;let{bufferBefore:n,bufferAfter:r,totalLines:i}=t,a=0;if(i===0){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(a=r)}return{topOffset:this.top+n+a,height:this.height-(n+r)}}cleanUp(e=!1){this.fileContainer!=null&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSetup=!1,super.cleanUp(e)}expandHunk=(e,t,n)=>{this.hunksRenderer.expandHunk(e,t,n),this.forceRenderOverride=!0,this.resetLayoutCache({includeEstimatedHeights:!0}),this.isSimpleMode()&&this.computeApproximateSize(),this.virtualizer.instanceChanged(this,!0)};setVisibility(e){this.isAdvancedMode()||this.fileContainer==null||(this.renderRange=void 0,e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){!this.enabled||this.fileDiff==null&&this.additionFile==null&&this.deletionFile==null||(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}computeApproximateSize(e=!1){let t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;let n=this.height===0;if(this.height=0,this.cache.checkpoints=[],this.cache.totalLines=0,this.fileDiff==null){this.layoutDirty=!1;return}let{disableFileHeader:r=!1,collapsed:i=!1}=this.options,a=fE(this.metrics,r);if(this.height+=a,i){this.layoutDirty=!1;return}this.height=this.getActiveEstimatedHeight()+this.cache.measuredHeightDeltaTotal,t&&!n&&this.validateComputedHeight(),this.layoutDirty=!1}getActiveEstimatedHeight(){this.ensureEstimatedDiffHeights();let e=this.getDiffStyle()===`split`?this.cache.estimatedSplitHeight:this.cache.estimatedUnifiedHeight;if(e==null)throw Error(`VirtualizedFileDiff.getActiveEstimatedHeight: missing estimated height`);return e}ensureEstimatedDiffHeights(){if(this.fileDiff==null){this.cache.estimatedSplitHeight=void 0,this.cache.estimatedUnifiedHeight=void 0;return}if(this.cache.estimatedSplitHeight!=null&&this.cache.estimatedUnifiedHeight!=null)return;let{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,{splitHeight:r,unifiedHeight:i}=OO({fileDiff:this.fileDiff,metrics:this.metrics,disableFileHeader:e,hunkSeparators:this.getHunkSeparatorType(),expandUnchanged:t,expandedHunks:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:n});this.cache.estimatedSplitHeight=r,this.cache.estimatedUnifiedHeight=i}validateComputedHeight(){if(this.fileContainer==null||this.fileDiff==null)return;let e=this.fileContainer.getBoundingClientRect();e.height===this.height?console.log(`VirtualizedFileDiff.computeApproximateSize: computed height IS CORRECT`):console.log(`VirtualizedFileDiff.computeApproximateSize: computed height doesnt match`,{name:this.fileDiff.name,elementHeight:e.height,computedHeight:this.height})}render({fileContainer:e,oldFile:t,newFile:n,fileDiff:r,forceRender:i=!1,...a}={}){let{forceRenderOverride:o,isSetup:s}=this;if(this.forceRenderOverride=void 0,this.fileDiff??=r??(t!=null&&n!=null?kD(t,n,this.options.parseDiffOptions):void 0),e=this.getOrCreateFileContainer(e),this.fileDiff==null)return console.error(`VirtualizedFileDiff.render: attempting to virtually render when we dont have the correct data`),!1;if(s)this.top??=this.getVirtualizedTop();else{this.computeApproximateSize();let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(t==null)throw Error(`VirtualizedFileDiff.render: simple virtualizer is not available`);t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);let c=this.virtualizer.getWindowSpecs(),l=this.top??0,u=this.computeRenderRangeFromWindow(this.fileDiff,l,c);return super.render({fileDiff:this.fileDiff,fileContainer:e,renderRange:u,oldFile:t,newFile:n,forceRender:o??i,...a})}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return this.virtualizer.type===`simple`}isAdvancedMode(){return this.virtualizer.type===`advanced`}getVirtualizedTop(){return this.virtualizer.type===`advanced`?this.virtualizer.getLocalTopForInstance(this):this.fileContainer==null?0:this.virtualizer.getOffsetInScrollContainer(this.fileContainer)}getSimpleVirtualizer(){return this.virtualizer.type===`simple`?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}getDiffStyle(){return this.options.diffStyle??`split`}getHunkSeparatorType(){return HO(this.options.hunkSeparators)}approximateLayoutCheckpoints(){if(this.cache.checkpoints.length>0||this.fileDiff==null||this.fileDiff.hunks.length===0||this.options.collapsed===!0)return;let{disableFileHeader:e=!1,expandUnchanged:t=!1,collapsedContextThreshold:n=1}=this.options,r=this.fileDiff.hunks.length-1,i=this.getDiffStyle(),a=this.getHunkSeparatorType(),o=t?!0:this.hunksRenderer.getExpandedHunksMap(),s=PO(this.cache.heightDeltas),c=fE(this.metrics,e),l=0,u=({rowCount:e,startLineIndex:t,preSeparatorHeight:n=0,postSeparatorHeight:r=0,metadataOffsets:i=[]})=>{if(e<=0)return;let a=l,o=l+e,u=LO(a);for(;u<o;){let e=u-a,r=c+(e>0?n:0)+e*this.metrics.lineHeight+RO(i,e)*this.metrics.lineHeight+FO(s,t,t+e);this.cache.checkpoints.push({renderedLineIndex:u,lineIndex:t+e,top:r}),u+=jO}c+=n+e*this.metrics.lineHeight+i.length*this.metrics.lineHeight+FO(s,t,t+e)+r,l=o};for(let e=0;e<this.fileDiff.hunks.length;e++){let t=this.fileDiff.hunks[e];if(t==null)throw Error(`VirtualizedFileDiff.approximateLayoutCheckpoints: invalid hunk index`);let s=VD({isPartial:this.fileDiff.isPartial,rangeSize:t.collapsedBefore,expandedHunks:o,hunkIndex:e,collapsedContextThreshold:n}),c=s.collapsedLines>0?JD({type:a,metrics:this.metrics,hunkIndex:e,hunkSpecs:t.hunkSpecs})?.totalHeight??0:0;u({rowCount:s.fromStart,startLineIndex:(i===`split`?t.splitLineStart:t.unifiedLineStart)-s.rangeSize});let l=c;u({rowCount:s.fromEnd,startLineIndex:(i===`split`?t.splitLineStart:t.unifiedLineStart)-s.fromEnd,preSeparatorHeight:l}),s.fromEnd>0&&(l=0);let d=e===r?UD({fileDiff:this.fileDiff,hunkIndex:e,expandedHunks:o,collapsedContextThreshold:n,errorPrefix:`VirtualizedFileDiff`}):void 0,f=d!=null&&d.collapsedLines>0?YD({type:a,metrics:this.metrics})?.totalHeight??0:0,p=d==null?0:d.fromStart+d.fromEnd,m=i===`split`?t.splitLineCount:t.unifiedLineCount,h=i===`split`?t.splitLineStart:t.unifiedLineStart;u({rowCount:m,startLineIndex:h,preSeparatorHeight:l,postSeparatorHeight:p===0?f:0,metadataOffsets:zO({diffStyle:i,hunk:t,rowCount:m})}),d!=null&&p>0&&u({rowCount:p,startLineIndex:h+m,postSeparatorHeight:f})}this.cache.totalLines=l}getLayoutCheckpointBeforeLineIndex(e){if(e<=0||this.cache.checkpoints.length===0)return;let t=0,n=this.cache.checkpoints.length-1,r;for(;t<=n;){let i=t+n>>1,a=this.cache.checkpoints[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.lineIndex<=e?(r=a,t=i+1):n=i-1}return r}getLayoutCheckpointBeforeTop(e,t){let n=0,r=this.cache.checkpoints.length-1,i=-1;for(;n<=r;){let t=n+r>>1,a=this.cache.checkpoints[t];if(a==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);a.top<=e?(i=t,n=t+1):r=t-1}if(t==null)return i>=0?this.cache.checkpoints[i]:void 0;for(let e=i;e>=0;e--){let n=this.cache.checkpoints[e];if(n==null)throw Error(`VirtualizedFileDiff: invalid checkpoint index`);if(n.renderedLineIndex%t===0)return n}}getExpandedLineCount(e,t){let n=0;if(e.isPartial){for(let r of e.hunks)n+=t===`split`?r.splitLineCount:r.unifiedLineCount;return n}let{expandUnchanged:r=!1,collapsedContextThreshold:i=1}=this.options,a=r?!0:this.hunksRenderer.getExpandedHunksMap();for(let[r,o]of e.hunks.entries()){let s=t===`split`?o.splitLineCount:o.unifiedLineCount;n+=s;let c=Math.max(o.collapsedBefore,0),{fromStart:l,fromEnd:u,renderAll:d}=VD({isPartial:e.isPartial,rangeSize:c,expandedHunks:a,hunkIndex:r,collapsedContextThreshold:i});c>0&&(n+=d?c:l+u)}let o=UD({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:i,errorPrefix:`VirtualizedFileDiff`});return o!=null&&(n+=o.fromStart+o.fromEnd),n}computeRenderRangeFromWindow(e,t,{top:n,bottom:r}){let{disableFileHeader:i=!1,expandUnchanged:a=!1,collapsedContextThreshold:o=1}=this.options,{hunkLineCount:s,lineHeight:c}=this.metrics,l=this.getDiffStyle(),u=this.getHunkSeparatorType(),d=this.height,f=this.cache.totalLines>0?this.cache.totalLines:this.getExpandedLineCount(e,l),p=fE(this.metrics,i),m=e.hunks.length>0?mE(this.metrics):0;if(t<n-d||t>r)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:d-p-m};if(f<=s||e.hunks.length===0)return{startingLine:0,totalLines:s,bufferBefore:0,bufferAfter:0};this.approximateLayoutCheckpoints(),f=this.cache.totalLines>0?this.cache.totalLines:f;let h=Math.ceil(Math.max(r-n,0)/c),g=Math.ceil(h/s)*s+s,_=g/s,v=_,y=[],b=(n+r)/2,x=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-g*c*2),s),S=t+(x?.top??p),C=x?.renderedLineIndex??0,w,T,E;if(XD({diff:e,diffStyle:l,startingLine:x?.renderedLineIndex??0,expandedHunks:a?!0:this.hunksRenderer.getExpandedHunksMap(),collapsedContextThreshold:o,callback:({hunkIndex:e,hunk:i,collapsedBefore:a,collapsedAfter:o,deletionLine:c,additionLine:d})=>{let f=d==null?c.splitLineIndex:d.splitLineIndex,m=d==null?c.unifiedLineIndex:d.unifiedLineIndex,h=(d?.noEOFCR??!1)||(c?.noEOFCR??!1),g=(a>0?JD({type:u,metrics:this.metrics,hunkIndex:e,hunkSpecs:i?.hunkSpecs}):void 0)?.totalHeight??0;S+=g;let _=C%s===0,x=Math.floor(C/s);if(_&&(y[x]=S-(t+p+g),E!=null)){if(E<=0)return!0;E--}let D=this.getLineHeight(l===`split`?f:m,h);return S>n-D&&S<r&&(w??=x),T==null&&S+D>b&&(T=x),E==null&&S>=r&&_&&(E=v),C++,S+=D,o>0&&(S+=YD({type:u,metrics:this.metrics})?.totalHeight??0),!1}}),w==null)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:d-p-m};T??=w;let D=Math.round(T-_/2),O=Math.max(0,Math.ceil(f/s)-_),k=Math.max(0,Math.min(D,O)),ee=k*s,A=D<0?g+D*s:g,te=y[k]??0,j=k+A/s;return{startingLine:ee,totalLines:A,bufferBefore:te,bufferAfter:j<y.length?d-p-y[j]-m:d-(S-t)-m}}};function PO(e){let t=Array.from(e).sort((e,t)=>e[0]-t[0]),n=[],r=[0],i=0;for(let[e,a]of t)n.push(e),i+=a,r.push(i);return{lineIndexes:n,prefixTotals:r}}function FO({lineIndexes:e,prefixTotals:t},n,r){if(n>=r||e.length===0)return 0;let i=IO(e,n);return(t[IO(e,r)]??0)-(t[i]??0)}function IO(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>1,a=e[i];if(a==null)throw Error(`VirtualizedFileDiff: invalid prefix index`);a<t?n=i+1:r=i}return n}function LO(e){return Math.ceil(e/jO)*jO}function RO(e,t){let n=0;for(let r of e)r<t&&n++;return n}function zO({diffStyle:e,hunk:t,rowCount:n}){if(n<=0||!t.noEOFCRAdditions&&!t.noEOFCRDeletions)return[];let r=t.hunkContent.at(-1);if(r==null)return[];if(r.type===`context`)return[n-1];let i=Math.max(r.deletions,r.additions),a=r.deletions+r.additions;if(e===`split`)return i>0&&(t.noEOFCRAdditions||t.noEOFCRDeletions)?[n-1]:[];let o=[],s=n-a;return r.deletions>0&&t.noEOFCRDeletions&&o.push(s+r.deletions-1),r.additions>0&&t.noEOFCRAdditions&&o.push(n-1),o}function BO(e,t){return(e.diffStyle??`split`)!==(t.diffStyle??`split`)||(e.overflow??`scroll`)!==(t.overflow??`scroll`)||(e.collapsed??!1)!==(t.collapsed??!1)||(e.disableLineNumbers??!1)!==(t.disableLineNumbers??!1)||(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.diffIndicators??`bars`)!==(t.diffIndicators??`bars`)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)||e.unsafeCSS!==t.unsafeCSS}function VO(e,t){return(e.disableFileHeader??!1)!==(t.disableFileHeader??!1)||(e.hunkSeparators??`line-info`)!==(t.hunkSeparators??`line-info`)||(e.expandUnchanged??!1)!==(t.expandUnchanged??!1)||(e.collapsedContextThreshold??1)!==(t.collapsedContextThreshold??1)}function HO(e){return typeof e==`function`?`custom`:e??`line-info`}function UO(e,t){let[n,r]=e.split(`,`).map(Number);return t===`split`?r:n}function WO(e,t){return e==null||t==null?e===t:e.top===t.top&&e.bottom===t.bottom}var GO=1e3,KO=GO*4,qO=[0,1e-6,.99999,1],JO={overscrollSize:GO,intersectionObserverMargin:KO,resizeDebugging:!1},YO=0,XO=-1,ZO=class e{static __STOP=!1;static __lastScrollPosition=0;__id=`virtualizer-${++XO}`;config;type=`simple`;intersectionObserver;scrollTop=0;height=0;scrollHeight=0;windowSpecs={top:0,bottom:0};root;contentContainer;resizeObserver;observers=new Map;visibleInstances=new Map;visibleInstancesDirty=!1;instancesChanged=new Set;scrollDirty=!0;heightDirty=!0;scrollHeightDirty=!0;renderedObservers=0;connectQueue=new Map;constructor(e){this.config={...JO,...e}}setup(t,n){if(this.root==null){this.root=t,this.resizeObserver=new ResizeObserver(this.handleContainerResize),this.intersectionObserver=new IntersectionObserver(this.handleIntersectionChange,{root:this.root,threshold:qO,rootMargin:`${this.config.intersectionObserverMargin}px 0px ${this.config.intersectionObserverMargin}px 0px`}),t instanceof Document?this.setupWindow():this.setupElement(n),window.__INSTANCE=this,window.__TOGGLE=()=>{e.__STOP?(e.__STOP=!1,(this.getScrollContainerElement()??window).scrollTo({top:e.__lastScrollPosition}),Xf(this.computeRenderRangeAndEmit)):(e.__lastScrollPosition=this.getScrollTop(),e.__STOP=!0)};for(let[e,t]of this.connectQueue.entries())this.connect(e,t);this.connectQueue.clear(),this.markDOMDirty(),Xf(this.computeRenderRangeAndEmit)}}instanceChanged(e,t){this.instancesChanged.add(e),t&&this.markDOMDirty(),Xf(this.computeRenderRangeAndEmit)}getWindowSpecs(){return this.windowSpecs.top===0&&this.windowSpecs.bottom===0&&(this.windowSpecs=rp({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize})),this.windowSpecs}isInstanceVisible(e,t){let n=this.getScrollTop(),r=this.getHeight(),i=this.config.intersectionObserverMargin,a=n-i,o=n+r+i;return!(e<a-t||e>o)}handleContainerResize=e=>{if(this.root==null)return;let t=!1;for(let n of e){let e=n.borderBoxSize[0].blockSize;this.root instanceof Document?e!==this.scrollHeight&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log(`Virtualizer: content size change`,this.__id,{sizeChange:e-YO,newSize:e}),YO=e)):n.target===this.root?e!==this.height&&(this.heightDirty=!0,t=!0):n.target===this.contentContainer&&(this.scrollHeightDirty=!0,t=!0,this.config.resizeDebugging&&(console.log(`Virtualizer: scroller size change`,this.__id,{sizeChange:e-YO,newSize:e}),YO=e))}t&&Xf(this.computeRenderRangeAndEmit)};setupWindow(){if(this.root==null||!(this.root instanceof Document))throw Error(`Virtualizer.setupWindow: Invalid setup method`);window.addEventListener(`scroll`,this.handleWindowScroll,{passive:!0}),window.addEventListener(`resize`,this.handleWindowResize,{passive:!0}),this.resizeObserver?.observe(this.root.documentElement)}setupElement(e){if(this.root==null||this.root instanceof Document)throw Error(`Virtualizer.setupElement: Invalid setup method`);this.root.addEventListener(`scroll`,this.handleElementScroll,{passive:!0}),this.resizeObserver?.observe(this.root),e??=this.root.firstElementChild??void 0,e instanceof HTMLElement&&(this.contentContainer=e,this.resizeObserver?.observe(e))}cleanUp(){this.resizeObserver?.disconnect(),this.resizeObserver=void 0,this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,this.root?.removeEventListener(`scroll`,this.handleElementScroll),window.removeEventListener(`scroll`,this.handleWindowScroll),window.removeEventListener(`resize`,this.handleWindowResize),this.root=void 0,this.contentContainer=void 0,this.observers.clear(),this.visibleInstances.clear(),this.instancesChanged.clear(),this.connectQueue.clear(),this.visibleInstancesDirty=!1,this.windowSpecs={top:0,bottom:0},this.scrollTop=0,this.height=0,this.scrollHeight=0}getOffsetInScrollContainer(e){return this.getScrollTop()+QO(e,this.getScrollContainerElement())}connect(e,t){if(this.observers.has(e))throw Error(`Virtualizer.connect: instance is already connected...`);return this.intersectionObserver==null?this.connectQueue.set(e,t):(this.intersectionObserver.observe(e),this.observers.set(e,t),this.instancesChanged.add(t),this.markDOMDirty(),Xf(this.computeRenderRangeAndEmit)),()=>this.disconnect(e)}disconnect(e){let t=this.observers.get(e);this.connectQueue.delete(e),t!=null&&(this.intersectionObserver?.unobserve(e),this.observers.delete(e),this.visibleInstances.delete(e)&&(this.visibleInstancesDirty=!0),this.markDOMDirty(),Xf(this.computeRenderRangeAndEmit))}handleWindowResize=()=>{e.__STOP||window.innerHeight===this.height||(this.heightDirty=!0,Xf(this.computeRenderRangeAndEmit))};handleWindowScroll=()=>{!e.__STOP&&this.root!=null&&this.root instanceof Document&&(this.scrollDirty=!0,Xf(this.computeRenderRangeAndEmit))};handleElementScroll=()=>{e.__STOP||this.root==null||this.root instanceof Document||(this.scrollDirty=!0,Xf(this.computeRenderRangeAndEmit))};computeRenderRangeAndEmit=()=>{if(e.__STOP)return;let t=this.heightDirty||this.scrollHeightDirty;if(!this.scrollDirty&&!this.scrollHeightDirty&&!this.heightDirty&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty&&this.instancesChanged.size===0)return;let n=this.instancesChanged.size>0;if(this.instancesChanged.size===0){let e=rp({scrollTop:this.getScrollTop(),height:this.getHeight(),scrollHeight:this.getScrollHeight(),overscrollSize:this.config.overscrollSize});if(!t&&WO(this.windowSpecs,e)&&this.renderedObservers===this.observers.size&&!this.visibleInstancesDirty)return;this.windowSpecs=e}this.visibleInstancesDirty=!1,this.renderedObservers=this.observers.size;let r=this.getScrollAnchor(this.height),i=new Set;for(let e of t?this.observers.values():this.visibleInstances.values())e.onRender(t)&&i.add(e);for(let e of this.instancesChanged)i.has(e)||e.onRender(t)&&i.add(e);this.scrollFix(r);for(let e of i)e.reconcileHeights();n||=this.instancesChanged.size>0,n&&this.markDOMDirty(),(n||t)&&Xf(this.computeRenderRangeAndEmit),i.clear(),this.instancesChanged.clear()};scrollFix(e){if(e==null)return;let t=this.getScrollContainerElement(),{lineIndex:n,lineOffset:r,fileElement:i,fileOffset:a,fileTypeOffset:o}=e;if(n!=null&&r!=null){let e=i.shadowRoot?.querySelector(`[data-line][data-line-index="${n}"]`);if(e instanceof HTMLElement){let n=QO(e,t);if(n!==r){let e=n-r;this.applyScrollFix(e)}return}}let s=QO(i,t);if(o===`top`)s!==a&&this.applyScrollFix(s-a);else{let e=s+i.getBoundingClientRect().height;e!==a&&this.applyScrollFix(e-a)}}applyScrollFix(e){this.root==null||this.root instanceof Document?window.scrollTo({top:window.scrollY+e,behavior:`instant`}):this.root.scrollTo({top:this.root.scrollTop+e,behavior:`instant`}),this.markDOMDirty()}getScrollAnchor(e){let t=this.getScrollContainerElement(),n;for(let[r]of this.visibleInstances.entries()){let i=QO(r,t),a=i+r.offsetHeight,o,s;a<=0?(o=a,s=`bottom`):(o=i,s=`top`);let c,l;if(a>0&&i<e)for(let e of r.shadowRoot?.querySelectorAll(`[data-line][data-line-index]`)??[]){if(!(e instanceof HTMLElement))continue;let n=e.dataset.lineIndex;if(n==null)continue;let r=QO(e,t);if(!(r<0)){c=n,l=r;break}}if(n?.lineOffset!=null&&l==null)continue;let u=!1;(n==null||l!=null&&(n.lineOffset==null||l<n.lineOffset)||l==null&&n.lineOffset==null&&(o>=0&&(n.fileOffset<0||o<n.fileOffset)||o<0&&n.fileOffset<0&&o>n.fileOffset))&&(u=!0),u&&(n={fileElement:r,fileTypeOffset:s,fileOffset:o,lineIndex:c,lineOffset:l})}return n}handleIntersectionChange=e=>{this.scrollDirty=!0;for(let{target:t,isIntersecting:n}of e){if(!(t instanceof HTMLElement))throw Error(`Virtualizer.handleIntersectionChange: target not an HTMLElement`);let e=this.observers.get(t);e!=null&&(n&&!this.visibleInstances.has(t)?(e.setVisibility(!0),this.visibleInstances.set(t,e),this.visibleInstancesDirty=!0):!n&&this.visibleInstances.has(t)&&(e.setVisibility(!1),this.visibleInstances.delete(t),this.visibleInstancesDirty=!0))}this.visibleInstancesDirty&&Xf(this.computeRenderRangeAndEmit)};getScrollTop(){if(!this.scrollDirty)return this.scrollTop;this.scrollDirty=!1;let e=this.root==null?0:this.root instanceof Document?window.scrollY:this.root.scrollTop;return e=Math.max(0,Math.min(e,this.getScrollHeight()-this.getHeight())),this.scrollTop=e,e}getScrollHeight(){return this.scrollHeightDirty?(this.scrollHeightDirty=!1,this.scrollHeight=this.root==null?0:this.root instanceof Document?this.root.documentElement.scrollHeight:this.root.scrollHeight,this.scrollHeight):this.scrollHeight}getHeight(){return this.heightDirty?(this.heightDirty=!1,this.height=this.root==null?0:this.root instanceof Document?globalThis.innerHeight:this.root.getBoundingClientRect().height,this.height):this.height}markDOMDirty(){this.scrollDirty=!0,this.scrollHeightDirty=!0,this.heightDirty=!0}getScrollContainerElement(){return this.root==null||this.root instanceof Document?void 0:this.root}};function QO(e,t){let n=e.getBoundingClientRect(),r=t?.getBoundingClientRect().top??0;return n.top-r}function $O(e){let t=[];for(let n of e){let e=Hh.get(n);if(e==null)throw Error(`getResolvedLanguages: ${n} is not resolved. Please resolve languages before calling getResolvedLanguages`);t.push(e)}return t}function ek(e){for(let t of Array.isArray(e)?e:[e])if(!Hh.has(t))return!1;return!0}async function tk(e){let t=[],n=[];for(let r of e){if(r===`text`||r===`ansi`)continue;let e=zC(r)??RC(r);`then`in e?n.push(e):t.push(e)}return n.length>0&&await Promise.all(n).then(e=>{for(let n of e){if(n==null)throw Error(`resolvedLanguages: unable to resolve language`);t.push(n)}}),t}function nk(e){return ZC.getResolvedThemes(e)}function rk(e,t){try{let n=$C({name:e,load:t});ZC.registerTheme(n.name,n.load)}catch(t){if(t instanceof qC){console.error(`SharedHighlight.registerCustomTheme: theme name already registered`,e);return}throw t}}async function ik(e){for(let t of e)bw(t);let t=await ZC.resolveThemes(e);for(let n=0;n<e.length;n++)xw(e[n],t[n]);return t}var ak=`
258
- :host {
259
- --diffs-bg: var(--opencode-diffs-bg, var(--color-background-stronger));
260
- }
261
-
262
- [data-diff],
263
- [data-file] {
264
- /* Pierre 1.2 mixes these override targets at 12% in light mode and 20% in dark mode. */
265
- --diffs-bg-deletion-override: light-dark(
266
- color-mix(in lab, var(--diffs-bg) 33.333%, var(--diffs-deletion-base)),
267
- color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-deletion-base))
268
- );
269
- --diffs-bg-deletion-number-override: var(--diffs-bg-deletion-override);
270
- --diffs-bg-addition-override: light-dark(
271
- color-mix(in lab, var(--diffs-bg) 33.333%, var(--diffs-addition-base)),
272
- color-mix(in lab, var(--diffs-bg) 60%, var(--diffs-addition-base))
273
- );
274
- --diffs-bg-addition-number-override: var(--diffs-bg-addition-override);
275
- --diffs-selection-base: var(--v2-background-bg-accent);
276
- --diffs-selection-number-fg: var(--v2-text-text-accent);
277
- --diffs-comment-bg: rgb(from var(--v2-background-bg-accent) r g b / 0.06);
278
- /* Use explicit alpha instead of color-mix(..., transparent) to avoid Safari's non-premultiplied interpolation bugs. */
279
- --diffs-bg-selection: var(--diffs-bg-selection-override, rgb(from var(--diffs-selection-base) r g b / 0.2));
280
- --diffs-bg-selection-number: var(--diffs-bg-selection-number-override, var(--diffs-bg-selection));
281
- --diffs-bg-selection-text: rgb(from var(--diffs-selection-base) r g b / 0.2);
282
- }
283
-
284
- [data-diff] ::selection,
285
- [data-file] ::selection {
286
- background-color: var(--diffs-bg-selection-text);
287
- }
288
-
289
- [data-indicators='bars'] [data-column-number][data-line-type='change-addition']::before,
290
- [data-indicators='bars'] [data-column-number][data-line-type='change-deletion']::before {
291
- width: 2px;
292
- }
293
-
294
- [data-indicators='bars'] [data-column-number][data-line-type='change-deletion']::before {
295
- background-image: none;
296
- background-color: var(--diffs-deletion-base);
297
- }
298
-
299
- [data-background] [data-column-number] {
300
- --mix-light: 88%;
301
- --mix-dark: 80%;
302
- }
303
-
304
- [data-diff-type='split'] [data-additions],
305
- [data-diff-type='split'] [data-additions] [data-gutter],
306
- [data-diff-type='split'] [data-deletions],
307
- [data-diff-type='split'] [data-deletions] [data-content] {
308
- border-left: 0;
309
- border-right: 0;
310
- }
311
-
312
- [data-content-buffer] {
313
- background-image: none;
314
- background-color: var(--diffs-bg-context-gutter);
315
- }
316
-
317
- ::highlight(opencode-find) {
318
- background-color: rgb(from var(--surface-warning-base) r g b / 0.35);
319
- }
320
-
321
- ::highlight(opencode-find-current) {
322
- background-color: rgb(from var(--surface-warning-strong) r g b / 0.55);
323
- }
324
-
325
- [data-diff] [data-line][data-comment-selected]:not([data-selected-line]) {
326
- box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
327
- }
328
-
329
- [data-file] [data-line][data-comment-selected]:not([data-selected-line]) {
330
- box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection);
331
- }
332
-
333
- [data-diff] [data-column-number][data-comment-selected]:not([data-selected-line]) {
334
- box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection-number);
335
- color: var(--diffs-selection-number-fg);
336
- }
337
-
338
- [data-file] [data-column-number][data-comment-selected]:not([data-selected-line]) {
339
- box-shadow: inset 0 0 0 9999px var(--diffs-bg-selection-number);
340
- color: var(--diffs-selection-number-fg);
341
- }
342
-
343
- [data-diff] [data-line-annotation],
344
- [data-diff] [data-gutter-buffer='annotation'],
345
- [data-file] [data-line-annotation],
346
- [data-file] [data-gutter-buffer='annotation'] {
347
- --diffs-annotation-bg: var(--diffs-comment-bg);
348
- --diffs-computed-decoration-bg: var(--diffs-comment-bg);
349
- --diffs-computed-diff-line-bg: var(--diffs-comment-bg);
350
- --diffs-computed-selected-line-bg: var(--diffs-comment-bg);
351
- --diffs-line-bg: var(--diffs-comment-bg);
352
- background-color: var(--diffs-comment-bg);
353
- }
354
-
355
- [data-diff] [data-line][data-selected-line] {
356
- background-color: var(--diffs-bg-selection);
357
- }
358
-
359
- [data-file] [data-line][data-selected-line] {
360
- background-color: var(--diffs-bg-selection);
361
- }
362
-
363
- [data-diff] [data-column-number][data-selected-line] {
364
- background-color: var(--diffs-bg-selection-number);
365
- color: var(--diffs-selection-number-fg);
366
- }
367
-
368
- [data-file] [data-column-number][data-selected-line] {
369
- background-color: var(--diffs-bg-selection-number);
370
- color: var(--diffs-selection-number-fg);
371
- }
372
-
373
- [data-diff] [data-column-number][data-line-type='context'][data-selected-line],
374
- [data-diff] [data-column-number][data-line-type='context-expanded'][data-selected-line],
375
- [data-diff] [data-column-number][data-line-type='change-addition'][data-selected-line],
376
- [data-diff] [data-column-number][data-line-type='change-deletion'][data-selected-line] {
377
- color: var(--diffs-selection-number-fg);
378
- }
379
-
380
- @media (max-width: 767px) {
381
- /* File annotations share the code column; reclaim the measured number gutter. */
382
- [data-file] [data-line-annotation] {
383
- margin-inline-start: calc(-1 * var(--diffs-column-number-width, 0px));
384
- z-index: 4;
385
- }
386
-
387
- [data-file] [data-annotation-content] {
388
- width: var(--diffs-column-width, auto);
389
- inset-inline-start: 0;
390
- }
391
- }
392
-
393
- @media (pointer: fine) {
394
- [data-gutter-utility-slot] {
395
- opacity: 0;
396
- pointer-events: none;
397
- }
398
-
399
- [data-column-number][data-hovered] [data-gutter-utility-slot],
400
- [data-gutter-utility-slot]:focus-within {
401
- opacity: 1;
402
- pointer-events: auto;
403
- }
404
- }
405
-
406
- /* The deletion word-diff emphasis is stronger than additions; soften it while selected so the selection highlight reads consistently. */
407
- [data-diff] [data-line][data-line-type='change-deletion'][data-selected-line] {
408
- --diffs-bg-deletion-emphasis: light-dark(
409
- rgb(from var(--diffs-deletion-base) r g b / 0.07),
410
- rgb(from var(--diffs-deletion-base) r g b / 0.1)
411
- );
412
- }
413
-
414
- [data-diff-header],
415
- [data-diff],
416
- [data-file] {
417
- [data-separator] {
418
- height: 24px;
419
- }
420
- [data-column-number] {
421
- cursor: default !important;
422
- }
423
-
424
- &[data-interactive-line-numbers] [data-column-number] {
425
- cursor: default !important;
426
- }
427
-
428
- &[data-interactive-lines] [data-line] {
429
- cursor: auto !important;
430
- }
431
- [data-code] {
432
- overflow-x: auto !important;
433
- overflow-y: clip !important;
434
- }
435
- }
436
-
437
-
438
- [data-annotation-slot] {
439
- padding: 12px;
440
- box-sizing: border-box;
441
- }
442
-
443
- [data-component="line-comment"] {
444
- position: absolute;
445
- right: 24px;
446
- z-index: var(--line-comment-z, 30);
447
- }
448
-
449
- [data-component="line-comment"][data-inline] {
450
- position: relative;
451
- right: auto;
452
- display: flex;
453
- width: 100%;
454
- min-width: 0;
455
- align-items: flex-start;
456
- }
457
-
458
- [data-component="line-comment"][data-open] {
459
- z-index: var(--line-comment-open-z, 100);
460
- }
461
-
462
- [data-component="line-comment"] [data-slot="line-comment-button"] {
463
- width: 20px;
464
- height: 20px;
465
- border-radius: var(--radius-md);
466
- display: flex;
467
- align-items: center;
468
- justify-content: center;
469
- background: var(--icon-interactive-base);
470
- box-shadow: var(--shadow-xs);
471
- cursor: default;
472
- border: none;
473
- }
474
-
475
- [data-component="line-comment"] [data-slot="icon-svg"] {
476
- color: var(--white);
477
- }
478
-
479
- [data-component="line-comment"] [data-slot="line-comment-icon"] {
480
- width: 12px;
481
- height: 12px;
482
- color: var(--white);
483
- }
484
-
485
- [data-component="line-comment"] [data-slot="line-comment-button"]:focus {
486
- outline: none;
487
- }
488
-
489
- [data-component="line-comment"] [data-slot="line-comment-button"]:focus-visible {
490
- box-shadow: var(--shadow-xs-border-focus);
491
- }
492
-
493
- [data-component="line-comment"] [data-slot="line-comment-popover"] {
494
- position: absolute;
495
- top: calc(100% + 4px);
496
- right: -8px;
497
- z-index: var(--line-comment-popover-z, 40);
498
- min-width: 200px;
499
- max-width: none;
500
- box-sizing: border-box;
501
- border-radius: 8px;
502
- background: var(--surface-raised-stronger-non-alpha);
503
- box-shadow: var(--shadow-xxs-border);
504
- padding: 12px;
505
- }
506
-
507
- [data-component="line-comment"][data-inline] [data-slot="line-comment-popover"] {
508
- position: relative;
509
- top: auto;
510
- right: auto;
511
- margin-left: 8px;
512
- flex: 1 1 0%;
513
- width: auto;
514
- max-width: 100%;
515
- min-width: 0;
516
- }
517
-
518
- [data-component="line-comment"][data-inline] [data-slot="line-comment-popover"][data-inline-body] {
519
- margin-left: 0;
520
- }
521
-
522
- [data-component="line-comment"][data-inline][data-variant="default"] [data-slot="line-comment-popover"][data-inline-body] {
523
- cursor: pointer;
524
- }
525
-
526
- [data-component="line-comment"][data-variant="editor"] [data-slot="line-comment-popover"] {
527
- width: 380px;
528
- max-width: none;
529
- padding: 8px;
530
- border-radius: 14px;
531
- }
532
-
533
- [data-component="line-comment"][data-inline][data-variant="editor"] [data-slot="line-comment-popover"] {
534
- width: 100%;
535
- }
536
-
537
- [data-component="line-comment"] [data-slot="line-comment-content"] {
538
- display: flex;
539
- flex-direction: column;
540
- gap: 6px;
541
- width: 100%;
542
- min-width: 0;
543
- }
544
-
545
- [data-component="line-comment"] [data-slot="line-comment-head"] {
546
- display: flex;
547
- align-items: flex-start;
548
- gap: 8px;
549
- min-width: 0;
550
- }
551
-
552
- [data-component="line-comment"] [data-slot="line-comment-text"] {
553
- flex: 1;
554
- min-width: 0;
555
- font-family: var(--font-family-sans);
556
- font-size: var(--font-size-base);
557
- font-weight: var(--font-weight-regular);
558
- line-height: var(--line-height-x-large);
559
- letter-spacing: var(--letter-spacing-normal);
560
- color: var(--text-strong);
561
- white-space: pre-wrap;
562
- overflow-wrap: anywhere;
563
- }
564
-
565
- [data-component="line-comment"] [data-slot="line-comment-tools"] {
566
- flex: 0 0 auto;
567
- display: flex;
568
- align-items: center;
569
- justify-content: flex-end;
570
- min-width: 0;
571
- }
572
-
573
- [data-component="line-comment"] [data-slot="line-comment-label"],
574
- [data-component="line-comment"] [data-slot="line-comment-editor-label"] {
575
- font-family: var(--font-family-sans);
576
- font-size: var(--font-size-small);
577
- font-weight: var(--font-weight-medium);
578
- line-height: var(--line-height-large);
579
- letter-spacing: var(--letter-spacing-normal);
580
- color: var(--text-weak);
581
- min-width: 0;
582
- white-space: normal;
583
- overflow-wrap: anywhere;
584
- }
585
-
586
- [data-component="line-comment"] [data-slot="line-comment-editor"] {
587
- display: flex;
588
- flex-direction: column;
589
- gap: 8px;
590
- width: 100%;
591
- min-width: 0;
592
- }
593
-
594
- [data-component="line-comment"] [data-slot="line-comment-textarea"] {
595
- width: 100%;
596
- box-sizing: border-box;
597
- resize: vertical;
598
- padding: 8px;
599
- border-radius: var(--radius-md);
600
- background: var(--surface-base);
601
- border: 1px solid var(--border-base);
602
- color: var(--text-strong);
603
- font-family: var(--font-family-sans);
604
- font-size: var(--font-size-small);
605
- line-height: var(--line-height-large);
606
- }
607
-
608
- [data-component="line-comment"] [data-slot="line-comment-textarea"]:focus {
609
- outline: none;
610
- box-shadow: var(--shadow-xs-border-select);
611
- }
612
-
613
- [data-component="line-comment"] [data-slot="line-comment-mention-list"] {
614
- display: flex;
615
- flex-direction: column;
616
- gap: 4px;
617
- max-height: 180px;
618
- overflow: auto;
619
- padding: 4px;
620
- border: 1px solid var(--border-base);
621
- border-radius: var(--radius-md);
622
- background: var(--surface-base);
623
- }
624
-
625
- [data-component="line-comment"] [data-slot="line-comment-mention-item"] {
626
- display: flex;
627
- align-items: center;
628
- gap: 8px;
629
- width: 100%;
630
- min-width: 0;
631
- padding: 6px 8px;
632
- border: 0;
633
- border-radius: var(--radius-sm);
634
- background: transparent;
635
- color: var(--text-strong);
636
- text-align: left;
637
- }
638
-
639
- [data-component="line-comment"] [data-slot="line-comment-mention-item"][data-active] {
640
- background: var(--surface-raised-base-hover);
641
- }
642
-
643
- [data-component="line-comment"] [data-slot="line-comment-mention-path"] {
644
- display: flex;
645
- align-items: center;
646
- min-width: 0;
647
- font-family: var(--font-family-sans);
648
- font-size: var(--font-size-small);
649
- line-height: var(--line-height-large);
650
- }
651
-
652
- [data-component="line-comment"] [data-slot="line-comment-mention-dir"] {
653
- min-width: 0;
654
- color: var(--text-weak);
655
- white-space: nowrap;
656
- overflow: hidden;
657
- text-overflow: ellipsis;
658
- }
659
-
660
- [data-component="line-comment"] [data-slot="line-comment-mention-file"] {
661
- color: var(--text-strong);
662
- white-space: nowrap;
663
- }
664
-
665
- [data-component="line-comment"] [data-slot="line-comment-actions"] {
666
- display: flex;
667
- align-items: center;
668
- flex-wrap: wrap;
669
- gap: 8px;
670
- padding-left: 8px;
671
- min-width: 0;
672
- }
673
-
674
- [data-component="line-comment"] [data-slot="line-comment-editor-label"] {
675
- flex: 1 1 220px;
676
- margin-right: auto;
677
- }
678
-
679
- [data-component="line-comment"] [data-slot="line-comment-action"] {
680
- border: 1px solid var(--border-base);
681
- background: var(--surface-base);
682
- color: var(--text-strong);
683
- border-radius: var(--radius-md);
684
- height: 28px;
685
- padding: 0 10px;
686
- font-family: var(--font-family-sans);
687
- font-size: var(--font-size-small);
688
- font-weight: var(--font-weight-medium);
689
- }
690
-
691
- [data-component="line-comment"] [data-slot="line-comment-action"][data-variant="ghost"] {
692
- background: transparent;
693
- }
694
-
695
- [data-component="line-comment"] [data-slot="line-comment-action"][data-variant="primary"] {
696
- background: var(--text-strong);
697
- border-color: var(--text-strong);
698
- color: var(--background-base);
699
- }
700
-
701
- [data-component="line-comment"] [data-slot="line-comment-action"]:disabled {
702
- opacity: 0.5;
703
- pointer-events: none;
704
- }
705
-
706
-
707
- `;function ok(e){return{theme:`OpenCode`,themeType:`system`,disableLineNumbers:!1,overflow:`wrap`,diffStyle:e??`unified`,diffIndicators:`bars`,lineHoverHighlight:`both`,disableBackground:!1,expansionLineCount:20,hunkSeparators:`line-info-basic`,lineDiffType:`word-alt`,maxLineDiffLength:1e3,maxLineLengthForHighlighting:1e3,disableFileHeader:!0,unsafeCSS:ak}}var sk={"--diffs-font-family":`var(--font-family-mono)`,"--diffs-font-size":`var(--font-size-small)`,"--diffs-line-height":`24px`,"--diffs-tab-size":2,"--diffs-font-features":`var(--font-family-mono--font-feature-settings)`,"--diffs-header-font-family":`var(--font-family-sans)`,"--diffs-gap-block":0,"--diffs-gap-style":0,"--diffs-min-number-column-width":`3ch`};function ck(e){let t=e.closest(`[data-line], [data-alt-line]`);if(t instanceof HTMLElement){let e=t.dataset.lineType;if(e===`change-deletion`)return`deletions`;if(e===`change-addition`||e===`change-additions`)return`additions`}let n=e.closest(`[data-code]`);return n instanceof HTMLElement&&n.hasAttribute(`data-deletions`)?`deletions`:`additions`}function lk(e,t){let n=t.dataset.lineIndex;if(!n)return;let r=n.split(`,`).map(e=>parseInt(e,10)).filter(e=>!Number.isNaN(e));if(r.length!==0)return e&&r.length===2?r[1]:r[0]}function uk(e,t,n,r){let i=Array.from(e.querySelectorAll(`[data-line="${n}"], [data-alt-line="${n}"]`)).filter(e=>e instanceof HTMLElement);if(i.length===0)return;let a=r??`additions`;for(let e of i)if(ck(e)===a||parseInt(e.dataset.altLine??``,10)===n)return lk(t,e)}function dk(e,t){if(!t)return t;if(!e)return;let n=e.querySelector(`[data-diff]`);if(!(n instanceof HTMLElement))return;let r=n.dataset.diffType===`split`,i=uk(e,r,t.start,t.side),a=uk(e,r,t.end,t.endSide??t.side);if(i===void 0||a===void 0)return e.querySelector(`[data-line], [data-alt-line]`)==null?void 0:null;if(i<=a)return t;let o=t.endSide??t.side,s={start:t.end,end:t.start};return o&&(s.side=o),t.endSide&&t.side&&(s.endSide=t.side),s}function fk(e){let t=e.dataset.lineAnnotation?.split(`,`)[1];if(!t)return;let n=parseInt(t,10);if(!Number.isNaN(n))return n}function pk(e){let t=Array.from(e.querySelectorAll(`[data-comment-selected]`));for(let e of t)e instanceof HTMLElement&&e.removeAttribute(`data-comment-selected`)}function mk(e,t){pk(e);let n=e.querySelector(`[data-diff]`);if(!(n instanceof HTMLElement))return;let r=n.dataset.diffType===`split`,i=Array.from(n.querySelectorAll(`[data-line-index]`)).filter(e=>e instanceof HTMLElement);if(i.length===0)return;let a=Array.from(n.querySelectorAll(`[data-line-annotation]`)).filter(e=>e instanceof HTMLElement);for(let n of t){let t=uk(e,r,n.start,n.side);if(t===void 0)continue;let o=n.end===n.start&&(n.endSide==null||n.endSide===n.side)?t:uk(e,r,n.end,n.endSide??n.side);if(o===void 0)continue;let s=Math.min(t,o),c=Math.max(t,o);for(let e of i){let t=lk(r,e);t===void 0||t<s||t>c||e.setAttribute(`data-comment-selected`,``)}for(let e of a){let t=fk(e);t===void 0||t<s||t>c||e.setAttribute(`data-comment-selected`,``)}}}function hk(e,t){pk(e);let n=Array.from(e.querySelectorAll(`[data-line-annotation]`)).filter(e=>e instanceof HTMLElement);for(let r of t){let t=Math.max(1,Math.min(r.start,r.end)),i=Math.max(r.start,r.end);for(let n=t;n<=i;n++){let t=Array.from(e.querySelectorAll(`[data-line="${n}"], [data-column-number="${n}"]`));for(let e of t)e instanceof HTMLElement&&e.setAttribute(`data-comment-selected`,``)}for(let e of n){let n=fk(e);n===void 0||n<t||n>i||e.setAttribute(`data-comment-selected`,``)}}}var gk=new Set,_k,vk,yk=!1;function bk(e){return e instanceof HTMLElement?e.closest(`[data-prevent-autofocus]`)||e.isContentEditable?!0:/^(INPUT|TEXTAREA|SELECT|BUTTON)$/.test(e.tagName):!1}function xk(e){if(e instanceof Node)for(let t of gk){let n=t.element();if(n&&n.isConnected&&n.contains(e))return t}}function Sk(){yk||typeof window>`u`||(yk=!0,window.addEventListener(`keydown`,e=>{if(e.defaultPrevented||bk(e.target)||!(e.metaKey||e.ctrlKey))return;let t=e.key.toLowerCase();if(t===`g`){let t=vk;if(!t||!t.isOpen())return;e.preventDefault(),e.stopPropagation(),t.next(e.shiftKey?-1:1);return}if(t!==`f`)return;let n=vk;if(n&&n.isOpen()){e.preventDefault(),e.stopPropagation(),n.open();return}let r=xk(document.activeElement)??xk(e.target)??_k??Array.from(gk)[0];r&&(e.preventDefault(),e.stopPropagation(),r.open())},{capture:!0}))}function Ck(){let e=globalThis.CSS?.highlights;e&&(e.delete(`opencode-find`),e.delete(`opencode-find-current`))}function wk(){let e=globalThis;return typeof e.Highlight==`function`&&e.CSS?.highlights!=null}function Tk(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);if(e.overflowY===`auto`||e.overflowY===`scroll`)return t;t=t.parentElement}}function Ek(e){let t,n,r=`overlay`,i=[],[a,o]=A([]),[s,c]=Qt({open:!1,query:``,index:0,count:0,pos:{top:8,right:8}}),l=()=>s.open,u=()=>s.query,d=()=>s.index,f=()=>s.count,p=()=>s.pos,m=()=>{o([])},h=()=>{let t=e.overlay();t&&(n!==void 0&&(cancelAnimationFrame(n),n=void 0),t.innerHTML=``)},g=()=>{if(r!==`overlay`){h();return}let t=e.wrapper(),n=e.overlay();if(!t||!n||(h(),i.length===0))return;let a=t.getBoundingClientRect(),o=d(),s=document.createDocumentFragment();for(let e=0;e<i.length;e++){let t=i[e],n=e===o;for(let e of Array.from(t.getClientRects())){if(!e.width||!e.height)continue;let t=document.createElement(`div`);t.style.position=`absolute`,t.style.left=`${Math.round(e.left-a.left)}px`,t.style.top=`${Math.round(e.top-a.top)}px`,t.style.width=`${Math.round(e.width)}px`,t.style.height=`${Math.round(e.height)}px`,t.style.borderRadius=`2px`,t.style.backgroundColor=n?`var(--surface-warning-strong)`:`var(--surface-warning-base)`,t.style.opacity=n?`0.55`:`0.35`,n&&(t.style.boxShadow=`inset 0 0 0 1px var(--border-warning-base)`),s.appendChild(t)}}n.appendChild(s)};function _(){r===`overlay`&&l()&&n===void 0&&(n=requestAnimationFrame(()=>{n=void 0,g()}))}let v=()=>{if(r!==`overlay`)return;let t=e.getRoot(),n=t?Array.from(t.querySelectorAll(`[data-code]`)).filter(e=>e instanceof HTMLElement):[],i=a();n.length===i.length&&n.every((e,t)=>e===i[t])||(m(),o(n))},y=()=>{Ck(),h(),m(),i=[],c(`count`,0),c(`index`,0)},b=()=>{if(typeof window>`u`)return;let t=e.wrapper();if(!t)return;let n=Tk(t)??t,r=n.getBoundingClientRect(),i=parseFloat(getComputedStyle(n).getPropertyValue(`--session-title-height`)),a=Number.isNaN(i)?0:i;c(`pos`,{top:Math.round(r.top)+a-4,right:Math.round(window.innerWidth-r.right)+8})},x=(e,t)=>{let n=t.toLowerCase(),r=[],i=Array.from(e.querySelectorAll(`[data-content] [data-line], [data-column-content]`)).filter(e=>e instanceof HTMLElement);for(let e of i){let i=e.textContent;if(!i)continue;let a=i.toLowerCase(),o=a.indexOf(n);if(o===-1)continue;let s=[],c=[],l=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),u=l.nextNode(),d=0;for(;u;)u instanceof Text&&(d+=u.data.length,s.push(u),c.push(d)),u=l.nextNode();if(s.length===0)continue;let f=e=>{let t=0,n=c.length-1;for(;t<n;){let r=t+n>>1;c[r]>=e?n=r:t=r+1}let r=t===0?0:c[t-1];return{node:s[t],offset:e-r}};for(;o!==-1;){let e=f(o),i=f(o+t.length),s=document.createRange();s.setStart(e.node,e.offset),s.setEnd(i.node,i.offset),r.push(s),o=a.indexOf(n,o+t.length)}}return r},S=e=>{let t=e.startContainer;(t instanceof Element?t:t.parentElement)?.scrollIntoView({block:`center`,inline:`center`})},C=(e,t)=>{let n=globalThis,r=n.CSS?.highlights,i=n.Highlight;if(!r||typeof i!=`function`)return!1;r.delete(`opencode-find`),r.delete(`opencode-find-current`);let a=e[t];a&&r.set(`opencode-find-current`,new i(a));let o=e.filter((e,n)=>n!==t);return o.length>0&&r.set(`opencode-find`,new i(...o)),!0},w=t=>{if(!l())return;let n=u().trim();if(!n){y();return}let a=e.getRoot();if(!a)return;r=wk()?`highlights`:`overlay`;let o=x(a,n),s=o.length,f=t?.reset?0:d(),p=s?Math.min(f,s-1):0;i=o,c(`count`,s),c(`index`,p);let g=o[p];if(r===`highlights`){h(),m(),C(o,p)||(r=`overlay`,Ck(),v(),_()),t?.scroll&&g&&S(g);return}Ck(),v(),t?.scroll&&g&&S(g),_()},T=()=>{c(`open`,!1),c(`query`,``),y(),vk===O&&(vk=void 0)},E=()=>{vk&&vk!==O&&vk.close(),vk=O,_k=O,l()||c(`open`,!0),requestAnimationFrame(()=>{w({scroll:!0}),t?.focus(),t?.select()})},D=e=>{if(!l())return;let t=f();if(t<=0)return;let n=(d()+e+t)%t;c(`index`,n);let a=i[n];if(a){if(r===`highlights`){if(!C(i,n)){r=`overlay`,w({reset:!0,scroll:!0});return}S(a);return}Ck(),v(),S(a),_()}},O={element:e.wrapper,isOpen:()=>l(),next:D,open:E,close:T};return M(()=>{for(let e of a())fn(e,`scroll`,_,{passive:!0})}),oe(()=>{r=wk()?`highlights`:`overlay`,Sk(),gk.add(O),_k||=O,F(()=>{gk.delete(O),vk===O&&(vk=void 0,Ck()),_k===O&&(_k=void 0)})}),M(()=>{if(!l())return;let t=()=>b();requestAnimationFrame(t),fn(window,`resize`,t,{passive:!0});let n=e.wrapper();n&&fu(Tk(n)??n,t)}),F(()=>{m(),h(),vk===O&&(vk=void 0,Ck())}),{open:l,query:u,count:f,index:d,pos:p,setInput:e=>{t=e},setQuery:e=>{c(`query`,e),c(`index`,0),w({reset:!0,scroll:!0})},focus:E,close:T,next:D,refresh:e=>w(e),onPointerDown:()=>{_k=O,e.wrapper()?.focus({preventScroll:!0})},onFocus:()=>{_k=O},onInputKeyDown:e=>{if(e.key===`Escape`){e.preventDefault(),T();return}e.key===`Enter`&&(e.preventDefault(),D(e.shiftKey?-1:1))}}}function Dk(){return{token:0}}function Ok(e){e.observer?.disconnect(),e.observer=void 0}function kk(e){if(!e)return;let t=e.querySelector(`diffs-container`);if(t instanceof HTMLElement)return t}function Ak(e){return kk(e)?.shadowRoot??void 0}function jk(e){if(!e||typeof document>`u`)return;let t=document.documentElement.dataset.colorScheme;if(t===`dark`||t===`light`){e.dataset.colorScheme=t;return}e.removeAttribute(`data-color-scheme`)}function Mk(e){if(typeof document>`u`||(jk(e()),typeof MutationObserver>`u`))return()=>{};let t=document.documentElement,n=new MutationObserver(()=>jk(e()));return n.observe(t,{attributes:!0,attributeFilter:[`data-color-scheme`]}),()=>n.disconnect()}function Nk(e){Ok(e.state),e.state.token+=1;let t=e.state.token,n=Math.max(0,e.settleFrames??0),r=()=>{let r=n=>{if(t===e.state.token){if(n<=0){e.onReady();return}requestAnimationFrame(()=>r(n-1))}};requestAnimationFrame(()=>r(n))},i=n=>{if(e.isReady(n)){r();return}typeof MutationObserver>`u`||(Ok(e.state),e.state.observer=new MutationObserver(()=>{t===e.state.token&&e.isReady(n)&&(Ok(e.state),r())}),e.state.observer.observe(n,{childList:!0,subtree:!0}))},a=e.getRoot();if(!a){if(typeof MutationObserver>`u`)return;e.state.observer=new MutationObserver(()=>{if(t!==e.state.token)return;let n=e.getRoot();n&&i(n)}),e.state.observer.observe(e.container,{childList:!0,subtree:!0});return}i(a)}function Pk(e){return e?e.start===e.end&&(e.endSide==null||e.endSide===e.side):!1}function Fk(e){if(e instanceof Range)return e;let t=new Range;return t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),t}function Ik(e,t){e&&t&&requestAnimationFrame(()=>{let n=e.getSelection?.()??window.getSelection();if(n)try{n.removeAllRanges(),n.addRange(t)}catch{}})}function Lk(){let e=`none`,t,n=!1,r=!1,i=()=>{e=`none`,t=void 0,n=!1};return{begin(r,i){if(!r){e=`text`;return}e=`numbers`,t=i,n=!1},track(r,a){return e===`numbers`?r&1?(a!==void 0&&t!==void 0&&a!==t&&(n=!0),!0):(i(),!0):!1},finish(){let t=e;return r=t===`numbers`&&n,i(),t},consume(e){let t=r&&!Pk(e);return r=!1,t},reset(){r=!1,i()}}}function Rk(e){if(e)return e instanceof HTMLElement?e:e.parentElement??void 0}function zk(e){let t=Rk(e);if(!t)return;let n=t.closest(`[data-line]`);if(!(n instanceof HTMLElement))return;let r=parseInt(n.dataset.line??``,10);if(!Number.isNaN(r))return r}function Bk(e){let t=Rk(e);if(!t)return;let n=t.closest(`[data-line], [data-alt-line]`);if(!(n instanceof HTMLElement))return;let r=parseInt(n.dataset.line??``,10);if(!Number.isNaN(r))return r;let i=parseInt(n.dataset.altLine??``,10);if(!Number.isNaN(i))return i}function Vk(e){let t=Rk(e);if(!t)return;let n=t.closest(`[data-code]`);if(n instanceof HTMLElement)return n.hasAttribute(`data-deletions`)?`deletions`:`additions`}function Hk(e){let t=e.root.getSelection?.()??window.getSelection();if(!t||t.isCollapsed)return;let n=t.getComposedRanges?.({shadowRoots:[e.root]})?.[0]??(t.rangeCount>0?t.getRangeAt(0):void 0),r=n?.startContainer??t.anchorNode,i=n?.endContainer??t.focusNode;if(!r||!i||!e.root.contains(r)||!e.root.contains(i))return;let a=e.lineForNode(r),o=e.lineForNode(i);if(a===void 0||o===void 0)return;let s=e.sideForNode?.(r),c=e.sideForNode?.(i),l=s??c,u={start:a,end:o};return l&&(u.side=l),c&&l&&c!==l&&(u.endSide=c),{range:u,text:e.preserveTextSelection&&n?Fk(n).cloneRange():void 0}}var Uk=new WeakMap,Wk={lineHeight:24,hunkSeparatorHeight:24,spacing:0};function Gk(e){return e===`auto`||e===`scroll`||e===`overlay`}function Kk(e){let t=e.parentElement;for(;t;){if(Gk(getComputedStyle(t).overflowY))return t;t=t.parentElement}}function qk(e){if(typeof document>`u`)return;let t=e.closest(`[data-component='session-review']`);if(t instanceof HTMLElement){let n=Kk(e)??t,r=t.querySelector(`[data-slot='session-review-container']`);return{key:t,root:n,content:r instanceof HTMLElement?r:void 0}}let n=Kk(e);if(n){let e=n.querySelector(`[role='log']`);return{key:n,root:n,content:e instanceof HTMLElement?e:void 0}}return{key:document,root:document,content:void 0}}function Jk(e){let t=qk(e);if(!t)return;let n=Uk.get(t.key);if(!n){let e=new ZO;e.setup(t.root,t.content),n={virtualizer:e,refs:0},Uk.set(t.key,n)}n.refs+=1;let r=!1;return{virtualizer:n.virtualizer,release(){if(r)return;r=!0;let e=Uk.get(t.key);e&&(--e.refs,!(e.refs>0)&&(e.virtualizer.cleanUp(),Uk.delete(t.key)))}}}var Yk=l(o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):r((n||=self).lru_map=n.lru_map||{})})(e,function(e){let t=Symbol(`newer`),n=Symbol(`older`);class r{constructor(e,t){typeof e!=`number`&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let r,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new i(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),r?(r[t]=o,o[n]=r):this.oldest=o,r=o,a--==0)throw Error(`overflow`)}this.newest=r,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,r){var a=this._keymap.get(e);return a?(a.value=r,this._markEntryAsUsed(a),this):(this._keymap.set(e,a=new i(e,r)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift(),this)}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var r=this._keymap.get(e);return r?(this._keymap.delete(r.key),r[t]&&r[n]?(r[n][t]=r[t],r[t][n]=r[n]):r[t]?(r[t][n]=void 0,this.oldest=r[t]):r[n]?(r[n][t]=void 0,this.newest=r[n]):this.oldest=this.newest=void 0,this.size--,r.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){typeof n!=`object`&&(n=this);let r=this.oldest;for(;r;)e.call(n,r.value,r.key,this),r=r[t]}toJSON(){for(var e=Array(this.size),n=0,r=this.oldest;r;)e[n++]={key:r.key,value:r.value},r=r[t];return e}toString(){for(var e=``,n=this.oldest;n;)e+=String(n.key)+`:`+n.value,n=n[t],n&&(e+=` < `);return e}}e.LRUMap=r;function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}};function o(e){this.entry=e}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}};function s(e){this.entry=e}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}})}))(),1),Xk=Symbol(`IGNORE_RESPONSE`),Zk=class extends Error{constructor(){super(`WorkerPoolManager: operation canceled because the pool terminated`)}},Qk=class{highlighter;preferredHighlighter;renderOptions;renderOptionsRequestVersion=0;renderOptionsVersion=0;initialized=!1;workers=[];queuedTasks=[];queuedTaskByInstance=new Map;taskByHighlightKey=new Map;activeTaskById=new Map;activeRequestByInstance=new Map;nextRequestId=0;themeSubscribers=new Set;workersFailed=!1;statSubscribers=new Set;fileCache;diffCache;_queuedBroadcast;lifecycleGeneration=0;constructor(e,{langs:t,theme:n=Rf,useTokenTransformer:r=!1,lineDiffType:i=`word-alt`,maxLineDiffLength:a=1e3,tokenizeMaxLineLength:o=1e3,preferredHighlighter:s=`shiki-js`}){this.options=e,this.preferredHighlighter=s,this.renderOptions={theme:n,useTokenTransformer:r,lineDiffType:i,maxLineDiffLength:a,tokenizeMaxLineLength:o},this.fileCache=new Yk.default.LRUMap(e.totalASTLRUCacheSize??100),this.diffCache=new Yk.default.LRUMap(e.totalASTLRUCacheSize??100),this.queueInitialization(t)}isWorkingPool(){return!this.workersFailed}getFileResultCache(e){return e.cacheKey==null?void 0:this.fileCache.get(e.cacheKey)}getDiffResultCache(e){return e.cacheKey==null?void 0:this.diffCache.get(e.cacheKey)}inspectCaches(){let{fileCache:e,diffCache:t}=this;return{fileCache:e,diffCache:t}}evictFileFromCache(e){try{return this.fileCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}evictDiffFromCache(e){try{return this.diffCache.delete(e)!==void 0}finally{this.queueBroadcastStateChanges()}}async setRenderOptions({theme:e=this.renderOptions.theme??Rf,useTokenTransformer:t=this.renderOptions.useTokenTransformer??!1,lineDiffType:n=this.renderOptions.lineDiffType??`word-alt`,maxLineDiffLength:r=this.renderOptions.maxLineDiffLength??1e3,tokenizeMaxLineLength:i=this.renderOptions.tokenizeMaxLineLength??1e3}){let{lifecycleGeneration:a}=this,o=++this.renderOptionsRequestVersion,s=()=>this.isCurrentLifecycle(a)&&this.renderOptionsRequestVersion===o;try{let a={theme:e,useTokenTransformer:t,lineDiffType:n,maxLineDiffLength:r,tokenizeMaxLineLength:i};if(this.isInitialized()||await this.initialize(),!s()||jD(a,this.renderOptions))return;let o=Ow(e),c=[];if($f(a.theme,this.renderOptions.theme)||(c=Aw(o)?nk(o):await ik(o)),!s())return;if(this.highlighter!=null)QC(c,this.highlighter);else{let e=await Tw({themes:o,langs:[`text`],preferredHighlighter:this.preferredHighlighter});if(!s())return;this.highlighter=e}let l=this.setRenderOptionsOnWorkers(a,c);this.renderOptions=a,this.renderOptionsVersion++,this.diffCache.clear(),this.fileCache.clear(),this.invalidateRenderTasks();for(let e of this.themeSubscribers)e.onThemeChange();await l}catch(e){if(e instanceof Zk||!s())return;throw e}}getFileRenderOptions(){let{tokenizeMaxLineLength:e,theme:t,useTokenTransformer:n}=this.renderOptions;return{theme:t,useTokenTransformer:n,tokenizeMaxLineLength:e}}getDiffRenderOptions(){return{...this.renderOptions}}async setRenderOptionsOnWorkers(e,t){if(this.workersFailed)return;this.isInitialized()||await this.initialize();let n=[];for(let r of this.workers){if(!r.initialized)throw console.log({managedWorker:r}),Error(`setRenderOptionsOnWorkers: Somehow we have an uninitialized worker`);n.push(new Promise((n,i)=>{let a=this.generateRequestId(),o={type:`set-render-options`,id:a,request:{type:`set-render-options`,id:a,renderOptions:e,resolvedThemes:t},resolve:n,reject:i,requestStart:Date.now()};this.activeTaskById.set(a,o),r.pendingSetupRequestId=a,r.worker.postMessage(o.request)}))}await Promise.all(n)}subscribeToThemeChanges(e){return this.themeSubscribers.add(e),this.queueBroadcastStateChanges(),()=>{this.unsubscribeToThemeChanges(e),this.queueBroadcastStateChanges()}}unsubscribeToThemeChanges(e){this.themeSubscribers.delete(e),this.queueBroadcastStateChanges()}subscribeToStatChanges(e){return this.statSubscribers.add(e),e(this.getStats()),()=>{this.statSubscribers.delete(e)}}queueBroadcastStateChanges(){this._queuedBroadcast??=requestAnimationFrame(this._broadcastStateChanges)}_broadcastStateChanges=()=>{this._queuedBroadcast!=null&&(cancelAnimationFrame(this._queuedBroadcast),this._queuedBroadcast=void 0);let e=this.getStats();for(let t of this.statSubscribers)t(e)};cleanUpTasks(e){this.detachInstanceFromQueuedTasks(e);let t=this.activeRequestByInstance.get(e);if(t!=null){let n=this.activeTaskById.get(t);tA(n)?(this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeActiveTask(n)):this.activeTaskById.delete(t)}this.activeRequestByInstance.delete(e),this.queueBroadcastStateChanges()}isInitialized(){return this.initialized===!0}async initialize(e=[]){if(this.initialized!==!0){if(this.initialized===!1){let{lifecycleGeneration:t}=this;this.initialized=new Promise((n,r)=>{(async()=>{try{let r=Ow(this.renderOptions.theme),i=[];if(i=Aw(r)?nk(r):await ik(r),!this.isCurrentLifecycle(t)){n();return}let a=[];if(a=ek(e)?$O(e):await tk(e),!this.isCurrentLifecycle(t)){n();return}let[o]=await Promise.all([Tw({themes:r,langs:[`text`,...e],preferredHighlighter:this.preferredHighlighter}),this.initializeWorkers(i,a)]);if(!this.isCurrentLifecycle(t)){this.terminateWorkers(),n();return}this.highlighter=o,this.initialized=!0,this.diffCache.clear(),this.fileCache.clear(),this.drainQueue(),this.queueBroadcastStateChanges(),n()}catch(e){if(e instanceof Zk||!this.isCurrentLifecycle(t)){n();return}this.initialized=!1,this.workersFailed=!0,this.queueBroadcastStateChanges(),r(e)}})()}),this.queueBroadcastStateChanges()}else return this.initialized}}async initializeWorkers(e,t){this.workersFailed=!1;let n=[],r=Gw(),i=r>0?Kw():void 0;this.workers.length>0&&this.terminateWorkers();for(let a=0;a<(this.options.poolSize??8);a++){let a=this.options.workerFactory(),o={worker:a,requestId:void 0,pendingSetupRequestId:void 0,initialized:!1,langs:new Set([`text`,...t.map(({name:e})=>e)]),customExtensionsVersion:0};a.addEventListener(`message`,e=>{this.handleWorkerMessage(o,e.data)}),a.addEventListener(`error`,e=>console.error(`Worker error:`,e,o)),this.workers.push(o),n.push(new Promise((n,a)=>{let s=this.generateRequestId(),c={type:`initialize`,id:s,request:{type:`initialize`,id:s,renderOptions:this.renderOptions,preferredHighlighter:this.preferredHighlighter,resolvedThemes:e,resolvedLanguages:t,customExtensionsVersion:i==null?void 0:r,customExtensionMap:i},resolve(){o.initialized=!0,n()},reject:a,requestStart:Date.now()};this.activeTaskById.set(s,c),this.executeTask(o,c)}))}await Promise.all(n)}drainQueue=()=>{if(this._queuedDrain=void 0,this.initialized===!0&&this.queuedTasks.length!==0){for(let e=0;e<this.queuedTasks.length;){let t=this.queuedTasks[e];if(this.hasActiveRequest(t)){e++;continue}let n=eA(t),r=this.getAvailableWorker(n);if(r==null)break;this.queuedTasks.splice(e,1),this.assignWorkerToTask(t,r),this.resolveLanguagesAndExecuteTask(r,t,n)}this.queueBroadcastStateChanges()}};highlightFileAST(e,t){let n=this.getFileResultCache(t);AT(t)||n!=null&&jw(n.options,this.getFileRenderOptions())||this.hasMatchingFileInstanceTask(e,t)||this.submitTask(e,{type:`file`,file:t})}primeFileHighlightCache(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeFileHighlightCache: priming highlight cache requires file.cacheKey; skipping "${e.name}".`);return}let t=this.getFileResultCache(e),n=this.getFileHighlightKey(e);if(n==null||AT(e)||t!=null&&jw(t.options,this.getFileRenderOptions()))return;let r=this.getTaskByHighlightKey(n);r==null?this.submitCacheTask({type:`file`,file:e},n):r.primeCache=!0}getPlainFileAST(e,t,n,r){if(this.highlighter==null){this.queueInitialization();return}return DT(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,lines:r})}highlightDiffAST(e,t){let n=this.getDiffResultCache(t);cO(t)||n!=null&&jD(n.options,this.getDiffRenderOptions())||this.hasMatchingDiffInstanceTask(e,t)||this.submitTask(e,{type:`diff`,diff:t})}primeDiffHighlightCache(e){if(e.cacheKey==null){console.warn(`WorkerPoolManager.primeDiffHighlightCache: priming highlight cache requires diff.cacheKey; skipping "${e.prevName??e.name}" -> "${e.name}".`);return}let t=this.getDiffResultCache(e),n=this.getDiffHighlightKey(e);if(n==null||cO(e)||t!=null&&jD(t.options,this.getDiffRenderOptions()))return;let r=this.getTaskByHighlightKey(n);r==null?this.submitCacheTask({type:`diff`,diff:e},n):r.primeCache=!0}getPlainDiffAST(e,t,n,r,i){return this.highlighter==null?void 0:iO(e,this.highlighter,this.renderOptions,{forcePlainText:!0,startingLine:t,totalLines:n,expandedHunks:r,collapsedContextThreshold:i})}terminate(){this.lifecycleGeneration++,this.cancelActiveWorkerTasks(),this.terminateWorkers(),this.fileCache.clear(),this.diffCache.clear(),this.activeRequestByInstance.clear(),this.queuedTasks.length=0,this.queuedTaskByInstance.clear(),this.taskByHighlightKey.clear(),this.activeTaskById.clear(),this.highlighter=void 0,this.initialized=!1,this.workersFailed=!1,this.queueBroadcastStateChanges()}isCurrentLifecycle(e){return this.lifecycleGeneration===e}queueInitialization(e){this.initialize(e).catch(e=>{console.error(e)})}cancelActiveWorkerTasks(){let e=new Zk;for(let t of this.activeTaskById.values())`reject`in t&&t.reject(e)}terminateWorkers(){for(let e of this.workers)e.worker.terminate();this.workers.length=0}getStats(){return{managerState:this.initialized===!1?`waiting`:this.initialized===!0?`initialized`:`initializing`,totalWorkers:this.workers.length,workersFailed:this.workersFailed,busyWorkers:this.workers.filter(e=>e.requestId!=null||e.pendingSetupRequestId!=null).length,queuedTasks:this.queuedTasks.length,activeTasks:this.activeTaskById.size,themeSubscribers:this.themeSubscribers.size,fileCacheSize:this.fileCache.size,diffCacheSize:this.diffCache.size}}submitTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.getHighlightKeyForRequest(t),r=n==null?void 0:this.getTaskByHighlightKey(n);if(r!=null){this.detachInstanceFromQueuedTasks(e,r),this.addInstanceToTask(r,e),this.queueBroadcastStateChanges();return}this.detachInstanceFromQueuedTasks(e);let i=this.generateRequestId(),a=Date.now(),{renderOptionsVersion:o}=this,s=(()=>{switch(t.type){case`file`:return{type:`file`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,renderOptionsVersion:o,requestStart:a};case`diff`:return{type:`diff`,id:i,request:{...t,id:i},instances:new Set([e]),primeCache:!1,highlightKey:n,renderOptionsVersion:o,requestStart:a}}})();this.enqueueRenderTask(s,e)}submitCacheTask(e,t){this.initialized===!1&&this.queueInitialization();let n=this.generateRequestId(),r=Date.now(),{renderOptionsVersion:i}=this,a=(()=>{switch(e.type){case`file`:return{type:`file`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,renderOptionsVersion:i,requestStart:r};case`diff`:return{type:`diff`,id:n,request:{...e,id:n},instances:new Set,primeCache:!0,highlightKey:t,renderOptionsVersion:i,requestStart:r}}})();this.enqueueRenderTask(a)}enqueueRenderTask(e,t){this.queuedTasks.push(e),t!=null&&this.queuedTaskByInstance.set(t,e),e.highlightKey!=null&&this.taskByHighlightKey.set(e.highlightKey,e),this.queueDrain()}async resolveLanguagesAndExecuteTask(e,t,n){try{let r=n.filter(t=>!e.langs.has(t));if(r.length>0&&(ek(r)?t.request.resolvedLanguages=$O(r):t.request.resolvedLanguages=await tk(r)),!this.activeTaskById.has(t.id)){e.requestId===t.id&&(this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain());return}this.executeTask(e,t)}catch{this.cleanWorkerAndTask(e,t),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}}handleWorkerMessage(e,t){let n=this.activeTaskById.get(t.id);try{if(n==null)throw Xk;if(t.type===`error`){let e=Error(t.error);if(t.stack&&(e.stack=t.stack),`reject`in n)n.reject(e);else if(tA(n))this.notifyHighlightError(n,e);else throw Error(`handleWorkerMessage: unknown task type`);throw e}switch(t.requestType){case`initialize`:if(n.type!==`initialize`)throw Error(`handleWorkerMessage: task/response dont match`);this.syncCustomExtensionVersion(e,n.request),n.resolve();break;case`set-render-options`:if(n.type!==`set-render-options`)throw Error(`handleWorkerMessage: task/response dont match`);n.resolve();break;case`file`:{if(n.type!==`file`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!jw(i,this.getFileRenderOptions()))throw Xk;let{request:a}=n;this.syncCustomExtensionVersion(e,a),a.file.cacheKey!=null&&this.fileCache.set(a.file.cacheKey,{result:r,options:i}),this.notifyFileInstances(n,r,i);break}case`diff`:{if(n.type!==`diff`)throw Error(`handleWorkerMessage: task/response dont match`);let{result:r,options:i}=t;if(!this.isCurrentRenderTask(n)||!jD(i,this.getDiffRenderOptions()))throw Xk;let{request:a}=n;this.syncCustomExtensionVersion(e,a),a.diff.cacheKey!=null&&this.diffCache.set(a.diff.cacheKey,{result:r,options:i}),this.notifyDiffInstances(n,r,i);break}}}catch(e){e!==Xk&&console.error(e,n,t)}this.cleanWorkerAndTask(e,n,t.id),this.queueBroadcastStateChanges(),this.queuedTasks.length>0&&this.queueDrain()}_queuedDrain;queueDrain(){this._queuedDrain??(this._queuedDrain=Promise.resolve().then(this.drainQueue),this.queueBroadcastStateChanges())}assignWorkerToTask(e,t){t.requestId=e.id,tA(e)&&(this.clearQueuedInstanceRequests(e),this.trackInstanceRequests(e)),this.activeTaskById.set(e.id,e)}cleanWorkerAndTask(e,t,n=t?.id){e.requestId===n&&(e.requestId=void 0),e.pendingSetupRequestId===n&&(e.pendingSetupRequestId=void 0),t!=null&&(tA(t)&&(this.clearInstanceRequests(t),this.clearHighlightKey(t)),this.activeTaskById.delete(t.id))}executeTask(e,t){$k(t.request)&&this.maybeAttachCustomExtensions(e,t.request),this.activeTaskById.has(t.id)||this.assignWorkerToTask(t,e);for(let n of eA(t))e.langs.add(n);try{e.worker.postMessage(t.request)}catch(n){console.error(`Failed to post message to worker:`,n),tA(t)?this.notifyHighlightError(t,n):`reject`in t&&t.reject(n),this.cleanWorkerAndTask(e,t),this.queuedTasks.length>0&&this.queueDrain()}this.queueBroadcastStateChanges()}maybeAttachCustomExtensions(e,t){if(t.customExtensionsVersion!=null)return;let n=Gw();e.customExtensionsVersion>=n||(t.customExtensionsVersion=n,t.customExtensionMap=Kw())}syncCustomExtensionVersion(e,t){t.customExtensionsVersion!=null&&(e.customExtensionsVersion=t.customExtensionsVersion)}getAvailableWorker(e){let t;for(let n of this.workers){if(n.requestId!=null||n.pendingSetupRequestId!=null||!n.initialized)continue;if(t=n,e.length===0)break;let r=!0;for(let t of e)if(!n.langs.has(t)){r=!1;break}if(r)break}return t}getFileHighlightKey(e){if(e.cacheKey!=null)return`file:${e.cacheKey}:${this.renderOptionsVersion}`}getDiffHighlightKey(e){if(e.cacheKey!=null)return`diff:${e.cacheKey}:${this.renderOptionsVersion}`}getHighlightKeyForRequest(e){switch(e.type){case`file`:return this.getFileHighlightKey(e.file);case`diff`:return this.getDiffHighlightKey(e.diff)}}hasActiveRequest(e){for(let t of nA(e))if(this.activeRequestByInstance.has(t))return!0;return!1}addInstanceToTask(e,t){e.type,e.instances.add(t),this.activeTaskById.has(e.id)?this.activeRequestByInstance.set(t,e.id):this.queuedTaskByInstance.set(t,e)}detachInstanceFromQueuedTasks(e,t){let n=this.queuedTaskByInstance.get(e);n!=null&&n!==t&&(this.queuedTaskByInstance.delete(e),this.detachInstanceFromRenderTask(n,e),!n.primeCache&&n.instances.size===0&&this.removeQueuedTask(n))}detachInstanceFromRenderTask(e,t){e.type,e.instances.delete(t)}removeQueuedTask(e){let t=this.queuedTasks.indexOf(e);t!==-1&&this.queuedTasks.splice(t,1),this.clearQueuedInstanceRequests(e),this.clearHighlightKey(e)}removeActiveTask(e){this.clearInstanceRequests(e),this.clearHighlightKey(e),this.activeTaskById.delete(e.id)}invalidateRenderTasks(){for(let e=this.queuedTasks.length-1;e>=0;e--){let t=this.queuedTasks[e];t.renderOptionsVersion!==this.renderOptionsVersion&&this.removeQueuedTask(t)}for(let e of Array.from(this.activeTaskById.values()))tA(e)&&e.renderOptionsVersion!==this.renderOptionsVersion&&this.removeActiveTask(e)}clearQueuedInstanceRequests(e){for(let t of nA(e))this.queuedTaskByInstance.get(t)===e&&this.queuedTaskByInstance.delete(t)}clearHighlightKey(e){e.highlightKey!=null&&this.taskByHighlightKey.get(e.highlightKey)===e&&this.taskByHighlightKey.delete(e.highlightKey)}trackInstanceRequests(e){for(let t of nA(e))this.activeRequestByInstance.set(t,e.id)}clearInstanceRequests(e){for(let t of nA(e))this.activeRequestByInstance.get(t)===e.id&&this.activeRequestByInstance.delete(t)}notifyFileInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.file,t,n)}notifyDiffInstances(e,t,n){for(let r of e.instances)this.activeRequestByInstance.get(r)===e.id&&r.onHighlightSuccess(e.request.diff,t,n)}notifyHighlightError(e,t){for(let n of nA(e))this.activeRequestByInstance.get(n)===e.id&&n.onHighlightError(t)}hasMatchingFileInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`file`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&Mw(t,n.request.file))return!0;return!1}hasMatchingDiffInstanceTask(e,t){for(let n of this.iterateRenderTasks())if(n.type===`diff`&&this.isCurrentRenderTask(n)&&n.instances.has(e)&&xE(n.request.diff,t))return!0;return!1}getTaskByHighlightKey(e){let t=this.taskByHighlightKey.get(e);return t!=null&&this.isCurrentRenderTask(t)?t:void 0}isCurrentRenderTask(e){return e.renderOptionsVersion===this.renderOptionsVersion}*iterateRenderTasks(){for(let e of this.queuedTasks)yield e;for(let e of this.activeTaskById.values())tA(e)&&(yield e)}generateRequestId(){return`req_${++this.nextRequestId}`}};function $k(e){return e.type===`initialize`||e.type===`file`||e.type===`diff`}function eA(e){let t=new Set;if(e.type===`initialize`||e.type===`set-render-options`)return[];switch(e.type){case`file`:t.add(e.request.file.lang??Ww(e.request.file.name));break;case`diff`:t.add(e.request.diff.lang??Ww(e.request.diff.name)),t.add(e.request.diff.lang??Ww(e.request.diff.prevName??`-`))}return t.delete(`text`),Array.from(t)}function tA(e){return e?.type===`file`||e?.type===`diff`}function nA(e){return e.instances}var rA=`/assets/worker-DDDBDFQT.js`,iA={name:`OpenCode`,bg:`var(--color-background-stronger)`,fg:`var(--text-base)`,colors:{"editor.background":`var(--color-background-stronger)`,"editor.foreground":`var(--text-base)`,"gitDecoration.addedResourceForeground":`var(--syntax-diff-add)`,"gitDecoration.deletedResourceForeground":`var(--syntax-diff-delete)`,"gitDecoration.modifiedResourceForeground":`var(--syntax-diff-unknown)`},tokenColors:[{scope:[`comment`,`punctuation.definition.comment`,`string.comment`],settings:{foreground:`var(--syntax-comment)`}},{scope:[`entity.other.attribute-name`],settings:{foreground:`var(--syntax-property)`}},{scope:[`constant`,`entity.name.constant`,`variable.other.constant`,`variable.language`,`entity`],settings:{foreground:`var(--syntax-constant)`}},{scope:[`entity.name`,`meta.export.default`,`meta.definition.variable`],settings:{foreground:`var(--syntax-type)`}},{scope:[`meta.object.member`],settings:{foreground:`var(--syntax-primitive)`}},{scope:[`variable.parameter.function`,`meta.jsx.children`,`meta.block`,`meta.tag.attributes`,`entity.name.constant`,`meta.embedded.expression`,`meta.template.expression`,`string.other.begin.yaml`,`string.other.end.yaml`],settings:{foreground:`var(--syntax-punctuation)`}},{scope:[`entity.name.function`,`support.type.primitive`],settings:{foreground:`var(--syntax-primitive)`}},{scope:[`support.class.component`],settings:{foreground:`var(--syntax-type)`}},{scope:`keyword`,settings:{foreground:`var(--syntax-keyword)`}},{scope:[`keyword.operator`,`storage.type.function.arrow`,`punctuation.separator.key-value.css`,`entity.name.tag.yaml`,`punctuation.separator.key-value.mapping.yaml`],settings:{foreground:`var(--syntax-operator)`}},{scope:[`storage`,`storage.type`],settings:{foreground:`var(--syntax-keyword)`}},{scope:[`storage.modifier.package`,`storage.modifier.import`,`storage.type.java`],settings:{foreground:`var(--syntax-primitive)`}},{scope:[`string`,`punctuation.definition.string`,`string punctuation.section.embedded source`,`entity.name.tag`],settings:{foreground:`var(--syntax-string)`}},{scope:`support`,settings:{foreground:`var(--syntax-primitive)`}},{scope:[`support.type.object.module`,`variable.other.object`,`support.type.property-name.css`],settings:{foreground:`var(--syntax-object)`}},{scope:`meta.property-name`,settings:{foreground:`var(--syntax-property)`}},{scope:`variable`,settings:{foreground:`var(--syntax-variable)`}},{scope:`variable.other`,settings:{foreground:`var(--syntax-variable)`}},{scope:[`invalid.broken`,`invalid.illegal`,`invalid.unimplemented`,`invalid.deprecated`,`message.error`,`markup.deleted`,`meta.diff.header.from-file`,`punctuation.definition.deleted`,`brackethighlighter.unmatched`,`token.error-token`],settings:{foreground:`var(--syntax-critical)`}},{scope:`carriage-return`,settings:{foreground:`var(--syntax-keyword)`}},{scope:`string source`,settings:{foreground:`var(--syntax-variable)`}},{scope:`string variable`,settings:{foreground:`var(--syntax-constant)`}},{scope:[`source.regexp`,`string.regexp`,`string.regexp.character-class`,`string.regexp constant.character.escape`,`string.regexp source.ruby.embedded`,`string.regexp string.regexp.arbitrary-repitition`,`string.regexp constant.character.escape`],settings:{foreground:`var(--syntax-regexp)`}},{scope:`support.constant`,settings:{foreground:`var(--syntax-primitive)`}},{scope:`support.variable`,settings:{foreground:`var(--syntax-variable)`}},{scope:`meta.module-reference`,settings:{foreground:`var(--syntax-info)`}},{scope:`punctuation.definition.list.begin.markdown`,settings:{foreground:`var(--syntax-punctuation)`}},{scope:[`markup.heading`,`markup.heading entity.name`],settings:{fontStyle:`bold`,foreground:`var(--syntax-info)`}},{scope:`markup.quote`,settings:{foreground:`var(--syntax-info)`}},{scope:`markup.italic`,settings:{fontStyle:`italic`}},{scope:`markup.bold`,settings:{fontStyle:`bold`,foreground:`var(--text-strong)`}},{scope:[`markup.raw`,`markup.inserted`,`meta.diff.header.to-file`,`punctuation.definition.inserted`,`markup.changed`,`punctuation.definition.changed`,`markup.ignored`,`markup.untracked`],settings:{foreground:`var(--text-base)`}},{scope:`meta.diff.range`,settings:{fontStyle:`bold`,foreground:`var(--syntax-unknown)`}},{scope:`meta.diff.header`,settings:{foreground:`var(--syntax-unknown)`}},{scope:`meta.separator`,settings:{fontStyle:`bold`,foreground:`var(--syntax-unknown)`}},{scope:`meta.output`,settings:{foreground:`var(--syntax-unknown)`}},{scope:`meta.export.default`,settings:{foreground:`var(--syntax-unknown)`}},{scope:[`brackethighlighter.tag`,`brackethighlighter.curly`,`brackethighlighter.round`,`brackethighlighter.square`,`brackethighlighter.angle`,`brackethighlighter.quote`],settings:{foreground:`var(--syntax-unknown)`}},{scope:[`constant.other.reference.link`,`string.other.link`],settings:{fontStyle:`underline`,foreground:`var(--syntax-unknown)`}},{scope:`token.info-token`,settings:{foreground:`var(--syntax-info)`}},{scope:`token.warn-token`,settings:{foreground:`var(--syntax-warning)`}},{scope:`token.debug-token`,settings:{foreground:`var(--syntax-info)`}}],semanticTokenColors:{comment:`var(--syntax-comment)`,string:`var(--syntax-string)`,number:`var(--syntax-constant)`,regexp:`var(--syntax-regexp)`,keyword:`var(--syntax-keyword)`,variable:`var(--syntax-variable)`,parameter:`var(--syntax-variable)`,property:`var(--syntax-property)`,function:`var(--syntax-primitive)`,method:`var(--syntax-primitive)`,type:`var(--syntax-type)`,class:`var(--syntax-type)`,namespace:`var(--syntax-type)`,enumMember:`var(--syntax-primitive)`,"variable.constant":`var(--syntax-constant)`,"variable.defaultLibrary":`var(--syntax-unknown)`}},aA=!1;function oA(){aA||(aA=!0,rk(`OpenCode`,()=>Promise.resolve(iA)))}oA();function sA(){return new Worker(rA,{type:`module`})}function cA(e){let t=new Qk({workerFactory:sA,poolSize:2},{theme:`OpenCode`,lineDiffType:e,...e===`none`&&{maxLineDiffLength:0,tokenizeMaxLineLength:1},preferredHighlighter:`shiki-wasm`});return t.initialize(),t}var lA,uA;function dA(e=`word-alt`){if(!(typeof window>`u`))return e===`none`?(lA||=cA(`none`),lA):(uA||=cA(`word-alt`),uA)}var fA=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`bmp`,`ico`,`tif`,`tiff`,`heic`]),pA=new Set([`mp3`,`wav`,`ogg`,`m4a`,`aac`,`flac`,`opus`]);function mA(e){if(e&&typeof e==`object`)return e}function hA(e){if(!e)return;let t=e.split(`;`,1)[0]?.trim().toLowerCase();if(t)return t===`audio/x-aac`?`audio/aac`:t===`audio/x-m4a`?`audio/mp4`:t}function gA(e){if(!e)return``;let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function _A(e){let t=gA(e);if(t===`svg`)return`svg`;if(fA.has(t))return`image`;if(pA.has(t))return`audio`}function vA(e){return mA(e)?.type===`binary`}function yA(e,t){if(t===`svg`)return e.startsWith(`data:image/svg+xml`)?e:void 0;if(t===`image`)return e.startsWith(`data:image/`)?e:void 0;if(e.startsWith(`data:audio/x-aac;`))return e.replace(`data:audio/x-aac;`,`data:audio/aac;`);if(e.startsWith(`data:audio/x-m4a;`))return e.replace(`data:audio/x-m4a;`,`data:audio/mp4;`);if(e.startsWith(`data:audio/`))return e}function bA(e,t){if(!e)return;if(typeof e==`string`)return yA(e,t);let n=mA(e);if(!n||typeof n.content!=`string`)return;let r=hA(typeof n.mimeType==`string`?n.mimeType:void 0);if(r){if(t===`svg`)return r===`image/svg+xml`?n.encoding===`base64`?`data:image/svg+xml;base64,${n.content}`:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(n.content)}`:void 0;if((t!==`image`||r.startsWith(`image/`))&&(t!==`audio`||r.startsWith(`audio/`))&&n.encoding===`base64`)return`data:${r};base64,${n.content}`}}function xA(e){if(typeof atob==`function`)try{let t=atob(e),n=Uint8Array.from(t,e=>e.charCodeAt(0));return typeof TextDecoder==`function`?new TextDecoder().decode(n):t}catch{}}function SA(e){let t=mA(e);if(t&&typeof t.content==`string`&&hA(typeof t.mimeType==`string`?t.mimeType:void 0)===`image/svg+xml`)return t.encoding===`base64`?xA(t.content):t.content}function CA(e){if(typeof e==`string`)return e.length>0;let t=mA(e);return t?typeof t.content==`string`&&t.content.length>0:!1}var wA=G(`<div class="flex min-h-56 flex-col items-center justify-center gap-2 px-6 py-10 text-center"><div class="text-14-semibold text-text-strong"></div><div class="text-14-regular text-text-weak">`),TA=G(`<div class="flex min-h-40 items-center justify-center px-6 py-4 text-center text-text-weak">`),EA=G(`<div class="flex justify-center bg-background-stronger px-6 py-4"><img class="max-h-[60vh] max-w-full rounded border border-border-weak-base bg-background-base object-contain">`),DA=G(`<div class="flex justify-center bg-background-stronger px-6 py-4"><audio class="w-full max-w-xl"controls preload=metadata><source>`),OA=G(`<div class="flex flex-col gap-4 px-6 py-4">`),kA=G(`<div class="flex justify-center"><img class="max-h-[60vh] max-w-full rounded border border-border-weak-base bg-background-base object-contain">`);function AA(e,t){return e.current===void 0?e.after??e.before:e.current}function jA(e){let t=Al(),[n,r]=Qt({}),i=()=>e.media,a=N(()=>{let e=i();if(e&&e.mode!==`off`)return _A(e.path)}),o=N(()=>{let e=i();return!e||e.mode===`off`||a()?!1:vA(e.current)}),s=()=>e.media?.onLoad?.(),c=N(()=>{let e=i(),t=a();return!e||!t?!1:e.deleted?!0:t===`svg`||e.current!==void 0?!1:!CA(e.after)&&CA(e.before)}),l=N(()=>{let e=i(),t=a();if(!(!e||t!==`image`&&t!==`audio`))return bA(AA(e,t),t)}),u=N(()=>{let e=i(),t=a();if(!(!e||t!==`image`&&t!==`audio`)&&e.current===void 0&&!c()&&!l()&&e.path&&e.readFile)return{key:`${t}:${e.path}`,kind:t,path:e.path,readFile:e.readFile,onError:e.onError}});M(()=>{let e=u();if(!e){r({key:void 0,loading:!1,error:!1,src:void 0,mime:void 0});return}let t=!0;P(()=>n.key)===e.key?r({loading:!0,error:!1}):r({key:e.key,loading:!0,error:!1,src:void 0,mime:void 0}),e.readFile(e.path).then(n=>{if(!t)return;let i=bA(n,e.kind);if(!i){e.onError?.({kind:e.kind}),r({key:e.key,loading:!1,error:!0,src:void 0,mime:void 0});return}r({key:e.key,loading:!1,error:!1,src:i,mime:e.kind===`audio`?hA(n?.mimeType):void 0})},()=>{t&&(e.onError?.({kind:e.kind}),r({key:e.key,loading:!1,error:!0,src:void 0,mime:void 0}))}),F(()=>{t=!1})});let d=N(()=>{let e=u();return!e||n.key!==e.key||n.error?l():l()??n.src}),f=N(()=>{if(l())return`ready`;let e=u();return e?n.key!==e.key||n.loading?`loading`:n.error?`error`:d()?`ready`:`idle`:`idle`}),p=N(()=>{let e=u();if(e&&n.key===e.key)return n.mime}),m=N(()=>{let e=i();if(e&&a()===`svg`)return SA(e.current)}),h=N(()=>{let e=i();if(e&&a()===`svg`)return bA(e.current,`svg`)});M(ae(N(()=>{let e=i();if(e&&a()===`svg`&&m()===void 0&&CA(e.current))return[e.path,e.current]}),e=>{e&&i()?.onError?.({kind:`svg`})},{defer:!0}));let g=e=>t.t(e===`image`?`ui.fileMedia.kind.image`:`ui.fileMedia.kind.audio`);return z(Ke,{get children(){return[z(qe,{get when(){return a()===`image`||a()===`audio`},get children(){return z(U,{get when(){return d()},get fallback(){let n=i(),r=a();if(!n||r!==`image`&&r!==`audio`)return e.fallback();let o=g(r);return c()?(()=>{var e=TA();return q(e,()=>t.t(`ui.fileMedia.state.removed`,{kind:o})),e})():f()===`loading`?(()=>{var e=TA();return q(e,()=>t.t(`ui.fileMedia.state.loading`,{kind:o})),e})():f()===`error`?(()=>{var e=TA();return q(e,()=>t.t(`ui.fileMedia.state.error`,{kind:o})),e})():(()=>{var e=TA();return q(e,()=>t.t(`ui.fileMedia.state.unavailable`,{kind:o})),e})()},children:t=>{let n=a();return n!==`image`&&n!==`audio`?e.fallback():n===`image`?(()=>{var e=EA(),n=e.firstChild;return n.addEventListener(`load`,s),j(e=>{var r=t(),a=i()?.path;return r!==e.e&&K(n,`src`,e.e=r),a!==e.t&&K(n,`alt`,e.t=a),e},{e:void 0,t:void 0}),e})():(()=>{var e=DA(),n=e.firstChild,r=n.firstChild;return n.addEventListener(`loadedmetadata`,s),j(e=>{var n=t(),i=p();return n!==e.e&&K(r,`src`,e.e=n),i!==e.t&&K(r,`type`,e.t=i),e},{e:void 0,t:void 0}),e})()}})}}),z(qe,{get when(){return a()===`svg`},get children(){return m()===void 0&&h()==null?e.fallback():(()=>{var t=OA();return q(t,z(U,{get when(){return m()!==void 0},get children(){return e.fallback()}}),null),q(t,z(U,{get when(){return h()},children:e=>(()=>{var t=kA(),n=t.firstChild;return n.addEventListener(`load`,s),j(t=>{var r=e(),a=i()?.path;return r!==t.e&&K(n,`src`,t.e=r),a!==t.t&&K(n,`alt`,t.t=a),t},{e:void 0,t:void 0}),t})()}),null),t})()}}),z(qe,{get when(){return o()},get children(){var e=wA(),n=e.firstChild,r=n.nextSibling;return q(n,()=>i()?.path?.split(`/`).pop()??t.t(`ui.fileMedia.binary.title`)),q(r,()=>{let e=i()?.path;return e?t.t(`ui.fileMedia.binary.description.path`,{path:e}):t.t(`ui.fileMedia.binary.description.default`)}),e}}),z(qe,{when:!0,get children(){return e.fallback()}})]}})}var MA=G(`<div class="fixed z-50 flex h-8 items-center gap-2 rounded-md border border-border-base bg-background-base px-3 shadow-md"><input class="w-40 bg-transparent outline-none text-14-regular text-text-strong placeholder:text-text-weak"><div class="shrink-0 text-12-regular text-text-weak tabular-nums text-right"style=width:10ch></div><div class="flex items-center"><button type=button class="size-6 grid place-items-center rounded text-text-weak hover:bg-surface-base-hover hover:text-text-strong disabled:opacity-40 disabled:pointer-events-none"></button><button type=button class="size-6 grid place-items-center rounded text-text-weak hover:bg-surface-base-hover hover:text-text-strong disabled:opacity-40 disabled:pointer-events-none"></button></div><button type=button class="size-6 grid place-items-center rounded text-text-weak hover:bg-surface-base-hover hover:text-text-strong">`);function NA(e){let t=Al();return z(jt,{get children(){var n=MA(),r=n.firstChild,i=r.nextSibling,a=i.nextSibling,o=a.firstChild,s=o.nextSibling,c=a.nextSibling;n.$$pointerdown=e=>e.stopPropagation(),q(n,z(No,{name:`magnifying-glass`,size:`small`,class:`text-text-weak shrink-0`}),r),r.$$keydown=t=>e.onKeyDown(t),r.$$input=t=>e.onInput(t.currentTarget.value);var l=e.setInput;return typeof l==`function`?gt(l,r):e.setInput=r,q(i,(()=>{var t=W(()=>!!e.count);return()=>t()?`${e.index+1}/${e.count}`:`0/0`})()),dt(o,`click`,e.onPrev,!0),q(o,z(No,{name:`chevron-down`,size:`small`,class:`rotate-180`})),dt(s,`click`,e.onNext,!0),q(s,z(No,{name:`chevron-down`,size:`small`})),dt(c,`click`,e.onClose,!0),q(c,z(No,{name:`close-small`,size:`small`})),j(i=>{var a=`${e.pos.top}px`,l=`${e.pos.right}px`,u=t.t(`ui.fileSearch.placeholder`),d=e.count===0,f=t.t(`ui.fileSearch.previousMatch`),p=e.count===0,m=t.t(`ui.fileSearch.nextMatch`),h=t.t(`ui.fileSearch.close`);return a!==i.e&&mt(n,`top`,i.e=a),l!==i.t&&mt(n,`right`,i.t=l),u!==i.a&&K(r,`placeholder`,i.a=u),d!==i.o&&(o.disabled=i.o=d),f!==i.i&&K(o,`aria-label`,i.i=f),p!==i.n&&(s.disabled=i.n=p),m!==i.s&&K(s,`aria-label`,i.s=m),h!==i.h&&K(c,`aria-label`,i.h=h),i},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0}),j(()=>r.value=e.query),n}})}st([`pointerdown`,`input`,`keydown`,`click`]);var PA=G(`<div data-component=file dir=ltr class="relative select-text outline-none"tabindex=0><div></div><div class="pointer-events-none absolute inset-0 z-0">`),FA=5e5,IA={...Wf,lineHeight:24,spacing:0},LA=[`mode`,`media`,`class`,`classList`,`annotations`,`selectedLines`,`commentedLines`,`search`,`onLineSelected`,`onLineSelectionEnd`,`onLineNumberSelectionEnd`,`onRendered`,`preloadedDiff`],RA=[`file`,...LA],zA=[`fileDiff`,`before`,`after`,`virtualize`,...LA];function BA(e){let t,n,r,i,a,o,s,c=!1,l=null,u=!1,d=Dk(),f=Lk(),[p,m]=A(0),h=()=>Ak(n),g=()=>kk(n),_=Ek({wrapper:()=>t,overlay:()=>r,getRoot:h}),v=()=>{i===void 0&&(i=requestAnimationFrame(()=>{i=void 0;let t=u;e.updateSelection(t),u&&(u=!1,e.onLineSelectionEnd(l))}))},y=()=>{a===void 0&&(a=requestAnimationFrame(()=>{a=void 0;let t=e.buildDragSelection();t&&e.setSelectedLines(t)}))},b=t=>{if(!e.enableLineSelection()||t.button!==0)return;let n=e.lineFromMouseEvent(t);if(n.numberColumn){f.begin(!0,n.line);return}n.line!==void 0&&(f.begin(!1,n.line),o=n.line,s=n.line,c=!1,e.onDragStart(n))},x=t=>{if(!e.enableLineSelection())return;let n=e.lineFromMouseEvent(t);if(!f.track(t.buttons,n.line)&&o!==void 0){if(!(t.buttons&1)){o=void 0,s=void 0,c=!1,e.onDragReset(),f.finish();return}n.line!==void 0&&(s=n.line,c=!0,e.onDragMove(n),y())}},S=()=>{if(e.enableLineSelection()&&f.finish()!==`numbers`&&o!==void 0){if(!c){u=!1;let t=e.buildClickSelection(),n=t&&l?.start===t.start&&l.end===t.end&&l.side===t.side&&(l.endSide??l.side)===(t.endSide??t.side)?null:t;n!==void 0&&e.setSelectedLines(n),e.onLineSelectionEnd(n===void 0?l:n),o=void 0,s=void 0,c=!1,e.onDragReset();return}u=!0,y(),v(),o=void 0,s=void 0,c=!1,e.onDragReset()}},C=()=>{if(!e.enableLineSelection()||o===void 0)return;let t=window.getSelection();t&&!t.isCollapsed&&v()};return oe(()=>{F(Mk(g))}),M(()=>{p();let t=e.commentedLines(),n=h();if(!n)return;if(t.length===0){e.markCommented(n,t);return}let r,i=()=>{r!==void 0&&cancelAnimationFrame(r),r=requestAnimationFrame(()=>{r=void 0,e.markCommented(n,t)})},a=new MutationObserver(i);a.observe(n,{childList:!0,subtree:!0}),i(),F(()=>{a.disconnect(),r!==void 0&&cancelAnimationFrame(r)})}),M(()=>{e.setSelectedLines(e.selectedLines()??null)}),M(()=>{e.enableLineSelection()&&(fn(n,`mousedown`,b),fn(n,`mousemove`,x),fn(window,`mouseup`,S),fn(document,`selectionchange`,C))}),F(()=>{Ok(d),i!==void 0&&cancelAnimationFrame(i),a!==void 0&&cancelAnimationFrame(a),i=void 0,a=void 0,o=void 0,s=void 0,c=!1,f.reset(),l=null,u=!1}),{get wrapper(){return t},set wrapper(e){t=e},get container(){return n},set container(e){n=e},get overlay(){return r},set overlay(e){r=e},get dragStart(){return o},get dragEnd(){return s},get lastSelection(){return l},set lastSelection(e){l=e},ready:d,bridge:f,rendered:p,setRendered:m,getRoot:h,getHost:g,find:_,scheduleSelectionUpdate:v}}function VA(e,t){return BA({enableLineSelection:e.enableLineSelection,selectedLines:e.selectedLines,commentedLines:()=>e.commentedLines()??[],onLineSelectionEnd:e.onLineSelectionEnd,...t})}function HA(e){M(()=>{let t=e.search();t&&(t.register({focus:()=>e.find.focus()}),F(()=>t.register(null)))})}function UA(e){let t=t=>{if(!e.normalize)return t;let n=e.normalize(t);return n===void 0?t:n};return{onLineSelected:n=>{let r=t(n);e.viewer.lastSelection=r,e.onLineSelected?.(r)},onLineSelectionEnd:n=>{let r=t(n);e.viewer.lastSelection=r,e.onLineSelectionEnd?.(r),e.viewer.bridge.consume(r)&&requestAnimationFrame(()=>e.onLineNumberSelectionEnd?.(r))}}}function WA(e){let t=new WeakSet;M(()=>{e.viewer.rendered();let n=e.current();if(!n)return;let r=e.annotations();(r.length!==0||t.has(n))&&(r.length===0?t.delete(n):t.add(n),n.setLineAnnotations(r),n.rerender(),requestAnimationFrame(()=>e.viewer.find.refresh({reset:!0})))})}function GA(e){Nk({state:e.viewer.ready,container:e.viewer.container,getRoot:e.viewer.getRoot,isReady:e.isReady,settleFrames:e.settleFrames,onReady:e.onReady})}function KA(e){Ok(e.viewer.ready);let t=e.reset===!0&&e.current!==void 0;t&&e.current?.cleanUp();let n=t||!e.current?e.create():e.current;t||!e.current?(e.viewer.container.innerHTML=``,e.assign(n)):e.update?.(n),e.draw(n),jk(e.viewer.getHost()),e.viewer.setRendered(e=>e+1),e.onReady()}function qA(e){let t=JA(e.wrapper);if(!t)return()=>{};let n=e.container.getBoundingClientRect().height;if(!n)return()=>{};let r=e.wrapper.getBoundingClientRect().top-t.getBoundingClientRect().top,i=e.container.style.minHeight;e.container.style.minHeight=`${Math.ceil(n)}px`;let a=!1;return()=>{if(a)return;a=!0,e.container.style.minHeight=i;let n=e.wrapper.getBoundingClientRect().top-t.getBoundingClientRect().top-r;n&&(t.scrollTop+=n)}}function JA(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);if(e.overflowY===`auto`||e.overflowY===`scroll`)return t;t=t.parentElement}}function YA(e,t){let n,r,i=()=>{n?.cleanUp(),n=void 0,r=void 0};return{get:()=>{if(!t()){i();return}if(typeof document>`u`)return;let a=e();if(!a)return;let o=JA(a)??document;return n&&r===o?n:(i(),n=new ZO,r=o,n.setup(o,o instanceof Document?void 0:a),n)},cleanup:i}}function XA(e,t){let n,r=()=>{n?.release(),n=void 0};return{get:()=>{if(!t()){r();return}if(n)return n.virtualizer;let i=e();if(!i)return;let a=Jk(i);if(a)return n=a,a.virtualizer},cleanup:r}}function ZA(e){if(!e.dataset.line)return;let t=parseInt(e.dataset.line,10);if(!Number.isNaN(t))return t}function QA(e,t,n){let r=e.composedPath(),i=!1,a,o;for(let e of r)if(e instanceof HTMLElement&&(i||=e.dataset.columnNumber!=null,a===void 0&&(a=t(e)),o===void 0&&n&&(o=n(e)),i&&a!==void 0&&(n==null||o!==void 0)))break;return{line:a,numberColumn:i,side:o}}function $A(e){let t=e.dataset.lineType;if(t===`change-deletion`)return`deletions`;if(t===`change-addition`||t===`change-additions`)return`additions`;if(e.dataset.code!=null)return e.hasAttribute(`data-deletions`)?`deletions`:`additions`}function ej(e){let t=Rk(e);if(t)return ck(t)}function tj(e){return(()=>{var t=PA(),n=t.firstChild,r=n.nextSibling;return dt(t,`focus`,e.viewer.find.onFocus),dt(t,`pointerdown`,e.viewer.find.onPointerDown,!0),gt(t=>e.viewer.wrapper=t,t),q(t,z(U,{get when(){return e.viewer.find.open()},get children(){return z(NA,{get pos(){return e.viewer.find.pos()},get query(){return e.viewer.find.query()},get count(){return e.viewer.find.count()},get index(){return e.viewer.find.index()},get setInput(){return e.viewer.find.setInput},get onInput(){return e.viewer.find.setQuery},get onKeyDown(){return e.viewer.find.onInputKeyDown},get onClose(){return e.viewer.find.close},onPrev:()=>e.viewer.find.next(-1),onNext:()=>e.viewer.find.next(1)})}}),n),gt(t=>e.viewer.container=t,n),gt(t=>e.viewer.overlay=t,r),j(n=>{var r=e.mode,i=sk,a={...e.classList,[e.class??``]:!!e.class};return r!==n.e&&K(t,`data-mode`,n.e=r),n.t=pt(t,i,n.t),n.a=ft(t,a,n.a),n},{e:void 0,t:void 0,a:void 0}),t})()}function nj(e){let t,n,[r,i]=V(e,RA),a=()=>{let e=r.file.contents;return typeof e==`string`?e:Array.isArray(e)?e.join(`
708
- `):e==null?``:String(e)},o=()=>{let e=a(),t=e.split(`
709
- `).length-+!!e.endsWith(`
710
- `);return Math.max(1,t)},s=N(()=>{let e=r.file.contents;return typeof e==`string`?e.length:Array.isArray(e)?e.reduce((e,t)=>e+(typeof t==`string`?t.length+1:String(t).length+1),0):e==null?0:String(e).length}),c=N(()=>s()>FA),l=YA(()=>n.wrapper,c),u=e=>QA(e,ZA),d=e=>{let r=t;if(!r)return!1;if(c())return r.setSelectedLines(e),!0;let i=n.getRoot();if(!i)return!1;let a=o();if(i.querySelectorAll(`[data-line]`).length<a)return!1;if(!e)return r.setSelectedLines(null),!0;let s=Math.min(e.start,e.end),l=Math.max(e.start,e.end);if(s<1||l>a||!i.querySelector(`[data-line="${s}"]`)||!i.querySelector(`[data-line="${l}"]`))return r.setSelectedLines(null),!0;let u=e.endSide==null&&(e.side!==`deletions`||i.querySelector(`[data-deletions]`)!=null)?e:{start:e.start,end:e.end};return r.setSelectedLines(u),!0},f=e=>{n.lastSelection=e,d(e)};n=VA({enableLineSelection:()=>e.enableLineSelection===!0,selectedLines:()=>r.selectedLines,commentedLines:()=>r.commentedLines,onLineSelectionEnd:e=>r.onLineSelectionEnd?.(e)},{lineFromMouseEvent:u,setSelectedLines:f,updateSelection:e=>{let t=n.getRoot();if(!t)return;let r=Hk({root:t,lineForNode:zk,sideForNode:Vk,preserveTextSelection:e});r&&(f(r.range),e&&r.text&&Ik(t,r.text))},buildDragSelection:()=>{if(n.dragStart!==void 0&&n.dragEnd!==void 0)return{start:Math.min(n.dragStart,n.dragEnd),end:Math.max(n.dragStart,n.dragEnd)}},buildClickSelection:()=>{if(n.dragStart!==void 0)return{start:n.dragStart,end:n.dragStart}},onDragStart:()=>{},onDragMove:()=>{},onDragReset:()=>{},markCommented:hk});let p=UA({viewer:n,onLineSelected:e=>r.onLineSelected?.(e),onLineSelectionEnd:e=>r.onLineSelectionEnd?.(e),onLineNumberSelectionEnd:e=>r.onLineNumberSelectionEnd?.(e)}),m=N(()=>({...ok(`unified`),...i,...p})),h=()=>{GA({viewer:n,isReady:e=>c()?e.querySelector(`[data-line]`)!=null:e.querySelectorAll(`[data-line]`).length>=o(),onReady:()=>{d(n.lastSelection),n.find.refresh({reset:!0}),r.onRendered?.()}})};return HA({search:()=>r.search,find:n.find}),M(()=>{let e=m(),i=dA(),o=l.get();KA({viewer:n,current:t,reset:t!==void 0,create:()=>o?new yE(e,o,IA,i):new cE(e,i),assign:e=>{t=e},draw:e=>{let t=a();e.render({file:typeof r.file.contents==`string`?r.file:{...r.file,contents:t},lineAnnotations:[],containerWrapper:n.container})},onReady:h})}),WA({viewer:n,current:()=>t,annotations:()=>r.annotations??[]}),F(()=>{t?.cleanUp(),t=void 0,l.cleanup()}),z(tj,{mode:`text`,viewer:n,get class(){return r.class},get classList(){return r.classList}})}function rj(e){let t,n,r,i,a,o,s,c,l,u,[d,f]=V(e,zA),p=Wr(`(max-width: 640px)`),m=e=>QA(e,Bk,$A),h=(e,n)=>{let r=t;if(!r)return;let i=dk(u.getRoot(),e);if(i===void 0){u.lastSelection=e;return}u.lastSelection=i,r.setSelectedLines(i),Ik(n?.root,n?.text)};u=VA({enableLineSelection:()=>e.enableLineSelection===!0,selectedLines:()=>d.selectedLines,commentedLines:()=>d.commentedLines,onLineSelectionEnd:e=>d.onLineSelectionEnd?.(e)},{lineFromMouseEvent:m,setSelectedLines:h,updateSelection:e=>{let t=u.getRoot();if(!t)return;let n=Hk({root:t,lineForNode:Bk,sideForNode:ej,preserveTextSelection:e});if(n){if(n.text){h(n.range,{root:t,text:n.text});return}h(n.range)}},buildDragSelection:()=>{if(u.dragStart===void 0||u.dragEnd===void 0)return;let e={start:u.dragStart,end:u.dragEnd};return c&&(e.side=c),l&&c&&l!==c&&(e.endSide=l),e},buildClickSelection:()=>{if(u.dragStart===void 0)return;let e={start:u.dragStart,end:u.dragStart};return c&&(e.side=c),e},onDragStart:e=>{c=e.side,l=e.side},onDragMove:e=>{l=e.side},onDragReset:()=>{c=void 0,l=void 0},markCommented:mk});let g=XA(()=>u.container,()=>d.virtualize!==!1),_=N(()=>{if(d.fileDiff){let e=d.fileDiff.deletionLines.join(``),t=d.fileDiff.additionLines.join(``);return Math.max(e.length,t.length)>5e5}let e=typeof d.before?.contents==`string`?d.before.contents:``,t=typeof d.after?.contents==`string`?d.after.contents:``;return Math.max(e.length,t.length)>5e5}),v={lineDiffType:`none`,maxLineDiffLength:0,tokenizeMaxLineLength:1},y=UA({viewer:u,normalize:e=>dk(u.getRoot(),e),onLineSelected:e=>d.onLineSelected?.(e),onLineSelectionEnd:e=>d.onLineSelectionEnd?.(e),onLineNumberSelectionEnd:e=>d.onLineNumberSelectionEnd?.(e)}),b=N(()=>{let t={...ok(e.diffStyle),...f,...y},n=_()?{...t,...v}:t;return p()?{...n,disableLineNumbers:e.disableLineNumbers??!0}:n}),x=e=>{GA({viewer:u,isReady:e=>e.querySelector(`[data-line]`)!=null,settleFrames:1,onReady:()=>{e?.(),h(u.lastSelection),u.find.refresh({reset:!0}),d.onRendered?.()}})};return HA({search:()=>d.search,find:u.find}),M(()=>{let e=b(),c=dA(_()?`none`:`word-alt`),l=g.get(),f=typeof d.before?.contents==`string`?d.before.contents:``,p=typeof d.after?.contents==`string`?d.after.contents:``,m=qA(u);F(m);let h=e=>_()?Ef(e):Ef(e,e.length),v=d.before?{...d.before,contents:f,cacheKey:h(f)}:void 0,y=d.after?{...d.after,contents:p,cacheKey:h(p)}:void 0,S=d.fileDiff===void 0?a!==void 0||v===void 0||y===void 0||o===void 0||s===void 0||!Mw(o,v)||!Mw(s,y):a!==d.fileDiff,C=t!==void 0&&(n!==l||r!==c||l!==void 0&&(i!==e.hunkSeparators||S)),w=!C&&t!==void 0&&!ep(t.options,e);KA({viewer:u,current:t,reset:C,create:()=>l?new NO(e,l,Wk,c):new SO(e,c),update:t=>t.setOptions(e),assign:u=>{t=u,n=l,r=c,i=l?e.hunkSeparators:void 0,a=d.fileDiff,o=v,s=y},draw:e=>{if(d.fileDiff){e.render({fileDiff:d.fileDiff,forceRender:w,lineAnnotations:[],containerWrapper:u.container});return}v&&y&&e.render({oldFile:v,newFile:y,forceRender:w,lineAnnotations:[],containerWrapper:u.container})},onReady:()=>x(m)})}),WA({viewer:u,current:()=>t,annotations:()=>d.annotations??[]}),F(()=>{t?.cleanUp(),t=void 0,n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,g.cleanup(),c=void 0,l=void 0}),z(tj,{mode:`diff`,viewer:u,get class(){return d.class},get classList(){return d.classList}})}function ij(e){return e.mode===`text`?z(jA,{get media(){return e.media},fallback:()=>nj(e)}):z(jA,{get media(){return e.media},fallback:()=>rj(e)})}st([`pointerdown`]);var{use:aj,provider:oj}=mn({name:`Data`,init:e=>({get store(){return e.data},get directory(){return e.directory},get sessionID(){return e.sessionID},navigateToSession:e.onNavigateToSession,sessionHref:e.onSessionHref,shellRunning:e.shellRunning,shellOutput:e.shellOutput})}),sj=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let e=0,r=t.length;e<r;e++)n=t[e](n);return n}}},cj={pipe(){return sj(this,arguments)}},lj=function(){function e(){}return e.prototype=cj,e}(),uj=function(e,t){if(typeof e==`function`)return function(){return e(arguments)?t.apply(this,arguments):e=>t(e,...arguments)};switch(e){case 0:case 1:throw RangeError(`Invalid arity ${e}`);case 2:return function(e,n){return arguments.length>=2?t(e,n):function(n){return t(n,e)}};case 3:return function(e,n,r){return arguments.length>=3?t(e,n,r):function(r){return t(r,e,n)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let n=arguments;return function(e){return t(e,...n)}}}},dj=e=>e,fj=(e=>()=>e)(void 0),pj=fj;function mj(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}function hj(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),t.set(i,i),i}}var gj=e=>{let t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;e instanceof Error&&t.delete(`stack`);let n=Object.getPrototypeOf(e),r=n;for(;r!==null&&r!==Object.prototype;){let e=Reflect.ownKeys(r);for(let n=0;n<e.length;n++)t.add(e[n]);r=Object.getPrototypeOf(r)}return t.has(`constructor`)&&typeof e.constructor==`function`&&n===e.constructor.prototype&&t.delete(`constructor`),t},_j=new WeakSet;function vj(e){return typeof e==`string`}function yj(e){return typeof e==`number`}function bj(e){return typeof e==`symbol`}function xj(e){return vj(e)||yj(e)||bj(e)}function Sj(e){return typeof e==`function`}function Cj(e){return e!=null}function wj(e){return!0}function Tj(e){return typeof e==`object`&&!!e||Sj(e)}var Ej=uj(2,(e,t)=>Tj(e)&&t in e),Dj=`~effect/interfaces/Hash`,Oj=e=>{switch(typeof e){case`number`:return Nj(e);case`bigint`:return Pj(e.toString(10));case`boolean`:return Pj(String(e));case`symbol`:return Pj(String(e));case`string`:return Pj(e);case`undefined`:return Pj(`undefined`);case`function`:case`object`:if(e===null)return Pj(`null`);if(e instanceof Date)return Number.isNaN(e.getTime())?Pj(`Invalid Date`):Pj(e.toISOString());if(e instanceof RegExp)return Pj(e.toString());{if(_j.has(e))return kj(e);if(Hj.has(e))return Hj.get(e);let t=Wj(e,()=>Mj(e)?e[Dj]():typeof e==`function`?kj(e):e instanceof DataView?Rj(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):Array.isArray(e)||ArrayBuffer.isView(e)?Rj(e):e instanceof Map?zj(e):e instanceof Set?Bj(e):Ij(e));return Hj.set(e,t),t}default:throw Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},kj=e=>(Vj.has(e)||Vj.set(e,Nj(Math.floor(Math.random()*(2**53-1)))),Vj.get(e)),Aj=uj(2,(e,t)=>e*53^t),jj=e=>e&3221225471|e>>>1&1073741824,Mj=e=>Ej(e,Dj),Nj=e=>{if(e!==e)return Pj(`NaN`);if(e===1/0)return Pj(`Infinity`);if(e===-1/0)return Pj(`-Infinity`);let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return jj(t)},Pj=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return jj(t)},Fj=(e,t)=>{let n=12289;for(let r of t)n^=Aj(Oj(r),Oj(e[r]));return jj(n)},Ij=e=>Fj(e,gj(e)),Lj=(e,t)=>n=>{let r=e;for(let e of n)r^=t(e);return jj(r)},Rj=Lj(6151,Oj),zj=Lj(Pj(`Map`),([e,t])=>Aj(Oj(e),Oj(t))),Bj=Lj(Pj(`Set`),Oj),Vj=new WeakMap,Hj=new WeakMap,Uj=new WeakSet;function Wj(e,t){if(Uj.has(e))return Pj(`[Circular]`);Uj.add(e);let n=t();return Uj.delete(e),n}var Gj=`~effect/interfaces/Equal`;function Kj(){return arguments.length===1?e=>qj(e,arguments[0]):qj(arguments[0],arguments[1])}function qj(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=typeof e;return n===typeof t?n===`number`&&e!==e&&t!==t?!0:n!==`object`&&n!==`function`||_j.has(e)||_j.has(t)?!1:Qj(e,t,Zj):!1}function Jj(e,t,n){let r=Yj.has(e),i=Xj.has(t);if(r&&i)return!0;if(r||i)return!1;Yj.add(e),Xj.add(t);let a=n();return Yj.delete(e),Xj.delete(t),a}var Yj=new WeakSet,Xj=new WeakSet;function Zj(e,t){if(Oj(e)!==Oj(t))return!1;if(e instanceof Date){if(!(t instanceof Date))return!1;let n=e.getTime(),r=t.getTime();return n===r||Number.isNaN(n)&&Number.isNaN(r)}if(e instanceof RegExp)return t instanceof RegExp&&e.toString()===t.toString();let n=sM(e),r=sM(t);if(n!==r)return!1;let i=n&&r;return typeof e==`function`&&!i?!1:Jj(e,t,()=>{if(i)return e[Gj](t);if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:eM(e,t);if(ArrayBuffer.isView(e)){let n=e instanceof DataView;if(!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength||n!==t instanceof DataView)return!1;if(n){let n=t;return tM(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}return tM(e,t)}return e instanceof Map?!(t instanceof Map)||e.size!==t.size?!1:iM(e,t):e instanceof Set?!(t instanceof Set)||e.size!==t.size?!1:oM(e,t):nM(e,t)})}function Qj(e,t,n){let r=$j.get(e);if(!r)r=new WeakMap,$j.set(e,r);else if(r.has(t))return r.get(t);let i=n(e,t);r.set(t,i);let a=$j.get(t);return a||(a=new WeakMap,$j.set(t,a)),a.set(e,i),i}var $j=new WeakMap;function eM(e,t){for(let n=0;n<e.length;n++)if(!qj(e[n],t[n]))return!1;return!0}function tM(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function nM(e,t){let n=gj(e),r=gj(t);if(n.size!==r.size)return!1;for(let i of n)if(!r.has(i)||!qj(e[i],t[i]))return!1;return!0}function rM(e,t){return function(n,r){let i=Array.from(r);for(let[r,a]of n){let n=!1;for(let o=0;o<i.length;o++){let[s,c]=i[o];if(e(r,s)&&t(a,c)){i[o]=i[i.length-1],i.pop(),n=!0;break}}if(!n)return!1}return!0}}var iM=rM(qj,qj);function aM(e){return function(t,n){let r=Array.from(n);for(let n of t){let t=!1;for(let i=0;i<r.length;i++){let a=r[i];if(e(n,a)){r[i]=r[r.length-1],r.pop(),t=!0;break}}if(!t)return!1}return!0}}var oM=aM(qj),sM=e=>Ej(e,Gj),cM=e=>(t,n)=>t===n||e(t,n),lM=e=>e.length>0;function uM(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n}function dM(e,t){for(let n of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,n)&&uM(e,n,t[n])}var fM=Symbol.for(`~effect/Redactable`),pM=e=>Ej(e,fM);function mM(e){return pM(e)?hM(e):e}function hM(e){return e[fM](globalThis[`~effect/Fiber/currentFiber`]?.context??vM)}var gM=`~effect/Fiber/currentFiber`,_M=new Map,vM={"~effect/Context":{},base:_M,depth:0,mapUnsafe:_M,pipe(){return sj(this,arguments)}};function yM(e,t){let n=t?.space??0,r=new WeakSet,i=n?typeof n==`number`?` `.repeat(n):n:``,a=e=>i.repeat(e),o=(e,t)=>{let n=e?.constructor;return n&&n!==Object.prototype.constructor&&n.name?`${n.name}(${t})`:t},s=e=>{try{return Reflect.ownKeys(e)}catch{return[`[ownKeys threw]`]}};function c(e,n=0){if(typeof e==`string`)return JSON.stringify(e);if(typeof e==`number`||e==null||typeof e==`boolean`||typeof e==`symbol`)return String(e);if(typeof e==`bigint`)return String(e)+`n`;if(typeof e==`object`||typeof e==`function`){if(r.has(e))return bM;r.add(e);let l;if(fM in e)l=c(hM(e),n);else if(Array.isArray(e))l=!i||e.length<=1?`[${e.map(e=>c(e,n)).join(`,`)}]`:`[\n${a(n+1)}${e.map(e=>c(e,n+1)).join(`,
711
- `+a(n+1))}\n${a(n)}]`;else if(e instanceof Date)l=SM(e);else if(!t?.ignoreToString&&Ej(e,`toString`)&&typeof e.toString==`function`&&e.toString!==Object.prototype.toString&&e.toString!==Array.prototype.toString){let t=CM(e);l=e instanceof Error&&e.cause?`${t} (cause: ${c(e.cause,n)})`:t}else if(Symbol.iterator in e)l=`${e.constructor.name}(${c(Array.from(e),n)})`;else{let t=s(e);if(!i||t.length<=1){let r=`{${t.map(t=>`${xM(t)}:${c(e[t],n)}`).join(`,`)}}`;l=o(e,r)}else{let r=`{\n${t.map(t=>`${a(n+1)}${xM(t)}: ${c(e[t],n+1)}`).join(`,
712
- `)}\n${a(n)}}`;l=o(e,r)}}return r.delete(e),l}return String(e)}return c(e,0)}var bM=`[Circular]`;function xM(e){return typeof e==`string`?JSON.stringify(e):String(e)}function SM(e){try{return e.toISOString()}catch{return`Invalid Date`}}function CM(e){try{let t=e.toString();return typeof t==`string`?t:String(t)}catch{return`[toString threw]`}}var wM=Symbol.for(`nodejs.util.inspect.custom`),TM=e=>{try{return e=mM(e),Ej(e,`toJSON`)&&Sj(e.toJSON)&&e.toJSON.length===0?e.toJSON():Array.isArray(e)?e.map(TM):e}catch{return`[toJSON threw]`}},EM=class e{called=!1;self;constructor(e){this.self=e}next(e){return this.called?{value:e,done:!0}:(this.called=!0,{value:this.self,done:!1})}[Symbol.iterator](){return new e(this.self)}},DM=(()=>{let e=`~effect/Utils/internal`,t={[e]:e=>e()},n={[e]:e=>{try{return e()}finally{}}};return t[e](()=>Error().stack)?.includes(e)===!0?t[e]:n[e]})(),OM=`~effect/Effect`,kM=`~effect/Exit`,AM={_A:dj,_E:dj,_R:dj},jM=`${OM}/identifier`,MM=`${OM}/args`,NM=`${OM}/evaluate`,PM=`${OM}/successCont`,FM=`${OM}/failureCont`,IM=`${OM}/ensureCont`,LM=Symbol.for(`effect/Effect/Yield`),RM={pipe(){return sj(this,arguments)},toJSON(){return{...this}},toString(){return yM(this.toJSON(),{ignoreToString:!0,space:2})},[wM](){return this.toJSON()}},zM={[OM]:AM,...RM,[Symbol.iterator](){return new EM(this)},toJSON(){return{_id:`Effect`,op:this[jM],...MM in this?{args:this[MM]}:void 0}}},BM=e=>Ej(e,kM),VM=`~effect/Cause`,HM=`~effect/Cause/Reason`,UM=e=>Ej(e,VM),WM=class{[VM];reasons;constructor(e){this[VM]=VM,this.reasons=e}pipe(){return sj(this,arguments)}toJSON(){return{_id:`Cause`,failures:this.reasons.map(e=>e.toJSON())}}toString(){return`Cause(${yM(this.reasons)})`}[wM](){return this.toJSON()}[Gj](e){return UM(e)&&this.reasons.length===e.reasons.length&&this.reasons.every((t,n)=>Kj(t,e.reasons[n]))}[Dj](){return Rj(this.reasons)}},GM=new WeakMap,KM=class{[HM];annotations;_tag;constructor(e,t,n){if(this[HM]=HM,this._tag=e,t!==qM&&typeof n==`object`&&n&&t.size>0){let e=GM.get(n);e&&(t=new Map([...e,...t])),GM.set(n,t)}this.annotations=t}annotate(e,t){if(e.mapUnsafe.size===0)return this;let n=new Map(this.annotations);e.mapUnsafe.forEach((e,r)=>{t?.overwrite!==!0&&n.has(r)||n.set(r,e)});let r=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return r.annotations=n,r}pipe(){return sj(this,arguments)}toString(){return yM(this)}[wM](){return this.toString()}},qM=new Map,JM=class extends KM{error;constructor(e,t=qM){super(`Fail`,t,e),this.error=e}toString(){return`Fail(${yM(this.error)})`}toJSON(){return{_tag:`Fail`,error:this.error}}[Gj](e){return eN(e)&&Kj(this.error,e.error)&&Kj(this.annotations,e.annotations)}[Dj](){return Aj(Pj(this._tag))(Aj(Oj(this.error))(Oj(this.annotations)))}},YM=e=>new WM(e),XM=e=>new WM([new JM(e)]),ZM=class extends KM{defect;constructor(e,t=qM){super(`Die`,t,e),this.defect=e}toString(){return`Die(${yM(this.defect)})`}toJSON(){return{_tag:`Die`,defect:this.defect}}[Gj](e){return tN(e)&&Kj(this.defect,e.defect)&&Kj(this.annotations,e.annotations)}[Dj](){return Aj(Pj(this._tag))(Aj(Oj(this.defect))(Oj(this.annotations)))}},QM=e=>new WM([new ZM(e)]),$M=uj(e=>UM(e[0]),(e,t,n)=>t.mapUnsafe.size===0?e:new WM(e.reasons.map(e=>e.annotate(t,n)))),eN=e=>e._tag===`Fail`,tN=e=>e._tag===`Die`,nN=e=>e._tag===`Interrupt`;function rN(e){return fN(`Effect.evaluate: Not implemented`)}var iN=e=>({...zM,[jM]:e.op,[NM]:e[NM]??rN,[PM]:e[PM],[FM]:e[FM],[IM]:e[IM]}),aN=e=>{let t=iN(e);return function(){let n=Object.create(t);return n[MM]=e.single===!1?arguments:arguments[0],n}},oN=e=>{let t={[kM]:kM,_tag:e.op,get[e.prop](){return this[MM]},...iN(e),toString(){return`${e.op}(${yM(this[MM])})`},toJSON(){return{_id:`Exit`,_tag:e.op,[e.prop]:this[MM]}},[Gj](e){return BM(e)&&e._tag===this._tag&&Kj(this[MM],e[MM])},[Dj](){return Aj(Pj(e.op),Oj(this[MM]))}};return function(e){let n=Object.create(t);return n[MM]=e,n}},sN=oN({op:`Success`,prop:`value`,[NM](e){let t=e.getCont(PM);return t?t[PM](this[MM],e,this):e.yieldWith(this)}}),cN={key:`effect/Cause/StackTrace`},lN={key:`effect/Cause/InterruptorStackTrace`},uN=oN({op:`Failure`,prop:`cause`,[NM](e){let t=this[MM],n=!1;e.currentStackFrame&&(t=$M(t,{mapUnsafe:new Map([[cN.key,e.currentStackFrame]])}),n=!0);let r=e.getCont(FM);for(;e.interruptible&&e._interruptedCause&&r;)r=e.getCont(FM);return r?r[FM](t,e,n?void 0:this):e.yieldWith(n?uN(t):this)}}),dN=e=>uN(XM(e)),fN=e=>uN(QM(e)),pN=aN({op:`WithFiber`,[NM](e){return this[MM](e)}}),mN=function(){class e extends globalThis.Error{}let t=iN({op:`YieldableError`,[NM](){return dN(this)}});return delete t.toString,Object.assign(e.prototype,t),e}(),hN=function(){let e=Symbol.for(`effect/Data/Error/plainArgs`);return class extends mN{constructor(t){super(t?.message,t?.cause?{cause:t.cause}:void 0),t&&(dM(this,t),Object.defineProperty(this,e,{value:t,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}(),gN=e=>{class t extends hN{_tag=e}return t.prototype.name=e,t},_N=`~effect/data/Option`,vN={[_N]:{_A:e=>e},...RM,[Symbol.iterator](){return new EM(this)}},yN=Object.defineProperty(Object.assign(Object.create(vN),{_tag:`Some`,_op:`Some`,[Gj](e){return SN(e)&&wN(e)&&Kj(this.value,e.value)},[Dj](){return Aj(Oj(this._tag))(Oj(this.value))},toString(){return`some(${yM(this.value)})`},toJSON(){return{_id:`Option`,_tag:this._tag,value:TM(this.value)}}}),"valueOrUndefined",{get(){return this.value}}),bN=Oj(`None`),xN=Object.assign(Object.create(vN),{_tag:`None`,_op:`None`,valueOrUndefined:void 0,[Gj](e){return SN(e)&&CN(e)},[Dj](){return bN},toString(){return`none()`},toJSON(){return{_id:`Option`,_tag:this._tag}}}),SN=e=>Ej(e,_N),CN=e=>e._tag===`None`,wN=e=>e._tag===`Some`,TN=Object.create(xN),EN=e=>{let t=Object.create(yN);return t.value=e,t},DN=`~effect/data/Result`;({...RM});var ON=()=>TN,kN=EN,AN=CN,jN=uj(2,(e,t)=>AN(e)?t():e.value),MN=jN(fj),NN=uj(2,(e,t)=>AN(e)?ON():kN(t(e.value))),PN=globalThis.Array,FN=e=>PN.isArray(e)?e:PN.from(e),IN=uj(2,(e,t)=>[...e,t]),LN=uj(2,(e,t)=>FN(e).concat(FN(t)));PN.isArray;var RN=lM,zN=lM,BN=(e,t)=>{let n=Oj(t),r=e.get(n);if(r===void 0)return e.set(n,[t]),!0;for(let e of r)if(Kj(e,t))return!1;return r.push(t),!0},VN=uj(2,(e,t)=>{let n=FN(e),r=FN(t);return zN(n)?zN(r)?WN(LN(n,r)):n:r}),HN=()=>[],UN=uj(2,(e,t)=>e.map(t)),WN=e=>{let t=FN(e);if(t.length<2)return[...t];let n=new Map,r=[];for(let e of t)BN(n,e)&&r.push(e);return r},GN=`~effect/BigDecimal`,KN={[GN]:GN,[Dj](){let e=$N(this);return Aj(Oj(e.value),Nj(e.scale))},[Gj](e){return qN(e)&&rP(this,e)},toString(){return`BigDecimal(${iP(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[wM](){return this.toJSON()},pipe(){return sj(this,arguments)}},qN=e=>Ej(e,GN),JN=(e,t)=>{let n=Object.create(KN);return n.value=e,n.scale=t,n},YN=(e,t)=>{if(e!==XN&&e%ZN===XN)throw RangeError(`Value must be normalized`);let n=JN(e,t);return n.normalized=n,n},XN=BigInt(0),ZN=BigInt(10),QN=YN(XN,0),$N=e=>{if(e.normalized===void 0){if(e.value===XN)e.normalized=QN;else{let t=`${e.value}`,n=0;for(let e=t.length-1;e>=0&&t[e]===`0`;e--)n++;n===0&&(e.normalized=e),e.normalized=YN(BigInt(t.substring(0,t.length-n)),e.scale-n)}}return e.normalized},eP=uj(2,(e,t)=>t>e.scale?JN(e.value*ZN**BigInt(t-e.scale),t):t<e.scale?JN(e.value/ZN**BigInt(e.scale-t),t):e),tP=e=>e.value<XN?JN(-e.value,e.scale):e,nP=cM((e,t)=>e.scale>t.scale?eP(t,e.scale).value===e.value:e.scale<t.scale?eP(e,t.scale).value===t.value:e.value===t.value),rP=uj(2,(e,t)=>nP(e,t)),iP=e=>{let t=$N(e);if(Math.abs(t.scale)>=16)return aP(t);let n=t.value<XN,r=n?`${t.value}`.substring(1):`${t.value}`,i,a;if(t.scale>=r.length)i=`0`,a=`0`.repeat(t.scale-r.length)+r;else{let e=r.length-t.scale;if(e>r.length){let t=e-r.length;i=`${r}${`0`.repeat(t)}`,a=``}else a=r.slice(e),i=r.slice(0,e)}let o=a===``?i:`${i}.${a}`;return n?`-${o}`:o},aP=e=>{if(oP(e))return`0e+0`;let t=$N(e),n=`${tP(t).value}`,r=n.slice(0,1),i=n.slice(1),a=`${sP(t)?`-`:``}${r}`;i!==``&&(a+=`.${i}`);let o=i.length-t.scale;return`${a}e${o>=0?`+`:``}${o}`},oP=e=>e.value===XN,sP=e=>e.value<XN,cP=e=>iN({op:e.label,[NM]:e.evaluate}),lP=`~effect/Context/Service`,uP=function(){function e(){}let t=e;Object.setPrototypeOf(t,dP);let n=(e,n)=>(t.key=e,n?.defaultValue&&(t[pP]=pP,t.defaultValue=n.defaultValue),n?.make&&(t.make=n.make),n?.fiberCached&&fP.add(e),t);return arguments.length>0?n(arguments[0],arguments[1]):n},dP={[lP]:lP,...cP({label:`Service`,evaluate(e){return sN(NP(e.context,this))}}),toJSON(){return{_id:`Service`,key:this.key}},of(e){return e},context(e){return kP(this,e)},use(e){return pN(t=>e(NP(t.context,this)))},useSync(e){return pN(t=>sN(e(NP(t.context,this))))}},fP=new Set,pP=`~effect/Context/Reference`,mP=`~effect/Context`,hP=8,gP=8,_P=(e,t,n,r)=>{let i=Object.create(CP);return i.cacheRoot=e??i,i.base=t,i.overlay=n,i.depth=r,i._flat=void 0,i.baseHits=0,i},vP=(e,t)=>{t&&(vP(e,t.parent),e.set(t.key,t.value))},yP=e=>{if(e._flat)return e._flat;if(!e.overlay)return e._flat=e.base;let t=new Map(e.base);return vP(t,e.overlay),e._flat=t},bP=Symbol(),xP=(e,t)=>{let n=e;for(let e=n.overlay;e;e=e.parent)if(e.key===t)return e.value;let r=n.base.get(t);return r===void 0&&!n.base.has(t)?bP:(n.overlay&&++n.baseHits>=gP&&(n.base=yP(n),n.overlay=void 0,n.depth=0),r)},SP=e=>_P(void 0,e,void 0,0),CP={get mapUnsafe(){return yP(this)},...RM,[mP]:{_Services:e=>e},toJSON(){return{_id:`Context`,services:Array.from(this.mapUnsafe).map(([e,t])=>({key:e,value:t}))}},[Gj](e){if(!TP(e))return!1;let t=this.mapUnsafe,n=e.mapUnsafe;if(t.size!==n.size)return!1;for(let[e,r]of t)if(!n.has(e)||!Kj(r,n.get(e)))return!1;return!0},[Dj](){return Nj(this.mapUnsafe.size)}},wP=(e,t)=>e.cacheRoot===t.cacheRoot,TP=e=>Ej(e,mP),EP=e=>!!e[pP],DP=()=>OP,OP=SP(new Map),kP=(e,t)=>SP(new Map([[e.key,t]])),AP=uj(3,(e,t,n)=>jP(e,t.key,n)),jP=(e,t,n)=>{let r=e,i=fP.has(t)?void 0:r.cacheRoot;if(r.depth>=hP){let e=new Map(r.mapUnsafe);return e.set(t,n),_P(i,e,void 0,0)}return _P(i,r.base,{key:t,value:n,parent:r.overlay},r.depth+1)},MP=(e,t)=>{let n=xP(e,t);return n===bP?void 0:n},NP=uj(2,(e,t)=>{let n=xP(e,t.key);if(n===bP){if(EP(t))return FP(t);throw IP(t)}return n}),PP=`~effect/Context/defaultValue`,FP=e=>PP in e?e[PP]:e[PP]=e.defaultValue(),IP=e=>{let t=Error(`Service not found${e.key?`: ${String(e.key)}`:``}`);if(t.stack){let e=t.stack.split(`
713
- `);e.splice(1,3),t.stack=e.join(`
714
- `)}return t},LP=uP,RP=LP(`effect/Scheduler`,{fiberCached:!0,defaultValue:()=>new HP}),zP=`setImmediate`in globalThis?e=>{let t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{let t=setTimeout(e,0);return()=>clearTimeout(t)},BP=e=>{let t=!1;return Promise.resolve().then(()=>{t||e()}),()=>{t=!0}},VP=class{buckets=[];scheduleTask(e,t){let n=this.buckets,r=n.length,i,a=0;for(;a<r&&!(n[a][0]>t);a++)i=n[a];i&&i[0]===t?i[1].push(e):a===r?n.push([t,[e]]):n.splice(a,0,[t,[e]])}drain(){let e=this.buckets;return this.buckets=[],e}},HP=class{executionMode;setImmediate;constructor(e=`async`,t){this.executionMode=e,this.setImmediate=t??(e===`sync`?BP:zP)}shouldYield(e){return e.currentOpCount>=e.maxOpsBeforeYield}makeDispatcher(){return new UP(this.setImmediate)}},UP=class{tasks=new VP;running=void 0;setImmediate;constructor(e=zP){this.setImmediate=e}scheduleTask(e,t){this.tasks.scheduleTask(e,t),this.running===void 0&&(this.running=this.setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=void 0,this.runTasks()};runTasks(){let e=this.tasks.drain();for(let t=0;t<e.length;t++){let n=e[t][1];for(let e=0;e<n.length;e++)n[e]()}}flush(){for(;this.tasks.buckets.length>0;)this.running!==void 0&&(this.running(),this.running=void 0),this.runTasks()}},WP=LP(`effect/Scheduler/MaxOpsBeforeYield`,{fiberCached:!0,defaultValue:()=>2048}),GP=LP(`effect/Scheduler/PreventSchedulerYield`,{fiberCached:!0,defaultValue:()=>!1}),KP=class extends lj{constructor(e){super(),e&&dM(this,e)}},qP=e=>class extends KP{_tag=e},JP=[];for(let e=0;e<256;e++)JP.push(e.toString(16).padStart(2,`0`));var YP=`effect/Tracer/ParentSpan`,XP=`effect/Tracer`,ZP=`effect/observability/Metric/FiberRuntimeMetricsKey`,QP=LP(`effect/References/CurrentStackFrame`,{fiberCached:!0,defaultValue:fj}),$P=LP(`effect/References/CurrentLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),eF=LP(`effect/References/MinimumLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),tF=class extends KM{fiberId;constructor(e,t=qM){super(`Interrupt`,t,`Interrupted`),this.fiberId=e}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:`Interrupt`,fiberId:this.fiberId}}[Gj](e){return nN(e)&&this.fiberId===e.fiberId&&this.annotations===e.annotations}[Dj](){return Aj(Pj(`${this._tag}:${this.fiberId}`))(kj(this.annotations))}},nF=e=>new WM([new tF(e)]),rF=e=>e.reasons.some(nN),iF=uj(2,(e,t)=>{if(e.reasons.length===0)return t;if(t.reasons.length===0)return e;let n=new WM(VN(e.reasons,t.reasons));return Kj(e,n)?e:n}),aF=uj(2,(e,t)=>{let n=!1,r=e.reasons.map(e=>eN(e)?(n=!0,new JM(t(e.error),e.annotations)):e);return n?YM(r):e}),oF=`~effect/Fiber`,sF={_A:dj,_E:dj},cF={id:0},lF=()=>globalThis[gM],uF=class{constructor(e,t=!0){this[oF]=sF,this.setContext(e),this.id=++cF.id,this.currentOpCount=0,this.interruptible=t,this._stack=[],this._observers=[],this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this._running=!1,this._deferredInterrupt=!1,this.runtimeMetrics?.recordFiberStart(this.context)}[oF];id;interruptible;currentOpCount;_stack;_observers;_exit;_children;_interruptedCause;_yielded;_running;_deferredInterrupt;context;currentScheduler;currentTracerContext;currentSpan;currentLogLevel;minimumLogLevel;currentStackFrame;runtimeMetrics;maxOpsBeforeYield;currentPreventYield;_dispatcher=void 0;get currentDispatcher(){return this._dispatcher??=this.currentScheduler.makeDispatcher()}getRef(e){return NP(this.context,e)}addObserver(e){return this._exit?(e(this._exit),pj):(this._observers.push(e),()=>{if(this._exit)return;let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)})}interruptUnsafe(e,t){if(this._exit)return;let n=nF(e);this.currentStackFrame&&(n=$M(n,kP(cN,this.currentStackFrame))),t&&(n=$M(n,t)),this._interruptedCause=this._interruptedCause?iF(this._interruptedCause,n):n,this.interruptible&&(this._running?this._deferredInterrupt=!0:this.evaluate(_F(this._interruptedCause)))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===LM)return;let n=fF.interruptChildren&&fF.interruptChildren(this);if(n!==void 0)return this.evaluate(FF(n,()=>t));this._exit=t,this.runtimeMetrics?.recordFiberEnd(this.context,this._exit);for(let e=0;e<this._observers.length;e++)this._observers[e](t);this._observers.length=0,this._stack.length=0,this._children=void 0,this.context=DP()}runLoop(e){let t=globalThis[gM];globalThis[gM]=this;let n=this._running;this._running=!0;let r=!1,i=e;this.currentOpCount=0;try{for(;;){if(this._deferredInterrupt&&(this._deferredInterrupt=!1,i=_F(this._interruptedCause)),this.currentOpCount++,!r&&!this.currentPreventYield&&this.currentScheduler.shouldYield(this)){r=!0;let e=i;i=FF(xF,()=>e)}if(i=this.currentTracerContext?this.currentTracerContext(i,this):i[NM](this),i===LM){let e=this._yielded;if(kM in e)return this._deferredInterrupt=!1,this._yielded=void 0,e;if(this._deferredInterrupt){this._yielded=void 0,e();continue}return LM}}}catch(e){return Ej(i,NM)?this.runLoop(fN(e)):fN(`Fiber.runLoop: Not a valid effect: ${String(i)}`)}finally{this._running=n,globalThis[gM]=t}}getCont(e){if(this._deferredInterrupt)return this._deferredInterrupt=!1,dF;for(;;){let t=this._stack.pop();if(!t)return;let n=t[IM]&&t[IM](this);if(n)return n[e]=n,n;if(t[e])return t}}yieldWith(e){return this._yielded=e,LM}children(){return this._children??=new Set}pipe(){return sj(this,arguments)}setContext(e){let t=this.context;if(this.context=e,t!==void 0&&wP(t,e))return;let n=this.getRef(RP);n!==this.currentScheduler&&(this.currentScheduler=n,this._dispatcher=void 0),this.currentSpan=MP(e,YP),this.currentLogLevel=this.getRef($P),this.minimumLogLevel=this.getRef(eF),this.currentStackFrame=this.getRef(QP),this.maxOpsBeforeYield=this.getRef(WP),this.currentPreventYield=this.getRef(GP),this.runtimeMetrics=MP(e,ZP);let r=MP(e,XP);this.currentTracerContext=r?r.context:void 0}get currentSpanLocal(){return this.currentSpan?._tag===`Span`?this.currentSpan:void 0}},dF={[PM](e,t){return _F(t._interruptedCause)},[FM](e,t){return _F(t._interruptedCause)}},fF={interruptChildren:void 0},pF=e=>{if(!e.currentStackFrame)return;let t=new Map;return t.set(lN.key,e.currentStackFrame),SP(t)},mF=e=>kF(t=>{let n=e[Symbol.iterator](),r=[],i;function a(){let e=n.next();for(;!e.done;){if(e.value._exit){r.push(e.value._exit),e=n.next();continue}i=e.value.addObserver(e=>{r.push(e),a()});return}t(gF(r))}return a(),yF(()=>i?.())}),hF=e=>pN(t=>{let n=pF(t),r=HN();for(let i of e)i.interruptUnsafe(t.id,n),r.push(i);return PF(mF(r))}),gF=sN,_F=uN,vF=dN,yF=aN({op:`Sync`,[NM](e){let t=this[MM](),n=e.getCont(PM);return n?n[PM](t,e):e.yieldWith(sN(t))}}),bF=aN({op:`Suspend`,[NM](e){return this[MM]()}}),xF=aN({op:`Yield`,[NM](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(HF)},this[MM]??0),e.yieldWith(()=>{t=!0})}})(0),SF=gF(ON()),CF=e=>bF(()=>_F(DM(e))),wF=e=>fN(e),TF=gF(void 0),EF=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new iI(e,`An error occurred in Effect.try`):e.catch;return bF(()=>{try{return gF(DM(t))}catch(e){return vF(DM(()=>n(e)))}})},DF=aN({op:`Async`,single:!1,[NM](e){let t=DM(()=>this[MM][0].bind(e.currentScheduler)),n=!1,r=!1,i=this[MM][1]?new AbortController:void 0,a=t(t=>{n||(n=!0,r?e.evaluate(t):r=t)},i?.signal);return r===!1?(r=!0,e._yielded=()=>{n=!0},i===void 0&&a===void 0||e._stack.push(OF(()=>(n=!0,i?.abort(),a??HF))),LM):r}}),OF=aN({op:`AsyncFinalizer`,[IM](e){e.interruptible&&(e.interruptible=!1,e._stack.push(YF))},[FM](e,t){return rF(e)?FF(this[MM](),()=>_F(e)):_F(e)}}),kF=e=>DF(e,e.length>=2),AF=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),jF=(e,...t)=>AF(e.length,t.length===0?function(){return MF(()=>e.apply(this,arguments))}:function(){let n=MF(()=>e.apply(this,arguments));for(let e of t)n=e(n);return n}),MF=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return gF(r.value);let i=r.value;if(i&&i._tag===`Success`){n=i.value;continue}if(i&&i._tag===`Failure`)return r.value;{let n=!0;return bF(()=>n?(n=!1,FF(r.value,e=>NF(t,e))):bF(()=>NF(e())))}}}catch(e){return wF(e)}},NF=aN({op:`Iterator`,single:!1,[PM](e,t){let n=this[MM][0];for(;;){let r=n.next(e);if(r.done)return gF(r.value);if(!LF(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[NM](e){return this[PM](this[MM][1],e)}}),PF=e=>FF(e,e=>HF),FF=uj(2,(e,t)=>{let n=Object.create(IF);return n[MM]=e,n[PM]=t.length===1?t:e=>t(e),n}),IF=iN({op:`OnSuccess`,[NM](e){return e._stack.push(this),this[MM]}}),LF=e=>kM in e,RF=uj(2,(e,t)=>LF(e)?e._tag===`Success`?t(e.value):e:FF(e,t)),zF=uj(2,(e,t)=>FF(e,e=>gF(DM(()=>t(e))))),BF=uj(2,(e,t)=>LF(e)?UF(e,t):zF(e,t)),VF=e=>e._tag===`Success`,HF=sN(void 0),UF=uj(2,(e,t)=>e._tag===`Success`?sN(t(e.value)):e),WF=uj(2,(e,t)=>{let n=Object.create(GF);return n[MM]=e,n[FM]=t.length===1?t:e=>t(e),n}),GF=iN({op:`OnFailure`,[NM](e){return e._stack.push(this),this[MM]}}),KF=e=>LF(e)?sN(e):qF(e),qF=aN({op:`Exit`,[NM](e){return e._stack.push(this),this[MM]},[PM](e,t,n){return gF(n??sN(e))},[FM](e,t,n){return gF(n??uN(e))}}),JF=e=>pN(t=>t.interruptible?(t.interruptible=!1,t._stack.push(YF),e):e),YF=aN({op:`SetInterruptible`,[IM](e){if(e.interruptible=this[MM],e._interruptedCause&&e.interruptible)return()=>_F(e._interruptedCause)}})(!0),XF=e=>{let t=e.onItem,n=e.step,r=(e,i,a,o)=>{for(;a<o;a++){let s=i[a],c=t(e,s,a);if(!LF(c))return FF(KF(c),t=>n(e,s,t,a)??r(e,i,a+1,o)??TF);let l=n(e,s,c,a);if(l)return l._tag===`Failure`?l:void 0}};return(e,i,a)=>{let o=0,s=a?.end??i.length,c=a?.concurrency??1;if(c===1)return r(e,i,0,s);let l=a?.orderedStep===!0,u=!1,d,f,p,m=!1,h,g,_=o,v=l?Array(s):void 0,y=e=>{let t=fN(e);return h=t,u=!0,m=!0,f&&f.size>0?FF(JF(hF(Array.from(f))),()=>t):t},b=(t,r,a)=>{if(!l)return n(e,t,r,a);if(h)return h;for(v[a]=r;_<s;){let t=v[_];if(t===void 0)return;v[_]=void 0;let r=_++,a=n(e,i[r],t,r);if(a)return a}},x=()=>{let n=!1;for(;!h&&o<s;o++){let r=i[o],a=g??t(e,r,o);if(LF(a)){if(h=b(r,a,o),h)break}else if(d){g=void 0;let e=QF(d,a,!0,!0,`inherit`);if(e._exit){if(h=b(r,e._exit,o),h)break;continue}f.add(e);let t=o;if(e.addObserver(i=>{f.delete(e);try{if(h){if(!m&&i._tag===`Failure`)for(let e of i.cause.reasons)if(e._tag===`Interrupt`)continue;else h._tag===`Failure`?h.cause.reasons.push(e):h=uN(YM([e]))}else{let e=b(r,i,t);e&&(h=e._tag===`Failure`?uN(YM(e.cause.reasons.slice())):e,x())}if(n){let e=x();e&&p(e)}else u&&f.size===0&&p(h??TF)}catch(e){p(y(e))}}),f.size<c)continue;n=!0,o++;return}else return kF(e=>{d=lF(),f=new Set,g=a,p=e;let t;try{t=x()}catch(t){return e(y(t))}return t?e(t):bF(()=>(h=HF,m=!0,f?hF(f):TF))})}if(u=!0,h){if(f&&f.size>0){let e=pF(d);f.forEach(t=>t.interruptUnsafe(d.id,e));return}if(p||h._tag===`Failure`)return h}else if(p){if(f)f.size===0&&p(TF);else return HF}};return x()}},ZF=()=>XF,QF=(e,t,n=!1,r=!1,i=!1)=>{let a=e,o=i===`inherit`?a.interruptible:!i,s=new uF(a.context,o);return n?s.evaluate(t):a.currentDispatcher.scheduleTask(()=>s.evaluate(t),0),!r&&!s._exit&&(a.children().add(s),s.addObserver(()=>a._children.delete(s))),s},$F=e=>(t,n)=>{let r=new uF(n?.scheduler?AP(e,RP,n.scheduler):e,n?.uninterruptible!==!0);if(r.evaluate(t),r._exit)return r;if(n?.signal){if(n.signal.aborted)r.interruptUnsafe();else{let e=()=>r.interruptUnsafe();n.signal.addEventListener(`abort`,e,{once:!0}),r.addObserver(()=>n.signal.removeEventListener(`abort`,e))}}return n?.onFiberStart&&n.onFiberStart(r),r},eI=(e=>{let t=$F(e);return e=>{if(LF(e))return e;let n=new HP(`sync`),r=t(e,{scheduler:n});return r._dispatcher?.flush(),r._exit??fN(new nI(r))}})(DP()),tI=`~effect/Cause/AsyncFiberError`,nI=class extends gN(`AsyncFiberError`){[tI]=tI;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},rI=`~effect/Cause/UnknownError`,iI=class extends gN(`UnknownError`){[rI]=rI;constructor(e,t){super({message:t,cause:e})}},aI={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};aI.gray,aI.blue,aI.green,aI.yellow,aI.red,aI.bgBrightRed,aI.black;var oI=eN,sI=aF,cI=sN,lI=uN,uI=dN,dI=HF,fI=VF,pI=`~effect/time/DateTime`,mI=`~effect/time/DateTime/TimeZone`,hI={[pI]:pI,pipe(){return sj(this,arguments)},[wM](){return this.toString()},toJSON(){return _I(this).toJSON()}};({...hI}),{...hI};var gI={[mI]:mI,[wM](){return this.toString()}};({...gI}),{...gI};var _I=e=>new Date(e.epochMilliseconds),vI=gF,yI=SF,bI=vF,xI=CF,SI=wF,CI=EF,wI=FF,TI=KF,EI=WF,DI=eI,OI=BF,kI=RF,AI=jF,jI=`~sentinels`,MI=`~constructor`,NI=Symbol(),PI=cI,FI=PI(NI),II=PI(NI),LI=e=>e===NI?ON():kN(e),RI=e=>e._tag===`None`?FI:PI(e.value),zI=`~effect/SchemaIssue/Issue`;function BI(e){return Ej(e,zI)&&e[zI]===zI}var VI=class{[zI]=zI;constructor(e,t){t?.reportInput===!0&&e!==NI&&(this.input=e)}},HI=class extends VI{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},UI=class extends VI{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},WI=class extends VI{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},GI=class extends VI{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},KI=class extends VI{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},qI=class extends VI{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},JI=class extends VI{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},YI=class extends VI{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},XI=class extends VI{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},ZI=class extends VI{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function QI(e,t,n){if(BI(e))return e;if(typeof e==`string`)return new YI({message:e},t,n);let r=typeof e.issue==`string`?new YI({message:e.issue},t,n):e.issue;return new WI(e.path,r)}function $I(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new YI(void 0,t,n):QI(e,t,n)}function eL(e,t,n,r){return Array.isArray(t)?zN(t)?t.length===1?QI(t[0],n,r):new qI(e,UN(t,e=>QI(e,n,r)),n,r):void 0:$I(t,n,r)}function tL(e){let t;for(let n of e.reasons){if(!oI(n)||!BI(n.error))return;t??=n.error}return t}function nL(e,t){let n=tL(e);if(n===void 0)throw Error(t,{cause:e});return n}var rL=class e extends lj{run;constructor(e){super(),this.run=e}map(t){return new e((e,n)=>this.run(e,n).pipe(OI(NN(t))))}compose(t){return aL(this)?t:aL(t)?this:new e((e,n)=>this.run(e,n).pipe(kI(e=>t.run(e,n))))}},iL=new rL(vI);function aL(e){return e.run===iL.run}function oL(){return iL}function sL(e){return new rL((t,n)=>AN(t)?yI:e(t.value,n))}function cL(e){return lL(NN(e))}function lL(e){return new rL(t=>vI(e(t)))}function uL(){return cL(globalThis.String)}function dL(){return cL(globalThis.Number)}function fL(e){return sL((t,n)=>CI({try:()=>kN(JSON.parse(t,e?.reviver)),catch:()=>new YI({expected:`a valid JSON string`},t,n)}))}function pL(e){return sL((t,n)=>CI({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return kN(n)},catch:()=>new YI({expected:`a JSON-serializable value`},t,n)}))}var mL=`~effect/SchemaTransformation/Transformation`,hL=class e{[mL]=mL;_tag=`Transformation`;decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}compose(t){return new e(this.decode.compose(t.decode),t.encode.compose(this.encode))}};function gL(e){return Ej(e,mL)&&e[mL]===mL}var _L=e=>gL(e)?e:new hL(e.decode,e.encode),vL=new hL(oL(),oL());function yL(){return vL}var bL=new hL(dL(),uL());function xL(e){return new hL(fL(e??{}),pL(e))}function SL(e){return t=>t._tag===e}var CL=SL(`Declaration`),wL=SL(`Never`),TL=SL(`Literal`),EL=SL(`UniqueSymbol`),DL=SL(`Arrays`),OL=SL(`Objects`),kL=SL(`Suspend`),AL=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},jL={},ML=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},NL=`~effect/Schema`,PL=class{[NL]=NL;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},FL=new class extends PL{_tag=`Unknown`;getParser(){return KR(this,wj)}getExpected(){return`unknown`}},IL=class extends PL{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${yM(e)}`);this.literal=e}getParser(){return GR(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?LL(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:LL(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function LL(e){let t=globalThis.String(e.literal);return CR(e,[new AL(new IL(t),new hL(cL(()=>e.literal),cL(()=>t)))])}var RL=new class extends PL{_tag=`String`;getParser(){return KR(this,vj)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&ez(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},zL=class extends PL{_tag=`Number`;getParser(){return KR(this,yj)}matchKey(e,t){return this._match(YR,e,t)}matchPart(e,t){return this._match(JR,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:ez(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(BL(this.checks,`effect/schema/isFinite`)||BL(this.checks,`effect/schema/isInt`))?this:CR(this,[vR])}toCodecStringTree(){return this.toCodecJson()===this?CR(this,[QR]):CR(this,[$R])}getExpected(){return`number`}};function BL(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&BL(e.checks,t))}var VL=new zL,HL=e=>(e=e===`unbounded`?1/0:e??1,e>1?{concurrency:e}:void 0),UL=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=tL(r.cause);if(i===void 0)return lI(sI(r.cause,r=>new qI(t,[new WI([n],r)],e.input,e.options)));let a=new WI([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return uI(new qI(t,[a],e.input,e.options))},WL=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function GL(e,t,n=jL){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(qR(VR(t)))}var KL=class{name;type;constructor(e,t){this.name=e,this.type=t}};function qL(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(qL);default:return!1}}function JL(e){return qL(e)&&qL(VR(e))}var YL=class{parameter;type;constructor(e,t){if(!JL(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,LR(t)&&!WR(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},XL=class e extends PL{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o;let s=e.map(e=>e.name).filter((e,t,n)=>n.indexOf(e)!==t);if(s.length>0)throw Error(`Duplicate identifiers: ${JSON.stringify(s)}. ts(2300)`)}getParser(e,t=e){let n=this,r=[];for(let e of n.propertySignatures)r.push(e.name);let i=r.length,a=n.indexSignatures.length,o=i&&a?new Set(r):void 0;if(!i&&!a)return KR(n,Cj);let s,c,l=(e,t,r,a,s)=>{if(s._tag===`Failure`)return UL(e,n,t,s)??dI;let c=s===II?a:s[MM];if(r!==NI&&c!==NI){if(i&&(o.has(t)||o.has(r)))return dI;uM(e.out,r,c)}return dI},u=(e,t,r,i)=>{if(!i){let n=r.parserKey(t,e.options);if(!LF(n))return wI(TI(n),n=>u(e,t,r,n));i=n}if(i._tag===`Failure`)return UL(e,n,t,i)??dI;let a=i===II?t:i[MM],o=e.input[t],s=r.parserValue(o,e.options);return LF(s)?l(e,t,a,o,s):wI(TI(s),n=>l(e,t,a,o,n))},d=(e,t,n)=>{let r=e.input[t],i=n.parserValue(r,e.options);return LF(i)?l(e,t,t,r,i):wI(TI(i),n=>l(e,t,t,r,n))},f=a?ZF()({onItem:(e,[t,n])=>u(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0,p=()=>(s||(s=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),c=a?n.indexSignatures.map(n=>({is:n,parserKey:e(qR(n.parameter)),parserValue:t(n.type)})):void 0),s),m=AI(function*(e,t){if(e===NI)return NI;if(typeof e!=`object`||!e||Array.isArray(e))return yield*bI(new JI(n,e,t));p();let l=e,m={},h={ast:n,input:l,out:m,issues:void 0,options:t},g=t.errors===`all`,_=t.onExcessProperty===`error`,v=t.onExcessProperty===`preserve`,y;if(!a&&(_||v)){o??=new Set(r),y=Reflect.ownKeys(l);for(let r=0;r<y.length;r++){let i=y[r];if(!o.has(i)){if(_){let r=new KI(n,l[i],t),a=new WI([i],r);if(g){h.issues?h.issues.push(a):h.issues=[a];continue}return yield*bI(new qI(n,[a],e,t))}uM(m,i,l[i])}}}let b=HL(t?.concurrency);if(i){let e=QL(h,s,b);e&&(yield*e)}if(a&&!b)for(let e=0;e<a;e++){let n=c[e],r=n.is.parameter===RL?d:u,i=n.is.parameter===RL?Object.keys(l):GL(l,n.is.parameter,t);for(let e=0;e<i.length;e++){let t=r(h,i[e],n);if(!LF(t))yield*t;else if(t._tag===`Failure`)return yield*t}}else if(f){let e=HN();for(let n=0;n<a;n++){let r=c[n],i=GL(l,r.is.parameter,t);for(let t=0;t<i.length;t++)e.push([i[t],r])}let n=f(h,e,b);n&&(yield*n)}if(h.issues)return yield*bI(new qI(n,h.issues,e,t));if(t.propertyOrder===`original`){let e=(y??Reflect.ownKeys(l)).concat(r),t={};for(let n of e)Object.hasOwn(m,n)&&uM(t,n,m[n]);return t}return m});if(a)return m;let h=(e,t,n)=>{let r=s[t];return wI(TI(n),n=>{let i=ZL(e,r,n);if(i)return i;let a=()=>PI(e.out),o=QL(e,s.slice(t+1));return o?kI(o,a):a()})};return(e,t)=>{if(e===NI)return FI;if(t.errors===`all`||t.onExcessProperty!==void 0||t.propertyOrder===`original`||t.concurrency!==void 0)return m(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return bI(new JI(n,e,t));let r=p(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=Object.hasOwn(i,s),l=c?i[s]:NI,u=n.parser(l,t);if(!LF(u))return h(o,e,u);if(u===II){c&&uM(a,s,l);continue}let d=ZL(o,n,u);if(d)return d}}catch(e){return SI(e)}return PI(a)}}_rebuild(t,n,r,i){let a=MR(this.propertySignatures,e=>{let n=t(e.type);return n===e.type?e:new KL(e.name,n)}),o=MR(this.indexSignatures,e=>{let r=n(e.parameter),i=t(e.type);return r===e.parameter&&i===e.type?e:new YL(r,i)});return a===this.propertySignatures&&o===this.indexSignatures&&r===this.checks&&i===this.encodingChecks?this:new e(a,o,this.annotations,r,void 0,this.context,i)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function ZL(e,t,n){if(n._tag===`Failure`)return UL(e,e.ast,t.name,n);if(n===II)return;let r=n[MM];if(r!==NI){uM(e.out,t.name,r);return}if(delete e.out[t.name],!LR(t.type)){let n=new WI([t.name],new GI(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return uI(new qI(e.ast,[n],e.input,e.options))}}var QL=ZF()({onItem(e,t){if(!Object.hasOwn(e.input,t.name))return t.parser(NI,e.options);let n=e.input[t.name];return uM(e.out,t.name,n),t.parser(n,e.options)},step:ZL});function $L(e,t){return e?t?[...e,...t]:e:t}var eR=hj(e=>{for(;;){if(kL(e))return FL;let t=e.encoding;if(!t)return e.recur?.(eR,dj)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==dj))return FL;e=t[t.length-1].to}});function tR(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(tR)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function nR(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[jI];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!LR(t)){if(TL(t))return[{key:e.name,literal:t.literal}];if(EL(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!LR(e)){if(TL(e))return[{key:t,literal:e.literal}];if(EL(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>nR(eR(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return nR(e.thunk())}}var rR=new WeakMap,iR=Object.freeze([]);function aR(e){let t=rR.get(e);if(t)return t;let n,r=0,i,a,o=!0;for(let t=0;t<e.length;t++){let s=e[t],c=eR(s);if(wL(c))continue;if(o){if(TL(c)||EL(c)){a??=new Map;let e=TL(c)?c.literal:c.symbol,t=a.get(e);t||a.set(e,t=[]),t.push(s)}else o=!1}let l=nR(c);if(l.length){n??=new Map,r++;for(let{key:e,literal:r}of l){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=tR(c);for(let n of e)(i[n]??=[]).push(t)}}if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??iR;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=i;for(let[t,n]of i)a.set(t,Object.freeze(Array.from(n,t=>e[t])));t=(t,n)=>{if(Tj(t)){let i=Object.hasOwn(t,r)?t[r]:void 0;if(i!==void 0)return a.get(i)??iR;if(n)return e}return iR}}else if(n){let a;for(let e of n)(!a||e[1][0].size>a[1][0].size)&&e[1][1].size===r&&(a=e);t=(t,r)=>{let o=i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??iR;if(!Tj(t))return o.map(t=>e[t]);let s=new Set(o),c;if(a){let[n,[i]]=a,l=Object.hasOwn(t,n),u=l?t[n]:void 0;if(l&&(!r||u!==void 0)){let t=i.get(u);if(!t)return o.map(t=>e[t]);for(let e of t)s.add(e);c=n}}if(c===void 0)for(let[e,[i,a]]of n){let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);if(e)for(let t of e)s.add(t)}else if(r)for(let e of a)s.add(e)}for(let[e,[i,a]]of n){if(e===c)continue;let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);for(let t of s)a.has(t)&&!e?.has(t)&&s.delete(t)}}return Array.from(s).sort((e,t)=>e-t).map(t=>e[t])}}else t=t=>(i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??iR).map(t=>e[t]).filter(oR(t));return rR.set(e,t),t}function oR(e){return t=>{let n=eR(t);return n._tag===`Literal`?n.literal===e:n._tag!==`UniqueSymbol`||n.symbol===e}}function sR(e,t,n=!1){return aR(t)(e,n)}var cR=class e extends PL{_tag=`Union`;types;mode;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.mode=t,this.encodingChecks=o}getParser(e,t){let n=this;return(r,i)=>{if(r===NI)return FI;let a=sR(r,n.types,t!==void 0);if(a.length===1){let t=e(a[0])(r,i);return t._tag===`Success`?t:LF(t)?lR(n,t.cause,r,i):EI(t,e=>lR(n,e,r,i))}let o={ast:n,compile:e,input:r,out:void 0,successes:n.mode===`oneOf`?[]:void 0,issues:void 0,options:i},s=HL(i?.concurrency),c=uR(o,a,s?{...s,orderedStep:!0}:void 0);return c?kI(c,e=>o.out===II?vI(r):o.out?o.out:bI(new XI(n,o.issues??[],r,i))):o.out?o.out:bI(new XI(n,o.issues??[],r,i))}}_rebuild(t,n,r){let i=MR(this.types,t);return i===this.types&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.mode,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=VR(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(TL);if(t.length>0)return`${fR(n.isMutable)}[ ${t.map(t=>e(t)+pR(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>TL(e.type));if(t.length>0)return`{ ${t.map(t=>`${fR(t.type.context?.isMutable)}${xM(t.name)}${pR(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function lR(e,t,n,r){let i=tL(t);return i?uI(new XI(e,[i],n,r)):lI(t)}var uR=ZF()({onItem(e,t){return e.compile(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=tL(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(t),uI(new ZI(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(t);else return dI}}}),dR=new cR([new IL(`Infinity`),new IL(`-Infinity`),new IL(`NaN`)],`anyOf`);function fR(e){return e?``:`readonly `}function pR(e){return e?`?`:``}var mR=class e extends lj{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(t){return new e(this.run,{...this.annotations,...t},this.aborted)}abort(){return new e(this.run,this.annotations,!0)}and(e,t){return new hR([this,e],t)}},hR=class e extends lj{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(t){return new e(this.checks,{...this.annotations,...t})}and(t,n){return new e([this,t],n)}};function gR(e,t,n=!1){return new mR((t,n,r)=>eL(n,e(t,n,r),t,r),t,n)}function _R(e){return gR(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitrary:{constraint:{noInfinity:!0,noNaN:!0}},...e})}var vR=new AL(new cR([DR(VL,[_R()]),dR],`anyOf`),new hL(dL(),cL(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function yR(e,t){let n=e.source,r=new globalThis.RegExp(n,e.flags);return gR(e=>(r.lastIndex=0,r.test(e)),{expected:`a string matching the RegExp ${n}`,representation:{id:`effect/schema/isPattern`,payload:{source:n,flags:e.flags}},toJsonSchema:()=>({pattern:n}),arbitrary:{constraint:{patterns:[e.source]}},...t})}function bR(e,t){let n=Object.getOwnPropertyDescriptors(e);return t(n),Object.create(Object.getPrototypeOf(e),n)}var xR=new WeakMap;function SR(e){return xR.get(e)??e}function CR(e,t){return e.encoding===t?e:bR(e,e=>{e.encoding.value=t})}function wR(e,t){if(e.context===t)return e;let n=SR(e);if(n.context===t)return n;let r=bR(e,e=>{e.context.value=t});return xR.set(r,n),r}function TR(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return ER(e,IN(e.checks.slice(0,-1),n.annotate(t)))}return bR(e,e=>{e.annotations.value={...e.annotations.value,...t}})}function ER(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:bR(e,e=>{e.checks.value=t})}function DR(e,t){return ER(e,$L(e.checks,t))}function OR(e,t){let n=t(e.to);return n===e.to?e:new AL(n,e.transformation)}function kR(e,t){let n=e,r=n[n.length-1],i=OR(r,t);return i===r?e:IN(e.slice(0,e.length-1),i)}function AR(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:CR(r,kR(r.encoding,n))}return e(r)}return hj(n)}function jR(e,t,n){let r=new AL(e,t);return CR(n,n.encoding?[...n.encoding,r]:[r])}function MR(e,t){let n=!1,r=Array(e.length);for(let i=0;i<e.length;i++){let a=e[i],o=t(a);o!==a&&(n=!0),r[i]=o}return n?r:e}function NR(e,t){return wR(e,e.context?new ML(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new ML(!1,!1,void 0,t))}function PR(e,t,n){return jR(e,n,t)}function FR(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:xj(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function IR(e,t){let{literals:n,parameters:r}=FR(e);return new XL(n.map(e=>new KL(e,t)),r.map(e=>new YL(e,t)))}function LR(e){return e.context?.isOptional??!1}function RR(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(RR)}function zR(e){function t(e){return RR(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return RN(n)?n:void 0}var BR=hj(e=>{if(e.encoding)return BR(CR(e,void 0));let t=e,n=t.recur?.(BR)??t,r=n.encodingChecks;if(r){let t=n===e?r:DL(n)||OL(n)||CL(n)&&n.typeParameters.length>0?zR(r):void 0;return bR(n,e=>{e.encodingChecks.value=void 0,e.checks.value=$L(n.checks,t)})}return n}),VR=hj(e=>BR(UR(e)));function HR(e,t){let n=t,r=n.length,i=n[r-1],a=[new AL(UR(CR(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new AL(UR(n[e-1].to),n[e].transformation.flip()));let o=UR(i.to);return o.encoding?CR(o,[...o.encoding,...a]):CR(o,a)}var UR=mj(e=>{if(e.encoding)return HR(e,e.encoding);let t=e;return t.flip?.(UR)??t.recur?.(UR)??t});function WR(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(WR);default:return!1}}function GR(e,t){let n=PI(t);return(r,i)=>r===NI?FI:r===t?n:bI(new JI(e,r,i))}function KR(e,t){return(n,r)=>n===NI?FI:t(n)?II:bI(new JI(e,n,r))}var qR=AR(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(qR)}}),JR=new globalThis.RegExp(`^${WL}$`),YR=new globalThis.RegExp(`^(?:${WL}|Infinity|-Infinity|NaN)$`);function XR(e){return yR(JR,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:JR.source}),...e})}var ZR=DR(RL,[XR()]),QR=new AL(ZR,bL),$R=new AL(new cR([ZR,dR],`anyOf`),bL);function ez(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=ez(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new HI(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function tz(e){if(!CL(e))return;let t=e.annotations?.[MI];return Sj(t)?t(e.typeParameters):void 0}function nz(e){let t=uz(mz,BR(e.ast));return(e,n)=>t(e,n?.disableChecks?n?.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions)}function rz(e){let t=nz(e);return(e,n)=>{let r=DI(t(e,n));return fI(r)?kN(r.value):(nL(r.cause,`Option adapter can only return none for schema issues`),ON())}}function iz(e){let t=nz(e);return(e,n)=>{let r=DI(t(e,n));if(fI(r))return r.value;let i=nL(r.cause,`Constructor adapter can only throw schema issues`);throw Error(`Schema validation failed`,{cause:i})}}function az(e,t){let n=lz(e.ast);return t===void 0?n:(e,r)=>n(e,sz(t,r))}function oz(e,t){return fz(az(e,t))}var sz=(e,t)=>t?{...e,...t}:e,cz=e=>e===NI?bI(new YI):vI(e);function lz(e){return uz(pz,e)}function uz(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??jL);return a===II?vI(r):LF(a)?a[MM]===NI?cz(NI):a:kI(a,cz)}}function dz(e){return(t,n)=>DI(e(t,n))}function fz(e){let t=dz(e);return(e,n)=>{let r=t(e,n);return fI(r)?kN(r.value):(nL(r.cause,`Option adapter can only return none for schema issues`),ON())}}var pz=mj(e=>yz(e,pz)),mz=mj(e=>yz(e,mz,gz)),hz=mj(e=>yz(e,mz,gz,e.context?.constructorDefault));function gz(e){return e.context?.constructorDefault?hz(e):mz(e)}function _z(e,t,n,r){let i;if(LF(e)&&e._tag===`Success`){let a=LI(e===II?t:e[MM]);i=n._tag===`Transformation`?n.decode.run(a,r):n.decode(PI(a),r)}else i=n._tag===`Transformation`?kI(e,e=>n.decode.run(LI(e),r)):n.decode(OI(e,LI),r);return LF(i)&&i._tag===`Success`?RI(i[MM]):kI(i,RI)}function vz(e,t){let n;return(r,i)=>r===NI?FI:e.isConstructed(r)?II:_z((n??=t(e.link.to))(r,i),r,e.link.transformation,i)}function yz(e,t,n,r){let i=n?tz(e):void 0,a=i?vz(i,t):e.getParser(t,n),o=e.checks,s=r?e.encoding?[...e.encoding,r]:[r]:e.encoding,c=e.encodingChecks,l=(o?o[o.length-1].annotations:e.annotations)?.parseOptions;if(!s&&!o&&!c)return l?(e,t)=>a(e,sz(t,l)):a;let u,d=(t,n)=>{let r=a(t,n);if(c&&!n.disableChecks){if(LF(r)){if(r._tag===`Success`){let i=r===II?t:r[MM];if(t!==NI&&i!==NI){let i=ez(c,t,void 0,e,n);i&&(r=bI(new qI(e,i,t,n)))}}}else r=wI(r,r=>{if(t!==NI&&r!==NI){let r=ez(c,t,void 0,e,n);if(r)return bI(new qI(e,r,t,n))}return vI(r)})}if(o&&!n.disableChecks){if(LF(r)){if(r._tag===`Success`){let i=r===II?t:r[MM];if(i===NI)return r;let a=ez(o,i,void 0,e,n);a&&(r=bI(new qI(e,a,i,n)))}}else r=wI(r,t=>{if(t!==NI){let r=ez(o,t,void 0,e,n);if(r)return bI(new qI(e,r,t,n))}return vI(t)})}return r};return s?(n,r)=>{l&&(r=sz(r,l));let i=u??=s.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=s.length-1;e>=0;e--)if(o=_z(o,a,s[e].transformation,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[MM],o=t(a,r)):o=kI(o,e=>{let n=t(e,r);return n===II?PI(e):n})}if(o._tag===`Success`){let e=o[MM],t=d(e,r);return t===II?o:t}return o=EI(o,t=>xI(()=>sI(t,t=>new UI(e,t,n,r)))),kI(o,e=>{let t=d(e,r);return t===II?PI(e):t})}:l?(e,t)=>d(e,sz(t,l)):d}var bz=`~effect/Schema/Schema`,xz={[bz]:bz,pipe(){return sj(this,arguments)},annotate(e){return this.rebuild(TR(this.ast,e))},annotateKey(e){return this.rebuild(NR(this.ast,e))},check(...e){return this.rebuild(DR(this.ast,e))}};function Sz(e,t){function n(){}let r=Object.defineProperties(Object.setPrototypeOf(n,xz),Object.getOwnPropertyDescriptors({...t}));return r.ast=e,r.rebuild=e=>Sz(e,t),r.makeEffect=nz(r),r.make=iz(r),r.makeOption=rz(r),r}var Cz=oz,wz=Sz,Tz=wz(FL),Ez=wz(RL);function Dz(e,t){return wz(IR(e.ast,t.ast),{key:e,value:t})}function Oz(e,t){return n=>wz(PR(n.ast,e.ast,t?_L(t):yL()),{from:n,to:e})}globalThis.RegExp,globalThis.URL;var kz=Ez.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function Az(e,t){return kz.pipe(Oz(e,xL(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams,globalThis.Uint8Array;var jz=Cz(Az(Dz(Ez,Tz))),Mz={};function Nz(e){return e.state.status===`streaming`?jN(jz(e.state.input),()=>Mz):e.state.input}function Pz(e){return`metadata`in e.state?e.state.metadata??Mz:Mz}function Fz(e){if(e.state.status===`running`){let t=e.state.metadata.output;return typeof t==`string`?t:void 0}if(`content`in e.state&&e.state.content)return e.state.content.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
715
- `)||void 0}function Iz(e){if(e.state.status===`error`)return e.state.error.message}function Lz(e){return e.state.status===`error`||e.name===`execute`&&zz(Pz(e))||e.name===`shell`&&e.state.status===`completed`&&Rz(Pz(e))}function Rz(e){return e.timeout===!0||typeof e.exit==`number`&&e.exit!==0}function zz(e){let t=e.toolCalls;return e.error===!0||Array.isArray(t)&&t.some(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`status`in e&&e.status===`error`)}function Bz(e){if(e.name!==`read`||e.state.status!==`completed`)return!1;let t=e.state.metadata?.loaded;return Array.isArray(t)&&t.some(e=>typeof e==`string`)}function Vz(e,t,n){if(e.type!==`tool`)return;if(e.state.status===`error`)return!1;if(e.name===`shell`||e.name===`execute`)return t;if(e.name===`patch`)return n;if(e.name!==`edit`&&e.name!==`write`)return;if(!n)return!1;let r=Pz(e).files;return!Array.isArray(r)||r.length===0||!r.every(e=>!!e&&typeof e==`object`&&`status`in e&&e.status===`deleted`)}var Hz;(function(e){class t extends qP(`TurnGap`){}e.TurnGap=t;class n extends qP(`UserMessage`){}e.UserMessage=n;class r extends qP(`Shell`){}e.Shell=r;class i extends qP(`Notice`){}e.Notice=i;class a extends qP(`TurnDivider`){}e.TurnDivider=a;class o extends qP(`AssistantPart`){}e.AssistantPart=o;class s extends qP(`Thinking`){}e.Thinking=s;class c extends qP(`Error`){}e.Error=c;class l extends qP(`Retry`){}e.Retry=l,e.key=e=>{switch(e._tag){case`TurnGap`:return`turn-gap:${e.userMessageID}`;case`UserMessage`:return`user-message:${e.userMessageID}`;case`Shell`:return`shell:${e.messageID}`;case`Notice`:return`notice:${e.messageID}`;case`TurnDivider`:return`turn-divider:${e.userMessageID}`;case`AssistantPart`:return`assistant-part:${e.group.type}:${e.group.key}`;case`Thinking`:return`thinking:${e.userMessageID}`;case`Error`:return`error:${e.userMessageID}`;case`Retry`:return`retry:${e.userMessageID}`}return e};function u(e,t){return Kj(e,t)}e.equals=u})(Hz||={});var Uz=[{id:`everything`,value:{shell:{placement:`separate`,details:`expanded`},edit:{placement:`separate`,details:`expanded`},thinking:{placement:`separate`,details:`expanded`},subagents:{placement:`separate`},notices:{placement:`separate`},tools:{placement:`separate`}}},{id:`detailed`,value:{shell:{placement:`separate`,details:`expanded`},edit:{placement:`separate`,details:`expanded`},thinking:{placement:`grouped`,details:`collapsed`},subagents:{placement:`separate`},notices:{placement:`grouped`},tools:{placement:`grouped`}}},{id:`compact`,value:{shell:{placement:`grouped`,details:`collapsed`},edit:{placement:`grouped`,details:`collapsed`},thinking:{placement:`grouped`,details:`collapsed`},subagents:{placement:`grouped`},notices:{placement:`grouped`},tools:{placement:`grouped`}}},{id:`quiet`,value:{shell:{placement:`hidden`,details:`collapsed`},edit:{placement:`grouped`,details:`collapsed`},thinking:{placement:`hidden`,details:`collapsed`},subagents:{placement:`grouped`},notices:{placement:`hidden`},tools:{placement:`hidden`}}},{id:`text-only`,value:{shell:{placement:`hidden`,details:`collapsed`},edit:{placement:`hidden`,details:`collapsed`},thinking:{placement:`hidden`,details:`collapsed`},subagents:{placement:`hidden`},notices:{placement:`hidden`},tools:{placement:`hidden`}}}];function Wz(e){if(e.type!==`text`)return e.type===`reasoning`?`thinking`:[`shell`,`execute`,`bash`].includes(e.name)?`shell`:[`edit`,`write`,`patch`,`apply_patch`].includes(e.name)?`edit`:[`subagent`,`task`].includes(e.name)?`subagents`:`tools`}function Gz(e){if(e.type===`compaction`)return e.status!==`completed`;if(e.type!==`synthetic`)return!1;let t=e.metadata;return t?.state===`error`||t?.source===`shell`&&t.state===`completed`&&Rz(t)}var Kz=Cz(Az(Tz));function qz(e){let t=N(()=>new Map(e.sessionMessages().map(e=>[e.id,e]))),n=N(()=>$z(e.sessionMessages())),r=N(()=>eB(e.sessionMessages())),i=Ie(()=>e.sessionMessages().flatMap(e=>e.type===`assistant`?e.content.filter(e=>e.type!==`tool`):[]),e=>[e,N(()=>!!e.text.trim())]),a=N(()=>new Map(i())),o=N(()=>Jz.constructSessionMessageRows(e.sessionMessages(),e.reasoningMode()!==`hidden`,e.status(),e.pendingUserMessageIDs?.(),e.shellToolDefaultOpen?.()??!1,e.editToolDefaultOpen?.()??!1,(e,t,n)=>e.type===`tool`?rB(e,t,n):(e.type===`text`||(n?n.thinking.placement!==`hidden`:t))&&a().get(e)(),e.timelineDetail?.())),s=N(()=>o().activeMessageID),c=N(e=>Qz(e,o().rows)),l=N(()=>new Map(c().map(e=>[Hz.key(e),e]))),u=N(()=>{let e=new Map;return c().forEach((t,n)=>{e.has(t.userMessageID)||e.set(t.userMessageID,n)}),e}),d=N(()=>{let e=new Map;return c().forEach((t,n)=>e.set(t.userMessageID,n)),e});return{activeMessageID:s,assistantMessagesByParent:r,lastAssistantGroupKey:N(()=>{let e=new Map;return c().forEach(t=>{t._tag===`AssistantPart`&&e.set(t.userMessageID,t.group.key)}),e}),messageByID:t,messageRowIndex:u,messageLastRowIndex:d,rowByKey:l,rows:c,sessionMessageByID:t,userContextByID:n}}var Jz;(function(e){function t(e,t,r,i,a=!1,o=!1,s=rB,c){let l=[],u=new Map,d=[],f;e.forEach(e=>{if(uB(e)){f&&f.entries.push({type:`notice`,message:e}),f||d.push(e);return}if(e.type===`shell`){let t={id:e.id,time:e.time,shell:e,entries:[]};l.push(t),f=t;return}if(e.type===`user`){if(u.has(e.id))return;let t={id:e.id,time:e.time,user:e,entries:[]};l.push(t),u.set(e.id,t),f=t;return}if(e.type!==`assistant`)return;let t=f?.user?f:void 0;if(t?.user){t.entries.push({type:`assistant`,message:e}),f=t;return}if(f&&!f.user&&!f.shell){f.entries.push({type:`assistant`,message:e});return}let n={id:e.id,time:e.time,entries:[{type:`assistant`,message:e}]};l.push(n),f=n});let p=l.findLast(e=>!i?.has(e.id))?.id??l.at(-1)?.id,m=e=>!c||c.notices.placement!==`hidden`||Gz(e),h=c?l.filter(e=>e.user||e.shell&&(c.shell.placement!==`hidden`||Xz(e.shell))?!0:e.entries.some(e=>e.type===`notice`?m(e.message):!!e.message.error||!!e.message.retry||e.message.content.some(e=>s(e,t,c)))):l,g=[...d.filter(m).map(e=>new Hz.Notice({userMessageID:l[0]?.id??e.id,messageID:e.id})),...h.flatMap((e,i)=>e.shell?[...i>0?[new Hz.TurnGap({userMessageID:e.id})]:[],...!c||c.shell.placement!==`hidden`||Xz(e.shell)?[new Hz.Shell({userMessageID:e.id,messageID:e.shell.id})]:[],...e.entries.flatMap(t=>t.type===`notice`&&m(t.message)?[new Hz.Notice({userMessageID:e.id,messageID:t.message.id})]:[])]:n(e.user,e.id,e.entries,i,t,r,e.id===p,a,o,s,c))];return{activeMessageID:p,rows:c?Zz(g,c,new Set(e.filter(e=>e.type===`compaction`&&Gz(e)).map(e=>e.id))):g}}e.constructSessionMessageRows=t;function n(e,t,n,r,a,o,s,c=!1,l=!1,u=rB,d){let f=[],p=n.flatMap(e=>e.type===`assistant`?[e.message]:[]).at(-1),m=r>0,h=n.some(e=>e.type===`notice`&&e.message.type===`compaction`),g=p?.content.at(-1),_=(d?d.thinking.placement===`separate`:a)&&s&&o.type===`busy`&&p?.time.completed===void 0&&!p?.error&&!p?.retry&&g?.type===`reasoning`&&g.time?.completed===void 0;m&&f.push(new Hz.TurnGap({userMessageID:t})),e&&f.push(new Hz.UserMessage({userMessageID:t}));let v=0,y=!1,b=e=>{let n=e.flatMap((e,t)=>i(e).filter(e=>u(e.content,a,d)&&!(_&&e.content===g)).map(n=>({messageID:e.id,messageIndex:t,partID:n.id,content:n.content}))),r=e.findIndex(e=>Yz(e.error)),o=r<0?n:n.filter(e=>e.messageIndex<=r),m=r<0?[]:n.filter(e=>e.messageIndex>r),b=e=>{let n=0;iB(e,c,l,d).forEach(r=>{let i=r.type!==`part`||e[n]?.content.type!==`text`;n+=r.type===`part`?1:r.refs.length,f.push(new Hz.AssistantPart({userMessageID:t,group:r,previousAssistantPart:v>0,spacing:v>0?y&&i?`tool`:`content`:void 0})),v+=1,y=i})};b(o),r>=0&&(!h&&d?.notices.placement!==`hidden`&&f.push(new Hz.TurnDivider({userMessageID:t})),b(m)),e.at(-1)===p&&(s&&p?.retry?f.push(new Hz.Retry({userMessageID:t})):p?.error&&!Yz(p.error)&&f.push(new Hz.Error({userMessageID:t,text:cB(p.error.message)})))},x=[];return n.forEach(e=>{switch(e.type){case`assistant`:x.push(e.message);return;case`notice`:if(d?.notices.placement===`hidden`&&!Gz(e.message))return;b(x),x=[],f.push(new Hz.Notice({userMessageID:t,messageID:e.message.id}))}}),b(x),_&&p&&f.push(new Hz.Thinking({userMessageID:t,ref:{messageID:p.id,partID:i(p).at(-1).id}})),f}e.constructMessageRows=n;function r(e,t){if(e?.type!==`assistant`)return;let n={text:0,reasoning:0};for(let r of e.content)if((r.type===`tool`?r.id:`${e.id}:${r.type}:${n[r.type]++}`)===t)return r}e.resolveContent=r;function i(e){let t={text:0,reasoning:0};return e.content.map(n=>({id:n.type===`tool`?n.id:`${e.id}:${n.type}:${t[n.type]++}`,content:n}))}e.contentEntries=i})(Jz||={});function Yz(e){return e?.type.toLowerCase().includes(`abort`)||e?.type.toLowerCase().includes(`interrupt`)}function Xz(e){return e.status===`timeout`||e.status===`exited`&&e.exit!==void 0&&e.exit!==0}function Zz(e,t,n){return e.reduce((e,r)=>{let i=e.at(-1),a=(r._tag===`Notice`&&t.notices.placement===`grouped`||r._tag===`Shell`&&t.shell.placement===`grouped`)&&!n.has(r.messageID)?new Hz.AssistantPart({userMessageID:r.userMessageID,previousAssistantPart:i?._tag===`AssistantPart`,spacing:i?._tag===`AssistantPart`?`tool`:void 0,group:{type:`context`,key:`message:${r.messageID}`,refs:[{messageID:r.messageID,partID:r.messageID}]}}):r;return i?._tag===`AssistantPart`&&i.group.type===`context`&&a._tag===`AssistantPart`&&a.group.type===`context`&&i.userMessageID===a.userMessageID?(e[e.length-1]=new Hz.AssistantPart({...i,group:{...i.group,refs:[...i.group.refs,...a.group.refs]}}),e):(e.push(a),e)},[])}function Qz(e,t){if(!e?.length)return t;let n=new Map(e.map(e=>[Hz.key(e),e])),r=new Map;e.forEach((e,t)=>{e._tag===`AssistantPart`&&e.group.type!==`part`&&e.group.refs.forEach(n=>r.set(nB(n),{index:t,row:e}))});let i=new Map;t.forEach((e,t)=>{if(e._tag!==`AssistantPart`||e.group.type===`part`)return;let r=Hz.key(e);n.has(r)&&!i.has(r)&&i.set(r,t)});let a=new Set,o=t.map((e,t)=>{let o=tB(r,i,e,t,a),s=n.get(Hz.key(o));return s&&Hz.equals(s,o)?s:o});return e.length===o.length&&e.every((e,t)=>e===o[t])?e:o}function $z(e){let t=new Map,n=``,r={id:``,providerID:``},i;return e.forEach(e=>{if(e.type===`agent-switched`&&(n=e.agent),e.type===`model-switched`&&(r=e.model),e.type===`user`){i=e.id;let a=e.metadata,o=typeof a?.agent==`string`?a.agent:n,s=a?.model,c=s&&typeof s==`object`&&!Array.isArray(s)?typeof s.id==`string`?s.id:typeof s.modelID==`string`?s.modelID:void 0:void 0;t.set(e.id,{agent:o,model:s&&typeof s==`object`&&!Array.isArray(s)&&c&&typeof s.providerID==`string`?{id:c,providerID:s.providerID,variant:typeof s.variant==`string`?s.variant:void 0}:r})}e.type===`shell`&&(i=void 0),e.type===`assistant`&&(n=e.agent,r=e.model,i&&t.set(i,{agent:n,model:r}))}),t}function eB(e){let t=new Map,n;return e.forEach(e=>{if(e.type===`user`&&(n=e.id),e.type===`shell`&&(n=void 0),e.type!==`assistant`)return;n||=e.id;let r=t.get(n);if(r){r.push(e);return}t.set(n,[e])}),t}function tB(e,t,n,r,i){if(n._tag!==`AssistantPart`||n.group.type===`part`)return n;let a=n.group.refs.reduce((n,a)=>{let o=e.get(nB(a));if(!o)return n;let s=Hz.key(o.row);if(i.has(s))return n;let c=t.get(s);return c!==void 0&&c!==r?n:!n||o.index<n.index?o:n},void 0);if(!a)return n;let o=Hz.key(a.row);return i.add(o),n.group.key===a.row.group.key?n:new Hz.AssistantPart({userMessageID:n.userMessageID,previousAssistantPart:n.previousAssistantPart,spacing:n.spacing,group:{...n.group,key:a.row.group.key}})}function nB(e){return`${e.messageID}:${e.partID}`}function rB(e,t,n){return e.type===`text`?!!e.text.trim():e.type===`reasoning`?(n?n.thinking.placement!==`hidden`:t)&&!!e.text.trim():n&&Lz(e)?!0:e.name===`todowrite`?!1:e.name===`question`?e.state.status!==`streaming`&&e.state.status!==`running`:!(n&&n[Wz(e)].placement===`hidden`)}function iB(e,t,n,r){let i=[],a,o=()=>{let e=a,t=e?.refs[0];if(t){if(!e.tools&&!r){i.push(...e.refs.map(e=>({type:`part`,key:`part:${e.messageID}:${e.partID}`,ref:e}))),a=void 0;return}i.push({type:e.type===`context`?`context`:`file`,key:e.type===`context`?`context:${t.messageID}:${t.partID}`:`part:${t.messageID}:${t.partID}`,refs:e.refs}),a=void 0}};return e.forEach(e=>{let s=e.content.type===`tool`?aB(e.content,t,n,a?.type===`context`&&a.tools,r):e.content.type===`reasoning`?r&&r.thinking.placement!==`grouped`?void 0:`context`:void 0;if(s){a?.type!==s&&o(),a??={type:s,refs:[],tools:!1},a.tools||=e.content.type===`tool`,a.refs.push({messageID:e.messageID,partID:e.partID});return}o(),i.push({type:`part`,key:`part:${e.messageID}:${e.partID}`,ref:{messageID:e.messageID,partID:e.partID}})}),o(),i}function aB(e,t,n,r,i){if(i)return e.name===`question`&&!Lz(e)?void 0:i[Wz(e)].placement===`grouped`?`context`:Lz(e)?void 0:e.name===`patch`?`patch`:e.name===`edit`?`edit`:void 0;if(!(e.name===`question`||Bz(e))){if(e.state.status===`error`)return(e.name===`shell`||e.name===`execute`)&&t||(e.name===`edit`||e.name===`write`||e.name===`patch`)&&n?void 0:`context`;if(!(!r&&(e.state.status!==`completed`||`metadata`in e.state&&e.state.metadata?.status===`running`)&&(e.name===`shell`||e.name===`execute`||e.name===`subagent`))){if(Vz(e,t,n)!==!0)return`context`;if(e.name===`patch`)return`patch`;if(e.name===`edit`)return`edit`}}}function oB(e){let t=e.replace(/\r\n?/g,`
716
- `),n=t.match(/<h[1-6][^>]*>([\s\S]*?)<\/h[1-6]>/i);if(n?.[1]){let e=sB(n[1].replace(/<[^>]+>/g,` `));if(e)return e}let r=t.match(/^\s{0,3}#{1,6}[ \t]+(.+?)(?:[ \t]+#+[ \t]*)?$/m);if(r?.[1]){let e=sB(r[1]);if(e)return e}let i=t.match(/^([^\n]+)\n(?:=+|-+)\s*$/m);if(i?.[1]){let e=sB(i[1]);if(e)return e}let a=t.match(/^\s*(?:\*\*|__)(.+?)(?:\*\*|__)\s*$/m);if(a?.[1]){let e=sB(a[1]);if(e)return e}}function sB(e){return e.replace(/`([^`]+)`/g,`$1`).replace(/\[([^\]]+)\]\([^)]+\)/g,`$1`).replace(/[*_~]+/g,``).trim()}function cB(e){let t=e.replace(/^Error:\s*/,``).trim(),n=e=>MN(Kz(e)),r=e=>{let t=n(e);return typeof t==`string`?n(t.trim()):t},i=r(t);if(i===void 0){let e=t.indexOf(`{`),n=t.lastIndexOf(`}`);e!==-1&&n>e&&(i=r(t.slice(e,n+1)))}if(!lB(i))return e;let a=lB(i.error)?i.error:void 0;if(a){let e=typeof a.type==`string`?a.type:void 0,t=typeof a.message==`string`?a.message:void 0;if(e&&t)return`${e}: ${t}`;if(t)return t;if(e)return e;let n=typeof a.code==`string`?a.code:void 0;if(n)return n}return(typeof i.message==`string`?i.message:void 0)||(typeof i.error==`string`?i.error:void 0)||e}function lB(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function uB(e){return e.type===`user`||e.type===`assistant`||e.type===`shell`?!1:e.type!==`synthetic`||!!e.description?.trim()||Gz(e)}var dB=G(`<div class="flex h-8 w-full items-center gap-3 text-v2-text-text-faint"><span class="h-px min-w-0 flex-1 bg-v2-border-border-strong"></span><span class="flex min-w-0 items-center gap-1 text-[13px] font-[440] leading-text-compact tracking-[-0.04px]"><span class="flex min-w-0 items-center gap-1.5"><bdi dir=auto class=truncate></bdi></span></span><span class="h-px min-w-0 flex-1 bg-v2-border-border-strong">`),fB=G(`<span class="flex size-1.5 shrink-0 items-center justify-center"aria-hidden=true><span class="size-[2.25px] rounded-full bg-current">`),pB=G(`<span data-slot=session-timeline-notice-variant class="shrink-0 capitalize">`);function mB(e){return(()=>{var t=dB(),n=t.firstChild.nextSibling,r=n.firstChild,i=r.firstChild;return q(n,z(U,{get when(){return e.providerID},children:e=>z(Fd,{get id(){return e()},class:`text-v2-icon-icon-faint`,"aria-hidden":`true`})}),r),q(i,()=>e.label),q(r,z(U,{get when(){return W(()=>!!(e.variant&&e.variant!=="default"))()?e.variant:void 0},children:e=>[fB(),(()=>{var t=pB();return q(t,e),t})()]}),null),j(()=>K(i,`title`,e.label)),t})()}function hB(e){return{text:e,blocks:[{raw:e,src:e,mode:`full`}]}}function gB(e,t){return!e||e.mode!==t.mode?!1:t.mode===`code`||t.mode===`live`?t.raw.startsWith(e.raw):e.raw===t.raw}function _B(e,t,n){return e&&t===n}function vB(e,t,n,r){return`${e}:${t?`${t}:${n}:${r}`:`block:${n}`}`}function yB(e,t){return e&&t.id<=e.id?e:{id:t.id,generation:(e?.generation??0)+ +!!t.reset,language:t.language,stable:t.reset?t.stable:[...e?.stable??[],...t.stable],unstable:t.unstable}}function bB(e){let t=new Map,n=new Map;return{send(r){if(!t.has(r.key)){t.set(r.key,r),e.post(r);return}let i=n.get(r.key);i&&e.supersede(i),n.set(r.key,r)},complete(r,i){if(t.get(r)?.id!==i)return;t.delete(r);let a=n.get(r);a&&(n.delete(r),t.set(r,a),e.post(a))},dispose(r){t.delete(r);let i=n.get(r);i&&e.supersede(i),n.delete(r)},reset(){n.forEach(e.supersede),n.clear(),t.clear()},queued:()=>n.size}}var xB,SB,CB=0,wB=new Map,TB=new Map,EB=new Map,DB=new Map,OB=new Set,kB=new Map,AB=bB({post:e=>xB.postMessage(e),supersede:e=>{let t=wB.get(e.id);t&&(wB.delete(e.id),t.reject(new RB))}}),jB=bB({post:e=>xB.postMessage(e),supersede:e=>{let t=TB.get(e.id);t&&(TB.delete(e.id),t.reject(new RB))}});function MB(e,t){if(t.aborted)return Promise.reject(new LB);let n=BB(),r=++CB,i=()=>{EB.get(r)?.reject(new LB),EB.delete(r)};return new Promise((a,o)=>{EB.set(r,{resolve:a,reject:o}),t.addEventListener(`abort`,i,{once:!0}),n.postMessage({type:`parse`,id:r,text:e})}).finally(()=>{t.removeEventListener(`abort`,i),EB.delete(r)})}function NB(e,t,n){BB();let r=++CB;return new Promise((i,a)=>{TB.set(r,{key:e,resolve:i,reject:a}),jB.send({type:`project`,id:r,key:e,text:t,live:n})})}function PB(e){jB.dispose(e),TB.forEach((t,n)=>{t.key===e&&(TB.delete(n),t.reject(new LB))}),xB?.postMessage({type:`dispose`,key:e})}function FB(e,t,n,r=!1){BB();let i=++CB;return kB.set(e,i),OB.delete(e),OB.add(e),OB.size>200&&IB(OB.values().next().value),new Promise((a,o)=>{wB.set(i,{key:e,complete:r,resolve:a,reject:o}),AB.send({type:`highlight`,id:i,key:e,text:t,language:n,complete:r})})}function IB(e){OB.delete(e),kB.delete(e),DB.delete(e),AB.dispose(e),wB.forEach((t,n)=>{t.key===e&&(wB.delete(n),t.reject(new LB))}),xB?.postMessage({type:`dispose`,key:e})}var LB=class extends Error{},RB=class extends Error{},zB=class extends Error{};function BB(){if(xB)return xB;if(SB)throw new zB(SB.message);try{xB=new Worker(new URL(`/assets/markdown.worker-DqWDoHOY.js`,``+import.meta.url),{type:`module`})}catch(e){throw SB=e instanceof Error?e:Error(String(e)),new zB(SB.message)}xB.onmessage=e=>{if(e.data.type===`parse`){let t=EB.get(e.data.id);if(!t)return;EB.delete(e.data.id),t.resolve(e.data.html);return}if(e.data.type===`project`){let t=TB.get(e.data.id);if(!t){jB.complete(e.data.key,e.data.id);return}TB.delete(e.data.id),t.resolve(e.data.projection),jB.complete(e.data.key,e.data.id);return}if(e.data.type===`error`){let t=EB.get(e.data.id);if(t){EB.delete(e.data.id),t.reject(Error(e.data.message));return}let n=TB.get(e.data.id);if(n){TB.delete(e.data.id),n.reject(Error(e.data.message)),jB.complete(n.key,e.data.id);return}}if(e.data.type===`superseded`){let t=TB.get(e.data.id);if(t){TB.delete(e.data.id),t.reject(new RB),jB.complete(t.key,e.data.id);return}}let t=e.data.key;if(!t)return;let n=wB.get(e.data.id);if(!n){AB.complete(t,e.data.id);return}if(wB.delete(e.data.id),!OB.has(t)){n.reject(new LB),AB.complete(t,e.data.id);return}if(e.data.type===`superseded`){n.reject(new RB),AB.complete(t,e.data.id);return}if(e.data.type===`error`){n.reject(Error(e.data.message)),AB.complete(t,e.data.id);return}let r=yB(DB.get(t),e.data);_B(n.complete,kB.get(t),e.data.id)?(DB.delete(t),OB.delete(t),kB.delete(t)):DB.set(t,r),n.resolve(r),AB.complete(t,e.data.id)};let e=e=>{let t=Error(e);SB=t,AB.reset(),jB.reset(),wB.forEach(e=>e.reject(t)),TB.forEach(e=>e.reject(t)),EB.forEach(e=>e.reject(t)),wB.clear(),TB.clear(),EB.clear(),DB.clear(),OB.clear(),kB.clear(),xB?.terminate(),xB=void 0};return xB.onerror=t=>e(t.message||`Markdown highlighting worker failed`),xB.onmessageerror=()=>e(`Markdown worker response failed`),xB}function VB(e,t){return!e||e.language!==t.language||e.generation!==t.generation||t.stableCount<e.stableCount||!t.raw.startsWith(e.raw)}function HB(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var UB=HB();function WB(e){UB=e}var GB={exec:()=>null};function KB(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function qB(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(YB.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var JB=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),YB={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:KB(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:KB(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:KB(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:KB(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:KB(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:KB(e=>RegExp(`^ {0,${e}}>`))},XB=/^(?:[ \t]*(?:\n|$))+/,ZB=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,QB=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$B=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,eV=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tV=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,nV=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,rV=qB(nV).replace(/bull/g,tV).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),iV=qB(nV).replace(/bull/g,tV).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}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),aV=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,oV=/^[^\n]+/,sV=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,cV=qB(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,sV).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),lV=qB(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,tV).getRegex(),uV=`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`,dV=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,fV=qB(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\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`,dV).replace(`tag`,uV).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pV=e=>qB(aV).replace(`hr`,$B).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,uV).getRegex(),mV=pV(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),hV=pV(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),gV={blockquote:qB(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,hV).getRegex(),code:ZB,def:cV,fences:QB,heading:eV,hr:$B,html:fV,lheading:rV,list:lV,newline:XB,paragraph:mV,table:GB,text:oV},_V=qB(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,$B).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,uV).getRegex(),vV={...gV,lheading:iV,table:_V,paragraph:qB(aV).replace(`hr`,$B).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,_V).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,uV).getRegex()},yV={...gV,html:qB(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,dV).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:GB,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:qB(aV).replace(`hr`,$B).replace(`heading`,` *#{1,6} *[^
717
- ]`).replace(`lheading`,rV).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},bV=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,xV=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,SV=/^( {2,}|\\)\n(?!\s*$)/,CV=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,wV=/[\p{P}\p{S}]/u,TV=/[\s\p{P}\p{S}]/u,EV=/[^\s\p{P}\p{S}]/u,DV=qB(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,TV).getRegex(),OV=/[\p{Pi}\p{Ps}"']/u,kV=/(?!~)[\p{P}\p{S}]/u,AV=/(?!~)[\s\p{P}\p{S}]/u,jV=/(?:[^\s\p{P}\p{S}]|~)/u,MV=qB(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,JB?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),NV=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,PV=qB(NV,`u`).replace(/punct/g,wV).getRegex(),FV=qB(NV,`u`).replace(/punct/g,kV).getRegex(),IV=qB(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,OV).replace(/punct/g,wV).getRegex(),LV=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,RV=qB(LV,`gu`).replace(/notPunctSpace/g,EV).replace(/punctSpace/g,TV).replace(/punct/g,wV).getRegex(),zV=qB(LV,`gu`).replace(/notPunctSpace/g,jV).replace(/punctSpace/g,AV).replace(/punct/g,kV).getRegex(),BV=qB(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,EV).replace(/punctSpace/g,TV).replace(/punct/g,wV).getRegex(),VV=qB(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,EV).replace(/punctSpace/g,TV).replace(/punct/g,wV).getRegex(),HV=qB(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,EV).replace(/punctSpace/g,TV).replace(/punct/g,wV).getRegex(),UV=qB(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,wV).getRegex(),WV=qB(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,EV).replace(/punctSpace/g,TV).replace(/punct/g,wV).getRegex(),GV=qB(/\\(punct)/,`gu`).replace(/punct/g,wV).getRegex(),KV=qB(/^<(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(),qV=qB(dV).replace(`(?:-->|$)`,`-->`).getRegex(),JV=qB(`^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`,qV).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),YV=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,XV=qB(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,YV).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ZV=qB(/^!?\[(label)\]\[(ref)\]/).replace(`label`,YV).replace(`ref`,sV).getRegex(),QV=qB(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,sV).getRegex(),$V=qB(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,ZV).replace(`nolink`,QV).getRegex(),eH=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,tH={_backpedal:GB,anyPunctuation:GV,autolink:KV,blockSkip:MV,br:SV,code:xV,del:GB,delLDelim:GB,delRDelim:GB,emStrongLDelim:PV,emStrongRDelimAst:RV,emStrongRDelimUnd:VV,escape:bV,link:XV,nolink:QV,punctuation:DV,reflink:ZV,reflinkSearch:$V,tag:JV,text:CV,url:GB},nH={...tH,emStrongLDelim:IV,emStrongRDelimAst:BV,emStrongRDelimUnd:HV,link:qB(/^!?\[(label)\]\((.*?)\)/).replace(`label`,YV).getRegex(),reflink:qB(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,YV).getRegex()},rH={...tH,emStrongRDelimAst:zV,emStrongLDelim:FV,delLDelim:UV,delRDelim:WV,url:qB(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,eH).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:qB(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,eH).getRegex()},iH={...rH,br:qB(SV).replace(`{2,}`,`*`).getRegex(),text:qB(rH.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},aH={normal:gV,gfm:vV,pedantic:yV},oH={normal:tH,gfm:rH,breaks:iH,pedantic:nH},sH={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},cH=e=>sH[e];function lH(e,t){if(t){if(YB.escapeTest.test(e))return e.replace(YB.escapeReplace,cH)}else if(YB.escapeTestNoEncode.test(e))return e.replace(YB.escapeReplaceNoEncode,cH);return e}function uH(e){try{e=encodeURI(e).replace(YB.percentDecode,`%`)}catch{return null}return e}function dH(e,t){let n=e.replace(YB.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(YB.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(YB.slashPipe,`|`);return n}function fH(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 pH(e){let t=e.split(`
718
- `),n=t.length-1;for(;n>=0&&YB.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
719
- `)}function mH(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 hH(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 gH(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function _H(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
720
- `).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(`
721
- `)}var vH=class{options;rules;lexer;constructor(e){this.options=e||UB}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=this.options.pedantic?t[0]:pH(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=_H(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=fH(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:fH(t[0],`
722
- `),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:fH(t[0],`
723
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=fH(t[0],`
724
- `).split(`
725
- `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;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(`
726
- `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
727
- $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
728
- ${s}`:s,r=r?`${r}
729
- ${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=e.join(`
730
- `),o=t.raw+`
731
- `+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s,n=`${n}
732
- ${a}`,r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
733
- `+e.join(`
734
- `),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(`
735
- `);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=hH(t[2].split(`
736
- `,1)[0],t[1].length),l=e.split(`
737
- `,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+`
738
- `,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(`
739
- `,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+=`
740
- `+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+=`
741
- `+l}u=!l.trim(),r+=p+`
742
- `,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,[]),!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))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.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 n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.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=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}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){let e=pH(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}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:fH(t[0],`
743
- `),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=dH(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
744
- `):[],a={type:`table`,raw:fH(t[0],`
745
- `),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(dH(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:fH(t[0],`
746
- `),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)===`
747
- `?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=fH(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=mH(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)),gH(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 gH(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 i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,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}}}},yH=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||UB,this.options.tokenizer=this.options.tokenizer||new vH,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:YB,block:aH.normal,inline:oH.normal};this.options.pedantic?(t.block=aH.pedantic,t.inline=oH.pedantic):this.options.gfm&&(t.block=aH.gfm,t.inline=this.options.breaks?oH.breaks:oH.gfm),this.tokenizer.rules=t}static get rules(){return{block:aH,inline:oH}}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(YB.carriageReturn,`
748
- `),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){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(YB.tabCharGlobal,` `).replace(YB.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
749
- `:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
750
- `)?``:`
751
- `)+i.raw,n.text+=`
752
- `+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
753
- `)?``:`
754
- `)+i.raw,n.text+=`
755
- `+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=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&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
756
- `)?``:`
757
- `)+i.raw,r.text+=`
758
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
759
- `)?``:`
760
- `)+i.raw,n.text+=`
761
- `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,e.slice(n+1,-1))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,n.slice(r+1,-1)))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=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&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},bH=class{options;parser;constructor(e){this.options=e||UB}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(YB.notSpaceStart)?.[0],i=e.replace(YB.endingNewline,``)+`
762
- `;return r?`<pre><code class="language-`+lH(r)+`">`+(n?i:lH(i,!0))+`</code></pre>
763
- `:`<pre><code>`+(n?i:lH(i,!0))+`</code></pre>
764
- `}blockquote({tokens:e}){return`<blockquote>
765
- ${this.parser.parse(e)}</blockquote>
766
- `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
767
- `}hr(e){return`<hr>
768
- `}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+`>
769
- `+r+`</`+i+`>
770
- `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
771
- `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
772
- `}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>
773
- <thead>
774
- `+t+`</thead>
775
- `+r+`</table>
776
- `}tablerow({text:e}){return`<tr>
777
- ${e}</tr>
778
- `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
779
- `}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>${lH(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=uH(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+lH(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=uH(e);if(i===null)return lH(n);e=i;let a=`<img src="${e}" alt="${lH(n)}"`;return t&&(a+=` title="${lH(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:lH(e.text)}},xH=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}},SH=class e{options;renderer;textRenderer;constructor(e){this.options=e||UB,this.options.renderer=this.options.renderer||new bH,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new xH}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`,`checkbox`,`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`,`checkbox`,`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}},CH=class{options;block;constructor(e){this.options=e||UB}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?yH.lex:yH.lexInline}provideParser(e=this.block){return e?SH.parse:SH.parseInline}},wH=class{defaults=HB();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=SH;Renderer=bH;TextRenderer=xH;Lexer=yH;Tokenizer=vH;Hooks=CH;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 bH(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 vH(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 CH;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];t[r]=CH.passThroughHooks.has(n)?e=>{if(this.defaults.async&&CH.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)}:(...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 yH.lex(e,t??this.defaults)}parser(e,t){return SH.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?yH.lex:yH.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?SH.parse:SH.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?yH.lex:yH.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?SH.parse:SH.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+=`
780
- Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+lH(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},TH=new wH;function EH(e,t){return TH.parse(e,t)}EH.options=EH.setOptions=function(e){return TH.setOptions(e),EH.defaults=TH.defaults,WB(EH.defaults),EH},EH.getDefaults=HB,EH.defaults=UB;function DH(...e){return TH.use(...e),EH.defaults=TH.defaults,WB(EH.defaults),EH}EH.use=DH,EH.walkTokens=function(e,t){return TH.walkTokens(e,t)},EH.parseInline=TH.parseInline,EH.Parser=SH,EH.parser=SH.parse,EH.Renderer=bH,EH.TextRenderer=xH,EH.Lexer=yH,EH.lexer=yH.lex,EH.Tokenizer=vH,EH.Hooks=CH,EH.parse=EH,EH.options,EH.setOptions,EH.walkTokens,EH.parseInline,SH.parse,yH.lex;function OH(){return new wH({renderer:{link({href:e,title:t,text:n}){return`<a href="${e}"${t?` title="${t}"`:``} class="external-link" target="_blank" rel="noopener noreferrer">${n}</a>`}}})}var kH;function AH(e){if(e.length>1024||e.includes(`\\(`)||e.includes(`$$`))return;if(/^[\p{L}\p{N} \t\r\n,.;:!?'"’“”()\-–—…$%]+$/u.test(e)&&!/(?:^|[\r\n])(?:[ \t]|\d|[-])| {2}(?:\r\n?|\n)|www\./.test(e))return e.replace(/\r\n?/g,`
781
- `).replace(/^\n+|\n+$/g,``).split(/\n{2,}/).filter(Boolean).map(e=>`<p>${e.replace(/["']/g,e=>e===`"`?`&quot;`:`&#39;`)}</p>\n`).join(``);let t=kH??=OH(),n=e.replace(/\r\n?/g,`
782
- `);if(!/[<|]/.test(n)&&!/^(?:[ \t>\d\[\-=]|#{1,6}(?:[ \t]|$)|[`~]{3}|[+*](?:[ \t]|$)|(?:[*_][ \t]*){3,}$)/m.test(n))return n.replace(/^\n+|\n+$/g,``).split(/\n{2,}/).filter(Boolean).map(e=>`<p>${t.parseInline(e,{async:!1})}</p>\n`).join(``);let r=t.lexer(e),i=!1;if(t.walkTokens(r,e=>{e.type===`code`&&(i=!0)}),!i)return t.parser(r)}function jH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MH(e){if(Array.isArray(e))return e}function NH(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function PH(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
783
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FH(e,t){return MH(e)||NH(e,t)||IH(e,t)||PH()}function IH(e,t){if(e){if(typeof e==`string`)return jH(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jH(e,t):void 0}}var LH=Object.entries,RH=Object.setPrototypeOf,zH=Object.isFrozen,BH=Object.getPrototypeOf,VH=Object.getOwnPropertyDescriptor,HH=Object.freeze,UH=Object.seal,WH=Object.create,GH=typeof Reflect<`u`&&Reflect,KH=GH.apply,qH=GH.construct;HH||=function(e){return e},UH||=function(e){return e},KH||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},qH||=function(e){return new e(...[...arguments].slice(1))};var JH=mU(Array.prototype.forEach),YH=mU(Array.prototype.lastIndexOf),XH=mU(Array.prototype.pop),ZH=mU(Array.prototype.push),QH=mU(Array.prototype.splice),$H=Array.isArray,eU=mU(String.prototype.toLowerCase),tU=mU(String.prototype.toString),nU=mU(String.prototype.match),rU=mU(String.prototype.replace),iU=mU(String.prototype.indexOf),aU=mU(String.prototype.trim),oU=mU(Number.prototype.toString),sU=mU(Boolean.prototype.toString),cU=typeof BigInt>`u`?null:mU(BigInt.prototype.toString),lU=typeof Symbol>`u`?null:mU(Symbol.prototype.toString),uU=mU(Object.prototype.hasOwnProperty),dU=mU(Object.prototype.toString),fU=mU(RegExp.prototype.test),pU=hU(TypeError);function mU(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return KH(e,t,n)}}function hU(e){return function(){return qH(e,[...arguments])}}function gU(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:eU;if(RH&&RH(e,null),!$H(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(zH(t)||(t[r]=e),i=e)}e[i]=!0}return e}function _U(e){for(let t=0;t<e.length;t++)uU(e,t)||(e[t]=null);return e}function vU(e){let t=WH(null);for(let r of LH(e)){var n=FH(r,2);let i=n[0],a=n[1];uU(e,i)&&(t[i]=$H(a)?_U(a):a&&typeof a==`object`&&a.constructor===Object?vU(a):a)}return t}function yU(e){switch(typeof e){case`string`:return e;case`number`:return oU(e);case`boolean`:return sU(e);case`bigint`:return cU?cU(e):`0`;case`symbol`:return lU?lU(e):`Symbol()`;case`undefined`:return dU(e);case`function`:case`object`:{if(e===null)return dU(e);let t=e,n=bU(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:dU(e)}return dU(e)}default:return dU(e)}}function bU(e,t){for(;e!==null;){let n=VH(e,t);if(n){if(n.get)return mU(n.get);if(typeof n.value==`function`)return mU(n.value)}e=BH(e)}function n(){return null}return n}function xU(e){try{return fU(e,``),!0}catch{return!1}}var SU=HH(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),CU=HH(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),wU=HH([`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`]),TU=HH([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),EU=HH(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),DU=HH([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),OU=HH([`#text`]),kU=HH(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),AU=HH(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),jU=HH(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),MU=HH([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),NU=UH(/{{[\w\W]*|^[\w\W]*}}/g),PU=UH(/<%[\w\W]*|^[\w\W]*%>/g),FU=UH(/\${[\w\W]*/g),IU=UH(/^data-[\-\w.\u00B7-\uFFFF]+$/),LU=UH(/^aria-[\-\w]+$/),RU=UH(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zU=UH(/^(?:\w+script|data):/i),BU=UH(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),VU=UH(/^html$/i),HU=UH(/^[a-z][.\w]*(-[.\w]+)+$/i),UU=UH(/<[/\w!]/g),WU=UH(/<[/\w]/g),GU=UH(/<\/no(script|embed|frames)/i),KU=UH(/\/>/i),qU={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},JU=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],YU=HH(gU({},JU)),XU=function(){let e={};return JH(JU,t=>{e[t]=UH(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),HH(e)}(),ZU=function(){return typeof window>`u`?null:window},QU=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},$U=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},eW=function(e,t,n,r){return uU(e,t)&&$H(e[t])?gU(r.base?vU(r.base):{},e[t],r.transform):n},tW=function(e,t,n){let r=uU(e,t)?e[t]:void 0;return r&&typeof r==`object`?vU(r):n()};function nW(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ZU(),t=e=>nW(e);if(t.version=`3.4.14`,t.removed=[],!e||!e.document||e.document.nodeType!==qU.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=bU(d,`cloneNode`),p=bU(d,`remove`),m=bU(d,`nextSibling`),h=bU(d,`childNodes`),g=bU(d,`parentNode`),_=bU(d,`shadowRoot`),v=bU(d,`attributes`),y=o&&o.prototype?bU(o.prototype,`nodeType`):null,b=o&&o.prototype?bU(o.prototype,`nodeName`):null,x=o&&o.prototype?bU(o.prototype,`ownerDocument`):null,S=function(e){return y?y(e):e.nodeType},C=function(e){return b?b(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let w,T=``,E,D=!1,O=0,k=function(){if(O>0)throw pU(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ee=function(e){k(),O++;try{return w.createHTML(e)}finally{O--}},A=function(e){k(),O++;try{return w.createScriptURL(e)}finally{O--}},te=function(){return D||=(E=QU(u,i),!0),E},j=n,M=j.implementation,N=j.createNodeIterator,ne=j.createDocumentFragment,re=j.getElementsByTagName,ie=r.importNode,P=$U();t.isSupported=typeof LH==`function`&&typeof g==`function`&&M&&M.createHTMLDocument!==void 0;let ae=NU,oe=PU,F=FU,se=IU,ce=LU,le=zU,ue=BU,de=HU,fe=RU,I=null,L=gU({},[...SU,...CU,...wU,...EU,...OU]),R=null,pe=gU({},[...kU,...AU,...jU,...MU]),me=Object.seal(WH(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),he=null,ge=null,_e=Object.seal(WH(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),ve=!0,ye=!0,be=!1,xe=!0,Se=!1,Ce=!0,we=!1,Te=!1,Ee=null,De=null,Oe=!1,ke=!1,Ae=!1,je=!1,Me=!0,Ne=!1,Pe=`user-content-`,Fe=!0,Ie=!1,Le={},z=null,Re=gU({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),ze=null,Be=gU({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ve=null,B=gU({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),V=`http://www.w3.org/1998/Math/MathML`,He=`http://www.w3.org/2000/svg`,Ue=`http://www.w3.org/1999/xhtml`,We=Ue,H=!1,Ge=null,U=gU({},[V,He,Ue],tU),Ke=HH([`mi`,`mo`,`mn`,`ms`,`mtext`]),qe=gU({},Ke),Je=HH([`annotation-xml`]),Ye=gU({},Je),Xe=gU({},[`title`,`style`,`font`,`a`,`script`]),Ze=null,Qe=[`application/xhtml+xml`,`text/html`],$e=null,et=null,tt=n.createElement(`form`),nt=function(e){return e instanceof RegExp||e instanceof Function},rt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(et&&et===e)return;(!e||typeof e!=`object`)&&(e={}),e=vU(e),Ze=Qe.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,$e=Ze===`application/xhtml+xml`?tU:eU,I=eW(e,`ALLOWED_TAGS`,L,{transform:$e}),R=eW(e,`ALLOWED_ATTR`,pe,{transform:$e}),Ge=eW(e,`ALLOWED_NAMESPACES`,U,{transform:tU}),Ve=eW(e,`ADD_URI_SAFE_ATTR`,B,{transform:$e,base:B}),ze=eW(e,`ADD_DATA_URI_TAGS`,Be,{transform:$e,base:Be}),z=eW(e,`FORBID_CONTENTS`,Re,{transform:$e}),he=eW(e,`FORBID_TAGS`,vU({}),{transform:$e}),ge=eW(e,`FORBID_ATTR`,vU({}),{transform:$e}),Le=uU(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?vU(e.USE_PROFILES):e.USE_PROFILES:!1,ve=e.ALLOW_ARIA_ATTR!==!1,ye=e.ALLOW_DATA_ATTR!==!1,be=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=e.SAFE_FOR_TEMPLATES||!1,Ce=e.SAFE_FOR_XML!==!1,we=e.WHOLE_DOCUMENT||!1,ke=e.RETURN_DOM||!1,Ae=e.RETURN_DOM_FRAGMENT||!1,je=e.RETURN_TRUSTED_TYPE||!1,Oe=e.FORCE_BODY||!1,Me=e.SANITIZE_DOM!==!1,Ne=e.SANITIZE_NAMED_PROPS||!1,Fe=e.KEEP_CONTENT!==!1,Ie=e.IN_PLACE||!1,fe=xU(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:RU,We=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ue,qe=tW(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>gU({},Ke)),Ye=tW(e,`HTML_INTEGRATION_POINTS`,()=>gU({},Je));let t=tW(e,`CUSTOM_ELEMENT_HANDLING`,()=>WH(null));if(me=WH(null),uU(t,`tagNameCheck`)&&nt(t.tagNameCheck)&&(me.tagNameCheck=t.tagNameCheck),uU(t,`attributeNameCheck`)&&nt(t.attributeNameCheck)&&(me.attributeNameCheck=t.attributeNameCheck),uU(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(me.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),UH(me),Se&&(ye=!1),Ae&&(ke=!0),Le&&(I=gU({},OU),R=WH(null),Le.html===!0&&(gU(I,SU),gU(R,kU)),Le.svg===!0&&(gU(I,CU),gU(R,AU),gU(R,MU)),Le.svgFilters===!0&&(gU(I,wU),gU(R,AU),gU(R,MU)),Le.mathMl===!0&&(gU(I,EU),gU(R,jU),gU(R,MU))),_e.tagCheck=null,_e.attributeCheck=null,uU(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?_e.tagCheck=e.ADD_TAGS:$H(e.ADD_TAGS)&&(I===L&&(I=vU(I)),gU(I,e.ADD_TAGS,$e))),uU(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?_e.attributeCheck=e.ADD_ATTR:$H(e.ADD_ATTR)&&(R===pe&&(R=vU(R)),gU(R,e.ADD_ATTR,$e))),uU(e,`ADD_FORBID_CONTENTS`)&&$H(e.ADD_FORBID_CONTENTS)&&(z===Re&&(z=vU(z)),gU(z,e.ADD_FORBID_CONTENTS,$e)),Fe&&(I[`#text`]=!0),we&&gU(I,[`html`,`head`,`body`]),I.table&&(gU(I,[`tbody`]),delete he.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw pU(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw pU(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=w;w=e.TRUSTED_TYPES_POLICY;try{T=ee(``)}catch(e){throw w=t,e}}else e.TRUSTED_TYPES_POLICY===null?(w=void 0,T=``):(w===void 0&&(w=te()),w&&typeof T==`string`&&(T=ee(``)));HH&&HH(e),et=e},W=gU({},[...CU,...wU,...TU]),it=gU({},[...EU,...DU]),at=function(e,t,n){return t.namespaceURI===Ue?e===`svg`:t.namespaceURI===V?e===`svg`&&(n===`annotation-xml`||qe[n]):!!W[e]},ot=function(e,t,n){return t.namespaceURI===Ue?e===`math`:t.namespaceURI===He?e===`math`&&Ye[n]:!!it[e]},G=function(e,t,n){return t.namespaceURI===He&&!Ye[n]||t.namespaceURI===V&&!qe[n]?!1:!it[e]&&(Xe[e]||!W[e])},st=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:We,tagName:`template`});let n=eU(e.tagName),r=eU(t.tagName);return Ge[e.namespaceURI]?e.namespaceURI===He?at(n,t,r):e.namespaceURI===V?ot(n,t,r):e.namespaceURI===Ue?G(n,t,r):!!(Ze===`application/xhtml+xml`&&Ge[e.namespaceURI]):!1},K=function(e){ZH(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw pU(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},ct=function(e,t,n){try{e.removeAttributeNode(t)}catch{try{e.removeAttribute(n)}catch{}}},lt=function(e){ft(e);let t=h(e);if(t){let e=[];JH(t,t=>{ZH(e,t)}),JH(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&ct(e,r,i)}},ut=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}ZH(t.removed,{attribute:r||null,from:n});try{r?n.removeAttributeNode(r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(ke||Ae)try{K(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},dt=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||R[$e(i)]||ct(e,r,i)}},ft=function(e){let t=[e];for(;t.length>0;){let e=t.pop();S(e)===qU.element&&dt(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},pt=function(e,t){return Ce?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},mt=function(e){if(!Ce)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=S(e);if(n===qU.processingInstruction||n===qU.comment&&fU(WU,e.data)){try{p(e)}catch{}continue}if(n===qU.element){let t=e,n=$e(C(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&pt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},ht=function(e){let t=null,r=null;if(Oe)e=`<remove></remove>`+e;else{let t=nU(e,/^[\r\n\t ]+/);r=t&&t[0]}Ze===`application/xhtml+xml`&&We===Ue&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=w?ee(e):e;if(We===Ue)try{t=new l().parseFromString(i,Ze)}catch{}if(!t||!t.documentElement){t=M.createDocument(We,`template`,null);try{t.documentElement.innerHTML=H?T:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),We===Ue?re.call(t,we?`html`:`body`)[0]:we?t.documentElement:a},gt=function(e){let t=x?x(e):e.ownerDocument;return N.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},q=function(e){return e=rU(e,ae,` `),e=rU(e,oe,` `),e=rU(e,F,` `),e},_t=function(e){e.normalize();let t=x?x(e):e.ownerDocument,n=N.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=q(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&JH(i,e=>{yt(e.content)&&_t(e.content)})},vt=function(e){let t=b?b(e):null;return typeof t!=`string`||$e(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},yt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===qU.documentFragment}catch{return!1}},bt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function xt(e,n,r){e.length!==0&&JH(e,e=>{e.call(t,n,r,et)})}let St=function(e,t){return!!(Ce&&e.hasChildNodes()&&!bt(e.firstElementChild)&&fU(UU,e.textContent)&&fU(UU,e.innerHTML)||Ce&&e.namespaceURI===Ue&&YU[t]&&(bt(e.firstElementChild)||typeof e.textContent==`string`&&fU(XU[t],e.textContent))||e.nodeType===qU.processingInstruction||Ce&&e.nodeType===qU.comment&&fU(WU,e.data))},Ct=function(e,t){return e instanceof RegExp?fU(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},wt=function(e,t,n){if(!he[t]&&At(t)&&Ct(me.tagNameCheck,t))return!1;if(Fe&&!z[t]){let t=g(e),r=h(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,m(e))}}}return K(e),!0},Tt=function(e,t,n,r){return e.length===0?t:t===n||t===r?vU(t):t},Et=function(e,t){return e===t||g(e)!==null?!1:(Ie&&ft(e),!0)},Dt=function(e,n){if(xt(P.beforeSanitizeElements,e,null),Et(e,n))return!0;if(vt(e))return K(e),!0;let r=$e(C(e));if(I=Tt(P.uponSanitizeElement,I,L,Ee),xt(P.uponSanitizeElement,e,{tagName:r,allowedTags:I}),Et(e,n))return!0;if(St(e,r))return K(e),!0;if(he[r]||!(_e.tagCheck instanceof Function&&_e.tagCheck(r))&&!I[r]){let t=wt(e,r,n);return t===!1&&xt(P.afterSanitizeElements,e,null),t}if(S(e)===qU.element&&!st(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&fU(GU,e.innerHTML))return K(e),!0;if(Se&&e.nodeType===qU.text){let n=q(e.textContent);e.textContent!==n&&(ZH(t.removed,{element:e.cloneNode()}),e.textContent=n)}return xt(P.afterSanitizeElements,e,null),!1},Ot=function(e,t,r){if(ge[t]||pt(t,e)||Me&&(t===`id`||t===`name`)&&(r in n||r in tt))return!1;let i=R[t]||_e.attributeCheck instanceof Function&&_e.attributeCheck(t,e);return ye&&fU(se,t)||ve&&fU(ce,t)?!0:i?Ve[t]||fU(fe,rU(r,ue,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&iU(r,`data:`)===0&&ze[e]||be&&!fU(le,rU(r,ue,``))?!0:!r:At(e)&&Ct(me.tagNameCheck,e)&&Ct(me.attributeNameCheck,t,e)||t===`is`&&me.allowCustomizedBuiltInElements&&Ct(me.tagNameCheck,r)},kt=gU({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),At=function(e){return!kt[eU(e)]&&fU(de,e)},jt=function(e,t,n,r){if(w&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ee(r);case`TrustedScriptURL`:return A(r)}return r},Mt=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),vt(e)?K(e):XH(t.removed)}catch{ut(n,e)}},Nt=function(e){xt(P.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||vt(e))return;R=Tt(P.uponSanitizeAttribute,R,pe,De);let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:R,forceKeepAttr:void 0},r=t.length,i=$e(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=$e(o),u=c,d=o===`value`?u:aU(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,xt(P.uponSanitizeAttribute,e,n),d=n.attrValue,Ne&&(l===`id`||l===`name`)&&iU(d,Pe)!==0&&(ut(o,e,a),d=Pe+d),Ce&&fU(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){ut(o,e,a);continue}if(l===`attributename`&&nU(d,`href`)){ut(o,e,a);continue}if(!n.forceKeepAttr){if(!n.keepAttr){ut(o,e,a);continue}if(!xe&&fU(KU,d)){ut(o,e,a);continue}if(Se&&(d=q(d)),!Ot(i,l,d)){ut(o,e,a);continue}d=jt(i,l,s,d),d!==u&&Mt(e,o,s,d)}}xt(P.afterSanitizeAttributes,e,null)},Pt=function(e){let t=null,n=gt(e);for(xt(P.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(xt(P.uponSanitizeShadowNode,t,null),Dt(t,e),Nt(t),yt(t.content)&&Pt(t.content),S(t)===qU.element){let e=_(t);yt(e)&&(Ft(e),Pt(e))}xt(P.afterSanitizeShadowDOM,e,null)},Ft=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Pt(e.shadow);continue}let n=e.node,r=S(n)===qU.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&$e(e)===`template`){let e=n.content;yt(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);yt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(H=!e,H&&(e=`<!-->`),typeof e!=`string`&&!bt(e)&&(e=yU(e),typeof e!=`string`))throw pU(`dirty is not a string, aborting`);if(!t.isSupported)return e;Te?(I=Ee,R=De):rt(n),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(I=vU(I)),P.uponSanitizeAttribute.length>0&&(R=vU(R)),t.removed=[];let c=Ie&&typeof e!=`string`&&bt(e);if(c){mt(e);let t=C(e);if(typeof t==`string`){let n=$e(t);if(!I[n]||he[n])throw lt(e),pU(`root node is forbidden and cannot be sanitized in-place`)}if(vt(e))throw lt(e),pU(`root node is clobbered and cannot be sanitized in-place`);try{Ft(e)}catch(t){throw lt(e),t}}else if(bt(e))i=ht(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===qU.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Ft(a);else{if(!ke&&!Se&&!we&&e.indexOf(`<`)===-1)return w&&je?ee(e):e;if(i=ht(e),!i)return ke?null:je?T:``}i&&Oe&&K(i.firstChild);let l=c?e:i;try{let e=gt(l);for(;o=e.nextNode();)Dt(o,l),Nt(o),yt(o.content)&&Pt(o.content)}catch(n){throw c&&(lt(e),JH(t.removed,e=>{e.element&&ft(e.element)})),n}if(c)return JH(t.removed,e=>{e.element&&ft(e.element)}),Se&&_t(e),e;if(ke){if(Se&&_t(i),Ae)for(s=ne.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(R.shadowroot||R.shadowrootmode)&&(s=ie.call(r,s,!0)),s}let u=we?i.outerHTML:i.innerHTML;return we&&I[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&fU(VU,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
784
- `+u),Se&&(u=q(u)),w&&je?ee(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};rt(e),Te=!0,Ee=I,De=R},t.clearConfig=function(){et=null,Te=!1,Ee=null,De=null,w=E,T=``},t.isValidAttribute=function(e,t,n){et||rt({});let r=$e(e),i=$e(t);return Ot(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&uU(P,e)&&ZH(P[e],t)},t.removeHook=function(e,t){if(uU(P,e)){if(t!==void 0){let n=YH(P[e],t);return n===-1?void 0:QH(P[e],n,1)[0]}return XH(P[e])}},t.removeHooks=function(e){uU(P,e)&&(P[e]=[])},t.removeAllHooks=function(){P=$U()},t}var rW=nW();function iW(e){let t=e.trim().replaceAll(`\\`,`/`);if(!(!t||/[\u0000-\u001f\u007f]/.test(t)||t.startsWith(`//`))){if(/^file:/i.test(t)){if(!URL.canParse(t))return;let e=new URL(t);return e.hostname&&e.hostname!==`localhost`?void 0:aW(e.pathname.replace(/^\/([a-z]:\/)/i,`$1`))}if(!/^[a-z][a-z\d+.-]*:/i.test(t)||/^[a-z]:\//i.test(t))return aW(t)}}function aW(e){try{let t=decodeURIComponent(e);return/[\u0000-\u001f\u007f]/.test(t)||t.startsWith(`//`)||t.startsWith(`\\\\`)?void 0:t}catch{return}}function oW(e){let t=new Map;return{update(n){let r=Array.from(n.querySelectorAll(`img[data-local-image]`)),i=new Set(r.map(e=>e.dataset.localImage));t.forEach((e,n)=>{i.has(n)||(e.controller.abort(),e.url&&URL.revokeObjectURL(e.url),t.delete(n))}),r.forEach(r=>{let i=r.dataset.localImage;if(!i)return;let a=t.get(i),o=a??{controller:new AbortController,result:Promise.resolve(void 0),url:void 0};a||(t.set(i,o),o.result=e(i,o.controller.signal).then(async e=>{if(e&&!o.controller.signal.aborted)return e.type===`image/svg+xml`?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await e.text())}`:(o.url=URL.createObjectURL(e),o.url)}).catch(()=>void 0)),o.result.then(e=>{e&&!o.controller.signal.aborted&&n.contains(r)&&r.dataset.localImage===i&&(r.src=e)})})},dispose(){t.forEach(e=>{e.controller.abort(),e.url&&URL.revokeObjectURL(e.url)}),t.clear()}}}var sW=200,cW=new Map,lW=new Map,uW=typeof window<`u`?rW(window):rW,dW={USE_PROFILES:{html:!0,mathMl:!0},SANITIZE_NAMED_PROPS:!0,FORBID_TAGS:[`style`],FORBID_CONTENTS:[`style`,`script`],ADD_TAGS:[`svg`,`path`],ADD_ATTR:[`d`,`viewBox`,`preserveAspectRatio`,`xmlns`,`target`]};typeof window<`u`&&uW.isSupported&&(uW.addHook(`beforeSanitizeAttributes`,e=>{if(!(e instanceof HTMLImageElement))return;e.removeAttribute(`data-local-image`);let t=iW(e.getAttribute(`src`)??``);t&&(e.setAttribute(`data-local-image`,t),e.removeAttribute(`src`),e.removeAttribute(`srcset`))}),uW.addHook(`afterSanitizeAttributes`,e=>{if(!(e instanceof HTMLAnchorElement)||e.target!==`_blank`)return;let t=e.getAttribute(`rel`)??``,n=new Set(t.split(/\s+/).filter(Boolean));n.add(`noopener`),n.add(`noreferrer`),e.setAttribute(`rel`,Array.from(n).join(` `))}));function fW(e){return uW.isSupported?uW.sanitize(e,dW):``}function pW(e){return cW.get(e)}function mW(e,t){if(cW.delete(e),cW.set(e,t),cW.size<=sW)return;let n=cW.keys().next().value;n&&cW.delete(n)}function hW(e,t){let n=t?pW(t):void 0;if(t&&n?.raw===e.raw)return lW.delete(t),mW(t,n),n;if(uW.isSupported)try{let n=AH(e.src);if(n===void 0)return;let r=Tf(e.raw),i={raw:e.raw,hash:r??``,html:fW(n)};return t&&r&&(lW.delete(t),mW(t,i)),i}catch{return}}async function gW(e,t,n){if(n?.aborted)throw new LB;let r=t?pW(t):void 0;if(t&&r?.raw===e.raw)return lW.delete(t),mW(t,r),r;let i=t?lW.get(t):void 0,a=i?.raw===e.raw?i:_W(e,t),o=Symbol();return a.consumers.add(o),new Promise((e,r)=>{let i=()=>{n?.removeEventListener(`abort`,s),!(!a.consumers.delete(o)||a.consumers.size>0)&&(a.controller.abort(),t&&lW.get(t)===a&&lW.delete(t))},s=()=>{i(),r(new LB)};n?.addEventListener(`abort`,s,{once:!0}),a.promise.then(e,r).finally(i)})}function _W(e,t){let n=new AbortController,r=MB(e.src,n.signal).then(i=>{if(n.signal.aborted)throw new LB;let a=Tf(e.raw),o={raw:e.raw,hash:a??``,html:fW(i)};return t&&a&&lW.get(t)?.promise===r&&mW(t,o),o}).finally(()=>{t&&lW.get(t)?.promise===r&&lW.delete(t)}),i={raw:e.raw,promise:r,controller:n,consumers:new Set};return t&&lW.set(t,i),i}var vW=new Set(`a51,abap,abnf,action,ada,adb,adml,admx,ado,adoc,adp,ads,afm,agc,agda,ahk,ahkl,aidl,aj,ak,al,alg,als,ampl,angelscript,anim,ant,antlers.html,antlers.php,antlers.xml,apacheconf,apex,apib,apl,app,app.src,applescript,arc,arpa,arr,as,asax,asc,asciidoc,ascx,asd,asddls,ash,ashx,asl,asm,asmx,asn,asn1,asp,aspx,asset,astro,asy,au3,aug,auk,aux,avdl,avsc,aw,awk,axaml,axd,axi,axi.erb,axml,axs,axs.erb,b,bal,baml,bas,bash,bat,bats,bb,bbappend,bbclass,bbx,bdf,bdy,be,befunge,bf,bi,bib,bibtex,bicep,bicepparam,bison,blade,blade.php,blp,bmx,bones,boo,boot,bpl,bqn,brd,bro,brs,bru,bs,bsl,bst,bsv,builder,builds,bzl,c,c++,c++-objdump,c++objdump,c-objdump,c3,cabal,caddyfile,cairo,cake,capnp,carbon,cats,cbl,cbx,cc,ccp,ccproj,ccxml,cdc,cdf,cds,ceylon,cfc,cfg,cfm,cfml,cgi,cginc,ch,chem,chpl,chs,cil,circom,cirru,cj,cjs,cjsx,ck,cl,cl2,clar,click,clixml,clj,cljc,cljs,cljs.hl,cljscm,cljx,clp,cls,clue,clw,cmake,cmake.in,cmd,cmp,cnc,cnf,cob,cobol,cocci,code-snippets,code-workspace,coffee,coffee.md,com,command,conll,conllu,container,containerfile,cook,coq,cp,cpp,cpp-objdump,cppm,cppobjdump,cproject,cps,cpy,cql,cr,crc32,creole,cs,cs.pp,csc,cscfg,csd,csdef,csh,cshtml,csl,cson,csproj,css,csv,csx,ct,ctl,ctp,cts,cu,cue,cuh,curry,cw,cwl,cxx,cxx-objdump,cy,cylc,cyp,cypher,d,d-objdump,d2,dae,darcspatch,dart,das,dats,db2,dcl,ddl,decls,depproj,desktop,desktop.in,dfm,dfy,dhall,di,diff,dircolors,dita,ditamap,ditaval,djs,dll.config,dlm,dm,do,dockerfile,dof,doh,dot,dotsettings,dpatch,dpr,druby,dsc,dsl,dsp,dsr,dtx,duby,dwl,dyalog,dyl,dylan,dzn,e,eam.fs,eb,ebnf,ebuild,ec,ecl,eclass,eclxml,ecr,ect,edc,edge,edgeql,editorconfig,edn,eh,ejs,ejs.t,el,eliom,eliomi,elm,elv,em,emacs,emacs.desktop,emberscript,eml,env,epj,eps,epsi,eq,erb,erb.deface,erl,es,es6,escript,esdl,ex,exs,eye,f,f03,f08,f77,f90,f95,factor,fan,fancypack,fbs,fcgi,fea,feature,filters,fir,fish,flex,flf,flix,flux,fnc,fnl,for,forth,fp,fpp,fr,frag,frg,frm,frt,fs,fsh,fshader,fsi,fsproj,fst,fsti,fsx,fth,ftl,ftlh,fun,fut,fx,fxh,fxml,fy,g,g4,gaml,gap,gawk,gbl,gbo,gbp,gbr,gbs,gco,gcode,gd,gdb,gdbinit,gdnlib,gdns,gdshader,gdshaderinc,ged,gemspec,geo,geojson,geom,gf,gi,gitconfig,gitignore,gjs,gko,glade,gleam,glf,glsl,glslf,glslv,gltf,glyphs,gmi,gml,gms,gmx,gn,gni,gnu,gnuplot,go,god,gohtml,golo,gotmpl,gp,gpb,gpt,gpx,gql,grace,gradle,gradle.kts,graphql,graphqls,groovy,grt,grxml,gs,gsc,gsh,gshader,gsp,gst,gsx,gtkrc,gtl,gto,gtp,gtpl,gts,gv,gvy,gyp,gypi,h,h++,h.in,ha,hack,haml,haml.deface,handlebars,har,hats,hb,hbs,hc,hcl,heex,hh,hhi,hic,hip,hlean,hlsl,hlsli,hocon,hoon,hpp,hqf,hql,hrl,hs,hs-boot,hsc,hta,htm,html,html.eex,html.hl,html.tmpl,http,hurl,hx,hxml,hxsl,hxx,hy,hzp,i,i3,i7x,ical,ice,iced,icl,icls,ics,idc,idr,ig,ihlp,ijm,ijs,ik,il,ily,imba,iml,inc,ini,ink,inl,ino,ins,intr,io,iol,ipf,ipp,ipynb,irclog,isl,ispc,iss,iuml,ivy,ixx,j,j2,jac,jade,jai,jake,janet,jav,java,javascript,jbuilder,jcl,jelly,jflex,jinja,jinja2,jison,jisonlex,jl,jq,js,js.erb,jsb,jscad,jsfl,jsh,jslib,jsm,json,json-tmlanguage,json.example,json5,jsonc,jsonl,jsonld,jsonnet,jsp,jspre,jsproj,jss,jst,jsx,jte,just,k,kak,kdl,kicad_mod,kicad_pcb,kicad_sch,kicad_sym,kicad_wks,kid,kit,kk,kml,kojo,kql,krl,ks,ksh,ksy,kt,ktm,kts,kv,l,lagda,langium,lark,las,lasso,lasso8,lasso9,latte,launch,lbx,ld,lds,lean,leex,lektorproject,leo,less,lex,lfe,lgt,lhs,libsonnet,lid,lidr,ligo,linq,liq,liquid,lisp,litcoffee,livecodescript,livemd,lkml,ll,lmi,lock,lockb,logtalk,lol,lookml,lp,lpr,ls,lsl,lslp,lsp,ltx,lua,luau,lvclass,lvlib,lvproj,ly,m,m2,m3,m3u,m3u8,m4,ma,mak,make,makefile,mako,man,mao,markdown,marko,mask,mat,mata,matah,mathematica,matlab,mawk,maxhelp,maxpat,maxproj,mbox,mbt,mc,mcfunction,mch,mcmeta,mcr,md,md2,md4,md5,mdoc,mdown,mdpolicy,mdwn,mdx,me,mediawiki,mermaid,meta,metal,metta,mg,minid,mint,mir,mirah,mjml,mjs,mk,mkd,mkdn,mkdown,mkfile,mkii,mkiv,mkvi,ml,ml4,mli,mligo,mlir,mll,mly,mm,mmd,mmk,mms,mo,mod,mojo,monkey,monkey2,moo,moon,mount,move,mpl,mps,mq4,mq5,mqh,mrc,ms,msd,msg,mspec,mss,mt,mtl,mtml,mts,mu,mud,muf,mumps,muse,mustache,mxml,mxt,mysql,myt,mzn,n,nanorc,nas,nasl,nasm,natvis,nawk,nb,nbp,nc,ncl,ndproj,ne,nearley,ned,neon,network,nf,nginx,nginxconf,ni,nim,nim.cfg,nimble,nimrod,nims,ninja,nit,nix,njk,njs,nl,nlogo,no,nomad,nproj,nqp,nr,nse,nsh,nsi,nss,nu,numpy,numpyw,numsc,nuspec,nut,ny,ob2,obj,objdump,odd,odin,ol,omgrofl,ooc,opa,opal,opencl,opy,orc,org,os,osm,outjob,overpassql,owl,ox,oxh,oxo,oxygene,oz,p,p4,p6,p6l,p6m,p8,pac,pact,pan,parrot,pas,pascal,pasm,pat,patch,pb,pbi,pbt,pbtxt,pc,pc.in,pcbdoc,pck,pcss,pd,pd_lua,pddl,pde,peggy,pegjs,pep,per,perl,pfa,pgsql,ph,php,php3,php4,php5,phps,phpt,phtml,pic,pig,pike,pir,pkb,pkgproj,pkl,pks,pl,pl6,plantuml,plb,plist,plot,pls,plsql,plt,pluginspec,plx,pm,pm6,pml,pmod,po,pod,pod6,podsl,podspec,pogo,polar,pony,por,postcss,pot,pov,pp,pprx,pq,praat,prawn,prc,prefab,prefs,prg,pri,prisma,prjpcb,pro,proj,prolog,properties,props,proto,prw,ps,ps1,ps1xml,psc,psc1,psd1,psgi,psm1,pt,pub,pubxml,pug,puml,purs,pwn,pxd,pxi,py,py3,pyde,pyi,pyp,pyt,pytb,pyw,pyx,q,qasm,qbs,qc,qhelp,ql,qll,qmd,qml,qnt,qs,r,r2,r3,rabl,rake,raku,rakumod,raml,rascript,raw,razor,rb,rbbas,rbfrm,rbi,rbmnu,rbres,rbs,rbtbar,rbuild,rbuistate,rbw,rbx,rbxs,rchit,rd,rdf,rdoc,re,reb,rebol,red,reds,reek,reg,regex,regexp,rego,rei,religo,res,resi,resource,rest,rest.txt,resx,rex,rexx,rg,rhtml,ring,riot,rkt,rktd,rktl,rl,rmd,rmiss,rnh,rno,rnw,robot,roc,rockspec,roff,ron,ronn,rpgle,rpy,rq,rs,rs.in,rsc,rsh,rss,rst,rst.txt,rsx,rtf,ru,ruby,rviz,s,sage,sagews,sail,sarif,sas,sass,sats,sbatch,sbt,sc,scad,scala,scaml,scd,sce,scenic,sch,schdoc,sci,scm,sco,scpt,scrbl,scss,scxml,sdc,sed,self,service,sexp,sfd,sfproj,sfv,sh,sh-session,sh.in,sha1,sha2,sha224,sha256,sha256sum,sha3,sha384,sha512,shader,shen,shproj,sieve,sig,sj,sjs,sl,slang,sld,slim,slint,sln,slnlaunch,slnx,sls,slurm,sma,smali,smithy,smk,sml,smt,smt2,snakefile,snap,snip,snippet,snippets,socket,sol,soy,sp,sparql,spc,spec,spin,sps,sqf,sql,sqlrpgle,sra,srdf,srt,sru,srv,srw,ss,ssjs,sss,st,stan,star,sthlp,stl,ston,story,storyboard,sttheme,sty,styl,sublime-build,sublime-color-scheme,sublime-commands,sublime-completions,sublime-keymap,sublime-macro,sublime-menu,sublime-mousemap,sublime-project,sublime-settings,sublime-snippet,sublime-syntax,sublime-theme,sublime-workspace,sublime_metrics,sublime_session,sum,surql,sv,svelte,svg,svh,svx,sw,swg,swift,swig,syntax,t,tab,tac,tact,tag,talon,target,targets,tcc,tcl,tcl.in,tcsh,te,tea,templ,tesc,tese,tex,texi,texinfo,textgrid,textile,textproto,tf,tfstate,tfstate.backup,tftpl,tfvars,thor,thrift,thy,timer,tl,tla,tlv,tm,tmac,tmcommand,tmdl,tml,tmlanguage,tmpl,tmpreferences,tmsnippet,tmtheme,tmux,toc,tofu,toit,toml,toml.example,tool,topojson,tpb,tpl,tpp,tps,tres,trg,trigger,ts,tscn,tsconfig.json,tsp,tst,tsv,tsx,ttl,tu,twig,txi,txl,txt,txtpb,txx,typ,uc,udf,udo,ui,unity,uno,upc,uplc,ur,urdf,url,urs,ux,v,vala,vapi,vark,vb,vba,vbhtml,vbproj,vbs,vcf,vcl,vcxproj,vdf,veo,vert,vh,vhd,vhdl,vhf,vhi,vho,vhost,vhs,vht,vhw,vim,vimrc,viw,vmb,vmf,volt,vrx,vs,vsh,vshader,vsixmanifest,vssettings,vstemplate,vtl,vto,vtt,vue,vw,vxml,vy,w,wast,wat,watchr,wdl,webapp,webidl,webmanifest,weechatlog,wgsl,whiley,wiki,wikitext,wisp,wit,wixproj,wl,wlk,wls,wlt,wlua,workbook,workflow,wren,ws,wsdl,wsf,wsgi,wxi,wxl,wxs,x,x10,x3d,x68,xacro,xaml,xbm,xc,xdc,xht,xhtml,xi,xib,xlf,xliff,xm,xmi,xml,xml.dist,xmp,xojo_code,xojo_menu,xojo_report,xojo_script,xojo_toolbar,xojo_window,xpl,xpm,xproc,xproj,xpy,xq,xql,xqm,xquery,xqy,xrl,xs,xsd,xsh,xsjs,xsjslib,xsl,xslt,xsp-config,xsp.metadata,xspec,xtend,xul,xzap,y,yacc,yaml,yaml-tmlanguage,yaml.sed,yang,yap,yar,yara,yasnippet,yml,yml.mysql,yrl,yul,yy,yyp,z3,zap,zcml,zed,zeek,zep,zig,zig.zon,zil,zimpl,zmodel,zmpl,zone,zpl,zs,zsh,zsh-theme`.split(`,`)),yW=new Set(`.abbrev_defs,.ackrc,.all-contributorsrc,.arcconfig,.atomignore,.auto-changelog,.babelignore,.babelrc,.bash_aliases,.bash_functions,.bash_history,.bash_logout,.bash_profile,.bashrc,.browserslistrc,.buckconfig,.bzrignore,.c8rc,.ckignore,.clang-format,.clang-tidy,.clangd,.classpath,.coffeelintignore,.coveragerc,.cshrc,.curlrc,.cvsignore,.dir_colors,.dockerignore,.easignore,.eleventyignore,.env.ci,.env.dev,.env.development,.env.development.local,.env.example,.env.local,.env.prod,.env.production,.env.sample,.env.staging,.env.template,.env.test,.env.testing,.envrc,.eslint-ignore,.eslintignore,.exrc,.factor-boot-rc,.factor-rc,.flake8,.flaskenv,.gclient,.gemrc,.git-blame-ignore-revs,.gitattributes,.gitmodules,.gnus,.gvimrc,.htaccess,.htmlhintrc,.ignore,.imgbotconfig,.inputrc,.irbrc,.jscsrc,.jshintrc,.jslintrc,.justfile,.kshrc,.latexmkrc,.login,.luacheckrc,.markdownlintignore,.nodemonignore,.npmignore,.npmrc,.nvimrc,.nycrc,.php_cs,.php_cs.dist,.prettierignore,.profile,.project,.pryrc,.pylintrc,.rgignore,.rprofile,.rspec,.scalafix.conf,.scalafmt.conf,.shellcheckrc,.simplecov,.spacemacs,.stylelintignore,.swcrc,.tern-config,.tern-project,.tgitconfig,.tm_properties,.tmux.conf,.vercelignore,.viper,.vscodeignore,.watchmanconfig,.wgetrc,.xcompose,.xinitrc,.xsession,.yardopts,.zlogin,.zlogout,.zprofile,.zshenv,.zshrc,9fs,_curlrc,_dir_colors,_dircolors,_emacs,_redirects,_vimrc,abbrev_defs,ack,ackrc,android.bp,apache2.conf,apkbuild,app.config,appraisals,bash_aliases,bash_logout,bash_profile,bashrc,berksfile,brewfile,browserslist,bsdmakefile,buck,build,build.bazel,buildfile,cabal.config,cabal.project,caddyfile,cakefile,capfile,cargo.toml.orig,cask,citation,citation.cff,citations,cksums,codeowners,commit_editmsg,config.worktree,configure.ac,containerfile,contents.lr,copying,cpanfile,crontab,cshrc,dangerfile,deliverfile,deps,dir_colors,dockerfile,dune-project,earthfile,eask,emakefile,encodings.dir,eqnrc,expr-dist,fakefile,fastfile,file_contexts,firestore.rules,fontlog,fonts.alias,fonts.dir,fonts.scale,fp-lib-table,gemfile,genfs_contexts,gitignore-global,gitignore_global,gnumakefile,go.work,gradlew,gtkrc,gtkrc-2.0,guardfile,gvimrc,hosts,httpd.conf,initial_sids,inputrc,install,jakefile,jarfile,jenkinsfile,justfile,kakrc,kbuild,kshrc,latexmkrc,ld.script,license,login,m3makefile,m3overrides,makefile,makefile.am,makefile.in,man,manifest.mf,mavenfile,mcmod.info,md5sums,meson.build,mkfile,mmn,mmt,mocha.opts,module.bazel,modulefile,mvnw,nanorc,news,nextflow.config,nginx.conf,notebook,nuget.config,nukefile,nvimrc,owh,package.resolved,packages.config,phakefile,pipfile,pkgbuild,podfile,port_contexts,procfile,profile,project.ede,project.godot,puppetfile,pylintrc,rakefile,readme.1st,rebar.config,rexfile,riemann.config,root,sconscript,sconstruct,security_classes,settings.stylecop,sha1sums,sha256sums,sha512sums,singularity,slakefile,snakefile,snapfile,ssh-config,ssh_config,sshconfig,sshd-config,sshd_config,starfield,steepfile,suite.rc,thorfile,tiltfile,tmux.conf,torrc,troffrc,troffrc-end,vagrantfile,vimrc,vlcrc,web.config,web.debug.config,web.release.config,workspace,workspace.bazel,workspace.bzlmod,wscript,xcompose,xinitrc,xsession,zlogin,zlogout,zprofile,zshenv,zshrc`.split(`,`)),bW=new Set(`9fs._curlrc._dir_colors._dircolors._emacs._redirects._vimrc.abbrev_defs.ack.ackrc.apkbuild.appraisals.bash_aliases.bash_logout.bash_profile.bashrc.berksfile.brewfile.browserslist.bsdmakefile.buck.build.buildfile.caddyfile.cakefile.capfile.cask.citation.citations.cksums.codeowners.commit_editmsg.containerfile.copying.cpanfile.crontab.cshrc.dangerfile.deliverfile.deps.dir_colors.dockerfile.dune-project.earthfile.eask.emakefile.eqnrc.expr-dist.fakefile.fastfile.file_contexts.fontlog.fp-lib-table.gemfile.genfs_contexts.gitignore-global.gitignore_global.gnumakefile.gradlew.gtkrc.guardfile.gvimrc.hosts.initial_sids.inputrc.install.jakefile.jarfile.jenkinsfile.justfile.kakrc.kbuild.kshrc.latexmkrc.license.login.m3makefile.m3overrides.makefile.man.mavenfile.md5sums.mkfile.mmn.mmt.modulefile.mvnw.nanorc.news.notebook.nukefile.nvimrc.owh.phakefile.pipfile.pkgbuild.podfile.port_contexts.procfile.profile.puppetfile.pylintrc.rakefile.rexfile.root.sconscript.sconstruct.security_classes.sha1sums.sha256sums.sha512sums.singularity.slakefile.snakefile.snapfile.ssh-config.ssh_config.sshconfig.sshd-config.sshd_config.starfield.steepfile.thorfile.tiltfile.torrc.troffrc.troffrc-end.vagrantfile.vimrc.vlcrc.workspace.wscript.xcompose.xinitrc.xsession.zlogin.zlogout.zprofile.zshenv.zshrc`.split(`.`));function xW(e){if(/^https?:\/\//i.test(e))return`url`;if(!/^[a-z][a-z0-9+.-]*:\/\//i.test(e)&&e!==`/`&&!/^\/[a-z][a-z0-9-]*$/i.test(e)&&!/\s/.test(e)&&!/[()\[\]{}*+=<>|&^"';]/.test(e)&&(/[/\\]/.test(e)||/^\.\.?[/\\]/.test(e)||SW(e)||CW(e)))return`path`}function SW(e){let t=e.toLowerCase();if(t.endsWith(`.d.ts`))return!0;let n=t.lastIndexOf(`.`);return n!==-1&&vW.has(t.slice(n+1))}function CW(e){let t=e.toLowerCase();if(yW.has(t))return!0;let n=t.indexOf(`.`);return n!==-1&&bW.has(t.slice(0,n))}var wW,TW=0;async function EW(e){let t=await(wW??=DW());if(await t.parse(e,{suppressErrors:!0}))return(await t.render(`markdown-mermaid-${TW++}`,e)).svg}async function DW(){let{default:e}=await X(async()=>{let{default:e}=await import(`./mermaid.core-DpRyWAPv.js`);return{default:e}},__vite__mapDeps([125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142]));return e.initialize({startOnLoad:!1,securityLevel:`strict`,theme:document.documentElement.dataset.colorScheme===`light`?`default`:`dark`,flowchart:{htmlLabels:!1}}),e}var OW=G(`<span data-markdown-word>`);function kW(e,t,n){let[r,i]=Qt(jW(t,n)),a=!1,o=ot(()=>z(H,{each:r,children:e=>z(AW,{node:e,animate:()=>a})}),e);return a=!0,{update(e,t,n=!0){i(nn(jW(e,t,n),{key:`key`}))},dispose:o}}function AW(e){let t=e.node;if(t.type===`text`)return t.text;if(t.type===`word`){let n;return oe(()=>{e.animate()&&t.animate&&n?.setAttribute(`data-markdown-enter`,``)}),(()=>{var e=OW(),r=n;return typeof r==`function`?gt(r,e):n=e,q(e,()=>t.text),e})()}return z(Nt,B({get component(){return t.tag}},()=>t.attributes,{get children(){return z(H,{get each(){return t.children},children:t=>z(AW,{node:t,get animate(){return e.animate}})})}}))}function jW(e,t,n=!1){let r=document.createElement(`template`);return r.innerHTML=e,Array.from(r.content.childNodes).flatMap((e,r)=>MW(e,`${r}`,t,n))}function MW(e,t,n,r){return e instanceof Text?n?e.data.split(/(\s+)/).flatMap((e,n)=>e?/^\s+$/.test(e)?[{key:`${t}:${n}`,type:`text`,text:e}]:[{key:`${t}:${n}`,type:`word`,text:e,...r?{animate:!0}:{}}]:[]):[{key:t,type:`text`,text:e.data}]:e instanceof Element?[{key:t,type:`element`,tag:e.tagName.toLowerCase(),attributes:Object.fromEntries(Array.from(e.attributes).map(e=>[e.name,e.value])),children:Array.from(e.childNodes).flatMap((e,i)=>MW(e,`${t}.${i}`,n,r))}]:[]}var NW=L(),PW=()=>R(NW),FW=G(`<div data-component=markdown dir=auto>`),IW=new WeakMap,LW=new WeakMap;function RW(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}function zW(e){return RW(e).replace(/\r\n?/g,`
785
- `).replace(/\n/g,`<br>`)}async function BW(e,t,n,r=!1){try{let i=await FB(n,e,t??`text`,r);return{language:i.language,generation:i.generation,stable:i.stable,unstable:i.unstable}}catch(n){return!(n instanceof LB)&&!(n instanceof RB)&&!(n instanceof zB)&&console.error(`Markdown highlighting worker failed`,n),{language:t??`text`,generation:0,stable:[],unstable:[[e,``]]}}}var VW=new WeakMap,HW=/^https?:\/\/[^\s<>()`"']+$/;function UW(e){let t=e.trim().replace(/[),.;!?]+$/,``);if(HW.test(t))try{return new URL(t).toString()}catch{return}}function WW(e){let t=document.createElement(`div`);t.setAttribute(`data-slot`,`markdown-copy-button`);let n={};return n.dispose=ot(()=>{let[t,r]=A(e,{equals:!1}),[i,a]=A(!1);return n.setLabels=r,n.setCopied=a,z(GW,{get labels(){return t()},get copied(){return i()}})},t),VW.set(t,n),t}function GW(e){let t=()=>e.copied?e.labels.copied:e.labels.copy;return z(Sl,{placement:`top`,get value(){return t()},get children(){return z(Lo,{type:`button`,size:`normal`,variant:`ghost-muted`,get"aria-label"(){return t()},get icon(){return[z(No,{name:`outline-copy`,"data-copy-icon":!0}),z(No,{name:`check`,"data-check-icon":!0})]}})}})}function KW(e,t,n){let r=VW.get(e);if(r?.setLabels(t),r?.setCopied(n),n){e.setAttribute(`data-copied`,`true`);return}e.removeAttribute(`data-copied`)}function qW(e){VW.get(e)?.dispose(),VW.delete(e)}function JW(e){[...e instanceof HTMLElement&&e.getAttribute(`data-slot`)===`markdown-copy-button`?[e]:[],...Array.from(e.querySelectorAll(`[data-slot="markdown-copy-button"]`)).filter(e=>e instanceof HTMLElement)].forEach(qW)}function YW(e){[...e instanceof HTMLDivElement&&e.hasAttribute(`data-markdown-block`)?[e]:[],...Array.from(e.querySelectorAll(`[data-markdown-block]`))].forEach(e=>{LW.get(e)?.renderer.dispose(),LW.delete(e)})}var XW=new Set([`bash`,`sh`,`shell`,`zsh`,`fish`,`console`,`terminal`]);function ZW(e){let t=e?.toLowerCase();if(t&&XW.has(t))return`shell`}function QW(e,t){t?e.dataset.language=t:delete e.dataset.language;let n=ZW(t);n?e.dataset.codeKind=n:delete e.dataset.codeKind}function $W(e,t,n){if(!t.classList.contains(`language-mermaid`)){eG(e);return}let r=t.textContent??``;if(!r)return;let i=e.querySelector(`[data-component="markdown-mermaid"]`)??document.createElement(`div`);i.setAttribute(`data-component`,`markdown-mermaid`),i.parentElement||e.appendChild(i),e.dataset.mermaidPending=`true`;let a=n?r:r.slice(0,r.lastIndexOf(`
786
- `)+1);if(!a)return;let o=`${n?`complete`:`streaming`}:${a.length}`;e.dataset.mermaidAttempt!==o&&(e.dataset.mermaidAttempt=o,EW(a).then(o=>{if(!o){n&&t.textContent===r&&eG(e);return}(t.textContent??``).startsWith(a)&&(i.innerHTML=o,delete e.dataset.mermaidPending,e.dataset.mermaidReady=`true`)}).catch(()=>{n&&t.textContent===r&&eG(e)}))}function eG(e){delete e.dataset.mermaidAttempt,delete e.dataset.mermaidPending,delete e.dataset.mermaidReady,e.querySelector(`[data-component="markdown-mermaid"]`)?.remove()}function tG(e){let t=Array.from(e.querySelectorAll(`:not(pre) > code`));for(let e of t){let t=UW(e.textContent??``),n=e.parentElement instanceof HTMLAnchorElement&&e.parentElement.classList.contains(`external-link`)?e.parentElement:null;if(!t){n&&n.replaceWith(e);continue}if(n){n.href=t;continue}let r=document.createElement(`a`);r.href=t,r.className=`external-link`,r.target=`_blank`,r.rel=`noopener noreferrer`,e.parentNode?.replaceChild(r,e),r.appendChild(e)}}function nG(e){let t=Array.from(e.querySelectorAll(`:not(pre) > code`));for(let e of t){if(!(e instanceof HTMLElement))continue;delete e.dataset.inlineCodeKind;let t=xW(e.textContent??``);t&&(e.dataset.inlineCodeKind=t)}}function rG(e,t){let n=new Map,r=e=>{KW(e,t(),e.getAttribute(`data-copied`)===`true`)},i=async e=>{let r=e.target;if(!(r instanceof Element))return;let i=r.closest(`[data-slot="markdown-copy-button"]`);if(!(i instanceof HTMLElement))return;let a=i.closest(`[data-component="markdown-code"]`)?.querySelector(`code`)?.textContent??``;if(!a)return;let o=navigator?.clipboard;if(!o)return;await o.writeText(a);let s=t();KW(i,s,!0);let c=n.get(i);c&&clearTimeout(c);let l=setTimeout(()=>KW(i,s,!1),2e3);n.set(i,l)},a=Array.from(e.querySelectorAll(`[data-slot="markdown-copy-button"]`));for(let e of a)e instanceof HTMLElement&&r(e);return e.addEventListener(`click`,i),()=>{e.removeEventListener(`click`,i);for(let e of n.values())clearTimeout(e);JW(e)}}function iG(e,t,n,r,i){if(!e)return{text:e,blocks:[],ready:!0};let a=t??Tf(e);if(a){let t=n.blocks.flatMap((e,t)=>{if(e.mode===`code`)return[];let n=`${a}:${t}:${e.mode}`,i=e.mode===`full`?hW(e,n):pW(n);return i?.raw===e.raw?(e.mode!==`full`&&mW(n,i),[{key:`${r}:${n}`,mode:e.mode,...i}]):[]});if(t.length===n.blocks.length)return{text:e,blocks:t,ready:!0}}return i?{text:e,blocks:[],ready:!1}:{text:e,ready:!1,blocks:[{key:`initial`,mode:`full`,raw:e,hash:Tf(e)??``,html:zW(e)}]}}function aG(e){return{text:e,blocks:e?[{raw:e,src:e,mode:`live`}]:[]}}function oG(e){let[t,n]=V(e,[`text`,`cacheKey`,`streaming`,`deferUntilReady`,`class`,`classList`]),r=Al(),i=PW(),[a,o]=A(),s=Ue(),c=new AbortController,l=new Set,u=new Map,d=!1,[f]=re(()=>{let e=t.streaming??!1;if(e&&(d=!0),e||d)return{key:s,text:t.text,live:e}},e=>NB(e.key,e.text,e.live),{initialValue:aG(``)}),p=()=>{if(!(t.streaming??!1)&&!d)return hB(t.text);let e=f.latest;return e?.text===t.text||e?.text?e:aG(t.text)},m=iG(t.text,t.cacheKey,t.streaming?aG(t.text):hB(t.text),s,t.deferUntilReady),[h]=re(()=>{let e=!(t.streaming??!1)&&!d?hB(t.text):f.latest;if(e&&e.text===t.text)return{text:t.text,key:t.cacheKey,projection:e}},e=>{if(!e.text)return{text:e.text,blocks:[],ready:!0};if(!d&&m.ready&&m.text===e.text)return m;let t=e.key??Tf(e.text);return Promise.all(e.projection.blocks.map(async(n,r)=>{let i=t?`${t}:${r}:${n.mode}`:void 0,a=vB(s,e.key,r,n.mode);if(n.mode===`code`){let e=u.get(a);if(n.complete&&e?.raw===n.raw)return e;let t=await BW(n.src,n.language,a,n.complete),r={key:a,mode:n.mode,raw:n.raw,hash:String(n.raw.length),complete:!!n.complete,...t};return n.complete&&u.set(a,r),r}let o=n.mode===`full`?hW(n,i):void 0;return{key:a,mode:n.mode,...o??await gW(n,i,c.signal)}})).then(t=>({text:e.text,blocks:t,ready:!0})).catch(()=>c.signal.aborted?{text:e.text,blocks:[],ready:!1}:{text:e.text,ready:!0,blocks:[{key:t??`fallback`,mode:`full`,raw:e.text,hash:Tf(e.text)??``,html:zW(e.text)}]})},{initialValue:m}),g,_,v;return M(()=>{let e=a(),n=h.latest??h(),o=p(),c=t.text?sG(n,o,t.cacheKey,s,t.deferUntilReady):[];if(!e)return;if(_!==i?.readImage&&(v?.dispose(),_=i?.readImage,v=_?oW(_):void 0),delete e.dataset.markdownReady,c.length===0){JW(e),YW(e),e.innerHTML=``,v?.update(e),n?.ready&&n.text===t.text&&(e.dataset.markdownReady=``);return}let u={copy:r.t(`ui.message.copy`),copied:r.t(`ui.message.copied`)},d=new Set(c.filter(e=>e.mode===`code`).map(e=>e.key));for(l.forEach(e=>{d.has(e)||cG(e)}),l.clear(),d.forEach(e=>l.add(e)),c.forEach((t,n)=>lG(e,n,t,u));e.children.length>c.length;){let t=e.lastElementChild;if(!t)break;JW(t),YW(t),t.remove()}v?.update(e),e.querySelectorAll(`[data-slot="markdown-copy-button"]`).forEach(e=>KW(e,u,e.dataset.copied===`true`)),g||=rG(e,()=>({copy:r.t(`ui.message.copy`),copied:r.t(`ui.message.copied`)})),n?.ready&&n.text===t.text&&(e.dataset.markdownReady=``)}),F(()=>{c.abort(),v?.dispose(),g&&g();let e=a();e&&YW(e),d&&PB(s),l.forEach(cG),u.clear()}),(()=>{var e=FW();return gt(o,e),ht(e,B({get classList(){return{...t.classList,[t.class??``]:!!t.class}}},n),!1,!1),e})()}function sG(e,t,n,r,i){if(!e)return[];if(!t||e.text===t.text||i)return e.blocks;let a=e.blocks.length===1&&e.blocks[0]?.key===`initial`;return t.blocks.map((t,i)=>{let o=a?void 0:e.blocks[i];if(o&&gB(o,t))return o;let s=vB(r,n,i,t.mode);return t.mode===`code`?{key:s,mode:t.mode,raw:t.raw,hash:String(t.raw.length),language:t.language??`text`,complete:!!t.complete,stable:[],generation:0,unstable:[[t.src,``]]}:{key:s,mode:t.mode,raw:t.raw,hash:String(t.raw.length),html:zW(t.src)}})}function cG(e){IB(e)}function lG(e,t,n,r){let i=e.children[t];if(n.mode===`code`){uG(e,i,n,r);return}let a=i instanceof HTMLDivElement&&i.dataset.markdownKey===n.key&&!IW.has(i)?i:void 0;if(a?.dataset.markdownHash===n.hash)return;let o=a??document.createElement(`div`);o.dataset.markdownBlock=``,o.dataset.markdownKey=n.key,o.dataset.markdownHash=n.hash,o.style.display=`contents`;let s=LW.get(o),c=s||n.mode===`live`?document.createElement(`div`):o;if(c===o&&JW(o),c.innerHTML=n.html,nG(c),tG(c),s){s.renderer.update(c.innerHTML,n.mode===`live`,s.raw!==n.raw),s.raw=n.raw;return}if(n.mode===`live`&&(o.replaceChildren(),LW.set(o,{renderer:kW(o,c.innerHTML,!0),raw:n.raw})),n.mode!==`live`&&o.querySelectorAll(`pre > code`).forEach(e=>{let t=e.parentElement,n=document.createElement(`div`);n.dataset.component=`markdown-code`,QW(n,Array.from(e.classList).find(e=>e.startsWith(`language-`))?.slice(9)),t.replaceWith(n),n.appendChild(t),n.appendChild(WW(r)),$W(n,e,!0)}),!a){if(!i){e.appendChild(o);return}JW(i),YW(i),i.replaceWith(o)}}function uG(e,t,n,r){let i=t instanceof HTMLDivElement&&t.dataset.markdownKey===n.key&&IW.has(t)?t:void 0,a=i??document.createElement(`div`);a.dataset.markdownBlock=``,a.dataset.markdownKey=n.key,a.dataset.markdownHash=n.hash,a.dataset.markdownComplete=n.complete?`true`:`false`,a.style.display=`contents`;let o=i?.querySelector(`code`);if(o instanceof HTMLElement){let e=o.closest(`[data-component="markdown-code"]`);e instanceof HTMLElement&&QW(e,n.language),o.className=`language-${n.language}`;let t=IW.get(a),r=VB(t,{language:n.language,generation:n.generation,stableCount:n.stable.length,raw:n.raw}),i=r?0:t.stableCount,s=[...n.stable.slice(i),...n.unstable],c=r?[]:t.unstable,l=c.findIndex((e,t)=>!dG(e,s[t])),u=i+(l<0?Math.min(c.length,s.length):l);for(;o.children.length>u;)o.lastElementChild?.remove();s.slice(u-i).map(fG).forEach(e=>o.appendChild(e)),IW.set(a,{language:n.language,generation:n.generation,stableCount:n.stable.length,unstable:n.unstable,raw:n.raw}),e instanceof HTMLElement&&$W(e,o,n.complete);return}let s=document.createElement(`div`);s.setAttribute(`data-component`,`markdown-code`),QW(s,n.language);let c=document.createElement(`pre`);c.className=`shiki OpenCode`;let l=document.createElement(`code`);if(l.className=`language-${n.language}`,[...n.stable,...n.unstable].map(fG).forEach(e=>l.appendChild(e)),c.appendChild(l),s.appendChild(c),s.appendChild(WW(r)),$W(s,l,n.complete),a.appendChild(s),IW.set(a,{language:n.language,generation:n.generation,stableCount:n.stable.length,unstable:n.unstable,raw:n.raw}),t){JW(t),YW(t),t.replaceWith(a);return}e.appendChild(a)}function dG(e,t){return!!t&&e[0]===t[0]&&e[1]===t[1]}function fG(e){let t=document.createElement(`span`);return t.setAttribute(`style`,e[1]),t.textContent=e[0],t}var pG=G(`<div data-slot=image-preview-header>`),mG=G(`<div data-slot=image-preview-body><img data-slot=image-preview-image>`),hG=G(`<div data-component=image-preview><div data-slot=image-preview-container>`);function gG(e){let t=Al();return(()=>{var n=hG(),r=n.firstChild;return q(r,z(go.Content,{"data-slot":`image-preview-content`,get children(){return[(()=>{var e=pG();return q(e,z(go.CloseButton,{"data-slot":`image-preview-close`,as:Lo,get icon(){return z(No,{name:`close`})},variant:`ghost`,get"aria-label"(){return t.t(`ui.common.close`)}})),e})(),(()=>{var n=mG(),r=n.firstChild;return j(n=>{var i=e.src,a=e.alt??t.t(`ui.imagePreview.alt`);return i!==n.e&&K(r,`src`,n.e=i),a!==n.t&&K(r,`alt`,n.t=a),n},{e:void 0,t:void 0}),n})()]}})),n})()}function _G(e){if(!e)return``;let t=e.replace(/[/\\]+$/,``),n=Math.max(t.lastIndexOf(`/`),t.lastIndexOf(`\\`));return t.slice(n+1)}function vG(e){if(!e)return``;let t=e.replace(/[/\\]+$/,``).split(/[/\\]/);return t.slice(0,t.length-1).join(`/`)+`/`}function yG(e,t=20){let n=_G(e);if(n.length<=t)return n;let r=n.lastIndexOf(`.`),i=r<=0?``:n.slice(r),a=t-i.length-1;return a<=0?n.slice(0,t-1)+`…`:n.slice(0,a)+`…`+i}var bG=G(`<div data-component=attachment-card><span data-slot=attachment-card-title></span><span data-slot=attachment-card-subtitle>`);function xG(e){return(()=>{var t=bG(),n=t.firstChild,r=n.nextSibling;return t.$$click=()=>e.onClick?.(),gt(t=>e.titleRef?.(t),n),q(n,()=>e.title),q(r,()=>e.children),j(n=>{var r=e.active?`true`:void 0,i=e.clickable?`true`:void 0,a=e.wide?`true`:void 0,o=e.surface,s=e.hover;return r!==n.e&&K(t,`data-active`,n.e=r),i!==n.t&&K(t,`data-clickable`,n.t=i),a!==n.a&&K(t,`data-wide`,n.a=a),o!==n.o&&K(t,`data-surface`,n.o=o),s!==n.i&&K(t,`title`,n.i=s),n},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t})()}st([`click`]);var SG=`/assets/sprite-Fb-TFjRY.svg`,CG=G(`<svg><defs><mask mask-type=alpha><use></svg>`,!1,!0,!1),wG=G(`<svg><rect width=100% height=100% fill=currentColor></svg>`,!1,!0,!1),TG=G(`<svg data-component=file-icon>`),EG=G(`<svg><use></svg>`,!1,!0,!1),DG=e=>{let[t,n]=V(e,[`node`,`class`,`classList`,`expanded`,`mono`]),r=N(()=>NG(t.node.path,t.node.type,t.expanded||!1)),i=`file-icon-mono-${Ue()}`;return(()=>{var e=TG();return ht(e,B(n,{get classList(){return{...t.classList,[t.class??``]:!!t.class}}}),!0,!0),q(e,z(U,{get when(){return t.mono},get fallback(){return(()=>{var e=EG();return j(()=>K(e,`href`,`${SG}#${r()}`)),e})()},get children(){return[(()=>{var e=CG(),t=e.firstChild,n=t.firstChild;return K(t,`id`,i),j(()=>K(n,`href`,`${SG}#${r()}`)),e})(),(()=>{var e=wG();return K(e,`mask`,`url(#${i})`),e})()]}})),e})()},OG={fileNames:{"readme.md":`Readme`,"changelog.md":`Changelog`,"contributing.md":`Contributing`,"conduct.md":`Conduct`,license:`Certificate`,authors:`Authors`,credits:`Credits`,install:`Installation`,"package.json":`Nodejs`,"package-lock.json":`Nodejs`,"yarn.lock":`Yarn`,"pnpm-lock.yaml":`Pnpm`,"bun.lock":`Bun`,"bun.lockb":`Bun`,"bunfig.toml":`Bun`,".nvmrc":`Nodejs`,".node-version":`Nodejs`,dockerfile:`Docker`,"docker-compose.yml":`Docker`,"docker-compose.yaml":`Docker`,".dockerignore":`Docker`,"jest.config.js":`Jest`,"jest.config.ts":`Jest`,"jest.config.mjs":`Jest`,"vitest.config.js":`Vitest`,"vitest.config.ts":`Vitest`,"tailwind.config.js":`Tailwindcss`,"tailwind.config.ts":`Tailwindcss`,"turbo.json":`Turborepo`,"tsconfig.json":`Tsconfig`,"jsconfig.json":`Jsconfig`,".eslintrc":`Eslint`,".eslintrc.js":`Eslint`,".eslintrc.json":`Eslint`,".prettierrc":`Prettier`,".prettierrc.js":`Prettier`,".prettierrc.json":`Prettier`,"vite.config.js":`Vite`,"vite.config.ts":`Vite`,"webpack.config.js":`Webpack`,"rollup.config.js":`Rollup`,"astro.config.mjs":`AstroConfig`,"astro.config.js":`AstroConfig`,"next.config.js":`Next`,"next.config.mjs":`Next`,"nuxt.config.js":`Nuxt`,"nuxt.config.ts":`Nuxt`,"svelte.config.js":`Svelte`,"gatsby-config.js":`Gatsby`,"remix.config.js":`Remix`,"prisma.schema":`Prisma`,".gitignore":`Git`,".gitattributes":`Git`,makefile:`Makefile`,cmake:`Cmake`,"cargo.toml":`Rust`,"go.mod":`GoMod`,"go.sum":`GoMod`,"requirements.txt":`Python`,"pyproject.toml":`Python`,pipfile:`Python`,"poetry.lock":`Poetry`,gemfile:`Gemfile`,rakefile:`Ruby`,"composer.json":`Php`,"build.gradle":`Gradle`,"pom.xml":`Maven`,"deno.json":`Deno`,"deno.jsonc":`Deno`,"vercel.json":`Vercel`,"netlify.toml":`Netlify`,".env":`Tune`,".env.local":`Tune`,".env.development":`Tune`,".env.production":`Tune`,".env.example":`Tune`,".editorconfig":`Editorconfig`,"robots.txt":`Robots`,"favicon.ico":`Favicon`,browserlist:`Browserlist`,".babelrc":`Babel`,"babel.config.js":`Babel`,"gulpfile.js":`Gulp`,"gruntfile.js":`Grunt`,"capacitor.config.json":`Capacitor`,"ionic.config.json":`Ionic`,"angular.json":`Angular`,".storybook":`Storybook`,"storybook.config.js":`Storybook`,"cypress.config.js":`Cypress`,"playwright.config.js":`Playwright`,"puppeteer.config.js":`Puppeteer`,"wrangler.toml":`Wrangler`,"firebase.json":`Firebase`,supabase:`Supabase`,terraform:`Terraform`,kubernetes:`Kubernetes`,".gitpod.yml":`Gitpod`,".devcontainer":`Vscode`,"travis.yml":`Travis`,"appveyor.yml":`Appveyor`,".circleci":`Circleci`,"renovate.json":`Renovate`,"dependabot.yml":`Dependabot`,"lerna.json":`Lerna`,"nx.json":`Nx`},fileExtensions:{"spec.ts":`TestTs`,"test.ts":`TestTs`,"spec.tsx":`TestJsx`,"test.tsx":`TestJsx`,"spec.js":`TestJs`,"test.js":`TestJs`,"spec.jsx":`TestJsx`,"test.jsx":`TestJsx`,"js.map":`JavascriptMap`,"d.ts":`TypescriptDef`,ts:`Typescript`,tsx:`React_ts`,js:`Javascript`,jsx:`React`,mjs:`Javascript`,cjs:`Javascript`,html:`Html`,htm:`Html`,css:`Css`,scss:`Sass`,sass:`Sass`,less:`Less`,styl:`Stylus`,json:`Json`,xml:`Xml`,yml:`Yaml`,yaml:`Yaml`,toml:`Toml`,hjson:`Hjson`,md:`Markdown`,mdx:`Mdx`,tex:`Tex`,py:`Python`,pyx:`Python`,pyw:`Python`,rs:`Rust`,go:`Go`,java:`Java`,kt:`Kotlin`,scala:`Scala`,php:`Php`,rb:`Ruby`,cs:`Csharp`,vb:`Visualstudio`,cpp:`Cpp`,cc:`Cpp`,cxx:`Cpp`,c:`C`,h:`H`,hpp:`Hpp`,swift:`Swift`,m:`ObjectiveC`,mm:`ObjectiveCpp`,dart:`Dart`,lua:`Lua`,pl:`Perl`,r:`R`,jl:`Julia`,hs:`Haskell`,elm:`Elm`,ml:`Ocaml`,clj:`Clojure`,cljs:`Clojure`,erl:`Erlang`,ex:`Elixir`,exs:`Elixir`,nim:`Nim`,zig:`Zig`,v:`Vlang`,odin:`Odin`,gleam:`Gleam`,grain:`Grain`,roc:`Rocket`,fs:`Fsharp`,sh:`Console`,bash:`Console`,zsh:`Console`,fish:`Console`,ps1:`Powershell`,cfg:`Settings`,ini:`Settings`,conf:`Settings`,properties:`Settings`,svg:`Svg`,png:`Image`,jpg:`Image`,jpeg:`Image`,gif:`Image`,webp:`Image`,bmp:`Image`,ico:`Favicon`,mp4:`Video`,mov:`Video`,avi:`Video`,webm:`Video`,mp3:`Audio`,wav:`Audio`,flac:`Audio`,zip:`Zip`,tar:`Zip`,gz:`Zip`,rar:`Zip`,"7z":`Zip`,pdf:`Pdf`,doc:`Word`,docx:`Word`,ppt:`Powerpoint`,pptx:`Powerpoint`,xls:`Document`,xlsx:`Document`,sql:`Database`,db:`Database`,sqlite:`Database`,env:`Tune`,log:`Log`,lock:`Lock`,key:`Key`,pem:`Certificate`,crt:`Certificate`,proto:`Proto`,graphql:`Graphql`,gql:`Graphql`,wasm:`Webassembly`,dockerfile:`Docker`},folderNames:{src:`FolderSrc`,source:`FolderSrc`,lib:`FolderLib`,libs:`FolderLib`,test:`FolderTest`,tests:`FolderTest`,testing:`FolderTest`,spec:`FolderTest`,specs:`FolderTest`,__tests__:`FolderTest`,e2e:`FolderTest`,integration:`FolderTest`,unit:`FolderTest`,cypress:`FolderCypress`,node_modules:`FolderNode`,vendor:`FolderPackages`,packages:`FolderPackages`,deps:`FolderPackages`,build:`FolderBuildkite`,dist:`FolderDist`,out:`FolderDist`,output:`FolderDist`,target:`FolderTarget`,config:`FolderConfig`,configs:`FolderConfig`,configuration:`FolderConfig`,settings:`FolderConfig`,env:`FolderEnvironment`,environments:`FolderEnvironment`,docker:`FolderDocker`,dockerfiles:`FolderDocker`,containers:`FolderDocker`,docs:`FolderDocs`,doc:`FolderDocs`,documentation:`FolderDocs`,readme:`FolderDocs`,public:`FolderPublic`,static:`FolderPublic`,assets:`FolderImages`,images:`FolderImages`,img:`FolderImages`,icons:`FolderImages`,media:`FolderImages`,fonts:`FolderFont`,styles:`FolderCss`,stylesheets:`FolderCss`,css:`FolderCss`,sass:`FolderSass`,scss:`FolderSass`,less:`FolderLess`,scripts:`FolderScripts`,script:`FolderScripts`,tools:`FolderTools`,utils:`FolderUtils`,utilities:`FolderUtils`,helpers:`FolderHelper`,components:`FolderComponents`,component:`FolderComponents`,views:`FolderViews`,view:`FolderViews`,layouts:`FolderLayout`,layout:`FolderLayout`,templates:`FolderTemplate`,template:`FolderTemplate`,hooks:`FolderHook`,hook:`FolderHook`,store:`FolderStore`,stores:`FolderStore`,state:`FolderNgrxStore`,reducers:`FolderReduxReducer`,reducer:`FolderReduxReducer`,services:`FolderApi`,service:`FolderApi`,api:`FolderApi`,apis:`FolderApi`,routes:`FolderRoutes`,route:`FolderRoutes`,routing:`FolderRoutes`,middleware:`FolderMiddleware`,middlewares:`FolderMiddleware`,controllers:`FolderController`,controller:`FolderController`,models:`FolderDatabase`,model:`FolderDatabase`,schemas:`FolderDatabase`,schema:`FolderDatabase`,migrations:`FolderDatabase`,migration:`FolderDatabase`,seeders:`FolderSeeders`,seeder:`FolderSeeders`,types:`FolderTypescript`,typing:`FolderTypescript`,typings:`FolderTypescript`,"@types":`FolderTypescript`,interfaces:`FolderInterface`,interface:`FolderInterface`,android:`FolderAndroid`,ios:`FolderIos`,mobile:`FolderMobile`,flutter:`FolderFlutter`,kubernetes:`FolderKubernetes`,k8s:`FolderKubernetes`,terraform:`FolderTerraform`,aws:`FolderAws`,azure:`FolderAzurePipelines`,firebase:`FolderFirebase`,supabase:`FolderSupabase`,vercel:`FolderVercel`,netlify:`FolderNetlify`,".github":`FolderGithub`,".gitlab":`FolderGitlab`,".circleci":`FolderCircleci`,ci:`FolderCi`,".ci":`FolderCi`,workflows:`FolderGhWorkflows`,".git":`FolderGit`,".vscode":`FolderVscode`,".idea":`FolderIntellij`,".cursor":`FolderCursor`,".devcontainer":`FolderContainer`,".storybook":`FolderStorybook`,i18n:`FolderI18n`,locales:`FolderI18n`,locale:`FolderI18n`,lang:`FolderI18n`,languages:`FolderI18n`,temp:`FolderTemp`,tmp:`FolderTemp`,logs:`FolderLog`,log:`FolderLog`,backup:`FolderBackup`,backups:`FolderBackup`,examples:`FolderExamples`,example:`FolderExamples`,demo:`FolderExamples`,demos:`FolderExamples`,samples:`FolderExamples`,sample:`FolderExamples`,fixtures:`FolderTest`,mocks:`FolderMock`,mock:`FolderMock`,data:`FolderDatabase`,database:`FolderDatabase`,db:`FolderDatabase`,sql:`FolderDatabase`,prisma:`FolderPrisma`,drizzle:`FolderDrizzle`,security:`FolderSecure`,auth:`FolderSecure`,authentication:`FolderSecure`,authorization:`FolderSecure`,keys:`FolderKeys`,certs:`FolderKeys`,certificates:`FolderKeys`,content:`FolderContent`,posts:`FolderContent`,articles:`FolderContent`,blog:`FolderContent`,functions:`FolderFunctions`,function:`FolderFunctions`,lambda:`FolderFunctions`,lambdas:`FolderFunctions`,serverless:`FolderServerless`,jobs:`FolderJob`,job:`FolderJob`,tasks:`FolderTasks`,task:`FolderTasks`,cron:`FolderTasks`,queue:`FolderQueue`,queues:`FolderQueue`,desktop:`FolderDesktop`,windows:`FolderWindows`,macos:`FolderMacos`,linux:`FolderLinux`},defaults:{file:`Document`,folder:`Folder`,folderOpen:`FolderOpen`}},kG=e=>e.startsWith(`Folder`)?e.endsWith(`_light`)?e.replace(`_light`,`Open_light`):e.endsWith(`Open`)?e:e+`Open`:e,AG=e=>e.split(`\\`).join(`/`).split(`/`).filter(Boolean).pop()??``,jG=e=>{let t=e.toLowerCase();return[t,`.${t}`,`_${t}`,`__${t}__`]},MG=e=>{let t=e.toLowerCase(),n=[];for(let e=0;e<t.length;e++)t[e]===`.`&&n.push(e);let r=new Set;r.add(t);for(let e of n)e+1<t.length&&r.add(t.slice(e+1));return Array.from(r).sort((e,t)=>t.length-e.length)};function NG(e,t,n){let r=AG(e).toLowerCase();if(t===`directory`){for(let e of jG(r)){let t=OG.folderNames[e];if(t)return n?kG(t):t}return n?OG.defaults.folderOpen:OG.defaults.folder}let i=OG.fileNames[r];if(i)return i;for(let e of MG(r)){let t=OG.fileExtensions[e];if(t)return t}return OG.defaults.file}var PG=G(`<span>`);function FG(e){let t,[n,r]=A(!1);return oe(()=>{let e=t;if(!e)return;let n=()=>r(e.scrollWidth>e.clientWidth),i=()=>requestAnimationFrame(n),a=new ResizeObserver(n);a.observe(e),i(),document.fonts?.ready.then(i),F(()=>a.disconnect())}),z(Sl,{placement:`top`,openDelay:1e3,get value(){return e.title??e.comment},get disabled(){return!e.tooltip||!n()},get class(){return e.wide?`w-full`:void 0},contentStyle:{"max-width":`320px`,"white-space":`pre-wrap`},get children(){return z(xG,{get title(){return e.comment},get active(){return e.active},get clickable(){return!!e.onClick},get wide(){return e.wide},surface:`base`,titleRef:e=>{t=e},get onClick(){return e.onClick},get children(){return[z(DG,{get node(){return{path:e.path,type:`file`}}}),(()=>{var t=PG();return q(t,()=>yG(e.path,14),null),q(t,z(U,{get when(){return e.selection},children:e=>e().startLine===e().endLine?`:${e().startLine}`:`:${e().startLine}-${e().endLine}`}),null),t})()]}})}})}var IG=G(`<span data-component=text-reveal><span data-slot=text-reveal-track><span data-slot=text-reveal-entering></span><span data-slot=text-reveal-leaving>`),LG=(e,t)=>typeof e==`number`?`${e}px`:typeof e==`string`?e:`${t}px`,RG=(e,t)=>typeof e==`number`?`${e}ms`:typeof e==`string`?e:`${t}ms`,zG=(e,t)=>`${e??t}%`;function BG(e){let[t,n]=Qt({cur:e.text,old:void 0,width:`auto`,ready:!1,swapping:!1}),r=()=>t.cur,i=()=>t.old,a=()=>t.width,o=()=>t.ready,s=()=>t.swapping,c,l,u,d,f=()=>c?.scrollWidth??0,p=()=>l?.scrollWidth??0,m=t=>{if(!(t<=0)){if(e.growOnly??!0){let e=Number.parseFloat(a());if(Number.isFinite(e)&&t<=e)return}n(`width`,`${t}px`)}};return M(ae(()=>e.text,(e,t)=>{if(e!==t){if(typeof e==`string`&&typeof t==`string`&&e.startsWith(t)){n(`cur`,e),m(f());return}if(n(`swapping`,!0),n(`old`,t),n(`cur`,e),typeof requestAnimationFrame!=`function`){m(Math.max(f(),p())),u?.offsetHeight,n(`swapping`,!1);return}d!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{m(Math.max(f(),p())),u?.offsetHeight,n(`swapping`,!1),d=void 0})}})),oe(()=>{m(f());let e=typeof document<`u`?document.fonts:void 0;if(typeof requestAnimationFrame!=`function`){n(`ready`,!0);return}if(!e){requestAnimationFrame(()=>n(`ready`,!0));return}e.ready.finally(()=>{m(f()),requestAnimationFrame(()=>n(`ready`,!0))})}),F(()=>{d!==void 0&&typeof cancelAnimationFrame==`function`&&cancelAnimationFrame(d)}),(()=>{var t=IG(),n=t.firstChild,d=n.firstChild,f=d.nextSibling,p=u;typeof p==`function`?gt(p,t):u=t;var m=c;typeof m==`function`?gt(m,d):c=d,q(d,()=>r()??`\xA0`);var h=l;return typeof h==`function`?gt(h,f):l=f,q(f,()=>i()??`\xA0`),j(r=>{var i=o()?`true`:`false`,c=s()?`true`:`false`,l=e.truncate?`true`:`false`,u=e.class,d=e.text??``,f=RG(e.duration,450),p=zG(e.edge,17),m=LG(e.travel,0),h=e.spring??`cubic-bezier(0.34, 1.08, 0.64, 1)`,g=e.springSoft??`cubic-bezier(0.34, 1, 0.64, 1)`,_=e.truncate?`100%`:a();return i!==r.e&&K(t,`data-ready`,r.e=i),c!==r.t&&K(t,`data-swapping`,r.t=c),l!==r.a&&K(t,`data-truncate`,r.a=l),u!==r.o&&ut(t,r.o=u),d!==r.i&&K(t,`aria-label`,r.i=d),f!==r.n&&mt(t,`--text-reveal-duration`,r.n=f),p!==r.s&&mt(t,`--text-reveal-edge`,r.s=p),m!==r.h&&mt(t,`--text-reveal-travel`,r.h=m),h!==r.r&&mt(t,`--text-reveal-spring`,r.r=h),g!==r.d&&mt(t,`--text-reveal-spring-soft`,r.d=g),_!==r.l&&mt(n,`width`,r.l=_),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),t})()}var VG=G(`<span data-slot=text-shimmer-char><span data-slot=text-shimmer-char-base aria-hidden=true></span><span data-slot=text-shimmer-char-shimmer aria-hidden=true>`),HG=e=>{let t=N(()=>e.text??``),n=N(()=>e.active??!0),r=N(()=>e.offset??0),[i,a]=A(n()),o;return M(()=>{if(o&&=(clearTimeout(o),void 0),n()){a(!0);return}o=setTimeout(()=>{o=void 0,a(!1)},220)}),F(()=>{o&&clearTimeout(o)}),z(Nt,{get component(){return e.as??`span`},"data-component":`text-shimmer`,get"data-active"(){return n()?`true`:`false`},get class(){return e.class},get"aria-label"(){return t()},get style(){return{"--text-shimmer-swap":`220ms`,"--text-shimmer-index":`${r()}`}},get children(){var e=VG(),n=e.firstChild,r=n.nextSibling;return q(n,t),q(r,t),j(()=>K(r,`data-run`,i()?`true`:`false`)),e}})};function UG(e,t){e.indexOf(t)===-1&&e.push(t)}function WG(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var GG=(e,t,n)=>n>t?t:n<e?e:n,KG={},qG=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),JG=e=>typeof e==`object`&&!!e,YG=e=>/^0[^.\s]+$/u.test(e);function XG(e){let t;return()=>(t===void 0&&(t=e()),t)}var ZG=e=>e,QG=(...e)=>e.reduce((e,t)=>n=>t(e(n))),$G=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},eK=class{constructor(){this.subscriptions=[]}add(e){return UG(this.subscriptions,e),()=>WG(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}},tK=e=>e*1e3,nK=e=>e/1e3,rK=(e,t)=>t?1e3/t*e:0,iK=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},aK=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,oK=1e-7,sK=12;function cK(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=aK(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>oK&&++s<sK);return o}function lK(e,t,n,r){if(e===t&&n===r)return ZG;let i=t=>cK(t,0,1,e,n);return e=>e===0||e===1?e:aK(i(e),t,r)}var uK=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,dK=e=>t=>1-e(1-t),fK=lK(.33,1.53,.69,.99),pK=dK(fK),mK=uK(pK),hK=e=>e>=1?1:(e*=2)<1?.5*pK(e):.5*(2-2**(-10*(e-1))),gK=e=>1-Math.sin(Math.acos(e)),_K=dK(gK),vK=uK(gK),yK=lK(.42,0,1,1),bK=lK(0,0,.58,1),xK=lK(.42,0,.58,1),SK=e=>Array.isArray(e)&&typeof e[0]!=`number`;function CK(e,t){return SK(e)?e[iK(0,e.length,t)]:e}var wK=e=>Array.isArray(e)&&typeof e[0]==`number`,TK={linear:ZG,easeIn:yK,easeInOut:xK,easeOut:bK,circIn:gK,circInOut:vK,circOut:_K,backIn:pK,backInOut:mK,backOut:fK,anticipate:hK},EK=e=>typeof e==`string`,DK=e=>{if(wK(e)){e.length;let[t,n,r,i]=e;return lK(t,n,r,i)}return EK(e)?(TK[e],`${e}`,TK[e]):e},OK=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function kK(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var AK=40;function jK(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=OK.reduce((e,t)=>(e[t]=kK(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=KG.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,AK),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:OK.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<OK.length;t++)o[OK[t]].cancel(e)},state:i,steps:o}}var{schedule:MK,cancel:NK,state:PK,steps:FK}=jK(typeof requestAnimationFrame<`u`?requestAnimationFrame:ZG,!0),IK;function LK(){IK=void 0}var RK={now:()=>(IK===void 0&&RK.set(PK.isProcessing||KG.useManualTiming?PK.timestamp:performance.now()),IK),set:e=>{IK=e,queueMicrotask(LK)}},zK=e=>t=>typeof t==`string`&&t.startsWith(e),BK=zK(`--`),VK=zK(`var(--`),HK=e=>VK(e)?UK.test(e.split(`/*`)[0].trim()):!1,UK=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function WK(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var GK={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},KK={...GK,transform:e=>GG(0,1,e)},qK={...GK,default:1},JK=e=>Math.round(e*1e5)/1e5,YK=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function XK(e){return e==null}var ZK=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,QK=(e,t)=>n=>!!(typeof n==`string`&&ZK.test(n)&&n.startsWith(e)||t&&!XK(n)&&Object.prototype.hasOwnProperty.call(n,t)),$K=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(YK);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},eq=e=>GG(0,255,e),tq={...GK,transform:e=>Math.round(eq(e))},nq={test:QK(`rgb`,`red`),parse:$K(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+tq.transform(e)+`, `+tq.transform(t)+`, `+tq.transform(n)+`, `+JK(KK.transform(r))+`)`};function rq(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 iq={test:QK(`#`),parse:rq,transform:nq.transform},aq=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),oq=aq(`deg`),sq=aq(`%`),$=aq(`px`),cq=aq(`vh`),lq=aq(`vw`),uq={...sq,parse:e=>sq.parse(e)/100,transform:e=>sq.transform(e*100)},dq={test:QK(`hsl`,`hue`),parse:$K(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+sq.transform(JK(t))+`, `+sq.transform(JK(n))+`, `+JK(KK.transform(r))+`)`},fq={test:e=>nq.test(e)||iq.test(e)||dq.test(e),parse:e=>nq.test(e)?nq.parse(e):dq.test(e)?dq.parse(e):iq.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?nq.transform(e):dq.transform(e),getAnimatableNone:e=>{let t=fq.parse(e);return t.alpha=0,fq.transform(t)}},pq=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mq(e){return isNaN(e)&&typeof e==`string`&&(e.match(YK)?.length||0)+(e.match(pq)?.length||0)>0}var hq=`number`,gq=`color`,_q=`var`,vq=`var(`,yq="${}",bq=/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 xq(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(bq,e=>(fq.test(e)?(r.color.push(a),i.push(gq),n.push(fq.parse(e))):e.startsWith(vq)?(r.var.push(a),i.push(_q),n.push(e)):(r.number.push(a),i.push(hq),n.push(parseFloat(e))),++a,yq)).split(yq),indexes:r,types:i}}function Sq(e){return xq(e).values}function Cq({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];i+=e===hq?JK(r[a]):e===gq?fq.transform(r[a]):r[a]}return i}}function wq(e){return Cq(xq(e))}var Tq=e=>typeof e==`number`?0:fq.test(e)?fq.getAnimatableNone(e):e,Eq=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Tq(e);function Dq(e){let t=xq(e);return Cq(t)(t.values.map((e,n)=>Eq(e,t.split[n])))}var Oq={test:mq,parse:Sq,createTransformer:wq,getAnimatableNone:Dq};function kq(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 Aq({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=kq(s,r,e+1/3),a=kq(s,r,e),o=kq(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function jq(e,t){return n=>n>0?t:e}var Mq=(e,t,n)=>e+(t-e)*n,Nq=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Pq=[iq,nq,dq],Fq=e=>Pq.find(t=>t.test(e));function Iq(e){let t=Fq(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===dq&&(n=Aq(n)),n}var Lq=(e,t)=>{let n=Iq(e),r=Iq(t);if(!n||!r)return jq(e,t);let i={...n};return e=>(i.red=Nq(n.red,r.red,e),i.green=Nq(n.green,r.green,e),i.blue=Nq(n.blue,r.blue,e),i.alpha=Mq(n.alpha,r.alpha,e),nq.transform(i))},Rq=new Set([`none`,`hidden`]);function zq(e,t){return Rq.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Bq(e,t){return n=>Mq(e,t,n)}function Vq(e){return typeof e==`number`?Bq:typeof e==`string`?HK(e)?jq:fq.test(e)?Lq:Gq:Array.isArray(e)?Hq:typeof e==`object`?fq.test(e)?Lq:Uq:jq}function Hq(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Vq(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Uq(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Vq(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Wq(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]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Gq=(e,t)=>{let n=Oq.createTransformer(t),r=xq(e),i=xq(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?Rq.has(e)&&!i.values.length||Rq.has(t)&&!r.values.length?zq(e,t):QG(Hq(Wq(r,i),i.values),n):(`${e}${t}`,jq(e,t))};function Kq(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?Mq(e,t,n):Vq(e)(e,t)}var qq=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>MK.update(t,e),stop:()=>NK(t),now:()=>PK.isProcessing?PK.timestamp:RK.now()}},Jq=(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)})`},Yq=2e4;function Xq(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 Zq(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Xq(r),Yq);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:nK(i)}}var Qq={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 $q(e,t){return e*Math.sqrt(1-t*t)}var eJ=12;function tJ(e,t,n){let r=n;for(let n=1;n<eJ;n++)r-=e(r)/t(r);return r}var nJ=.001;function rJ({duration:e=Qq.duration,bounce:t=Qq.bounce,velocity:n=Qq.velocity,mass:r=Qq.mass}){let i,a;Qq.maxDuration;let o=1-t;o=GG(Qq.minDamping,Qq.maxDamping,o),e=GG(Qq.minDuration,Qq.maxDuration,nK(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=$q(t,o),c=Math.exp(-i);return nJ-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=$q(t**2,o);return(-i(t)+nJ>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=tJ(i,a,s);if(e=tK(e),isNaN(c))return{stiffness:Qq.stiffness,damping:Qq.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var iJ=[`duration`,`bounce`],aJ=[`stiffness`,`damping`,`mass`];function oJ(e,t){return t.some(t=>e[t]!==void 0)}function sJ(e){let t={velocity:Qq.velocity,stiffness:Qq.stiffness,damping:Qq.damping,mass:Qq.mass,isResolvedFromDuration:!1,...e};if(!oJ(e,aJ)&&oJ(e,iJ)){if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*GG(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Qq.mass,stiffness:i,damping:a}}else{let n=rJ({...e,velocity:0});t={...t,...n,mass:Qq.mass},t.isResolvedFromDuration=!0}}return t}function cJ(e=Qq.visualDuration,t=Qq.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}=sJ({...n,velocity:-nK(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=nK(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?Qq.restSpeed.granular:Qq.restSpeed.default,i||=v?Qq.restDelta.granular:Qq.restDelta.default;let y,b,x,S,C,w;if(h<1)x=$q(_,h),S=(m+h*_*g)/x,y=e=>{let t=Math.exp(-h*_*e);return o-t*(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=>tK(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=tK(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=tK(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(Xq(T),Yq),t=Jq(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}cJ.applyToOptions=e=>{let t=Zq(e,100,cJ);return e.ease=t.ease,e.duration=tK(t.duration),e.type=`keyframes`,e};var lJ=5;function uJ(e,t,n){let r=Math.max(t-lJ,0);return rK(n-e(r),t-r)}function dJ({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=cJ({keyframes:[f.value,m(f.value)],velocity:uJ(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 fJ(e,t,n){let r=[],i=n||KG.mix||Kq,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=QG(Array.isArray(t)?t[n]||ZG:t,a)),r.push(a)}return r}function pJ(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=fJ(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=$G(e[r],e[r+1],n);return s[r](i)};return n?t=>l(GG(e[0],e[a-1],t)):l}function mJ(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=$G(0,t,r);e.push(Mq(n,1,i))}}function hJ(e){let t=[0];return mJ(t,e.length-1),t}function gJ(e,t){return e.map(e=>e*t)}function _J(e,t){return e.map(()=>t||xK).splice(0,e.length-1)}function vJ({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=SK(r)?r.map(DK):DK(r),a={done:!1,value:t[0]},o=pJ(gJ(n&&n.length===t.length?n:hJ(t),e),t,{ease:Array.isArray(i)?i:_J(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var yJ=e=>e!==null;function bJ(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(yJ),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var xJ={decay:dJ,inertia:dJ,tween:vJ,keyframes:vJ,spring:cJ};function SJ(e){typeof e.type==`string`&&(e.type=xJ[e.type])}var CJ=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)}},wJ=e=>e/100,TJ=class extends CJ{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!==RK.now()&&this.tick(RK.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;SJ(e);let{type:t=vJ,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||vJ;s!==vJ&&typeof o[0]!=`number`&&(this.mixKeyframes=QG(wJ,Kq(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=Xq(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.currentTime=this.holdTime===null?t: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=GG(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!==dJ&&(b.value=bJ(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 nK(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+nK(e)}get time(){return nK(this.currentTime)}set time(e){e=tK(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 uJ(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(RK.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=nK(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=qq,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(RK.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}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 EJ(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var DJ=e=>e*180/Math.PI,OJ=e=>AJ(DJ(Math.atan2(e[1],e[0]))),kJ={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:OJ,rotateZ:OJ,skewX:e=>DJ(Math.atan(e[1])),skewY:e=>DJ(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},AJ=e=>(e%=360,e<0&&(e+=360),e),jJ=OJ,MJ=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),NJ=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),PJ={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:MJ,scaleY:NJ,scale:e=>(MJ(e)+NJ(e))/2,rotateX:e=>AJ(DJ(Math.atan2(e[6],e[5]))),rotateY:e=>AJ(DJ(Math.atan2(-e[2],e[0]))),rotateZ:jJ,rotate:jJ,skewX:e=>DJ(Math.atan(e[4])),skewY:e=>DJ(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function FJ(e){return+!!e.includes(`scale`)}function IJ(e,t){if(!e||e===`none`)return FJ(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=PJ,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=kJ,i=t}if(!i)return FJ(t);let a=r[t],o=i[1].split(`,`).map(RJ);return typeof a==`function`?a(o):o[a]}var LJ=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return IJ(n,t)};function RJ(e){return parseFloat(e.trim())}var zJ=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],BJ=new Set([...zJ,`pathRotation`]),VJ=e=>e===GK||e===$,HJ=new Set([`x`,`y`,`z`]),UJ=zJ.filter(e=>!HJ.has(e));function WJ(e){let t=[];return UJ.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var GJ={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})=>IJ(t,`x`),y:(e,{transform:t})=>IJ(t,`y`)};GJ.translateX=GJ.x,GJ.translateY=GJ.y;var KJ=new Set,qJ=!1,JJ=!1,YJ=!1;function XJ(){if(JJ){let e=Array.from(KJ).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=WJ(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)})}JJ=!1,qJ=!1,KJ.forEach(e=>e.complete(YJ)),KJ.clear()}function ZJ(){KJ.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(JJ=!0)})}function QJ(){YJ=!0,ZJ(),XJ(),YJ=!1}var $J=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?(KJ.add(this),qJ||(qJ=!0,MK.read(ZJ),MK.resolveKeyframes(XJ))):(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])}EJ(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),KJ.delete(this)}cancel(){this.state===`scheduled`&&(KJ.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},eY=e=>e.startsWith(`--`);function tY(e,t,n){eY(t)?e.style.setProperty(t,n):e.style[t]=n}var nY={};function rY(e,t){let n=XG(e);return()=>nY[t]??n()}var iY=rY(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),aY=rY(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),oY=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,sY={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:oY([0,.65,.55,1]),circOut:oY([.55,0,1,.45]),backIn:oY([.31,.01,.66,-.59]),backOut:oY([.33,1.53,.69,.99])};function cY(e,t){if(e)return typeof e==`function`?aY()?Jq(e,t):`ease-out`:wK(e)?oY(e):Array.isArray(e)?e.map(e=>cY(e,t)||sY.easeOut):sY[e]}function lY(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=cY(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function uY(e){return typeof e==`function`&&`applyToOptions`in e}function dY({type:e,...t}){return uY(e)&&aY()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var fY=class extends CJ{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=dY(e);this.animation=lY(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=bJ(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),tY(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 nK(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+nK(e)}get time(){return nK(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=tK(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&&iY()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),ZG):r(this)}},pY={anticipate:hK,backInOut:mK,circInOut:vK};function mY(e){return e in pY}function hY(e){typeof e.ease==`string`&&mY(e.ease)&&(e.ease=pY[e.ease])}var gY=10,_Y=class extends fY{constructor(e){hY(e),SJ(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 TJ({...a,autoplay:!1}),s=Math.max(gY,RK.now()-this.startTime),c=GG(0,gY,s-gY),l=o.sample(s).value,{name:u}=this.options;i&&u&&tY(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},vY=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Oq.test(e)||e===`0`)&&!e.startsWith(`url(`));function yY(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 bY(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=vY(i,t),s=vY(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:yY(e)||(n===`spring`||uY(n))&&r}function xY(e){e.duration=0,e.type=`keyframes`}var SY=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),CY=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function wY(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&CY.test(e[t]))return!0;return!1}var TY=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),EY=XG(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function DY(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e,c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return EY()&&n&&(SY.has(n)||TY.has(n)&&wY(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var OY=40,kY=class extends CJ{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=RK.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||$J;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=RK.now();let u=!0;bY(e,i,a,o)||(u=!1,(KG.instantAnimations||!s)&&l?.(bJ(e,n,t)),e[0]=e[e.length-1],xY(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>OY?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&DY(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new _Y({...d,element:p})}catch{m=new TJ(d)}else m=new TJ(d);m.finished.then(()=>{this.notifyFinished()}).catch(ZG),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(),QJ()),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()}},AY=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return jY(this.animations,`duration`)}get iterationDuration(){return jY(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function jY(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var MY=class extends AY{then(e,t){return this.finished.finally(e).then(()=>{})}},NY=30,PY=e=>!isNaN(parseFloat(e)),FY={current:void 0},IY=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=RK.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=RK.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=PY(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 eK);let n=this.events[e].add(t);return e===`change`?()=>{n(),MK.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 FY.current&&FY.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=RK.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>NY)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,NY);return rK(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 LY(e,t){return new IY(e,t)}function RY(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function zY(e,t){let n=e?.[t]??e?.default??e;return n===e?n:RY(n,e)}var BY={type:`spring`,stiffness:500,damping:25,restSpeed:10},VY=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),HY={type:`keyframes`,duration:.8},UY={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},WY=(e,{keyframes:t})=>t.length>2?HY:BJ.has(e)?e.startsWith(`scale`)?VY(t[1]):BY:UY,GY=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function KY(e){for(let t in e)if(!GY.has(t))return!0;return!1}var qY=(e,t,n,r={},i,a)=>o=>{let s=zY(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=tK(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};KY(s)||Object.assign(u,WY(e,u)),u.duration&&=tK(u.duration),u.repeatDelay&&=tK(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(xY(u),u.delay===0&&(d=!0)),(KG.instantAnimations||KG.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,xY(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=bJ(u.keyframes,s);if(e!==void 0){MK.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new TJ(u):new kY(u)},JY=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function YY(e){let t=JY.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function XY(e,t,n=1){`${e}`;let[r,i]=YY(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return qG(e)?parseFloat(e):e}return HK(i)?XY(i,t,n+1):i}function ZY(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function QY(e,t,n,r){if(typeof t==`function`){let[i,a]=ZY(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]=ZY(r);t=t(n===void 0?e.custom:n,i,a)}return t}function $Y(e,t,n){let r=e.getProps();return QY(r,t,n===void 0?r.custom:n,e)}var eX=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...zJ]),tX=e=>Array.isArray(e);function nX(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,LY(n))}function rX(e){return tX(e)?e[e.length-1]||0:e}function iX(e,t){let{transitionEnd:n={},transition:r={},...i}=$Y(e,t)||{};i={...i,...n};for(let t in i)nX(e,t,rX(i[t]))}var aX=e=>!!(e&&e.getVelocity);function oX(e){return!!(aX(e)&&e.add)}function sX(e,t){let n=e.getValue(`willChange`);if(oX(n))return n.add(t);if(!n&&KG.WillChange){let n=new KG.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function cX(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var lX=`data-`+cX(`framerAppearId`);function uX(e){return e.props[lX]}function dX({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function fX(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?RY(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&dX(f,t))continue;let o={delay:n,...zY(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){MK.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=uX(e);if(n){let e=window.MotionHandoffAnimation(n,t,MK);e!==null&&(o.startTime=e,p=!0)}}sX(e,t);let m=l??e.shouldReduceMotion;r.start(qY(t,r,i,m&&eX.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>MK.update(()=>{o&&iX(e,o)});d.length?Promise.all(d).then(t):t()}return d}var pX={test:e=>e===`auto`,parse:e=>e},mX=e=>t=>t.test(e),hX=[GK,$,sq,oq,lq,cq,pX],gX=e=>hX.find(mX(e));function _X(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||YG(e)}var vX=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function yX(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(YK)||[];if(!r)return e;let i=n.replace(r,``),a=+!!vX.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var bX=/\b([a-z-]*)\(.*?\)/gu,xX={...Oq,getAnimatableNone:e=>{let t=e.match(bX);return t?t.map(yX).join(` `):e}},SX={...Oq,getAnimatableNone:e=>{let t=Oq.parse(e);return Oq.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},CX={...GK,transform:Math.round},wX={borderWidth:$,borderTopWidth:$,borderRightWidth:$,borderBottomWidth:$,borderLeftWidth:$,borderRadius:$,borderTopLeftRadius:$,borderTopRightRadius:$,borderBottomRightRadius:$,borderBottomLeftRadius:$,width:$,maxWidth:$,height:$,maxHeight:$,top:$,right:$,bottom:$,left:$,inset:$,insetBlock:$,insetBlockStart:$,insetBlockEnd:$,insetInline:$,insetInlineStart:$,insetInlineEnd:$,padding:$,paddingTop:$,paddingRight:$,paddingBottom:$,paddingLeft:$,paddingBlock:$,paddingBlockStart:$,paddingBlockEnd:$,paddingInline:$,paddingInlineStart:$,paddingInlineEnd:$,margin:$,marginTop:$,marginRight:$,marginBottom:$,marginLeft:$,marginBlock:$,marginBlockStart:$,marginBlockEnd:$,marginInline:$,marginInlineStart:$,marginInlineEnd:$,fontSize:$,backgroundPositionX:$,backgroundPositionY:$,rotate:oq,pathRotation:oq,rotateX:oq,rotateY:oq,rotateZ:oq,scale:qK,scaleX:qK,scaleY:qK,scaleZ:qK,skew:oq,skewX:oq,skewY:oq,distance:$,translateX:$,translateY:$,translateZ:$,x:$,y:$,z:$,perspective:$,transformPerspective:$,opacity:KK,originX:uq,originY:uq,originZ:$,zIndex:CX,fillOpacity:KK,strokeOpacity:KK,numOctaves:CX},TX={...wX,color:fq,backgroundColor:fq,outlineColor:fq,fill:fq,stroke:fq,borderColor:fq,borderTopColor:fq,borderRightColor:fq,borderBottomColor:fq,borderLeftColor:fq,filter:xX,WebkitFilter:xX,mask:SX,WebkitMask:SX},EX=e=>TX[e],DX=new Set([xX,SX]);function OX(e,t){let n=EX(e);return DX.has(n)||(n=Oq),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var kX=new Set([`auto`,`none`,`0`]);function AX(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!kX.has(t)&&xq(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=OX(n,i)}var jX=class extends $J{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(),HK(r))){let i=XY(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!eX.has(n)||e.length!==2)return;let[r,i]=e,a=gX(r),o=gX(i);if(WK(r)!==WK(i)&&GJ[n]){this.needsMeasurement=!0;return}if(a!==o){if(VJ(a)&&VJ(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else GJ[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||_X(e[t]))&&n.push(t);n.length&&AX(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=GJ[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]=GJ[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()}},MX=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function NX(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 PX=(e,t)=>t&&typeof e==`number`?t.transform(e):e,{schedule:FX,cancel:IX}=jK(queueMicrotask,!1);function LX(e){return JG(e)&&`ownerSVGElement`in e}function RX(e){return LX(e)&&e.tagName===`svg`}var zX=[...hX,fq,Oq],BX=e=>zX.find(mX(e)),VX=()=>({min:0,max:0}),HX=()=>({x:VX(),y:VX()}),UX=new WeakMap;function WX(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function GX(e){return typeof e==`string`||Array.isArray(e)}var KX=[`initial`,`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`];function qX(e){return WX(e.animate)||KX.some(t=>GX(e[t]))}function JX(e){return!!(qX(e)||e.variants)}function YX(e,t,n){for(let r in t){let i=t[r],a=n[r];if(aX(i))e.addValue(r,i);else if(aX(a))e.addValue(r,LY(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,LY(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var XX={current:null},ZX={current:!1},QX=typeof window<`u`;function $X(){if(ZX.current=!0,QX){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>XX.current=e.matches;e.addEventListener(`change`,t),t()}else XX.current=!1}}var eZ=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],tZ={},nZ=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=$J,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=RK.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,MK.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=qX(t),this.isVariantNode=JX(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&&aX(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,UX.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:(ZX.current||$X(),this.shouldReduceMotion=XX.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(),NK(this.notifyUpdate),NK(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&&SY.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new fY({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:tK(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=BJ.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&MK.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()})}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 tZ){let t=tZ[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):HX()}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<eZ.length;t++){let n=eZ[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=YX(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=LY(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`&&(qG(n)||YG(n))?n=parseFloat(n):!BX(n)&&Oq.test(t)&&(n=OX(e,t)),this.setBaseTarget(e,aX(n)?n.get():n)),aX(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=QY(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&&!aX(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 eK),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){FX.render(this.render)}},rZ=class extends nZ{constructor(){super(...arguments),this.KeyframeResolver=jX}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;aX(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function iZ({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function aZ(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 oZ(e,t){return iZ(aZ(e.getBoundingClientRect(),t))}var sZ={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},cZ=zJ.length;function lZ(e,t,n){let r=``,i=!0;for(let a=0;a<cZ;a++){let o=zJ[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=PX(s,wX[o]);if(!c){i=!1;let t=sZ[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${PX(a,wX.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function uZ(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(BJ.has(e)){o=!0;continue}if(BK(e)){i[e]=n;continue}{let t=PX(n,wX[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=lZ(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 dZ(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 fZ(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var pZ={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if($.test(e))e=parseFloat(e);else return e}return`${fZ(e,t.target.x)}% ${fZ(e,t.target.y)}%`}},mZ={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Oq.parse(e);if(i.length>5)return r;let a=Oq.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=Mq(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},hZ={borderRadius:{...pZ,applyTo:[...MX]},borderTopLeftRadius:pZ,borderTopRightRadius:pZ,borderBottomLeftRadius:pZ,borderBottomRightRadius:pZ,boxShadow:mZ};function gZ(e,{layout:t,layoutId:n}){return BJ.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!hZ[e]||e===`opacity`)}function _Z(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(aX(r[t])||i&&aX(i[t])||gZ(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function vZ(e){return window.getComputedStyle(e)}var yZ=class extends rZ{constructor(){super(...arguments),this.type=`html`,this.renderInstance=dZ}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(BJ.has(t))return this.projection?.isProjecting?FJ(t):LJ(e,t);{let n=vZ(e),r=(BK(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return oZ(e,t)}build(e,t,n){uZ(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return _Z(e,t,n)}};function bZ(e,t){return e in t}var xZ=class extends nZ{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(bZ(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return HX()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},SZ={offset:`stroke-dashoffset`,array:`stroke-dasharray`},CZ={offset:`strokeDashoffset`,array:`strokeDasharray`};function wZ(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?SZ:CZ;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var TZ=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function EZ(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(uZ(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 TZ)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&&wZ(d,i,a,o,!1)}var DZ=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`]),OZ=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function kZ(e,t,n,r){dZ(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(DZ.has(n)?n:cX(n),t.attrs[n])}function AZ(e,t,n){let r=_Z(e,t,n);for(let n in e)if(aX(e[n])||aX(t[n])){let t=zJ.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var jZ=class extends rZ{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=HX}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(BJ.has(t)){let e=EX(t);return e&&e.default||0}return t=DZ.has(t)?t:cX(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return AZ(e,t,n)}build(e,t,n){EZ(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){kZ(e,t,n,r)}mount(e){this.isSVGTag=OZ(e.tagName),super.mount(e)}};function MZ(e,t,n){let r=aX(e)?e:LY(e);return r.start(qY(``,r,t,n)),r.animation}function NZ(e){return typeof e==`object`&&!Array.isArray(e)}function PZ(e,t,n,r){return e==null?[]:typeof e==`string`&&NZ(t)?NX(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function FZ(e,t,n){return e*(t+1)+n*t}function IZ(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function LZ(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(WG(e,i),r--)}}function RZ(e,t,n,r,i,a){LZ(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Mq(i,a,r[o]),easing:CK(n,o)})}function zZ(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function BZ(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var VZ=`easeInOut`,HZ=20;function UZ(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}if(!Array.isArray(o)){l.set(o.name,IZ(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=IZ(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=KZ(e),{delay:l=0,times:u=hJ(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=uY(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&YZ(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=tK(b));let r=Zq(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&mJ(u,T),c.length===1&&c.unshift(null),m&&`${m}${HZ}`,m&&m<HZ){let e=b>0?_/b:0;b=FZ(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?dK(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:CK(f,e-1))}zZ(u,m,e)}let E=w+b;RZ(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(aX(p)){let e=WZ(p,s);_(m,h,GZ(`default`,e))}else{let e=PZ(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=WZ(r,s);for(let e in m)_(m[e],qZ(h,e),GZ(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(BZ);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push($G(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(VZ)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function WZ(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function GZ(e,t){return t[e]||(t[e]=[]),t[e]}function KZ(e){return Array.isArray(e)?e:[e]}function qZ(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var JZ=e=>typeof e==`number`,YZ=e=>e.every(JZ);function XZ(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=LX(e)&&!RX(e)?new jZ(t):new yZ(t);n.mount(e),UX.set(e,n)}function ZZ(e){let t=new xZ({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),UX.set(e,t)}function QZ(e,t){return aX(e)||typeof e==`number`||typeof e==`string`&&!NZ(t)}function $Z(e,t,n,r){let i=[];if(QZ(e,t))i.push(MZ(e,NZ(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=PZ(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?XZ:ZZ;UX.has(r)||s(r);let c=UX.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...fX(c,{...t,transition:l},{}))}}return i}function eQ(e,t,n){let r=[];return UZ(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=LY(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:cJ}).forEach(({keyframes:e,transition:t},n)=>{r.push(...$Z(n,e,t))}),r}function tQ(e){return Array.isArray(e)&&e.some(Array.isArray)}function nQ(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),tQ(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=eQ(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=$Z(e,i,{...c,...r},t)}let l=new MY(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{WG(t.animations,l)})),l}return i}var rQ=nQ();Ia({},{Collapsible:()=>lQ,Content:()=>oQ,Root:()=>sQ,Trigger:()=>cQ,useCollapsibleContext:()=>aQ});var iQ=L();function aQ(){let e=R(iQ);if(e===void 0)throw Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function oQ(e){let[t,n]=A(),r=aQ(),[i,a]=V(Vi({id:r.generateId(`content`)},e),[`ref`,`id`,`style`]),{present:o}=ro({show:r.shouldMount,element:()=>t()??null}),[s,c]=A(0),[l,u]=A(0),d=r.isOpen()||o();return oe(()=>{let e=requestAnimationFrame(()=>{d=!1});F(()=>{cancelAnimationFrame(e)})}),M(ae(o,()=>{if(!t())return;t().style.transitionDuration=`0s`,t().style.animationName=`none`;let e=t().getBoundingClientRect();c(e.height),u(e.width),d||(t().style.transitionDuration=``,t().style.animationName=``)})),M(ae(r.isOpen,e=>{!e&&t()&&(t().style.transitionDuration=``,t().style.animationName=``)},{defer:!0})),M(()=>F(r.registerContentId(i.id))),z(U,{get when(){return o()},get children(){return z(Ta,B({as:`div`,ref(e){var t=Yr(n,i.ref);typeof t==`function`&&t(e)},get id(){return i.id},get style(){return Jr({"--kb-collapsible-content-height":s()?`${s()}px`:void 0,"--kb-collapsible-content-width":l()?`${l()}px`:void 0},i.style)}},()=>r.dataset(),a))}})}function sQ(e){let[t,n]=V(Vi({id:`collapsible-${Ue()}`},e),[`open`,`defaultOpen`,`onOpenChange`,`disabled`,`forceMount`]),[r,i]=A(),a=Ma({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:e=>t.onOpenChange?.(e)}),o=N(()=>({"data-expanded":a.isOpen()?``:void 0,"data-closed":a.isOpen()?void 0:``,"data-disabled":t.disabled?``:void 0})),s={dataset:o,isOpen:a.isOpen,disabled:()=>t.disabled??!1,shouldMount:()=>t.forceMount||a.isOpen(),contentId:r,toggle:a.toggle,generateId:ti(()=>n.id),registerContentId:Va(i)};return z(iQ.Provider,{value:s,get children(){return z(Ta,B({as:`div`},o,n))}})}function cQ(e){let t=aQ(),[n,r]=V(e,[`onClick`]);return z(za,B({get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return W(()=>!!t.isOpen())()?t.contentId():void 0},get disabled(){return t.disabled()},onClick:e=>{_i(e,n.onClick),t.toggle()}},()=>t.dataset(),r))}var lQ=Object.assign(sQ,{Content:oQ,Trigger:cQ}),uQ=G(`<div data-slot=collapsible-arrow><span data-slot=collapsible-arrow-icon>`);function dQ(e){let[t,n]=V(e,[`class`,`classList`,`variant`]);return z(lQ,B({"data-component":`collapsible`,get"data-variant"(){return t.variant||`normal`},get classList(){return{...t.classList,[t.class??``]:!!t.class}}},n))}function fQ(e){return z(lQ.Trigger,B({"data-slot":`collapsible-trigger`},e))}function pQ(e){return z(lQ.Content,B({"data-slot":`collapsible-content`},e))}function mQ(e){return(()=>{var t=uQ(),n=t.firstChild;return ht(t,e||{},!1,!0),q(n,z(No,{name:`fill-triangle-down`,size:`small`})),t})()}var hQ=Object.assign(dQ,{Arrow:mQ,Trigger:fQ,Content:pQ}),gQ=G(`<div data-component=tool-trigger><div data-slot=basic-tool-tool-trigger-content><div data-slot=basic-tool-tool-info>`),_Q=G(`<span data-slot=basic-tool-tool-subtitle>`),vQ=G(`<span data-slot=basic-tool-tool-action>`),yQ=G(`<div data-slot=basic-tool-tool-info-structured><div data-slot=basic-tool-tool-info-main><span data-slot=basic-tool-tool-title>`),bQ=G(`<span data-slot=basic-tool-tool-arg>`),xQ=G(`<div data-slot=collapsible-content data-animated>`),SQ=G(`<div data-slot=collapsible-trigger data-locked>`),CQ=e=>typeof e!=`object`||!e||typeof Node<`u`&&e instanceof Node?!1:`title`in e&&typeof e.title==`string`,wQ={type:`spring`,visualDuration:.35,bounce:0},TQ=[],EQ;function DQ(){for(;TQ.length>0;){let e=TQ.pop();if(e.active){EQ=TQ.length>0?requestAnimationFrame(DQ):void 0,e.fn();return}}EQ=void 0}function OQ(){EQ===void 0&&(EQ=requestAnimationFrame(()=>{EQ=requestAnimationFrame(DQ)}))}function kQ(e){let t={active:!0,fn:e};return TQ.push(t),OQ(),()=>{t.active=!1}}function AQ(e){let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)}function jQ(e){let[t,n]=Qt({open:e.defaultOpen??!1,ready:!e.defer&&(e.defaultOpen??!1)}),r=()=>e.open??t.open,i=()=>t.ready,a=()=>e.status===`streaming`||e.status===`running`,o=()=>e.hasContent??(e.defer?`children`in e:e.children),s=N(()=>{let t=e.trigger;return typeof t==`function`?t(r):t}),c=N(()=>{let e=s();return CQ(e)?e:void 0}),l,u=()=>{l?.(),l=void 0},d=(e=!1)=>{u(),l=(e?kQ:AQ)(()=>{l=void 0,r()&&n(`ready`,!0)})};F(u),oe(()=>{e.defer&&r()&&d(!0)});let f=t=>{e.open===void 0&&n(`open`,t),e.onOpenChange?.(t)};M(()=>{e.forceOpen&&(r()||f(!0))}),M(ae(r,t=>{if(e.defer){if(!t){u(),n(`ready`,!1);return}d()}},{defer:!0}));let p,m,h=r();M(ae(r,t=>{e.animated&&p&&(m?.stop(),t?(p.style.overflow=`hidden`,m=rQ(p,{height:`auto`},wQ),m.finished.then(()=>{p&&r()&&(p.style.overflow=`visible`,p.style.height=`auto`)})):(p.style.overflow=`hidden`,m=rQ(p,{height:`0px`},wQ)))},{defer:!0})),F(()=>{m?.stop()});let g=t=>{(!a()||e.allowOpenWhilePending)&&(!e.locked||t)&&f(t)},_=()=>(()=>{var t=gQ(),n=t.firstChild.firstChild;return q(n,z(Ke,{get children(){return[z(qe,{get when(){return c()},children:t=>(()=>{var n=yQ(),r=n.firstChild,i=r.firstChild;return q(i,z(HG,{get text(){return t().title},get active(){return a()}})),q(r,z(U,{get when(){return!a()||t().subtitle||t().args?.length},get children(){return[z(U,{get when(){return t().subtitle},get children(){var n=_Q();return n.$$click=t=>{e.onSubtitleClick&&(t.stopPropagation(),e.onSubtitleClick())},q(n,()=>t().subtitle),j(r=>ft(n,{[t().subtitleClass??``]:!!t().subtitleClass,clickable:!!e.onSubtitleClick},r)),n}}),z(U,{get when(){return t().args?.length},get children(){return z(H,{get each(){return t().args},children:e=>(()=>{var n=bQ();return q(n,e),j(e=>ft(n,{[t().argsClass??``]:!!t().argsClass},e)),n})()})}})]}}),null),q(n,z(U,{get when(){return W(()=>!a())()&&t().action},get children(){var e=vQ();return q(e,()=>t().action),e}}),null),j(e=>ft(i,{[t().titleClass??``]:!!t().titleClass},e)),n})()}),z(qe,{when:!0,get children(){return s()}})]}})),q(t,z(U,{get when(){return W(()=>!(!o()||e.hideDetails||e.locked))()&&(!a()||e.allowOpenWhilePending)},get children(){return z(hQ.Arrow,{})}}),null),j(n=>{var r=e.clickable?`true`:void 0,i=e.hideDetails?`true`:void 0;return r!==n.e&&K(t,`data-clickable`,n.e=r),i!==n.t&&K(t,`data-hide-details`,n.t=i),n},{e:void 0,t:void 0}),t})();return z(hQ,{get open(){return r()},get onOpenChange(){return e.locked?void 0:g},class:`tool-collapsible`,get"data-compact"(){return e.compact?`true`:void 0},get"data-rail"(){return e.rail===!1?`false`:void 0},get children(){return[z(U,{get when(){return W(()=>!e.locked)()&&(e.triggerAsLink||e.triggerHref)},get fallback(){return z(U,{get when(){return!e.locked},get fallback(){return(()=>{var t=SQ();return q(t,_),j(()=>K(t,`data-hide-details`,e.hideDetails?`true`:void 0)),t})()},get children(){return z(hQ.Trigger,{get"data-hide-details"(){return e.hideDetails?`true`:void 0},get onClick(){return e.onTriggerClick},get children(){return _()}})}})},get children(){return z(hQ.Trigger,{as:`a`,get href(){return e.triggerHref},get role(){return!e.triggerHref&&e.clickable?`button`:void 0},get tabIndex(){return!e.triggerHref&&e.clickable?0:void 0},get"data-hide-details"(){return e.hideDetails?`true`:void 0},get onClick(){return e.onTriggerClick},get onKeyDown(){return e.onTriggerKeyDown},get children(){return _()}})}}),z(U,{get when(){return W(()=>!!(e.animated&&o()))()&&!e.hideDetails},get children(){var t=xQ(),n=p;return typeof n==`function`?gt(n,t):p=t,mt(t,`height`,h?`auto`:`0px`),mt(t,`overflow`,h?`visible`:`hidden`),q(t,z(U,{get when(){return!e.defer||i()},get children(){return e.children}})),t}}),z(U,{get when(){return W(()=>!(e.animated||!o()))()&&!e.hideDetails},get children(){return z(hQ.Content,{get children(){return z(U,{get when(){return!e.defer||i()},get children(){return e.children}})}})}})]}})}function MQ(e){return[`description`,`query`,`url`,`path`,`pattern`,`name`].map(t=>e?.[t]).find(e=>typeof e==`string`&&e.length>0)}function NQ(e){if(!e)return[];let t=new Set([`description`,`query`,`url`,`path`,`pattern`,`name`]);return Object.entries(e).filter(([e])=>!t.has(e)).flatMap(([e,t])=>typeof t==`string`||typeof t==`number`||typeof t==`boolean`?[`${e}=${t}`]:[]).slice(0,3)}function PQ(e){let t=Al();return z(jQ,{icon:`mcp`,get status(){return e.status},get trigger(){return{title:t.t(`ui.basicTool.called`,{tool:e.tool}),subtitle:MQ(e.input),args:NQ(e.input)}},get hideDetails(){return e.hideDetails}})}st([`click`]);var FQ=G(`<div>`);function IQ(e,t){return t?e?typeof e==`string`?`${e};--card-accent:${t};`:{...e,"--card-accent":t}:{"--card-accent":t}:e}function LQ(e){let[t,n]=V(e,[`variant`,`style`,`class`,`classList`]),r=()=>t.variant??`normal`,i=()=>{let e=r();if(e===`error`)return`var(--v2-state-fg-danger)`;if(e===`warning`)return`var(--icon-warning-active)`;if(e===`success`)return`var(--icon-success-active)`;if(e===`info`)return`var(--icon-info-active)`};return(()=>{var a=FQ();return ht(a,B(n,{"data-component":`card`,get"data-variant"(){return r()},get style(){return IQ(t.style,i())},get classList(){return{...t.classList,[t.class??``]:!!t.class}}}),!1,!0),q(a,()=>e.children),a})()}function RQ(e){let[t,n]=V(e,[`class`,`classList`,`children`]);return(()=>{var e=FQ();return ht(e,B(n,{"data-slot":`card-description`,get classList(){return{...t.classList,[t.class??``]:!!t.class}}}),!1,!0),q(e,()=>t.children),e})()}var zQ=new Map(ng.flatMap(e=>[e.id,...e.aliases??[]].map(t=>[t,e.name])));function BQ(e,t,n){if(t===`application/pdf`)return`PDF`;let r=_G(e),i=r.lastIndexOf(`.`),a=i<=0?``:r.slice(i+1).toLowerCase();return a?zQ.get(a)??a.toUpperCase():n}var VQ=G(`<div data-slot=user-message-comments>`),HQ=G(`<div data-slot=user-message-attachments>`),UQ=G(`<div data-slot=user-message-attachment data-type=image data-clickable=true><img data-slot=user-message-attachment-image>`),WQ=G(`<div data-slot=user-message-body><div data-slot=user-message-text dir=auto>`),GQ=G(`<span data-slot=user-message-meta class="text-12-regular text-text-weak cursor-default">`),KQ=G(`<span data-slot=user-message-meta-sep class="text-12-regular text-text-weak cursor-default">\xA0·\xA0`),qQ=G(`<div data-slot=user-message-copy-wrapper><span data-slot=user-message-meta-wrap><span data-slot=user-message-meta-tail class="text-12-regular text-text-weak cursor-default">`),JQ=G(`<div data-component=user-message>`),YQ=G(`<span>`),XQ=G(`<div data-component=text-part><div data-slot=text-part-body>`),ZQ=G(`<div data-component=session-compaction-message><div class=py-2>`),QQ=G(`<span data-slot=text-part-meta class="text-12-regular text-text-weak cursor-default">`),$Q=G(`<div data-slot=text-part-copy-wrapper>`),e$=G(`<div data-component=reasoning-part>`),t$=G(`<span data-slot=basic-tool-tool-subtitle>`),n$=G(`<div data-slot=basic-tool-tool-info-structured><div data-slot=basic-tool-tool-info-main><span data-slot=basic-tool-tool-title>`);async function r$(e){let t=typeof document>`u`?void 0:document.body;if(t){let n=document.createElement(`textarea`);n.value=e,n.setAttribute(`readonly`,``),n.style.position=`fixed`,n.style.opacity=`0`,n.style.pointerEvents=`none`,t.appendChild(n),n.select();let r=document.execCommand(`copy`);if(t.removeChild(n),r)return!0}let n=typeof navigator>`u`?void 0:navigator.clipboard;return n?.writeText?n.writeText(e).then(()=>!0,()=>!1):!1}function i$(e){let t=()=>e.icon===`copy`?`outline-copy`:e.icon;return z(Sl,{appearance:`compact`,get value(){return e.label},placement:`top`,gutter:4,get children(){return z(Lo,{get icon(){return z(No,{get name(){return t()},size:`small`})},size:`normal`,variant:`ghost-muted`,get disabled(){return e.disabled},get onMouseDown(){return e.onMouseDown},get onClick(){return e.onClick},get"aria-label"(){return e[`aria-label`]}})}})}var a$=24,o$=512,s$=/[\s.,!?;:)\]]/;function c$(e){return e<=12?2:e<=48?4:e<=96?8:Math.min(256,Math.ceil(e/4))}function l$(e,t){let n=Math.min(e.length,t+c$(e.length-t)),r=Math.min(e.length,n+8);for(let t=n;t<r;t++)if(s$.test(e[t]??``))return t+1;return n}function u$(e,t){let[n,r]=A(e()),i=e(),a,o=()=>{a&&=(clearTimeout(a),void 0)},s=e=>{i=e,r(e)},c=()=>{a=void 0;let n=e();if(!t?.()){s(n);return}if(!n.startsWith(i)||n.length<=i.length){s(n);return}if(n.length-i.length<=o$){s(n);return}let r=l$(n,i.length);s(n.slice(0,r)),r<n.length&&(a=setTimeout(c,a$))};return M(()=>{let n=e();if(!t?.()){o(),s(n);return}if(!n.startsWith(i)||n.length<i.length){o(),s(n);return}if(n.length-i.length<=o$){o(),s(n);return}n.length===i.length||a||(a=setTimeout(c,a$))}),F(()=>{o()}),n}function d$(e){let t=u$(()=>e.text,()=>e.streaming);return z(U,{get when(){return t()},get children(){return z(oG,{get text(){return t()},get cacheKey(){return e.cacheKey},get streaming(){return e.streaming},deferUntilReady:!0})}})}function f$(e){let t=Al(),[n,r]=Qt({expanded:!1}),i=N(()=>e.bounded&&!n.expanded?e.comments.slice(0,5):e.comments);return(()=>{var a=VQ();return q(a,z(H,{get each(){return i()},children:e=>z(FG,{get comment(){return e.comment},get path(){return e.path},get selection(){return e.selection},get title(){return e.comment},tooltip:!0,wide:!0})}),null),q(a,z(U,{get when(){return W(()=>!!(e.bounded&&e.comments.length>5))()&&!n.expanded},get children(){return z(Po,{size:`small`,variant:`ghost-muted`,onClick:()=>r(`expanded`,!0),get children(){return t.t(`ui.common.showMore`)}})}}),null),j(()=>K(a,`data-bounded`,e.bounded?`true`:void 0)),a})()}function p$(e){let t=aj(),n=So(),r=Al(),[i,a]=Qt({copied:!1,reverting:!1}),o=N(()=>(e.message.files??[]).filter(e=>!e.mention)),s=N(()=>(e.message.files??[]).filter(e=>!!e.mention)),c=N(()=>e.message.agents??[]),l=N(()=>e.comments??[]),u=N(()=>(t.store.provider?.all?.get(e.model.providerID))?.models?.[e.model.id]?.name??e.model.id),d=N(()=>new Intl.DateTimeFormat(r.locale(),{timeStyle:`short`})),f=N(()=>{let t=e.agent;return[t?t[0]?.toUpperCase()+t.slice(1):``,u()].filter(Boolean).join(`\xA0·\xA0`)}),p=N(()=>d().format(e.message.time.created)),m=async()=>{e.text&&await r$(e.text)&&(a(`copied`,!0),setTimeout(()=>a(`copied`,!1),2e3))},h=async()=>{if(e.actions?.revert&&!i.reverting){a(`reverting`,!0);try{await e.actions.revert({sessionID:e.sessionID,messageID:e.message.id})}finally{a(`reverting`,!1)}}},g=()=>z(U,{get when(){return o().length>0},get children(){var t=HQ();return q(t,z(H,{get each(){return o()},children:t=>{let i=()=>t.source.type===`uri`?t.source.uri:`data:${t.mime};base64,${t.data}`,a=()=>t.name??r.t(`ui.message.attachment.alt`),o=()=>t.mime.startsWith(`image/`);return z(U,{get when(){return!o()},get fallback(){return(()=>{var e=UQ(),t=e.firstChild;return e.$$click=()=>n.show(()=>z(gG,{get src(){return i()},get alt(){return a()}})),j(e=>{var n=i(),r=a();return n!==e.e&&K(t,`src`,e.e=n),r!==e.t&&K(t,`alt`,e.t=r),e},{e:void 0,t:void 0}),e})()},get children(){return z(xG,{get title(){return _G(a())},get hover(){return a()},get clickable(){return!!e.actions?.openAttachment},onClick:()=>e.actions?.openAttachment?.(t),get children(){return BQ(a(),t.mime,r.t(`ui.common.file`))}})}})}})),t}});return(()=>{var t=JQ();return q(t,z(U,{get when(){return e.text},get fallback(){return z(U,{get when(){return l().length>0},get children(){return z(f$,{get comments(){return l()},bounded:!1})}})},get children(){var t=WQ(),n=t.firstChild;return q(n,z(m$,{get text(){return e.text},get files(){return s()},get agents(){return c()}}),null),q(n,z(U,{get when(){return l().length>0},get children(){return z(f$,{get comments(){return l()},bounded:!0})}}),null),j(()=>K(n,`data-comments`,l().length>0?`true`:void 0)),t}}),null),q(t,g,null),q(t,z(U,{get when(){return e.text||l().length>0},get children(){var t=qQ(),n=t.firstChild,a=n.firstChild;return q(n,z(U,{get when(){return f()},get children(){var e=GQ();return q(e,f),e}}),a),q(n,z(U,{get when(){return W(()=>!!f())()&&p()},get children(){return KQ()}}),a),q(a,p),q(t,z(U,{get when(){return e.actions?.revert},get children(){return z(i$,{icon:`reset`,get label(){return r.t(`ui.message.revertMessage`)},get disabled(){return i.reverting},onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),h()},get"aria-label"(){return r.t(`ui.message.revertMessage`)}})}}),null),q(t,z(U,{get when(){return e.text},get children(){return z(i$,{get icon(){return i.copied?`check`:`copy`},get label(){return W(()=>!!i.copied)()?r.t(`ui.message.copied`):r.t(`ui.message.copyMessage`)},onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),m()},get"aria-label"(){return W(()=>!!i.copied)()?r.t(`ui.message.copied`):r.t(`ui.message.copyMessage`)}})}}),null),t}}),null),j(()=>K(t,`data-timeline-part-id`,e.text?`${e.message.id}:text:0`:void 0)),t})()}function m$(e){let t=N(()=>{let t=[...e.files.flatMap(e=>e.mention?[{start:e.mention.start,end:e.mention.end,type:`file`}]:[]),...e.agents.flatMap(e=>e.mention?[{start:e.mention.start,end:e.mention.end,type:`agent`}]:[])].sort((e,t)=>e.start-t.start),n=[],r=0;return t.forEach(t=>{t.start<r||(t.start>r&&n.push({text:e.text.slice(r,t.start)}),n.push({text:e.text.slice(t.start,t.end),type:t.type}),r=t.end)}),r<e.text.length&&n.push({text:e.text.slice(r)}),n});return z(H,{get each(){return t()},children:e=>(()=>{var t=YQ();return q(t,()=>e.text),j(()=>K(t,`data-highlight`,e.type)),t})()})}function h$(e){let t=Al(),n=()=>e.message.status===`failed`?``:e.message.summary,r=()=>e.message.status!==`failed`||e.message.error.type===`aborted`?``:e.error;return(()=>{var i=ZQ(),a=i.firstChild;return q(a,z(mB,{get label(){return t.t(`ui.messagePart.compaction`)}})),q(i,z(U,{get when(){return n().trim()},get children(){var t=XQ(),r=t.firstChild;return q(r,z(d$,{get text(){return n()},get cacheKey(){return e.message.id},get streaming(){return e.message.status===`running`}})),j(()=>K(t,`data-timeline-part-id`,e.message.id)),t}}),null),q(i,z(U,{get when(){return r()},get children(){return z(LQ,{variant:`error`,class:`error-card`,get children(){return r()}})}}),null),i})()}function g$(e){let t=aj(),n=Al(),r=N(()=>new Intl.NumberFormat(n.locale())),i=()=>{let t=e.message.error?.type.toLowerCase();return!!t&&(t.includes(`abort`)||t.includes(`interrupt`))},a=N(()=>(t.store.provider?.all?.get(e.message.model.providerID))?.models?.[e.message.model.id]?.name??e.message.model.id),o=N(()=>{let t=e.message.time.completed,i=e.turnDurationMs===null?-1:typeof e.turnDurationMs==`number`?e.turnDurationMs:typeof t==`number`?t-e.message.time.created:-1;if(!(i>=0))return``;let a=Math.round(i/1e3);return a<60?n.t(`ui.message.duration.seconds`,{count:r().format(a)}):n.t(`ui.message.duration.minutesSeconds`,{minutes:r().format(Math.floor(a/60)),seconds:r().format(a%60)})}),s=N(()=>{let t=e.message.agent;return[t?t[0]?.toUpperCase()+t.slice(1):``,a(),o(),i()?n.t(`ui.message.interrupted`):``].filter(Boolean).join(` · `)}),[c,l]=A(!1),u=async()=>{await r$(e.text)&&(l(!0),setTimeout(()=>l(!1),2e3))};return z(U,{get when(){return e.text},get children(){var t=XQ(),r=t.firstChild;return q(r,z(d$,{get text(){return e.text},get cacheKey(){return e.id},get streaming(){return typeof e.message.time.completed!=`number`}})),q(t,z(U,{get when(){return e.showCopy},get children(){var e=$Q();return q(e,z(i$,{get icon(){return c()?`check`:`copy`},get label(){return W(()=>!!c())()?n.t(`ui.message.copied`):n.t(`ui.message.copyResponse`)},onMouseDown:e=>e.preventDefault(),onClick:u,get"aria-label"(){return W(()=>!!c())()?n.t(`ui.message.copied`):n.t(`ui.message.copyResponse`)}}),null),q(e,z(U,{get when(){return s()},get children(){var e=QQ();return q(e,s),e}}),null),j(()=>K(e,`data-interrupted`,i()?``:void 0)),e}}),null),j(()=>K(t,`data-timeline-part-id`,e.id)),t}})}function _$(e){let t=Al(),[n,r]=Qt({}),i=()=>e.open??n.open??e.defaultOpen??!1,a=N(()=>e.streaming?oB(e.content.text):``),o=N(()=>{let n=e.content.time;if(n?.completed===void 0)return;let r=Math.max(0,Math.round((n.completed-n.created)/1e3)),i=new Intl.NumberFormat(t.locale());return r<60?t.t(`ui.message.duration.seconds`,{count:i.format(r)}):t.t(`ui.message.duration.minutesSeconds`,{minutes:i.format(Math.floor(r/60)),seconds:i.format(r%60)})});return(()=>{var n=e$();return q(n,z(jQ,{icon:`mcp`,get status(){return e.streaming?`running`:`completed`},compact:!0,hasContent:!0,allowOpenWhilePending:!0,get hideDetails(){return!e.content.text.trim()},get open(){return i()},onOpenChange:t=>{r(`open`,t),e.onOpenChange?.(t),e.onContentRendered?.()},get trigger(){return(()=>{var n=n$(),r=n.firstChild,s=r.firstChild;return q(s,z(HG,{get text(){return t.t(e.streaming?`ui.sessionTurn.status.thinking`:`ui.message.thought`)},get active(){return e.streaming}})),q(r,z(U,{get when(){return W(()=>!!e.streaming)()&&!i()},get fallback(){return z(U,{get when(){return W(()=>!e.streaming)()&&o()},children:e=>(()=>{var t=t$();return q(t,e),t})()})},get children(){var e=t$();return q(e,z(BG,{get text(){return a()}})),e}}),null),n})()},get children(){return z(d$,{get text(){return e.content.text},get cacheKey(){return e.id},get streaming(){return e.streaming}})}})),j(()=>K(n,`data-timeline-part-id`,e.id)),n})()}st([`click`]);function v$({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][^\\u0007\\u001B\\u009C]*(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}var y$=v$();function b$(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(y$,``)}Ia({},{Accordion:()=>A$,Content:()=>C$,Header:()=>w$,Item:()=>D$,Root:()=>O$,Trigger:()=>k$,useAccordionContext:()=>E$});var x$=L();function S$(){let e=R(x$);if(e===void 0)throw Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function C$(e){let t=S$(),[n,r]=V(Vi({id:t.generateId(`content`)},e),[`id`,`style`]);return M(()=>F(t.registerContentId(n.id))),z(oQ,B({role:`region`,get"aria-labelledby"(){return t.triggerId()},get style(){return Jr({"--kb-accordion-content-height":`var(--kb-collapsible-content-height)`,"--kb-accordion-content-width":`var(--kb-collapsible-content-width)`},n.style)}},r))}function w$(e){let t=aQ();return z(Ta,B({as:`h3`},()=>t.dataset(),e))}var T$=L();function E$(){let e=R(T$);if(e===void 0)throw Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function D$(e){let t=E$(),[n,r]=V(Vi({id:`${t.generateId(`item`)}-${Ue()}`},e),[`value`,`disabled`]),[i,a]=A(),[o,s]=A(),c=()=>t.listState().selectionManager(),l=()=>c().isSelected(n.value),u={value:()=>n.value,triggerId:i,contentId:o,generateId:ti(()=>r.id),registerTriggerId:Va(a),registerContentId:Va(s)};return z(x$.Provider,{value:u,get children(){return z(sQ,B({get open(){return l()},get disabled(){return n.disabled}},r))}})}function O$(e){let t,[n,r]=V(Vi({id:`accordion-${Ue()}`,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[`id`,`ref`,`value`,`defaultValue`,`onChange`,`multiple`,`collapsible`,`shouldFocusWrap`,`onKeyDown`,`onMouseDown`,`onFocusIn`,`onFocusOut`]),[i,a]=A([]),{DomCollectionProvider:o}=lu({items:i,onItemsChange:a}),s=Ql({selectedKeys:()=>n.value,defaultSelectedKeys:()=>n.defaultValue,onSelectionChange:e=>n.onChange?.(Array.from(e)),disallowEmptySelection:()=>!n.multiple&&!n.collapsible,selectionMode:()=>n.multiple?`multiple`:`single`,dataSource:i});s.selectionManager().setFocusedKey(`item-1`);let c=Wu({selectionManager:()=>s.selectionManager(),collection:()=>s.collection(),disallowEmptySelection:()=>s.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>n.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>t),l={listState:()=>s,generateId:ti(()=>n.id)};return z(o,{get children(){return z(T$.Provider,{value:l,get children(){return z(Ta,B({as:`div`,get id(){return n.id},ref(e){var r=Yr(e=>t=e,n.ref);typeof r==`function`&&r(e)},get onKeyDown(){return vi([n.onKeyDown,c.onKeyDown])},get onMouseDown(){return vi([n.onMouseDown,c.onMouseDown])},get onFocusIn(){return vi([n.onFocusIn])},get onFocusOut(){return vi([n.onFocusOut,c.onFocusOut])}},r))}})}})}function k$(e){let t,n=E$(),r=S$(),i=aQ(),[a,o]=V(Vi({id:r.generateId(`trigger`)},e),[`ref`,`onPointerDown`,`onPointerUp`,`onClick`,`onKeyDown`,`onMouseDown`,`onFocus`]);uu({getItem:()=>({ref:()=>t,type:`item`,key:r.value(),textValue:``,disabled:i.disabled()})});let s=Yl({key:()=>r.value(),selectionManager:()=>n.listState().selectionManager(),disabled:()=>i.disabled(),shouldSelectOnPressUp:!0},()=>t);return M(()=>F(r.registerTriggerId(o.id))),z(cQ,B({ref(e){var n=Yr(e=>t=e,a.ref);typeof n==`function`&&n(e)},get"data-key"(){return s.dataKey()},get onPointerDown(){return vi([a.onPointerDown,s.onPointerDown])},get onPointerUp(){return vi([a.onPointerUp,s.onPointerUp])},get onClick(){return vi([a.onClick,s.onClick])},onKeyDown:e=>{[`Enter`,` `].includes(e.key)&&e.preventDefault(),_i(e,a.onKeyDown),_i(e,s.onKeyDown)},get onMouseDown(){return vi([a.onMouseDown,s.onMouseDown])},get onFocus(){return vi([a.onFocus,s.onFocus])}},o))}var A$=Object.assign(O$,{Content:C$,Header:w$,Item:D$,Trigger:k$});function j$(e){let[t,n]=V(e,[`class`,`classList`]);return z(O$,B(n,{"data-component":`accordion`,get classList(){return{...t.classList,[t.class??``]:!!t.class}}}))}function M$(e){let[t,n]=V(e,[`class`,`classList`]);return z(D$,B(n,{"data-slot":`accordion-item`,get classList(){return{...t.classList,[t.class??``]:!!t.class}}}))}function N$(e){let[t,n]=V(e,[`class`,`classList`,`children`]);return z(w$,B(n,{"data-slot":`accordion-header`,get classList(){return{...t.classList,[t.class??``]:!!t.class}},get children(){return t.children}}))}function P$(e){let[t,n]=V(e,[`class`,`classList`,`children`]);return z(k$,B(n,{"data-slot":`accordion-trigger`,get classList(){return{...t.classList,[t.class??``]:!!t.class}},get children(){return t.children}}))}function F$(e){let[t,n]=V(e,[`class`,`classList`,`children`]);return z(C$,B(n,{"data-slot":`accordion-content`,get classList(){return{...t.classList,[t.class??``]:!!t.class}},get children(){return t.children}}))}var I$=Object.assign(j$,{Item:M$,Header:N$,Trigger:P$,Content:F$});function L$(e){return z(I$.Header,{"data-component":`sticky-accordion-header`,get classList(){return{...e.classList,[e.class??``]:!!e.class}},get children(){return e.children}})}var R$=G(`<a data-slot=basic-tool-tool-subtitle class="clickable subagent-link">`),z$=G(`<div data-component=tool-trigger><div data-slot=basic-tool-tool-trigger-content><span data-slot=basic-tool-tool-indicator data-component=tool-error-card-icon></span><div data-slot=basic-tool-tool-info><div data-slot=basic-tool-tool-info-structured><div data-slot=basic-tool-tool-info-main><span data-slot=basic-tool-tool-title></span><span data-slot=tool-error-card-summary>`),B$=G(`<div data-slot=tool-error-card-copy>`),V$=G(`<div data-slot=tool-error-card-content>`),H$=G(`<span data-slot=basic-tool-tool-subtitle>`);function U$(e){let t=Al(),[n,r]=Qt({open:e.defaultOpen??!1,copied:!1}),i=()=>e.open??n.open,a=()=>n.copied,[o,s]=V(e,[`tool`,`error`,`title`,`defaultOpen`,`open`,`onOpenChange`,`subtitle`,`href`,`onSubtitleClick`]),c=t=>{e.open===void 0&&r(`open`,t),e.onOpenChange?.(t)},l=N(()=>{if(o.title)return o.title;let e={read:`ui.tool.read`,list:`ui.tool.list`,glob:`ui.tool.glob`,grep:`ui.tool.grep`,subagent:`ui.tool.agent.default`,webfetch:`ui.tool.webfetch`,websearch:`ui.tool.websearch`,shell:`ui.tool.shell`,execute:`ui.tool.execute`,patch:`ui.tool.patch`,question:`ui.tool.questions`}[o.tool];return e?e.includes(`.`)?t.t(e):e:o.tool}),u=N(()=>o.error.replace(/^Error:\s*/,``).trim()),d=N(()=>{let e=u(),t=`${o.tool} `;return e.startsWith(t)?e.slice(t.length):e}),f=N(()=>{let e=(d().split(`: `)[0]??``).trim();return e?e[0].toUpperCase()+e.slice(1):t.t(`ui.toolErrorCard.failed`)}),p=N(()=>{let e=d().split(`: `);return e.length<=1?``:e.slice(1).join(`: `).trim()}),m=async()=>{let e=u();e&&(await navigator.clipboard.writeText(e),r(`copied`,!0),setTimeout(()=>r(`copied`,!1),2e3))};return z(LQ,B(s,{"data-kind":`tool-error-card`,get"data-open"(){return i()?`true`:`false`},variant:`error`,get children(){return z(hQ,{class:`tool-collapsible`,get"data-open"(){return i()?`true`:`false`},get open(){return i()},onOpenChange:c,get children(){return[z(hQ.Trigger,{get children(){var e=z$(),t=e.firstChild.firstChild,n=t.nextSibling.firstChild.firstChild,r=n.firstChild,i=r.nextSibling;return q(t,z(No,{name:`outline-hexagonal-warning`})),q(r,l),q(n,z(U,{get when(){return o.subtitle},get children(){return z(U,{get when(){return o.href},get fallback(){return(()=>{var e=H$();return q(e,()=>o.subtitle),e})()},get children(){var e=R$();return e.$$click=e=>{e.stopPropagation(),o.onSubtitleClick?.(e)},q(e,()=>o.subtitle),j(()=>K(e,`href`,o.href)),e}})}}),i),q(i,f),q(e,z(hQ.Arrow,{}),null),e}}),z(U,{get when(){return p()},get children(){return z(hQ.Content,{get children(){var e=V$();return q(e,z(U,{get when(){return i()},get children(){var e=B$();return q(e,z(Sl,{appearance:`standard`,get value(){return W(()=>!!a())()?t.t(`ui.message.copied`):t.t(`ui.toolErrorCard.copyError`)},placement:`top`,gutter:4,get children(){return z(Lo,{get icon(){return z(No,{get name(){return a()?`check`:`copy`}})},size:`normal`,variant:`ghost`,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),m()},get"aria-label"(){return W(()=>!!a())()?t.t(`ui.message.copied`):t.t(`ui.toolErrorCard.copyError`)}})}})),e}}),null),q(e,z(RQ,{get children(){return p()}}),null),e}})}})]}})}}))}st([`click`]);var W$=G(`<div data-component=diff-changes><span data-slot=diff-changes-additions></span><span data-slot=diff-changes-deletions>`);function G$(e){let t=N(()=>Array.isArray(e.changes)?e.changes.reduce((e,t)=>e+(t.additions??0),0):e.changes.additions),n=N(()=>Array.isArray(e.changes)?e.changes.reduce((e,t)=>e+(t.deletions??0),0):e.changes.deletions),r=N(()=>(t()??0)+(n()??0));return z(U,{get when(){return r()>0},get children(){var r=W$(),i=r.firstChild,a=i.nextSibling;return q(i,()=>`+${t()}`),q(a,()=>`-${n()}`),j(t=>{var n=e.appearance??`compact`,i={[e.class??``]:!0};return n!==t.e&&K(r,`data-appearance`,t.e=n),t.t=ft(r,i,t.t),t},{e:void 0,t:void 0}),r}})}var K$=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends K${};function q$(e,t){let n=0;for(;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function J$(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function Y$(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function X$(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function Z$(e,t){return Y$(e,t,``)}function Q$(e,t){return X$(e,t,``)}function $$(e,t){return t.slice(0,e1(e,t))}function e1(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function t1(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function n1(e,t){if(t)return i1(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function r1(e,t){if(t)return i1(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function i1(e,t){if(!t)return[r1(e),n1(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=t1(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var a1=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,o1=RegExp(`[${a1}]+|\\s+|[^${a1}]`,`ug`);new class extends K${equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=t1(e,r)}else n=e.match(o1)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&s1(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&s1(n,i,r,null,t.intlSegmenter),e}};function s1(e,t,n,r,i){if(t&&n){let[a,o]=i1(t.value,i),[s,c]=i1(n.value,i);if(e){let r=q$(a,s);e.value=X$(e.value,s,r),t.value=Z$(t.value,r),n.value=Z$(n.value,r)}if(r){let e=J$(o,c);r.value=Y$(r.value,c,e),t.value=Q$(t.value,e),n.value=Q$(n.value,e)}}else if(n){if(e){let e=r1(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=r1(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=r1(r.value,i),[a,o]=i1(t.value,i),s=q$(n,a);t.value=Z$(t.value,s);let c=J$(Z$(n,s),o);t.value=Q$(t.value,c),r.value=Y$(r.value,n,c),e.value=X$(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=r1(r.value,i),n=$$(n1(t.value,i),e);t.value=Q$(t.value,n)}else if(e){let n=$$(n1(e.value,i),r1(t.value,i));t.value=Z$(t.value,n)}}new class extends K${tokenize(e){let t=RegExp(`(\\r?\\n)|[${a1}]+|[^\\S\\n\\r]+|[^${a1}]`,`ug`);return e.match(t)||[]}},new class extends K${constructor(){super(...arguments),this.tokenize=c1}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
787
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
788
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
789
- `)&&(e=e.slice(0,-1)),t.endsWith(`
790
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function c1(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
791
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function l1(e){return e==`.`||e==`!`||e==`?`}new class extends K${tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(l1(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends K${tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends K${constructor(){super(...arguments),this.tokenize=c1}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(u1(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function u1(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a=0;for(;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=u1(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=u1(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends K${tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function d1(e){let t=e.split(/\n/),n=[],r=0;function i(){let e={};for(n.push(e);r<t.length;){let n=t[r];if(/^(---|\+\+\+|@@)\s/.test(n))break;let i=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(n);i&&(e.index=n.substring(i[0].length).trim()),r++}for(a(e),a(e),e.hunks=[];r<t.length;){let n=t[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(n))break;if(/^@@/.test(n))e.hunks.push(o());else if(n)throw Error(`Unknown line `+(r+1)+` `+JSON.stringify(n));else r++}}function a(e){let n=/^(---|\+\+\+)\s+/.exec(t[r]);if(n){let i=n[1],a=t[r].substring(3).trim().split(` `,2),o=(a[1]||``).trim(),s=a[0].replace(/\\\\/g,`\\`);s.startsWith(`"`)&&s.endsWith(`"`)&&(s=s.substr(1,s.length-2)),i===`---`?(e.oldFileName=s,e.oldHeader=o):(e.newFileName=s,e.newHeader=o),r++}}function o(){let e=r,n=t[r++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),i={oldStart:+n[1],oldLines:n[2]===void 0?1:+n[2],newStart:+n[3],newLines:n[4]===void 0?1:+n[4],lines:[]};i.oldLines===0&&(i.oldStart+=1),i.newLines===0&&(i.newStart+=1);let a=0,o=0;for(;r<t.length&&(o<i.oldLines||a<i.newLines||t[r]?.startsWith(`\\`));r++){let n=t[r].length==0&&r!=t.length-1?` `:t[r][0];if(n===`+`||n===`-`||n===` `||n===`\\`)i.lines.push(t[r]),n===`+`?a++:n===`-`?o++:n===` `&&(a++,o++);else throw Error(`Hunk at line ${e+1} contained invalid line ${t[r]}`)}if(!a&&i.newLines===1&&(i.newLines=0),!o&&i.oldLines===1&&(i.oldLines=0),a!==i.newLines)throw Error(`Added line count did not match for hunk at line `+(e+1));if(o!==i.oldLines)throw Error(`Removed line count did not match for hunk at line `+(e+1));return i}for(;r<t.length;)i();return n}var f1=16,p1=new Map;function m1(e){return typeof e.patch==`string`?g1(e.file,e.patch):y1(e.file,typeof e.before==`string`?e.before:``,typeof e.after==`string`?e.after:``)}function h1(e){return{file:e.file,additions:e.additions,deletions:e.deletions,status:e.status,fileDiff:m1(e)}}function g1(e,t){let n=`${e}\0${t}`,r=p1.get(n);if(r)return p1.delete(n),p1.set(n,r),r;let i=_1(t),a=i?void 0:v1(e,t),o=i?y1(e,i.before,i.after):(a?NE(a)[0]?.files[0]:void 0)??x1(e);for(o.cacheKey??=b1(n),p1.set(n,o);p1.size>f1;)p1.delete(p1.keys().next().value);return o}function _1(e){try{let t=d1(e)[0];if(!t||!t.index&&!t.oldFileName&&!t.newFileName||!e.startsWith(`diff --git `)&&!/^--- [^\n]*\t\r?\n\+\+\+ [^\n]*\t(?:\r?\n|$)/m.test(e)||t.hunks.length!==1)return;let n=t.hunks[0];if(!n||n.oldStart>1||n.newStart>1)return;let r=[],i=[],a;for(let e of n.lines){if(e.startsWith(`\\`)){if(a===`-`||a===` `){let e=r.at(-1);e&&(e.newline=!1)}if(a===`+`||a===` `){let e=i.at(-1);e&&(e.newline=!1)}continue}if(e.startsWith(`-`)){r.push({text:e.slice(1),newline:!0}),a=`-`;continue}if(e.startsWith(`+`)){i.push({text:e.slice(1),newline:!0}),a=`+`;continue}if(!e.startsWith(` `))return;r.push({text:e.slice(1),newline:!0}),i.push({text:e.slice(1),newline:!0}),a=` `}let o=e=>e.map(e=>e.text+(e.newline?`
792
- `:``)).join(``);return{before:o(r),after:o(i)}}catch{return}}function v1(e,t){try{let n=d1(t)[0];return n?n.index||n.oldFileName||n.newFileName?t:n.hunks.length?`Index: ${e}\n===================================================================\n--- ${e}\t\n+++ ${e}\t\n${t}`:void 0:void 0}catch{return}}function y1(e,t,n){if(!t&&!n)return x1(e);let r=kD({name:e,contents:t},{name:e,contents:n});return r.cacheKey=b1(`${e}\0${t}\0${n}`),r}function b1(e){return`${e.length}:${Tf(e)??0}`}function x1(e){return kD({name:e,contents:``},{name:e,contents:``})}function S1(e){return!e||typeof e!=`object`||!(`file`in e)||typeof e.file!=`string`||!(`patch`in e)||typeof e.patch!=`string`||!(`additions`in e)||typeof e.additions!=`number`||!(`deletions`in e)||typeof e.deletions!=`number`||!(`status`in e)||e.status!==`added`&&e.status!==`deleted`&&e.status!==`modified`?!1:e.additions>0||e.deletions>0}function C1(e){if(!S1(e))return;let t;return{path:e.file,type:e.status===`added`?`add`:e.status===`deleted`?`delete`:`update`,additions:e.additions,deletions:e.deletions,get view(){return t??=h1(e)},contents:_1(e.patch)}}function w1(e){return Array.isArray(e)?e.map(C1).filter(e=>!!e):[]}function T1(e){return[...w1(e).reduce((e,t)=>{let n=e.get(t.path);return n&&n.push(t),n||e.set(t.path,[t]),e},new Map)].map(([e,t])=>{let n=t[0],r=t.at(-1),i=r.type===`delete`?`delete`:n.type===`add`?`add`:`update`;if(!t.every((e,n)=>!!e.contents&&(n===0||t[n-1]?.contents?.after===e.contents.before)))return{path:e,type:i,additions:t.reduce((e,t)=>e+t.additions,0),deletions:t.reduce((e,t)=>e+t.deletions,0),views:t.map(e=>e.view)};let a=t.length===1?n.view:h1({file:e,before:n.contents.before,after:r.contents.after,status:i===`add`?`added`:i===`delete`?`deleted`:`modified`,additions:0,deletions:0}),o=a.fileDiff.hunks.reduce((e,t)=>({additions:e.additions+t.additionLines,deletions:e.deletions+t.deletionLines}),{additions:0,deletions:0});return{path:e,type:i,...o,views:[{...a,...o}]}})}var E1=G(`<svg><defs><filter filterUnits=userSpaceOnUse x=0 y=0 width=16 height=16><feFlood flood-color=currentColor result=color></feFlood><feComposite in=color in2=SourceAlpha operator=in></feComposite></filter><clipPath><path></path></clipPath></defs><image data-frame-content x=0 y=0 width=16 height=16></image><rect data-reduced-motion x=7.5 y=7.5 width=2 height=2>`),D1=new URL(`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACGFjVEwAAAAkAAAAAL0MSdQAAAAaZmNUTAAAAAAAAAAQAAAAEAAAAAAAAAAAAAEAHgAAeGnEiQAAAChJREFUeNpjYKAG+P//vzG5eNQAOhiADIaBAfVIeIgasB8Jww0beAMAAcvtF7z+xvIAAAAaZmNUTAAAAAEAAAAQAAAAEAAAAAAAAAAAAAEAHgAA4xouXQAAADlmZEFUAAAAAnjaY2CgBvj//78xuXjUADoYgAyGkAEVSPglEk5DwoPQAGRNyUj4ChKegIThhg28AQCHCO3v9vSM9QAAABpmY1RMAAAAAwAAABAAAAAQAAAAAAAAAAAAAQAeAAAOjP20AAAAOWZkQVQAAAAEeNpjYKAG+P//vzG5eNQAOhiADIaQAZuQ8HUkHICEB6EByJq6kPAGJJyBhOGGDbwBAME/7ogd07A4AAAAGmZjVEwAAAAFAAAAEAAAABAAAAAAAAAAAAABAB4AAONGj84AAAA5ZmRBVAAAAAZ42mNgoAb4//+/Mbl41AA6GIAMhpAB95HwSSRsj4QHoQHImlYi4clI2BMJww0beAMAtN7u/Yo3jeUAAAAaZmNUTAAAAAcAAAAQAAAAEAAAAAAAAAAAAAEAHgAADtBcJwAAADlmZEFUAAAACHjaY2CgBvj//78xuXjUADoYgAyGkAG/kfBBJGyKhAehAcia9iDhJiRshoThhg28AQBd9e9gN/7mcAAAABpmY1RMAAAACQAAABAAAAAQAAAAAAAAAAAAAQAeAADjo217AAAANWZkQVQAAAAKeNpjYKAG+P//vzG5eNQAKhoQjgMjg0FugA8SfoGElyHhQW4ALk1FSHiQGgAAlc/u64UC44QAAAAaZmNUTAAAAAsAAAAQAAAAEAAAAAAAAAAAAAEAHgAADjW+kgAAADVmZEFUAAAADHjaY2CgBvj//78xuXjUACoaMB0HRgaD3IByJHwQCVcj4UFuAC5NUUh4kBoAAF9m7lIeWdi1AAAAGmZjVEwAAAANAAAAEAAAABAAAAAAAAAAAAABAB4AAOP/zOgAAAA1ZmRBVAAAAA542mNgoAb4//+/Mbl41AAqGnAKB0YGg9yA2Uh4ARIOR8KD3ABcmtyR8CA1AADbGe2n0LJXAwAAABpmY1RMAAAADwAAABAAAAAQAAAAAAAAAAAAAQAeAAAOaR8BAAAANWZkQVQAAAAQeNpjYKAG+P//vzG5eNQAKhrwAQdGBoPcgK1IuBMJ2yHhQW4ALk2WSHiQGgAAWnvtX1kT8yQAAAAaZmNUTAAAABEAAAAQAAAAEAAAAAAAAAAAAAEAHgAA4mioEQAAADBmZEFUAAAAEnjaY2CgBvj//78xuXjUACoaQAwY5AbsR8L1SJjoMBh4A0jSNLgMAACaJe0XdM6fPgAAABpmY1RMAAAAEwAAABAAAAAQAAAAAAAAAAAAAQAeAAAP/nv4AAAAPmZkQVQAAAAUeNpjYKAG+P//fwUSNiYFDx4DkpEwSYYNHgOuIOGXSBgZDHIDJiDhNCRMdBgMvAEkaRpcBgAAVrTt7/r/V2YAAAAaZmNUTAAAABUAAAAQAAAAEAAAAAAAAAAAAAEAHgAA4jQJggAAAD5mZEFUAAAAFnjaY2CgBvj///8mJGxMCh48BnQhYZIMGzwGbEDC15EwMhjkBmQg4QAkTHQYDLwBJGkaXAYAAAoz7ojYXBW3AAAAGmZjVEwAAAAXAAAAEAAAABAAAAAAAAAAAAABAB4AAA+i2msAAAA+ZmRBVAAAABh42mNgoAb4////fSRsTAoePAasRMIkGTZ4DJiMhE8iYWQwyA3wRML2SJjoMBh4A0jSNLgMAACRCO798w7XFgAAABpmY1RMAAAAGQAAABAAAAAQAAAAAAAAAAAAAQAeAADi0es3AAAAPmZkQVQAAAAaeNpjYKAG+P///28kbEwKHjwG7EHCJBk2eAxoQsIHkTAyGOQGmCFhUyRMdBgMvAEkaRpcBgAAY5fvYHjnWwYAAAAaZmNUTAAAABsAAAAQAAAAEAAAAAAAAAAAAAEAHgAAD0c43gAAADpmZEFUAAAAHHjaY2CgBvj///8LJOyDhMORsDE2PHgMWIaEkQ0bQgYUIWFkw5DBIDfAmFw8agAVDAAAo7bu644KyeIAAAAaZmNUTAAAAB0AAAAQAAAAEAAAAAAAAAAAAAEAHgAA4o1KpAAAADpmZEFUAAAAHnjaY2CgBvj///9BJFyOhKcjYWNsePAYUI2EkQ0bQgZEIWFkw5DBIDfAmFw8agAVDAAAQZ7uUlrM3IIAAAAaZmNUTAAAAB8AAAAQAAAAEAAAAAAAAAAAAAEAHgAADxuZTQAAADpmZEFUAAAAIHjaY2CgBvj///8CJDwbCZ9CwsbY8OAxIBwJIxs2hAxwR8LIhiGDQW6AMbl41AAqGAAADzPtp1TcBaQAAAAaZmNUTAAAACEAAAAQAAAAEAAAAAAAAAAAAAEAHgAA4f8ixQAAADpmZEFUAAAAInjaY2CgBvj//38nEt6KhD8gYWNsePAYYIeEkQ0bQgZYImFkw5DBIDfAmFw8agAVDAAANyLtX/RrDIEAAAAaZmNUTAAAACMAAAAQAAAAEAAAAAAAAAAAAAEAHgAADGnxLAAAADJmZEFUAAAAJHjaY2CgBvj//389Et6PhJGBMTY8eAxAFkQ2bIgagIyHgQEE8agBVDAAADge7RendZX+AAAAGmZjVEwAAAAlAAAAEAAAABAAAAAAAAAAAAABAB4AAOGjg1YAAABBZmRBVAAAACZ42mNgoAb4//9/GhKegISvIOFkJFwBw4PHAGMkjGzYSyRcgYTh6genAcgYGWBVM/gNIIhHDaCCAQDjv+3vdQR+4gAAABpmY1RMAAAAJwAAABAAAAAQAAAAAAAAAAAAAQAeAAAMNVC/AAAAQWZkQVQAAAAoeNpjYKAG+P//fwASzkDCG5BwFxLeBMODxwBjJIxs2HUkvAkJw9UPTgOQMTLAqmbwG0AQjxpABQMA7C7uiK2dJ18AAAAaZmNUTAAAACkAAAAQAAAAEAAAAAAAAAAAAAEAHgAA4UZh4wAAAEJmZEFUAAAAKnjaY2CgBvj//789EvZEwpOR8EokfB+GB48BxkgY2bCTSPg+EoarH5wGIGNkgFXN4DeAIB41gAoGAACzFe79C/hS/gAAABpmY1RMAAAAKwAAABAAAAAQAAAAAAAAAAAAAQAeAAAM0LIKAAAAQWZkQVQAAAAseNpjYKAG+P//vykSNkPCTUh4DxL+DcODxwBjJIxs2EEk/BsJw9UPTgOQMTLAqmbwG0AQjxpABQMAgHTvYDK8McMAAAAaZmNUTAAAAC0AAAAQAAAAEAAAAAAAAAAAAAEAHgAA4RrAcAAAADlmZEFUAAAALnjaY2CgBvj//78xDlyEhJch4RcwPPgNQNb0BQn7wPDgNwAZhGPDg98AgnjUACoYAACnh+9Xt0fS2AAAABpmY1RMAAAALwAAABAAAAAQAAAAAAAAAAAAAQAeAAAMjBOZAAAAOWZkQVQAAAAweNpjYKAG+P//vzEOHIWEq5HwQRge/AYga3qAhMthePAbgAymY8OD3wCCeNQAKhgAAFjx72k7d0QkAAAAGmZjVEwAAAAxAAAAEAAAABAAAAAAAAAAAAABAB4AAOCNpIkAAAA5ZmRBVAAAADJ42mNgoAb4//+/MQ7sjoTDkfACGB78BiBruoCEZ8Pw4DcAGZzChge/AQTxqAFUMAAA5SvvVy2nfzsAAAAaZmNUTAAAADMAAAAQAAAAEAAAAAAAAAAAAAEAHgAADRt3YAAAADlmZEFUAAAANHjaY2CgBvj//78xDmyJhO2QcCcMD34DkDUdQcJbYXjwG4AMPmDDg98AgnjUACoYAABXie9yJzS1EAAAABpmY1RMAAAANQAAABAAAAAQAAAAAAAAAAAAAQAeAADg0QUaAAAALGZkQVQAAAA2eNpjYKAG+P//vzGJuB6Gh5YB+7HhwW8AQTD4DSCIRw2gggEAfM/vV+aCsd4AAAAaZmNUTAAAADcAAAAQAAAAEAAAAAAAAAAAAAEAHgAADUfW8wAAADRmZEFUAAAAOHjaY2CgBvj//78xiTgNhoeWAROw4cFvAEEw+A1AxsnY8NAyABn7wvDAGwAA23vvcr83e3EAAAAaZmNUTAAAADkAAAAQAAAAEAAAAAAAAAAAAAEAHgAA4DTnrwAAADRmZEFUAAAAOnjaY2CgBvj//78xiTgAhoeWARnY8OA3gCAY/AYg4y5seGgZgIyTYXjgDQAAI+vvYKC9wpMAAAAaZmNUTAAAADsAAAAQAAAAEAAAAAAAAAAAAAEAHgAADaI0RgAAADRmZEFUAAAAPHjaY2CgBvj//78xidgehoeWAZ7Y8OA3gCAY/AYg45XY8NAyABmXwPDAGwAA/1HvYKNC9mMAAAAaZmNUTAAAAD0AAAAQAAAAEAAAAAAAAAAAAAEAHgAA4GhGPAAAADRmZEFUAAAAPnjaY2CgBvj//78xidgUhoeWAWbY8OA3gCAY/AYg4z3Y8NAyABnXwfDAGwAA4+jvYGU9ydgAAAAaZmNUTAAAAD8AAAAQAAAAEAAAAAAAAAAAAAEAHgAADf6V1QAAADVmZEFUAAAAQHjaY2CgBvj//78xuXjUADoYgAxuY8OD34BwJLwFCS+D4aFlgA8SboDhgTcAAJfG7v2dtCjJAAAAGmZjVEwAAABBAAAAEAAAABAAAAAAAAAAAAABAB4AAObQN20AAAA1ZmRBVAAAAEJ42mNgoAb4//+/Mbl41AA6GIAMZmPDg9+A6Uh4ARKuhuGhZUA5Em6A4YE3AADstO5J4rYdbgAAABpmY1RMAAAAQwAAABAAAAAQAAAAAAAAAAAAAQAeAAALRuSEAAAANWZkQVQAAABEeNpjYKAG+P//vzG5eNQAOhiADDKw4cFvwCkkPAEJh8Pw0DJgNhJugOGBNwAAkKbtudOlpwsAAAAaZmNUTAAAAEUAAAAQAAAAEAAAAAAAAAAAAAEAHgAA5oyW/gAAADVmZEFUAAAARnjaY2CgBvj//78xuXjUADoYgAycsOHBb8AHJNyChO1geGgZsBUJN8DwwBsAAKAr7VaKiqTBAAAAAElFTkSuQmCC`,``+import.meta.url).href,O1=Array.from({length:25},(e,t)=>`M${1.5+t%5*3} ${1.5+Math.floor(t/5)*3}h2v2h-2z`).join(``);function k1(e){let[t,n]=V(e,[`class`,`classList`,`width`,`height`]),r=Ue(),i=`session-progress-indicator-filter-${r}`,a=`session-progress-indicator-clip-${r}`;return(()=>{var e=E1(),r=e.firstChild,o=r.firstChild,s=o.nextSibling,c=s.firstChild,l=r.nextSibling;return ht(e,B(n,{get class(){return t.class},get classList(){return t.classList},get width(){return t.width??16},get height(){return t.height??16},viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,"data-component":`session-progress-indicator-v2`,get"aria-hidden"(){return n[`aria-hidden`]??`true`}}),!0,!0),K(o,`id`,i),K(s,`id`,a),K(c,`d`,O1),K(l,`href`,D1),K(l,`filter`,`url(#${i})`),K(l,`clip-path`,`url(#${a})`),e})()}var A1=G(`<span data-component=shell-submessage dir=ltr><span data-slot=shell-submessage-width><span data-slot=basic-tool-tool-subtitle><span data-slot=shell-submessage-value>`),j1=G(`<div data-component=diagnostics>`),M1=G(`<div data-slot=diagnostic><span data-slot=diagnostic-label></span><span data-slot=diagnostic-location>[<!>:<!>]</span><span data-slot=diagnostic-message>`),N1=G(`<button type=button data-slot=exa-tool-more>`),P1=G(`<div data-component=exa-tool-output><div data-slot=exa-tool-links>`),F1=G(`<a data-slot=exa-tool-link class=webfetch-link target=_blank rel="noopener noreferrer"><span data-slot=webfetch-link-text>`),I1=G(`<div data-component=context-tool-group-list>`),L1=G(`<div data-component=collapsed-tool-group>`),R1=G(`<div data-component=context-tool-group-trigger><span data-slot=context-tool-group-title><span data-slot=basic-tool-tool-title>`),z1=G(`<span data-slot=context-tool-group-prefix>`),B1=G(`<div data-slot=context-tool-group-item>`),V1=G(`<div data-component=tool-trigger><div data-slot=basic-tool-tool-trigger-content><div data-slot=basic-tool-tool-info><div data-slot=basic-tool-tool-info-structured><div data-slot=basic-tool-tool-info-main><span data-slot=basic-tool-tool-title>`),H1=G(`<div data-component=tool-loaded-item><span data-slot=tool-loaded-label aria-hidden=true></span><span data-slot=tool-loaded-value aria-hidden=true>`),U1=G(`<span data-slot=tool-loaded-kind aria-hidden=true>`),W1=G(`<span data-slot=basic-tool-tool-subtitle>`),G1=G(`<span data-slot=basic-tool-tool-arg>`),K1=G(`<span data-slot=context-tool-group-dot>`),q1=G(`<span data-slot=context-tool-group-matches>`),J1=G(`<div data-component=tool-part-wrapper>`),Y1=G(`<span data-slot=apply-patch-directory>`),X1=G(`<div data-slot=apply-patch-trigger-content><div data-slot=apply-patch-file-info><div data-slot=apply-patch-file-name-container><span data-slot=apply-patch-filename></span></div></div><div data-slot=apply-patch-trigger-actions>`),Z1=G(`<div style=width:100%;display:flex;justify-content:flex-end><span class="text-13-regular text-text-weak cursor-default">`),Q1=G(`<div data-component=read-image><img>`),$1=G(`<div data-component=tool-output data-scrollable tabindex=0 role=region>`),e0=G(`<a data-slot=basic-tool-tool-subtitle class=webfetch-link target=_blank rel="noopener noreferrer"><span data-slot=webfetch-link-text>`),t0=G(`<div data-slot=basic-tool-tool-info-structured><div data-slot=basic-tool-tool-info-main><span data-slot=basic-tool-tool-title>`),n0=G(`<span data-component=task-tool-spinner>`),r0=G(`<div data-component=task-tool-action>`),i0=G(`<div data-component=task-tool-card><div data-component=task-tool-surface><div data-slot=basic-tool-tool-info-structured><div data-slot=basic-tool-tool-info-main><span data-component=task-tool-title>`),a0=G(`<span data-component=task-tool-icon>`),o0=G(`<div data-component=task-tool-delegating class="flex h-9 w-fit max-w-full items-center gap-2 rounded-[8px] bg-v2-background-bg-layer-02 p-2.5 text-[13px] font-[530] leading-text-compact tracking-[-0.04px]">`),s0=G(`<div data-component=bash-output dir=ltr><div data-slot=bash-copy></div><div data-slot=bash-scroll data-scrollable tabindex=0 role=region><pre data-slot=bash-pre><code>`),c0=G(`<span data-slot=bash-command>`),l0=G(`<span data-slot=bash-result>`),u0=G(`<div data-component=session-shell-message>`),d0=G(`<div data-component=edit-content>`),f0=G(`<div data-component=edit-tool>`),p0=G(`<div data-component=write-content>`),m0=G(`<div data-component=write-tool>`),h0=G(`<div data-component=apply-patch-tool>`),g0=G(`<span data-slot=apply-patch-change data-type=added>`),_0=G(`<span data-slot=apply-patch-change data-type=removed>`),v0=G(`<div data-component=apply-patch-file-diff>`),y0=G(`<div data-component=question-answers>`),b0=G(`<div data-slot=question-answer-item><div data-slot=question-text></div><div data-slot=answer-text>`);function x0(e){let t,n;return oe(()=>{e.animate&&requestAnimationFrame(()=>{t&&rQ(t,{width:`auto`},{type:`spring`,visualDuration:.25,bounce:0}),n&&rQ(n,{opacity:1,filter:`blur(0px)`},{duration:.32,ease:[.16,1,.3,1]})})}),(()=>{var r=A1(),i=r.firstChild,a=i.firstChild.firstChild,o=t;typeof o==`function`?gt(o,i):t=i;var s=n;return typeof s==`function`?gt(s,a):n=a,q(a,()=>e.text),j(t=>{var n=e.animate?`0px`:void 0,r=e.animate?{opacity:0,filter:`blur(2px)`}:void 0;return n!==t.e&&mt(i,`width`,t.e=n),t.t=pt(a,r,t.t),t},{e:void 0,t:void 0}),r})()}function S0(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function C0(e){return S0(e)&&typeof e.question==`string`}function w0(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function T0(e){return!e||typeof e!=`object`||!(`message`in e)||typeof e.message!=`string`||!(`range`in e)||!e.range||typeof e.range!=`object`?!1:`start`in e.range&&!!e.range.start&&typeof e.range.start==`object`}function E0(e,t){if(!S0(e)||!t)return[];let n=e[t];return Array.isArray(n)?n.filter(T0).filter(e=>e.severity===1).slice(0,3):[]}function D0(e){let t=Al();return z(U,{get when(){return e.diagnostics.length>0},get children(){var n=j1();return q(n,z(H,{get each(){return e.diagnostics},children:e=>(()=>{var n=M1(),r=n.firstChild,i=r.nextSibling,a=i.firstChild.nextSibling,o=a.nextSibling.nextSibling;o.nextSibling;var s=i.nextSibling;return q(r,()=>t.t(`ui.messagePart.diagnostic.error`)),q(i,()=>e.range.start.line+1,a),q(i,()=>e.range.start.character+1,o),q(s,()=>e.message),n})()})),n}})}function O0(e,t){if(!e)return``;if(!t||t===`/`||t===`\\`)return e;if(e===t)return``;let n=t.includes(`\\`)?`\\`:`/`,r=t.endsWith(n)?t:t+n;return e.startsWith(r)?e.slice(t.length):e}function k0(e){let t=aj();return O0(vG(e),t.directory)}function A0(e,t){return t?e.t(`ui.tool.agent`,{type:t}):e.t(`ui.tool.agent.default`)}var j0={ask:`var(--icon-agent-ask-base)`,build:`var(--icon-agent-build-base)`,docs:`var(--icon-agent-docs-base)`,plan:`var(--icon-agent-plan-base)`},M0={build:`var(--v2-agent-build-solid)`,explore:`var(--v2-agent-explore-solid)`,plan:`var(--v2-agent-plan-solid)`,review:`var(--v2-agent-review-solid)`,writer:`var(--v2-agent-writer-solid)`},N0={primary:`var(--text-interactive-base)`,secondary:`var(--text-base)`,accent:`var(--icon-info-base)`,success:`var(--icon-success-base)`,warning:`var(--icon-warning-base)`,error:`var(--icon-critical-base)`,info:`var(--icon-info-base)`},P0={primary:`var(--v2-text-text-accent)`,secondary:`var(--v2-text-text-muted)`,accent:`var(--v2-icon-icon-accent)`,success:`var(--v2-state-fg-success)`,warning:`var(--v2-state-fg-warning)`,error:`var(--v2-state-fg-danger)`,info:`var(--v2-state-fg-info)`},F0=[`var(--icon-agent-ask-base)`,`var(--icon-agent-build-base)`,`var(--icon-agent-docs-base)`,`var(--icon-agent-plan-base)`,`var(--syntax-info)`,`var(--syntax-success)`,`var(--syntax-warning)`,`var(--syntax-property)`,`var(--syntax-constant)`,`var(--text-diff-add-base)`,`var(--text-diff-delete-base)`,`var(--icon-warning-base)`];function I0(e){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)>>>0;return F0[t%F0.length]}function L0(e,t){if(typeof e!=`string`||!e)return{};let n=e.toLowerCase(),r=t?.find(t=>t.name===e||t.name.toLowerCase()===n),i=r?.color?void 0:M0[n],a=R0(r?.color,N0)??j0[n]??I0(n),o=R0(r?.color,P0)??i??a;return{name:r?.name??`${e[0].toUpperCase()}${e.slice(1)}`,color:a,v2Color:o}}function R0(e,t){if(e)return t[e]??e}function z0(e,t){let n=e===`parallel`?`Parallel`:e===`exa`?`Exa`:e===`firecrawl`?`Firecrawl`:e===`tavily`?`Tavily`:void 0;return n?t.t(`ui.tool.websearch.provider`,{provider:n}):t.t(`ui.tool.websearch`)}function B0(e){if(typeof e.path==`string`)return e.path}function V0(e){let t=B0(e);if(t&&/\.(png|jpe?g|gif|webp|svg|avif|bmp|ico)$/i.test(t))return t.replaceAll(`\\`,`/`)}function H0(e,t){if(typeof t?.name==`string`)return t.name;if(typeof e.id==`string`)return e.id;if(typeof e.name==`string`)return e.name}function U0(e,t={},n={}){let r=Al();switch(e){case`read`:{let e=B0(t);return{icon:`glasses`,title:r.t(`ui.tool.read`),subtitle:e?_G(e):void 0}}case`list`:return{icon:`bullet-list`,title:r.t(`ui.tool.list`),subtitle:typeof t.path==`string`?_G(t.path):void 0};case`glob`:return{icon:`magnifying-glass-menu`,title:r.t(`ui.tool.glob`),subtitle:typeof t.pattern==`string`?t.pattern:void 0};case`grep`:return{icon:`magnifying-glass-menu`,title:r.t(`ui.tool.grep`),subtitle:typeof t.pattern==`string`?t.pattern:void 0};case`webfetch`:return{icon:`window-cursor`,title:r.t(`ui.tool.webfetch`),subtitle:typeof t.url==`string`?t.url:void 0};case`websearch`:return{icon:`window-cursor`,title:z0(n?.provider,r),subtitle:typeof t.query==`string`?t.query:void 0};case`subagent`:{let e=t.agent;return{icon:`task`,title:A0(r,typeof e==`string`&&e?e[0].toUpperCase()+e.slice(1):void 0),subtitle:typeof t.description==`string`?t.description:void 0}}case`shell`:return{icon:`console`,title:r.t(`ui.tool.shell`),subtitle:typeof t.command==`string`?t.command:void 0};case`execute`:return{icon:`console`,title:r.t(`ui.tool.execute`),subtitle:typeof t.code==`string`?t.code:void 0};case`edit`:return{icon:`code-lines`,title:r.t(`ui.messagePart.title.edit`),subtitle:typeof t.path==`string`?_G(t.path):void 0};case`write`:return{icon:`code-lines`,title:r.t(`ui.messagePart.title.write`),subtitle:typeof t.path==`string`?_G(t.path):void 0};case`patch`:return{icon:`code-lines`,title:r.t(`ui.tool.patch`),subtitle:Array.isArray(t.files)&&t.files.length?`${t.files.length} ${r.plural(`ui.common.file`,t.files.length)}`:void 0};case`todowrite`:return{icon:`checklist`,title:r.t(`ui.tool.todos`)};case`question`:return{icon:`bubble-5`,title:r.t(`ui.tool.questions`)};case`skill`:return{icon:`brain`,title:H0(t,n)||r.t(`ui.tool.skill`)};default:return{icon:`mcp`,title:e}}}function W0(e){if(!e)return[];let t=new Set;return[...e.matchAll(/https?:\/\/[^\s<>"'`)\]]+/g)].map(e=>e[0].replace(/[),.;:!?]+$/g,``)).filter(e=>!t.has(e)&&(t.add(e),!0))}function G0(e,t){if(e)return t?.(e)}function K0(e,t,n){if(!t)return;let r=typeof e.description==`string`?e.description:``;return(n??[]).filter(e=>e.parentID===t&&!e.time?.archived).filter(e=>!r||e.title?.startsWith(r)).sort((e,t)=>(t.time.created??0)-(e.time.created??0))[0]?.id}function q0(e){let t=Al(),[n,r]=A(!1),i,a=N(()=>W0(e.output)),o=N(()=>{let e=a();return n()||e.length<=10?e:e.slice(0,10)}),s=N(()=>Math.max(0,a().length-10)),c=e=>{e.stopPropagation(),r(!0),requestAnimationFrame(()=>{i?.focus()})};return z(U,{get when(){return a().length>0},get children(){var e=P1(),r=e.firstChild;return q(r,z(H,{get each(){return o()},children:(e,t)=>(()=>{var n=F1(),r=n.firstChild;return n.$$click=e=>e.stopPropagation(),gt(e=>{t()===10&&(i=e)},n),K(n,`href`,e),q(r,e),q(n,z(No,{name:`outline-square-arrow`,class:`webfetch-link-icon`}),null),n})()}),null),q(r,z(U,{get when(){return W(()=>!n())()&&s()>0},get children(){var e=N1();return e.$$click=c,q(e,()=>t.plural(`ui.common.moreCount`,s())),e}}),null),e}})}function J0(e){let t=Al(),n=N(()=>e.parts.filter(e=>e.type===`tool`)),r=N(()=>e.busy||n().some(e=>e.state.status===`streaming`||e.state.status===`running`)),i=N(()=>[...new Set(e.parts.flatMap(e=>e.type!==`tool`&&e.type!==`shell`?[]:[e.type===`tool`?e.name===`skill`?t.t(`ui.tool.skill`):e.name===`subagent`?t.t(`ui.tool.agent.default`):U0(e.name,void 0,e.name===`websearch`?Pz(e):void 0).title:t.t(`ui.tool.shell`)]))].join(`, `)),a=N(()=>{let n=e.parts.filter(e=>e.type===`reasoning`).length;if(!i()&&!n){let e=t.t(`ui.messagePart.context.details`);return{text:e,title:e,before:``,after:``}}let r=i()||t.plural(`ui.messagePart.context.thought`,n),a=e.parts.filter(e=>e.type===`tool`||e.type===`shell`).length||n,o=t.plural(`ui.messagePart.tools.used`,a,{tools:r}),s=o.indexOf(r);return{text:o,title:r,before:o.slice(0,s).trim(),after:o.slice(s+r.length).trim()}}),o=N(()=>e.parts.reduce((e,t)=>{if(t.type!==`tool`)return e.push(t),e;let n=e.at(-1);return t.name===`patch`&&t.state.status!==`error`&&Array.isArray(n)&&n?.[0]?.name===`patch`&&n[0].state.status!==`error`||t.name===`skill`&&t.state.status!==`error`&&H0(Nz(t),Pz(t))&&Array.isArray(n)&&n?.[0]?.name===`skill`&&n[0].state.status!==`error`&&H0(Nz(n[0]),Pz(n[0]))?(n.push(t),e):(e.push([t]),e)},[])),s=N(()=>{let t=new Map;return o().forEach(n=>{if(!Array.isArray(n)||n[0]?.name!==`patch`||n[0].state.status===`error`)return;let r=e.patchGroupKey?.(n)??n[0].id;n.forEach(e=>t.set(e,r))}),t}),c=t=>{e.onOpenChange(t),e.onSizeChange?.()};return(()=>{var n=L1();return q(n,z(jQ,{icon:`glasses`,get status(){return r()?`running`:`completed`},compact:!0,hasContent:!0,allowOpenWhilePending:!0,get open(){return e.open},onOpenChange:c,get trigger(){return(()=>{var e=R1(),t=e.firstChild,n=t.firstChild;return q(t,z(U,{get when(){return a().before},children:e=>(()=>{var t=z1();return q(t,e),t})()}),n),q(n,()=>a().title),q(t,z(U,{get when(){return a().after},children:e=>(()=>{var t=z1();return q(t,e),t})()}),null),j(()=>K(e,`aria-label`,a().text)),e})()},get children(){var n=I1();return q(n,z(Ge,{get each(){return o()},children:n=>{let r=N(()=>{let e=n();return Array.isArray(e)?e:void 0}),i=N(()=>{let e=n();return!Array.isArray(e)&&e.type===`reasoning`?e:void 0}),a=N(()=>{let e=n();return!Array.isArray(e)&&(e.type===`notice`||e.type===`shell`)?e:void 0});return z(U,{get when(){return r()},get fallback(){return z(U,{get when(){return i()},get fallback(){return z(U,{get when(){return a()},children:e=>(()=>{var t=B1();return q(t,()=>e().render()),t})()})},children:t=>(()=>{var n=B1();return q(n,z(_$,{get id(){return t().id},get content(){return t()},get streaming(){return t().streaming??!1},get defaultOpen(){return e.reasoningDefaultOpen},get open(){return e.reasoningOpen?.(t().id)},onOpenChange:n=>e.onReasoningOpenChange?.(t().id,n),get onContentRendered(){return e.onSizeChange}})),n})()})},children:n=>{let r=N(()=>n()[0]),i=N(()=>Z0(r(),t)),a=N(()=>n().flatMap(e=>{let t=H0(Nz(e),Pz(e));return t?[t]:[]})),o=`__OPENCODE_LOADED_SKILL__`,c=N(()=>t.plural(`ui.tool.loadedSkills`,a().length,{name:o}));return(()=>{var l=B1();return q(l,z(U,{get when(){return W(()=>!(r().state.status===`error`||![`read`,`glob`,`grep`,`list`].includes(r().name)||r().name===`read`&&V0(Nz(r()))))()&&!Bz(r())},get fallback(){return z(U,{get when(){return W(()=>r().name===`skill`&&n().length>1)()&&a().length===n().length},get fallback(){return z(U,{get when(){return W(()=>r().name===`patch`)()&&r().state.status!==`error`},get fallback(){return z(i2,{get id(){return r().id},get tool(){return r().name},get input(){return Nz(r())},get metadata(){return Pz(r())},get output(){return Fz(r())},get error(){return Iz(r())},get status(){return r().state.status},get defaultOpen(){return e.toolDefaultOpen?.(r())??!1},get open(){return e.toolOpen?.(r().id)??e.toolDefaultOpen?.(r())},onOpenChange:t=>e.onToolOpenChange?.(r().id,t),deferContent:!0,virtualizeDiff:!1,get onContentRendered(){return e.onSizeChange}})},get children(){return z(Y0,{get tools(){return n()},get fileOpen(){return e.fileOpen&&(t=>e.fileOpen?.(`${s().get(r())}:${t}`))},get onFileOpenChange(){return e.onFileOpenChange&&((t,n)=>e.onFileOpenChange?.(`${s().get(r())}:${t}`,n))},get onSizeChange(){return e.onSizeChange}})}})},get children(){var e=H1(),r=e.firstChild,i=r.nextSibling;return q(r,()=>c().split(o)[0]?.trim()),q(i,z(H,{get each(){return a()},children:(e,t)=>[z(U,{get when(){return t()>0},children:`, `}),z(HG,{as:`span`,text:e,get active(){return[`streaming`,`running`].includes(n()[t()].state.status)}})]})),q(e,z(U,{get when(){return c().split(o)[1]?.trim()},children:e=>(()=>{var t=U1();return q(t,e),t})()}),null),j(r=>{var i=n().map(e=>e.id).join(`,`),o=t.plural(`ui.tool.loadedSkills`,a().length,{name:a().join(`, `)});return i!==r.e&&K(e,`data-timeline-part-ids`,r.e=i),o!==r.t&&K(e,`aria-label`,r.t=o),r},{e:void 0,t:void 0}),e}})},get children(){var e=V1(),t=e.firstChild.firstChild.firstChild,n=t.firstChild,a=n.firstChild;return q(a,z(HG,{get text(){return i().title},get active(){return r().state.status===`streaming`||r().state.status===`running`}})),q(n,z(U,{get when(){return i().subtitle},children:e=>(()=>{var t=W1();return q(t,e),t})()}),null),q(n,z(H,{get each(){return i().args},children:e=>(()=>{var t=G1();return q(t,e),t})()}),null),q(t,z(U,{get when(){return i().matches},children:e=>[K1(),(()=>{var t=q1();return q(t,e),t})()]}),null),e}})),l})()}})}})),n}})),j(()=>K(n,`data-timeline-part-ids`,e.parts.map(e=>e.id).join(`,`))),n})()}function Y0(e){let t=N(t=>{let n=e.tools.flatMap(e=>{let t=Pz(e).files;return Array.isArray(t)?t.map((t,n)=>({key:`${e.id}:${n}`,toolID:e.id,value:t})):[]}),r=new Map(n.map(e=>[e.key,e.value])),i=new Set(t.map(e=>e.key)),a=new Set(e.tools.map(e=>e.id)),o=[...t.filter(e=>a.has(e.toolID)).map(e=>{if(!r.has(e.key))return e;let t=r.get(e.key);return X0(t,e.value)?e:{...e,value:t}}),...n.filter(e=>!i.has(e.key))];return o.length===t.length&&o.every((e,n)=>e===t[n])?t:o},[]),n=N(()=>({files:t().map(e=>e.value)})),r=N(()=>e.tools.some(e=>e.state.status===`streaming`||e.state.status===`running`)),i=t2.render(`patch`)??PQ,a=N(()=>e.tools[0]?.name===`edit`?`edit`:`patch`);return(()=>{var t=J1();return q(t,z(Nt,{component:i,get tool(){return a()},input:{},get metadata(){return n()},get status(){return r()?`running`:`completed`},get fileOpen(){return e.fileOpen},get onFileOpenChange(){return e.onFileOpenChange},deferContent:!0,virtualizeDiff:!1,get onContentRendered(){return e.onSizeChange}})),j(n=>{var r=e.tools.length===1?e.tools[0]?.id:void 0,i=e.tools.length>1?e.tools.map(e=>e.id).join(`,`):void 0;return r!==n.e&&K(t,`data-timeline-part-id`,n.e=r),i!==n.t&&K(t,`data-timeline-part-ids`,n.t=i),n},{e:void 0,t:void 0}),t})()}function X0(e,t){return e===t?!0:!S0(e)||!S0(t)?!1:e.file===t.file&&e.patch===t.patch&&e.additions===t.additions&&e.deletions===t.deletions&&e.status===t.status}function Z0(e,t){let n=Nz(e),r=Pz(e),i=typeof n.path==`string`?n.path:`/`,a=typeof n.pattern==`string`?n.pattern:void 0,o=typeof n.include==`string`?n.include:void 0,s=e.name===`glob`?r.count:e.name===`grep`?r.matches:void 0,c=typeof s==`number`&&Number.isFinite(s)&&s!==0?t.plural(`ui.messagePart.context.match`,s):void 0;if(e.name===`read`){let e=[...typeof n.offset==`number`?[`offset=${n.offset}`]:[],...typeof n.limit==`number`?[`limit=${n.limit}`]:[]];return{title:t.t(`ui.tool.read`),subtitle:_G(i),args:e,matches:void 0}}return e.name===`list`?{title:t.t(`ui.tool.list`),subtitle:k0(i),args:[],matches:void 0}:e.name===`glob`?{title:t.t(`ui.tool.glob`),subtitle:k0(i),args:a?[`pattern=${a}`]:[],matches:c}:{title:t.t(`ui.tool.grep`),subtitle:k0(i),args:[...a?[`pattern=${a}`]:[],...o?[`include=${o}`]:[]],matches:c}}var Q0={};function $0(e){return Q0[e.name]=e,e}function e2(e){return Q0[e]?.render}var t2={register:$0,render:e2};function n2(e){let t=Al();return z(jQ,B(e,{open:!0,onOpenChange:void 0,locked:!0,icon:`code-lines`,defer:!1,rail:!1,get trigger(){return{title:e.title,subtitle:e.count>0?`${e.count} ${t.plural(`ui.common.file`,e.count)}`:``}},get children(){return e.children}}))}function r2(e){let t=N(()=>e.path||`tool-file`),[n,r]=A(e.defaultOpen??!1),[i,a]=A(!1),o=()=>e.open??n(),s=t=>{e.open===void 0&&r(t),e.onOpenChange?.(t)};return M(()=>{e.forceOpen&&!o()&&s(!0)}),M(()=>{if(!o()){a(!1);return}let e=requestAnimationFrame(()=>a(!0));F(()=>cancelAnimationFrame(e))}),z(I$,{multiple:!0,"data-scope":`apply-patch`,style:{"--sticky-accordion-offset":`calc(32px + var(--tool-content-gap))`},get value(){return W(()=>!!o())()?[t()]:[]},onChange:e=>s(e.includes(t())),get children(){return z(I$.Item,{get value(){return t()},get children(){return[z(L$,{get children(){return z(I$.Trigger,{get children(){var t=X1(),n=t.firstChild,r=n.firstChild,i=r.firstChild,a=n.nextSibling;return q(n,z(DG,{get node(){return{path:e.path,type:`file`}}}),r),q(r,z(U,{get when(){return e.path.includes(`/`)},get children(){var t=Y1();return q(t,()=>`\u202A${k0(e.path)}\u202C`),t}}),i),q(i,()=>_G(e.path)),q(a,()=>e.actions,null),q(a,z(No,{name:`chevron-grabber-vertical`,size:`small`}),null),t}})}}),z(I$.Content,{get children(){return z(U,{get when(){return!e.defer||i()},get children(){return e.children}})}})]}})}})}function i2(e){let t=aj(),n=Al();if(e.tool===`todowrite`)return null;let r=()=>e.tool===`question`&&(e.status===`streaming`||e.status===`running`),i=N(()=>{if(e.tool!==`subagent`)return;let t=e.metadata.sessionID;if(typeof t==`string`&&t)return t}),a=N(()=>G0(i(),t.sessionHref)),o=N(()=>{if(e.tool!==`subagent`)return;let t=e.input.description;return typeof t==`string`&&t?t:i()}),s=N(()=>a2(e,n)),c=N(()=>o2(e,n.t(`ui.toolErrorCard.failed`))),l=N(()=>t2.render(e.tool)??PQ);return z(U,{get when(){return!r()},get children(){var r=J1();return q(r,z(Ke,{get children(){return[z(qe,{get when(){return c()},children:r=>{let c=r().replace(`Error: `,``);return e.tool===`question`&&c.includes(`dismissed this question`)?(()=>{var e=Z1(),t=e.firstChild;return q(t,()=>n.t(`ui.messagePart.questions.dismissed`)),e})():z(U$,{get tool(){return e.tool},get error(){return r()},get title(){return W(()=>e.tool===`websearch`)()?z0(e.metadata.provider,n):void 0},get defaultOpen(){return e.defaultOpen},get open(){return e.open},get onOpenChange(){return e.onOpenChange},get subtitle(){return o()??s()},get href(){return a()},onSubtitleClick:e=>{if(!t.navigateToSession||e.button!==0||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)return;let n=i();n&&(e.preventDefault(),t.navigateToSession(n))}})}}),z(qe,{when:!0,get children(){return z(Nt,B({get component(){return l()}},e))}})]}})),j(()=>K(r,`data-timeline-part-id`,e.id)),r}})}function a2(e,t){let n=e=>typeof e==`string`&&e?e:void 0;if(e.tool===`shell`)return n(e.input.command)??n(e.metadata.command);if(e.tool===`execute`)return n(e.input.code);if(e.tool===`read`)return _G(B0(e.input)??``);if(e.tool===`edit`||e.tool===`write`)return _G(n(e.input.path)??``);if(e.tool===`list`||e.tool===`glob`||e.tool===`grep`)return k0(n(e.input.path)??`/`);if(e.tool===`webfetch`)return n(e.input.url);if(e.tool===`websearch`)return n(e.input.query);if(e.tool===`skill`)return H0(e.input,e.metadata);if(e.tool===`patch`){let n=new Set(Array.isArray(e.metadata.files)?e.metadata.files.filter(S1).map(e=>e.file):[]).size;return n===0?void 0:`${n} ${t.plural(`ui.common.file`,n)}`}if(e.tool===`question`){let n=Array.isArray(e.input.questions)?e.input.questions.filter(C0).length:0;return n===0?void 0:`${n} ${t.plural(`ui.common.question`,n)}`}}function o2(e,t){if(e.status===`error`)return e.error;if(e.tool===`execute`&&zz(e.metadata))return typeof e.output==`string`&&e.output?e.output:t}t2.register({name:`read`,render(e){let t=aj(),n=Al(),r=N(()=>e.status===`completed`?V0(e.input):void 0),i=[];typeof e.input.offset==`number`&&i.push(`offset=`+e.input.offset),typeof e.input.limit==`number`&&i.push(`limit=`+e.input.limit);let a=N(()=>{if(e.status!==`completed`)return[];let t=e.metadata.loaded;return!t||!Array.isArray(t)?[]:t.filter(e=>typeof e==`string`)}),o=N(()=>a().map(e=>{let n=O0(e,t.directory);return n===e?n:n.replace(/^[/\\]/,``)})),s=`__OPENCODE_LOADED_PATH__`,c=N(()=>n.t(`ui.tool.loadedFile`,{path:s}).split(s));return[z(jQ,B(e,{icon:`glasses`,get hasContent(){return!!r()},defer:!0,onOpenChange:t=>{e.onOpenChange?.(t),e.onContentRendered?.()},get trigger(){return{title:n.t(`ui.tool.read`),subtitle:_G(B0(e.input)??``),args:i}},get children(){return z(U,{get when(){return r()},keyed:!0,children:t=>z(s2,{path:t,get onContentRendered(){return e.onContentRendered}})})}})),z(U,{get when(){return o().length>0},get children(){var e=H1(),t=e.firstChild,r=t.nextSibling;return q(t,()=>c()[0]?.trim()),q(r,()=>o().join(`, `)),q(e,z(U,{get when(){return c()[1]?.trim()},children:e=>(()=>{var t=U1();return q(t,e),t})()}),null),j(()=>K(e,`aria-label`,n.t(`ui.tool.loadedFile`,{path:o().join(`, `)}))),e}})]}});function s2(e){let t=PW(),n;return M(()=>{if(!t?.readImage)return;let e=oW(t.readImage);e.update(n),F(()=>e.dispose())}),oe(()=>e.onContentRendered?.()),(()=>{var t=Q1(),r=t.firstChild,i=n;return typeof i==`function`?gt(i,t):n=t,r.addEventListener(`error`,()=>e.onContentRendered?.()),r.addEventListener(`load`,()=>e.onContentRendered?.()),j(t=>{var n=e.path,i=_G(e.path);return n!==t.e&&K(r,`data-local-image`,t.e=n),i!==t.t&&K(r,`alt`,t.t=i),t},{e:void 0,t:void 0}),t})()}t2.register({name:`list`,render(e){let t=Al();return z(jQ,B(e,{icon:`bullet-list`,get trigger(){return{title:t.t(`ui.tool.list`),subtitle:k0(typeof e.input.path==`string`?e.input.path:`/`)}},get children(){return z(U,{get when(){return e.output},get children(){var n=$1();return q(n,z(oG,{get text(){return e.output}})),j(()=>K(n,`aria-label`,t.t(`ui.scrollView.ariaLabel`))),n}})}}))}}),t2.register({name:`glob`,render(e){let t=Al();return z(jQ,B(e,{icon:`magnifying-glass-menu`,get trigger(){return{title:t.t(`ui.tool.glob`),subtitle:k0(typeof e.input.path==`string`?e.input.path:`/`),args:typeof e.input.pattern==`string`?[`pattern=`+e.input.pattern]:[]}},get children(){return z(U,{get when(){return e.output},get children(){var n=$1();return q(n,z(oG,{get text(){return e.output}})),j(()=>K(n,`aria-label`,t.t(`ui.scrollView.ariaLabel`))),n}})}}))}}),t2.register({name:`grep`,render(e){let t=Al(),n=[];return typeof e.input.pattern==`string`&&n.push(`pattern=`+e.input.pattern),typeof e.input.include==`string`&&n.push(`include=`+e.input.include),z(jQ,B(e,{icon:`magnifying-glass-menu`,get trigger(){return{title:t.t(`ui.tool.grep`),subtitle:k0(typeof e.input.path==`string`?e.input.path:`/`),args:n}},get children(){return z(U,{get when(){return e.output},get children(){var n=$1();return q(n,z(oG,{get text(){return e.output}})),j(()=>K(n,`aria-label`,t.t(`ui.scrollView.ariaLabel`))),n}})}}))}}),t2.register({name:`webfetch`,render(e){let t=Al(),n=N(()=>e.status===`streaming`||e.status===`running`),r=N(()=>{let t=e.input.url;return typeof t==`string`?t:``});return z(jQ,B(e,{hideDetails:!0,icon:`window-cursor`,get trigger(){return(()=>{var e=t0(),i=e.firstChild,a=i.firstChild;return q(a,z(HG,{get text(){return t.t(`ui.tool.webfetch`)},get active(){return n()}})),q(i,z(U,{get when(){return W(()=>!n())()&&r()},get children(){var e=e0(),t=e.firstChild;return e.$$click=e=>e.stopPropagation(),q(t,r),q(e,z(No,{name:`outline-square-arrow`,class:`webfetch-link-icon`}),null),j(()=>K(e,`href`,r())),e}}),null),e})()}}))}}),t2.register({name:`websearch`,render(e){let t=Al(),n=N(()=>{let t=e.input.query;return typeof t==`string`?t:``}),r=N(()=>z0(e.metadata.provider,t));return z(jQ,B(e,{icon:`window-cursor`,get trigger(){return{title:r(),subtitle:n(),subtitleClass:`exa-tool-query`}},get children(){return z(q0,{get output(){return e.output}})}}))}}),t2.register({name:`subagent`,render(e){let t=aj(),n=Al(),r=()=>e.status===`streaming`,i=N(()=>{let n=e.metadata.sessionID;return typeof n==`string`&&n?n:K0(e.input,t.sessionID,t.store.session)}),a=N(()=>L0(e.input.agent,t.store.agent)),o=N(()=>a().name??n.t(`ui.tool.agent.default`)),s=N(()=>a().color),c=N(()=>a().v2Color),l=N(()=>e.metadata.background===!0||e.status===`completed`&&e.metadata.status===`running`),u=N(()=>{let t=typeof e.input.description==`string`&&e.input.description?e.input.description:i();return t&&(l()?`${t} (background)`:t)}),d=N(()=>{if(e.status===`streaming`||e.status===`running`)return!0;let n=i();return n?(t.store.session_status[n]?.type??`idle`)!==`idle`:!1}),f=N(()=>G0(i(),t.sessionHref)),p=N(()=>!!(i()&&(t.navigateToSession||f()))),m=()=>{let e=i();e&&t.navigateToSession?.(e)},h=e=>{t.navigateToSession&&(e.button!==0||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||(e.preventDefault(),m()))},g=e=>{p()&&!f()&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),m())},_=()=>(()=>{var e=i0(),t=e.firstChild.firstChild,n=t.firstChild,r=n.firstChild;return q(n,z(U,{get when(){return d()},get fallback(){return(()=>{var e=a0();return q(e,z(No,{name:`subagent`,size:`small`})),e})()},get children(){var e=n0();return q(e,z(k1,{get style(){return{color:c()??`light-dark(var(--v2-text-text-base), #ffffff)`}}})),j(t=>mt(e,`color`,s()??`var(--icon-interactive-base)`)),e}}),r),q(r,o),q(n,z(U,{get when(){return u()},get children(){var e=W1();return q(e,u),e}}),null),q(t,z(U,{get when(){return p()},get children(){var e=r0();return q(e,z(No,{name:`chevron-right`,size:`normal`})),e}}),null),j(t=>{var n=c(),r=s();return n!==t.e&&mt(e,`--task-agent-color`,t.e=n),r!==t.t&&mt(e,`--task-agent-color-fallback`,t.t=r),t},{e:void 0,t:void 0}),e})();return z(U,{get when(){return r()},get fallback(){return z(jQ,{icon:`task`,get status(){return e.status},get trigger(){return _()},hideDetails:!0,triggerAsLink:!0,get triggerHref(){return f()},get clickable(){return p()},onTriggerClick:h,onTriggerKeyDown:g})},get children(){var e=o0();return q(e,z(No,{name:`subagent`,size:`small`,class:`shrink-0 text-v2-icon-icon-faint`}),null),q(e,z(HG,{get text(){return n.t(`ui.tool.agent.delegating`)},class:`min-w-0 truncate`}),null),e}})}});function c2(e){let t=Al(),[n,r]=A(!1),i=async()=>{e.copy&&await r$(e.copy)&&(r(!0),setTimeout(()=>r(!1),2e3))};return(()=>{var r=s0(),a=r.firstChild,o=a.nextSibling,s=o.firstChild.firstChild;return q(a,z(Sl,{get value(){return W(()=>!!n())()?t.t(`ui.message.copied`):t.t(`ui.message.copy`)},placement:`top`,get children(){return z(Lo,{get icon(){return z(No,{get name(){return n()?`check`:`outline-copy`},size:`small`})},size:`normal`,variant:`ghost-muted`,onMouseDown:e=>e.preventDefault(),onClick:i,get"aria-label"(){return W(()=>!!n())()?t.t(`ui.message.copied`):t.t(`ui.message.copy`)}})}})),q(s,()=>e.children),j(n=>{var i=e.variant,a=t.t(`ui.scrollView.ariaLabel`);return i!==n.e&&K(r,`data-variant`,n.e=i),a!==n.t&&K(o,`aria-label`,n.t=a),n},{e:void 0,t:void 0}),r})()}t2.register({name:`execute`,render(e){let t=Al(),n=()=>e.status===`streaming`||e.status===`running`,r=N(()=>typeof e.input.code==`string`?e.input.code:``),i=N(()=>b$(e.output??``).replace(/\r\n?/g,`
793
- `)),a=n();return z(jQ,B(e,{icon:`console`,rail:!1,compact:!0,allowOpenWhilePending:!0,trigger:e=>(()=>{var i=t0(),o=i.firstChild,s=o.firstChild;return q(s,z(HG,{get text(){return t.t(`ui.tool.execute`)},get active(){return n()}})),q(o,z(U,{get when(){return W(()=>!e())()&&r()},get children(){return z(x0,{get text(){return r().split(`
794
- `)[0]},animate:a})}}),null),i})(),get children(){return z(c2,{get copy(){return r()},variant:`shell`,get children(){return[(()=>{var e=c0();return q(e,r),e})(),z(U,{get when(){return i()},children:e=>(()=>{var t=l0();return q(t,e),t})()})]}})}}))}}),t2.register({name:`shell`,render(e){let t=Al(),n=aj(),r=()=>e.status===`streaming`,i=()=>r()||e.status===`running`||typeof e.metadata.shellID==`string`&&n.shellRunning?.(e.metadata.shellID)===!0,a=r(),[o,s]=A(``),c=N(()=>e.metadata.status===`exited`||e.metadata.status===`timeout`||e.metadata.status===`killed`?e.output:void 0);M(()=>{if(c()!==void 0)return;let t=e.metadata.shellID,r=n.shellOutput;if(typeof t!=`string`||!r)return;let a=n.directory,o=i(),l=0,u=!1,d=!1,f=async()=>{if(!u){u=!0;do{let e=await r({id:t,location:{directory:a},cursor:l}).catch(()=>void 0);if(d||!e||(s(t=>l===0?e.data.output:t+e.data.output),e.data.cursor<=l)||(l=e.data.cursor,o||l>=e.data.size))break}while(!d);u=!1}};f();let p=o?setInterval(()=>void f(),1e3):void 0;F(()=>{d=!0,clearInterval(p)})});let l=()=>typeof e.input.command==`string`?e.input.command:typeof e.metadata.command==`string`?e.metadata.command:``,u=N(()=>b$(c()??(typeof e.metadata.shellID==`string`&&o()||e.output||``)).replace(/\r\n?/g,`
795
- `));return z(jQ,B(e,{icon:`console`,rail:!1,compact:!0,allowOpenWhilePending:!0,trigger:e=>(()=>{var n=t0(),o=n.firstChild,s=o.firstChild;return q(s,z(HG,{get text(){return t.t(`ui.tool.shell`)},get active(){return i()}})),q(o,z(U,{get when(){return!e()},get children(){return z(U,{get when(){return l()},get fallback(){return z(U,{get when(){return r()},get children(){var e=W1();return q(e,()=>t.t(`ui.tool.shell.writingCommand`)),e}})},children:e=>z(x0,{get text(){return e()},animate:a})})}}),null),n})(),get children(){return z(c2,{get copy(){return l()},variant:`shell`,get children(){return[(()=>{var e=c0();return q(e,l),e})(),z(U,{get when(){return u()},children:e=>(()=>{var t=l0();return q(t,e),t})()})]}})}}))}});function l2(e){let t=Al(),n=t2.render(`shell`)??PQ,r=N(()=>{let n=e.message;if(n.status===`timeout`)return t.t(`ui.tool.shell.timeout`);if(n.status===`killed`)return t.t(`ui.tool.shell.cancelled`);if(n.status===`exited`&&n.exit!==void 0&&n.exit!==0)return t.t(`ui.tool.shell.exit`,{code:n.exit})});return(()=>{var t=u0();return q(t,z(Nt,{component:n,tool:`shell`,get input(){return{command:e.message.command}},get metadata(){return{shellID:e.message.shellID,status:e.message.status,exit:e.message.exit,truncated:e.message.output?.truncated}},get output(){return e.message.output?.output},get status(){return e.message.status===`running`?`running`:`completed`},get defaultOpen(){return e.defaultOpen},get open(){return e.open},get onOpenChange(){return e.onOpenChange}}),null),q(t,z(U,{get when(){return r()},children:t=>z(U$,{tool:`shell`,get error(){return t()},get subtitle(){return e.message.command}})}),null),j(()=>K(t,`data-timeline-part-id`,e.message.id)),t})()}t2.register({name:`edit`,render(e){let t=Al(),n=wf(),r=()=>typeof e.input.path==`string`?e.input.path:``,i=N(()=>{let t=e.metadata.files;if(Array.isArray(t))return t.find(S1)}),a=N(()=>E0(e.metadata.diagnostics,r())),o=N(()=>{let e=i();return typeof e?.file==`string`?e.file:r()}),s=()=>e.status===`streaming`||e.status===`running`,c=N(()=>{let e=i();if(e)return{file:typeof e.file==`string`?e.file:r(),patch:typeof e.patch==`string`?e.patch:void 0}},void 0,{equals:(e,t)=>e?.file===t?.file&&e?.patch===t?.patch}),l=N(()=>{try{let e=c();if(e){let t=m1(e);if(t)return{fileDiff:t,hunkSeparators:t.isPartial?`simple`:`line-info-basic`}}}catch{}return{before:{name:o(),contents:typeof e.input.oldString==`string`?e.input.oldString:``},after:{name:o(),contents:typeof e.input.newString==`string`?e.input.newString:``}}});return(()=>{var r=f0();return q(r,z(n2,B(e,{get title(){return t.t(`ui.messagePart.title.edit`)},get count(){return+!!o()},get children(){return[z(U,{get when(){return o()},get children(){return z(r2,{get path(){return o()},get defaultOpen(){return e.defaultOpen},get open(){return e.open},get onOpenChange(){return e.onOpenChange},get forceOpen(){return e.forceOpen},get defer(){return e.deferContent!==!1},get actions(){return z(U,{get when(){return W(()=>!s())()?i():void 0},children:e=>z(G$,{appearance:`standard`,get changes(){return e()}})})},get children(){var t=d0();return q(t,z(Nt,B({component:n,mode:`diff`,get virtualize(){return e.virtualizeDiff},get onRendered(){return e.onContentRendered}},l))),t}})}}),z(D0,{get diagnostics(){return a()}})]}}))),r})()}}),t2.register({name:`write`,render(e){let t=Al(),n=wf(),r=N(()=>typeof e.input.path==`string`?e.input.path:``),i=N(()=>typeof e.input.content==`string`?e.input.content:``),a=N(()=>E0(e.metadata.diagnostics,r()));return(()=>{var o=m0();return q(o,z(n2,B(e,{get title(){return t.t(`ui.messagePart.title.write`)},get count(){return+!!r()},get children(){return[z(U,{get when(){return r()},get children(){return z(r2,{get path(){return r()},get defaultOpen(){return e.defaultOpen},get open(){return e.open},get onOpenChange(){return e.onOpenChange},get forceOpen(){return e.forceOpen},get defer(){return e.deferContent!==!1},get children(){var t=p0();return q(t,z(Nt,{component:n,mode:`text`,get file(){return{name:r(),contents:i(),cacheKey:Tf(i())}},overflow:`scroll`,get onRendered(){return e.onContentRendered}})),t}})}}),z(D0,{get diagnostics(){return a()}})]}}))),o})()}}),t2.register({name:`patch`,render(e){let t=Al(),n=wf(),r=N(()=>T1(e.metadata.files)),[i,a]=A([]),o=N(()=>e.tool===`edit`?t.t(`ui.messagePart.title.edit`):t.t(`ui.tool.patch`)),s=N(()=>e.fileOpen?r().flatMap(t=>e.fileOpen?.(t.path)===!0?[t.path]:[]):i()),c=t=>{let n=Array.isArray(t)?t:t?[t]:[];if(!e.onFileOpenChange){a(n);return}r().forEach(t=>e.onFileOpenChange?.(t.path,n.includes(t.path)))};return(()=>{var i=h0();return q(i,z(n2,B(e,{get title(){return o()},get count(){return r().length},get children(){return z(U,{get when(){return r().length>0},get children(){return z(I$,{multiple:!0,"data-scope":`apply-patch`,style:{"--sticky-accordion-offset":`calc(32px + var(--tool-content-gap))`},get value(){return s()},onChange:c,get children(){return z(Ge,{get each(){return r()},children:r=>{let i=()=>r().path,a=N(()=>s().includes(i())),[o,c]=A(!1);return M(()=>{if(!a()){c(!1);return}requestAnimationFrame(()=>{a()&&c(!0)})}),z(I$.Item,{get value(){return i()},get"data-type"(){return r().type},get children(){return[z(L$,{get children(){return z(I$.Trigger,{get children(){var e=X1(),n=e.firstChild,i=n.firstChild,a=i.firstChild,o=n.nextSibling;return q(n,z(DG,{get node(){return{path:r().path,type:`file`}}}),i),q(i,z(U,{get when(){return r().path.includes(`/`)},get children(){var e=Y1();return q(e,()=>`\u202A${k0(r().path)}\u202C`),e}}),a),q(a,()=>_G(r().path)),q(o,z(Ke,{get children(){return[z(qe,{get when(){return r().type===`add`},get children(){var e=g0();return q(e,()=>t.t(`ui.patch.action.created`)),e}}),z(qe,{get when(){return r().type===`delete`},get children(){var e=_0();return q(e,()=>t.t(`ui.patch.action.deleted`)),e}}),z(qe,{when:!0,get children(){return z(G$,{appearance:`standard`,get changes(){return{additions:r().additions,deletions:r().deletions}}})}})]}}),null),q(o,z(No,{name:`chevron-grabber-vertical`,size:`small`}),null),e}})}}),z(I$.Content,{get children(){return z(U,{get when(){return e.deferContent===!1||o()},get children(){return z(H,{get each(){return r().views},children:t=>(()=>{var r=v0();return q(r,z(Nt,{component:n,mode:`diff`,get virtualize(){return e.virtualizeDiff},get fileDiff(){return t.fileDiff},get hunkSeparators(){return t.fileDiff.isPartial?`simple`:`line-info-basic`},get onRendered(){return e.onContentRendered}})),r})()})}})}})]}})}})}})}})}}))),i})()}}),t2.register({name:`question`,render(e){let t=Al(),n=N(()=>Array.isArray(e.input.questions)?e.input.questions.filter(C0):[]),r=N(()=>Array.isArray(e.metadata.answers)?e.metadata.answers.filter(w0):[]),i=N(()=>r().length>0),a=N(()=>{let e=n().length;return e===0?``:i()?t.t(`ui.question.subtitle.answered`,{count:e}):`${e} ${t.plural(`ui.common.question`,e)}`});return z(jQ,B(e,{get defaultOpen(){return i()},icon:`bubble-5`,get trigger(){return{title:t.t(`ui.tool.questions`),subtitle:a()}},get children(){return z(U,{get when(){return i()},get children(){var e=y0();return q(e,z(H,{get each(){return n()},children:(e,n)=>{let i=()=>r()[n()]??[];return(()=>{var n=b0(),r=n.firstChild,a=r.nextSibling;return q(r,()=>e.question),q(a,()=>i().join(`, `)||t.t(`ui.question.answer.none`)),n})()}})),e}})}}))}}),t2.register({name:`skill`,render(e){let t=Al(),n=N(()=>H0(e.input,e.metadata)),r=N(()=>e.status===`streaming`||e.status===`running`),i=`__OPENCODE_LOADED_SKILL__`,a=N(()=>t.t(`ui.tool.loadedSkill`,{name:i}).split(i));return z(U,{get when(){return n()},get fallback(){return z(HG,{get text(){return t.t(`ui.tool.skill`)},get active(){return r()}})},children:e=>(()=>{var n=H1(),i=n.firstChild,o=i.nextSibling;return q(i,()=>a()[0].trim()),q(o,z(HG,{as:`span`,get text(){return e()},get active(){return r()}})),q(n,z(U,{get when(){return a()[1]?.trim()},children:e=>(()=>{var t=U1();return q(t,e),t})()}),null),j(()=>K(n,`aria-label`,t.t(`ui.tool.loadedSkill`,{name:e()}))),n})()})}}),st([`click`]);function u2(e){return z(p$,{get sessionID(){return e.sessionID},get message(){return e.message},get text(){return e.displayText??e.message.text},get comments(){return e.comments},get agent(){return e.historicalAgent},get model(){return e.historicalModel},get actions(){return e.actions}})}function d2(e){return z(Ke,{get children(){return[z(qe,{get when(){return W(()=>e.content.type===`text`)()?e.content:void 0},children:t=>z(g$,{get id(){return e.contentID},get text(){return t().text},get message(){return e.message},get showCopy(){return e.showAssistantCopyPartID===e.contentID},get turnDurationMs(){return e.turnDurationMs}})}),z(qe,{get when(){return W(()=>e.content.type===`reasoning`)()?e.content:void 0},children:t=>z(_$,{get id(){return e.contentID},get content(){return t()},streaming:!1,get defaultOpen(){return e.reasoningDefaultOpen},get open(){return e.toolOpen},get onOpenChange(){return e.onToolOpenChange},get onContentRendered(){return e.onContentRendered}})}),z(qe,{get when(){return W(()=>e.content.type===`tool`)()?e.content:void 0},children:t=>z(i2,{get id(){return e.contentID},get tool(){return t().name},get input(){return Nz(t())},get metadata(){return Pz(t())},get output(){return Fz(t())},get status(){return t().state.status},get error(){return Iz(t())},get defaultOpen(){return e.defaultOpen},get open(){return e.toolOpen},get onOpenChange(){return e.onToolOpenChange},deferContent:!0,virtualizeDiff:!1,get onContentRendered(){return e.onContentRendered}})})]}})}function f2(e){return z(J0,e)}function p2(e){return z(Y0,{get tools(){return e.tools},get fileOpen(){return e.fileOpen},get onFileOpenChange(){return e.onFileOpenChange},get onSizeChange(){return e.onSizeChange}})}var m2=G(`<strong class=font-[530]>`),h2=G(`<div class="flex w-full min-w-0 items-center gap-2"><div class=min-w-0>`);function g2(e){let t=N(()=>{let t=e.message.indexOf(`:`);return t===-1?{detail:e.message}:{title:e.message.slice(0,t+1),detail:e.message.slice(t+1)}});return[z(U,{get when(){return t().title},children:e=>(()=>{var t=m2();return q(t,e),t})()}),W(()=>t().detail)]}function _2(e){return z(LQ,{variant:`error`,class:`error-card`,"data-kind":`session-error-card`,get children(){var t=h2(),n=t.firstChild;return q(t,z(No,{name:`outline-hexagonal-warning`,class:`shrink-0 text-v2-state-fg-danger`}),n),q(n,z(g2,{get message(){return e.message}})),t}})}var v2=G(`<div data-slot=session-turn-retry-message class="cursor-help truncate">`),y2=G(`<div class="flex w-full items-start gap-2"><div class="min-w-0 flex-1">`),b2=G(`<div data-slot=session-turn-retry class="w-full min-w-0">`),x2=G(`<div data-slot=session-turn-retry-info>`);function S2(e){let t=Al(),n=N(()=>{if(e.status.type===`retry`)return e.status}),[r,i]=A(0);M(ae(n,e=>{if(!e)return;let t=()=>{let e=n()?.next;e&&i(Math.round((e-Date.now())/1e3))};t();let r=setInterval(t,1e3);F(()=>clearInterval(r))}));let a=N(()=>{let e=n();return e?e.message.includes(`exceeded your current quota`)&&e.message.includes(`gemini`)?t.t(`ui.sessionTurn.retry.geminiHot`):e.message.length>80?e.message.slice(0,80)+`…`:e.message:``}),o=N(()=>{let e=n();if(!e)return``;let i=Math.max(0,r()),a=i>0?t.t(`ui.sessionTurn.retry.inSeconds`,{seconds:i}):``,o=[t.t(`ui.sessionTurn.retry.retrying`),a].filter(Boolean).join(` `);return o?t.t(`ui.sessionTurn.retry.attemptRetrying`,{line:o,attempt:e.attempt}):t.t(`ui.sessionTurn.retry.attemptLabel`,{attempt:e.attempt})});return z(U,{get when(){return W(()=>!!n())()&&(e.show??!0)},get children(){var e=b2();return q(e,z(LQ,{variant:`error`,class:`error-card`,"data-kind":`session-retry-card`,get children(){var e=y2(),t=e.firstChild;return q(e,z(No,{name:`outline-hexagonal-warning`,class:`mt-0.5 shrink-0 text-v2-state-fg-danger`}),t),q(t,z(Sl,{appearance:`standard`,get value(){return n()?.message??``},placement:`top`,get children(){var e=v2();return q(e,z(g2,{get message(){return a()}})),e}}),null),q(t,z(U,{get when(){return o()},children:e=>(()=>{var t=x2();return q(t,z(HG,{get text(){return e()},active:!0})),t})()}),null),e}})),e}})}var C2=G(`<div><div data-component=session-turn class="min-w-0 w-full relative"style=height:auto>`),w2=G(`<div data-slot=session-turn-message-container><div data-slot=session-turn-compaction>`),T2=G(`<div data-slot=session-timeline-notice><div class="flex min-h-5 min-w-0 items-center gap-2 overflow-hidden"><bdi dir=auto class="shrink-0 text-[13px] font-[530] leading-text-compact tracking-[-0.04px] text-v2-text-text-faint">`),E2=G(`<div data-slot=session-timeline-notice><bdi dir=auto class=font-[530]>`),D2=G(`<span><bdi dir=auto>`),O2=G(`<bdi dir=auto class="min-w-0 truncate text-[13px] font-[440] leading-text-compact tracking-[-0.04px] text-v2-text-text-faint">`),k2=G(`<div data-slot=session-timeline-notice data-type=model-switched>`),A2=G(`<bdi data-slot=session-timeline-notice-label dir=auto class=font-[530]>`),j2=G(`<div data-slot=session-timeline-notice data-type=location-switched> <bdi data-slot=session-timeline-notice-value dir=ltr class="min-w-0 truncate font-[440]">`),M2=G(`<div data-slot=session-turn-message-container>`),N2=G(`<div data-timeline-row=TurnGap aria-hidden=true class=h-6>`),P2=G(`<div data-slot=session-turn-message-container><div data-slot=session-turn-message-content aria-live=off>`),F2=G(`<div data-slot=session-turn-message-container><div data-slot=session-turn-compaction><div class=py-2>`),I2=G(`<div data-slot=session-turn-message-container><div data-slot=session-turn-assistant-content>`),L2=G(`<div data-slot=session-turn-message-container><div data-slot=session-turn-thinking-row>`),R2=[];function z2(e){let t=Al(),n=aj(),r=e.disclosure.patchGroupKeys??new Map,i=new WeakMap,a=N(()=>{let t=new Map;return e.projection.rows().forEach(n=>{n._tag===`AssistantPart`&&n.group.type===`context`&&n.group.refs.forEach(n=>{let i=Jz.resolveContent(e.projection.messageByID().get(n.messageID),n.partID);if(i?.type!==`tool`||i.name!==`patch`||i.state.status===`error`)return;let a=`${n.messageID}:${n.partID}`,o=r.get(a);o&&!t.has(o)&&t.set(o,a)})}),t}),o=t=>e.status().type!==`idle`&&e.projection.activeMessageID()===t,s=t=>{let n=e.projection.messageByID().get(t);if(n?.type!==`user`)return null;let r=(e.projection.assistantMessagesByParent().get(t)??R2).reduce((e,t)=>t.time.completed===void 0?e:e===void 0?t.time.completed:Math.max(e,t.time.completed),void 0);if(!(r===void 0||r<n.time.created))return r-n.time.created},c=t=>o(t)?null:(e.projection.assistantMessagesByParent().get(t)??R2).toReversed().flatMap(e=>Jz.contentEntries(e).toReversed()).find(e=>e.content.type===`text`&&!!e.content.text.trim())?.id,l=()=>e.padding?.()??`px-4 md:px-5`,u=t=>{let n=new Map;return t.forEach(t=>{if(n.has(t.messageID))return;let r=new Map,i=e.projection.messageByID().get(t.messageID);i?.type===`assistant`&&Jz.contentEntries(i).forEach(e=>{r.has(e.id)||r.set(e.id,e.content)}),n.set(t.messageID,r)}),n},d=(t,n)=>{if(t().group.type===`context`){let s=N(()=>{let n=t().group;if(n.type!==`context`)return[];let r=u(n.refs),a=e.projection.assistantMessagesByParent().get(t().userMessageID)?.at(-1);return n.refs.flatMap(n=>{let s=r.get(n.messageID)?.get(n.partID);if(s?.type===`tool`)return i.set(s,`${n.messageID}:${n.partID}`),[s];if(s?.type===`reasoning`)return[{...s,id:n.partID,streaming:o(t().userMessageID)&&e.status().type===`busy`&&a?.id===n.messageID&&a.time.completed===void 0&&!a.error&&!a.retry&&a.content.at(-1)===s&&s.time?.completed===void 0}];let c=e.projection.messageByID().get(n.messageID);return n.messageID!==n.partID||!c?[]:c.type===`shell`?[{type:`shell`,id:n.partID,render:()=>z(g,{get messageID(){return n.messageID},grouped:!0})}]:c.type!==`assistant`&&c.type!==`user`?[{type:`notice`,id:n.partID,render:()=>z(h,{get messageID(){return n.messageID},grouped:!0})}]:[]})}),c=()=>`context:${t().group.key}`;return z(f2,{get parts(){return s()},patchGroupKey:e=>{let t=e.map(e=>i.get(e)),n=t.map(e=>r.get(e)).find(e=>e!==void 0&&t.includes(a().get(e)))??t[0];return t.forEach(e=>r.set(e,n)),n},get reasoningDefaultOpen(){return W(()=>!!e.timelineDetail)()?e.timelineDetail().thinking.details===`expanded`:e.reasoningMode()===`full`},reasoningOpen:t=>e.disclosure.value(t),onReasoningOpenChange:(t,n)=>e.disclosure.set(t,n),toolDefaultOpen:t=>e.timelineDetail?f(t):!1,toolOpen:n=>e.disclosure.value(`${t().group.key}:tool:${n}`),onToolOpenChange:(n,r)=>e.disclosure.set(`${t().group.key}:tool:${n}`,r),fileOpen:t=>e.disclosure.value(`patch:${t}`)??e.timelineDetail?.().edit.details===`expanded`,onFileOpenChange:(t,n)=>e.disclosure.set(`patch:${t}`,n),get open(){return e.disclosure.value(c())===!0},get busy(){return W(()=>!!o(t().userMessageID))()&&e.projection.lastAssistantGroupKey().get(t().userMessageID)===t().group.key},onOpenChange:t=>e.disclosure.set(c(),t),onSizeChange:n})}if(t().group.type===`file`){let r=N(()=>{let e=t().group;if(e.type!==`file`)return[];let n=u(e.refs);return e.refs.flatMap(e=>{let t=n.get(e.messageID)?.get(e.partID);return t?.type===`tool`?[t]:[]})}),i=N(()=>{let e=r()[0];if(!e||!(`metadata`in e.state))return;let t=e.state.metadata?.files;if(!Array.isArray(t))return;let n=t[0];return n&&typeof n==`object`&&`file`in n&&typeof n.file==`string`?n.file:void 0});return z(p2,{get tools(){return r()},fileOpen:n=>{let a=e.disclosure.value(`${t().group.key}:file:${n}`);return a===void 0?e.timelineDetail?e.timelineDetail().edit.details===`expanded`:r()[0]?.name!==`edit`||n!==i()?!1:e.disclosure.value(t().group.key)??e.editToolDefaultOpen():a},onFileOpenChange:(n,r)=>e.disclosure.set(`${t().group.key}:file:${n}`,r),onSizeChange:n})}let l=N(()=>{let e=t().group;return e.type===`part`?e.ref:void 0}),d=N(()=>{let t=l(),n=t?e.projection.messageByID().get(t.messageID):void 0;return n?.type===`assistant`?n:void 0}),p=N(()=>{let e=l();return e?Jz.resolveContent(d(),e.partID):void 0}),m=N(()=>{let e=p();return e?f(e):void 0}),_=()=>p()?.type===`reasoning`?l().partID:t().group.key;return z(U,{get when(){return d()},children:r=>z(U,{get when(){return p()},children:i=>z(d2,{get message(){return r()},get content(){return i()},get contentID(){return l().partID},get showAssistantCopyPartID(){return c(t().userMessageID)},get turnDurationMs(){return s(t().userMessageID)},get defaultOpen(){return m()},get toolOpen(){return e.disclosure.value(_())??m()},onToolOpenChange:t=>e.disclosure.set(_(),t),onContentRendered:n})})})};function f(t){if(e.timelineDetail){let n=Wz(t);if(n&&e.timelineDetail()[n].placement===`hidden`&&t.type===`tool`&&Lz(t))return!0;if(n===`shell`||n===`edit`||n===`thinking`)return e.timelineDetail()[n].details===`expanded`}return t.type===`reasoning`?e.reasoningMode()===`full`:Vz(t,e.shellToolDefaultOpen(),e.editToolDefaultOpen())}let p=e=>{if(e.type===`agent-switched`)return{label:t.t(`ui.sessionTimeline.notice.agentChanged`),data:e.previous?`${B2(e.previous)} → ${B2(e.agent)}`:B2(e.agent)};if(e.type===`model-switched`)return;if(e.type===`skill`)return{label:t.t(`ui.tool.skill`),data:e.name};if(e.type===`system`){if(e.description?.startsWith(`Instructions updated: `)){let n=e.description.slice(22).split(`,`).map(e=>e.trim()).filter(Boolean);return{label:t.t(`ui.sessionTimeline.notice.instructionsUpdated`),items:n}}return{label:e.description??e.text}}if(e.type!==`synthetic`)return;if(e.description===`Continuing after restart`)return{label:e.description};let n=typeof e.metadata?.source==`string`?e.metadata.source:void 0,r=typeof e.metadata?.state==`string`?e.metadata.state:void 0;if(n===`subagent`||n===`shell`){let i=typeof e.metadata?.agent==`string`?e.metadata.agent:void 0,a=n===`shell`?t.t(`ui.tool.shell`):i??t.t(`ui.tool.agent.default`);return{label:t.t(r===`error`?`ui.sessionTimeline.notice.failed`:r===`cancelled`?`ui.sessionTimeline.notice.cancelled`:`ui.sessionTimeline.notice.finished`,{actor:a}),data:e.description}}return{label:e.description??e.text}},m=t=>(()=>{var n=C2(),r=n.firstChild;return q(r,()=>t.children),j(r=>{var i=t.row._tag===`UserMessage`?e.anchor?.(t.row.userMessageID):void 0,a=t.row.userMessageID,o=t.row._tag,s=t.row._tag===`AssistantPart`?t.row.spacing:void 0,c={"min-w-0 w-full max-w-full":!0,"md:max-w-[1000px] md:mx-auto":e.centered?.(),"pt-2":t.row._tag===`AssistantPart`&&t.row.spacing===`tool`,"pt-4":t.row._tag===`AssistantPart`&&t.row.spacing===`content`};return i!==r.e&&K(n,`id`,r.e=i),a!==r.t&&K(n,`data-message-id`,r.t=a),o!==r.a&&K(n,`data-timeline-row`,r.a=o),s!==r.o&&K(n,`data-timeline-spacing`,r.o=s),r.i=ft(n,c,r.i),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),n})();function h(r){let i=()=>r.grouped?``:l(),a=N(()=>e.projection.messageByID().get(r.messageID)),o=N(()=>{let e=a();return e?.type===`compaction`?e:void 0}),s=N(()=>{let e=o();return e?.status===`failed`?cB(e.error.message):``}),c=N(()=>{let e=a();return e?.type===`location-switched`?e:void 0}),u=N(()=>{let e=a();if(e?.type!==`model-switched`)return;let r=n.store.provider?.all?.get(e.model.providerID);return{providerID:e.model.providerID,variant:e.model.variant,label:t.t(`ui.sessionTimeline.notice.modelSwitched`,{model:r?.models?.[e.model.id]?.name??e.model.id})}}),d=N(()=>{let e=a();return e?p(e):void 0});return[z(U,{get when(){return o()},children:e=>(()=>{var t=w2(),n=t.firstChild;return q(n,z(h$,{get message(){return e()},get error(){return s()}})),j(()=>ut(t,`w-full ${i()}`)),t})()}),z(U,{get when(){return c()},get fallback(){return z(U,{get when(){return u()},get fallback(){return z(U,{get when(){return d()},children:e=>z(U,{get when(){return e().items?.length},get fallback(){return(()=>{var t=E2(),n=t.firstChild;return q(n,()=>e().label),q(t,z(U,{get when(){return e().data},children:e=>(()=>{var t=D2(),n=t.firstChild;return q(t,z(U,{get when(){return a()?.type!==`agent-switched`},children:` · `}),n),q(n,e),j(()=>t.classList.toggle(`ms-2`,a()?.type===`agent-switched`)),t})()}),null),j(e=>{var o=`w-full truncate ${r.grouped?`py-1`:`pt-3 pb-1`} text-13-regular leading-text-compact text-text-weak ${i()}`,s=a()?.type===`agent-switched`;return o!==e.e&&ut(t,e.e=o),s!==e.t&&n.classList.toggle(`text-v2-text-text-faint`,e.t=s),e},{e:void 0,t:void 0}),t})()},get children(){var t=T2(),n=t.firstChild,r=n.firstChild;return q(r,()=>e().label),q(n,z(H,{get each(){return e().items},children:e=>(()=>{var t=O2();return q(t,e),t})()}),null),j(()=>ut(t,`w-full py-1 ${i()}`)),t}})})},children:e=>(()=>{var t=k2();return q(t,z(mB,{get label(){return e().label},get providerID(){return e().providerID},get variant(){return e().variant}})),j(()=>ut(t,`w-full py-2 ${i()}`)),t})()})},children:e=>(()=>{var n=j2(),r=n.firstChild,a=r.nextSibling;return q(n,z(Sl,{appearance:`compact`,placement:`top`,get value(){return t.t(`ui.sessionTimeline.notice.movedTooltip`)},class:`shrink-0`,triggerTabIndex:0,get children(){var e=A2();return q(e,()=>t.t(`ui.sessionTimeline.notice.movedTo`)),e}}),r),q(a,()=>e().location.directory),j(()=>ut(n,`flex h-7 w-full min-w-0 items-center gap-2 py-1 text-[13px] leading-text-compact tracking-[-0.04px] text-v2-text-text-faint ${i()}`)),n})()})]}function g(t){let n=N(()=>{let n=e.projection.messageByID().get(t.messageID);return n?.type===`shell`?n:void 0}),r=N(()=>{if(!e.timelineDetail)return e.shellToolDefaultOpen();let t=n();return e.timelineDetail().shell.details===`expanded`||e.timelineDetail().shell.placement===`hidden`&&(t?.status===`timeout`||t?.status===`exited`&&t.exit!==void 0&&t.exit!==0)});return z(U,{get when(){return n()},children:n=>(()=>{var i=M2();return q(i,z(l2,{get message(){return n()},get defaultOpen(){return r()},get open(){return e.disclosure.value(n().id)??(e.timelineDetail?r():void 0)},onOpenChange:t=>e.disclosure.set(n().id,t)})),j(()=>ut(i,`w-full ${t.grouped?``:l()}`)),i})()})}let _=(n,r)=>{if(n()._tag===`TurnGap`)return N2();if(n()._tag===`UserMessage`){let t=()=>{let e=n();if(e._tag!==`UserMessage`)throw Error(`Expected a user-message timeline row`);return e},r=N(()=>{let n=e.projection.messageByID().get(t().userMessageID);return n?.type===`user`?n:void 0}),i=N(()=>e.projection.userContextByID().get(t().userMessageID));return z(m,{get row(){return t()},get children(){return z(U,{get when(){return r()},children:t=>{let n=()=>e.presentation(t());return(()=>{var r=P2(),a=r.firstChild;return q(a,z(u2,{get sessionID(){return e.sessionID()},get message(){return t()},get displayText(){return n()?.displayText},get comments(){return n()?.comments},get historicalAgent(){return i()?.agent??``},get historicalModel(){return i()?.model??{id:``,providerID:``}},get actions(){return e.actions}})),j(()=>ut(r,`w-full ${l()}`)),r})()}})}})}if(n()._tag===`Shell`){let e=()=>{let e=n();if(e._tag!==`Shell`)throw Error(`Expected a shell timeline row`);return e};return z(m,{get row(){return e()},get children(){return z(g,{get messageID(){return e().messageID}})}})}if(n()._tag===`Notice`){let e=()=>{let e=n();if(e._tag!==`Notice`)throw Error(`Expected a notice timeline row`);return e};return z(m,{get row(){return e()},get children(){return z(h,{get messageID(){return e().messageID}})}})}if(n()._tag===`TurnDivider`){let e=()=>{let e=n();if(e._tag!==`TurnDivider`)throw Error(`Expected a turn-divider timeline row`);return e};return z(m,{get row(){return e()},get children(){var e=F2(),n=e.firstChild.firstChild;return q(n,z(mB,{get label(){return t.t(`ui.message.interrupted`)}})),j(()=>ut(e,`w-full ${l()}`)),e}})}if(n()._tag===`AssistantPart`){let e=()=>{let e=n();if(e._tag!==`AssistantPart`)throw Error(`Expected an assistant-part timeline row`);return e},t=d(e,r);return z(m,{get row(){return e()},get children(){var n=I2(),r=n.firstChild;return q(r,t),j(t=>{var i=`w-full ${l()}`,a=o(e().userMessageID);return i!==t.e&&ut(n,t.e=i),a!==t.t&&K(r,`aria-hidden`,t.t=a),t},{e:void 0,t:void 0}),n}})}if(n()._tag===`Thinking`){let t=()=>{let e=n();if(e._tag!==`Thinking`)throw Error(`Expected a thinking timeline row`);return e},i=N(()=>{let n=t().ref,r=Jz.resolveContent(e.projection.messageByID().get(n.messageID),n.partID);return r?.type===`reasoning`?r:void 0});return z(m,{get row(){return t()},get children(){var n=L2(),a=n.firstChild;return q(a,z(U,{get when(){return i()},children:n=>z(_$,{get id(){return t().ref.partID},get content(){return n()},streaming:!0,get defaultOpen(){return W(()=>!!e.timelineDetail)()?e.timelineDetail().thinking.details===`expanded`:e.reasoningMode()===`full`},get open(){return e.disclosure.value(t().ref.partID)??(e.timelineDetail?e.timelineDetail().thinking.details===`expanded`:void 0)},onOpenChange:n=>e.disclosure.set(t().ref.partID,n),onContentRendered:r})})),j(()=>ut(n,`w-full ${l()}`)),n}})}if(n()._tag===`Retry`){let t=()=>{let e=n();if(e._tag!==`Retry`)throw Error(`Expected a retry timeline row`);return e},r=N(()=>{let n=(e.projection.assistantMessagesByParent().get(t().userMessageID)??R2).at(-1)?.retry;return n?{type:`retry`,attempt:n.attempt,message:n.error.message,next:n.at}:e.status()});return z(m,{get row(){return t()},get children(){var n=M2();return q(n,z(S2,{get status(){return r()},get show(){return e.projection.activeMessageID()===t().userMessageID}})),j(()=>ut(n,`w-full ${l()}`)),n}})}let i=()=>{let e=n();if(e._tag!==`Error`)throw Error(`Expected an error timeline row`);return e};return z(m,{get row(){return i()},get children(){var e=M2();return q(e,z(_2,{get message(){return i().text}})),j(()=>ut(e,`w-full ${l()}`)),e}})};function v(e){return z(U,{get when(){return Hz.key(e.row())},keyed:!0,children:t=>_(e.row,e.onSizeChange)})}return{Row:v}}function B2(e){return e.slice(0,1).toUpperCase()+e.slice(1)}var V2=G(`<div data-component=session-timeline>`),H2=G(`<div class=native-transcript data-workspace-session>`),U2=G(`<p class=empty-inline>`),W2=Uz.find(e=>e.id===`compact`).value;function G2(e){let t=qz({sessionMessages:()=>e.session.messages,status:()=>e.status,reasoningMode:()=>`compact`,timelineDetail:()=>W2,shellToolDefaultOpen:()=>!1,editToolDefaultOpen:()=>!1}),[n,r]=Qt({}),i=z2({sessionID:()=>e.session.sessionID,status:()=>e.status,projection:t,presentation:()=>void 0,reasoningMode:()=>`compact`,timelineDetail:()=>W2,shellToolDefaultOpen:()=>!1,editToolDefaultOpen:()=>!1,padding:()=>``,disclosure:{value:e=>n[e],set:(e,t)=>r(e,t)}}),a=N(()=>t.rows().map(Hz.key));function o(e){let n=t.rowByKey().get(e.rowKey),r=N(()=>t.rowByKey().get(e.rowKey)??n);return z(i.Row,{row:r})}return(()=>{var e=V2();return q(e,z(H,{get each(){return a()},children:e=>z(o,{rowKey:e})})),e})()}function K2(e){let[t,n]=A(``),r=()=>e.stage.sessions.find(e=>!e.parentID)??e.stage.sessions[0],i=()=>e.stage.sessions.find(e=>e.sessionID===t())??r(),a=t=>e.running?t.status:{type:`idle`},o=N(()=>{let t=new Map;for(let n of e.stage.sessions){let e=[n.model,...n.messages.flatMap(e=>e.type===`assistant`?[e.model]:[])];for(let n of e)t.has(n.providerID)||t.set(n.providerID,{models:{}}),t.get(n.providerID).models[n.id]={name:Qd(`${n.providerID}/${n.id}`)}}return{all:t,connected:[...t.keys()],default:{}}});return(()=>{var t=H2();return q(t,z(U,{get when(){return W(()=>!!i())()&&i()!==r()},get children(){return z(Po,{size:`small`,variant:`ghost-muted`,icon:`arrow-left`,onClick:()=>n(``),children:`Parent session`})}}),null),q(t,z(U,{get when(){return i()?.sessionID},keyed:!0,get fallback(){return(()=>{var t=U2();return q(t,()=>e.pending?`Waiting for session activity…`:`No session was recorded.`),t})()},children:t=>z(oj,{directory:`/workspace`,sessionID:t,get data(){return{agent:[...new Set(e.stage.sessions.map(e=>e.agent))].map(e=>({name:e})),provider:o(),session:e.stage.sessions.map(e=>({id:e.sessionID,parentID:e.parentID,title:e.title,time:{created:e.created,updated:e.created}})),session_status:Object.fromEntries(e.stage.sessions.map(e=>[e.sessionID,a(e)])),session_diff:{}}},onNavigateToSession:t=>{e.stage.sessions.some(e=>e.sessionID===t)&&n(t)},get children(){return z(Cf,{component:ij,get children(){return z(G2,{get session(){return i()},get status(){return a(i())}})}})}})}),null),t})()}var q2=()=>({prompt:``,model:``,sessions:[]}),J2=e=>{let[t,n]=e.split(`#`),r=t.indexOf(`/`);return{providerID:r<0?`recorded`:t.slice(0,r),id:r<0?t:t.slice(r+1),variant:n}},Y2=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},X2=e=>{let t=(Array.isArray(e)?e:[]).filter(e=>!!e&&typeof e==`object`&&(e.type===`text`&&typeof e.text==`string`||e.type===`file`&&typeof e.uri==`string`&&typeof e.mime==`string`));return t.length?t:[{type:`text`,text:typeof e==`string`?e:JSON.stringify(e??``)}]},Z2=e=>{let t=Y2(e);return{type:typeof t.type==`string`?t.type:`RecordedError`,message:typeof t.message==`string`?t.message:String(e??`Unknown error`)}};function Q2(e,t){if(!(`data`in t.event))return;let n=t.event,r=n.data,i=Date.parse(t.time);if(typeof r.sessionID!=`string`)return;let a=e.sessions.find(e=>e.sessionID===r.sessionID);if(a||(a={sessionID:r.sessionID,title:``,created:i,model:J2(e.model),agent:`build`,messages:[],diffs:[],status:{type:`idle`},parts:{}},e.sessions.push(a)),n.type===`session.created`&&(typeof r.parentID==`string`&&(a.parentID=r.parentID),typeof r.agent==`string`&&(a.agent=r.agent),typeof r.title==`string`&&(a.title=r.title),r.model&&typeof r.model==`object`&&(a.model=r.model)),n.type===`session.renamed`&&typeof r.title==`string`&&(a.title=r.title),n.type===`session.execution.started`&&(a.status={type:`busy`}),[`session.execution.succeeded`,`session.execution.failed`,`session.execution.interrupted`].includes(n.type)&&(a.status={type:`idle`}),n.type===`session.inbox.enqueued`){let e=r.item;e?.type===`user`&&typeof e.payload?.text==`string`&&!a.messages.some(e=>e.id===r.inboxID)&&a.messages.push({type:`user`,id:String(r.inboxID),text:e.payload.text,time:{created:i}})}if(typeof r.assistantMessageID!=`string`)return;let o=a.messages.find(e=>e.type===`assistant`&&e.id===r.assistantMessageID);o||(o={type:`assistant`,id:r.assistantMessageID,time:{created:i},agent:a.agent,model:a.model,content:[]},a.messages.push(o)),n.type===`session.step.started`&&(o.agent=typeof r.agent==`string`?r.agent:a.agent,o.model=r.model&&typeof r.model==`object`?r.model:a.model),n.type===`session.step.streamed`&&(o.time.streamed=i),n.type===`session.step.ended`&&(o.time.completed=i,o.finish=r.finish);let s=/^session\.(text|reasoning)\.(started|delta|ended)$/.exec(n.type);if(s){let e=s[1],t=`${o.id}:${e}:${r.ordinal}`,n=a.parts[t];n||(n={messageID:o.id,index:o.content.length,complete:!1},a.parts[t]=n,o.content.push(e===`reasoning`?{type:e,text:``,time:{created:i}}:{type:e,text:``}));let c=o.content[n.index];if(c.type===`tool`)return;s[2]===`delta`&&!n.complete&&(c.text+=String(r.delta??``)),s[2]===`ended`&&(c.text=String(r.text??c.text),n.complete=!0,c.type===`reasoning`&&(c.time={created:c.time?.created??i,completed:i}))}if(!n.type.startsWith(`session.tool.`)||typeof r.id!=`string`)return;let c=o.content.find(e=>e.type===`tool`&&e.id===r.id);if(c||(c={type:`tool`,id:r.id,name:String(r.name??`tool`),time:{created:i},state:{status:`streaming`,input:``}},o.content.push(c)),typeof r.name==`string`&&(c.name=r.name),n.type===`session.tool.input.delta`&&c.state.status===`streaming`&&(c.state.input+=String(r.delta??``)),n.type===`session.tool.input.ended`&&c.state.status===`streaming`&&(c.state.input=String(r.text??``)),n.type===`session.tool.called`&&(c.state={status:`running`,input:Y2(r.input),metadata:{}},c.time.ran=i),n.type===`session.tool.progress`&&c.state.status!==`streaming`&&(c.state.metadata=Y2(r.metadata)),n.type===`session.tool.success`||n.type===`session.tool.failed`){let e=c.state.status===`streaming`?{}:c.state.input,t=r.metadata?Y2(r.metadata):c.state.status===`streaming`?{}:c.state.metadata;c.state=n.type===`session.tool.success`?{status:`completed`,input:e,metadata:t,content:X2(r.content)}:{status:`error`,input:e,metadata:t,error:Z2(r.error),...r.content?{content:X2(r.content)}:{}},c.time.completed=i}typeof r.executed==`boolean`&&(c.executed=r.executed)}var $2=new Map;function e4(e){let[t,n]=Qt(q2()),[r,i]=A(),[a,o]=A(`Connecting…`),[s,c]=A(0);M(ae(N(()=>`${e.benchmark()}:${e.execution()}`),t=>{let r=q2(),a=$2.get(t);if(ie(()=>{n(nn(structuredClone(a?.document??r))),i(void 0),o(a?`Session saved`:`Connecting…`),c(e=>e+1)}),a)return;if(!e.execution()){o(`Waiting for session`);return}let s=new EventSource(`/api/session?benchmark=${encodeURIComponent(e.benchmark())}&execution=${encodeURIComponent(e.execution())}`);s.onopen=()=>o(`Streaming`),s.onerror=()=>o(`Reconnecting…`),s.addEventListener(`snapshot`,e=>{r=JSON.parse(e.data).document,ie(()=>{n(nn(structuredClone(r))),c(e=>e+1)})}),s.addEventListener(`records`,e=>{let t=JSON.parse(e.data);for(let e of t)Q2(r,e);ie(()=>{n(nn(structuredClone(r))),c(e=>e+1)})}),s.addEventListener(`state`,e=>i(JSON.parse(e.data))),s.addEventListener(`done`,()=>{$2.delete(t),$2.set(t,{document:structuredClone(r)}),$2.size>8&&$2.delete($2.keys().next().value),o(`Session saved`),s.close()}),s.addEventListener(`session-error`,()=>{o(`Session unavailable`),s.close()}),F(()=>s.close())}));let l=q2();return{state:r,connection:a,revision:s,stage:n=>n===e.stage()?t:l}}var t4=G(`<span class=eval-name>`),n4=`openeval.top-secret`,[r4,i4]=A((()=>{try{return localStorage.getItem(n4)===`true`}catch{return!1}})());function a4(){return z(Sl,{get value(){return r4()?`Click to show eval names and enable traces`:`Click to blur eval names and disable traces`},get children(){return z(Lo,{size:`small`,variant:`ghost`,get icon(){return z(No,{name:`glasses`})},class:`secret-toggle`,"aria-label":`Top secret`,get"aria-pressed"(){return r4()},onClick:()=>i4(!r4())})}})}function o4(e){return(()=>{var t=t4();return q(t,()=>e.children),j(n=>{var r=!!(r4()&&e.sensitive!==!1),i=r4()&&e.sensitive!==!1?!0:void 0;return r!==n.e&&t.classList.toggle(`is-secret`,n.e=r),i!==n.t&&K(t,`aria-hidden`,n.t=i),n},{e:void 0,t:void 0}),t})()}var s4=G(`<p class=error-banner>Could not load judging checkpoints.`),c4=G(`<p class=error-banner>`),l4=G(`<details class=recorded-metrics><summary>Recorded metrics · candidate only</summary><pre class=checkpoint-content>`),u4=G(`<button>Next page`),d4=G(`<div class=judge-check-detail><pre class=checkpoint-content>`),f4=G(`<div class=judge-history>`),p4=G(`<p class=judge-audit-warning>Monitoring ended <!>: <!>. Final grading uses the saved work.`),m4=G(`<p class=judge-audit-warning>. The candidate continues normally; final grading uses its completed evidence.`),h4=G(`<details class=judge-audit open><summary><strong>Judgment and evidence</strong><span></span></summary><div class=judgment-criteria></div><ol class=judge-checks>`),g4=G(`<dl class=verification-measurements>`),_4=G(`<article><header><strong></strong><span></span></header><p></p><div class=checkpoint-actions>`),v4=G(`<dt>`),y4=G(`<dd>`),b4=G(`<button>Read `),x4=G(`<a class=judgment-source target=_blank rel=noreferrer>`),S4=G(`<details><summary>Returned JSON</summary><pre class=checkpoint-content>`),C4=G(`<details><summary>Standard output</summary><pre class=checkpoint-content>`),w4=G(`<details><summary>Standard error</summary><pre class=checkpoint-content>`),T4=G(`<section class=code-judgment aria-label="Code judgment"><header><strong>judge.ts</strong><span> · </span></header><details><summary>Frozen source · </summary><pre class=checkpoint-content>`),E4=G(`<p>Logs reached the retention limit.`),D4=G(`<p>Not produced: `),O4=G(`<details class=verification-receipt open><summary>Artifact verification · <!> · </summary><p> workspace · <!> · <!> CPUs · <!> MiB · no network</p><div class=checkpoint-actions><button>Read receipt</button><button>Standard output</button><button>Standard error`),k4=G(`<div class=verification-command><code></code><span>exit <!> · `),A4=G(`<a target=_blank rel=noreferrer>Open `),j4=G(`<p class=judge-check-stop>Stop requested `),M4=G(`<dt>Evidence cutoff`),N4=G(`<dt>Boundary event`),P4=G(`<dt>Native cursors`),F4=G(`<p class=checkpoint-status>Loading evidence…`),I4=G(`<div class=checkpoint-items>`),L4=G(`<button>Back`),R4=G(`<div class=checkpoint-actions>`),z4=G(`<div class=judge-check-detail><details class=checkpoint-identity><summary>Evidence identity <code></code></summary><dl><dt>Check</dt><dd></dd><dt>Evidence SHA-256</dt><dd></dd><dt>Judge events</dt><dd>–</dd><dt>Duration</dt><dd></dd></dl></details><nav aria-label="Checkpoint evidence"class=checkpoint-actions>`),B4=G(`<li><button class=judge-check-heading><span class=judge-check-number></span><strong></strong><span></span><time></time></button><p class=judge-check-reason>`),V4=G(`<button>`),H4=G(`<pre class=checkpoint-content>`),U4=G(`<p>`),W4=G(`<button><strong></strong><span>`);async function G4(e){let t=await fetch(e);if(!t.ok)throw Error(await t.text());return t.json()}function K4(e){let[t,n]=re(()=>!r4()&&`${e.benchmarkId}:${e.judgeId}`,()=>G4(`/api/judge-checks?${new URLSearchParams({benchmark:e.benchmarkId,judge:e.judgeId})}`)),[r,i]=A(``),[a,o]=A({action:`summary`}),[s,c]=A([]),[l]=re(()=>!r4()&&r()?{check:r(),...a()}:!1,n=>{let r=new URLSearchParams({benchmark:e.benchmarkId,judge:e.judgeId,check:n.check===`judgment`?t()?.judge.decisionCheckId??``:n.check,action:n.action});return n.id!==void 0&&r.set(`id`,n.id),n.offset!==void 0&&r.set(`offset`,String(n.offset)),n.path&&r.set(`path`,n.path),n.revision&&r.set(`revision`,n.revision),n.metric&&r.set(`metric`,n.metric),n.action===`verification`?(r.delete(`check`),r.delete(`action`),fetch(`/api/verification?${r}`).then(async e=>{if(!e.ok)throw Error(await e.text());return n.path?{text:await e.text()}:e.json()})):G4(`/api/check-evidence?${r}`)});M(()=>{e.judgeId,i(``),o({action:`summary`}),c([])});let u=setInterval(()=>{!r4()&&t()?.judge.state===`running`&&!t.loading&&n.refetch()},2e3);F(()=>clearInterval(u));let d=e=>{i(r()===e?``:e),o({action:`summary`}),c([])},f=e=>{c([...s(),a()]),o(e)},p=()=>Array.isArray(l()?.items)?l().items:void 0,m=e=>e.state===`completed`?e.decision?.kind===`continue`?`Continue`:e.decision?.judgment.value===1?`Pass`:e.decision?.judgment.value===0?`Fail`:typeof e.decision?.judgment.value==`number`?`${Math.round(e.decision.judgment.value*100)}%`:`Unknown`:lf(e.state);return z(U,{get when(){return W(()=>!r4())()&&(t()?.checks.length||Object.keys(t()?.judge.judgment?.scores??{}).length||t()?.judge.code||t()?.judge.error||t()?.metrics||t()?.judge.monitorError||t()?.judge.monitorLimit||(t()?.history.length??0)>1||t.error)},get children(){var n=h4(),u=n.firstChild,h=u.firstChild,g=h.nextSibling,_=u.nextSibling,v=_.nextSibling;return q(u,z(No,{name:`shield`}),h),q(g,(()=>{var e=W(()=>!!t()?.checks.length);return()=>e()?`${t().checks.length} checkpoint checks`:`Final judgment`})()),q(n,z(U,{get when(){return t.error},get children(){return s4()}}),_),q(n,z(U,{get when(){return t()?.judge.error},get children(){var e=c4();return q(e,()=>t().judge.error),e}}),_),q(_,z(H,{get each(){return Object.entries(t()?.judge.judgment?.scores??{})},children:([e,n])=>(()=>{var r=_4(),a=r.firstChild,s=a.firstChild,l=s.nextSibling,u=a.nextSibling,d=u.nextSibling;return q(s,()=>t()?.criteria.find(t=>t.id===e)?.name??e),q(l,(()=>{var e=W(()=>n.value===null);return()=>e()?`Unknown`:W(()=>n.value===1)()?`Pass`:W(()=>n.value===0)()?`Fail`:af(n.value*100)})()),q(u,()=>n.reason),q(r,z(U,{get when(){return n.measurements},get children(){var e=g4();return q(e,z(H,{get each(){return Object.entries(n.measurements??{})},children:([e,t])=>[(()=>{var t=v4();return q(t,e),t})(),(()=>{var e=y4();return q(e,()=>typeof t==`object`?JSON.stringify(t):String(t)),e})()]})),e}}),d),q(d,z(H,{get each(){return n.evidence},children:e=>(()=>{var t=b4();return t.firstChild,t.$$click=()=>{i(`judgment`),c([]),o({action:e.kind===`recording`?`summary`:e.kind===`metric`?`metrics`:e.kind,...e.kind===`metric`?{metric:e.id}:{},...`id`in e?{id:e.id}:{},...`path`in e?{path:e.path,...`revision`in e?{revision:e.revision}:{}}:{},offset:e.offset})},q(t,()=>e.kind,null),q(t,(()=>{var t=W(()=>`path`in e);return()=>t()?`: ${e.path}`:``})(),null),t})()})),q(r,z(H,{get each(){return n.sources},children:e=>(()=>{var t=x4();return K(t,`href`,e),q(t,e),t})()}),null),r})()})),q(n,z(U,{get when(){return t()?.judge.code},children:n=>(()=>{var r=T4(),a=r.firstChild,s=a.firstChild.nextSibling,l=s.firstChild,u=a.nextSibling,d=u.firstChild;d.firstChild;var f=d.nextSibling;return q(s,()=>lf(n().state),l),q(s,()=>cf(n().elapsedMs),null),q(r,z(U,{get when(){return n().output!==void 0},get children(){var e=S4(),t=e.firstChild.nextSibling;return q(t,()=>JSON.stringify(n().output,null,2)),e}}),u),q(r,z(H,{get each(){return n().verifications},children:t=>{let n=n=>`/api/verification?${new URLSearchParams({benchmark:e.benchmarkId,judge:e.judgeId,id:t.id,...n?{path:n}:{}})}`,r=e=>{i(`judgment`),c([]),o({action:`verification`,id:t.id,...e?{path:e}:{}})};return(()=>{var e=O4(),i=e.firstChild,a=i.firstChild.nextSibling;a.nextSibling;var o=i.nextSibling,s=o.firstChild,c=s.nextSibling,l=c.nextSibling.nextSibling,u=l.nextSibling.nextSibling;u.nextSibling;var d=o.nextSibling,f=d.firstChild,p=f.nextSibling,m=p.nextSibling;return q(i,(()=>{var e=W(()=>t.state===`timed_out`);return()=>e()?`Timed out`:`exit ${t.exitCode}`})(),a),q(i,()=>cf(t.elapsedMs),null),q(o,()=>t.revision,s),q(o,()=>t.environment.image,c),q(o,()=>t.environment.cpus,l),q(o,()=>t.environment.memoryMiB,u),q(e,z(H,{get each(){return t.commands},children:e=>(()=>{var t=k4(),n=t.firstChild,r=n.nextSibling,i=r.firstChild.nextSibling;return i.nextSibling,q(n,()=>e.argv.join(` `)),q(r,()=>e.exitCode??`unknown`,i),q(r,()=>cf(e.elapsedMs),null),t})()}),d),f.$$click=()=>r(),p.$$click=()=>r(`stdout`),m.$$click=()=>r(`stderr`),q(d,z(H,{get each(){return t.artifacts},children:e=>(()=>{var t=A4();return t.firstChild,q(t,()=>e.path,null),j(()=>K(t,`href`,n(e.path))),t})()}),null),q(e,z(U,{get when(){return t.logsTruncated},get children(){return E4()}}),null),q(e,z(U,{get when(){return t.missingArtifacts.length},get children(){var e=D4();return e.firstChild,q(e,()=>t.missingArtifacts.join(`, `),null),e}}),null),e})()}}),u),q(d,()=>n().sourceHash.slice(0,12),null),q(f,()=>t()?.codeSource),q(r,z(U,{get when(){return t()?.codeStdout},get children(){var e=C4(),n=e.firstChild.nextSibling;return q(n,()=>t()?.codeStdout),e}}),null),q(r,z(U,{get when(){return t()?.codeStderr},get children(){var e=w4(),n=e.firstChild.nextSibling;return q(n,()=>t()?.codeStderr),e}}),null),r})()}),v),q(n,z(U,{get when(){return t()?.metrics},get children(){var e=l4(),n=e.firstChild.nextSibling;return q(n,()=>JSON.stringify(t()?.metrics,null,2)),e}}),v),q(n,z(U,{get when(){return r()===`judgment`},get children(){var e=d4(),t=e.firstChild;return q(e,z(U,{get when(){return l.error},get children(){var e=c4();return q(e,()=>String(l.error)),e}}),t),q(t,(()=>{var e=W(()=>!!l.loading);return()=>e()?`Loading evidence…`:W(()=>typeof l()?.text==`string`)()?l().text:JSON.stringify(l(),null,2)})()),q(e,z(U,{get when(){return typeof l()?.next==`number`},get children(){var e=u4();return e.$$click=()=>o({...a(),offset:l().next}),e}}),null),e}}),v),q(n,z(U,{get when(){return(t()?.history.length??0)>1},get children(){var n=f4();return q(n,z(jd,{"aria-label":`Judging history`,get options(){return t().history.map(e=>e.id)},get current(){return e.judgeId},label:e=>{let n=t().history.find(t=>t.id===e);return`${n.mode===`monitor`?`Monitoring`:`Final judge`} · ${new Date(n.startedAt).toLocaleTimeString()} · ${lf(n.state)}`},onSelect:t=>{t&&e.onSelectJudge(t)}})),n}}),v),q(n,z(U,{get when(){return t()?.judge.monitorError},get children(){var e=p4(),n=e.firstChild.nextSibling,r=n.nextSibling.nextSibling;return r.nextSibling,q(e,(()=>{var e=W(()=>!!t().judge.monitorErrorAt);return()=>e()?`at ${new Date(t().judge.monitorErrorAt).toLocaleTimeString()}`:``})(),n),q(e,()=>t().judge.monitorError,r),e}}),v),q(n,z(U,{get when(){return t()?.judge.monitorLimit},get children(){var e=m4(),n=e.firstChild;return q(e,()=>t().judge.monitorLimit,n),e}}),v),q(v,z(H,{get each(){return t()?.checks},children:(e,n)=>(()=>{var i=B4(),u=i.firstChild,h=u.firstChild,g=h.nextSibling,_=g.nextSibling,v=_.nextSibling,y=u.nextSibling;return u.$$click=()=>d(e.id),q(h,()=>String(n()+1).padStart(2,`0`)),q(g,()=>m(e)),q(_,(()=>{var t=W(()=>e.purpose===`final`);return()=>t()?`Final archive`:`Through event #${e.checkpoint.through}`})()),q(v,()=>new Date(e.startedAt).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})),q(u,z(No,{get name(){return r()===e.id?`chevron-down`:`chevron-right`}}),null),q(y,(()=>{var t=W(()=>e.decision?.kind===`continue`);return()=>t()?e.decision.reason:e.decision?.judgment.reason??e.error??`Waiting for the judge`})()),q(i,z(U,{get when(){return t()?.stop?.checkId===e.id},get children(){var e=j4();return e.firstChild,q(e,()=>new Date(t().stop.requestedAt).toLocaleTimeString(),null),q(e,(()=>{var e=W(()=>t().stop.applied===void 0);return()=>e()?` · Awaiting interruption`:t().stop.applied?` · Session stopped early`:` · Session had already ended`})(),null),e}}),null),q(i,z(U,{get when(){return r()===e.id},get children(){var t=z4(),n=t.firstChild,r=n.firstChild,i=r.firstChild.nextSibling,u=r.nextSibling,d=u.firstChild.nextSibling,m=d.nextSibling.nextSibling,h=m.nextSibling.nextSibling,g=h.firstChild,_=h.nextSibling,v=_.nextSibling,y=n.nextSibling;return q(i,()=>e.checkpoint.hash.slice(0,12)),q(d,()=>e.id),q(m,()=>e.checkpoint.hash),q(h,()=>e.events.after+1,g),q(h,()=>e.events.through??`live`,null),q(u,z(U,{get when(){return e.checkpoint.cutoffAt!==void 0},get children(){return[M4(),(()=>{var t=y4();return q(t,()=>new Date(e.checkpoint.cutoffAt).toISOString()),t})(),N4(),(()=>{var t=y4();return q(t,()=>e.checkpoint.boundaryEventId),t})(),P4(),(()=>{var t=y4();return q(t,()=>JSON.stringify(e.checkpoint.cursors)),t})()]}}),_),q(v,(()=>{var t=W(()=>e.runtimeMs!==void 0);return()=>t()?cf(e.runtimeMs):`—`})()),q(y,z(H,{each:[`summary`,`messages`,`tools`,`events`,`response`],children:e=>(()=>{var t=V4();return t.$$click=()=>{o({action:e}),c([])},q(t,e),j(()=>t.classList.toggle(`selected`,a().action===e)),t})()})),q(t,z(U,{get when(){return l.loading},get children(){return F4()}}),null),q(t,z(U,{get when(){return l.error},get children(){var e=c4();return q(e,()=>String(l.error)),e}}),null),q(t,z(U,{get when(){return W(()=>!l.loading)()&&l()},get children(){return[z(U,{get when(){return p()},get fallback(){return(()=>{var e=H4();return q(e,(()=>{var e=W(()=>typeof l().text==`string`);return()=>e()?l().text:JSON.stringify(l(),null,2)})()),e})()},get children(){var e=I4();return q(e,z(H,{get each(){return p()},children:e=>(()=>{var t=W4(),n=t.firstChild,r=n.nextSibling;return t.$$click=()=>f({action:a().action===`events`?`event`:a().action===`tools`?`tool`:`message`,id:String(e.id??e.sequence)}),q(n,()=>String(e.name??e.type??e.role??`Item`)),q(r,()=>String(e.id??`#${e.sequence}`)),q(t,z(U,{get when(){return e.preview},get children(){var t=U4();return q(t,()=>String(e.preview)),t}}),null),t})()})),e}}),(()=>{var e=R4();return q(e,z(U,{get when(){return s().length},get children(){var e=L4();return e.$$click=()=>{let e=s();o(e[e.length-1]),c(e.slice(0,-1))},e}}),null),q(e,z(U,{get when(){return typeof l()?.next==`number`},get children(){var e=u4();return e.$$click=()=>f({...a(),offset:l().next}),e}}),null),e})()]}}),null),t}}),null),j(n=>{var a=t()?.judge.decisionCheckId===e.id,o=r()===e.id,s=e.startedAt,c=e.startedAt;return a!==n.e&&i.classList.toggle(`decisive`,n.e=a),o!==n.t&&K(u,`aria-expanded`,n.t=o),s!==n.a&&K(v,`datetime`,n.a=s),c!==n.o&&K(v,`title`,n.o=c),n},{e:void 0,t:void 0,a:void 0,o:void 0}),i})()})),n}})}st([`click`]);var q4=G(`<div class=session-tab-heading><span class=session-connection role=status>`),J4=G(`<div class=early-stop-note><span> · evidence through #</span><button>View decision`),Y4=G(`<div class=early-stop-note><span>Judge session that requested the early stop</span><button>Current judgment`),X4=G(`<div class=session-timeline-scroll>`),Z4=G(`<div class=session-inspector>`),Q4=G(`<pre class=raw-document>`),$4=G(`<div class=error-banner role=alert>Could not render this recorded timeline. The saved data is available from the code icon.`);function e3(e){let[t,n]=A(e.initialTab??`session`),[r,i]=A(),a=()=>r()??e.judgeId,o=()=>t()===`judge`&&e.state?.judge.kind===`code`;M(ae(()=>e.initialTab,e=>{e&&n(e)},{defer:!0}));let s=e4({benchmark:()=>e.benchmarkId,execution:()=>o()?void 0:t()===`judge`?a():e.candidateId,stage:()=>t()===`judge`?`judge`:`candidate`}),[c,l]=A(!1);M(ae(N(()=>`${e.benchmarkId}:${e.candidateId}`),()=>{l(!1),i(void 0)}));let[u,d]=A(!0),f,p,m=()=>s.state()??e.state;M(()=>{s.revision(),t(),u()&&(p!==void 0&&cancelAnimationFrame(p),p=requestAnimationFrame(()=>{f&&u()&&(f.scrollTop=f.scrollHeight)}))}),F(()=>{p!==void 0&&cancelAnimationFrame(p)});let h=t=>e.state?(t===`judge`?e.state.judge:e.state.eval).status===`in_progress`:m()?.status===`in_progress`&&(m()?.stage??`candidate`)===t;return(()=>{var p=Z4();return q(p,z(Mu,{variant:`pill`,get value(){return t()},onChange:e=>{n(e),d(!0)},class:`session-tabs`,get children(){return[(()=>{var e=q4(),t=e.firstChild;return q(e,z(Mu.List,{"aria-label":`Eval run sessions`,get children(){return[z(Mu.Trigger,{value:`session`,children:`Session`}),z(Mu.Trigger,{value:`judge`,get children(){return[z(No,{name:`shield`}),`Judge`]}})]}}),t),q(t,(()=>{var e=W(()=>!!o());return()=>e()?`Code judgment`:s.connection()})()),q(e,z(U,{get when(){return!o()},get children(){return z(Sl,{get value(){return c()?`Show timeline`:`Show raw JSON`},get children(){return z(Lo,{size:`small`,variant:`ghost-muted`,get icon(){return z(No,{name:`code`})},get"aria-label"(){return c()?`Show timeline`:`Show raw JSON`},get"aria-pressed"(){return c()},onClick:()=>l(!c())})}})}}),null),e})(),z(U,{get when(){return W(()=>t()===`session`)()&&e.state?.stop},get children(){var t=J4(),r=t.firstChild,a=r.firstChild,o=r.nextSibling;return q(t,z(No,{name:`shield`}),r),q(r,()=>e.state.stop.applied?`Stopped early`:`Stop requested`,a),q(r,()=>e.state.stop.checkpoint.through,null),o.$$click=()=>{i(e.state.stop.judgeRunId),n(`judge`),d(!1)},t}}),z(U,{get when(){return W(()=>!!(t()===`judge`&&r()))()&&r()!==e.judgeId},get children(){var e=Y4(),t=e.firstChild.nextSibling;return t.$$click=()=>i(void 0),e}}),z(U,{get when(){return W(()=>t()===`judge`)()&&a()},get children(){return z(K4,{get benchmarkId(){return e.benchmarkId},get judgeId(){return a()},onSelectJudge:i})}}),z(U,{get when(){return!o()},get children(){var e=X4();e.addEventListener(`scroll`,()=>{f&&f.scrollHeight-f.scrollTop-f.clientHeight<50&&d(!0)}),e.$$keydown=e=>{[`ArrowUp`,`PageUp`,`Home`].includes(e.key)&&d(!1)},e.$$pointerdown=e=>{e.target===f&&d(!1)},e.$$touchstart=()=>d(!1),e.addEventListener(`wheel`,e=>{e.deltaY<0&&d(!1)});var n=f;return typeof n==`function`?gt(n,e):f=e,q(e,z(U,{get when(){return!c()},get fallback(){return(()=>{var e=Q4();return q(e,()=>JSON.stringify({stage:t(),document:s.stage(t()===`judge`?`judge`:`candidate`)},null,2)),e})()},get children(){return z(Ye,{get fallback(){return $4()},get children(){return[z(Mu.Content,{value:`session`,get children(){return z(K2,{get stage(){return s.stage(`candidate`)},get running(){return h(`candidate`)},get pending(){return m()?.status===`queued`||m()?.status===`in_progress`}})}}),z(Mu.Content,{value:`judge`,get children(){return z(K2,{get stage(){return s.stage(`judge`)},get running(){return h(`judge`)},get pending(){return m()?.status===`queued`||m()?.status===`in_progress`}})}})]}})}})),e}})]}}),null),q(p,z(U,{get when(){return W(()=>!u())()&&m()?.status===`in_progress`},get children(){return z(Po,{class:`follow-stream`,size:`small`,variant:`outline`,onClick:()=>d(!0),children:`Follow stream`})}}),null),j(e=>{var t=o()?`true`:void 0,n=s.stage(`candidate`).sessions.length,r=s.stage(`judge`).sessions.length;return t!==e.e&&K(p,`data-code-only`,e.e=t),n!==e.t&&K(p,`data-candidate-sessions`,e.t=n),r!==e.a&&K(p,`data-judge-sessions`,e.a=r),e},{e:void 0,t:void 0,a:void 0}),p})()}st([`click`,`touchstart`,`pointerdown`,`keydown`]);var t3=G(`<div class=error-banner>`),n3=G(`<section class=trace-view><div class=trace-heading><div><h1></h1><p><span>·</span><span>·</span><span>·</span>Cost </p></div><div class=trace-actions>`);function r3(e){return(()=>{var t=n3(),n=t.firstChild.firstChild,r=n.firstChild,i=r.nextSibling,a=i.firstChild,o=a.nextSibling,s=o.nextSibling;s.nextSibling;var c=n.nextSibling;return q(n,z(Po,{size:`small`,variant:`ghost-muted`,icon:`arrow-left`,get onClick(){return e.onBack},children:`Eval results`}),r),q(r,()=>Qd(e.selected.model)),q(i,()=>e.run.eval,a),q(i,()=>e.selected.reasoning,o),q(i,()=>cf(e.selected.elapsedMs),s),q(i,()=>of(e.selected.cost.usd),null),q(c,z(Io,{get children(){return e.selected.status}}),null),q(c,z(U,{get when(){return e.run.runs.length>1},get children(){return z(jd,{"aria-label":`Eval run`,get options(){return e.run.runs},get current(){return e.selected},value:e=>e.id,label:e=>`${Qd(e.model)} · ${e.reasoning} · run ${e.repetition}`,onSelect:t=>{t&&e.onRun(t.id)}})}}),null),q(t,z(U,{get when(){return e.selected.message},get children(){var t=t3();return q(t,()=>e.selected.message),t}}),null),q(t,z(e3,{get benchmarkId(){return e.run.benchmarkId},get candidateId(){return e.selected.evalRunId},get judgeId(){return e.selected.judgeRunId},get state(){return e.selected}}),null),t})()}var i3=G(`<div class=session-drawer-actions>`);function a3(e){let t=document.activeElement instanceof HTMLElement?document.activeElement:void 0,n=t?.dataset.runKey;return z(go,{get open(){return e.open},modal:!0,onOpenChange:t=>{t||e.onClose()},get children(){return z(go.Portal,{get children(){return[z(go.Overlay,{class:`session-drawer-backdrop`}),z(go.Content,{class:`session-drawer`,onCloseAutoFocus:e=>{e.preventDefault(),queueMicrotask(()=>{(t?.isConnected?t:[...document.querySelectorAll(`[data-run-key]`)].find(e=>e.dataset.runKey===n))?.focus({preventScroll:!0})})},get children(){return[z(go.Title,{class:`sr-only`,get children(){return e.title}}),(()=>{var t=i3();return q(t,z(a4,{}),null),q(t,z(Lo,{size:`small`,variant:`ghost-muted`,get icon(){return z(No,{name:`close`})},"aria-label":`Close eval run`,get onClick(){return e.onClose}}),null),t})(),W(()=>e.children)]}})]}})}})}var o3=e=>e.status===`completed`||e.status===`failed`,s3=e=>[`completed`,`stopped`,`failed`,`timed_out`].includes(e.eval.status),c3=e=>typeof e.judge.score==`number`&&e.judge.score>=0&&e.judge.score<=1,l3=e=>+(e.eval.status===`in_progress`)+ +(e.judge.status===`in_progress`),u3=e=>+!![`completed`,`stopped`].includes(e.eval.status)+ +!!c3(e),d3=e=>+!![`failed`,`timed_out`,`interrupted`].includes(e.eval.status)+([`failed`,`timed_out`,`interrupted`,`blocked`].includes(e.judge.status)||e.judge.score===null?1:0),f3=e=>JSON.stringify([e.model,e.reasoning]);function p3(e,t){let n=e.some(e=>e.state.status===`running`&&t-Date.parse(e.state.heartbeatAt)<=3e4),r=e.toSorted((e,t)=>e.state.evalOrder-t.state.evalOrder).flatMap(e=>e.state.runs.map(t=>({eval:e.state.eval,run:t,key:`${e.id}:${t.id}`}))),i=[...new Set(r.map(({run:e})=>f3(e)))].map(e=>{let t=r.filter(({run:t})=>f3(t)===e).map(({run:e})=>e);return{key:e,model:t[0].model,reasoning:t[0].reasoning,total:t.length*2,completed:t.reduce((e,t)=>e+u3(t),0),attention:t.reduce((e,t)=>e+d3(t),0),active:n?t.reduce((e,t)=>e+l3(t),0):0,scheduled:t.some(e=>e.scheduled),stopped:t.filter(e=>[`cancelled`,`interrupted`].includes(e.status)).length}}),a=r.flatMap(e=>[`eval`,`judge`].flatMap(n=>{let r=e.run[n],i=qd(r,t);return[`completed`,`stopped`].includes(r.status)&&i>0&&Date.parse(r.completedAt)<=t?[{...e,kind:n,duration:i}]:[]})),o=Math.max(1,...e.map(e=>e.state.concurrency)),s=r.filter(({run:e})=>e.scheduled),c=s.filter(({run:e})=>e.eval.status===`queued`),l=Ld(e.flatMap(e=>{let n=zd(t,e.state.heartbeatAt,e.state.status===`running`);return e.state.runtime.map(e=>({...e,end:e.end??n}))}),t),u=null;if(n&&a.length){let e=(e,t)=>{let n=a.filter(e=>e.kind===t),r=n.filter(t=>t.eval===e.eval&&f3(t.run)===f3(e.run));if(r.length)return r;let i=n.filter(t=>t.eval===e.eval);if(i.length)return i;let o=n.filter(t=>f3(t.run)===f3(e.run));return o.length?o:n},n=e=>e.reduce((e,t)=>e+t,0)/e.length,r=(r,i)=>{let a=qd(r.run[i],t),o=e(r,i).map(e=>e.duration),s=o.filter(e=>e>a);if(o.length)return Math.max(1e3,s.length?n(s)-a:n(o)*.25)},i=[],c=new Map,l=!1;for(let e of s){let t=[`queued`,`in_progress`].includes(e.run.eval.status),n=[`queued`,`in_progress`,`watching`].includes(e.run.judge.status)||e.run.judge.status===`waiting`&&(t||[`completed`,`stopped`,`timed_out`].includes(e.run.eval.status));t||c.set(`${e.key}:eval`,0);for(let a of[`eval`,`judge`]){if(!(a===`eval`?t:n))continue;let o=r(e,a);if(o===void 0){l=!0;continue}let s=e.run[a].status===`in_progress`;i.push({id:`${e.key}:${a}`,kind:a,duration:o,active:s,dependency:a===`judge`&&!s&&t?`${e.key}:eval`:void 0})}}if(!l&&i.length){let e=i.filter(e=>e.active).map(e=>(c.set(e.id,e.duration),e.duration));for(;e.length<o;)e.push(0);let t=i.filter(e=>!e.active);for(;t.length;){let n=e.indexOf(Math.min(...e)),r=t.filter(e=>!e.dependency||c.has(e.dependency)),i=e=>e.dependency?c.get(e.dependency):0,a=r.filter(t=>i(t)<=e[n]),o=a.find(e=>e.kind===`judge`)??a[0]??r.sort((e,t)=>i(e)-i(t))[0];if(!o){l=!0;break}e[n]=Math.max(e[n],i(o))+o.duration,c.set(o.id,e[n]),t.splice(t.indexOf(o),1)}l||(u=Math.max(...e))}}return{models:i,total:r.length,finished:r.filter(({run:e})=>o3(e)).length,evals:r.filter(({run:e})=>s3(e)).length,scored:r.filter(({run:e})=>c3(e)).length,attention:r.filter(({run:e})=>e.attention).length,active:n?r.reduce((e,{run:t})=>e+l3(t),0):0,queued:c.length,running:n,samples:a.length,concurrency:o,elapsedMs:l,remainingMs:u,finishAt:u===null?null:t+u}}function m3(e){let t=Math.max(1,Math.ceil(e/6e4));return t<60?`${t} min`:`${Math.floor(t/60)} hr${t%60?` ${t%60} min`:``}`}var h3=G(`<div class=error-banner>`),g3=G(`<section class=live-trace-panel><header class=live-trace-heading><div><h2></h2><p> · run <!> · `);function _3(e){let t=()=>e.stage===`judge`?e.selected.judge:e.selected.eval,n=()=>e.stage===`judge`&&t().status===`completed`?`Judge · ${H3(t())}`:`${e.stage===`judge`?`Judge`:`Eval run`} · ${lf(t().status)}`;return(()=>{var t=g3(),r=t.firstChild,i=r.firstChild,a=i.firstChild,o=a.nextSibling,s=o.firstChild,c=s.nextSibling;return c.nextSibling,q(r,z(Po,{size:`small`,variant:`ghost-muted`,icon:`arrow-left`,get onClick(){return e.onBack},children:`Queue`}),i),q(a,()=>Qd(e.selected.model)),q(o,()=>e.run.state.eval,s),q(o,()=>e.selected.repetition,c),q(o,()=>e.selected.reasoning,null),q(r,z(Io,{get children(){return n()}}),null),q(t,z(U,{get when(){return e.selected.attention??e.selected.message},get children(){var t=h3();return q(t,()=>e.selected.attention??e.selected.message),t}}),null),q(t,z(e3,{get benchmarkId(){return e.run.benchmarkId},get candidateId(){return e.selected.evalRunId},get judgeId(){return e.selected.judgeRunId},get state(){return e.selected},get initialTab(){return e.stage===`judge`?`judge`:`session`}}),null),t})()}var v3=G(`<span class=queue-workers>Workers <strong>/`),y3=G(`<span class=queue-eta><span></span><strong>`),b3=G(`<span>Est. finish <strong>`),x3=G(`<span>Elapsed <strong>`),S3=G(`<span>Cost so far <strong>`),C3=G(`<div class=queue-timing>`),w3=G(`<div class=queue-strip>`),T3=G(`<span class=progress-attention><strong></strong> need attention`),E3=G(`<details class=model-race open><summary><span>Model progress</span><small class=progress-summary><span><strong></strong>/<!> eval runs done</span><span><strong></strong>/<!> scored</span></small></summary><div class=model-race-grid>`),D3=G(`<div class=activity-page><header class=activity-heading><h1>Eval run queue</h1></header><div class=activity-workspace><div class=queue-board aria-label="Eval and judge status columns">`),O3=G(`<span>`),k3=G(`<span>/`),A3=G(`<div class=model-race-row><div class=model-race-lane><div class=model-race-label><span class=model-race-name><strong></strong><small></small></span><span class=model-race-count><small></small></span></div><div class=model-race-track role=progressbar aria-valuemin=0><span>`),j3=G(`<small class=queue-waiting-count title="Judges waiting for finalized eval evidence"> waiting`),M3=G(`<small class=queue-waiting-count> not scheduled`),N3=G(`<p class=queue-column-empty>`),P3=G(`<section class=queue-column><header class=queue-column-heading><span aria-hidden=true></span><h2></h2></header><div class=queue-column-list role=region tabindex=0>`),F3=G(`<span class=early-stop-label>Stopped early`),I3=G(`<time class=queue-card-elapsed>`),L3=G(`<button class=queue-card><span class=queue-card-heading><span aria-hidden=true></span><strong></strong><small></small><span class=stage-icon role=img></span></span><span class=queue-card-meta><span class=queue-card-numbers><span>#`),R3=2,z3=2,B3=9,V3=e=>[`queued`,`waiting`,`watching`].includes(e.stage.status)?`queued`:e.stage.status===`in_progress`?`in_progress`:e.stage.status===`completed`||e.stage.status===`stopped`?e.kind===`judge`&&e.stage.score===null?`attention`:`completed`:`attention`,H3=e=>e.score===1?`Pass`:e.score===0?`Fail`:typeof e.score==`number`?`${Math.round(e.score*100)}%`:`Unknown`,U3=e=>e.kind===`judge`&&e.stage.score===null?`unknown`:e.stage.status;function W3(e){let[t,n]=A(``),[r,i]=A(Date.now());oe(()=>{let e=setInterval(()=>i(Date.now()),1e3);F(()=>clearInterval(e))});let a=N(()=>[...new Set(e.runs.map(e=>e.benchmarkId))]),o=N(()=>e.runs.find(t=>t.id===e.run));M(()=>{o()?n(o().benchmarkId):!t()&&a().length&&n(a()[0])});let s=N(()=>e.runs.filter(e=>e.benchmarkId===t()).toSorted((e,t)=>e.state.evalOrder-t.state.evalOrder)),c=N(()=>p3(s(),r())),l=N(()=>Kd(s().map(e=>e.cost))),u=N(()=>s().flatMap(e=>e.state.runs.map(t=>({key:`${e.id}:${t.id}`,group:e,run:t})))),d=N(()=>u().flatMap(({key:e,group:t,run:n})=>[{key:`${e}:eval`,group:t,run:n,kind:`eval`,stage:n.eval},{key:`${e}:judge`,group:t,run:n,kind:`judge`,stage:n.judge}])),f=[{id:`queued`,label:`Queued`,dot:`queued`},{id:`in_progress`,label:`In progress`,dot:`in_progress`},{id:`completed`,label:`Completed`,dot:`completed`},{id:`attention`,label:`Needs attention`,dot:`failed`}],p=e=>d().filter(t=>V3(t)===e).map(e=>e.key),m=()=>d().filter(e=>e.run.scheduled&&e.stage.status===`queued`).length,h=()=>d().filter(e=>e.run.scheduled&&[`waiting`,`watching`].includes(e.stage.status)).length,g=()=>d().filter(e=>e.run.scheduled===!1&&[`queued`,`waiting`,`watching`].includes(e.stage.status)).length,[_,v]=A({width:0,tick:R3,gap:z3,height:B3}),y=e=>{let t=()=>{let t=window.devicePixelRatio||1,n=e=>Math.max(1,Math.round(e*t))/t;v({width:e.getBoundingClientRect().width,tick:n(R3),gap:n(z3),height:n(B3)})},n=new ResizeObserver(([e])=>{e.contentRect.width!==_().width&&t()});n.observe(e),window.addEventListener(`resize`,t),F(()=>{n.disconnect(),window.removeEventListener(`resize`,t)})},b=N(()=>{let e=[`completed`,`attention`,`in_progress`,`queued`],t=d().map(e=>V3(e)).sort((t,n)=>e.indexOf(t)-e.indexOf(n));if(!t.length)return[];let{width:n,tick:r,gap:i}=_(),a=Math.floor((n+i)/(r+i)),o=Math.max(1,a||t.length);return Array.from({length:o},(e,n)=>{let r=Math.floor(n*t.length/o),i=Math.max(r+1,Math.floor((n+1)*t.length/o)),a=new Map;for(let e of t.slice(r,i))a.set(e,(a.get(e)??0)+1);let[s]=[...a.entries()].sort((e,t)=>t[1]-e[1])[0];return{column:s,title:[...a.entries()].map(([e,t])=>`${t} ${f.find(t=>t.id===e).label.toLowerCase()}`).join(`, `)}})}),x=()=>o()?.state.runs.find(t=>t.id===e.evalRun);return(()=>{var i=D3(),s=i.firstChild;s.firstChild;var v=s.nextSibling,S=v.firstChild;return q(s,z(U,{get when(){return a().length},get children(){return z(jd,{"aria-label":`Benchmark run`,get options(){return a()},get current(){return t()},label:t=>`Benchmark · ${sf(e.runs.find(e=>e.benchmarkId===t).state.startedAt)}`,onSelect:r=>{r&&r!==t()&&(e.onSelect(``,``),n(r))}})}}),null),q(i,z(U,{get when(){return u().length},get children(){return[(()=>{var e=C3();return q(e,z(Sl,{value:`Free workers immediately start ready work. Judges wait for finalized eval evidence.`,get children(){var e=v3(),t=e.firstChild.nextSibling,n=t.firstChild;return q(t,()=>c().active,n),q(t,()=>c().concurrency,null),e}}),null),q(e,z(Sl,{get value(){return`Estimated from ${c().samples} completed eval/judge stage runtimes for the current execution scope, using ${c().concurrency} parallel workers. Idle gaps and deferred work are excluded.`},get children(){var e=y3(),t=e.firstChild,n=t.nextSibling;return q(t,()=>c().running?`ETA`:`Run ended`),q(n,(()=>{var e=W(()=>c().remainingMs!==null);return()=>e()?`About ${m3(c().remainingMs)} left`:W(()=>!!c().running)()?`Estimating…`:`${c().finished}/${c().total} finished`})()),e}}),null),q(e,z(U,{get when(){return c().finishAt!==null},get children(){var e=b3(),t=e.firstChild.nextSibling;return q(t,()=>new Date(c().finishAt).toLocaleString([],{...new Date(c().finishAt).toDateString()===new Date(r()).toDateString()?{}:{month:`short`,day:`numeric`},hour:`numeric`,minute:`2-digit`})),e}}),null),q(e,z(Sl,{value:`Recorded eval and judge wall-clock runtime across all executions. Overlapping workers count once; idle gaps and passive monitoring are excluded.`,get children(){var e=x3(),t=e.firstChild.nextSibling;return q(t,()=>cf(c().elapsedMs)),e}}),null),q(e,z(Sl,{value:`Reported eval and judge cost, including active-session usage and previous executions.`,get children(){var e=S3(),t=e.firstChild.nextSibling;return q(t,()=>of(l().reportedUSD)),e}}),null),e})(),(()=>{var e=w3();return gt(y,e),q(e,z(H,{get each(){return b()},children:e=>(()=>{var t=O3();return j(n=>{var r=e.column,i=e.title;return r!==n.e&&ut(t,n.e=r),i!==n.t&&K(t,`title`,n.t=i),n},{e:void 0,t:void 0}),t})()})),j(t=>{var n=`${_().tick}px`,r=`${_().gap}px`,i=`${_().height}px`,a=`${c().evals} of ${c().total} eval runs done, ${c().scored} scored`;return n!==t.e&&mt(e,`--strip-tick`,t.e=n),r!==t.t&&mt(e,`--strip-gap`,t.t=r),i!==t.a&&mt(e,`--strip-height`,t.a=i),a!==t.o&&K(e,`aria-label`,t.o=a),t},{e:void 0,t:void 0,a:void 0,o:void 0}),e})(),(()=>{var e=E3(),t=e.firstChild,n=t.firstChild.nextSibling,r=n.firstChild,i=r.firstChild,a=i.nextSibling.nextSibling;a.nextSibling;var o=r.nextSibling,s=o.firstChild,l=s.nextSibling.nextSibling;l.nextSibling;var u=t.nextSibling;return q(i,()=>c().evals),q(r,()=>c().total,a),q(s,()=>c().scored),q(o,()=>c().total,l),q(n,z(U,{get when(){return c().attention},get children(){var e=T3(),t=e.firstChild;return q(t,()=>c().attention),e}}),null),q(u,z(H,{get each(){return c().models.map(e=>e.key)},children:e=>{let t=()=>c().models.find(t=>t.key===e);return(()=>{var e=A3(),n=e.firstChild,r=n.firstChild,i=r.firstChild,a=i.firstChild,o=a.nextSibling,s=i.nextSibling,c=s.firstChild,l=r.nextSibling,u=l.firstChild;return q(e,z(Fd,{get id(){return $d(t().model)}}),n),q(a,()=>Qd(t().model)),q(o,()=>t().reasoning),q(c,(()=>{var e=W(()=>!!t().active);return()=>e()?`${t().active} running`:W(()=>!!t().stopped)()?`${t().stopped} stopped`:W(()=>t().completed+t().attention===t().total)()?`Done`:t().scheduled?`Queued`:`Not scheduled`})()),q(s,z(Sl,{get value(){return`${t().completed} of ${t().total} eval and judge stages completed${t().attention?`, ${t().attention} need attention`:``}`},get children(){var e=k3(),n=e.firstChild;return q(e,()=>t().completed,n),q(e,()=>t().total,null),e}}),null),j(e=>{var n=`${Qd(t().model)} · ${t().reasoning} completed stages`,r=t().total,i=t().completed,a=`${t().completed/t().total*100}%`;return n!==e.e&&K(l,`aria-label`,e.e=n),r!==e.t&&K(l,`aria-valuemax`,e.t=r),i!==e.a&&K(l,`aria-valuenow`,e.a=i),a!==e.o&&mt(u,`width`,e.o=a),e},{e:void 0,t:void 0,a:void 0,o:void 0}),e})()}})),e})()]}}),v),q(S,z(H,{each:f,children:t=>(()=>{var n=P3(),i=n.firstChild,a=i.firstChild,o=a.nextSibling,s=i.nextSibling;return q(o,()=>t.label),q(i,z(Io,{get children(){return W(()=>t.id===`queued`)()?`${m()} ready`:p(t.id).length}}),null),q(i,z(U,{get when(){return W(()=>t.id===`queued`)()&&h()},get children(){var e=j3(),t=e.firstChild;return q(e,h,t),e}}),null),q(i,z(U,{get when(){return W(()=>t.id===`queued`)()&&g()},get children(){var e=M3(),t=e.firstChild;return q(e,g,t),e}}),null),q(s,z(H,{get each(){return p(t.id)},children:t=>{let n=()=>d().find(e=>e.key===t),i=()=>e.run===n().group.id&&e.evalRun===n().run.id&&e.stage===n().kind,a=()=>qd(n().stage,zd(r(),n().group.state.heartbeatAt,n().group.state.status===`running`)),o=()=>r4()?`Hidden eval`:n().group.state.eval,s=()=>n().run.scheduled===!1&&[`queued`,`waiting`,`watching`].includes(n().stage.status)?`Not scheduled`:n().kind===`judge`&&n().stage.status===`completed`?H3(n().stage):n().stage.status===`waiting`?`Waiting for eval run`:n().stage.status===`blocked`?`Blocked by eval run`:lf(n().stage.status);return(()=>{var r=L3(),c=r.firstChild,l=c.firstChild,u=l.nextSibling,d=u.nextSibling,f=d.nextSibling,p=c.nextSibling,m=p.firstChild,h=m.firstChild;return h.firstChild,r.$$click=()=>{r4()||e.onSelect(n().group.id,n().run.id,n().kind)},K(r,`data-run-key`,t),q(u,()=>Qd(n().run.model)),q(d,()=>n().run.reasoning),q(f,z(No,{get name(){return n().kind===`eval`?`flask`:`shield`}})),q(p,z(o4,{get children(){return n().group.state.eval}}),m),q(m,z(U,{get when(){return W(()=>n().kind===`eval`)()&&n().stage.status===`stopped`},get children(){var e=F3();return j(()=>K(e,`title`,`Stopped after judge check through evidence event ${n().run.stop?.checkpoint.through??``}`)),e}}),h),q(m,z(U,{get when(){return W(()=>n().stage.status===`in_progress`)()&&a()!==void 0},get children(){var e=I3();return q(e,()=>cf(a())),e}}),h),q(m,z(U,{get when(){return W(()=>n().kind===`judge`)()&&n().stage.status===`completed`},get children(){var e=O3();return q(e,()=>H3(n().stage)),j(()=>ut(e,`verdict ${H3(n().stage).toLowerCase()}`)),e}}),h),q(h,()=>n().run.repetition,null),j(e=>{var t=n().kind,a=n().stage.status,c=!!i(),u=i(),d=r4(),p=`${n().kind===`eval`?`Eval run`:`Judge`}, ${Qd(n().run.model)}, ${n().run.reasoning}, ${o()}, run ${n().run.repetition}, ${s()}`,m=`status-dot ${U3(n())}`,h=n().kind,g=`${n().kind===`eval`?`Eval run`:`Judge`} · ${s()}`,_=n().kind===`eval`?`Eval run`:`Judge`;return t!==e.e&&K(r,`data-stage`,e.e=t),a!==e.t&&K(r,`data-state`,e.t=a),c!==e.a&&r.classList.toggle(`selected`,e.a=c),u!==e.o&&K(r,`aria-pressed`,e.o=u),d!==e.i&&(r.disabled=e.i=d),p!==e.n&&K(r,`aria-label`,e.n=p),m!==e.s&&ut(l,e.s=m),h!==e.h&&K(f,`data-stage`,e.h=h),g!==e.r&&K(f,`title`,e.r=g),_!==e.d&&K(f,`aria-label`,e.d=_),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),r})()}}),null),q(s,z(U,{get when(){return!p(t.id).length},get children(){var e=N3();return q(e,()=>t.id===`attention`?`Nothing needs attention`:`No eval or judge runs`),e}}),null),j(e=>{var r=`queue-${t.id}`,i=`status-dot ${t.dot}`,c=`queue-${t.id}`,l=`${t.label} eval and judge runs`;return r!==e.e&&K(n,`aria-labelledby`,e.e=r),i!==e.t&&ut(a,e.t=i),c!==e.a&&K(o,`id`,e.a=c),l!==e.o&&K(s,`aria-label`,e.o=l),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n})()})),q(v,z(U,{get when(){return W(()=>!r4())()&&x()},get children(){return z(a3,{open:!0,get title(){return`${Qd(x().model)} ${e.stage===`judge`?`judge`:`eval run`}`},onClose:()=>e.onSelect(``,``),get children(){return z(_3,{get run(){return o()},get selected(){return x()},get stage(){return e.stage},onBack:()=>e.onSelect(``,``)})}})}}),null),i})()}st([`click`]);function G3(e={}){let[t,n]=Aa({value:()=>J(e.isSelected),defaultValue:()=>!!J(e.defaultIsSelected),onChange:t=>e.onSelectedChange?.(t)});return{isSelected:t,setIsSelected:t=>{!J(e.isReadOnly)&&!J(e.isDisabled)&&n(t)},toggle:()=>{!J(e.isReadOnly)&&!J(e.isDisabled)&&n(!t())}}}Ia({},{Checkbox:()=>n6,Control:()=>J3,Description:()=>Y3,ErrorMessage:()=>X3,Indicator:()=>Z3,Input:()=>Q3,Label:()=>$3,Root:()=>e6,useCheckboxContext:()=>q3});var K3=L();function q3(){let e=R(K3);if(e===void 0)throw Error("[kobalte]: `useCheckboxContext` must be used within a `Checkbox` component");return e}function J3(e){let t=Iu(),n=q3(),[r,i]=V(Vi({id:n.generateId(`control`)},e),[`onClick`,`onKeyDown`]);return z(Ta,B({as:`div`,onClick:e=>{_i(e,r.onClick),n.toggle(),n.inputRef()?.focus({preventScroll:!0})},onKeyDown:e=>{_i(e,r.onKeyDown),e.key===si.Space&&(n.toggle(),n.inputRef()?.focus({preventScroll:!0}))}},()=>t.dataset(),()=>n.dataset(),i))}function Y3(e){let t=q3();return z(Lu,B(()=>t.dataset(),e))}function X3(e){let t=q3();return z(cd,B(()=>t.dataset(),e))}function Z3(e){let t=Iu(),n=q3(),[r,i]=A(),[a,o]=V(Vi({id:n.generateId(`indicator`)},e),[`ref`,`forceMount`]),{present:s}=ro({show:()=>a.forceMount||n.indeterminate()||n.checked(),element:()=>r()??null});return z(U,{get when(){return s()},get children(){return z(Ta,B({as:`div`,ref(e){var t=Yr(i,a.ref);typeof t==`function`&&t(e)}},()=>t.dataset(),()=>n.dataset(),o))}})}function Q3(e){let t,n=Iu(),r=q3(),[i,a,o]=V(Vi({id:r.generateId(`input`)},e),[`ref`,`style`,`onChange`,`onFocus`,`onBlur`],nd),{fieldProps:s}=rd(a),[c,l]=A(!1);return M(ae([()=>r.checked(),()=>r.value()],()=>{l(!0),t?.dispatchEvent(new Event(`input`,{bubbles:!0,cancelable:!0})),t?.dispatchEvent(new Event(`change`,{bubbles:!0,cancelable:!0}))},{defer:!0})),M(ae([()=>t,()=>r.indeterminate(),()=>r.checked()],([e,t])=>{e&&(e.indeterminate=t)})),z(Ta,B({as:`input`,ref(e){var n=Yr(e=>{r.setInputRef(e),t=e},i.ref);typeof n==`function`&&n(e)},type:`checkbox`,get id(){return s.id()},get name(){return n.name()},get value(){return r.value()},get checked(){return r.checked()},get required(){return n.isRequired()},get disabled(){return n.isDisabled()},get readonly(){return n.isReadOnly()},get style(){return Jr(qi,i.style)},get"aria-label"(){return s.ariaLabel()},get"aria-labelledby"(){return s.ariaLabelledBy()},get"aria-describedby"(){return s.ariaDescribedBy()},get"aria-invalid"(){return n.validationState()===`invalid`||void 0},get"aria-required"(){return n.isRequired()},get"aria-disabled"(){return n.isDisabled()},get"aria-readonly"(){return n.isReadOnly()},onChange:e=>{if(_i(e,i.onChange),e.stopPropagation(),!c()){let t=e.target;r.setIsChecked(t.checked),t.checked=r.checked()}l(!1)},onFocus:e=>{_i(e,i.onFocus),r.setIsFocused(!0)},onBlur:e=>{_i(e,i.onBlur),r.setIsFocused(!1)}},()=>n.dataset(),()=>r.dataset(),o))}function $3(e){let t=q3();return z(id,B(()=>t.dataset(),e))}function e6(e){let t,[n,r,i]=V(Vi({value:`on`,id:`checkbox-${Ue()}`},e),[`ref`,`children`,`value`,`checked`,`defaultChecked`,`indeterminate`,`onChange`,`onPointerDown`],Nu),[a,o]=A(),[s,c]=A(!1),{formControlContext:l}=Pu(r),u=G3({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:e=>n.onChange?.(e),isDisabled:()=>l.isDisabled(),isReadOnly:()=>l.isReadOnly()});ad(()=>t,()=>u.setIsSelected(n.defaultChecked??!1));let d=e=>{_i(e,n.onPointerDown),s()&&e.preventDefault()},f=N(()=>({"data-checked":u.isSelected()?``:void 0,"data-indeterminate":n.indeterminate?``:void 0})),p={value:()=>n.value,dataset:f,checked:()=>u.isSelected(),indeterminate:()=>n.indeterminate??!1,inputRef:a,generateId:ti(()=>J(r.id)),toggle:()=>u.toggle(),setIsChecked:e=>u.setIsSelected(e),setIsFocused:c,setInputRef:o};return z(Fu.Provider,{value:l,get children(){return z(K3.Provider,{value:p,get children(){return z(Ta,B({as:`div`,ref(e){var r=Yr(e=>t=e,n.ref);typeof r==`function`&&r(e)},role:`group`,get id(){return J(r.id)},onPointerDown:d},()=>l.dataset(),f,i,{get children(){return z(t6,{state:p,get children(){return n.children}})}}))}})}})}function t6(e){return W(pe(()=>{let t=e.children;return ei(t)?t(e.state):t}))}var n6=Object.assign(e6,{Control:J3,Description:Y3,ErrorMessage:X3,Indicator:Z3,Input:Q3,Label:$3}),r6=G(`<div data-slot=checkbox-checkbox-content>`),i6=G(`<svg viewBox="0 0 12 12"fill=none width=10 height=10 xmlns=http://www.w3.org/2000/svg><path d="M3 7.17905L5.02703 8.85135L9 3.5"stroke=currentColor stroke-width=1.5 stroke-linecap=square>`);function a6(e){let[t,n]=V(e,[`children`,`class`,`label`,`hideLabel`,`description`,`icon`]);return z(e6,B(n,{"data-component":`checkbox`,get children(){return[z(Q3,{"data-slot":`checkbox-checkbox-input`}),z(J3,{"data-slot":`checkbox-checkbox-control`,get children(){return z(Z3,{"data-slot":`checkbox-checkbox-indicator`,get children(){return t.icon||i6()}})}}),(()=>{var n=r6();return q(n,z(U,{get when(){return e.children},get children(){return z($3,{"data-slot":`checkbox-checkbox-label`,get classList(){return{"sr-only":t.hideLabel}},get children(){return e.children}})}}),null),q(n,z(U,{get when(){return t.description},get children(){return z(Y3,{"data-slot":`checkbox-checkbox-description`,get children(){return t.description}})}}),null),q(n,z(X3,{"data-slot":`checkbox-checkbox-error`}),null),n})()]}}))}Ia({},{Anchor:()=>c6,Arrow:()=>Qc,CloseButton:()=>l6,Content:()=>u6,Description:()=>d6,Popover:()=>_6,Portal:()=>f6,Root:()=>m6,Title:()=>h6,Trigger:()=>g6,usePopoverContext:()=>s6});var o6=L();function s6(){let e=R(o6);if(e===void 0)throw Error("[kobalte]: `usePopoverContext` must be used within a `Popover` component");return e}function c6(e){let t=s6(),[n,r]=V(e,[`ref`]);return z(Ta,B({as:`div`,ref(e){var r=Yr(t.setDefaultAnchorRef,n.ref);typeof r==`function`&&r(e)}},()=>t.dataset(),r))}function l6(e){let t=s6(),[n,r]=V(e,[`aria-label`,`onClick`]);return z(za,B({get"aria-label"(){return n[`aria-label`]||t.translations().dismiss},onClick:e=>{_i(e,n.onClick),t.close()}},()=>t.dataset(),r))}function u6(e){let t,n=s6(),[r,i]=V(Vi({id:n.generateId(`content`)},e),[`ref`,`style`,`onOpenAutoFocus`,`onCloseAutoFocus`,`onPointerDownOutside`,`onFocusOutside`,`onInteractOutside`]),a=!1,o=!1,s=!1,c=e=>{r.onCloseAutoFocus?.(e),n.isModal()?(e.preventDefault(),a||bi(n.triggerRef())):(e.defaultPrevented||(o||bi(n.triggerRef()),e.preventDefault()),o=!1,s=!1)},l=e=>{r.onPointerDownOutside?.(e),n.isModal()&&(a=e.detail.isContextMenu)},u=e=>{r.onFocusOutside?.(e),n.isOpen()&&n.isModal()&&e.preventDefault()},d=e=>{r.onInteractOutside?.(e),!n.isModal()&&(e.defaultPrevented||(o=!0,e.detail.originalEvent.type===`pointerdown`&&(s=!0)),ni(n.triggerRef(),e.target)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&s&&e.preventDefault())};return _a({isDisabled:()=>!(n.isOpen()&&n.isModal()),targets:()=>t?[t]:[]}),no({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),ha({trapFocus:()=>n.isOpen()&&n.isModal(),onMountAutoFocus:r.onOpenAutoFocus,onUnmountAutoFocus:c},()=>t),M(()=>F(n.registerContentId(i.id))),z(U,{get when(){return n.contentPresent()},get children(){return z(sl.Positioner,{get children(){return z(Oa,B({ref(e){var i=Yr(e=>{n.setContentRef(e),t=e},r.ref);typeof i==`function`&&i(e)},role:`dialog`,tabIndex:-1,get disableOutsidePointerEvents(){return W(()=>!!n.isOpen())()&&n.isModal()},get excludedElements(){return[n.triggerRef]},get style(){return Jr({"--kb-popover-content-transform-origin":`var(--kb-popper-content-transform-origin)`,position:`relative`},r.style)},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,get onDismiss(){return n.close}},()=>n.dataset(),i))}})}})}function d6(e){let t=s6(),[n,r]=V(Vi({id:t.generateId(`description`)},e),[`id`]);return M(()=>F(t.registerDescriptionId(n.id))),z(Ta,B({as:`p`,get id(){return n.id}},()=>t.dataset(),r))}function f6(e){let t=s6();return z(U,{get when(){return t.contentPresent()},get children(){return z(jt,e)}})}var p6={dismiss:`Dismiss`};function m6(e){let[t,n]=V(Vi({id:`popover-${Ue()}`,modal:!1,translations:p6},e),[`translations`,`id`,`open`,`defaultOpen`,`onOpenChange`,`modal`,`preventScroll`,`forceMount`,`anchorRef`]),[r,i]=A(),[a,o]=A(),[s,c]=A(),[l,u]=A(),[d,f]=A(),[p,m]=A(),h=Ma({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:e=>t.onOpenChange?.(e)}),g=()=>t.anchorRef?.()??r()??a(),{present:_}=ro({show:()=>t.forceMount||h.isOpen(),element:()=>s()??null}),v={translations:()=>t.translations??p6,dataset:N(()=>({"data-expanded":h.isOpen()?``:void 0,"data-closed":h.isOpen()?void 0:``})),isOpen:h.isOpen,isModal:()=>t.modal??!1,preventScroll:()=>t.preventScroll??v.isModal(),contentPresent:_,triggerRef:a,contentId:l,titleId:d,descriptionId:p,setDefaultAnchorRef:i,setTriggerRef:o,setContentRef:c,close:h.close,toggle:h.toggle,generateId:ti(()=>t.id),registerContentId:Va(u),registerTitleId:Va(f),registerDescriptionId:Va(m)};return z(o6.Provider,{value:v,get children(){return z(sl,B({anchorRef:g,contentRef:s},n))}})}function h6(e){let t=s6(),[n,r]=V(Vi({id:t.generateId(`title`)},e),[`id`]);return M(()=>F(t.registerTitleId(n.id))),z(Ta,B({as:`h2`,get id(){return n.id}},()=>t.dataset(),r))}function g6(e){let t=s6(),[n,r]=V(e,[`ref`,`onClick`,`onPointerDown`]);return z(za,B({ref(e){var r=Yr(t.setTriggerRef,n.ref);typeof r==`function`&&r(e)},"aria-haspopup":`dialog`,get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return W(()=>!!t.isOpen())()?t.contentId():void 0},onPointerDown:e=>{_i(e,n.onPointerDown),e.preventDefault()},onClick:e=>{_i(e,n.onClick),t.toggle()}},()=>t.dataset(),r))}var _6=Object.assign(m6,{Anchor:c6,Arrow:Qc,CloseButton:l6,Content:u6,Description:d6,Portal:f6,Title:h6,Trigger:g6}),v6=G(`<div data-slot=popover-header>`),y6=G(`<div data-slot=popover-body>`);function b6(e){let t=Al(),[n,r]=V(e,[`trigger`,`triggerAs`,`triggerProps`,`title`,`description`,`class`,`classList`,`style`,`children`,`portal`,`open`,`defaultOpen`,`onOpenChange`,`modal`]),[i,a]=Qt({contentRef:void 0,triggerRef:void 0,dismiss:null,uncontrolledOpen:n.defaultOpen??!1}),o=()=>n.open!==void 0,s=()=>o()?n.open??!1:i.uncontrolledOpen,c=e=>{e&&a(`dismiss`,null),n.onOpenChange&&n.onOpenChange(e),!o()&&a(`uncontrolledOpen`,e)};M(()=>{if(!s())return;let e=e=>{if(!e)return!1;let t=i.contentRef;if(t&&t.contains(e))return!0;let n=i.triggerRef;return!!(n&&n.contains(e))},t=e=>{a(`dismiss`,e),c(!1)};fn(window,`keydown`,e=>{e.key===`Escape`&&(t(`escape`),e.preventDefault(),e.stopPropagation())},{capture:!0}),fn(window,`pointerdown`,n=>{let r=n.target;r instanceof Node&&(e(r)||t(`outside`))},{capture:!0}),fn(window,`focusin`,n=>{let r=n.target;r instanceof Node&&(e(r)||t(`outside`))},{capture:!0})});let l=()=>z(_6.Content,{ref:e=>a(`contentRef`,e),"data-component":`popover-content`,get classList(){return{...n.classList,[n.class??``]:!!n.class}},get style(){return n.style},onCloseAutoFocus:e=>{i.dismiss===`outside`&&e.preventDefault(),a(`dismiss`,null)},get children(){return[z(U,{get when(){return n.title},get children(){var e=v6();return q(e,z(_6.Title,{"data-slot":`popover-title`,get children(){return n.title}}),null),q(e,z(_6.CloseButton,{"data-slot":`popover-close-button`,as:Lo,get icon(){return z(No,{name:`close`})},variant:`ghost`,get"aria-label"(){return t.t(`ui.common.close`)}}),null),e}}),z(U,{get when(){return n.description},get children(){return z(_6.Description,{"data-slot":`popover-description`,get children(){return n.description}})}}),(()=>{var e=y6();return q(e,()=>n.children),e})()]}});return z(_6,B({gutter:4},r,{get open(){return s()},onOpenChange:c,get modal(){return n.modal??!1},get children(){return[z(_6.Trigger,B({ref:e=>a(`triggerRef`,e),get as(){return n.triggerAs??`div`},"data-slot":`popover-trigger`},()=>n.triggerProps,{get children(){return n.trigger}})),z(U,{get when(){return n.portal??!0},get fallback(){return l()},get children(){return z(_6.Portal,{get children(){return l()}})}})]}}))}var x6=G(`<p class=model-filter-hint>Show models matching any selection.`),S6=G(`<div class=model-filter-groups>`),C6=G(`<div class=model-filter-footer><span> of <!> models`),w6=G(`<div class=model-filter>`),T6=G(`<span>`),E6=G(`<fieldset><legend>`),D6=G(`<div class=model-filter-option><span>`);function O6(e){let t=N(()=>[`lab`,`family`].map(t=>{let n=new Map;for(let r of e.models){let e=tf(r)[t];n.set(e,(n.get(e)??0)+1)}return{kind:t,label:t===`lab`?`Labs`:`Model families`,options:[...n].sort(([e],[t])=>e.localeCompare(t)).map(([e,n])=>({key:`${t}:${e}`,label:e,count:n}))}})),n=()=>e.selected.map(e=>e.slice(e.indexOf(`:`)+1)),r=()=>n().length?n().length===1?n()[0]:`${n()[0]} +${n().length-1}`:`All models`,i=(t,n)=>e.onChange(n?[...new Set([...e.selected,t])]:e.selected.filter(e=>e!==t));return(()=>{var a=w6();return q(a,z(b6,{title:`Labs / model families`,placement:`bottom-end`,class:`model-filter-popover`,triggerAs:Po,get triggerProps(){return{size:`small`,variant:`outline`,"aria-label":`Filter labs and model families: ${n().join(`, `)||`All models`}`}},get trigger(){return[(()=>{var e=T6();return q(e,r),e})(),z(No,{name:`chevron-down`})]},get children(){return[x6(),(()=>{var n=S6();return q(n,z(H,{get each(){return t()},children:t=>(()=>{var n=E6(),r=n.firstChild;return q(r,()=>t.label),q(n,z(H,{get each(){return t.options},children:t=>(()=>{var n=D6(),r=n.firstChild;return q(n,z(a6,{get checked(){return e.selected.includes(t.key)},onChange:e=>i(t.key,e),get children(){return t.label}}),r),q(r,()=>t.count),j(()=>K(r,`aria-label`,`${t.count} models`)),n})()}),null),n})()})),n})(),(()=>{var t=C6(),n=t.firstChild,r=n.firstChild,i=r.nextSibling;return i.nextSibling,q(n,()=>e.models.filter(t=>nf(t,e.selected)).length,r),q(n,()=>e.models.length,i),q(t,z(Po,{size:`small`,variant:`ghost-muted`,get disabled(){return!e.selected.length},onClick:()=>e.onChange([]),children:`Clear filters`}),null),t})()]}}),null),q(a,z(U,{get when(){return e.selected.length},get children(){return z(Po,{size:`small`,variant:`ghost-muted`,"aria-label":`Clear model filters`,onClick:()=>e.onChange([]),children:`Clear`})}}),null),a})()}var k6=G(`<p class=model-filter-hint>Score only criteria in any selected category.`),A6=G(`<fieldset class=category-filter-options><legend>Categories`),j6=G(`<div class=model-filter-footer><span> of <!> categories`),M6=G(`<div class="model-filter category-filter">`),N6=G(`<span>`),P6=G(`<div class=model-filter-option><span>`),F6=e=>`${e} ${e===1?`criterion`:`criteria`}`;function I6(e){let t=()=>e.categories.filter(t=>e.selected.includes(t.key)).map(e=>e.name),n=()=>t().length?t().length===1?t()[0]:`${t()[0]} +${t().length-1}`:`All categories`,r=(t,n)=>e.onChange(n?e.categories.map(e=>e.key).filter(n=>n===t||e.selected.includes(n)):e.selected.filter(e=>e!==t));return(()=>{var i=M6();return q(i,z(b6,{title:`Categories`,placement:`bottom-end`,class:`model-filter-popover`,triggerAs:Po,get triggerProps(){return{size:`small`,variant:`outline`,"aria-label":`Filter criteria by category: ${t().join(`, `)||`All categories`}`}},get trigger(){return[(()=>{var e=N6();return q(e,n),e})(),z(No,{name:`chevron-down`})]},get children(){return[k6(),(()=>{var t=A6();return t.firstChild,q(t,z(H,{get each(){return e.categories},children:t=>(()=>{var n=P6(),i=n.firstChild;return q(n,z(a6,{get checked(){return e.selected.includes(t.key)},onChange:e=>r(t.key,e),get children(){return t.name}}),i),q(i,()=>t.criteria),j(e=>{var n=t.criteria<3,r=F6(t.criteria),a=t.criteria<3?`Low coverage: fewer than 3 criteria`:void 0;return n!==e.e&&i.classList.toggle(`low`,e.e=n),r!==e.t&&K(i,`aria-label`,e.t=r),a!==e.a&&K(i,`title`,e.a=a),e},{e:void 0,t:void 0,a:void 0}),n})()}),null),t})(),(()=>{var t=j6(),n=t.firstChild,r=n.firstChild,i=r.nextSibling;return i.nextSibling,q(n,()=>e.selected.length||e.categories.length,r),q(n,()=>e.categories.length,i),q(t,z(Po,{size:`small`,variant:`ghost-muted`,get disabled(){return!e.selected.length},onClick:()=>e.onChange([]),children:`Clear filters`}),null),t})()]}}),null),q(i,z(U,{get when(){return e.selected.length},get children(){return z(Po,{size:`small`,variant:`ghost-muted`,"aria-label":`Clear category filters`,onClick:()=>e.onChange([]),children:`Clear`})}}),null),i})()}var L6=G(`<svg role=img>`),R6=G(`<div class=category-radar><div class=category-radar-chart><div class=category-radar-modes role=group aria-label="Radar mode"></div><p class=category-radar-note>Solid areas show earned points. Dashed outlines show the possible range for unscored checks. Dashed axes and amber counts mark low coverage: fewer than <!> criteria.</p></div><div class=category-radar-models><span class=category-radar-heading>`),z6=G(`<div class=category-bars><p>Select three or more categories for a radar chart.`),B6=G(`<div class=category-bar-group><span>`),V6=G(`<div class=category-bar><i></i><small>`),H6=G(`<svg><polygon class=radar-ring></svg>`,!1,!0,!1),U6=G(`<svg><text class=radar-tick></svg>`,!1,!0,!1),W6=G(`<svg><g><line class=radar-axis></line><text class=radar-label><tspan class=radar-coverage dy=15></svg>`,!1,!0,!1),G6=G(`<svg><polygon class=radar-upper></svg>`,!1,!0,!1),K6=G(`<svg><g class=radar-series><polygon class=radar-area></svg>`,!1,!0,!1),q6=G(`<svg><circle class=radar-point r=4><title></svg>`,!1,!0,!1),J6=G(`<span class=category-swatch>`),Y6=G(`<span class=category-radar-name><small>`),X6=G(`<div class=category-radar-model><span class=category-radar-score>`),Z6=[`var(--app-success)`,`var(--v2-state-fg-info, #6aa6ff)`,`var(--v2-state-fg-warning, #f0b45e)`,`var(--app-danger)`],Q6=Z6.length,$6={width:580,height:450,radius:150,labelGap:20},e8=e=>e.upper-e.lower>1e-6,t8=e=>e8(e)?`${rf(e.lower)}–${af(e.upper)}`:af(e.lower),n8=e=>e8(e)?`${Math.round(e.lower)}–${Math.round(e.upper)}%`:`${Math.round(e.lower)}%`,r8=e=>{let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2?t[n]:(t[n-1]+t[n])/2};function i8(e){let t=N(()=>[...e.scores].sort((e,t)=>Ud(t).lower-Ud(e).lower)),[n,r]=A(),[i,a]=A(`compare`),o=()=>(n()??t().map(e=>e.model)).filter(t=>e.scores.some(e=>e.model===t)).slice(0,Q6),s=()=>o().slice(0,i()===`median`?1:Q6),c=e=>r([e,...o().filter(t=>t!==e)]),l=t=>e.categories.map(e=>Ud(Wd(t,[e.key]))),u=N(()=>{let t=s().map((t,n)=>{let r=e.scores.find(e=>e.model===t);return{id:t,label:Qd(t),color:Z6[n],values:l(r)}});if(i()!==`median`)return t;let n=e.scores.map(l);return[{id:`median`,label:`Field median`,color:`var(--app-muted)`,dashed:!0,values:e.categories.map((e,t)=>{let r=r8(n.map(e=>e[t].lower));return{lower:r,upper:r,coverage:100}})},...t]}),d=(e,t)=>{let n=o();r(t?[...n.filter(t=>t!==e),e].slice(-Q6):n.filter(t=>t!==e))},f=t=>-Math.PI/2+2*Math.PI*t/e.categories.length,p=(e,t,n=0)=>{let r=$6.radius*Math.max(0,Math.min(100,t))/100+n;return[$6.width/2+Math.cos(f(e))*r,$6.height/2+Math.sin(f(e))*r]},m=e=>e.map((e,t)=>p(t,e).join(`,`)).join(` `),h=e=>{let t=Math.cos(f(e));return Math.abs(t)<.25?`middle`:t>0?`start`:`end`},g=e=>{let t=Math.sin(f(e)),n=p(e,100,$6.labelGap)[1];return t<-.25?n-14:t>.25?n+4:n-6};return(()=>{var n=R6(),r=n.firstChild,o=r.firstChild,l=o.nextSibling,f=l.firstChild.nextSibling;f.nextSibling;var _=r.nextSibling,v=_.firstChild;return q(o,z(Po,{size:`small`,get variant(){return i()===`compare`?`neutral`:`ghost-muted`},get"aria-pressed"(){return i()===`compare`},onClick:()=>a(`compare`),children:`Compare models`}),null),q(o,z(Po,{size:`small`,get variant(){return i()===`median`?`neutral`:`ghost-muted`},get"aria-pressed"(){return i()===`median`},onClick:()=>a(`median`),children:`Model vs field median`}),null),q(r,z(U,{get when(){return e.categories.length>=3},get fallback(){return(()=>{var t=z6();return t.firstChild,q(t,z(H,{get each(){return e.categories},children:(e,t)=>(()=>{var n=B6(),r=n.firstChild;return q(r,()=>e.name),q(n,z(H,{get each(){return u()},children:n=>(()=>{var r=V6(),i=r.firstChild,a=i.nextSibling;return q(a,()=>t8(n.values[t()])),j(a=>{var o=`${n.label} · ${e.name}: ${t8(n.values[t()])}`,s=`${n.values[t()].lower}%`,c=n.color;return o!==a.e&&K(r,`title`,a.e=o),s!==a.t&&mt(i,`width`,a.t=s),c!==a.a&&mt(i,`background`,a.a=c),a},{e:void 0,t:void 0,a:void 0}),r})()}),null),n})()}),null),t})()},get children(){var t=L6();return q(t,z(H,{each:[25,50,75,100],children:t=>(()=>{var n=H6();return j(()=>K(n,`points`,m(e.categories.map(()=>t)))),n})()}),null),q(t,z(H,{each:[50,100],children:e=>{let[t,n]=p(0,e);return(()=>{var r=U6();return K(r,`x`,t+5),K(r,`y`,n+11),q(r,e),r})()}}),null),q(t,z(H,{get each(){return e.categories},children:(e,t)=>{let n=()=>p(t(),100),r=()=>[p(t(),100,$6.labelGap)[0],g(t())],i=e.criteria<3;return(()=>{var a=W6(),o=a.firstChild,s=o.nextSibling,c=s.firstChild;return o.classList.toggle(`low`,!!i),q(s,()=>e.name,c),c.classList.toggle(`low`,!!i),q(c,()=>F6(e.criteria)),j(e=>{var i=$6.width/2,a=$6.height/2,l=n()[0],u=n()[1],d=r()[0],f=r()[1],p=h(t()),m=r()[0],g=h(t());return i!==e.e&&K(o,`x1`,e.e=i),a!==e.t&&K(o,`y1`,e.t=a),l!==e.a&&K(o,`x2`,e.a=l),u!==e.o&&K(o,`y2`,e.o=u),d!==e.i&&K(s,`x`,e.i=d),f!==e.n&&K(s,`y`,e.n=f),p!==e.s&&K(s,`text-anchor`,e.s=p),m!==e.h&&K(c,`x`,e.h=m),g!==e.r&&K(c,`text-anchor`,e.r=g),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0}),a})()}}),null),q(t,z(H,{get each(){return u()},children:t=>(()=>{var n=K6(),r=n.firstChild;return q(n,z(U,{get when(){return t.values.some(e=>e.upper>e.lower+1e-6)},get children(){var e=G6();return j(()=>K(e,`points`,m(t.values.map(e=>e.upper)))),e}}),r),q(n,z(H,{get each(){return t.values},children:(n,r)=>{let[i,a]=p(r(),n.lower);return(()=>{var o=q6(),s=o.firstChild;return K(o,`cx`,i),K(o,`cy`,a),q(s,()=>`${t.label} · ${e.categories[r()].name}: ${t8(n)}`),o})()}}),null),j(e=>{var i=t.color,a=!!t.dashed,o=m(t.values.map(e=>e.lower));return i!==e.e&&mt(n,`--series`,e.e=i),a!==e.t&&r.classList.toggle(`dashed`,e.t=a),o!==e.a&&K(r,`points`,e.a=o),e},{e:void 0,t:void 0,a:void 0}),n})()}),null),j(e=>{var n=`0 0 ${$6.width} ${$6.height}`,r=`Category scores for ${u().map(e=>e.label).join(`, `)}`;return n!==e.e&&K(t,`viewBox`,e.e=n),r!==e.t&&K(t,`aria-label`,e.t=r),e},{e:void 0,t:void 0}),t}}),l),q(l,3,f),q(v,()=>i()===`median`?`Pick a model`:`Pick up to ${Q6} models`),q(_,z(H,{get each(){return t()},children:e=>{let t=()=>s().indexOf(e.model);return(()=>{var n=X6(),r=n.firstChild;return q(n,z(a6,{get checked(){return t()>=0},onChange:t=>i()===`median`?t&&c(e.model):d(e.model,t),get children(){return[(()=>{var e=J6();return j(n=>mt(e,`background`,t()>=0?Z6[i()===`median`?0:t()]:`transparent`)),e})(),(()=>{var t=Y6(),n=t.firstChild;return q(t,()=>Qd(e.model),n),q(n,()=>ef(e.model)),t})()]}}),r),q(r,()=>n8(Ud(e))),j(()=>K(r,`title`,t8(Ud(e)))),n})()}}),null),n})()}var a8=G(`<button class=category-sort>`),o8=G(`<div class=category-matrix-scroll><table class=category-matrix><thead><tr><th scope=col>Model</th><th scope=col></th></tr></thead><tbody>`),s8=G(`<th scope=col><small>`),c8=G(`<tr><th scope=row><span class=model-identity><span class=provider-mark></span><span><strong></strong><small></small></span></span></th><td class="category-cell overall"><span>`),l8=G(`<td class=category-cell><button>`),u8=``,d8=e=>e.upper-e.lower>1e-6?`${rf(e.lower)}–${rf(e.upper)}`:rf(e.lower);function f8(e){let[t,n]=A(u8),r=N(()=>e.scores.map(t=>({score:t,overall:Ud(t),categories:new Map(e.categories.map(e=>[e.key,Ud(Wd(t,[e.key]))]))}))),i=(e,t)=>t===u8?e.overall:e.categories.get(t),a=()=>[...r()].sort((e,n)=>i(n,t()).lower-i(e,t()).lower),o=(e,r)=>(()=>{var i=a8();return i.$$click=()=>n(e),q(i,r),j(n=>{var r=t()===e,a=t()===e?`descending`:void 0;return r!==n.e&&i.classList.toggle(`active`,n.e=r),a!==n.t&&K(i,`aria-sort`,n.t=a),n},{e:void 0,t:void 0}),i})();return(()=>{var t=o8(),n=t.firstChild.firstChild,r=n.firstChild,i=r.firstChild.nextSibling,s=n.nextSibling;return q(i,()=>o(u8,`Score`)),q(r,z(H,{get each(){return e.categories},children:e=>(()=>{var t=s8(),n=t.firstChild;return q(t,()=>o(e.key,e.name),n),q(n,()=>F6(e.criteria)),j(r=>{var i=`${F6(e.criteria)} in ${e.evals} eval${e.evals===1?``:`s`}${e.criteria<3?` · low coverage`:``}`,a=e.criteria<3;return i!==r.e&&K(t,`title`,r.e=i),a!==r.t&&n.classList.toggle(`low`,r.t=a),r},{e:void 0,t:void 0}),t})()}),null),q(s,z(H,{get each(){return a()},children:t=>(()=>{var n=c8(),r=n.firstChild,i=r.firstChild.firstChild,a=i.nextSibling.firstChild,o=a.nextSibling,s=r.nextSibling.firstChild;return q(i,z(Fd,{get id(){return $d(t.score.model)}})),q(a,()=>Qd(t.score.model)),q(o,()=>ef(t.score.model)),q(s,()=>d8(t.overall)),q(n,z(H,{get each(){return e.categories},children:n=>{let r=()=>t.categories.get(n.key);return(()=>{var i=l8(),a=i.firstChild;return a.$$click=()=>e.onCategory?.(n.key),q(a,()=>d8(r())),j(o=>{var s=r().upper>r().lower+1e-6,c=`${r().lower}%`,l=!e.onCategory,u=`${Qd(t.score.model)}, ${n.name}: ${d8(r())}%${e.onCategory?`, show ranking`:``}`;return s!==o.e&&i.classList.toggle(`range`,o.e=s),c!==o.t&&mt(i,`--score`,o.t=c),l!==o.a&&(a.disabled=o.a=l),u!==o.o&&K(a,`aria-label`,o.o=u),o},{e:void 0,t:void 0,a:void 0,o:void 0}),i})()}}),null),n})()})),t})()}st([`click`]);var p8={width:1600,height:900},m8=e=>{let t=document.createElement(`span`);t.style.color=`var(${e})`,t.hidden=!0,document.body.append(t);let n=getComputedStyle(t).color;return t.remove(),n},h8=async(e,t)=>{let n=document.createElement(`div`);n.hidden=!0,document.body.append(n);let r=ot(()=>z(H,{each:e,children:e=>z(Fd,{id:e})}),n),i=new Map;try{return await Promise.all([...n.querySelectorAll(`use`)].map(async e=>{let n=new URL(e.getAttribute(`href`),location.href),r=n.hash.slice(1);n.hash=``,i.has(n.href)||i.set(n.href,fetch(n).then(async e=>{if(!e.ok)throw Error(`Could not load model icons`);return new DOMParser().parseFromString(await e.text(),`image/svg+xml`)}));let a=(await i.get(n.href)).getElementById(r);if(!a)throw Error(`Missing model icon: ${r}`);let o=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);o.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),o.setAttribute(`viewBox`,a.getAttribute(`viewBox`)??`0 0 40 40`),o.setAttribute(`width`,`128`),o.setAttribute(`height`,`128`),o.setAttribute(`color`,t);for(let e of a.childNodes)o.append(e.cloneNode(!0));let s=URL.createObjectURL(new Blob([new XMLSerializer().serializeToString(o)],{type:`image/svg+xml`}));try{let e=new Image;return e.src=s,await e.decode(),e}finally{URL.revokeObjectURL(s)}}))}finally{r(),n.remove()}};async function g8(e){if(!e.scores.length)throw Error(`No model totals to export`);await document.fonts.load(`600 84px Inter`),await document.fonts.load(`440 24px Inter`);let t=e.scores.map(e=>({...e,percentage:typeof e.percentage==`number`&&Number.isFinite(e.percentage)&&e.percentage>=0&&e.percentage<=100?e.percentage:null})).sort((e,t)=>Ud(t).lower-Ud(e).lower),n={background:m8(`--app-bg`),text:m8(`--app-text`),muted:m8(`--app-muted`),border:m8(`--app-border`),bar:m8(`--app-success`)},r=[...new Set(t.map(e=>$d(e.model)))],i=await h8(r,n.text),a=document.createElement(`canvas`);a.width=p8.width,a.height=p8.height;let o=a.getContext(`2d`);if(!o)throw Error(`Image export is unavailable in this browser`);o.fillStyle=n.background,o.fillRect(0,0,a.width,a.height),o.textBaseline=`alphabetic`;let s=(e,t,n,r,i,a,s=600,c=`left`)=>{o.font=`${s} ${r}px Inter, sans-serif`;let l=o.measureText(e).width;l>i&&(o.font=`${s} ${r*i/l}px Inter, sans-serif`),o.fillStyle=a,o.textAlign=c,o.fillText(e,t,n)};s(e.name,40,99,82,1520,n.text);let c=(a.height-145-24)/t.length;return t.forEach((e,t)=>{let a=Ud(e),l=145+c*t,u=l+c/2,d=Math.min(72,c*.62),f=Math.min(44,c*.37),p=Math.min(88,c*.76);o.strokeStyle=n.border,o.lineWidth=1,o.beginPath(),o.moveTo(40,l),o.lineTo(1560,l),o.stroke(),o.drawImage(i[r.indexOf($d(e.model))],36,u-d/2,d,d),s(Qd(e.model),132,u-1,f,520,n.text),s(ef(e.model),134,u+Math.min(30,c*.26),Math.min(25,c*.22),510,n.muted,440);let m=Math.min(32,c*.28);if(a.lower>0&&(o.fillStyle=n.bar,o.fillRect(700,u-m/2,510*a.lower/100,m)),a.upper>a.lower+1e-6){let e=700+510*a.lower/100,t=700+510*a.upper/100;o.strokeStyle=n.muted,o.lineWidth=2,o.beginPath(),o.moveTo(e,u),o.lineTo(t,u),o.stroke(),o.lineWidth=3,o.beginPath(),o.moveTo(Math.round(t)+.5,u-10),o.lineTo(Math.round(t)+.5,u+10),o.stroke()}let h=a.upper>a.lower+1e-6?`${rf(a.lower)}–${rf(a.upper)}%`:`${rf(a.lower)}%`;s(h,1560,u+p*.34,p,310,e.percentage===null?n.muted:n.text,600,`right`)}),new Promise((e,t)=>a.toBlob(n=>n?e(n):t(Error(`Could not encode the PNG`)),`image/png`))}async function _8(e,t){let n=await g8(e),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`${e.name.replace(/[^a-zA-Z0-9_.-]/g,`-`)}-${t.slice(0,10)}-results.png`,document.body.append(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(r),1e3)}var v8=G(`<button class=history-item><div><span></span><strong></strong></div><small><span> models`),y8=G(`<button class=activity-link><span>Currently running`),b8=G(`<p class=sidebar-empty>No benchmark runs yet.`),x8=G(`<div class=error-banner role=alert>`),S8=G(`<div class=error-banner>`),C8=G(`<div class=app-shell><header class=app-titlebar><div class=app-brand><strong>OpenEval</strong><span class=titlebar-divider></span> <span>Results</span></div><div class=titlebar-actions></div></header><aside class=sidebar><div class=sidebar-heading><span>RUN HISTORY</span></div><div class=history-scroll><div class=history-group><span class=group-label>Benchmark runs</span></div></div><div class=sidebar-footer><span></span></div></aside><main class=main-panel>`),w8=G(`<div class=eval-selector><span id=eval-label>Evaluation`),T8=G(`<section class=chart-panel><div class=panel-heading><div><h2>Category profile</h2><p>Each axis rescores only that category's criteria, weighting evals equally.`),E8=G(`<section class=chart-panel><div class=panel-heading><div><h2>Models × categories</h2><p>Sort by any column. Select a score to rank models in that category.`),D8=G(`<div class=category-chips aria-label="Category filter">`),O8=G(`<p class=category-scope>Scores use <!> of <!> criteria.`),k8=G(`<div class=run-facts><div><span>Models</span><strong></strong></div><div><span>Evaluations</span><strong></strong></div><div><span>Scored checks</span><strong> <small>/ </small></strong></div><div><span></span><strong></strong></div><div><span></span><strong>`),A8=G(`<div class=pending-note><p>`),j8=G(`<p class=section-caption>Opening eval run…`),M8=G(`<div class=results-page><div class=page-heading><div><div class=breadcrumb></div><h1></h1><p><span>·</span></p></div><div class=results-actions></div></div><div class=results-toolbar><div class=toolbar-filters></div></div><section class=chart-panel><div class=panel-heading><div><h2>`),N8=G(`<div class=empty-state><h1></h1><p>Run a benchmark, then its model comparisons will appear here.`),P8=G(`<div class=empty-state>Loading eval run…`),F8=G(`<div class=model-filter-empty><p>No models match these filters.`),I8=G(`<span class=category-chip>`),L8=()=>{if(history.state?.openevalRoute)return{categories:``,...history.state.openevalRoute};let e=new URLSearchParams(location.search);return{id:e.get(`result`)??``,view:e.get(`view`)===`trace`?e.get(`eval`)?`evals`:`results`:[`evals`,`categories`,`activity`].includes(e.get(`view`)??``)?e.get(`view`):`results`,eval:e.get(`eval`)??``,run:e.get(`run`)??``,evalRun:e.get(`evalRun`)??``,stage:e.get(`stage`)===`judge`?`judge`:`eval`,models:e.get(`models`)??``,categories:e.get(`categories`)??``}},R8=async e=>{let t=await fetch(e);if(!t.ok)throw Error((await t.json().catch(()=>({}))).error??`Request failed (${t.status})`);return t.json()},z8=new Map,B8=new Map,V8=(e,t,n=0)=>{let r=`${e}:${t}`,i=z8.get(r);if(i&&i.entry.updatedAt>=n)return i;let a=B8.get(r);if(a)return a;let o=R8(`/api/result?id=${encodeURIComponent(e)}&format=${t}`).then(e=>(z8.delete(r),z8.set(r,e),z8.size>8&&z8.delete(z8.keys().next().value),e)).finally(()=>B8.delete(r));return B8.set(r,o),o};function H8(e){let t=!1;return oe(()=>{queueMicrotask(()=>{t=!0})}),z(Mu,{variant:`pill`,get value(){return e.value},class:`level-tabs`,onChange:n=>{t&&[`results`,`evals`,`categories`].includes(e.value)&&n!==e.value&&e.onChange(n)},get children(){return z(Mu.List,{get children(){return[z(Mu.Trigger,{value:`results`,children:`Benchmark results`}),z(Mu.Trigger,{value:`evals`,children:`Eval breakdown`}),z(U,{get when(){return e.categories},get children(){return z(Mu.Trigger,{value:`categories`,children:`Categories`})}})]}})}})}function U8(){let e=Rr(),[t,n]=A(L8()),[r,i]=A(``),[a,o]=A(!1),[s,c]=A(``),[l,u]=A(!1),[d,f]=A(Date.now());oe(()=>{let e=setInterval(()=>f(Date.now()),1e3);F(()=>clearInterval(e))});let[p,m]=A(!1),[h,g]=re(()=>R8(`/api/results`)),_=()=>h()?.public??!1,[v,y]=re(()=>h()&&!h().public,()=>R8(`/api/activity`)),b=e=>h()?.entries.find(t=>t.id===e.split(`~`)[0])?.updatedAt,x=e=>V8(e,`runs`,b(e)),S=()=>t().view!==`activity`&&!!t().run&&!!t().evalRun&&!_()&&!r4(),[C]=re(()=>!!t().id&&{id:t().id,version:b(t().id)},({id:e,version:t})=>V8(e,`summary`,t)),[w]=re(()=>S()&&!!t().run&&{id:t().run,version:b(t().run)},({id:e,version:t})=>V8(e,`runs`,t)),T=N(()=>C()?.overview);M(()=>Xd(T()?.modelNames));let E=()=>w()?.entry.id===t().run?w():void 0,D=N(()=>T()?.categories??[]),O=N(()=>t().categories.split(`,`).filter(e=>D().some(t=>t.key===e))),k=N(()=>O().length?D().filter(e=>O().includes(e.key)):D()),ee=N(()=>(T()?.evals??[]).filter(e=>!O().length||T().scores[0]?.components.some(t=>t.eval===e&&Vd(t,O())))),te=N(()=>ee().includes(t().eval)?t().eval:ee()[0]||t().eval||T()?.evals[0]||``);M(()=>{T()&&t().view===`categories`&&!D().length&&ne({view:`results`},!0)});let ne=(e,r=!1)=>{let i={...t(),...e};n(i);let a=new URLSearchParams;for(let[e,t]of Object.entries({result:r4()?i.id.split(`~`)[0]:i.id,view:i.view===`results`?``:i.view,eval:r4()?``:i.eval,run:r4()?``:i.run,evalRun:r4()?``:i.evalRun,stage:!r4()&&i.evalRun&&i.stage===`judge`?`judge`:``,models:i.models,categories:i.categories}))t&&a.set(e,t);history[r?`replaceState`:`pushState`]({openevalRoute:i},``,`?`+a.toString()),c(``)};M(ae(r4,e=>{try{localStorage.setItem(n4,String(e))}catch{}ne(e?{run:``,evalRun:``}:{},!0)}));let ie=e=>{ne({id:e.id,view:`results`,eval:``,run:``,evalRun:``}),o(!1)},P=()=>ne({run:``,evalRun:``});M(()=>{let e=h()?.entries;if(e?.length&&!e.some(e=>e.id===t().id.split(`~`)[0])){let t=e.find(e=>e.kind===`benchmark`)??e[0];ne({id:t.id,run:``,evalRun:``},!0)}_()&&t().view!==`results`&&ne({view:`results`,eval:``,run:``,evalRun:``},!0)}),oe(()=>{e.setTheme(`oc-2`),e.setColorScheme(`dark`);let t=()=>{let e=L8();r4()?ne({...e,run:``,evalRun:``},!0):n(e)};window.addEventListener(`popstate`,t);let r=()=>{h.loading||g.refetch(),h()&&!h().public&&!v.loading&&y.refetch()},i=new EventSource(`/api/events`);i.addEventListener(`change`,r);let a=setInterval(r,5e3);F(()=>{i.close(),clearInterval(a),window.removeEventListener(`popstate`,t)})});let se=e=>h()?.entries.filter(t=>t.kind===e&&`${t.name} ${t.startedAt}`.toLowerCase().includes(r().toLowerCase()))??[],ce=N(()=>t().models.split(`,`).filter(Boolean)),le=()=>R().reduce((e,t)=>e+t.components.reduce((e,t)=>e+t.scored,0),0)??0,ue=()=>R().reduce((e,t)=>e+t.components.reduce((e,t)=>e+t.expected,0),0),de=()=>{let e=t().view===`evals`?C()?.related.find(e=>e.eval===te())?.runtime:T()?.runtime,n=e?Ld(e,zd(d(),C()?.entry.updatedAt,T()?.status===`running`)):void 0;return n===void 0?`—`:cf(n)},fe=()=>{let e=t().view===`evals`?T()?.evalCosts?.[te()]:T()?.cost;return e?.usd??(T()?.status===`running`?e?.reportedUSD:void 0)},I=N(()=>T()?.scores.map(e=>{let t=e.components.filter(e=>e.eval===te()&&(!O().length||Vd(e,O())));return Hd(e.model,t)})??[]),L=N(()=>(T()?.scores??[]).map(e=>O().length?Wd(e,O()):e)),R=N(()=>(t().view===`evals`?I():L()).filter(e=>nf(e.model,ce()))),pe=()=>R()[0]?.components.length??0,me=()=>(T()?.scores[0]?.components??[]).filter(e=>t().view!==`evals`||e.eval===te()).length,he=async e=>{let n=t(),r=C();if(!(!r||_()||r4())){u(!0);try{let i=r.entry.kind===`eval`?r.entry.id:r.related.find(e=>e.eval===te())?.id;if(!i)throw Error(`This eval has not saved its results yet.`);let a=x(i),o=a instanceof Promise?await a:a;if(t()!==n||r4())return;let s=o.runs.find(t=>t.model===e.split(`#`)[0]&&t.reasoning===(e.split(`#`)[1]??`default`));if(!s)throw Error(`No saved eval run for this model yet.`);ne({run:i,evalRun:s.id,eval:o.eval})}catch(e){c(e instanceof Error?e.message:String(e))}finally{u(!1)}}},ge=()=>{let e=T();if(!e)return;let t=new Blob([JSON.stringify({benchmark:r4()&&e.kind===`eval`?`Evaluation results`:e.name,startedAt:e.startedAt,filters:ce(),categories:k().filter(e=>O().includes(e.key)).map(e=>e.name),scores:R().map(e=>({model:e.model,percentage:e.percentage,bounds:Ud(e)}))},null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=window.document.createElement(`a`);r.href=n,r.download=`${r4()&&e.kind===`eval`?`evaluation`:e.name}-totals.json`,r.click(),URL.revokeObjectURL(n)},_e=async()=>{let e=T();if(e&&!p()){m(!0);try{await _8({name:r4()&&(t().view===`evals`||e.kind===`eval`)?`Evaluation results`:t().view===`evals`?te():e.name,scores:R().map(e=>({model:e.model,percentage:e.percentage,bounds:Ud(e)}))},e.startedAt)}catch(e){c(e instanceof Error?e.message:String(e))}finally{m(!1)}}},ve=e=>(()=>{var n=v8(),r=n.firstChild,i=r.firstChild,a=i.nextSibling,o=r.nextSibling,s=o.firstChild,c=s.firstChild;return n.$$click=()=>ie(e.item),q(a,z(o4,{get sensitive(){return e.item.kind===`eval`},get children(){return e.item.name}})),q(o,()=>sf(e.item.startedAt),s),q(s,()=>e.item.models,c),j(r=>{var a=t().view!==`activity`&&t().id===e.item.id,o=t().view!==`activity`&&t().id===e.item.id?`page`:void 0,s=`status-dot ${e.item.status}`;return a!==r.e&&n.classList.toggle(`active`,r.e=a),o!==r.t&&K(n,`aria-current`,r.t=o),s!==r.a&&ut(i,r.a=s),r},{e:void 0,t:void 0,a:void 0}),n})();return(()=>{var e=C8(),n=e.firstChild,c=n.firstChild,u=c.firstChild,d=c.nextSibling,f=n.nextSibling,m=f.firstChild;m.firstChild;var g=m.nextSibling,y=g.firstChild;y.firstChild;var b=g.nextSibling,x=b.firstChild,w=f.nextSibling;return q(c,z(Po,{size:`small`,variant:`ghost`,icon:`menu`,class:`mobile-menu`,"aria-label":`Toggle run history`,onClick:()=>o(!a())}),u),q(c,z(No,{name:`flask`}),u),q(d,z(a4,{})),q(f,z(U,{get when(){return W(()=>!!h())()&&!_()},get children(){var e=y8(),n=e.firstChild;return e.$$click=()=>{ne({view:`activity`,run:``,evalRun:``}),o(!1)},q(e,z(No,{name:`flask`}),n),q(e,z(Io,{get children(){return v()?.reduce((e,t)=>e+t.state.runs.reduce((e,t)=>e+ +(t.eval.status===`in_progress`)+ +(t.judge.status===`in_progress`),0),0)??0}}),null),j(n=>{var r=t().view===`activity`,i=t().view===`activity`?`page`:void 0;return r!==n.e&&e.classList.toggle(`active`,n.e=r),i!==n.t&&K(e,`aria-current`,n.t=i),n},{e:void 0,t:void 0}),e}}),m),q(m,z(Io,{get children(){return se(`benchmark`).length}}),null),q(f,z(Pl,{"aria-label":`Filter runs`,placeholder:`Find a run…`,get value(){return r()},onInput:e=>i(e.currentTarget.value),get leadingIcon(){return z(No,{name:`magnifying-glass`})}}),g),q(y,z(H,{get each(){return se(`benchmark`)},children:e=>z(ve,{item:e})}),null),q(y,z(U,{get when(){return!se(`benchmark`).length},get children(){return b8()}}),null),q(b,z(No,{name:`folder`}),x),q(x,()=>_()?`Totals only`:`Local results`),q(w,z(U,{get when(){return h.error||C.error},get children(){var e=x8();return q(e,(()=>{var e=W(()=>!!r4());return()=>e()?`Could not load results.`:String(h.error??C.error)})()),e}}),null),q(w,z(U,{get when(){return s()},get children(){var e=x8();return q(e,(()=>{var e=W(()=>!!r4());return()=>e()?`The requested operation could not be completed.`:s()})()),e}}),null),q(w,z(U,{get when(){return W(()=>t().view===`activity`)()&&!_()},get fallback(){return z(U,{get when(){return T()},get fallback(){return(()=>{var e=N8(),t=e.firstChild;return q(e,z(No,{name:`flask`}),t),q(t,()=>h.loading?`Loading results…`:`Your results start here`),e})()},get children(){return[z(U,{get when(){return S()},get children(){return z(U,{get when(){return E()},get fallback(){return P8()},children:e=>{let n=()=>e().runs.find(e=>e.id===t().evalRun);return z(U,{get when(){return n()},children:t=>z(a3,{open:!0,title:`Eval run session`,onClose:P,get children(){return z(r3,{get run(){return e()},get selected(){return t()},onRun:e=>ne({evalRun:e}),onBack:P})}})})}})}}),(()=>{var e=M8(),n=e.firstChild,r=n.firstChild,i=r.firstChild,a=i.nextSibling,o=a.nextSibling,s=o.firstChild,c=r.nextSibling,u=n.nextSibling,d=u.firstChild,f=u.nextSibling,m=f.firstChild.firstChild,h=m.firstChild;return q(i,()=>T().kind===`benchmark`?`Benchmarks`:`Eval results`,null),q(i,z(No,{name:`chevron-right`}),null),q(i,z(o4,{get sensitive(){return T().kind===`eval`},get children(){return T().name}}),null),q(a,z(o4,{get sensitive(){return T().kind===`eval`},get children(){return T().name}})),q(o,()=>sf(T().startedAt),s),q(o,z(Io,{get children(){return T().status}}),null),q(c,z(U,{get when(){return T().kind===`benchmark`},get children(){return z(Sl,{get value(){return p()?`Exporting image…`:`Export image`},get children(){return z(Lo,{variant:`neutral`,size:`small`,get icon(){return z(No,{name:`photo`})},"aria-label":`Export image`,get"aria-busy"(){return p()},onClick:_e,get disabled(){return p()||!T().scores.length}})}})}}),null),q(c,z(Sl,{value:`Export totals`,get children(){return z(Lo,{variant:`neutral`,size:`small`,get icon(){return z(No,{name:`download`})},"aria-label":`Export totals`,onClick:ge})}}),null),q(u,z(U,{get when(){return W(()=>!_())()&&T().kind===`benchmark`},get children(){return z(H8,{get value(){return t().view},get categories(){return D().length>0},onChange:e=>ne({view:e,eval:te()})})}}),d),q(d,z(U,{get when(){return D().length},get children(){return z(I6,{get categories(){return D()},get selected(){return O()},onChange:e=>ne({categories:e.join(`,`)})})}}),null),q(d,z(O6,{get models(){return T().scores.map(e=>e.model)},get selected(){return ce()},onChange:e=>ne({models:e.join(`,`)})}),null),q(e,z(U,{get when(){return W(()=>t().view===`evals`)()&&!_()},get children(){var e=w8();return e.firstChild,q(e,z(jd,{"aria-labelledby":`eval-label`,get options(){return ee()},get current(){return te()},get valueClass(){return r4()?`eval-name is-secret`:`eval-name`},label:e=>r4()?`Eval ${T().evals.indexOf(e)+1}`:T()?.evalNames?.[e]??e,onSelect:e=>{e&&ne({eval:e})},children:e=>z(o4,{get children(){return T()?.evalNames?.[e]??e}})}),null),e}}),f),q(e,z(U,{get when(){return W(()=>t().view===`categories`)()&&!_()},get children(){return[(()=>{var e=T8();return e.firstChild,q(e,z(U,{get when(){return R().length},get fallback(){return F8()},get children(){return z(i8,{get categories(){return k()},get scores(){return R()}})}}),null),e})(),(()=>{var e=E8();return e.firstChild,q(e,z(f8,{get categories(){return k()},get scores(){return R()},onCategory:e=>ne({view:`results`,categories:e})}),null),e})()]}}),f),q(h,z(o4,{get sensitive(){return t().view===`evals`||T().kind===`eval`},get children(){return W(()=>!(t().view!==`evals`||_()))()?T()?.evalNames?.[te()]??te():T().name}})),q(m,z(U,{get when(){return O().length},get children(){return[(()=>{var e=D8();return q(e,z(H,{get each(){return k()},children:e=>(()=>{var t=I8();return q(t,()=>e.name),t})()})),e})(),(()=>{var e=O8(),t=e.firstChild.nextSibling,n=t.nextSibling.nextSibling;return n.nextSibling,q(e,pe,t),q(e,me,n),e})()]}}),null),q(f,z(U,{get when(){return R().length},get fallback(){return(()=>{var e=F8();return e.firstChild,q(e,z(Po,{size:`small`,variant:`outline`,onClick:()=>ne({models:``}),children:`Clear filters`}),null),e})()},get children(){return z(xf,{get scores(){return R()},get public(){return _()},get incomplete(){return T().status!==`running`},get criteria(){return W(()=>t().view===`evals`||T().kind===`eval`)()&&!r4()},get onSelect(){return!_()&&!r4()&&(t().view===`evals`||T().kind===`eval`)?he:void 0}})}}),null),q(e,z(U,{get when(){return!_()},get children(){var e=k8(),n=e.firstChild,r=n.firstChild.nextSibling,i=n.nextSibling,a=i.firstChild.nextSibling,o=i.nextSibling,s=o.firstChild.nextSibling,c=s.firstChild,l=c.nextSibling;l.firstChild;var u=o.nextSibling,d=u.firstChild,f=d.nextSibling,p=u.nextSibling.firstChild,m=p.nextSibling;return q(r,()=>R().length),q(a,(()=>{var e=W(()=>t().view===`evals`);return()=>e()?1:T().evals.length})()),q(s,le,c),q(l,ue,null),q(d,()=>ce().length?`Run duration`:`Duration`),q(f,de),q(p,()=>ce().length?`Run cost`:`Cost`),q(m,()=>of(fe())),e}}),null),q(e,z(U,{get when(){return R().some(e=>e.percentage===null)},get children(){var e=A8(),t=e.firstChild;return q(e,z(No,{name:`info`}),t),q(t,()=>T().status===`running`?`Solid bars show earned points. Whiskers show the possible range for unresolved checks.`:`Whiskers show the possible range for unscored checks; graded failures remain known zeros.`),e}}),null),q(e,z(U,{get when(){return l()},get children(){return j8()}}),null),j(()=>f.classList.toggle(`hidden`,!(t().view!==`categories`||_()))),e})()]}})},get children(){return[z(U,{get when(){return v.error},get children(){var e=S8();return q(e,(()=>{var e=W(()=>!!r4());return()=>e()?`Could not load activity.`:String(v.error)})()),e}}),z(W3,{get runs(){return v()??[]},get run(){return t().run},get evalRun(){return t().evalRun},get stage(){return t().stage},onSelect:(e,t,n=`eval`)=>{(!r4()||!t)&&ne({view:`activity`,run:e,evalRun:t,stage:n})}})]}}),null),j(()=>f.classList.toggle(`visible`,!!a())),e})()}st([`click`]),ot(()=>z(zr,{defaultTheme:`oc-2`,get children(){return z(xo,{get children(){return z(U8,{})}})}}),document.getElementById(`root`));export{l as i,o as n,s as r,X as t};