@dylanpiercey/work 0.0.13 → 0.0.14

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 (153) hide show
  1. package/dist/index.mjs +3 -3
  2. package/dist/public/assets/{_CJfh1bA_.js → _1PYA5v6h.js} +2 -2
  3. package/dist/public/assets/{_CJfh1bA_.js.map → _1PYA5v6h.js.map} +1 -1
  4. package/dist/public/assets/{_D8DKeNtk2.js → _37DiDfEe2.js} +2 -2
  5. package/dist/public/assets/{_D8DKeNtk2.js.map → _37DiDfEe2.js.map} +1 -1
  6. package/dist/public/assets/{_BtGc54QO.js → _4GBVe70g.js} +2 -2
  7. package/dist/public/assets/{_BtGc54QO.js.map → _4GBVe70g.js.map} +1 -1
  8. package/dist/public/assets/{_DtW-KREB.js → _BDmZKLpT.js} +2 -2
  9. package/dist/public/assets/{_DtW-KREB.js.map → _BDmZKLpT.js.map} +1 -1
  10. package/dist/public/assets/{_CTwY-w6f2.js → _BFL5ebqS2.js} +2 -2
  11. package/dist/public/assets/{_CTwY-w6f2.js.map → _BFL5ebqS2.js.map} +1 -1
  12. package/dist/public/assets/{_BD3GuTLe.js → _BMjt74CT.js} +2 -2
  13. package/dist/public/assets/{_BD3GuTLe.js.map → _BMjt74CT.js.map} +1 -1
  14. package/dist/public/assets/{_CCOa-67I.js → _BS5HCQXD.js} +2 -2
  15. package/dist/public/assets/{_CCOa-67I.js.map → _BS5HCQXD.js.map} +1 -1
  16. package/dist/public/assets/{_vvqUsxvZ.js → _BUYXKQWK.js} +2 -2
  17. package/dist/public/assets/{_vvqUsxvZ.js.map → _BUYXKQWK.js.map} +1 -1
  18. package/dist/public/assets/{_DU_7z2vs.js → _BXjUVBpA.js} +2 -2
  19. package/dist/public/assets/{_DU_7z2vs.js.map → _BXjUVBpA.js.map} +1 -1
  20. package/dist/public/assets/{_GlOqBOcg2.js → _BYe0JdJ12.js} +2 -2
  21. package/dist/public/assets/{_GlOqBOcg2.js.map → _BYe0JdJ12.js.map} +1 -1
  22. package/dist/public/assets/{_BH3qAqXE.js → _BZImyte8.js} +2 -2
  23. package/dist/public/assets/{_BH3qAqXE.js.map → _BZImyte8.js.map} +1 -1
  24. package/dist/public/assets/{_B6OKTJ3U.js → _Bh5KV4D5.js} +2 -2
  25. package/dist/public/assets/{_B6OKTJ3U.js.map → _Bh5KV4D5.js.map} +1 -1
  26. package/dist/public/assets/{_DmaZeTni.js → _BhcPbeCA.js} +2 -2
  27. package/dist/public/assets/{_DmaZeTni.js.map → _BhcPbeCA.js.map} +1 -1
  28. package/dist/public/assets/{_CnphyoYq.js → _BkasMCr7.js} +2 -2
  29. package/dist/public/assets/{_CnphyoYq.js.map → _BkasMCr7.js.map} +1 -1
  30. package/dist/public/assets/{_Dp25UBl7.js → _BlHZ_Kf_.js} +2 -2
  31. package/dist/public/assets/{_Dp25UBl7.js.map → _BlHZ_Kf_.js.map} +1 -1
  32. package/dist/public/assets/{_CCWd2cbl.js → _Brp01NXq.js} +2 -2
  33. package/dist/public/assets/{_CCWd2cbl.js.map → _Brp01NXq.js.map} +1 -1
  34. package/dist/public/assets/{_LLhMP4fB2.js → _BsdChN-o2.js} +2 -2
  35. package/dist/public/assets/{_LLhMP4fB2.js.map → _BsdChN-o2.js.map} +1 -1
  36. package/dist/public/assets/{_Ca6yBPZK2.js → _BtX0OV9L2.js} +2 -2
  37. package/dist/public/assets/{_Ca6yBPZK2.js.map → _BtX0OV9L2.js.map} +1 -1
  38. package/dist/public/assets/{_B8okAqG-.js → _BwfU4p-S.js} +2 -2
  39. package/dist/public/assets/{_B8okAqG-.js.map → _BwfU4p-S.js.map} +1 -1
  40. package/dist/public/assets/{_xHfOHdoE2.js → _ByVrIZCY2.js} +2 -2
  41. package/dist/public/assets/{_xHfOHdoE2.js.map → _ByVrIZCY2.js.map} +1 -1
  42. package/dist/public/assets/{_BCDnEeXi2.js → _Bym_871-2.js} +2 -2
  43. package/dist/public/assets/{_BCDnEeXi2.js.map → _Bym_871-2.js.map} +1 -1
  44. package/dist/public/assets/{__Q8ATTST.js → _C-2JDMwn.js} +2 -2
  45. package/dist/public/assets/{__Q8ATTST.js.map → _C-2JDMwn.js.map} +1 -1
  46. package/dist/public/assets/{_K6YjF5HA2.js → _C36kllbW2.js} +2 -2
  47. package/dist/public/assets/{_K6YjF5HA2.js.map → _C36kllbW2.js.map} +1 -1
  48. package/dist/public/assets/{_CvIA8snX.js → _C3JXJPv9.js} +2 -2
  49. package/dist/public/assets/{_CvIA8snX.js.map → _C3JXJPv9.js.map} +1 -1
  50. package/dist/public/assets/{_BuU3dU-v.js → _CBAwKZ_C.js} +2 -2
  51. package/dist/public/assets/{_BuU3dU-v.js.map → _CBAwKZ_C.js.map} +1 -1
  52. package/dist/public/assets/{_DDtfsPTV.js → _CCYH4Ky0.js} +2 -2
  53. package/dist/public/assets/{_DDtfsPTV.js.map → _CCYH4Ky0.js.map} +1 -1
  54. package/dist/public/assets/{_9XtunSg7.js → _CGKi9mEa.js} +2 -2
  55. package/dist/public/assets/{_9XtunSg7.js.map → _CGKi9mEa.js.map} +1 -1
  56. package/dist/public/assets/{_speyknRe2.js → _CNm-Qj_22.js} +2 -2
  57. package/dist/public/assets/{_speyknRe2.js.map → _CNm-Qj_22.js.map} +1 -1
  58. package/dist/public/assets/{_rdXXJ91o.js → _CYGmgYex.js} +2 -2
  59. package/dist/public/assets/{_rdXXJ91o.js.map → _CYGmgYex.js.map} +1 -1
  60. package/dist/public/assets/{_BLA94hyL.js → _C_HKi7R3.js} +2 -2
  61. package/dist/public/assets/{_BLA94hyL.js.map → _C_HKi7R3.js.map} +1 -1
  62. package/dist/public/assets/{_CxVlY1q1.js → _Cbd9gTf8.js} +2 -2
  63. package/dist/public/assets/{_CxVlY1q1.js.map → _Cbd9gTf8.js.map} +1 -1
  64. package/dist/public/assets/{_DrB0wHeE.js → _CcY_fkdX.js} +2 -2
  65. package/dist/public/assets/{_DrB0wHeE.js.map → _CcY_fkdX.js.map} +1 -1
  66. package/dist/public/assets/{_CNPd6AKz2.js → _CccTxCW92.js} +2 -2
  67. package/dist/public/assets/{_CNPd6AKz2.js.map → _CccTxCW92.js.map} +1 -1
  68. package/dist/public/assets/{_Cm86uuyb.js → _CcuBmBFx.js} +2 -2
  69. package/dist/public/assets/{_Cm86uuyb.js.map → _CcuBmBFx.js.map} +1 -1
  70. package/dist/public/assets/{_DH0HY4Nr.js → _Ce1AxkTQ.js} +2 -2
  71. package/dist/public/assets/{_DH0HY4Nr.js.map → _Ce1AxkTQ.js.map} +1 -1
  72. package/dist/public/assets/{_CzGoLHpy.js → _ChmfpmBk.js} +2 -2
  73. package/dist/public/assets/{_CzGoLHpy.js.map → _ChmfpmBk.js.map} +1 -1
  74. package/dist/public/assets/{_BmaVzQYH2.js → _Ci9zG2ie2.js} +2 -2
  75. package/dist/public/assets/{_BmaVzQYH2.js.map → _Ci9zG2ie2.js.map} +1 -1
  76. package/dist/public/assets/{_B7X9man_.js → _ClgMqvJk.js} +2 -2
  77. package/dist/public/assets/{_B7X9man_.js.map → _ClgMqvJk.js.map} +1 -1
  78. package/dist/public/assets/{_CvPUh_B0.js → _Cs6eIEq5.js} +2 -2
  79. package/dist/public/assets/{_CvPUh_B0.js.map → _Cs6eIEq5.js.map} +1 -1
  80. package/dist/public/assets/{_BpWV4xDR2.js → _Cv9uSMiO2.js} +2 -2
  81. package/dist/public/assets/{_BpWV4xDR2.js.map → _Cv9uSMiO2.js.map} +1 -1
  82. package/dist/public/assets/{_Ne8qEUH82.js → _D5PUFlIB2.js} +2 -2
  83. package/dist/public/assets/{_Ne8qEUH82.js.map → _D5PUFlIB2.js.map} +1 -1
  84. package/dist/public/assets/{_DQxqrF2p2.js → _D6hErX6k2.js} +2 -2
  85. package/dist/public/assets/{_DQxqrF2p2.js.map → _D6hErX6k2.js.map} +1 -1
  86. package/dist/public/assets/{_CXQQiNs1.js → _D7Nr1Fkx.js} +2 -2
  87. package/dist/public/assets/{_CXQQiNs1.js.map → _D7Nr1Fkx.js.map} +1 -1
  88. package/dist/public/assets/{_DoNipARR.js → _DEubpY7q.js} +2 -2
  89. package/dist/public/assets/{_DoNipARR.js.map → _DEubpY7q.js.map} +1 -1
  90. package/dist/public/assets/{_BOMR_lTT.js → _DG7JD0Wq.js} +2 -2
  91. package/dist/public/assets/{_BOMR_lTT.js.map → _DG7JD0Wq.js.map} +1 -1
  92. package/dist/public/assets/{_Ct7oMGlY2.js → _DGEc5tY92.js} +2 -2
  93. package/dist/public/assets/{_Ct7oMGlY2.js.map → _DGEc5tY92.js.map} +1 -1
  94. package/dist/public/assets/{_B31BFjeo.js → _DHF6f-Qb.js} +2 -2
  95. package/dist/public/assets/{_B31BFjeo.js.map → _DHF6f-Qb.js.map} +1 -1
  96. package/dist/public/assets/{_CypNdMTQ.js → _DIqHX5oS.js} +2 -2
  97. package/dist/public/assets/{_CypNdMTQ.js.map → _DIqHX5oS.js.map} +1 -1
  98. package/dist/public/assets/{_CLa87tfT.js → _DLfg1G6i.js} +2 -2
  99. package/dist/public/assets/{_CLa87tfT.js.map → _DLfg1G6i.js.map} +1 -1
  100. package/dist/public/assets/{_Cs2xR5zT.js → _DOlpOlzZ.js} +2 -2
  101. package/dist/public/assets/{_Cs2xR5zT.js.map → _DOlpOlzZ.js.map} +1 -1
  102. package/dist/public/assets/{_v0CL1jTB.js → _DQ9zeCqC.js} +2 -2
  103. package/dist/public/assets/{_v0CL1jTB.js.map → _DQ9zeCqC.js.map} +1 -1
  104. package/dist/public/assets/{_Gpz7cA9P.js → _DR5ZG0w3.js} +2 -2
  105. package/dist/public/assets/{_Gpz7cA9P.js.map → _DR5ZG0w3.js.map} +1 -1
  106. package/dist/public/assets/{_B4U6RXlg.js → _DVj22Fhb.js} +2 -2
  107. package/dist/public/assets/{_B4U6RXlg.js.map → _DVj22Fhb.js.map} +1 -1
  108. package/dist/public/assets/{_CKHJpMi32.js → _DWNYhaMZ2.js} +2 -2
  109. package/dist/public/assets/{_CKHJpMi32.js.map → _DWNYhaMZ2.js.map} +1 -1
  110. package/dist/public/assets/{_UABdeDPG.js → _DWltXATi.js} +2 -2
  111. package/dist/public/assets/{_UABdeDPG.js.map → _DWltXATi.js.map} +1 -1
  112. package/dist/public/assets/{_BzmURZrG2.js → _DZAVCSn-2.js} +2 -2
  113. package/dist/public/assets/{_BzmURZrG2.js.map → _DZAVCSn-2.js.map} +1 -1
  114. package/dist/public/assets/{_VpkJ9R4I2.js → _DbhzZP5E2.js} +2 -2
  115. package/dist/public/assets/{_VpkJ9R4I2.js.map → _DbhzZP5E2.js.map} +1 -1
  116. package/dist/public/assets/{_BP3KIWZr.js → _Ddhm-dQX.js} +2 -2
  117. package/dist/public/assets/{_BP3KIWZr.js.map → _Ddhm-dQX.js.map} +1 -1
  118. package/dist/public/assets/{_Bw-xXnfr2.js → _DhTbYHFb2.js} +2 -2
  119. package/dist/public/assets/{_Bw-xXnfr2.js.map → _DhTbYHFb2.js.map} +1 -1
  120. package/dist/public/assets/{_ioxvNBlq2.js → _Dr7LwIoY2.js} +2 -2
  121. package/dist/public/assets/{_ioxvNBlq2.js.map → _Dr7LwIoY2.js.map} +1 -1
  122. package/dist/public/assets/{_Dvy34Yg_2.js → _DtifEQOQ2.js} +2 -2
  123. package/dist/public/assets/{_Dvy34Yg_2.js.map → _DtifEQOQ2.js.map} +1 -1
  124. package/dist/public/assets/{_wyUUoFip.js → _Euo_IdCD.js} +2 -2
  125. package/dist/public/assets/{_wyUUoFip.js.map → _Euo_IdCD.js.map} +1 -1
  126. package/dist/public/assets/{_C0VVn7_H.js → _K5NvnxJU.js} +2 -2
  127. package/dist/public/assets/{_C0VVn7_H.js.map → _K5NvnxJU.js.map} +1 -1
  128. package/dist/public/assets/{_BsL8kuCs.js → _LszNpqGA.js} +2 -2
  129. package/dist/public/assets/{_BsL8kuCs.js.map → _LszNpqGA.js.map} +1 -1
  130. package/dist/public/assets/{_RHQKbTNw.js → _NdVLMlDn.js} +2 -2
  131. package/dist/public/assets/{_RHQKbTNw.js.map → _NdVLMlDn.js.map} +1 -1
  132. package/dist/public/assets/{_D0UH-qzF.js → _VkiUGcZN.js} +2 -2
  133. package/dist/public/assets/{_D0UH-qzF.js.map → _VkiUGcZN.js.map} +1 -1
  134. package/dist/public/assets/{_CqX4LQGj2.js → _YnlBl5Ip2.js} +2 -2
  135. package/dist/public/assets/{_CqX4LQGj2.js.map → _YnlBl5Ip2.js.map} +1 -1
  136. package/dist/public/assets/{_BMK2JGG-2.js → __Pss17dn2.js} +2 -2
  137. package/dist/public/assets/{_BMK2JGG-2.js.map → __Pss17dn2.js.map} +1 -1
  138. package/dist/public/assets/{_-gyK8vJ-.js → _d4DNovnq.js} +2 -2
  139. package/dist/public/assets/{_-gyK8vJ-.js.map → _d4DNovnq.js.map} +1 -1
  140. package/dist/public/assets/{__WU9JTqk.js → _lzPB5GF7.js} +2 -2
  141. package/dist/public/assets/{__WU9JTqk.js.map → _lzPB5GF7.js.map} +1 -1
  142. package/dist/public/assets/{_l-4CNi-P.js → _mWkgrXwR.js} +2 -2
  143. package/dist/public/assets/{_l-4CNi-P.js.map → _mWkgrXwR.js.map} +1 -1
  144. package/dist/public/assets/{_DXjhrVim2.js → _wd5Ka9-u2.js} +2 -2
  145. package/dist/public/assets/{_DXjhrVim2.js.map → _wd5Ka9-u2.js.map} +1 -1
  146. package/dist/public/assets/{_Brh7taK_.js → _xTZ99WxP.js} +2 -2
  147. package/dist/public/assets/{_Brh7taK_.js.map → _xTZ99WxP.js.map} +1 -1
  148. package/dist/public/assets/{_VdrzhuKU.js → _yp1JBHQQ.js} +2 -2
  149. package/dist/public/assets/{_VdrzhuKU.js.map → _yp1JBHQQ.js.map} +1 -1
  150. package/dist/public/assets/{index-DMpI1yWM.js → index-DQjYJ4v3.js} +4 -4
  151. package/dist/public/assets/index-DQjYJ4v3.js.map +1 -0
  152. package/package.json +1 -1
  153. package/dist/public/assets/index-DMpI1yWM.js.map +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_Brh7taK_.js","assets/_RHQKbTNw.js","assets/_B6OKTJ3U.js","assets/_D0UH-qzF.js","assets/_-gyK8vJ-.js","assets/_rdXXJ91o.js","assets/_Dp25UBl7.js","assets/_DoNipARR.js","assets/_VdrzhuKU.js","assets/_l-4CNi-P.js","assets/_CzGoLHpy.js","assets/__Q8ATTST.js","assets/_BXeXVLqQ.js","assets/_BH3qAqXE.js","assets/_Ca6yBPZK2.js","assets/_DQxqrF2p2.js","assets/_CKHJpMi32.js","assets/_CpYNKFv52.js","assets/_bTVj8UrX2.js","assets/_kIpfj7zU2.js","assets/_gzcpVVnB2.js","assets/_xHfOHdoE2.js","assets/_BpWV4xDR2.js","assets/_Bw-xXnfr2.js","assets/_Ct7oMGlY2.js","assets/_CxVlY1q1.js","assets/_vvqUsxvZ.js","assets/_CCWd2cbl.js","assets/_DU_7z2vs.js","assets/_UABdeDPG.js","assets/_DDtfsPTV.js","assets/_CJfh1bA_.js","assets/_BtGc54QO.js","assets/_Gpz7cA9P.js","assets/_CCOa-67I.js","assets/_CLa87tfT.js","assets/_DmaZeTni.js","assets/_CnphyoYq.js","assets/_v0CL1jTB.js","assets/_DtW-KREB.js","assets/_BaHq4SXp.js","assets/_BYOwaDjH.js","assets/_CQJs3lWb.js","assets/_CYNrtFtB.js","assets/_DmIc4jLQ.js","assets/_CY8IvGdO2.js","assets/_CBce3t8t2.js","assets/_DYvRD3hg2.js","assets/_Dl-2e7rI2.js","assets/_woXpYk--.js","assets/_CTwY-w6f2.js","assets/_ioxvNBlq2.js","assets/_VpkJ9R4I2.js","assets/_LLhMP4fB2.js","assets/_BzmURZrG2.js","assets/_BMK2JGG-2.js","assets/_CNPd6AKz2.js","assets/_Dx-8-gkx.js","assets/_DLbMbJfH2.js","assets/_C8oCnwJJ2.js","assets/_DrB0wHeE.js","assets/_CXQQiNs1.js","assets/_9XtunSg7.js","assets/_BD3GuTLe.js","assets/_Cs2xR5zT.js","assets/_BsL8kuCs.js","assets/_B4U6RXlg.js","assets/_B8okAqG-.js","assets/_Cm86uuyb.js","assets/_B31BFjeo.js","assets/_DVTAwKKz.js","assets/_CvIA8snX.js","assets/_DWQbgPoS.js","assets/_DJMQeKeT.js","assets/_DH0HY4Nr.js","assets/_speyknRe2.js","assets/_BmaVzQYH2.js","assets/_DqKBuwfJ2.js","assets/_oqKa8noW.js","assets/_CnvKMtbv.js","assets/_IyjqRm3v.js","assets/_rLFTqkRN2.js","assets/_CacY0gHj2.js","assets/_B5eOa1yu.js","assets/_Dixweg8N.js","assets/_D1A_Heim2.js","assets/_O90oeIOV2.js","assets/_CqX4LQGj2.js","assets/_DOwzaHZ02.js","assets/_B3gFvitq2.js","assets/_Cfkwpbl82.js","assets/_BiFt_7mu2.js","assets/_CMLA9XwU2.js","assets/_Ne8qEUH82.js","assets/__WU9JTqk.js","assets/_CypNdMTQ.js","assets/_BOMR_lTT.js","assets/_BLA94hyL.js","assets/_Bj61d0ZC2.js","assets/_C0VVn7_H.js","assets/_BM315xPC.js","assets/_Cvrh5tZx2.js","assets/_CvPUh_B0.js","assets/_wyUUoFip.js","assets/_L8AbGenz.js","assets/_ByJddavk.js","assets/_BuU3dU-v.js","assets/_BP3KIWZr.js","assets/_B7X9man_.js","assets/_GlOqBOcg2.js","assets/_D8DKeNtk2.js","assets/_Dvy34Yg_2.js","assets/_DXjhrVim2.js","assets/_K6YjF5HA2.js","assets/_BCDnEeXi2.js","assets/_B6D30XZt.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_xTZ99WxP.js","assets/_NdVLMlDn.js","assets/_Bh5KV4D5.js","assets/_VkiUGcZN.js","assets/_d4DNovnq.js","assets/_CYGmgYex.js","assets/_BlHZ_Kf_.js","assets/_DEubpY7q.js","assets/_yp1JBHQQ.js","assets/_mWkgrXwR.js","assets/_ChmfpmBk.js","assets/_C-2JDMwn.js","assets/_BXeXVLqQ.js","assets/_BZImyte8.js","assets/_BtX0OV9L2.js","assets/_D6hErX6k2.js","assets/_DWNYhaMZ2.js","assets/_CpYNKFv52.js","assets/_bTVj8UrX2.js","assets/_kIpfj7zU2.js","assets/_gzcpVVnB2.js","assets/_ByVrIZCY2.js","assets/_Cv9uSMiO2.js","assets/_DhTbYHFb2.js","assets/_DGEc5tY92.js","assets/_Cbd9gTf8.js","assets/_BUYXKQWK.js","assets/_Brp01NXq.js","assets/_BXjUVBpA.js","assets/_DWltXATi.js","assets/_CCYH4Ky0.js","assets/_1PYA5v6h.js","assets/_4GBVe70g.js","assets/_DR5ZG0w3.js","assets/_BS5HCQXD.js","assets/_DLfg1G6i.js","assets/_BhcPbeCA.js","assets/_BkasMCr7.js","assets/_DQ9zeCqC.js","assets/_BDmZKLpT.js","assets/_BaHq4SXp.js","assets/_BYOwaDjH.js","assets/_CQJs3lWb.js","assets/_CYNrtFtB.js","assets/_DmIc4jLQ.js","assets/_CY8IvGdO2.js","assets/_CBce3t8t2.js","assets/_DYvRD3hg2.js","assets/_Dl-2e7rI2.js","assets/_woXpYk--.js","assets/_BFL5ebqS2.js","assets/_Dr7LwIoY2.js","assets/_DbhzZP5E2.js","assets/_BsdChN-o2.js","assets/_DZAVCSn-2.js","assets/__Pss17dn2.js","assets/_CccTxCW92.js","assets/_Dx-8-gkx.js","assets/_DLbMbJfH2.js","assets/_C8oCnwJJ2.js","assets/_CcY_fkdX.js","assets/_D7Nr1Fkx.js","assets/_CGKi9mEa.js","assets/_BMjt74CT.js","assets/_DOlpOlzZ.js","assets/_LszNpqGA.js","assets/_DVj22Fhb.js","assets/_BwfU4p-S.js","assets/_CcuBmBFx.js","assets/_DHF6f-Qb.js","assets/_DVTAwKKz.js","assets/_C3JXJPv9.js","assets/_DWQbgPoS.js","assets/_DJMQeKeT.js","assets/_Ce1AxkTQ.js","assets/_CNm-Qj_22.js","assets/_Ci9zG2ie2.js","assets/_DqKBuwfJ2.js","assets/_oqKa8noW.js","assets/_CnvKMtbv.js","assets/_IyjqRm3v.js","assets/_rLFTqkRN2.js","assets/_CacY0gHj2.js","assets/_B5eOa1yu.js","assets/_Dixweg8N.js","assets/_D1A_Heim2.js","assets/_O90oeIOV2.js","assets/_YnlBl5Ip2.js","assets/_DOwzaHZ02.js","assets/_B3gFvitq2.js","assets/_Cfkwpbl82.js","assets/_BiFt_7mu2.js","assets/_CMLA9XwU2.js","assets/_D5PUFlIB2.js","assets/_lzPB5GF7.js","assets/_DIqHX5oS.js","assets/_DG7JD0Wq.js","assets/_C_HKi7R3.js","assets/_Bj61d0ZC2.js","assets/_K5NvnxJU.js","assets/_BM315xPC.js","assets/_Cvrh5tZx2.js","assets/_Cs6eIEq5.js","assets/_Euo_IdCD.js","assets/_L8AbGenz.js","assets/_ByJddavk.js","assets/_CBAwKZ_C.js","assets/_Ddhm-dQX.js","assets/_ClgMqvJk.js","assets/_BYe0JdJ12.js","assets/_37DiDfEe2.js","assets/_DtifEQOQ2.js","assets/_wd5Ka9-u2.js","assets/_C36kllbW2.js","assets/_Bym_871-2.js","assets/_B6D30XZt.js"])))=>i.map(i=>d[i]);
2
2
  var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=/[\\;]/g,r=e=>e===`;`?`\\3B `:`\\\\`,i=function e(t,n,r){let i=``,a=``,o;if(t){if(typeof t!=`object`)i+=t;else if(Array.isArray(t))for(let s of t)o=e(s,n,r),o&&(i+=a+o,a=n);else for(let e in t)o=r(e,t[e]),o&&(i+=a+o,a=n)}return i},a=e=>(e+(e<26?10:e<962?334:11998)).toString(36),o,s,c=2,l=[],u=[],d=(e=>{for(let t=0;t<e.length;)e[t++](e[t++])}),f=e=>{(!o||e.b.F?.H!==0)&&e.c(e.b,e.d)},p,m=(e,t)=>t[1+e]||=(document.addEventListener(e,t,!0),1),h={},g=1e6,_,v=function e(t){t.H=0,t.D?.forEach(e),t.B?.forEach(Le)},y,b,x=(e,t)=>e.T?.(t),S=new WeakMap,C,ee=function e(t,n,r){let i,o,s=0,c=0;for(;t<n.length;)if(i=n.charCodeAt(t++),o=s,s=0,i===32)r[a(c++)]=C;else if(i===37||i===49)C.replaceWith(C=r[a(c++)]=new Text),i===49&&(r[a(c++)]=Fe());else if(i===38)return t;else if(i===47||i===48)t=e(t,n,r[a(c++)]=Pe(r.$,r.F)),i===48&&(r[a(c++)]=Fe());else if(i<92)for(i=25*o+i-67;i--;)te();else if(i<107)for(i=10*o+i-97;i--;)ne();else if(i<117){for(i=10*o+i-107;i--;)C=C.parentNode||C;ne()}else s=o*10+i-117},te=()=>{if(C.firstChild)return C=C.firstChild;for(;!C.nextSibling&&C.parentNode;)C=C.parentNode;ne()},ne=()=>C=C.nextSibling||C,w={},re,ie,ae,oe,se={},T=/[\p{L}\p{N}]/gu,E=``,D={},ce={},O=ye((e,...t)=>{e=a(e);let n=`D`+e,r=[],i=0;for(;i<t.length;)r.push(ut(``,t[i++],t[i++],t[i++])());return(t,i)=>{i!==(t[n]??(t[`A`+e]&&0))&&en(t,e,r[t[n]=i],ct)}}),le=ye((e,t,n)=>{e=a(e),t!==void 0&&(t=a(t)),n!==void 0&&(n=a(n));let r=`A`+e;return(i,a)=>{let o=i[e],s=o.nodeType===1,c=s?o:o.parentNode,l=i[r];l||(l=i[r]={},l.S=s?c.firstChild:i[t],l.K=s?c.lastChild:n===void 0?o.previousSibling:i[n]);let u=l.S;if(l.L&&u===l.K&&u.tagName===`T`){let e=u;e.firstChild||e.appendChild(new Text),l=i[r]={},l.S=u=e.firstChild,l.K=e.lastChild,e.replaceWith(...e.childNodes)}let d=s?!!c.firstChild:u.parentNode===c;a?d||Be(l,c,s?null:o):d&&(s&&(l.S=c.firstChild,l.K=c.lastChild),Ve(l))}}),ue=ye((e,t,n,r)=>{e=a(e);let i=`A`+e,o=`D`+e;return(a,s,c)=>{let l=ve(s);if(a[o]!==(a[o]=l?.a||l)||t&&!(l||a[i])){if(en(a,e,l||(t?t(a):void 0),tn),n&&(a[i].T=e=>n()(a,e)),typeof l==`string`){if(t){let e=t(a);en(a[i],`a`,e,ct),e.f&&Xe(e.e,e.f,a[i].Aa)}}else l?.f&&Xe(l.e,l.f,a[i])}if(l){let e=a[i],n=c?.();if(typeof l==`string`)(t?vt:yt)(e,`a`,(r?n[0]:n)||{},ce[e.a.tagName]),(e.Ia||e.Ea)&&Ce(e,$t);else{for(let t in l.g)l.g[t](e,l.h[t]);if(l.d){if(r)l.d(e,l._?n[0]:n);else{let r=t?{...n,content:t(a)}:n||{};l.d(e,l._?r:[r])}}}}}}),de=ye(e=>{e=a(e);let t=`A`+e,n=`D`+e;return(r,i)=>{if(r[n]!==(r[n]=i?.a||i)&&(en(r,e,i,ct),i?.f&&Xe(i.e,i.f,r[t])),i)for(let e in i.g)i.g[e](r[t],i.h[e])}}),k=ye(e=>(t,n,r,i,o)=>{t=a(t);let s=`A`+t,c=`O`+t,l=ut(``,n,r,i)();return(n,r)=>{let i=n[t],a=Ae(n[s]),u=n[s]=[];n[c]=null;let d=a.length,f=i.nodeType>1?i.parentNode||a[0]?.S.parentNode:i,p,m,h=0;e(r,(e,t)=>{let r=u.length,i=a[r],s=d&&(p||e!==(i?.M??r)?(p||=a.reduce((e,t,n)=>n<r?e:(t.I=n,e.set(t.M??n,t)),new Map)).get(e):i&&(h++,i));s?(m=!0,p?.delete(e)):s=ct(n.$,l,n,f),s.M=e,u.push(s),o?.(s,t)});let g=u.length,_=i!==f,v=null,y=d-1,b=g-1;if(_&&(d?(v=a[y].K.nextSibling,g||f.insertBefore(i,v)):g&&(v=i.nextSibling,i.remove())),!m){d&&(a.forEach(_?ze:Ie),_||(f.textContent=``));for(let e of u)Be(e,f,v);return}if(p)p.forEach(ze);else for(let e=g;e<d;e++)ze(a[e]);for(;y>=h&&b>=h&&a[y]===u[b];)y--,b--;if(y+1<d&&(v=a[y+1].S),h>y||h>b){for(let e=h;e<=b;e++)Be(u[e],f,v);return}let x=b-h+1,S=Array(x),C=Array(x),ee=[],te=-1,ne,w,re;for(let e=x;e--;)S[e]=u[h+e].I??-1;for(let e=0;e<x;e++)if(~S[e]){if(te<0||S[ee[te]]<S[e])~te&&(C[e]=ee[te]),ee[++te]=e;else{for(ne=0,w=te;ne<w;)re=(ne+w)/2|0,S[ee[re]]<S[e]?ne=re+1:w=re;S[e]<S[ee[ne]]&&(ne>0&&(C[e]=ee[ne-1]),ee[ne]=e)}}for(w=ee[te],ne=te+1;ne-->0;)ee[ne]=w,w=C[w];for(let e=x;e--;)~te&&e===ee[te]?te--:Be(u[h+e],f,v),v=u[h+e].S}})(([e,t],n)=>{t||=nn,typeof t==`string`?be(e,(e,r)=>n(e[t],[e,r])):be(e,(e,r)=>n(t(e,r),[e,r]))});function fe(e,t){return t?e:``}function pe(e,t){return t||t===0?me(e)+`:`+me(t+``):``}function me(e){return n.test(e)?e.replace(n,r):e}function he(e){return/^on[A-Z-]/.test(e)}function ge(e){return e[2]===`-`?e.slice(3):e.slice(2).toLowerCase()}function _e(e){return e!=null&&e!==!1}function ve(e){if(e){if(typeof e==`string`)return e;let t=e.content||e.default||e;if(`a`in t)return t}}function ye(e){return o=1,e}function be(e,t){if(e){let n=0;for(let r of e)t(r,n++)}}function xe(e,t,n,r,i=e.L){let a;if(n>=0&&(a=e[n])){if(a.d=r,a.e===c||p&&a.f)return;a.e=c}else a={a:i*1e6+n,b:e,c:t,d:r,e:c},n>=0&&(e[n]=a);Se(a)}function Se(e){let t=u.push(e)-1;for(;t;){let n=t-1>>1,r=u[n];if(e.a-r.a>=0)break;u[t]=r,t=n}u[t]=e}function Ce(e,t){l.push(t,e)}function we(){let e=l;try{s=1,Te()}finally{c++,s=0,u=[],l=[]}d(e)}function Te(){for(;u.length;){let e=u[0],t=u.pop();if(e!==t){let e=0,n=u.length>>1,r=(u[0]=t).a;for(;e<n;){let t=(e<<1)+1,n=t+1;if(n<u.length&&u[n].a-u[t].a<0&&(t=n),u[t].a-r>=0)break;u[e]=u[t],e=t}u[e]=t}f(e)}}function Ee(e,t){let n=e.A?.[t];n&&(e.A[t]=void 0,s?Ce(n,ke):ke(n))}function De(e,t){return Oe(e),((e.A||={})[t]||=new AbortController).signal}function Oe(e,t){let n=e.F;n&&(n.B||=new Set).add(e),t&&(e.Z||=[]).push(t)}function ke(e){e.abort()}function Ae(e){return e?Array.isArray(e)?e:[e]:[]}function je(e,t){if(e){if(Array.isArray(e))for(let n of e)t(n);else t(e)}}function eee(e,t){return e?Array.isArray(e)?(e.push(t),e):[e,t]:t}function A(e,t,n){e[1+t]===void 0&&m(t,Me),e[1+t]=n||null}function Me(e){let t=!s&&e.target;for(;t;)t[1+e.type]?.(e,t),t=e.bubbles&&!e.cancelBubble&&t.parentNode}function Ne(e,t){let n=h[t]||=document.createElementNS(t,`template`);return n.innerHTML=e,n.content||n}function Pe(e,t){let n={L:g++,H:c,F:t,$:e};return _?.push(n),n}function Fe(){return g++}function Ie(e){e.N?.D?.delete(e),v(e)}function Le(e){e.Z?.forEach(Re,e);for(let t in e.A)Ee(e,t)}function Re(e){e.delete(this)}function ze(e){Ie(e),Dt(e.S,e.K)}function Be(e,t,n){Ot(t,n,e.S,e.K)}function Ve(e){let t=new DocumentFragment;t.namespaceURI=e.S.parentNode.namespaceURI,Ot(t,null,e.S,e.K)}function He(){y||(y=1,queueMicrotask(Ue))}function Ue(){requestAnimationFrame(We),we()}function We(){b||(b=new MessageChannel,b.port1.onmessage=()=>{y=0,we()}),b.port2.postMessage(0)}function j(e,t){let n=a(e);return(r,i)=>(s?r.H===c&&(r[n]=i,t?.(r)):(r[n]!==i||!(n in r))&&(r[n]=i,t)&&(He(),xe(r,t,e)),i)}function Ge(e,t){let n=a(e),r=a(e+1),i=j(e,t);return(e,a,o)=>(s?(e[r]=o)&&(e[n]!==a||!(n in e))?(e[n]=a,t?.(e)):i(e,a):e[r]?e[r](a):i(e,a),a)}function M(e,t){return e=a(e),((n,r)=>{(n[e]!==r||!(e in n))&&(n[e]=r,t?.(n))})}function N(e,t,n=1,r=`L`){return r!==`L`&&(r=a(r)),i=>{i.H===c?~e in i?--i[~e]||t(i):i[~e]=n:xe(i,t,e,0,i[r])}}function Ke(e,t){e=a(e);let n=`A`+e,r=e=>{let r=Ae(e[n]);r.length&&xe(e,()=>{for(let e of r)e.H>0&&e.H<c&&t(e)},-1,0,r[0].L)};return r._=t,r}function qe(e,t,n,r){e=a(e),t=a(t),n!==`M`&&(n=a(n));let i=`A`+e,o=`O`+e,s=`_${t}`,l=e=>{let a=Ae(e[i]);if(e.H<c&&a.length){let c=e[t];xe(e,()=>{let t=Je(e,i,o,n);if(t&&s in t){let e=t.get(t[s]),n=t.get(c);e!==n&&(Ye(e,r),Ye(n,r))}else for(let t of Ae(e[i]))Ye(t,r);t&&(t[s]=c)},-1,0,a[0].L)}};return l._=r,l}function Je(e,t,n,r){let i=e[n]||=new Map;if(!i.size)for(let a of Ae(e[t])){let t=a.M??a[r];if(t===void 0)return e[n]=null;a.M=t,i.set(t,a)}return i}function Ye(e,t){e&&e.H>0&&e.H<c&&t(e)}function P(e,t,n){e=a(e);let r=`A`+e,i=`D`+e,o=e=>{let a=e[r];a&&a.H>0&&a.H<c&&(e[i]||0)===t&&xe(a,n,-1)};return o._=n,o}function Xe(e,t,n){let r=e[t]||=new Set,{size:i}=r;r.add(n).size!==i&&Oe(n,r)}function F(...e){let[t]=e,n=t.a,r=t.b;for(let t=e.length;t--;)e[t].c=t;return t=>{if(t[n])for(let i of t[n])i.H>0&&i.H<c&&xe(i,e[i[r]||0],-1)}}function I(e,t,n,r){e=a(e);let i=(e=>{e[i.b]=i.c,t(e),Xe(n?n(e):e._,i.a,e)});return i.a=e,i.b=`C`+e,r&&R(r,i),i}function Ze(e,t,n){e[a(t)].T=t=>n(e,t)}function Qe({$:e}){let t=S.get(e)||0;return S.set(e,t+1),`c`+e.runtimeId+e.renderId+t.toString(36)}function L(e,t){return R(e,t),e=>{Ce(e,t)}}function*$e(e,t,n=t.length-1){if(e){if(Symbol.iterator in e)for(let r of e.values())yield*$e(r,t,n);else{let r=e[t[n]];n?yield*$e(r,t,n-1):yield typeof r==`function`?r():r}}}function et(...e){return e=e.map(e=>typeof e==`string`?e:a(e)),t=>{let n=()=>$e(t,e).next().value;return n[Symbol.iterator]=()=>$e(t,e),n}}function tee(e,...t){return R(e,et(...t))}function tt(e,t,n){C=e,ee(0,t,n)}function nt(e=`M`){if(re)return;let t=self[e],n=t=>Object.defineProperty(self,e,t),r=t=>{n({value:re=(n=>{let r=re[n]=t[n]||t(n),i=r.w,a={},s=e=>a[e]||(+e?l(a[e]={L:+e}):c()),c=()=>a[0]||={runtimeId:e,renderId:n},l=e=>(e.H=1,e.$=c(),o&&e.G&&(e.F=s(e.G)),e),u=e=>{let t=e[0];for(let n=1;n<e.length;n++){let r=e[n];typeof r==`number`?t+=r:(t?l(Object.assign(a[t]||=(r.L=t,r),r)):Object.assign(c(),r),t++)}},d=((e,t)=>typeof e==`number`?t?w[t](s(e)):s(e):u(e)),f=(e=[],t=[],n=[],i=[],a)=>(o,c,l,u,d,f=_.parentNode,m=_,h=n.length,v=i.length)=>{for(y!==`[`&&(b[p()]=y===`)`||y===`}`?f:_,u=`A`+x,d=y!==`]`&&y!==`)`,p());o=+x;){if((l||=[]).push(c=s(o)),st(c,c.F),(c.O=r.p?.[o])&&(c.O.m=r.m),d){for(;m.previousSibling&&~g.indexOf(m=m.previousSibling););c._??=b,c.K=c.S=m,y===`'`&&(c.a=m)}else a=eee(a,c),u&&(b[u]=a,je(a,e=>e._??=b),a=e.pop()),m=t.pop(),f!==m.parentNode&&f.prepend(m),c.S=m,c.K=_.previousSibling===m?m:f.insertBefore(new Text,_);for(;h&&n[h-1].L>o;)h--,st(n.pop(),c);for(;v&&i[v-1].L>o;){v--;let e=i.pop();e.F!==e&&(e.F=c)}p()}if(l){for(let e of l)n.push(e);d&&(b[u]=l.length>1?l.reverse():l[0])}y===`[`?(l||(e.push(a),a=void 0),t.push(_)):i.push(b)},p=()=>x=v.slice(S,(S=v.indexOf(` `,S)+1||v.length+1)-1),m=(e=[],t)=>{let n=0;for(;n<e.length;n++){let i=e[n];if(typeof i==`string`)for(S=0,v=i;p();)/\D/.test(x)?h=w[x]:t.push(h,s(x));else if(Array.isArray(i)){if(!(ae&&i.every(e=>ae.has(e)&&!r.b[e].length)))break}else if(ae&&typeof i==`number`)break;else{let e=i(d);Array.isArray(e)&&u(e)}}return e.splice(0,n),n},h,g,_,v,y,b,x,S,C,ee;return d._=w,r.m=e=>{if(m(r.r,e),ae&&r.b)for(let t=1;t;){t=0;for(let n of ae){let i=r.b[n];i&&m(i,e)&&(t=1)}}let t=0;for(_ of g=r.v)if(S=r.i.length,v=_.data,y=v[S++],b=s(p()),y===`*`){let e=_.previousSibling;b[p()]=e&&(e.nodeType<8||e.data)?e:_.parentNode.insertBefore(new Text,_)}else o?(C||=f())():r.b&&(g[t++]=_);return ie&&!ee&&_&&ie.set(ee=_.parentNode.insertBefore(new Text,_.nextSibling),[n,a]),g.length=t,e},r.w=()=>{i(),rt(r)},r})})};if(t){r(t);for(let e in t)rt(re(e))}else n({configurable:!0,set:r})}function rt(e){try{oe=1,d(e.m([]),1)}finally{oe=0}}function R(e,t){return w[e]=t}function it(e,t){return R(e,e=>n=>t(e,n)),t}function at(e,t){return t=a(t),R(e,e=>()=>e[t])}function ot(e,t,n,r){let i=Pe(e);return i._=t.e||n,st(i,n?.F),t.b?.(i,r.namespaceURI),i}function st(e,t){t&&(e.N=t,(t.D||=new Set).add(e)),e.F=e}function ct(e,t,n,r){return lt(t,ot(e,t,n,r))}function lt(e,t){return e.c&&xe(t,e.c,-1),t}function ut(e,t,n,r,i,a){n=n?n.replace(/[^\0-1]+$/,``):``,r=r?r._||r:void 0,i||=void 0;let o=t?(e,r)=>{((se[r]||={})[1+t]||=ft(t,r))(e,n)}:e=>{tt(e.S=e.K=new Text,n,e)};return t=>({a:e,b:o,e:t,c:r,d:i,f:a})}function dt(e,t,n,r,i,a){return R(e,ut(e,t,n,r,i,a))}function ft(e,t){let{firstChild:n,lastChild:r}=Ne(e,t),i=document.createElementNS(t,`t`);return Ot(i,null,n,r),n===r&&n.nodeType<8?(e,t)=>{tt(e.S=e.K=n.cloneNode(!0),t,e)}:(e,t)=>{let n=i.cloneNode(!0);tt(n.firstChild,t,e),e.S=n.firstChild,e.K=n.lastChild}}function pt(e){return e||e===0?e+``:``}function z(e,t,n){mt(e,t,Tt(n))}function mt(e,t,n){e.getAttribute(t)!=n&&(n===void 0?e.removeAttribute(t):e.setAttribute(t,n))}function ht(e,t){mt(e,`class`,i(t,` `,fe)||void 0)}function gt(e,t){for(let n in t)B(e,n,t[n])}function B(e,t,n){e.classList.toggle(t,!!n)}function _t(e,t){mt(e,`style`,i(t,`;`,pe)||void 0)}function V(e,t){let n=pt(t);e.data!==n&&(e.data=n)}function vt(e,t,n,r){let i=e[t];for(let e=i.attributes.length;e--;){let{name:t}=i.attributes.item(e);n&&(t in n||bt(i,t,n))||i.removeAttribute(t)}xt(e,t,n,r)}function yt(e,t,n,r){vt(e,t,n,r),St(e,t,n?.content)}function bt(e,t,n){return t===`checked`&&e.tagName===`INPUT`&&`checkedValue`in n}function xt(e,t,n,r){let i=e[t],a=e[`I`+t],o;for(let e in a)a[e]=0;r&&(e[`F`+t]=5,e[`E`+t]=0,n&&(o=r(e,t,n)));for(let r in n){let s=n[r];switch(r){case`class`:ht(i,s);break;case`style`:_t(i,s);break;default:he(r)?(a||=e[`I`+t]={})[ge(r)]=s:o?.test(r)||r===`content`&&i.tagName!==`META`||z(i,r,s)}}}function St(e,t,n){let r=wt(n);e[`D`+t]!==(e[`D`+t]=r?.a)&&(en(e,t,r,ct),r?.f&&Xe(r.e,r.f,e[`A`+t]));for(let n in r?.g)r.g[n](e[`A`+t],r.h[n])}function Ct(e,t){let n=e[t],r=e[`I`+t];D[e[`F`+t]]?.(e,t);for(let e in r)A(n,e,r[e])}function wt(e){let t=ve(e);if(t&&t.a)return t}function Tt(e){if(_e(e))return e===!0?``:e+``}function Et(e,t,n=0){let r=`K`+n,i=e[r];i?(Object.assign(i,t),i.onUpdate?.()):(e[r]=t,Object.assign(t,t.onMount?.()),De(e,r).onabort=()=>t.onDestroy?.())}function Dt(e,t){let n=t.nextSibling;for(;e!==n;){let t=e.nextSibling;e.remove(),e=t}}function Ot(e,t,n,r){if(e.isConnected)e.insertBefore(kt(n,r),t);else{let i=r.nextSibling;for(;n!==i;){let r=n.nextSibling;e.insertBefore(n,t),n=r}}return e}function kt(e,t){return e===t?e:Ot(new DocumentFragment,null,e,t)}function At(e,t,n,r){if((t||t===0)&&(t!==n.length||/kw/.test(e))){let e=n.slice(0,t),i=n.slice(t);if(r.startsWith(e))return t;if(r.endsWith(i))return r.length-i.length;let a=e.match(T)?.length;for(;a&&T.test(r);)a--;return a?r.length:T.lastIndex}return-1}function jt(e,t,n){let r=e[t],i=_e(n);if(r.defaultChecked!==i){let t=e.H<c?r.checked:i;r.defaultChecked=i,t!==i&&(r.checked=t)}}function Mt(e,t,n,r){let i=e[t],a=_e(n);e[`E`+t]=r,e[`F`+t]=r?0:5,r&&e.H<c?i.checked=a:jt(e,t,a)}function Nt(e,t){let n=e[t];Gt(n,Yt,()=>{let r=e[`E`+t];if(r){let e=n.checked;n.checked=!e,r(e),we()}})}function Pt(e,t,n){let r=e[t],i=Tt(n)||``;if(r.defaultValue!==i){let t=e.H<c?r.value:i;r.defaultValue=i,Lt(r,t)}}function Ft(e,t,n,r,i=Pt){let a=e[t],o=Tt(n)||``;e[`E`+t]=r,e[`G`+t]=o,e[`F`+t]=r?2:5,r&&e.H<c?Lt(a,o):i(e,t,o)}function It(e,t){let n=e[t];oe&&(e[`G`+t]=n.defaultValue),Gt(n,Jt,r=>{let i=e[`E`+t];i&&(E=r?.inputType,i(n.value),we(),Lt(n,e[`G`+t]),E=``)})}function Lt(e,t){if(e.value!==t){let n=At(E,document.activeElement===e&&e.selectionStart,e.value,e.value=t);~n&&e.setSelectionRange(n,n)}}function Rt(e,t,n){let r,i=e[t],a=e.H<c,o=Array.isArray(n),s=o?n.map(Qt):Qt(n);l.unshift(()=>{for(let e of i.options){let t=o?s.includes(e.value):e.value===s;e.defaultSelected!==t&&(a&&(r??=Ht(i,o)),e.defaultSelected=t)}r!==void 0&&Vt(i,r,o)},e)}function zt(e,t,n,r){let i=e[t],a=e.H<c,o=Array.isArray(n),s=e[`G`+t]=o?n.map(Qt):Qt(n);e[`E`+t]=r,e[`F`+t]=r?3:5,r&&a?l.unshift(()=>Vt(i,s,o),e):Rt(e,t,s)}function Bt(e,t){let n=e[t],r=()=>{let r=e[`E`+t];if(r){let i=e[`G`+t],a=Array.isArray(i),o=Ht(n,a);Vt(n,i,a),r(o),we()}};if(oe){if(n.multiple){e[`G`+t]=[];for(let r of n.options)r.defaultSelected&&e[`G`+t].push(r.value)}else{e[`G`+t]=``;for(let r of n.options)if(r.defaultSelected){e[`G`+t]=r.value;break}}}Gt(n,Xt,r),Wt(e,t,{childList:!0,subtree:!0},()=>{let i=e[`G`+t];(Array.isArray(i)?i.length!==n.selectedOptions.length||i.some((e,t)=>!i.includes(n.selectedOptions[t].value)):n.value!==i)&&r()})}function Vt(e,t,n){if(n)for(let n of e.options)n.selected=t.includes(n.value);else e.value=t}function Ht(e,t){return t?Array.from(e.selectedOptions,e=>e.value):e.value}function Ut(e,t,n){e.H===c&&(e[t].open=_e(n))}function Wt(e,t,n,r){(e[`N`+t]||=new MutationObserver(r)).observe(e[t],n)}function Gt(e,t,n){e._=n,m(`input`,Kt),e.form&&m(`reset`,qt),oe&&t(e)&&queueMicrotask(n)}function Kt(e){e.target._?.(e)}function qt(e){let t=[];for(let n of e.target.elements)n._&&Zt(n)&&t.push(n._);requestAnimationFrame(()=>{if(!e.defaultPrevented)for(let e of t)e()})}function Jt(e){return e.value!==e.defaultValue}function Yt(e){return e.checked!==e.defaultChecked}function Xt(e){for(let t of e.options)if(t.selected!==t.defaultSelected)return!0}function Zt(e){return e.options?Xt(e):Jt(e)||Yt(e)}function Qt(e){return Tt(e)||``}function $t(e){Ct(e,`a`)}function en(e,t,n,r){let i=e[t],a=e[`A`+t],o=i.nodeType>1?(a?.S||i).parentNode:i,s=e[`A`+t]=n&&r(e.$,n,e,o);i===o?(a&&(Ie(a),i.textContent=``),s&&Be(s,o,null)):a?(s?Be(s,o,a.S):o.insertBefore(i,a.S),ze(a)):s&&(Be(s,o,i),i.remove())}function tn(e,t,n,r){let i=ot(e,t,n,r);return typeof t==`string`?i.a=i.S=i.K=document.createElementNS(t===`svg`?`http://www.w3.org/2000/svg`:t===`math`?`http://www.w3.org/1998/Math/MathML`:r.namespaceURI,t):lt(t,i),i}function nn(e,t){return t}var rn=[],an=Symbol();function on(e){return e[Symbol.iterator]=sn,e[an]=rn,e}function*sn(){yield this,yield*this[an]}async function H(e,t){let n=await fetch(e,t),r;try{r=await n.json()}catch{throw Error(n.ok?`invalid response`:`HTTP ${n.status}`)}if(r&&typeof r==`object`&&r.error)throw Error(r.error);if(!n.ok)throw Error(`HTTP ${n.status}`);return r}var cn=[`workspaces.changed`,`sessions.changed`,`workspace.progress`,`review.changed`,`status.changed`],ln=1e4,un=4e4,dn=8e3,fn=5e3,pn=6e4,mn,hn,gn=null,_n,vn,yn,bn,xn=0;function Sn(e){hn&&e!==hn&&location.reload(),hn=e}async function Cn(){try{Sn((await H(`/api/boot`)).boot)}catch{}}function wn(){clearTimeout(vn),clearTimeout(yn),yn=setTimeout(Tn,un),xn&&(xn=0,clearInterval(bn),bn=void 0)}function Tn(){En(),!xn&&(xn=Date.now(),bn=setInterval(()=>{document.visibilityState===`visible`&&(Date.now()-xn>pn&&(xn=Date.now(),On()),Dn(),H(`/api/status`).then(e=>{mn.dispatchEvent(new MessageEvent(`status.changed`,{data:e}))}).catch(()=>{}))},fn))}function En(){clearTimeout(vn),clearTimeout(yn),gn?.close(),gn=null}function Dn(){for(let e of[`workspaces.changed`,`sessions.changed`])mn.dispatchEvent(new MessageEvent(e,{data:null}))}function On(){if(gn)return;let e=gn=new EventSource(`/api/events`);clearTimeout(vn),vn=setTimeout(Tn,dn),e.addEventListener(`hello`,e=>{wn(),Sn(JSON.parse(e.data||`{}`).boot)}),e.addEventListener(`ping`,wn);for(let t of cn)e.addEventListener(t,e=>{wn(),mn.dispatchEvent(new MessageEvent(t,{data:JSON.parse(e.data||`null`)}))})}function kn(){return mn||(mn=new EventTarget,On(),Cn(),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`visible`?(clearTimeout(_n),On(),Cn(),Dn()):(clearTimeout(_n),_n=setTimeout(()=>{xn||En()},ln))})),mn}var An=null,jn=null,Mn=new EventTarget;function Nn(e,t){Mn.addEventListener(`intent`,e,{signal:t})}function Pn(e,t){An={workspaceId:e,pr:t},Mn.dispatchEvent(new Event(`intent`))}function Fn(e){if(An?.workspaceId!==e)return!1;let t=An.pr;return An=null,{pr:t}}function In(e,t){jn=[e,t],Mn.dispatchEvent(new Event(`intent`))}function Ln(e){if(jn?.[0]!==e)return null;let t=jn[1];return jn=null,t}function Rn(e){let t=!1,n=!1;return async()=>{if(t){n=!0;return}t=!0;try{do n=!1,await e();while(n)}finally{t=!1}}}var zn=new Map,Bn=new Set,Vn;function Hn(){return typeof window>`u`?Promise.resolve():Vn??=(async()=>{try{let e=await(await fetch(`/api/prefs`)).json();for(let[t,n]of Object.entries(e))Bn.has(t)||zn.set(t,n)}catch{}})()}function Un(e){return zn.get(e)??null}function Wn(e,t){Bn.add(e),t===null?zn.delete(e):zn.set(e,t),nee(e,t)}function nee(e,t){return fetch(`/api/prefs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({key:e,value:t})}).catch(()=>{})}function ree(){return Un(`last-workspace`)}function Gn(e){Wn(`last-workspace`,e)}function Kn(){return Un(`side-nav`)!==`0`}function qn(e){Wn(`side-nav`,e?`1`:`0`)}function Jn(e){return Un(`tab:${e}`)}function Yn(e,t){Wn(`tab:${e}`,t)}function Xn(){return Un(`diff-tree`)!==`0`}function Zn(e){Wn(`diff-tree`,e?`1`:`0`)}function Qn(){return Un(`diff-uncommitted`)===`1`}function $n(e){Wn(`diff-uncommitted`,e?`1`:`0`)}function er(){return typeof window<`u`&&`serviceWorker`in navigator&&`PushManager`in window}async function tr(){return er()?(await ar()).pushManager.getSubscription():null}async function nr(){if(await Notification.requestPermission()!==`granted`)return!1;let e=await ar(),t=await e.pushManager.getSubscription();if(!t){let{publicKey:n}=await H(`/api/push`);t=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:or(n)})}return await H(`/api/push`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t.toJSON())}),!0}async function rr(){let e=await tr();e&&(await H(`/api/push?endpoint=${encodeURIComponent(e.endpoint)}`,{method:`DELETE`}).catch(()=>{}),await e.unsubscribe())}function ir(e){let t=()=>{document.visibilityState===`visible`&&navigator.clearAppBadge?.().catch(()=>{})};t(),document.addEventListener(`visibilitychange`,t,{signal:e})}async function ar(){return await navigator.serviceWorker.getRegistration()??navigator.serviceWorker.register(`/sw.js`)}function or(e){let t=e.padEnd(e.length+(4-e.length%4)%4,`=`),n=atob(t.replace(/-/g,`+`).replace(/_/g,`/`));return Uint8Array.from(n,e=>e.charCodeAt(0))}function sr(){return typeof window<`u`&&window.matchMedia(`(pointer: coarse)`).matches}function cr(){return typeof window<`u`&&window.matchMedia(`(max-width: 899px)`).matches}function lr(){return typeof navigator<`u`&&navigator.standalone===!0}function ur(e){if(!lr()||!/^https?:\/\//.test(e)){window.open(e,`_blank`,`noopener`);return}if(localStorage.getItem(`xSafariOk`)){location.href=`x-safari-${e}`;return}if(localStorage.getItem(`xSafariNo`)){window.open(e,`_blank`,`noopener`);return}let t=!1,n=()=>{document.visibilityState===`hidden`&&(t=!0,localStorage.setItem(`xSafariOk`,`1`))};document.addEventListener(`visibilitychange`,n),window.addEventListener(`pagehide`,n),setTimeout(()=>{document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`pagehide`,n),!(t||document.visibilityState===`hidden`)&&(localStorage.setItem(`xSafariNo`,`1`),window.open(e,`_blank`,`noopener`))},1500),location.href=`x-safari-${e}`}function dr(e,t){if(!e)return-1;let n=e.toLowerCase(),r=t.toLowerCase(),i=r.lastIndexOf(`/`),a=r.slice(i+1),o=r.slice(0,Math.max(0,i)).includes(n)?5:0;return a===n?1e3+o:a.startsWith(n)?800+o:a.includes(n)?600+o:pr(n,a)?400+o:r.includes(n)?300:pr(n,r)?100:-1}function fr(e,t,n){return e?t.map(t=>({repo:t,score:dr(e,t.nameWithOwner)})).filter(({repo:e,score:t})=>!e.isArchived&&t>=0&&!n(e.nameWithOwner)).sort((e,t)=>t.score-e.score||e.repo.nameWithOwner.length-t.repo.nameWithOwner.length||e.repo.nameWithOwner.localeCompare(t.repo.nameWithOwner)).slice(0,8).map(({repo:e})=>e):[]}function pr(e,t){if(!e)return!0;let n=0,r=t.toLowerCase();for(let t of e.toLowerCase()){if(n=r.indexOf(t,n),n===-1)return!1;n++}return!0}function mr(e){return e?.working?`working`:e?.waiting?`waiting`:e?.agents?`idle`:`off`}function hr(e){return e?.phase===`working`?`working`:e?.phase===`waiting`?`waiting`:e?.alive?`idle`:`off`}var gr=`<svg viewBox="0 0 24 24" fill=none stroke=currentColor stroke-width=1.5 stroke-linecap=round stroke-linejoin=round aria-hidden=true><path></path></svg>`,_r=` D l`,vr=(e,t)=>{z(e.a,`width`,t),z(e.a,`height`,t)},yr=(e,t)=>vr(e,t??15),br=(e,t)=>ht(e.a,[`icon`,t]),xr=(e,t)=>z(e.b,`d`,t),Sr=gr,Cr=(e=>`/${e}&`)(_r);function wr(e){xr(e.a,`M18 21C19.1046 21 20 20.1046 20 19C20 17.8954 19.1046 17 18 17C16.8954 17 16 17.8954 16 19C16 20.1046 16.8954 21 18 21Z M6 7C7.10457 7 8 6.10457 8 5C8 3.89543 7.10457 3 6 3C4.89543 3 4 3.89543 4 5C4 6.10457 4.89543 7 6 7Z M18 17V7C18 7 18 5 16 5H13 M6 7V17C6 17 6 19 8 19H11 M15.0005 7.50012L12.5005 5.00012L15.0005 2.50012 M8.5 16.5L11 19L8.5 21.5`)}var Tr=(e,t)=>yr(e.a,t),Er=(e,t)=>br(e.a,t),Dr=gr,Or=(e=>`/${e}&`)(_r);function kr(e){xr(e.a,`M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z M19.6224 10.3954L18.5247 7.7448L20 6L18 4L16.2647 5.48295L13.5578 4.36974L12.9353 2H10.981L10.3491 4.40113L7.70441 5.51596L6 4L4 6L5.45337 7.78885L4.3725 10.4463L2 11V13L4.40111 13.6555L5.51575 16.2997L4 18L6 20L7.79116 18.5403L10.397 19.6123L11 22H13L13.6045 19.6132L16.2551 18.5155C16.6969 18.8313 18 20 18 20L20 18L18.5159 16.2494L19.6139 13.598L21.9999 12.9772L22 11L19.6224 10.3954Z`)}var Ar=(e,t)=>yr(e.a,t),jr=(e,t)=>br(e.a,t),Mr=gr,Nr=(e=>`/${e}&`)(_r);function Pr(e){xr(e.a,`M6 12H12M18 12H12M12 12V6M12 12V18`)}var Fr=(e,t)=>yr(e.a,t),Ir=(e,t)=>br(e.a,t),Lr=`<!><!><!>`,iee={claude:`M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z`,codex:`M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z`,grok:`M9.27 15.29l7.978-5.897c.391-.29.95-.177 1.137.272.98 2.369.542 5.215-1.41 7.169-1.951 1.954-4.667 2.382-7.149 1.406l-2.711 1.257c3.889 2.661 8.611 2.003 11.562-.953 2.341-2.344 3.066-5.539 2.388-8.42l.006.007c-.983-4.232.242-5.924 2.75-9.383.06-.082.12-.164.179-.248l-3.301 3.305v-.01L9.267 15.292M7.623 16.723c-2.792-2.67-2.31-6.801.071-9.184 1.761-1.763 4.647-2.483 7.166-1.425l2.705-1.25a7.808 7.808 0 00-1.829-1A8.975 8.975 0 005.984 5.83c-2.533 2.536-3.33 6.436-1.962 9.764 1.022 2.487-.653 4.246-2.34 6.022-.599.63-1.199 1.259-1.682 1.925l7.62-6.815`,copilot:`M19.245 5.364c1.322 1.36 1.877 3.216 2.11 5.817.622 0 1.2.135 1.592.654l.73.964c.21.278.323.61.323.955v2.62c0 .339-.173.669-.453.868C20.239 19.602 16.157 21.5 12 21.5c-4.6 0-9.205-2.583-11.547-4.258-.28-.2-.452-.53-.453-.868v-2.62c0-.345.113-.679.321-.956l.73-.963c.392-.517.974-.654 1.593-.654l.029-.297c.25-2.446.81-4.213 2.082-5.52 2.461-2.54 5.71-2.851 7.146-2.864h.198c1.436.013 4.685.323 7.146 2.864zm-7.244 4.328c-.284 0-.613.016-.962.05-.123.447-.305.85-.57 1.108-1.05 1.023-2.316 1.18-2.994 1.18-.638 0-1.306-.13-1.851-.464-.516.165-1.012.403-1.044.996a65.882 65.882 0 00-.063 2.884l-.002.48c-.002.563-.005 1.126-.013 1.69.002.326.204.63.51.765 2.482 1.102 4.83 1.657 6.99 1.657 2.156 0 4.504-.555 6.985-1.657a.854.854 0 00.51-.766c.03-1.682.006-3.372-.076-5.053-.031-.596-.528-.83-1.046-.996-.546.333-1.212.464-1.85.464-.677 0-1.942-.157-2.993-1.18-.266-.258-.447-.661-.57-1.108-.32-.032-.64-.049-.96-.05zm-2.525 4.013c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zm5 0c.539 0 .976.426.976.95v1.753c0 .525-.437.95-.976.95a.964.964 0 01-.976-.95v-1.752c0-.525.437-.951.976-.951zM7.635 5.087c-1.05.102-1.935.438-2.385.906-.975 1.037-.765 3.668-.21 4.224.405.394 1.17.657 1.995.657h.09c.649-.013 1.785-.176 2.73-1.11.435-.41.705-1.433.675-2.47-.03-.834-.27-1.52-.63-1.813-.39-.336-1.275-.482-2.265-.394zm6.465.394c-.36.292-.6.98-.63 1.813-.03 1.037.24 2.06.675 2.47.968.957 2.136 1.104 2.776 1.11h.044c.825 0 1.59-.263 1.995-.657.555-.556.765-3.187-.21-4.224-.45-.468-1.335-.804-2.385-.906-.99-.088-1.875.058-2.265.394zM12 7.615c-.24 0-.525.015-.84.044.03.16.045.336.06.526l-.001.159a2.94 2.94 0 01-.014.25c.225-.022.425-.027.612-.028h.366c.187 0 .387.006.612.028-.015-.146-.015-.277-.015-.409.015-.19.03-.365.06-.526a9.29 9.29 0 00-.84-.044z`,cursor:`M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z`},Rr=P(0,1,e=>yr(e.a,e._.d)),zr=e=>{Rr._(e),Br._(e),xr(e.a,`M5 7L10 12L5 17 M13 17H20`)},Br=P(0,1,e=>br(e.a,e._.f)),Vr=P(0,0,e=>ht(e.a,[`icon`,e._.f])),Hr=e=>{Vr._(e),Ur._(e),Wr._(e)},Ur=P(0,0,e=>{z(e.a,`width`,e._.g),z(e.a,`height`,e._.g)}),Wr=P(0,0,e=>z(e.b,`d`,e._.h)),Gr=M(6,Ur),Kr=M(3,e=>{Gr(e,e.d??15),Rr(e)}),qr=O(0,`<svg viewBox="0 0 24 24" fill=currentColor fill-rule=evenodd aria-hidden=true><path></path></svg>`,` D `,Hr,gr,(e=>`/${e}&`)(_r),zr),Jr=M(7,e=>{qr(e,+!e.h),Wr(e)}),Yr=(e,t)=>Jr(e,iee[t]),Xr=M(5,e=>{Vr(e),Br(e)}),Zr=`<!><!><div class=palette role=dialog aria-label=Workspaces><!><input autofocus placeholder="Jump to workspace…" aria-label="Filter workspaces"><ul class=rows></ul><!><div class=palette-foot><span></span><span class="dim hint">↑↓ navigate · ↵ open · ⌘1–9 switch · esc close</span><!></div></div>`,Qr=`b%b D%b b b%bDc%m`,$r=(e,t)=>{z(e.a,`value`,t),V(e.b,t)},ei=(e,t)=>$r(e,t[0]),ti=(e,t)=>V(e.a,t),ni=(e,t)=>ti(e,t[0]?.worktree),ri=P(5,0,e=>{z(e.a,`title`,`${e._.r} open PR${e._.r===1?``:`s`}`),V(e.b,e._.r),V(e.c,e._.r===1?``:`s`)}),ii=ri,ai=P(6,0,e=>z(e.a,`title`,e._.o.map(e=>`:${e.port} ${e.cmd}`).join(`
3
3
  `))),oi=e=>{ai._(e),si._(e)},si=P(6,0,e=>V(e.b,e._.p)),ci=N(2,e=>z(e.a,`title`,`${e._.l} running session${e._.l===1?``:`s`}${e._.m?` — ${e._.m} working`:``}${e._.n?` — ${e._.n} waiting on you`:``}`),2),li=P(4,0,e=>{V(e.b,e._.l),ci(e)}),ui=e=>{li._(e),di._(e),fi._(e)},di=P(4,0,ci),fi=P(4,0,ci),pi=P(0,1,e=>V(e.a,e._.g)),mi=pi,hi=N(2,e=>V(e.b,e._.a3?`hide archived`:`archived (${e._.a6})`)),gi=P(5,0,hi),_i=L(`j8`,e=>A(e.a,`click`,function(){La(e._,!e._.a3)})),vi=e=>{gi._(e),yi._(e),_i(e)},yi=P(5,0,hi),bi=N(1,e=>zt(e,`a`,e._.o.preferredAgent,go(e))),xi=P(6,0,bi),Si=L(`j9`,e=>Bt(e,`a`)),Ci=e=>{xi._(e),Ti._(e),Ei._(e),Si(e)},wi=k(0,`<option> </option>`,` D `,0,ei),Ti=P(6,0,e=>wi(e,[e._.z,e=>e])),Ei=P(6,0,bi),Di=L(`j5`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.q(e._._.h,e.e)})),Oi=e=>{e.b,Kr(e.b,14),Xr(e.b),Di(e)},ki=M(4,e=>{Yr(e.b,e.e),V(e.c,e.e)}),Ai=k(6,(e=>`<button>${e}<!></button>`)(Lr),(e=>` D/${e}&%l`)(`b%c`),Oi,(e,t)=>ki(e,t[0])),ji=I(48,e=>Ai(e,[[...e._._.z||[],`shell`],e=>e]),e=>e._._),Mi=(e,t)=>{z(e.e,`popovertarget`,t),z(e.g,`id`,t)},Ni=L(`j6`,e=>{A(e.a,`click`,function(t){t.stopPropagation(),e._._.m(e._.h)}),A(e.c,`click`,function(t){t.stopPropagation(),e._._.n(e._.h)}),A(e.e,`click`,function(e){e.stopPropagation()}),A(e.g,`toggle`,function(t,n){if(t.newState===`open`){let t=e.e.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,t.right-n.offsetWidth)}px`}})}),Pi=e=>{ji(e),wr(e.b),Tr(e.b,13),Er(e.b),kr(e.d),Ar(e.d,13),jr(e.d),Pr(e.f),Fr(e.f,13),Ir(e.f),Mi(e,Qe(e)),Ni(e)},Fi=O(2,`<span class="chip open">open</span>`),Ii=N(18,e=>Fi(e,e._.i===e._._.k?0:1)),Li=I(45,Ii,e=>e._._),Ri=e=>{Li(e),Vi(e),Ui._(e),Wi._(e),Gi._(e),Ji._(e)},zi=(e,t)=>{ht(e.a,[`dot`,mr(t)]),Xi(e,t?.repos),Qi(e,t?.agents),$i(e,t?.working),ea(e,t?.waiting),na(e,t?.ports)},Bi=N(19,e=>zi(e,e._._.y[e._.i])),Vi=I(47,Bi,e=>e._._),Hi=O(3,`<span class=chip>archived</span>`),Ui=P(0,2,e=>Hi(e,+!e._.f)),Wi=P(0,2,e=>{Bi(e),Ii(e)}),Gi=P(0,2,e=>V(e.b,e._.j)),Ki=k(7,`<span class=mono> </span>`,`D `,0,ni),qi=N(10,e=>Ki(e,[e.j||e._.k,`full_name`])),Ji=P(0,2,qi),Yi=(e,t)=>aa(e,t?.length),Xi=M(9,e=>{Yi(e,(e.j||[]).flatMap(e=>e.prs||[])),qi(e)}),Zi=O(4,`<span class="chip stat"> </span>`,` D `,ui),Qi=M(11,e=>{Zi(e,+!e.l),li(e)}),$i=M(12,di),ea=M(13,fi),ta=O(6,`<span class="chip stat">:<!></span>`,` Db%`,oi),na=M(14,e=>{ra(e,e.o?.length),ta(e,+!(e.o||[]).length),ai(e)}),ra=M(15,si),ia=O(5,`<span class="chip stat"><!> PR<!></span>`,` D%c%`,ii),aa=M(17,e=>{ia(e,+!e.r),ri(e)}),oa=N(12,e=>gt(e.a,{hi:e.l===e._.ah,archived:e.e===`ws`&&e.f}),3),sa=Ke(4,oa),ca=L(`j7`,e=>{A(e.a,`click`,function(){e._.ai(e.d)}),A(e.a,`mouseenter`,function(){Ia(e._,e.l)})}),la=e=>{sa._(e),ca(e)},ua=O(0,`<span class=row-name>+ New workspace</span>`,0,0,`<span class="row-name cmd-row">▸ <!></span>`,`Db%`,mi,`<span class=row-name><span></span><span class=row-name-text> </span><!><!><span class=row-stats><!><!><!></span></span><span class=row-repos></span>`,`D bD l%b%bD%b%b%m `,Ri),da=O(1,((e,t,n)=>`<button class=row-more title="Review changes">${e}</button><button class=row-more title="Manage workspace">${t}</button><button class=row-more title="New session">${n}</button><div popover=auto class=new-session-pop></div>`)(Sr,Dr,Mr),((e,t,n)=>` D/${e}&l D/${t}&l D/${n}&l b`)(Cr,Or,Nr),Pi),fa=M(4,e=>{ua(e,e.e===`new`?0:e.e===`cmd`?1:2),da(e,e.e===`ws`?0:1),oa(e)}),pa=M(5,e=>{oa(e),Ui(e)}),ma=M(11,oa),ha=(e,t)=>{ga(e,t[0]),ma(e,t[1])},ga=M(3,e=>{fa(e,e.d?.kind),pa(e,e.d?.archived),_a(e,e.d?.label),va(e,e.d?.ws)}),_a=M(6,pi),va=M(7,e=>{ya(e,e.h?.id),ba(e,e.h?.name),xa(e,e.h?.repos)}),ya=M(8,Wi),ba=M(9,Gi),xa=M(10,Ji),Sa=L(`j4`,e=>A(e.a,`click`,function(){e._.v?.()})),Ca=k(4,`<li><div class=row-wrap><button class=row></button><!></div></li>`,`E b%`,la,ha),wa=N(40,L(`j12`,e=>Et(e,{onMount:function(){let t=new AbortController,n=e.ad.findIndex(t=>t.kind===`ws`&&t.ws.id===e.k);n>=0&&Ia(e,n),setTimeout(()=>e.d?.focus(),0);let r=t.signal;return document.addEventListener(`keydown`,t=>{document.querySelector(`:popover-open`)||t.key===`Escape`&&!e.u&&(t.preventDefault(),e.v?.())},{capture:!0,signal:r}),{abort:t}},onDestroy:function(){this.abort.abort()}})),3),Ta=M(39,e=>{Qa(e,e.ad.length),Ca(e,[e.ad,e=>e.kind===`new`?`new`:e.kind===`cmd`?`cmd:${e.label}`:e.ws.id]),wa(e)}),Ea=N(38,e=>Ta(e,[...e.a8(e.a4).map(e=>({kind:`ws`,ws:e})),...e.a3||e.a1?e.a8(e.a5).map(e=>({kind:`ws`,ws:e,archived:!0})):[],...e.ab,{kind:`new`}]),5),Da=M(34,Ea),Oa=M(37,Ea),ka=N(36,e=>Oa(e,!e.a1||!e.a9?[]:[{kind:`cmd`,label:`Review changes — ${e.a9?.name}`,run:()=>e.m(e.a9)},{kind:`cmd`,label:`Manage workspace — ${e.a9?.name}`,run:()=>e.n(e.a9)},{kind:`cmd`,label:`New ${e.p||`agent`} session — ${e.a9?.name}`,run:()=>e.q(e.a9,e.p||`claude`)}].filter(t=>t.kind===`cmd`&&pr(e.a1,t.label))),5),Aa=O(5,`<button class="archived-link dim"> </button>`,` D `,vi),ja=N(33,e=>Aa(e,e.a6&&!e.a1?0:1)),Ma=j(27,e=>{Ft(e,`d`,e.a1,vo(e)),Da(e,_o(e)),ka(e),Ea(e),ja(e)}),Na=L(`j11`,e=>e.e.children[e.ah]?.scrollIntoView({block:`nearest`})),Pa=M(43,e=>{sa(e),Na(e)}),Fa=N(42,e=>Pa(e,Math.min(e.a2,e.af-1))),Ia=j(28,Fa),La=j(29,e=>{Ea(e),gi(e)}),Ra=L(`j10`,e=>{It(e,`d`),A(e.d,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),Ia(e,Math.min(e.ah+1,e.ad.length-1))):t.key===`ArrowUp`?(t.preventDefault(),Ia(e,Math.max(e.ah-1,0))):t.key===`Enter`?(t.preventDefault(),e.ai(e.ad[e.ah])):t.key===`Escape`&&!e.u&&(t.preventDefault(),e.v?.())})});function za(e){Ma(e,``),Ia(e,0),La(e,!1),Ra(e)}var Ba=M(30,Ea),Va=M(31,e=>{Ga(e,e.a5?.length),Ea(e)}),Ha=M(35,ka),Ua=N(11,e=>Ha(e,e.j.find(t=>t.id===e.k))),Wa=M(9,e=>{co(e,e.j?.length),Ba(e,e.j.filter(e=>e.status===`active`)),Va(e,e.j.filter(e=>e.status===`archived`)),Ua(e)}),Ga=M(32,e=>{ja(e),yi(e)}),Ka=F(Li),qa=M(10,e=>{Ua(e),wa(e),Ka(e)}),Ja=M(12,ka),Ya=M(13,ka),Xa=M(15,ka),Za=M(16,ka),Qa=M(41,Fa),$a=M(44),eo=N(19,e=>$a(e,yo(e))),to=M(17,eo),no=M(18,eo),ro=O(0,`<div class=palette-backdrop></div>`,` `,Sa),io=O(2,`<div class="onboard dim"><p>A <strong>workspace</strong> checks out one or more repos as git worktrees on a shared branch and gives each agent session its own terminal. Create one to get started.</p><p>Pick your preferred agent below — new sessions and the quick-create button use it. GitHub access uses your <code>gh</code> login.</p></div>`),ao=N(23,e=>io(e,e.u&&!e.w?0:1)),oo=M(20,e=>{B(e.b,`inline`,e.u),ro(e,+!!e.u),wa(e),ao(e)}),so=M(21,wa),co=M(22,ao),lo=O(6,`<label class=dim><select aria-label="Preferred agent"></select></label>`,`D `,Ci),uo=M(14,e=>{Xa(e,e.o?.preferredAgent),po(e,e.o?.agents),lo(e,+!e.o),xi(e)}),fo=F(ji),po=M(25,e=>{fo(e),Ti(e)}),mo=M(24,F(Vi)),ho=M(26,Ei);function go(e){return function(t){e._.a0({...e._.o,preferredAgent:t}),H(`/api/settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({preferredAgent:t})}).catch(()=>{})}}function _o(e){return t=>t.filter(t=>pr(e.a1,t.name))}function vo(e){return function(t){Ma(e,t),Ia(e,0)}}function yo(e){return t=>{t&&(t.kind===`new`?e.r():t.kind===`cmd`?t.run():e.s(t.ws))}}R(`j1`,go),R(`j2`,_o),R(`j0`,vo),R(`j3`,yo);var bo=gr,xo=(e=>`/${e}&`)(_r);function So(e){xr(e.a,`M21.8883 13.5C21.1645 18.3113 17.013 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C16.1006 2 19.6248 4.46819 21.1679 8 M17 8H21.4C21.7314 8 22 7.73137 22 7.4V3`)}var Co=(e,t)=>yr(e.a,t),wo=(e,t)=>br(e.a,t),To=`<div class=add-repo><input placeholder="Add a repo…" aria-label="Add a repo"><!><!></div>`,Eo=`D b%b%l`,Do=null,aee=L(`l7`,e=>A(e.a,`click`,function(){e._._._._._.z(e._._._.i,e.d)})),oee=M(3,e=>V(e.b,e.d)),see=(e,t)=>oee(e,t[0]),Oo=I(33,e=>Ft(e,`a`,e._._._._._.y,Cs(e)),e=>e._._._._._),cee=L(`l6`,e=>It(e,`a`)),lee=e=>{Oo(e),cee(e)},uee=k(1,`<li><button class=result-row><span class="repo-name mono"> </span></button></li>`,`D E `,aee,see),dee=(e,t)=>{hee(e,t?.length),uee(e,[t,e=>e])},ko=N(5,e=>dee(e,(e._._._._.y?e._._._._.w.filter(t=>t.toLowerCase().includes(e._._._._.y.toLowerCase())):e._._._._.w).slice(0,12))),Ao=I(31,ko,e=>e._._._._),fee=e=>{Ao(e),jo(e),Mo(e)},pee=O(0,`<input placeholder="Filter branches…" aria-label="Filter branches" autofocus>`,` `,lee),jo=I(32,e=>pee(e,e._._._._.x>8?0:1),e=>e._._._._),Mo=I(33,ko,e=>e._._._._),mee=O(2,`<li><p class="dim empty-note">No branches match.</p></li>`),hee=(e,t)=>mee(e,+!!t),gee=O(0,`<p class="dim empty-note"><span class=spin></span> Loading branches…</p>`,0,0,`<!><!><ul class=branch-list><!><!></ul>`,`b%bD%b%`,fee),No=I(31,e=>gee(e,+!!e._._._.w),e=>e._._._),_ee=No,Po=N(11,e=>B(e.a,`hi`,e.k===e._._.p)),Fo=I(28,Po,e=>e._._),Io=L(`l8`,e=>{A(e.a,`mouseenter`,function(){ns(e._._,e.k)}),A(e.b,`click`,function(){e._._.z(e.i)}),A(e.e,`click`,function(){e._._.a0(e.i)})}),Lo=e=>{Fo(e),Bo(e),Pr(e.c),Fr(e.c,12),Ir(e.c,`result-plus`),Io(e)},Ro=O(5,`<div class=branch-pick></div>`,` `,_ee),zo=N(9,e=>{B(e.e,`on`,e._._.u===e.i),Ro(e,e._._.u===e.i?0:1)}),Bo=I(30,zo,e=>e._._),Vo=M(10,Po),Ho=M(8,e=>{V(e.d,e.i),z(e.e,`title`,`Pick a base branch for ${e.i}`),z(e.e,`aria-label`,`Pick a base branch for ${e.i}`),zo(e)}),Uo=k(0,(e=>`<li><div class=result-wrap><button class=result-row>${e}<span class=repo-name> </span></button><button class=result-branch>⎇</button></div><!></li>`)(Mr),(e=>`D D D/${e}&D m l%l`)(Nr),Lo,(e,t)=>{Ho(e,t[0]?.nameWithOwner),Vo(e,t[1])}),Wo=P(2,0,e=>Uo(e,[e._.r,`nameWithOwner`])),Go=Wo,Ko=P(2,1,e=>V(e.a,e._.m)),qo=Ko,Jo=M(17,e=>{_s(e,e.r?.length),Wo(e)}),Yo=N(14,e=>Jo(e,e.l&&e.m?fr(e.m,e.l?.repos,t=>e.i.has(t)):[]),2),Xo=O(1,`<p class="dim empty-note">Loading repos…</p>`),Zo=N(13,e=>Xo(e,e.m&&!e.l?0:1)),Qo=O(2,`<ul class=repo-results></ul>`,` `,Go,`<p class="dim empty-note">No repos match "<!>".</p>`,`Db%`,qo),$o=N(19,e=>Qo(e,e.s?0:e.m&&e.l?1:2),2),es=j(11,e=>{Yo(e),Zo(e),$o(e)}),ts=j(12,e=>{Ft(e,`a`,e.m,ws(e)),Yo(e),Zo(e),$o(e),Ko(e)}),ns=j(15,F(Fo)),rs=M(26),is=N(21,e=>rs(e,Ts(e))),as=F(Bo),os=j(20,e=>{is(e),as(e)}),ss=F(No,Ao),cs=j(22,e=>{ys(e,e.w?.length),ss(e)}),ls=j(24,F(Mo,Oo)),us=L(`l9`,e=>{It(e,`a`),A(e.a,`keydown`,function(t){t.key===`ArrowDown`?(t.preventDefault(),ns(e,Math.min(e.p+1,e.r?.length-1))):t.key===`ArrowUp`?(t.preventDefault(),ns(e,Math.max(e.p-1,0))):t.key===`Enter`?(t.preventDefault(),e.r[e.p]&&e.z(e.r[e.p].nameWithOwner)):t.key===`Escape`&&e.m&&(t.preventDefault(),ts(e,``))})});function ds(e){es(e,null),ts(e,``),ns(e,0),os(e,null),cs(e,null),ls(e,``),us(e)}var fs=L(`l10`,e=>Et(e,{onMount:function(){Do&&es(e,Do),e.q(!1)}})),ps=M(16,e=>{x(e,Es(e)),fs(e)}),ms=N(7,e=>ps(e,Ds(e))),hs=M(5,ms),gs=M(6,e=>{ms(e),is(e)}),_s=M(18,$o),vs=M(8,Yo),ys=M(23,F(jo)),bs=M(25),xs=M(9,e=>bs(e,Os(e))),Ss=(e,t)=>z(e.a,`disabled`,t);function Cs(e){return t=>{ls(e._._._._._,t)}}function ws(e){return function(t){ts(e,t),ns(e,0)}}function Ts(e){return async t=>{if(e.u===t){os(e,null);return}os(e,t),cs(e,null),ls(e,``);try{let n=await H(`/api/repos/branches?repo=${encodeURIComponent(t)}`);e.u===t&&cs(e,n.branches)}catch(t){os(e,null),e.g?.(String(t.message||t))}}}function Es(e){return()=>e.q(!0)}function Ds(e){return async t=>{t&&e.f?.(!0);try{let n=await H(`/api/repos${t?`?refresh`:``}`);Do=n,es(e,n)}catch(t){e.g?.(String(t.message||t))}t&&e.f?.(!1)}}function Os(e){return(t,n)=>{ts(e,``),os(e,null),e.j(t,n)}}R(`l1`,Cs),R(`l0`,ws),R(`l5`,Ts),R(`l2`,Es),R(`l3`,Ds),R(`l4`,Os);var ks=`<div class=manage-backdrop></div><div role=dialog><div class=manage><!></div><!></div>`,As=` b E%l%l`,js=de(2),Ms=L(`h0`,e=>A(e.a,`click`,function(){e._.h?.()})),Ns=ue(0),Ps=P(3,0,e=>Ns(e,e._.n)),Fs=Ps,Is=N(15,L(`h1`,e=>Et(e,{dismissable:e.o,onMount:function(){let t=new AbortController;return window.addEventListener(`keydown`,t=>{t.key!==`Escape`||!this.dismissable||t.target instanceof Element&&t.target.closest(`.palette:not(.inline)`)||t.target instanceof HTMLInputElement&&t.target.value||e.h?.()},{capture:!0,signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}}))),Ls=M(14,Is),Rs=(e,t)=>Ls(e,t!==!1),zs=L(`h2`,e=>A(e.a,`click`,function(){e.o&&e.h?.()})),Bs=(e,t)=>ht(e.b,[`manage-view`,t]),Vs=(e,t)=>z(e.b,`aria-label`,t),Hs=O(3,`<div class=manage-bar><!></div>`,`D%`,Fs,`<div class=manage-bar><button class="btn primary">Done</button></div>`,`D `,Ms),Us=N(12,e=>Hs(e,e.l?0:e.h?1:2)),Ws=M(7,e=>{Us(e),Is(e)}),Gs=M(11,e=>{Ks(e,e.l?.content),Us(e)}),Ks=M(13,Ps),qs=ks,Js=(e=>`/${e}&`)(As),Ys=new Map,Xs=M(3,e=>{z(e.a,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.d}`),V(e.b,e.d)}),Zs=L(`g23`,e=>A(e.a,`click`,function(){window.open(`http://${location.hostname}:${e.d}`,`_blank`,`noopener`)})),Qs=(e,t)=>Xs(e,t[0]),$s=(e,t)=>V(e.a,t),ec=(e,t)=>$s(e,t[0]),tc=P(2,0,e=>V(e.a,e._.j)),nc=tc,rc=P(0,0,e=>V(e.a,e._.e)),ic=rc,ac=(e,t)=>z(e.a,`title`,t),oc=(e,t)=>V(e.b,t),sc=k(2,`<button class="chip port-link">:<!></button>`,` Db%`,Zs,Qs),cc=(e,t)=>sc(e,[t,e=>String(e)]),lc=M(9,e=>z(e.d,`title`,`Kill ${e.j}`)),uc=L(`g24`,e=>A(e.d,`click`,function(){e._._._.ag(e.j)})),dc=(e,t)=>{ac(e,t[0]?.args),oc(e,t[0]?.cmd),cc(e,t[0]?.ports),lc(e,t[0]?.pid)},fc=P(6,0,e=>z(e.a,`title`,`Confirm #${e._.p} is done — remove from this list`)),pc=L(`g19`,e=>A(e.a,`click`,function(){e._._._._._.a8(e._._.g,e._.p)})),mc=O(6,`<button class=pr-dismiss>✓</button>`,` `,e=>{fc._(e),pc(e)}),hc=N(11,e=>V(e.b,e.j===`OPEN`&&e.k?`draft`:e.j.toLowerCase())),gc=O(2,`<span class="pr-state open" title=Approved>✓</span>`,0,0,`<span class="pr-state closed" title="Changes requested">✗</span>`),_c=N(13,e=>gc(e,e.j===`OPEN`&&e.m===`APPROVED`?0:e.j===`OPEN`&&e.m===`CHANGES_REQUESTED`?1:2)),vc=M(9,e=>{ht(e.a,[`pr-state`,e.j.toLowerCase()]),mc(e,+(e.j===`OPEN`)),hc(e),_c(e)}),yc=M(10,hc),bc=M(12,_c),xc=(e,t)=>z(e.d,`href`,t),Sc=M(15,e=>{V(e.e,e.p),fc(e)}),Cc=(e,t)=>V(e.f,t),wc=(e,t)=>{vc(e,t[0]?.state),yc(e,t[0]?.isDraft),bc(e,t[0]?.reviewDecision),xc(e,t[0]?.url),Sc(e,t[0]?.number),Cc(e,t[0]?.title)},Tc=P(0,0,e=>V(e.b,e._.e)),Ec=L(`g18`,e=>A(e.a,`click`,function(){e._._._.a7()})),Dc=e=>{Tc._(e),Ec(e)},Oc=I(54,e=>V(e.a,e._._.s),e=>e._._),kc=Oc,Ac=N(2,e=>{B(e.a,`armed`,e._._._.r===e._.h),V(e.b,e._._._.r===e._.h?`remove?`:`×`)}),jc=N(3,e=>z(e.a,`title`,e._._._.r===e._.h?`Really remove ${e._.g}/? Uncommitted changes are lost.`:`Remove ${e._.g}/`),2),Mc=I(53,e=>{Ac(e),jc(e)},e=>e._._._),Nc=L(`g21`,e=>A(e.a,`click`,function(){e._._._.r===e._.f?.full_name?(bu(e._._._,null),e._._._.ae(e._.f)):(bu(e._._._,e._.f?.full_name),setTimeout(()=>{bu(e._._._,null)},4e3))})),Pc=e=>{Mc(e),Fc._(e),Ic._(e),Nc(e)},Fc=P(3,1,jc),Ic=P(3,1,e=>{Ac(e),jc(e)}),Lc=I(51,e=>z(e.a,`disabled`,!!e._._.p),e=>e._._),Rc=L(`g15`,e=>A(e.a,`click`,function(){e._._.af(`restore`)})),zc=e=>{Lc(e),Rc(e)},Bc=I(51,e=>{z(e.a,`disabled`,!!e._._.p),V(e.b,e._._.p===`archive`?`Archiving…`:`Archive`)},e=>e._._),Vc=L(`g14`,e=>A(e.a,`click`,function(){e._._.af(`archive`)})),Hc=e=>{Bc(e),Vc(e)},Uc=I(50,e=>V(e.a,e._._.o),e=>e._._),Wc=L(`g17`,e=>A(e.b,`click`,function(){hu(e._._,null)})),Gc=e=>{Uc(e),Wc(e)},Kc=O(3,`<span class=spin></span>`,0,0,`<button class=cur-remove> </button>`,` D `,Pc),qc=N(8,e=>Kc(e,+!e._._.m.has(e.h))),Jc=I(48,qc,e=>e._._),Yc=Jc,Xc=M(6,e=>{V(e.a,e.g),Fc(e)}),Zc=M(7,e=>{V(e.b,e.h),qc(e),Ic(e)}),Qc=O(2,`<span class="cur-base mono" title="Base branch">⎇ <!></span>`,`Db%`,nc),$c=N(11,e=>Qc(e,+(e.j===e.k))),el=M(9,e=>{$c(e),tc(e)}),tl=M(10,$c),nl=(e,t)=>rl(e,t[0]),rl=M(5,e=>{Xc(e,e.f?.worktree),Zc(e,e.f?.full_name),el(e,e.f?.base_branch),tl(e,e.f?.default_branch)}),il=O(0,`<div class="pr-repo-name mono dim"> </div>`,`D `,ic),al=I(46,e=>il(e,e._._._.k>1?0:1),e=>e._._._),ol=al,sl=k(1,`<li><span> </span><!><a class=pr-link target=_blank rel=noopener><span class="dim mono">#<!></span> </a><span class=pr-spacer></span><!></li>`,`D D l%b Eb%l lb%`,0,wc),cl=(e,t)=>sl(e,[t,`number`]),ll=(e,t)=>{ul(e,t[0]?.worktree),cl(e,t[0]?.prs),dl(e,t[0]?.full_name)},ul=M(4,rc),dl=M(6),fl=O(0,`<button class=btn title="Confirm every merged/closed PR is done — remove them from this list">Clear <!> finished</button>`,` Db%`,Dc),pl=M(4,e=>{fl(e,+!e.e),Tc(e)}),ml=k(3,`<div class=pr-repo><!><ul class=pr-list></ul></div>`,`D%b `,ol,ll),hl=I(45,e=>{pl(e,(e._._.j||[]).reduce((e,t)=>e+t.prs.filter(e=>e.state!==`OPEN`).length,0)),ml(e,[e._._.j.filter(e=>e.prs.length),`full_name`])},e=>e._._),gl=L(`g20`,e=>A(e.b,`click`,function(){e._._.a6()})),_l=e=>{hl(e),vl(e),So(e.c),Co(e.c,13),wo(e.c),gl(e)},vl=I(47,e=>{B(e.b,`spinning`,e._._.l),z(e.b,`disabled`,e._._.l)},e=>e._._),yl=k(0,`<li><span class="mono proc-cmd"><!><!></span><button class=proc-kill>×</button></li>`,`D D%b%l `,uc,dc),bl=I(44,e=>yl(e,[e._._.i,`pid`]),e=>e._._),xl=bl,Sl=et(12),Cl=I(43,e=>{B(e.e,`spinning`,e._.h),z(e.e,`disabled`,e._.h)}),wl=L(`g25`,e=>A(e.e,`click`,function(){Sl(e)()})),Tl=e=>{Cl(e),Dl(e),kl(e),Ml(e),Fl(e),Ll(e),zl(e),Bl(e),Hl(e),Ul(e),Wl(e),Gl(e),Kl(e),So(e.f),Co(e.f,13),wo(e.f),Ze(e,9,ql),ds(e.j),gs(e.j,ed(e)),hs(e.j,$u(e)),Ss(e.j),wl(e)},El=O(11,`<section><h3>Processes</h3><ul class=procs></ul></section>`,`Db `,xl),Dl=I(44,e=>El(e,e._.i&&e._.i?.length?0:1)),Ol=O(3,(e=>`<section><div class=repos-head><h3>Pull requests</h3><!><button class=icon-btn title="Refresh PRs">${e}</button></div><!></section>`)(bo),(e=>`Eb%b D/${e}&m%l`)(xo),_l),kl=I(45,e=>Ol(e,e._.j&&e._.j.some(e=>e.prs.length)?0:1)),Al=k(7,`<li class="cur-repo pending"><span class=spin></span><span class="dim cur-full"> </span></li>`,`DbD `,0,ec),jl=N(13,e=>Al(e,[[...e._.m].filter(t=>!e._.a9.has(t)),e=>e])),Ml=I(48,jl),Nl=O(8,`<li class="dim empty-note">No repos yet — search below to add one.</li>`),Pl=N(14,e=>Nl(e,!e._.a1&&!e._.n?0:1)),Fl=I(49,Pl),Il=O(2,`<p class=toast-error><!> <button>×</button></p>`,`D%c `,Gc),Ll=I(50,e=>Il(e,+!e._.o)),Rl=k(6,`<li class=cur-repo><span class="mono cur-worktree"><!>/</span><span class="dim cur-full"> </span><!><!></li>`,`E%lD l%b%`,Yc,nl),zl=I(55,e=>Rl(e,[e._.w,`full_name`])),Bl=I(56,e=>V(e.a,e._.x)),Vl=N(15,e=>V(e.b,e._.z||e._.a0)),Hl=I(58,Vl),Ul=I(59,Vl),Wl=I(60,Pl),Gl=I(61,e=>{vs(e.j,e._.a9),jl(e)}),Kl=I(62,e=>xs(e.j,td(e))),ql=it(`g22`,M(12)),Jl=ut(`g27`,((e,t)=>`<header class=manage-head><div><h2> </h2><p class="dim mono"> </p></div></header><!><!><section><div class=repos-head><h3>Repos</h3><button class=icon-btn title="Refresh repo list">${e}</button></div><ul class=cur-repos><!><!><!></ul>${t}</section><!><!>`)(bo,To),((e,t)=>`F lD n%b%bEb D/${e}&mD%b%b%l0${t}&l%c`)(xo,Eo),Tl,0,`B2`),Yl=O(1,`<span class="act-step dim"><span class=spin></span> </span>`,`Db `,kc),Xl=N(6,e=>Yl(e,e._.p&&e._.s?0:1)),Zl=N(5,e=>V(e.e,e._.p===`delete`?`Deleting…`:e._.q?`Really delete?`:`Delete`)),Ql=I(51,e=>{z(e.a,`disabled`,!!e._.p),z(e.d,`disabled`,!!e._.p),Xl(e),Zl(e)}),$l=L(`g16`,e=>{A(e.a,`click`,function(){e._.g?.()}),A(e.d,`click`,function(){e._.q?(yu(e._,!1),e._.af(`delete`)):(yu(e._,!0),setTimeout(()=>{yu(e._,!1)},4e3))})}),eu=e=>{Ql(e),tu(e),nu(e),iu(e),$l(e)},tu=I(52,e=>{B(e.d,`armed`,e._.q),Zl(e)}),nu=I(54,Xl),ru=O(2,`<button class=btn> </button>`,` D `,Hc,`<button class=btn>Restore</button>`,` `,zc),iu=I(57,e=>ru(e,e._.y===`active`?0:1)),au=dt(`g26`,`<button class="btn primary">Done</button><!><div class=spacer></div><!><button class="btn danger"> </button>`,` b%c%b D `,eu),ou=j(7,F(Cl)),su=j(11,F(vl)),cu=M(39,F(Kl)),lu=N(38,e=>cu(e,nd(e)),3),uu=M(40),du=N(37,e=>uu(e,rd(e)),3),fu=M(36,e=>{lu(e),du(e)}),pu=F(Ml,Jc),mu=j(12,e=>{ju(e,e.m?.size),fu(e,id(e)),lu(e),du(e),pu(e)}),hu=j(14,F(Ll,Uc)),gu=N(31,L(`g28`,e=>Et(e,{busyCount:e.n,pendingAction:e.p,onMount:function(){let t=new AbortController,n=t.signal;return kn().addEventListener(`workspace.progress`,t=>{(this.pendingAction||this.busyCount)&&t.data?.message&&t.data.op===e.u&&xu(e,t.data.message)},{signal:n}),e.a2(n),e.a3(n,!1).then(()=>e.a3(n,!0)),{abort:t}},onDestroy:function(){this.abort.abort()}})),4),_u=F(Ql,Bc,Lc),vu=j(15,e=>{gu(e),_u(e)}),yu=j(16,F(tu)),bu=j(17,F(Mc)),xu=j(18,F(nu,Oc));function Su(e){zs(e.a),Gs(e.a,on({content:au(e)})),js(e.a,Jl(e)),Rs(e.a),Bs(e.a),ou(e,!1),su(e,!1),mu(e,new Set),hu(e,null),vu(e,null),yu(e,!1),bu(e,null),xu(e,null)}var Cu=j(8,F(Dl,bl)),wu=M(33),Tu=N(30,e=>wu(e,ad(e)),2),Eu=F(kl,hl),Du=j(9,e=>{ku(e,e.j?.length),Tu(e),Eu(e)}),Ou=(e,t)=>{Cu(e,Ys.get(`procs:${t}`)||null),Du(e,Ys.get(`prs:${t}`)||null)},ku=M(10,F(al)),Au=F(Fl),ju=M(13,e=>{gu(e),Au(e)}),Mu=M(19,e=>{Bu(e,e.t?.id),Uu(e,e.t?.repos),Ku(e,e.t?.name),qu(e,e.t?.status),Ju(e,e.t?.display_path),Yu(e,e.t?.path),du(e)}),Nu=M(42),Pu=M(28,e=>{Nu(e,od(e)),gu(e)}),Fu=M(32),Iu=M(29,e=>{Fu(e,cd(e)),gu(e),Tu(e)}),Lu=M(34),Ru=M(41),zu=N(21,e=>Ru(e,dd(e))),Bu=M(20,e=>{Pu(e,sd(e)),Iu(e,ld(e)),Lu(e,ud(e)),gu(e),Tu(e),lu(e),zu(e)}),Vu=M(35,F(Gl)),Hu=F(zl),Uu=M(22,e=>{Wu(e,e.w?.length),Vu(e,new Set(e.w.map(e=>e.full_name))),Hu(e)}),Wu=M(27,F(Wl)),Gu=F(Bl),Ku=M(23,e=>{Vs(e.a,`Manage ${e.x}`),Gu(e)}),qu=M(24,F(iu)),Ju=M(25,F(Hl)),Yu=M(26,F(Ul)),Xu=(e,t)=>{Ou(e,t?.id),Mu(e,t)},Zu=M(5,e=>{lu(e),du(e)}),Qu=M(6,e=>{Ws(e.a,fd(e)),zu(e)});function $u(e){return function(t){ou(e._,t)}}function ed(e){return function(t){hu(e._,t)}}function td(e){return function(t,n){e._.ad(t,n)}}function nd(e){return async(t,n)=>{if(!(!t||e.m.has(t))){hu(e,null),e.aa(t,!0);try{let r=await H(`/api/workspaces/${e.u}/repos`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,baseBranch:n})});e.f?.(r)}catch(t){hu(e,String(t.message||t))}e.aa(t,!1)}}}function rd(e){return async t=>{if(!e.m.has(t.full_name)){hu(e,null),e.aa(t.full_name,!0);try{await H(`/api/workspaces/${e.t?.id}/repos/${encodeURIComponent(t.worktree)}`,{method:`DELETE`}),e.f?.({...e.t,repos:(e.t?.repos).filter(e=>e.full_name!==t.full_name)})}catch(t){hu(e,String(t.message||t))}e.aa(t.full_name,!1)}}}function id(e){return(t,n)=>{let r=new Set(e.m);n?r.add(t):r.delete(t),mu(e,r)}}function ad(e){return async()=>{for(let t of e.j||[])for(let n of t.prs)n.state!==`OPEN`&&await H(`/api/workspaces/${e.u}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t.full_name,number:n.number})}).catch(()=>{});await e.a3(void 0,!1)}}function od(e){return async t=>{await fetch(`/api/procs/${t}`,{method:`DELETE`}),setTimeout(()=>e.a2(void 0),500)}}function sd(e){return async t=>{try{let n=await H(`/api/workspaces/${e.u}/procs`,{signal:t});Cu(e,n),Ys.set(`procs:${e.u}`,n)}catch{}}}function cd(e){return async()=>{su(e,!0),await e.a3(void 0,!0),su(e,!1)}}function ld(e){return async(t,n)=>{try{let r=await H(`/api/workspaces/${e.u}/prs${n?`?refresh`:``}`,{signal:t});Du(e,r),Ys.set(`prs:${e.u}`,r)}catch{}}}function ud(e){return async(t,n)=>{hu(e,null);try{let r=await H(`/api/workspaces/${e.u}/prs`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({fullName:t,number:n})});Du(e,r),Ys.set(`prs:${e.u}`,r)}catch(t){hu(e,String(t.message||t))}}}function dd(e){return async t=>{hu(e,null),vu(e,t),xu(e,null);try{await H(`/api/workspaces/${e.u}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:t})}),t===`delete`&&e.g?.()}catch(t){hu(e,String(t.message||t))}finally{vu(e,null),xu(e,null)}}}function fd(e){return function(){e.g?.()}}R(`g13`,$u),R(`g12`,ed),R(`g11`,td),R(`g6`,nd),R(`g7`,rd),R(`g5`,id),R(`g3`,ad),R(`g9`,od),R(`g0`,sd),R(`g2`,cd),R(`g1`,ld),R(`g4`,ud),R(`g8`,dd),R(`g10`,fd);var pd=ks,md=(e=>`/${e}&`)(As),hd=P(1,0,e=>V(e.a,e._.g)),gd=hd,_d=O(1,`<span class=spin></span>`,0,0,`<span class=step-done>✓</span>`),vd=I(30,e=>{B(e.a,`active`,e.M===e._._._.m-1),_d(e,e.M===e._._._.m-1?0:1)},e=>e._._._),yd=vd,bd=(e,t)=>V(e.c,t),xd=k(0,`<li><!><!></li>`,` D%b%`,yd,(e,t)=>bd(e,t[0])),Sd=I(29,e=>xd(e,[e._._.l]),e=>e._._),Cd=Sd,wd=I(28,e=>V(e.a,e._._.k),e=>e._._),Td=L(`i10`,e=>A(e.b,`click`,function(){_f(e._._,null)})),Ed=e=>{wd(e),Td(e)},Dd=I(27,e=>z(e.c,`disabled`,e._._.j),e=>e._._),Od=L(`i11`,e=>A(e.c,`click`,function(){e._._.v(e.f)})),kd=e=>{Dd(e),Od(e)},Ad=M(5,e=>{V(e.a,e.f),z(e.c,`title`,`Remove ${e.f}`)}),jd=O(1,`<span class="cur-base mono" title="Base branch">⎇ <!></span>`,`Db%`,gd),Md=M(6,e=>{jd(e,+!e.g),hd(e)}),Nd=(e,t)=>{Ad(e,t[0]?.fullName),Md(e,t[0]?.baseBranch)},Pd=et(9),Fd=I(23,e=>Ft(e,`b`,e._.f,Af(e))),Id=L(`i13`,e=>{It(e,`b`),A(e.c,`click`,function(){Pd(e)()})}),Ld=e=>{Fd(e),Rd(e),Bd(e),Hd(e),Gd(e),qd(e),Jd(e),Yd(e),So(e.d),Co(e.d,13),wo(e.d),Ze(e,6,Xd),ds(e.g),gs(e.g,Mf(e)),hs(e.g,jf(e)),Id(e)},Rd=I(24,e=>{B(e.c,`spinning`,e._.g),z(e.c,`disabled`,e._.g)}),zd=k(4,`<li class=cur-repo><span class=cur-full> </span><!><button class=cur-remove>×</button></li>`,`E l%b `,kd,Nd),Bd=I(25,e=>{vs(e.g,new Set(e._.h.map(e=>e.fullName))),zd(e,[e._.h,`fullName`])}),Vd=O(5,`<li class="dim empty-note">No repos yet — search below to add one (or create empty).</li>`),Hd=I(26,e=>Vd(e,+!!e._.i)),Ud=O(8,`<ul class=steps></ul>`,` `,Cd),Wd=N(10,e=>Ud(e,e._.j&&e._.m?0:1)),Gd=I(27,e=>{z(e.b,`disabled`,e._.j),Ss(e.g,e._.j),Wd(e)}),Kd=O(0,`<p class=toast-error><!> <button>×</button></p>`,`D%c `,Ed),qd=I(28,e=>Kd(e,+!e._.k)),Jd=I(30,Wd),Yd=I(31,e=>xs(e.g,Nf(e))),Xd=it(`i12`,M(9)),Zd=ut(`i15`,((e,t)=>`<header class=manage-head><div><h2>New workspace</h2></div></header><!><label class=field><span>Name</span><input placeholder=my-feature autofocus></label><section><div class=repos-head><h3>Repos</h3><button class=icon-btn title="Refresh repo list">${e}</button></div><ul class=cur-repos><!><!></ul>${t}</section><!><!>`)(bo,To),((e,t)=>`b%bDb lEb D/${e}&mD%b%l0${t}&l%c`)(xo,Eo),Ld,0,`B2`),Qd=N(3,e=>z(e.a,`disabled`,e._.j||!e._.f.trim())),$d=I(23,Qd),ef=L(`i9`,e=>{A(e.a,`click`,function(){e._.w()}),A(e.c,`click`,function(){e._.e?.()})}),tf=e=>{$d(e),nf(e),ef(e)},nf=I(27,e=>{V(e.b,e._.j?`Creating…`:`Create workspace`),z(e.c,`disabled`,e._.j),Qd(e)}),rf=dt(`i14`,`<button class="btn primary"> </button><div class=spacer></div><button class=btn>Cancel</button>`,` D lb `,tf),af=M(22),of=N(19,e=>af(e,Pf(e)),5),sf=F($d,Fd),cf=j(5,e=>{of(e),sf(e)}),lf=j(6,F(Rd)),uf=M(20,F(Yd)),df=M(21),ff=F(Bd),pf=j(7,e=>{wf(e,e.h?.length),uf(e,Ff(e)),df(e,If(e)),of(e),ff(e)}),mf=N(18,L(`i16`,e=>Et(e,{busy:e.j,onMount:function(){let t=new AbortController;return kn().addEventListener(`workspace.progress`,t=>{this.busy&&t.data?.message&&e.r([t.data])},{signal:t.signal}),{abort:t}},onDestroy:function(){this.abort.abort()}}))),hf=F(nf,Gd,Dd),gf=j(9,e=>{Rs(e.a,!e.j),mf(e),hf(e)}),_f=j(10,F(qd,wd)),vf=M(17,e=>{mf(e),of(e)}),yf=N(16,e=>vf(e,Lf(e)),2),bf=F(Sd),xf=j(11,e=>{Tf(e,e.l?.length),yf(e),bf(e)}),Sf=(e,t)=>{Ef(e,t.op),Df(e,t.last)};function Cf(e){zs(e.a),Gs(e.a,on({content:rf(e)})),js(e.a,Zd(e)),Vs(e.a,`New workspace`),Bs(e.a,`new-ws`),cf(e,``),lf(e,!1),pf(e,[]),gf(e,!1),_f(e,null),xf(e,[]),Sf(e,{last:0,op:``})}var wf=M(8,F(Hd)),Tf=M(12,F(Jd,vd)),Ef=M(14,e=>{yf(e),of(e)}),Df=M(15,e=>{yf(e),of(e)}),Of=M(3,of),kf=M(4,e=>Ws(e.a,Rf(e)));function Af(e){return t=>{cf(e._,t)}}function jf(e){return function(t){lf(e._,t)}}function Mf(e){return function(t){_f(e._,t)}}function Nf(e){return function(t,n){e._.u(t,n)}}function Pf(e){return async()=>{gf(e,!0),_f(e,null),xf(e,[]),e.o=Math.random().toString(36).slice(2,10);try{e.p=(await H(`/api/progress`)).seq}catch{}let t=setInterval(async()=>{try{let t=await H(`/api/progress?since=${e.p}&op=${e.o}`);e.r(t.messages)}catch{}},800);try{let t=await H(`/api/workspaces`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e.f,repos:e.h,opId:e.o})});gf(e,!1),e.d?.(t)}catch(t){gf(e,!1),_f(e,String(t.message||t))}finally{clearInterval(t)}}}function Ff(e){return(t,n)=>{!t||e.h.some(e=>e.fullName===t)||pf(e,e.h.concat({fullName:t,baseBranch:n}))}}function If(e){return t=>{pf(e,e.h.filter(e=>e.fullName!==t))}}function Lf(e){return t=>{for(let n of t)n.op===e.o&&(n.seq&&n.seq<=e.p||(n.seq&&(e.p=n.seq),xf(e,e.l.concat(n.message))))}}function Rf(e){return function(){e.e?.()}}R(`i0`,Af),R(`i8`,jf),R(`i7`,Mf),R(`i6`,Nf),R(`i4`,Pf),R(`i2`,Ff),R(`i3`,If),R(`i1`,Lf),R(`i5`,Rf);var zf=gr,Bf=(e=>`/${e}&`)(_r);function Vf(e){xr(e.a,`M14.3632 5.65156L15.8431 4.17157C16.6242 3.39052 17.8905 3.39052 18.6716 4.17157L20.0858 5.58579C20.8668 6.36683 20.8668 7.63316 20.0858 8.41421L18.6058 9.8942M14.3632 5.65156L4.74749 15.2672C4.41542 15.5993 4.21079 16.0376 4.16947 16.5054L3.92738 19.2459C3.87261 19.8659 4.39148 20.3848 5.0115 20.33L7.75191 20.0879C8.21972 20.0466 8.65806 19.8419 8.99013 19.5099L18.6058 9.8942M14.3632 5.65156L18.6058 9.8942`)}var Hf=(e,t)=>yr(e.a,t),Uf=(e,t)=>br(e.a,t),Wf=`<!><!><!>`,Gf=N(9,e=>B(e.d,`armed`,e._._._._.w===e.i)),Kf=N(10,e=>z(e.d,`title`,e._._._._.w===e.i?`Really kill ${e.g}?`:`Kill ${e.g} (pid ${e.i})`),2),qf=I(39,e=>{Gf(e),Kf(e)},e=>e._._._._),Jf=L(`m8`,e=>{A(e.b,`click`,function(){window.open(`http://${location.hostname}:${e.h}`,`_blank`,`noopener`)}),A(e.d,`click`,function(){e._._._._.w===e.i?(pm(e._._._._,null),fetch(`/api/procs/${e.i}`,{method:`DELETE`}).catch(()=>{})):e._._._._.z(()=>{pm(e._._._._,e.i)})})}),Yf=e=>{qf(e),Jf(e)},Xf=M(6,e=>{z(e.a,`title`,e.g),Kf(e)}),Zf=M(7,e=>{z(e.b,`title`,`Open http://${typeof location>`u`?`localhost`:location.hostname}:${e.h}`),V(e.c,e.h)}),Qf=M(8,e=>{Gf(e),Kf(e)}),$f=(e,t)=>{Xf(e,t[0]?.cmd),Zf(e,t[0]?.port),Qf(e,t[0]?.pid)},ep=N(12,e=>V(e.b,e._._.c(e._.c))),tp=I(3,ep,e=>e._._),np=L(`m7`,e=>A(e.a,`click`,function(){e._._._._._.u?.(e._.e,e.l)})),rp=e=>{tp(e),ip._(e),op._(e),np(e)},ip=Ke(0,ep),ap=N(10,e=>z(e.a,`title`,`${e._.e} — ${e.j}${e.h===`APPROVED`?` (approved)`:e.h===`CHANGES_REQUESTED`?` (changes requested)`:``}`),2),op=Ke(0,ap),sp=N(8,e=>gt(e.a,{draft:e.g,rejected:e.h===`CHANGES_REQUESTED`})),cp=M(6,sp),lp=M(7,e=>{V(e.d,e.h===`APPROVED`?` ✓`:e.h===`CHANGES_REQUESTED`?` ✗`:``),sp(e),ap(e)}),up=M(9,ap),dp=M(11,e=>V(e.c,e.l)),fp=k(0,`<button class="chip pr"><!>#<!><!></button>`,` D%c%b%`,rp,(e,t)=>{cp(e,t[0]?.isDraft),lp(e,t[0]?.reviewDecision),up(e,t[0]?.title),dp(e,t[0]?.number)}),pp=(e,t)=>fp(e,[t||[],`number`]),mp=(e,t)=>hp(e,t[0]),hp=M(2,e=>{pp(e,e.c?.prs),gp(e,e.c?.worktree),ip(e)}),gp=M(4,op),_p=M(2,F(tp)),vp=k(0,`<!><!><!>`,`b%`,0,mp),yp=I(6,e=>{_p(e,zm(e)),vp(e,[e._._.c||[],`full_name`])},e=>e._._),bp=e=>{yp(e),Sp(e)},xp=k(1,`<span class="chip port-chip"><button class=port-open>:<!></button><button class=port-kill>×</button></span>`,` D Db%l `,Yf,$f),Sp=I(7,e=>xp(e,[e._._.d||[],`port`]),e=>e._._),Cp=N(11,e=>B(e.a,`current`,e.k===e._._._.q)),wp=I(37,Cp,e=>e._._._),Tp=L(`m6`,e=>{A(e.b,`click`,function(){e._._._.r?.(e.k)}),A(e.f,`click`,function(){e._._._.s?.(e.j)}),A(e.h,`click`,function(){e._._._.v===e.k?(fm(e._._._,null),e._._._.t?.(e.k)):e._._._.z(()=>{fm(e._._._,e.k)})})}),Ep=e=>{wp(e),Op(e),e.d,Kr(e.d,13),Xr(e.d,`sess-icon`),Vf(e.g),Hf(e.g,12),Uf(e.g),Tp(e)},Dp=N(12,e=>{B(e.h,`armed`,e._._._.v===e.k),z(e.h,`title`,e._._._.v===e.k?`Really kill this session?`:`Kill session`)}),Op=I(38,Dp,e=>e._._._),vee=M(10,e=>{Cp(e),Dp(e)}),yee=(e,t)=>ht(e.c,[`dot`,hr(t)]),kp=N(16,e=>V(e.e,e.p||e.o)),bee=M(14,e=>{Yr(e.d,e.o),kp(e)}),xee=M(15,kp),See=(e,t)=>Cee(e,t[0]),Cee=M(9,e=>{vee(e,e.j?.id),yee(e,e.j?.state),bee(e,e.j?.agent),xee(e,e.j?.title)}),wee=L(`m4`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._.n?.(e.e)})),Tee=e=>{e.b,Kr(e.b,14),Xr(e.b),wee(e)},Eee=M(4,e=>{Yr(e.b,e.e),V(e.c,e.e)}),Dee=k(2,(e=>`<button>${e}<!></button>`)(Lr),(e=>` D/${e}&%l`)(`b%c`),Tee,(e,t)=>Eee(e,t[0])),Ap=I(35,e=>Dee(e,[[...e._._._.o||[],`shell`],e=>e]),e=>e._._._),Oee=(e,t)=>{z(e.a,`popovertarget`,t),z(e.c,`id`,t)},kee=L(`m5`,e=>A(e.c,`toggle`,function(t,n){if(t.newState===`open`){let t=e.a.getBoundingClientRect();n.style.top=`${t.bottom+4}px`,n.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-n.offsetWidth-8))}px`}})),jp=e=>{Ap(e),e.b,Yr(e.b,`shell`),Kr(e.b,12),Xr(e.b),Oee(e,Qe(e)),kee(e)},Mp=L(`m3`,e=>A(e.a,`click`,function(){e._._._.l?.()})),Np=e=>{wr(e.b),Tr(e.b,12),Er(e.b),Mp(e)},Pp=I(31,e=>B(e.a,`current`,e._._.i),e=>e._._),Fp=L(`m9`,e=>{A(e.b,`click`,function(){e._._.j()}),A(e.f,`click`,function(){e._._.m?.()})}),Ip=e=>{Pp(e),Rp(e),Bp(e),Up(e),Wp(e),qp._(e),Jp._(e),Yp._(e),kr(e.g),Ar(e.g,12),jr(e.g),Fp(e)},Lp=O(4,(e=>`<button class="row-icon new-sess" title="Review changes">${e}</button>`)(Sr),(e=>` D/${e}&l`)(Cr),Np),Rp=I(33,e=>Lp(e,+!e._._.l),e=>e._._),zp=O(7,(e=>`<button class="row-icon new-sess" title="New session">${e}</button><div popover=auto class=new-session-pop></div>`)(Lr),(e=>` D/${e}&l b`)(`b%c`),jp),Bp=I(34,e=>zp(e,+!e._._.n),e=>e._._),Vp=k(8,((e,t)=>`<div class=side-sess><button class=side-sess-btn><span></span>${e}<!></button><button class=row-icon title="Rename session">${t}</button><button class=close>×</button></div>`)(Lr,zf),((e,t)=>` D D b/${e}&%l D/${t}&l l`)(`b%c`,Bf),Ep,See),Hp=(e,t)=>Vp(e,[t.length>1?t:[],`id`]),Up=I(36,e=>Hp(e,e._._.p||[]),e=>e._._),Wp=I(40,e=>V(e.d,e._._.a1),e=>e._._),Gp=O(9,`<div class=side-chips><!><!></div>`,`D%b%`,bp),Kp=N(11,e=>Gp(e,(e._.c||[]).some(e=>(e.prs||[]).length)||(e._.d||[]).length?0:1)),qp=P(0,1,Kp),Jp=P(0,1,Kp),Yp=P(0,1,e=>ht(e.c,[`dot`,e._.e])),Xp=I(31,e=>B(e.a,`current`,e._._.i),e=>e._._),Aee=L(`m2`,e=>A(e.a,`click`,function(){e._._.j()})),jee=e=>{Xp(e),Zp(e),Qp(e),$p._(e),Aee(e)},Zp=I(32,e=>V(e.b,(e._._.k??0)+1),e=>e._._),Qp=I(40,e=>z(e.a,`title`,e._._.a1),e=>e._._),$p=P(0,0,e=>ht(e.c,[`dot`,e._.e])),em=M(4,e=>{$p(e),Yp(e)}),tm=(e,t)=>{lm(e,t?.repos),dm(e,t?.ports),em(e,mr(t))},nm=N(5,e=>tm(e,e._.g[e._.e])),rm=P(0,0,nm),im=e=>{rm._(e),am._(e),sm._(e)},am=P(0,0,nm),om=O(0,`<button class="icon-btn rail-btn"> <span></span></button>`,` D b `,jee,(e=>`<section class=side-ws><div class=side-ws-row><button class=side-ws-btn><span></span><span class=side-ws-name> </span></button><!><button class=row-icon title="Manage workspace">${e}</button><!></div><div class=side-sessions><!><!></div></section>`)(Dr),(e=>` E D bD m%b D/${e}&l%lD%b%m`)(Or),Ip),sm=P(0,0,e=>om(e,+!e._.h)),cm=F(yp),lm=M(2,e=>{qp(e),cm(e)}),um=F(Sp),dm=M(3,e=>{Jp(e),um(e)}),fm=j(21,F(Op)),pm=j(22,F(qf)),mm=(e,t)=>_m(e,t.timer);function hm(e){fm(e,null),pm(e,null),mm(e,{timer:0})}var gm=M(25),_m=M(24,e=>gm(e,Bm(e))),vm=O(0,`<!><!><!>`,`b%`,im),ym=(e,t)=>{bm(e,t?.name),vm(e,+!t)},bm=M(27,F(Qp,Wp)),xm=N(5,e=>ym(e,e.d.find(t=>t.id===e.e))),Sm=M(3,xm),Cm=M(4,e=>{xm(e),rm(e)}),wm=M(6,am),Tm=M(7,sm),Em=M(8,F(Xp,Pp)),Dm=M(9),Om=M(10,F(Zp)),km=M(11,F(Rp)),Am=M(12),jm=M(13,F(Bp)),Mm=M(14,F(Ap)),Nm=M(15,F(Up)),Pm=M(16,F(wp)),Fm=M(17),Im=M(18),Lm=M(19),Rm=M(20);function zm(e){return t=>{let n=e._._.c||[];if(n.length<2)return``;let r=t.full_name.split(`/`)[1];return n.some(e=>e.full_name!==t.full_name&&e.full_name.split(`/`)[1]===r)?t.full_name:r}}function Bm(e){return t=>{clearTimeout(e.y),t(),e.y=setTimeout(()=>{fm(e,null),pm(e,null)},3500)}}R(`m1`,zm),R(`m0`,Bm);var Vm=gr,Hm=(e=>`/${e}&`)(_r);function Um(e){xr(e.a,`M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z M7.25 10L5.5 12L7.25 14 M9.5 21V3`)}var Wm=(e,t)=>yr(e.a,t),Gm=(e,t)=>br(e.a,t),Km=gr,qm=(e=>`/${e}&`)(_r);function Jm(e){xr(e.a,`M19 21L5 21C3.89543 21 3 20.1046 3 19L3 5C3 3.89543 3.89543 3 5 3L19 3C20.1046 3 21 3.89543 21 5L21 19C21 20.1046 20.1046 21 19 21Z M9.5 21V3 M5.5 10L7.25 12L5.5 14`)}var Ym=(e,t)=>yr(e.a,t),Xm=(e,t)=>br(e.a,t),Zm=gr,Qm=(e=>`/${e}&`)(_r);function $m(e){xr(e.a,`M18 8.4C18 6.70261 17.3679 5.07475 16.2426 3.87452C15.1174 2.67428 13.5913 2 12 2C10.4087 2 8.88258 2.67428 7.75736 3.87452C6.63214 5.07475 6 6.70261 6 8.4C6 15.8667 3 18 3 18H21C21 18 18 15.8667 18 8.4Z M13.73 21C13.5542 21.3031 13.3019 21.5547 12.9982 21.7295C12.6946 21.9044 12.3504 21.9965 12 21.9965C11.6496 21.9965 11.3054 21.9044 11.0018 21.7295C10.6982 21.5547 10.4458 21.3031 10.27 21`)}var eh=(e,t)=>yr(e.a,t),th=(e,t)=>br(e.a,t),nh=gr,rh=(e=>`/${e}&`)(_r);function ih(e){xr(e.a,`M3 12H6L9 3L15 21L18 12H21`)}var ah=(e,t)=>yr(e.a,t),oh=(e,t)=>br(e.a,t),sh=gr,ch=(e=>`/${e}&`)(_r);function lh(e){xr(e.a,`M18 6H20M22 6H20M20 6V4M20 6V8 M21.4 20H2.6C2.26863 20 2 19.7314 2 19.4V11H21.4C21.7314 11 22 11.2686 22 11.6V19.4C22 19.7314 21.7314 20 21.4 20Z M2 11V4.6C2 4.26863 2.26863 4 2.6 4H8.77805C8.92127 4 9.05977 4.05124 9.16852 4.14445L12.3315 6.85555C12.4402 6.94876 12.5787 7 12.722 7H14`)}var uh=(e,t)=>yr(e.a,t),dh=(e,t)=>br(e.a,t),fh=((e,t)=>`<!><!><aside class=side-nav><div class=side-list></div><!><div class=side-foot><button class="icon-btn nav-toggle"></button><div class=spacer></div><!><button class=icon-btn title=Usage>${e}</button><button class=icon-btn title="New workspace">${t}</button></div></aside>`)(nh,sh),ph=((e,t)=>`b%b D b%bD c%b D/${e}&l D/${t}&n`)(rh,ch),mh=e=>{Jm(e.a),Ym(e.a,15),Xm(e.a)},hh=e=>{Um(e.a),Wm(e.a,15),Gm(e.a)},gh=P(5,0,e=>{B(e.a,`on`,e._.an),z(e.a,`title`,e._.an?`Disable agent-waiting notifications`:`Notify when an agent is waiting`)}),_h=L(`n19`,e=>A(e.a,`click`,function(){e._.ap()})),vh=e=>{gh._(e),$m(e.b),eh(e.b,15),th(e.b),_h(e)},yh=L(`n16`,e=>A(e.a,`click`,function(){Xg(e._,!1)})),bh=N(7,e=>km(e.b,N_(e)),4),xh=I(56,bh,e=>e._._),Sh=L(`n18`,e=>{A(e.a,`mouseenter`,function(){e._.i()}),A(e.a,`mouseleave`,function(){e._.j()})}),Ch=e=>{xh(e),wh(e),Eh(e),Dh(e),kh(e),Ah(e),jh(e),Ph(e),Fh(e),Ih(e),Lh(e),Rh(e),Bh._(e),Hh._(e),Uh._(e),hm(e.b),Am(e.b,P_(e)),Tm(e.b),Om(e.b),Sh(e)},wh=I(57,e=>Mm(e.b,e._._.a2),e=>e._._),Th=N(3,e=>jm(e.b,F_(e))),Eh=I(58,Th,e=>e._._),Dh=I(59,bh,e=>e._._),Oh=N(5,e=>Nm(e.b,e.c===e._._.ad&&e._._.a5?e._._.a5:e._._.as[e.c]?.sessions||[]),3),kh=I(60,Oh,e=>e._._),Ah=I(61,e=>Im(e.b,e._._.a7),e=>e._._),jh=I(62,e=>Lm(e.b,e._._.a8),e=>e._._),Mh=N(4,e=>Em(e.b,e.c===e._._.ad)),Nh=N(6,e=>Pm(e.b,e.c===e._._.ad&&e._._.ah===`term`?e._._.af:null),3),Ph=I(63,e=>{Dm(e.b,R_(e)),Rm(e.b,L_(e)),Fm(e.b,I_(e)),Mh(e),bh(e),Oh(e),Nh(e)},e=>e._._),Fh=I(64,Nh,e=>e._._),Ih=I(65,e=>{bh(e),Nh(e)},e=>e._._),Lh=I(68,e=>Sm(e.b,e._._.ar),e=>e._._),Rh=I(69,e=>{wm(e.b,e._._.as),Oh(e)},e=>e._._),zh=M(2,e=>{Cm(e.b,e.c),Mh(e),Th(e),bh(e),Oh(e),Nh(e)}),Bh=P(1,0,e=>zh(e,e._.d)),Vh=N(8,e=>_t(e.a,`top:${e._.e}px;left:${e._.f}px`)),Hh=P(1,0,Vh),Uh=P(1,0,Vh),Wh=N(4,e=>Em(e.b,e.d===e._._.ad)),Gh=I(63,e=>{Dm(e.b,z_(e)),Wh(e)},e=>e._._),Mee=L(`n17`,e=>{A(e.a,`mouseenter`,function(t,n){e._.i();let r=n.getBoundingClientRect();$h(e._,{id:e.d,top:r.top,left:r.right+8})}),A(e.a,`mouseleave`,function(){e._.j()})}),Nee=e=>{Gh(e),Kh(e),qh(e),hm(e.b),Tm(e.b,!0),km(e.b),Am(e.b),jm(e.b),Mm(e.b),Nm(e.b),Pm(e.b),Fm(e.b),Im(e.b),Lm(e.b),Rm(e.b),Mee(e)},Kh=I(68,e=>Sm(e.b,e._._.ar),e=>e._._),qh=I(69,e=>wm(e.b,e._._.as),e=>e._._),Jh=(e,t)=>Om(e.b,t),Yh=M(3,e=>{Cm(e.b,e.d),Wh(e)}),Xh=k(0,(e=>`<span>${e}</span>`)(Wf),(e=>` D/${e}&l`)(`b%c`),Nee,(e,t)=>{Yh(e,t[0]),Jh(e,t[1])}),Zh=P(3,0,e=>Xh(e,[e._.aq,e=>e])),Qh=O(1,(e=>`<div class=rail-pop>${e}</div>`)(Wf),(e=>` D/${e}&l`)(`b%c`),Ch),$h=j(2,e=>{ng(e,e.c?.id),rg(e,e.c?.top),ig(e,e.c?.left),Qh(e,+!e.c)}),eg=(e,t)=>sg(e,t.timer),tg=e=>{Zh._(e),$h(e,null),eg(e,{timer:0})},ng=M(3,Bh),rg=M(4,Hh),ig=M(5,Uh),ag=M(8),og=M(9),sg=M(7,e=>{ag(e,B_(e)),og(e,V_(e))}),cg=N(7,e=>km(e.a,H_(e)),4),lg=Ke(2,cg),ug=e=>{lg._(e),dg._(e),pg._(e),mg._(e),gg._(e),_g._(e),vg._(e),bg._(e),xg._(e),Sg._(e),Cg._(e),wg._(e),hm(e.a),Am(e.a,U_(e)),Tm(e.a),Om(e.a)},dg=Ke(2,e=>Mm(e.a,e._.a2)),fg=N(3,e=>jm(e.a,W_(e))),pg=Ke(2,fg),mg=Ke(2,cg),hg=N(5,e=>Nm(e.a,e.c===e._.ad&&e._.a5?e._.a5:e._.as[e.c]?.sessions||[]),3),gg=Ke(2,hg),_g=Ke(2,e=>Im(e.a,e._.a7)),vg=Ke(2,e=>Lm(e.a,e._.a8)),yg=N(6,e=>Pm(e.a,e.c===e._.ad&&e._.ah===`term`?e._.af:null),3),bg=qe(2,39,2,e=>{Em(e.a,e.c===e._.ad),Dm(e.a,q_(e)),Rm(e.a,K_(e)),Fm(e.a,G_(e)),cg(e),hg(e),yg(e)}),xg=Ke(2,yg),Sg=Ke(2,e=>{cg(e),yg(e)}),Cg=Ke(2,e=>Sm(e.a,e._.ar)),wg=Ke(2,e=>{wm(e.a,e._.as),hg(e)}),Tg=M(2,e=>{Cm(e.a,e.c),fg(e),cg(e),hg(e),yg(e)}),Eg=(e,t)=>Tg(e,t[0]),Dg=F(Kh,Lh),Og=M(53,e=>{Cg(e),Dg(e)}),kg=N(38,e=>Og(e,e.y||[e.ab])),Ag=M(37,e=>{Ig(e,e.ab?.id),kg(e)}),jg=k(2,(e=>`<!>${e}<!>`)(Wf),(e=>`b/${e}&b`)(`b%c`),ug,Eg),Mg=M(52,e=>{jg(e,[e.aq,e=>e]),Zh(e)}),Ng=N(40,e=>Mg(e,e.y?.length?e.y.filter(e=>e.status===`active`).map(e=>e.id):[e.ad])),Pg=N(55,e=>e.as[e.ad]),Fg=F(Gh,Ph),Ig=M(39,e=>{Ng(e),Pg(e),bg(e),Fg(e)}),Lg=Ag,Rg=F(Fh),zg=Ge(41,e=>{xg(e),Rg(e)}),Bg=N(15,e=>zg(e,e.n,e.o)),Vg=M(13,Bg),Hg=M(14,Bg),Ug=F(Ih),Wg=Ge(43,e=>{z(e.b,`hidden`,e.ah===`diff`),Sg(e),Ug(e)}),Gg=N(18,e=>Wg(e,e.q,e.r)),Kg=M(16,Gg),qg=M(17,Gg),Jg=O(0,`<div class=drawer-backdrop></div>`,` `,yh),Yg=N(48,e=>gt(e.b,{closed:!e.al,open:e.aj})),Xg=Ge(45,e=>{Jg(e,+!e.aj),Yg(e)}),Zg=N(21,e=>Xg(e,e.t,e.u)),Qg=M(19,Zg),$g=M(20,Zg),e_=O(3,`<div class=side-rail></div><!><!>`,` b%`,tg),t_=O(4,Vm,(e=>`/${e}&`)(Hm),hh,Km,(e=>`/${e}&`)(qm),mh),n_=j(47,e=>{z(e.e,`title`,e.al?`Collapse sidebar`:`Expand sidebar`),e_(e,+!!e.al),t_(e,+!e.al),Yg(e)}),r_=M(51),i_=N(50,e=>r_(e,J_(e))),a_=j(49,e=>{i_(e),gh(e)}),o_=O(5,(e=>`<button class="icon-btn notify-btn">${e}</button>`)(Zm),(e=>` D/${e}&l`)(Qm),vh),s_=L(`n21`,e=>{Et(e,{onMount:function(){er()&&tr().then(t=>{a_(e,!!t)})}}),A(e.e,`click`,function(){n_(e,!e.al),qn(e.al)}),A(e.g,`click`,function(){Xg(e,!1),e.a9?.()}),A(e.i,`click`,function(){Xg(e,!1),e.aa?.()})});function c_(e){ih(e.h),ah(e.h,15),oh(e.h),lh(e.j),uh(e.j,16),dh(e.j),n_(e,Kn()),a_(e,!1),o_(e,+!er()),s_(e)}var l_=M(22,i_),u_=M(23,L(`n20`,e=>{e.x&&n_(e,Kn())})),d_=M(24,e=>{Ng(e),kg(e)}),f_=F(qh,Rh),p_=M(54,e=>{Pg(e),wg(e),f_(e)}),m_=(e,t)=>p_(e,t||{}),h_=F(xh),g_=M(26,e=>{lg(e),h_(e)}),__=M(27),v_=F(wh),y_=M(28,e=>{dg(e),v_(e)}),b_=F(Eh),x_=M(29,e=>{pg(e),b_(e)}),S_=F(Dh),C_=M(30,e=>{mg(e),S_(e)}),w_=F(kh),T_=M(31,e=>{gg(e),w_(e)}),E_=M(32),D_=F(Ah),O_=M(33,e=>{_g(e),D_(e)}),k_=F(jh),A_=M(34,e=>{vg(e),k_(e)}),j_=M(35),M_=M(36);function N_(e){return function(){$h(e._,null),e.c===e._._.ad?(Wg(e._._,e._._.ah===`diff`?`term`:`diff`),e._._.ah===`diff`&&e._._.a4?.()):(Pn(e.c),e._._.a0?.(e.c))}}function P_(e){return function(){$h(e._,null),e._._.a1?.(e.c)}}function F_(e){return function(t){$h(e._,null),e._._.a3(e.c,t)}}function I_(e){return function(t){$h(e._,null),e.c===e._._.ad?(zg(e._._,t),Wg(e._._,`term`)):e._._.a6?.(e.c,t)}}function L_(e){return function(t,n){$h(e._,null);let r=`${t}/${n}`;e.c===e._._.ad?(Wg(e._._,`diff`),e._._.a4?.(r)):(Pn(e.c,r),e._._.a0?.(e.c))}}function R_(e){return function(){$h(e._,null),e.c!==e._._.ad&&e._._.a0?.(e.c)}}function z_(e){return function(){e.d!==e._._.ad&&e._._.a0?.(e.d)}}function B_(e){return()=>clearTimeout(e.h)}function V_(e){return()=>{clearTimeout(e.h),e.h=setTimeout(()=>{$h(e,null)},150)}}function H_(e){return function(){Xg(e._,!1),e.c===e._.ad?(Wg(e._,e._.ah===`diff`?`term`:`diff`),e._.ah===`diff`&&e._.a4?.()):(Pn(e.c),e._.a0?.(e.c))}}function U_(e){return function(){Xg(e._,!1),e._.a1?.(e.c)}}function W_(e){return function(t){Xg(e._,!1),e._.a3(e.c,t)}}function G_(e){return function(t){Xg(e._,!1),e.c===e._.ad?(zg(e._,t),Wg(e._,`term`)):e._.a6?.(e.c,t)}}function K_(e){return function(t,n){Xg(e._,!1);let r=`${t}/${n}`;e.c===e._.ad?(Wg(e._,`diff`),e._.a4?.(r)):(Pn(e.c,r),e._.a0?.(e.c))}}function q_(e){return function(){e.c!==e._.ad&&(Xg(e._,!1),e._.a0?.(e.c))}}function J_(e){return async()=>{try{e.an?(await rr(),a_(e,!1)):(a_(e,await nr()),e.an||e.w?.(`Notifications blocked — allow them for this site in browser/system settings.`))}catch(t){a_(e,!1),e.w?.(`Notifications failed: ${String(t.message||t)}`)}}}R(`n13`,N_),R(`n11`,P_),R(`n12`,F_),R(`n15`,I_),R(`n14`,L_),R(`n10`,R_),R(`n9`,z_),R(`n7`,B_),R(`n8`,V_),R(`n4`,H_),R(`n2`,U_),R(`n3`,W_),R(`n6`,G_),R(`n5`,K_),R(`n1`,q_),R(`n0`,J_);async function Y_(e){try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);t.value=e,t.style.cssText=`position:fixed;top:-100px;opacity:0;`,document.body.append(t),t.focus(),t.select();let n=document.execCommand(`copy`);return t.remove(),n}}var X_=null;function Z_(){return X_}function Q_(e){let t=[],n=[];for(let r of e.trim().split(/\s+/).filter(Boolean)){let e=r.startsWith(`!`),i=e?r.slice(1):r;i&&(e?n:t).push($_(i))}return e=>!n.some(t=>t(e))&&t.every(t=>t(e))}function $_(e){if(!/[*?]/.test(e))return t=>pr(e,t);let t=``;for(let n=0;n<e.length;n++){let r=e[n];r===`*`?e[n+1]===`*`?(t+=`.*`,n++):t+=`[^/]*`:t+=r===`?`?`[^/]`:r.replace(/[.+^${}()|[\]\\]/,`\\$&`)}try{let e=new RegExp(t,`i`);return t=>e.test(t)}catch{return t=>pr(e,t)}}var ev=3;function tv(e,t){let n=new Map;for(let t of e)n.set(t.worktree,[...n.get(t.worktree)||[],t]);let r=[`Review feedback:`],i=0;for(let[e,a]of n){let n=(t||[]).find(t=>t.worktree===e);r.push(``),r.push(nv(e,n));for(let e of a){i++;let t=n?.files.find(t=>t.path===e.path),a=e.side===`deletions`?t?.old:t?.new,o=e.side===`deletions`?`Old`:`New`,s=e.line_start===e.line_end?`line ${e.line_start}`:`lines ${e.line_start}-${e.line_end}`;if(r.push(``),r.push(`${i}. **${e.path}** (${o} ${s})`),a!=null){let t=iv(a,e.line_start,e.line_end,e.side),n=av(t);r.push(``),r.push(ov(`${n}diff\n${t}\n${n}`))}r.push(``),r.push(ov(e.text))}}return r.join(`
4
4
  `)}function nv(e,t){if(!t?.head)return`${e}/`;let n=rv(t.head),r=rv(t.baseSha),i=t.pr?.headRefName||t.branch||`HEAD`;return`${e}/${t.pr?` #${t.pr.number}`:``} — \`${i}\` ${n} vs \`${t.base}\` ${r}`}function rv(e,t=12){return e.slice(0,t)}function iv(e,t,n,r){let i=e.split(`
@@ -33,7 +33,7 @@ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],en
33
33
  \f\r &>`.split(``),`\0
34
34
  \f\r "&'<=>\``.split(``)],[`\0
35
35
  \f\r "&'<=>\``.split(``),`\0
36
- \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function eC(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=Ux);let l=tC(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!qS(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||!jS(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function tC(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=nC(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 nC(e,t,n){let r=zx(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=pS(r.attribute,Object.assign({},e.settings.characterReferences,{subset:$S.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?bS:xS)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=pS(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:$S.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&yS(n,o)>yS(n,e.alternative)&&(o=e.alternative),s=o+pS(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?$S.single:$S.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var rC=[`<`,`&`];function iC(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:pS(e.value,Object.assign({},r.settings.characterReferences,{subset:rC}))}function aC(e,t,n,r){return r.settings.allowDangerousHtml?e.value:iC(e,t,n,r)}function oC(e,t,n,r){return r.all(e)}var sC=Gx(`type`,{invalid:cC,unknown:lC,handlers:{comment:_S,doctype:vS,element:eC,raw:aC,root:oC,text:iC}});function cC(e){throw Error("Expected node, not `"+e+"`")}function lC(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var uC={},dC={},fC=[];function pC(e,t){let n=t||uC,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:mC,all:hC,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||dx,characterReferences:n.characterReferences||dC,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Ux:Hx,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function mC(e,t,n){return sC(e,t,n,this)}function hC(e){let t=[],n=e&&e.children||fC,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var gC=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;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(),zy(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}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.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||Hy(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}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&&ux(e.composedPath())||(FC(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||(FC(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(FC(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){FC(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();FC(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);FC(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=xC(i)&&this.hoveredLine?.lineElement===i.lineElement;bC(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),bC(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),xC(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(CC(i)&&p!=null){p(i);break}if(SC(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!xC(i))break;bC(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,FC(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})()),FC(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),FC(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();ux(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;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{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.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(lx(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{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),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.getCurrentSelectionRange()),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.getCurrentSelectionRange()),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=pC(cx());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);yC(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(EC(t));if(yC(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(yC(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(yC(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&&ux(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=EC(e);if(t&&ux(n))return;let r=DC(e);return r==null?this.pathFromAnnotationSlot(e):EC(r)}pathFromAnnotationSlot(e){let t=kC(OC(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:EC(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=AC(t)?t:AC(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)}Hy(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,Ry(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}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{zy(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!MC(this.renderedSelectedLinesState,n),i=!MC(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}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);wC(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=PC(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=PC(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:TC(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:TC(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:NC(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:NC(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 _C({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:vC({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 vC({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 yC(e){return e!=null&&`kind`in e&&e.kind===`line`}function bC(e){return e!=null&&`kind`in e&&e.kind===`token`}function xC(e){return yC(e)||bC(e)}function SC(e){return`type`in e&&e.type===`line-info`}function CC(e){return`kind`in e&&e.kind===`merge-conflict-action`}function wC(e){return e===`current`||e===`incoming`||e===`both`}function TC(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function EC(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function DC(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 OC(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 kC(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)||n<=0))return{lineNumber:n,side:t[1]}}function AC(e){return e!=null&&typeof e.elementFromPoint==`function`}function jC(e,t){return e===t||Hy(e??void 0,t??void 0)}function MC(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&jC(e?.range??null,t.range)}function NC(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function PC(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 FC(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 IC=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,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.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 r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),zC(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=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 r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)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);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?HC(t):UC(t);o.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:LC(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:RC(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&BC(t,{codeWidthChanged:i,numberWidthChanged:a}))}};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 LC(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function RC(e){return Math.max(Math.ceil(e),0)}function zC(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?BC(e,{codeWidthChanged:!0,numberWidthChanged:!0}):VC(e))}function BC(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function VC(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function HC(e){e.codeElement.isConnected&&VC(e)}function UC(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 WC=new Map,GC=new Map,KC=new Map,qC=new Set;function JC(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!qC.has(t))return!1;return!0}function YC(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(qC.has(n.name))continue;let e=WC.get(n.name);e??(e=n,WC.set(n.name,e)),qC.add(e.name),t.loadLanguageSync(e.data)}}function XC(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var ZC=Object.defineProperty,QC=Object.getOwnPropertyDescriptor,$C=Object.getOwnPropertyNames,ew=Object.prototype.hasOwnProperty,tw=(e,t)=>{let n={};for(var r in e)ZC(n,r,{get:e[r],enumerable:!0});return t||ZC(n,Symbol.toStringTag,{value:`Module`}),n},nw=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=$C(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ew.call(e,s)&&s!==n&&ZC(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=QC(t,s))||r.enumerable});return e},rw=(e,t,n)=>(nw(e,t,`default`),n&&nw(n,t,`default`)),iw=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),aw=function(e){return`/`+e},ow={},K=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=aw(t,n),t=s(t),t in ow)return;ow[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`:iw,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)})},sw=[{id:`abap`,name:`ABAP`,import:(()=>K(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>K(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>K(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>K(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>K(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>K(()=>import(`./_Brh7taK_.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>K(()=>import(`./_-gyK8vJ-.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>K(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>K(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>K(()=>import(`./_Dp25UBl7.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>K(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>K(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>K(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>K(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>K(()=>import(`./_CzGoLHpy.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>K(()=>import(`./_BWXHIvNe2.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>K(()=>import(`./_B7ZEbQpA2.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>K(()=>import(`./_qdxAdBWQ2.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>K(()=>import(`./_D-usSTwE2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>K(()=>import(`./_DKpUyyne2.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>K(()=>import(`./_Ci_nEsc72.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>K(()=>import(`./_CUHmPFLl2.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>K(()=>import(`./_CYIUgYqB2.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>K(()=>import(`./_Ca6yBPZK2.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>K(()=>import(`./_CpYNKFv52.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>K(()=>import(`./_BpWV4xDR2.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>K(()=>import(`./_D0apG41V2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>K(()=>import(`./_CQ2zXKGN2.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>K(()=>import(`./_kIpfj7zU2.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>K(()=>import(`./_xHfOHdoE2.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>K(()=>import(`./_CtfBBspg2.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>K(()=>import(`./_DqKBuwfJ2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>K(()=>import(`./_Bj61d0ZC2.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>K(()=>import(`./_Bw-xXnfr2.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>K(()=>import(`./_C8r90Shi2.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>K(()=>import(`./_oeQT6MSM2.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>K(()=>import(`./_Ct7oMGlY2.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>K(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>K(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>K(()=>import(`./_CxVlY1q1.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>K(()=>import(`./_DU_7z2vs.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>K(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>K(()=>import(`./_D0UH-qzF.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>K(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>K(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>K(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>K(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>K(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>K(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>K(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>K(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>K(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>K(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>K(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>K(()=>import(`./_DDtfsPTV.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>K(()=>import(`./_CJfh1bA_.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>K(()=>import(`./_BtGc54QO.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>K(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>K(()=>import(`./_Gpz7cA9P.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:(()=>K(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>K(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>K(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>K(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>K(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>K(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>K(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>K(()=>import(`./_CY8IvGdO2.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>K(()=>import(`./_DYvRD3hg2.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>K(()=>import(`./_CBce3t8t2.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>K(()=>import(`./_CV2tkWYe2.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>K(()=>import(`./_DExj1W_82.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>K(()=>import(`./_Dl-2e7rI2.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>K(()=>import(`./_CTwY-w6f2.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>K(()=>import(`./_CSRkHgEL2.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>K(()=>import(`./_ioxvNBlq2.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>K(()=>import(`./_VpkJ9R4I2.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>K(()=>import(`./_CCWd2cbl.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>K(()=>import(`./_ilITqXS62.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>K(()=>import(`./_7GGW24-e2.js`),[]))},{id:`go`,name:`Go`,import:(()=>K(()=>import(`./_rLFTqkRN2.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>K(()=>import(`./_DmaZeTni.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>K(()=>import(`./_CacY0gHj2.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>K(()=>import(`./_LLhMP4fB2.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>K(()=>import(`./_CLa87tfT.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>K(()=>import(`./_BzmURZrG2.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>K(()=>import(`./_D8IpX4py2.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>K(()=>import(`./_C8oCnwJJ2.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>K(()=>import(`./_Dh228itO2.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>K(()=>import(`./_CxZEssPk2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>K(()=>import(`./_Cvrh5tZx2.js`),[]))},{id:`html`,name:`HTML`,import:(()=>K(()=>import(`./_RHQKbTNw.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>K(()=>import(`./_DQxqrF2p2.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>K(()=>import(`./_BMK2JGG-2.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>K(()=>import(`./_CNPd6AKz2.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>K(()=>import(`./_DLbMbJfH2.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>K(()=>import(`./_CZbG8q4J2.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>K(()=>import(`./_DsUTQ-LC2.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>K(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>K(()=>import(`./_VdrzhuKU.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>K(()=>import(`./_B6OKTJ3U.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>K(()=>import(`./_DrB0wHeE.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>K(()=>import(`./_CXQQiNs1.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>K(()=>import(`./_l-4CNi-P.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>K(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>K(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>K(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>K(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>K(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>K(()=>import(`./_CnphyoYq.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>K(()=>import(`./_9XtunSg7.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>K(()=>import(`./_Cs2xR5zT.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:(()=>K(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>K(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>K(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>K(()=>import(`./_B4U6RXlg.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>K(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>K(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>K(()=>import(`./_Cm86uuyb.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>K(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>K(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>K(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>K(()=>import(`./_v0CL1jTB.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>K(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>K(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>K(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>K(()=>import(`./_B31BFjeo.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>K(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>K(()=>import(`./_CvIA8snX.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>K(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>K(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>K(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>K(()=>import(`./_CFuIV2fl.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>K(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>K(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>K(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>K(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>K(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>K(()=>import(`./_DH0HY4Nr.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>K(()=>import(`./_speyknRe2.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>K(()=>import(`./_IvuFDN5E2.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>K(()=>import(`./_CjNLYCLg2.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>K(()=>import(`./_DHYfO66s2.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>K(()=>import(`./_D1A_Heim2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>K(()=>import(`./_BsSzOQcm2.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>K(()=>import(`./_O90oeIOV2.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>K(()=>import(`./_B1RWQWA52.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>K(()=>import(`./_BUDT5pXO2.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>K(()=>import(`./_BmaVzQYH2.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:(()=>K(()=>import(`./_4ZHwLPI52.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>K(()=>import(`./_BsL8kuCs.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>K(()=>import(`./_CqX4LQGj2.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>K(()=>import(`./_ot-7Btpt2.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>K(()=>import(`./_DGHpHOYJ2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>K(()=>import(`./_BiJDBrnU2.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>K(()=>import(`./_C7UOKdEL2.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>K(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>K(()=>import(`./_DNMTfnFr2.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>K(()=>import(`./_CCSX75yM2.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>K(()=>import(`./_DMgNhnYS2.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>K(()=>import(`./_iXnhIJG72.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>K(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>K(()=>import(`./__WU9JTqk.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>K(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>K(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>K(()=>import(`./_gzcpVVnB2.js`),[]))},{id:`qml`,name:`QML`,import:(()=>K(()=>import(`./_CypNdMTQ.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>K(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>K(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>K(()=>import(`./_BD3GuTLe.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>K(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>K(()=>import(`./_B3gFvitq2.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>K(()=>import(`./_BOMR_lTT.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>K(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>K(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>K(()=>import(`./_vvqUsxvZ.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>K(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>K(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>K(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>K(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>K(()=>import(`./_BLA94hyL.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:(()=>K(()=>import(`./_CCOa-67I.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:(()=>K(()=>import(`./_Cfkwpbl82.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>K(()=>import(`./_C0VVn7_H.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>K(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>K(()=>import(`./_BiFt_7mu2.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>K(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>K(()=>import(`./_rdXXJ91o.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>K(()=>import(`./_bTVj8UrX2.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>K(()=>import(`./_BM315xPC.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>K(()=>import(`./_UABdeDPG.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>K(()=>import(`./_CvPUh_B0.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>K(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>K(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>K(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>K(()=>import(`./_wyUUoFip.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>K(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>K(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>K(()=>import(`./_CKHJpMi32.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>K(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>K(()=>import(`./_BuU3dU-v.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>K(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>K(()=>import(`./_BP3KIWZr.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>K(()=>import(`./_B7X9man_.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>K(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>K(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>K(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>K(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>K(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>K(()=>import(`./_CZd0xW_V2.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>K(()=>import(`./_GlOqBOcg2.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>K(()=>import(`./_DswuEJGm2.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>K(()=>import(`./_B8okAqG-.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>K(()=>import(`./_CcmNWLt02.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>K(()=>import(`./_D8DKeNtk2.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>K(()=>import(`./_sltzmVWM2.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>K(()=>import(`./_BH3qAqXE.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>K(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>K(()=>import(`./_Dvy34Yg_2.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:(()=>K(()=>import(`./__Q8ATTST.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>K(()=>import(`./_BRdr0IET2.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>K(()=>import(`./_DI99ib-x2.js`),[]))},{id:`v`,name:`V`,import:(()=>K(()=>import(`./_DBj4K9d_2.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>K(()=>import(`./_zf12oZj62.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>K(()=>import(`./_DOwzaHZ02.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>K(()=>import(`./_B2gwz-sJ2.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>K(()=>import(`./_BroJfC0k2.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>K(()=>import(`./_DvXPmvsu2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>K(()=>import(`./_DXjhrVim2.js`),__vite__mapDeps([112,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>K(()=>import(`./_K6YjF5HA2.js`),__vite__mapDeps([113,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>K(()=>import(`./_BCDnEeXi2.js`),__vite__mapDeps([114,2,3,5,12,70,115])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>K(()=>import(`./_CgoNMtux2.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>K(()=>import(`./_ByWQv1Qj2.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>K(()=>import(`./_C8pVoKbM2.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>K(()=>import(`./_BsKzXJz42.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>K(()=>import(`./_ClFFjSW22.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>K(()=>import(`./_DdvCle-K2.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>K(()=>import(`./_DLL8P-h_2.js`),[]))},{id:`xml`,name:`XML`,import:(()=>K(()=>import(`./_DoNipARR.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>K(()=>import(`./_Ne8qEUH82.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>K(()=>import(`./_DtW-KREB.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>K(()=>import(`./_BnlCZFoB2.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>K(()=>import(`./_CMLA9XwU2.js`),[]))}],cw=Object.fromEntries(sw.map(e=>[e.id,e.import])),lw=Object.fromEntries(sw.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),uw={...cw,...lw},dw=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>K(()=>import(`./_vGVdxbeo2.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>K(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>K(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>K(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>K(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>K(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>K(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>K(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>K(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>K(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>K(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>K(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>K(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>K(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>K(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>K(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>K(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>K(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>K(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>K(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>K(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>K(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>K(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>K(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>K(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>K(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>K(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>K(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>K(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>K(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>K(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>K(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>K(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>K(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>K(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>K(()=>import(`./_Bm3Qr25_2.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>K(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>K(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>K(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>K(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>K(()=>import(`./_BSWPekZh2.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>K(()=>import(`./_DDpmG2fV2.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>K(()=>import(`./_B_bV9PQ92.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>K(()=>import(`./_DhmEMT882.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>K(()=>import(`./_eJ-hLW7d2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>K(()=>import(`./_Cb4Vim4T2.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>K(()=>import(`./_CLwyXe_n2.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>K(()=>import(`./_D7Lr4KcI2.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>K(()=>import(`./_DQwYfKfQ2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>K(()=>import(`./_DRFjx7u42.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>K(()=>import(`./_DX1BQOs82.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>K(()=>import(`./_aMsaMD1D2.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>K(()=>import(`./_8PwUyIlP2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>K(()=>import(`./_DO-qXg-I2.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>K(()=>import(`./_DnToyrRv2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>K(()=>import(`./_B2OO5cIa2.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>K(()=>import(`./_4G7pJPwS2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>K(()=>import(`./_UdsmMDCL2.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>K(()=>import(`./_C1IUL_tW2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>K(()=>import(`./_nFMaYfgc2.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>K(()=>import(`./_oM2G3aXe2.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>K(()=>import(`./_DdrHHSXu2.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>K(()=>import(`./_fwtXNY1n2.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>K(()=>import(`./_BZCL-v6S2.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>K(()=>import(`./_VbXTXTou2.js`),[]))}].map(e=>[e.id,e.import])),fw=t({createOnigurumaEngine:()=>Bw,getDefaultWasmLoader:()=>zw,loadWasm:()=>Nw,setDefaultWasmLoader:()=>Rw}),pw=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function mw(){return 2147483648}function hw(){return typeof performance<`u`?performance.now():Date.now()}var gw=(e,t)=>e+(t-e%t)%t;async function _w(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=mw();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,gw(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:hw,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 vw=Object.defineProperty,yw=(e,t,n)=>t in e?vw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bw=(e,t,n)=>yw(e,typeof t==`symbol`?t:t+``,n),xw=null;function Sw(e){throw new pw(e.UTF8ToString(e.getLastOnigError()))}var Cw=class e{constructor(t){bw(this,`utf16Length`),bw(this,`utf8Length`),bw(this,`utf16Value`),bw(this,`utf8Value`),bw(this,`utf16OffsetToUtf8`),bw(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}},ww=class e{constructor(t){if(bw(this,`id`,++e.LAST_ID),bw(this,`_onigBinding`),bw(this,`content`),bw(this,`utf16Length`),bw(this,`utf8Length`),bw(this,`utf16OffsetToUtf8`),bw(this,`utf8OffsetToUtf16`),bw(this,`ptr`),!xw)throw new pw(`Must invoke loadWasm first.`);this._onigBinding=xw,this.content=t;let n=new Cw(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=xw.omalloc(1e4),e._sharedPtrInUse=!0,xw.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(xw)}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)}};bw(ww,`LAST_ID`,0),bw(ww,`_sharedPtr`,0),bw(ww,`_sharedPtrInUse`,!1);var Tw=ww,Ew=class{constructor(e){if(bw(this,`_onigBinding`),bw(this,`_ptr`),!xw)throw new pw(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Cw(e[r]);t[r]=i.createString(xw),n[r]=i.utf8Length}let r=xw.omalloc(4*e.length);xw.HEAPU32.set(t,r/4);let i=xw.omalloc(4*e.length);xw.HEAPU32.set(n,i/4);let a=xw.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)xw.ofree(t[n]);xw.ofree(i),xw.ofree(r),a===0&&Sw(xw),this._onigBinding=xw,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 Tw(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 Dw(e){return typeof e.instantiator==`function`}function Ow(e){return typeof e.default==`function`}function kw(e){return e.data!==void 0}function Aw(e){return typeof Response<`u`&&e instanceof Response}function jw(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 Mw;function Nw(e){if(Mw)return Mw;async function t(){xw=await _w(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Dw(n)?n=await n.instantiator(t):Ow(n)?n=await n.default(t):(kw(n)&&(n=n.data),Aw(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Fw(n)(t):await Iw(n)(t):jw(n)||n instanceof WebAssembly.Module?n=await Pw(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Pw(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Mw=t(),Mw}function Pw(e){return t=>WebAssembly.instantiate(e,t)}function Fw(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Iw(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Lw;function Rw(e){Lw=e}function zw(){return Lw}async function Bw(e){return e&&await Nw(e),{createScanner(e){return new Ew(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Tw(e)}}}var Vw=tw({});rw(Vw,fw);var Hw=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Uw(e){return Ww(e)}function Ww(e){return Array.isArray(e)?Gw(e):e instanceof RegExp?e:typeof e==`object`?Kw(e):e}function Gw(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Ww(e[n]);return t}function Kw(e){let t={};for(let n in e)t[n]=Ww(e[n]);return t}function qw(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Jw(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Jw(e.substring(0,e.length-1)):e.substr(~t+1)}var Yw=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xw=class{static hasCaptures(e){return e!==null&&(Yw.lastIndex=0,Yw.test(e))}static replaceCaptures(e,t,n){return e.replace(Yw,(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 Zw(e,t){return e<t?-1:+(e>t)}function Qw(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=Zw(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function $w(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 eT(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var tT=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}},nT=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(sT(e),t)}static createFromParsedTheme(e,t){return uT(e,t)}_cachedMatchRoot=new tT(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=>iT(e.parent,t.parentScopes));return n?new oT(n.fontStyle,n.foreground,n.background):null}},rT=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 iT(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&&!aT(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function aT(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var oT=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function sT(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`&&$w(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&$w(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 cT(l,u,e,o,s,c)}}return n}var cT=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}},lT=(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))(lT||{});function uT(e,t){e.sort((e,t)=>{let n=Zw(e.scope,t.scope);return n!==0||(n=Qw(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 dT(t),o=new oT(n,a.getId(r),a.getId(i)),s=new mT(new pT(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 nT(a,o,s)}var dT=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)}},fT=Object.freeze([]),pT=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||fT,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)}},mT=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(),pT.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(Qw(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 pT(e,t,n,r,i))}},hT=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=_T(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 gT(e){return e}function _T(e){return e}function vT(e,t){let n=[],r=bT(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(yT(i)){let e=[];do e.push(i),i=r.next();while(yT(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 yT(e){return!!e&&!!e.match(/[\w\.:]+/)}function bT(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 xT(e){typeof e.dispose==`function`&&e.dispose()}var ST=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},CT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},wT=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))}},TT=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ST(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new wT;for(let n of e)ET(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof ST){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 ET(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 ST?OT({baseGrammar:a,selfGrammar:i},r):DT(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 ST(e))}function DT(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];kT([r],t,n)}}function OT(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&kT(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&kT(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function kT(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?qw({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&kT(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=FT(i);switch(a.kind){case 0:OT({...t,selfGrammar:t.baseGrammar},n);break;case 1:OT(t,n);break;case 2:DT(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?DT(a.ruleName,i,n):OT(i,n)}else a.kind===4?n.add(new CT(a.scopeName,a.ruleName)):n.add(new ST(a.scopeName))}}}var AT=class{kind=0},jT=class{kind=1},MT=class{constructor(e){this.ruleName=e}kind=2},NT=class{constructor(e){this.scopeName=e}kind=3},PT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function FT(e){if(e===`$base`)return new AT;if(e===`$self`)return new jT;let t=e.indexOf(`#`);return t===-1?new NT(e):t===0?new MT(e.substring(1)):new PT(e.substring(0,t),e.substring(t+1))}var IT=/\\(\d+)/,LT=/\\(\d+)/g,RT=-1,zT=-2;function BT(e){return e}function VT(e){return e}var HT=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Xw.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Xw.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Jw(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:Xw.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Xw.replaceCaptures(this._contentName,e,t)}},UT=class extends HT{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!`)}},WT=class extends HT{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new YT(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 XT,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},GT=class extends HT{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 XT,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},KT=class extends HT{_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 YT(i,this.id),this.beginCaptures=a,this._end=new YT(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 XT;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}},qT=class extends HT{_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 YT(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new YT(o,zT),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 XT;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 XT,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},JT=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new UT(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new WT(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=qw({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new GT(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new qT(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 KT(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=FT(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 GT||e instanceof KT||e instanceof qT)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},YT=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`&&IT.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 LT.lastIndex=0,this.source.replace(LT,(e,t)=>eT(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}},XT=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 ZT(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 ZT(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},ZT=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(`
36
+ \f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function eC(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=Ux);let l=tC(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!qS(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||!jS(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function tC(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=nC(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 nC(e,t,n){let r=zx(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=pS(r.attribute,Object.assign({},e.settings.characterReferences,{subset:$S.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?bS:xS)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=pS(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:$S.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&yS(n,o)>yS(n,e.alternative)&&(o=e.alternative),s=o+pS(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?$S.single:$S.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var rC=[`<`,`&`];function iC(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:pS(e.value,Object.assign({},r.settings.characterReferences,{subset:rC}))}function aC(e,t,n,r){return r.settings.allowDangerousHtml?e.value:iC(e,t,n,r)}function oC(e,t,n,r){return r.all(e)}var sC=Gx(`type`,{invalid:cC,unknown:lC,handlers:{comment:_S,doctype:vS,element:eC,raw:aC,root:oC,text:iC}});function cC(e){throw Error("Expected node, not `"+e+"`")}function lC(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var uC={},dC={},fC=[];function pC(e,t){let n=t||uC,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:mC,all:hC,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||dx,characterReferences:n.characterReferences||dC,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Ux:Hx,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function mC(e,t,n){return sC(e,t,n,this)}function hC(e){let t=[],n=e&&e.children||fC,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}var gC=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;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(),zy(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}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.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return this.renderedSelectedLinesState===void 0||this.renderedEditorActiveLineState===void 0}setSelection(e,t){let n=!(e===this.selectedRange||Hy(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,i=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;!this.isSelectionDirty()&&!n&&!i||(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let r=e!==this.editorActiveLine,i=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;!this.isSelectionDirty()&&!r&&!i||(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}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&&ux(e.composedPath())||(FC(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||(FC(this.options.__debugPointerEvents,`move`,`FileDiff.DEBUG.handlePointerMove:`,e),this.handlePointerEvent({eventType:`move`,event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;if(FC(t,`move`,`FileDiff.DEBUG.handlePointerLeave: no event`),this.hoveredLine==null&&this.hoveredToken==null){FC(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();FC(n,e,`FileDiff.DEBUG.handlePointerEvent:`,{eventType:e,composedPath:r});let i=this.resolvePointerTarget(r);FC(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=xC(i)&&this.hoveredLine?.lineElement===i.lineElement;bC(i)&&this.hoveredToken?.tokenElement===i.tokenElement||(this.hoveredToken!=null&&(d?.(this.hoveredToken,t),this.clearHoveredToken()),bC(i)&&(this.setHoveredToken(this.toTokenEventBaseProps(i)),u?.(this.hoveredToken,t))),e||(this.hoveredLine!=null&&(c?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),xC(i)?(this.setHoveredLine(this.toEventBaseProps(i)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case`click`:{if(i==null)break;if(CC(i)&&p!=null){p(i);break}if(SC(i)&&f!=null){f(i.hunkIndex,i.all||t.shiftKey?`both`:i.direction,i.all||t.shiftKey?1/0:void 0);break}if(!xC(i))break;bC(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,FC(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})()),FC(t,`move`,`FileDiff.DEBUG.attachEventListeners: Attaching pointer move event`),FC(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();ux(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;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{onGutterUtilityClick:t}=this.options;if(t==null)return;let n=this.currentSelectionEnds(),r=n?.bottom??this.resolveSelectionPoint(e,{source:`event-path`,excludeUtility:!1}),i=n?.top??r;r!=null&&i!=null&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:`gutterSelecting`,pointerId:e.pointerId,anchor:i,current:r},this.selectionAnchor={lineNumber:i.lineNumber,side:i.side},this.updateSelection(r.lineNumber,r.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:`coordinates-first`});if(t==null)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.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(lx(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{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case`idle`:return;case`gutterSelecting`:{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let r=this.resolveSelectionPoint(e,{source:`coordinates-first`});r!=null&&(n.current=r,this.updateSelection(r.lineNumber,r.side));let i=this.buildSelectedLineRange(n.anchor,n.current);t?.({...i}),this.selectionAnchor=void 0,this.notifySelectionEnd(i),this.notifySelectionCommitted(i),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.getCurrentSelectionRange()),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.getCurrentSelectionRange()),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=pC(cx());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);yC(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(EC(t));if(yC(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(yC(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(yC(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&&ux(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=EC(e);if(t&&ux(n))return;let r=DC(e);return r==null?this.pathFromAnnotationSlot(e):EC(r)}pathFromAnnotationSlot(e){let t=kC(OC(e));if(t==null)return;let n=this.targetForSelectionPoint(t);return n==null?void 0:EC(n.lineElement)}hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=AC(t)?t:AC(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)}Hy(r??void 0,i??void 0)||(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,this.options.controlledSelection===!0?this.proposedSelectedRange=i:(this.selectedRange=i,Ry(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}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:this.editorActiveLine==null?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(e.range==null)return;let r=this.getIndexesFromSelection(e.range,t);if(r==null)throw console.error({rowRange:r,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return r}getLineRenderColumns(e,t,n,r){if(this.pre==null||t==null&&r==null)return[];let{children:i}=this.pre;if(i.length>2)throw console.error(i),Error(`InteractionManager.renderSelection: Somehow there are more than 2 code elements...`);let a=[];for(let o of i){let i=o.hasAttribute(`data-deletions`)?`deletions`:o.hasAttribute(`data-additions`)?`additions`:void 0,s=e!=null&&t!=null&&(e.highlightSide==null||i==null||e.highlightSide===i),c=n!=null&&r!=null&&(n.highlightSide==null||i==null||n.highlightSide===i);if(!s&&!c)continue;let[l,u]=o.children;if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error(`InteractionManager.renderSelection: missing gutter or content element`);if(u.children.length!==l.children.length)throw Error(`InteractionManager.renderSelection: gutter and content children dont match, something is wrong`);a.push({content:u,gutter:l,renderEditorActiveLine:c,renderSelectedLines:s})}return a}renderSelection=()=>{zy(this.renderSelection);let e=this.getSelectionRenderState();if(this.pre==null)return;let{editorActiveLine:t,selectedLines:n}=e,r=!MC(this.renderedSelectedLinesState,n),i=!MC(this.renderedEditorActiveLineState,t);if(!r&&!i)return;r&&(this.renderedSelectedLinesState=void 0),i&&(this.renderedEditorActiveLineState=void 0);let a=this.pre.getAttribute(`data-diff-type`)===`split`,o=r?this.resolveLineRenderRange(n,a,`selected-lines`):void 0,s=i?this.resolveLineRenderRange(t,a,`editor-active-line`):void 0,c=this.getLineRenderColumns(r?n:void 0,o,i?t:void 0,s),l=n.range==null||c.some(e=>e.renderSelectedLines),u=t.range==null||c.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll(`[data-selected-line]`))e.removeAttribute(`data-selected-line`);if(i)for(let e of this.pre.querySelectorAll(`[data-editor-active-line]`))e.removeAttribute(`data-editor-active-line`);let d=o==null?void 0:Math.min(o.start,o.end),f=o==null?void 0:Math.max(o.start,o.end),p=d===f,m=s?.start;for(let e of c){let{content:r,gutter:i,renderEditorActiveLine:o,renderSelectedLines:s}=e,c=Math.max(s?f??-1/0:-1/0,o?m??-1/0:-1/0),l=r.children.length;for(let e=0;e<l;e++){let l=r.children[e],u=i.children[e];if(!(l instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(l,a);if((h??0)>c)break;if(h!=null){if(s&&d!=null&&f!=null&&h>=d&&h<=f){let e=p?`single`:h===d?`first`:h===f?`last`:``;u.setAttribute(`data-selected-line`,e),n.lineNumberOnly||(l.setAttribute(`data-selected-line`,e),u.nextSibling instanceof HTMLElement&&l.nextSibling instanceof HTMLElement&&(l.nextSibling.hasAttribute(`data-line-annotation`)||l.nextSibling.hasAttribute(`data-merge-conflict-actions`))&&(p?(e=`last`,l.setAttribute(`data-selected-line`,`first`)):h===d?e=``:h===f&&l.setAttribute(`data-selected-line`,``),l.nextSibling.setAttribute(`data-selected-line`,e),u.nextSibling.setAttribute(`data-selected-line`,e)))}o&&h===m&&(u.setAttribute(`data-editor-active-line`,``),t.lineNumberOnly||l.setAttribute(`data-editor-active-line`,``))}}}r&&l&&(this.renderedSelectedLinesState=n),i&&u&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}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);wC(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=PC(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=PC(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:TC(r,`[data-line][data-line-index="${a}"]`),o??=a==null?void 0:TC(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:NC(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:NC(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 _C({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:vC({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 vC({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 yC(e){return e!=null&&`kind`in e&&e.kind===`line`}function bC(e){return e!=null&&`kind`in e&&e.kind===`token`}function xC(e){return yC(e)||bC(e)}function SC(e){return`type`in e&&e.type===`line-info`}function CC(e){return`kind`in e&&e.kind===`merge-conflict-action`}function wC(e){return e===`current`||e===`incoming`||e===`both`}function TC(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function EC(e){let t=[],n=e;for(;n!=null;)t.push(n),n=n.parentNode;return t}function DC(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 OC(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 kC(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)||n<=0))return{lineNumber:n,side:t[1]}}function AC(e){return e!=null&&typeof e.elementFromPoint==`function`}function jC(e,t){return e===t||Hy(e??void 0,t??void 0)}function MC(e,t){return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&jC(e?.range??null,t.range)}function NC(e,t){switch(e){case`change-deletion`:return`deletions`;case`change-addition`:return`additions`;default:return t.hasAttribute(`data-deletions`)?`deletions`:`additions`}}function PC(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 FC(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 IC=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,{disableAnnotations:t,columnVariables:n=`apply`}){let r=new Set,i=n===`apply`,a=0,o=new Map(this.observedNodes);this.observedNodes.clear();for(let t of e.children){if(a===2)break;let e=(()=>{if(t instanceof HTMLElement&&t.tagName===`CODE`)return t})();if(e==null)continue;a++;let n=o.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 r=e.firstElementChild;r instanceof HTMLElement||(r=null),n==null?(n={type:`code`,codeElement:e,numberElement:r,codeWidth:`auto`,numberWidth:0,applyColumnVariables:i},this.observedNodes.set(e,n),this.observe(e),r!=null&&(this.observedNodes.set(r,n),this.observe(r))):(this.observedNodes.set(e,n),o.delete(e),n.numberElement===r?n.numberElement==null?n.numberWidth=0:(o.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):(n.numberElement!=null&&(this.unobserve(n.numberElement),o.delete(n.numberElement)),r!=null&&(this.observe(r),o.delete(r),this.observedNodes.set(r,n)),n.numberElement=r,n.numberWidth=0),zC(n,i))}if(a>1&&!t){let t=e.querySelectorAll(`[data-line-annotation*=","]`),n=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 r=n.get(t);r??(r=[],n.set(t,r)),r.push(e)}for(let[e,t]of n){if(t.length!==2){console.error(`DiffFileRenderer.setupResizeObserver: Bad Pair`,e,t);continue}let[n,i]=t,a=n.firstElementChild,s=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(a instanceof HTMLElement)||!(s instanceof HTMLElement))continue;let c=o.get(a);if(c!=null){this.observedNodes.set(a,c),this.observedNodes.set(s,c),o.delete(a),o.delete(s);continue}let l=a.getBoundingClientRect().height,u=s.getBoundingClientRect().height;c={type:`annotations`,column1:{container:n,child:a,childHeight:l},column2:{container:i,child:s,childHeight:u},currentHeight:`auto`},r.add({child1:a,child2:s,item:c,newHeight:Math.max(l,u)})}for(let e of r)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);r.clear()}for(let[e,t]of o)this.unobserve(e),t.type===`code`?HC(t):UC(t);o.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:LC(n.codeInlineSize),r=n.numberInlineSize==null?t.numberWidth:RC(n.numberInlineSize),i=e!==t.codeWidth,a=r!==t.numberWidth;!i&&!a||(t.codeWidth=e,t.numberWidth=r,t.applyColumnVariables&&BC(t,{codeWidthChanged:i,numberWidthChanged:a}))}};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 LC(e){let t=Math.max(Math.floor(e),0);return t===0?`auto`:t}function RC(e){return Math.max(Math.ceil(e),0)}function zC(e,t){e.applyColumnVariables!==t&&(e.applyColumnVariables=t,t?BC(e,{codeWidthChanged:!0,numberWidthChanged:!0}):VC(e))}function BC(e,{codeWidthChanged:t,numberWidthChanged:n}){let{codeElement:r,codeWidth:i,numberWidth:a}=e;if(t&&r.style.setProperty(`--diffs-column-width`,`${typeof i==`number`?`${i}px`:`auto`}`),n&&r.style.setProperty(`--diffs-column-number-width`,`${a===0?`auto`:`${a}px`}`),t||n&&i!==`auto`){let e=typeof i==`number`?Math.max(i-a,0):0;r.style.setProperty(`--diffs-column-content-width`,`${e>0?`${e}px`:`auto`}`)}}function VC(e){e.codeElement.style.removeProperty(`--diffs-column-content-width`),e.codeElement.style.removeProperty(`--diffs-column-number-width`),e.codeElement.style.removeProperty(`--diffs-column-width`)}function HC(e){e.codeElement.isConnected&&VC(e)}function UC(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 WC=new Map,GC=new Map,KC=new Map,qC=new Set;function JC(e){for(let t of Array.isArray(e)?e:[e])if(t!==`text`&&t!==`ansi`&&!qC.has(t))return!1;return!0}function YC(e,t){e=Array.isArray(e)?e:[e];for(let n of e){if(qC.has(n.name))continue;let e=WC.get(n.name);e??(e=n,WC.set(n.name,e)),qC.add(e.name),t.loadLanguageSync(e.data)}}function XC(){return typeof WorkerGlobalScope<`u`&&typeof self<`u`&&self instanceof WorkerGlobalScope}var ZC=Object.defineProperty,QC=Object.getOwnPropertyDescriptor,$C=Object.getOwnPropertyNames,ew=Object.prototype.hasOwnProperty,tw=(e,t)=>{let n={};for(var r in e)ZC(n,r,{get:e[r],enumerable:!0});return t||ZC(n,Symbol.toStringTag,{value:`Module`}),n},nw=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=$C(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ew.call(e,s)&&s!==n&&ZC(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=QC(t,s))||r.enumerable});return e},rw=(e,t,n)=>(nw(e,t,`default`),n&&nw(n,t,`default`)),iw=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),aw=function(e){return`/`+e},ow={},K=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=aw(t,n),t=s(t),t in ow)return;ow[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`:iw,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)})},sw=[{id:`abap`,name:`ABAP`,import:(()=>K(()=>import(`./_CLvhMVsD.js`),[]))},{id:`actionscript-3`,name:`ActionScript`,aliases:[`actionscript`,`as3`],import:(()=>K(()=>import(`./_Cs6JJXT5.js`),[]))},{id:`ada`,name:`Ada`,import:(()=>K(()=>import(`./_C5qYipkI.js`),[]))},{id:`ahk`,name:`AutoHotkey`,aliases:[`ahk1`],import:(()=>K(()=>import(`./_CA9gdOdF.js`),[]))},{id:`ahk2`,name:`AutoHotkey2`,import:(()=>K(()=>import(`./__6rzW9BS.js`),[]))},{id:`angular-html`,name:`Angular HTML`,import:(()=>K(()=>import(`./_xTZ99WxP.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3])))},{id:`angular-ts`,name:`Angular TypeScript`,import:(()=>K(()=>import(`./_d4DNovnq.js`),__vite__mapDeps([4,0,1,2,3,5])))},{id:`apache`,name:`Apache Conf`,import:(()=>K(()=>import(`./_U0d_L8uA.js`),[]))},{id:`apex`,name:`Apex`,import:(()=>K(()=>import(`./_KFGFyKwG.js`),[]))},{id:`apl`,name:`APL`,import:(()=>K(()=>import(`./_BlHZ_Kf_.js`),__vite__mapDeps([6,2,3,1,7,8,9])))},{id:`applescript`,name:`AppleScript`,import:(()=>K(()=>import(`./_CCn79oCD.js`),[]))},{id:`ara`,name:`Ara`,import:(()=>K(()=>import(`./_4CJ0cIlV.js`),[]))},{id:`asciidoc`,name:`AsciiDoc`,aliases:[`adoc`],import:(()=>K(()=>import(`./_SCjQUq34.js`),[]))},{id:`asm`,name:`Assembly`,import:(()=>K(()=>import(`./_Cmm7eHzH.js`),[]))},{id:`astro`,name:`Astro`,import:(()=>K(()=>import(`./_ChmfpmBk.js`),__vite__mapDeps([10,2,3,9,11,12,13])))},{id:`awk`,name:`AWK`,import:(()=>K(()=>import(`./_BWXHIvNe2.js`),[]))},{id:`ballerina`,name:`Ballerina`,import:(()=>K(()=>import(`./_B7ZEbQpA2.js`),[]))},{id:`bat`,name:`Batch File`,aliases:[`batch`,`cmd`],import:(()=>K(()=>import(`./_qdxAdBWQ2.js`),[]))},{id:`beancount`,name:`Beancount`,import:(()=>K(()=>import(`./_D-usSTwE2.js`),[]))},{id:`berry`,name:`Berry`,aliases:[`be`],import:(()=>K(()=>import(`./_DKpUyyne2.js`),[]))},{id:`bibtex`,name:`BibTeX`,import:(()=>K(()=>import(`./_Ci_nEsc72.js`),[]))},{id:`bicep`,name:`Bicep`,import:(()=>K(()=>import(`./_CUHmPFLl2.js`),[]))},{id:`bird2`,name:`BIRD2 Configuration`,aliases:[`bird`],import:(()=>K(()=>import(`./_CYIUgYqB2.js`),[]))},{id:`blade`,name:`Blade`,import:(()=>K(()=>import(`./_BtX0OV9L2.js`),__vite__mapDeps([14,2,3,1,7,8,9,15,16])))},{id:`bsl`,name:`1C (Enterprise)`,aliases:[`1c`],import:(()=>K(()=>import(`./_CpYNKFv52.js`),__vite__mapDeps([17,18])))},{id:`c`,name:`C`,import:(()=>K(()=>import(`./_Cv9uSMiO2.js`).then(e=>e.n),[]))},{id:`c3`,name:`C3`,import:(()=>K(()=>import(`./_D0apG41V2.js`),[]))},{id:`cadence`,name:`Cadence`,aliases:[`cdc`],import:(()=>K(()=>import(`./_CQ2zXKGN2.js`),[]))},{id:`cairo`,name:`Cairo`,import:(()=>K(()=>import(`./_kIpfj7zU2.js`),__vite__mapDeps([19,20])))},{id:`chapel`,name:`Chapel`,aliases:[`chpl`],import:(()=>K(()=>import(`./_ByVrIZCY2.js`),__vite__mapDeps([21,22])))},{id:`clarity`,name:`Clarity`,import:(()=>K(()=>import(`./_CtfBBspg2.js`),[]))},{id:`clojure`,name:`Clojure`,aliases:[`clj`],import:(()=>K(()=>import(`./_DqKBuwfJ2.js`),[]))},{id:`cmake`,name:`CMake`,import:(()=>K(()=>import(`./_Bj61d0ZC2.js`),[]))},{id:`cobol`,name:`COBOL`,import:(()=>K(()=>import(`./_DhTbYHFb2.js`),__vite__mapDeps([23,1,2,3,8])))},{id:`codeowners`,name:`CODEOWNERS`,import:(()=>K(()=>import(`./_C8r90Shi2.js`),[]))},{id:`codeql`,name:`CodeQL`,aliases:[`ql`],import:(()=>K(()=>import(`./_oeQT6MSM2.js`),[]))},{id:`coffee`,name:`CoffeeScript`,aliases:[`coffeescript`],import:(()=>K(()=>import(`./_DGEc5tY92.js`),__vite__mapDeps([24,2])))},{id:`common-lisp`,name:`Common Lisp`,aliases:[`lisp`],import:(()=>K(()=>import(`./_Cv5bFMCO.js`),[]))},{id:`coq`,name:`Rocq`,import:(()=>K(()=>import(`./_DuBRPxYg.js`),[]))},{id:`cpp`,name:`C++`,aliases:[`c++`],import:(()=>K(()=>import(`./_Cbd9gTf8.js`).then(e=>e.n),__vite__mapDeps([25,26,27,22])))},{id:`crystal`,name:`Crystal`,import:(()=>K(()=>import(`./_BXjUVBpA.js`),__vite__mapDeps([28,2,3,1,16,22,29])))},{id:`csharp`,name:`C#`,aliases:[`c#`,`cs`],import:(()=>K(()=>import(`./_oqKa8noW.js`),[]))},{id:`css`,name:`CSS`,import:(()=>K(()=>import(`./_VkiUGcZN.js`).then(e=>e.n),[]))},{id:`csv`,name:`CSV`,import:(()=>K(()=>import(`./_Dx-8-gkx.js`),[]))},{id:`cue`,name:`CUE`,import:(()=>K(()=>import(`./_CE9AQfxI.js`),[]))},{id:`cypher`,name:`Cypher`,aliases:[`cql`],import:(()=>K(()=>import(`./_ClKdZ_lG.js`),[]))},{id:`d`,name:`D`,import:(()=>K(()=>import(`./_qD-0Kul2.js`),[]))},{id:`dart`,name:`Dart`,import:(()=>K(()=>import(`./_CnvKMtbv.js`),[]))},{id:`dax`,name:`DAX`,import:(()=>K(()=>import(`./_BkyTk9wS.js`),[]))},{id:`desktop`,name:`Desktop`,import:(()=>K(()=>import(`./_Dlh5hvp9.js`),[]))},{id:`diff`,name:`Diff`,import:(()=>K(()=>import(`./_woXpYk--.js`),[]))},{id:`docker`,name:`Dockerfile`,aliases:[`dockerfile`],import:(()=>K(()=>import(`./_IyjqRm3v.js`),[]))},{id:`dotenv`,name:`dotEnv`,import:(()=>K(()=>import(`./__5a1GRtc.js`),[]))},{id:`dream-maker`,name:`Dream Maker`,import:(()=>K(()=>import(`./_DW3nJb8Q.js`),[]))},{id:`edge`,name:`Edge`,import:(()=>K(()=>import(`./_CCYH4Ky0.js`),__vite__mapDeps([30,1,2,3,11,15])))},{id:`elixir`,name:`Elixir`,import:(()=>K(()=>import(`./_1PYA5v6h.js`),__vite__mapDeps([31,1,2,3])))},{id:`elm`,name:`Elm`,import:(()=>K(()=>import(`./_4GBVe70g.js`),__vite__mapDeps([32,27,22])))},{id:`emacs-lisp`,name:`Emacs Lisp`,aliases:[`elisp`],import:(()=>K(()=>import(`./_c_oH4hRZ.js`),[]))},{id:`erb`,name:`ERB`,import:(()=>K(()=>import(`./_DR5ZG0w3.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:(()=>K(()=>import(`./_BaHq4SXp.js`),__vite__mapDeps([40,41])))},{id:`fennel`,name:`Fennel`,import:(()=>K(()=>import(`./_DQxkIbk2.js`),[]))},{id:`fish`,name:`Fish`,import:(()=>K(()=>import(`./_BJitypiv.js`),[]))},{id:`fluent`,name:`Fluent`,aliases:[`ftl`],import:(()=>K(()=>import(`./_C03EYrpw.js`),[]))},{id:`fortran-fixed-form`,name:`Fortran (Fixed Form)`,aliases:[`f`,`for`,`f77`],import:(()=>K(()=>import(`./_CQJs3lWb.js`),__vite__mapDeps([42,43])))},{id:`fortran-free-form`,name:`Fortran (Free Form)`,aliases:[`f90`,`f95`,`f03`,`f08`,`f18`],import:(()=>K(()=>import(`./_CYNrtFtB.js`),[]))},{id:`fsharp`,name:`F#`,aliases:[`f#`,`fs`],import:(()=>K(()=>import(`./_DmIc4jLQ.js`),__vite__mapDeps([44,41])))},{id:`gdresource`,name:`GDResource`,aliases:[`tscn`,`tres`],import:(()=>K(()=>import(`./_CY8IvGdO2.js`),__vite__mapDeps([45,46,47])))},{id:`gdscript`,name:`GDScript`,aliases:[`gd`],import:(()=>K(()=>import(`./_DYvRD3hg2.js`),[]))},{id:`gdshader`,name:`GDShader`,import:(()=>K(()=>import(`./_CBce3t8t2.js`),[]))},{id:`genie`,name:`Genie`,import:(()=>K(()=>import(`./_CV2tkWYe2.js`),[]))},{id:`gherkin`,name:`Gherkin`,import:(()=>K(()=>import(`./_DExj1W_82.js`),[]))},{id:`git-commit`,name:`Git Commit Message`,import:(()=>K(()=>import(`./_Dl-2e7rI2.js`),__vite__mapDeps([48,49])))},{id:`git-rebase`,name:`Git Rebase Message`,import:(()=>K(()=>import(`./_BFL5ebqS2.js`),__vite__mapDeps([50,29])))},{id:`gleam`,name:`Gleam`,import:(()=>K(()=>import(`./_CSRkHgEL2.js`),[]))},{id:`glimmer-js`,name:`Glimmer JS`,aliases:[`gjs`],import:(()=>K(()=>import(`./_Dr7LwIoY2.js`),__vite__mapDeps([51,2,3,1,11])))},{id:`glimmer-ts`,name:`Glimmer TS`,aliases:[`gts`],import:(()=>K(()=>import(`./_DbhzZP5E2.js`),__vite__mapDeps([52,2,3,1,11])))},{id:`glsl`,name:`GLSL`,import:(()=>K(()=>import(`./_Brp01NXq.js`).then(e=>e.n),__vite__mapDeps([27,22])))},{id:`gn`,name:`GN`,import:(()=>K(()=>import(`./_ilITqXS62.js`),[]))},{id:`gnuplot`,name:`Gnuplot`,import:(()=>K(()=>import(`./_7GGW24-e2.js`),[]))},{id:`go`,name:`Go`,import:(()=>K(()=>import(`./_rLFTqkRN2.js`),[]))},{id:`graphql`,name:`GraphQL`,aliases:[`gql`],import:(()=>K(()=>import(`./_BhcPbeCA.js`).then(e=>e.n),__vite__mapDeps([36,2,11,13,37])))},{id:`groovy`,name:`Groovy`,import:(()=>K(()=>import(`./_CacY0gHj2.js`),[]))},{id:`hack`,name:`Hack`,import:(()=>K(()=>import(`./_BsdChN-o2.js`),__vite__mapDeps([53,1,2,3,16])))},{id:`haml`,name:`Ruby Haml`,import:(()=>K(()=>import(`./_DLfg1G6i.js`).then(e=>e.n),__vite__mapDeps([35,2,3])))},{id:`handlebars`,name:`Handlebars`,aliases:[`hbs`],import:(()=>K(()=>import(`./_DZAVCSn-2.js`),__vite__mapDeps([54,2,3,1,39])))},{id:`haskell`,name:`Haskell`,aliases:[`hs`],import:(()=>K(()=>import(`./_D8IpX4py2.js`),[]))},{id:`haxe`,name:`Haxe`,import:(()=>K(()=>import(`./_C8oCnwJJ2.js`),[]))},{id:`hcl`,name:`HashiCorp HCL`,import:(()=>K(()=>import(`./_Dh228itO2.js`),[]))},{id:`hjson`,name:`Hjson`,import:(()=>K(()=>import(`./_CxZEssPk2.js`),[]))},{id:`hlsl`,name:`HLSL`,import:(()=>K(()=>import(`./_Cvrh5tZx2.js`),[]))},{id:`html`,name:`HTML`,import:(()=>K(()=>import(`./_NdVLMlDn.js`).then(e=>e.n),__vite__mapDeps([1,2,3])))},{id:`html-derivative`,name:`HTML (Derivative)`,import:(()=>K(()=>import(`./_D6hErX6k2.js`),__vite__mapDeps([15,1,2,3])))},{id:`http`,name:`HTTP`,import:(()=>K(()=>import(`./__Pss17dn2.js`),__vite__mapDeps([55,7,8,9,29,36,2,11,13,37])))},{id:`hurl`,name:`Hurl`,import:(()=>K(()=>import(`./_CccTxCW92.js`),__vite__mapDeps([56,7,8,57,36,2,11,13,37])))},{id:`hxml`,name:`HXML`,import:(()=>K(()=>import(`./_DLbMbJfH2.js`),__vite__mapDeps([58,59])))},{id:`hy`,name:`Hy`,import:(()=>K(()=>import(`./_CZbG8q4J2.js`),[]))},{id:`imba`,name:`Imba`,import:(()=>K(()=>import(`./_DsUTQ-LC2.js`),[]))},{id:`ini`,name:`INI`,aliases:[`properties`],import:(()=>K(()=>import(`./_B5eOa1yu.js`),[]))},{id:`java`,name:`Java`,import:(()=>K(()=>import(`./_yp1JBHQQ.js`).then(e=>e.n),[]))},{id:`javascript`,name:`JavaScript`,aliases:[`js`,`cjs`,`mjs`],import:(()=>K(()=>import(`./_Bh5KV4D5.js`).then(e=>e.n),[]))},{id:`jinja`,name:`Jinja`,import:(()=>K(()=>import(`./_CcY_fkdX.js`),__vite__mapDeps([60,1,2,3])))},{id:`jison`,name:`Jison`,import:(()=>K(()=>import(`./_D7Nr1Fkx.js`),__vite__mapDeps([61,2])))},{id:`json`,name:`JSON`,import:(()=>K(()=>import(`./_mWkgrXwR.js`).then(e=>e.n),[]))},{id:`json5`,name:`JSON5`,import:(()=>K(()=>import(`./_BR5RXkoi.js`),[]))},{id:`jsonc`,name:`JSON with Comments`,import:(()=>K(()=>import(`./_CYpm1nAK.js`),[]))},{id:`jsonl`,name:`JSON Lines`,import:(()=>K(()=>import(`./_CmCQp5Yx.js`),[]))},{id:`jsonnet`,name:`Jsonnet`,import:(()=>K(()=>import(`./_CJTPZ8u_.js`),[]))},{id:`jssm`,name:`JSSM`,aliases:[`fsl`],import:(()=>K(()=>import(`./_DXw9l8Rf.js`),[]))},{id:`jsx`,name:`JSX`,import:(()=>K(()=>import(`./_BkasMCr7.js`).then(e=>e.n),[]))},{id:`julia`,name:`Julia`,aliases:[`jl`],import:(()=>K(()=>import(`./_CGKi9mEa.js`),__vite__mapDeps([62,2,16,20,25,26,27,22,63])))},{id:`just`,name:`Just`,aliases:[`justfile`],import:(()=>K(()=>import(`./_DOlpOlzZ.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:(()=>K(()=>import(`./_CsD5j6eV.js`),[]))},{id:`kotlin`,name:`Kotlin`,aliases:[`kt`,`kts`],import:(()=>K(()=>import(`./_DhhofPvG.js`),[]))},{id:`kusto`,name:`Kusto`,aliases:[`kql`],import:(()=>K(()=>import(`./_C7mF5XQf.js`),[]))},{id:`latex`,name:`LaTeX`,import:(()=>K(()=>import(`./_DVj22Fhb.js`),__vite__mapDeps([66,67,63])))},{id:`lean`,name:`Lean 4`,aliases:[`lean4`],import:(()=>K(()=>import(`./_CewbzKMR.js`),[]))},{id:`less`,name:`Less`,import:(()=>K(()=>import(`./_DVTAwKKz.js`),[]))},{id:`liquid`,name:`Liquid`,import:(()=>K(()=>import(`./_CcuBmBFx.js`),__vite__mapDeps([68,2,3,1,9])))},{id:`llvm`,name:`LLVM IR`,import:(()=>K(()=>import(`./_DqHOMS-s.js`),[]))},{id:`log`,name:`Log file`,import:(()=>K(()=>import(`./_BNLmms1o.js`),[]))},{id:`logo`,name:`Logo`,import:(()=>K(()=>import(`./_Cluzi2Zq.js`),[]))},{id:`lua`,name:`Lua`,import:(()=>K(()=>import(`./_DQ9zeCqC.js`).then(e=>e.n),__vite__mapDeps([38,22])))},{id:`luau`,name:`Luau`,import:(()=>K(()=>import(`./_C2pBCSgt.js`),[]))},{id:`make`,name:`Makefile`,aliases:[`makefile`],import:(()=>K(()=>import(`./_Dixweg8N.js`),[]))},{id:`markdown`,name:`Markdown`,aliases:[`md`],import:(()=>K(()=>import(`./_BYOwaDjH.js`),[]))},{id:`marko`,name:`Marko`,import:(()=>K(()=>import(`./_DHF6f-Qb.js`),__vite__mapDeps([69,3,5,11,70])))},{id:`matlab`,name:`MATLAB`,import:(()=>K(()=>import(`./_D7qyCx1q.js`),[]))},{id:`mdc`,name:`MDC`,import:(()=>K(()=>import(`./_C3JXJPv9.js`),__vite__mapDeps([71,15,1,2,3,39,41])))},{id:`mdx`,name:`MDX`,import:(()=>K(()=>import(`./_DQZ5AkYe.js`),[]))},{id:`mermaid`,name:`Mermaid`,aliases:[`mmd`],import:(()=>K(()=>import(`./_BxpfTIzt.js`),[]))},{id:`mipsasm`,name:`MIPS Assembly`,aliases:[`mips`],import:(()=>K(()=>import(`./_BMqwQI7S.js`),[]))},{id:`mojo`,name:`Mojo`,import:(()=>K(()=>import(`./_CFuIV2fl.js`),[]))},{id:`moonbit`,name:`MoonBit`,aliases:[`mbt`,`mbti`],import:(()=>K(()=>import(`./_DgjMoLWr.js`),[]))},{id:`move`,name:`Move`,import:(()=>K(()=>import(`./_BYnGhZoM.js`),[]))},{id:`narrat`,name:`Narrat Language`,aliases:[`nar`],import:(()=>K(()=>import(`./__X_XdTYD.js`),[]))},{id:`nextflow`,name:`Nextflow`,aliases:[`nf`],import:(()=>K(()=>import(`./_DWQbgPoS.js`),__vite__mapDeps([72,73])))},{id:`nextflow-groovy`,name:`Nextflow Groovy`,import:(()=>K(()=>import(`./_DJMQeKeT.js`),[]))},{id:`nginx`,name:`Nginx`,import:(()=>K(()=>import(`./_Ce1AxkTQ.js`),__vite__mapDeps([74,38,22])))},{id:`nim`,name:`Nim`,import:(()=>K(()=>import(`./_CNm-Qj_22.js`),__vite__mapDeps([75,2,3,1,7,8,22,27,41])))},{id:`nix`,name:`Nix`,import:(()=>K(()=>import(`./_IvuFDN5E2.js`),[]))},{id:`nsis`,name:`NSIS`,import:(()=>K(()=>import(`./_CjNLYCLg2.js`),[]))},{id:`nushell`,name:`nushell`,aliases:[`nu`],import:(()=>K(()=>import(`./_DHYfO66s2.js`),[]))},{id:`objective-c`,name:`Objective-C`,aliases:[`objc`],import:(()=>K(()=>import(`./_D1A_Heim2.js`),[]))},{id:`objective-cpp`,name:`Objective-C++`,import:(()=>K(()=>import(`./_BsSzOQcm2.js`),[]))},{id:`ocaml`,name:`OCaml`,import:(()=>K(()=>import(`./_O90oeIOV2.js`),[]))},{id:`odin`,name:`Odin`,import:(()=>K(()=>import(`./_B1RWQWA52.js`),[]))},{id:`openscad`,name:`OpenSCAD`,aliases:[`scad`],import:(()=>K(()=>import(`./_BUDT5pXO2.js`),[]))},{id:`org`,name:`Org Markup`,import:(()=>K(()=>import(`./_Ci9zG2ie2.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:(()=>K(()=>import(`./_4ZHwLPI52.js`),[]))},{id:`perl`,name:`Perl`,import:(()=>K(()=>import(`./_LszNpqGA.js`),__vite__mapDeps([65,2,3,1,7,8,16])))},{id:`php`,name:`PHP`,import:(()=>K(()=>import(`./_YnlBl5Ip2.js`),__vite__mapDeps([87,2,3,1,7,8,9,16])))},{id:`pkl`,name:`Pkl`,import:(()=>K(()=>import(`./_ot-7Btpt2.js`),[]))},{id:`plsql`,name:`PL/SQL`,import:(()=>K(()=>import(`./_DGHpHOYJ2.js`),[]))},{id:`po`,name:`Gettext PO`,aliases:[`pot`,`potx`],import:(()=>K(()=>import(`./_BiJDBrnU2.js`),[]))},{id:`polar`,name:`Polar`,import:(()=>K(()=>import(`./_C7UOKdEL2.js`),[]))},{id:`postcss`,name:`PostCSS`,import:(()=>K(()=>import(`./_BXeXVLqQ.js`),[]))},{id:`powerquery`,name:`PowerQuery`,import:(()=>K(()=>import(`./_DNMTfnFr2.js`),[]))},{id:`powershell`,name:`PowerShell`,aliases:[`ps`,`ps1`,`pwsh`],import:(()=>K(()=>import(`./_CCSX75yM2.js`),[]))},{id:`prisma`,name:`Prisma`,import:(()=>K(()=>import(`./_DMgNhnYS2.js`),[]))},{id:`prolog`,name:`Prolog`,import:(()=>K(()=>import(`./_iXnhIJG72.js`),[]))},{id:`proto`,name:`Protocol Buffer 3`,aliases:[`protobuf`],import:(()=>K(()=>import(`./_DB4EqR-F.js`),[]))},{id:`pug`,name:`Pug`,aliases:[`jade`],import:(()=>K(()=>import(`./_lzPB5GF7.js`),__vite__mapDeps([94,2,3,1])))},{id:`puppet`,name:`Puppet`,import:(()=>K(()=>import(`./_CDv2pdJW.js`),[]))},{id:`purescript`,name:`PureScript`,import:(()=>K(()=>import(`./_9MfHhQsQ.js`),[]))},{id:`python`,name:`Python`,aliases:[`py`],import:(()=>K(()=>import(`./_gzcpVVnB2.js`),[]))},{id:`qml`,name:`QML`,import:(()=>K(()=>import(`./_DIqHX5oS.js`),__vite__mapDeps([95,2])))},{id:`qmldir`,name:`QML Directory`,import:(()=>K(()=>import(`./_DCQb3MpD.js`),[]))},{id:`qss`,name:`Qt Style Sheets`,import:(()=>K(()=>import(`./_Fe1Jh2GI.js`),[]))},{id:`r`,name:`R`,import:(()=>K(()=>import(`./_BMjt74CT.js`).then(e=>e.n),[]))},{id:`racket`,name:`Racket`,import:(()=>K(()=>import(`./_DcIDlBhZ.js`),[]))},{id:`raku`,name:`Raku`,aliases:[`perl6`],import:(()=>K(()=>import(`./_B3gFvitq2.js`),[]))},{id:`razor`,name:`ASP.NET Razor`,import:(()=>K(()=>import(`./_DG7JD0Wq.js`),__vite__mapDeps([96,1,2,3,78])))},{id:`rbs`,name:`RBS`,aliases:[`ruby-signature`],import:(()=>K(()=>import(`./_C0MpOrj4.js`),[]))},{id:`reg`,name:`Windows Registry Script`,import:(()=>K(()=>import(`./_CRGYupPL.js`),[]))},{id:`regexp`,name:`RegExp`,aliases:[`regex`],import:(()=>K(()=>import(`./_BUYXKQWK.js`).then(e=>e.n),[]))},{id:`rel`,name:`Rel`,import:(()=>K(()=>import(`./_BtDbiS_P.js`),[]))},{id:`riscv`,name:`RISC-V`,import:(()=>K(()=>import(`./_Ckw8ddFX.js`),[]))},{id:`ron`,name:`RON`,import:(()=>K(()=>import(`./_VUp2lXgN.js`),[]))},{id:`rosmsg`,name:`ROS Interface`,import:(()=>K(()=>import(`./_CAekHB0j.js`),[]))},{id:`rst`,name:`reStructuredText`,import:(()=>K(()=>import(`./_C_HKi7R3.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:(()=>K(()=>import(`./_BS5HCQXD.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:(()=>K(()=>import(`./_Cfkwpbl82.js`),[]))},{id:`sas`,name:`SAS`,import:(()=>K(()=>import(`./_K5NvnxJU.js`),__vite__mapDeps([99,16])))},{id:`sass`,name:`Sass`,import:(()=>K(()=>import(`./_DXrisJhu.js`),[]))},{id:`scala`,name:`Scala`,import:(()=>K(()=>import(`./_BiFt_7mu2.js`),[]))},{id:`scheme`,name:`Scheme`,import:(()=>K(()=>import(`./_DQCgrYNe.js`),[]))},{id:`scss`,name:`SCSS`,import:(()=>K(()=>import(`./_CYGmgYex.js`).then(e=>e.n),__vite__mapDeps([5,3])))},{id:`sdbl`,name:`1C (Query)`,aliases:[`1c-query`],import:(()=>K(()=>import(`./_bTVj8UrX2.js`),[]))},{id:`shaderlab`,name:`ShaderLab`,aliases:[`shader`],import:(()=>K(()=>import(`./_BM315xPC.js`),__vite__mapDeps([100,101])))},{id:`shellscript`,name:`Shell`,aliases:[`bash`,`sh`,`shell`,`zsh`],import:(()=>K(()=>import(`./_DWltXATi.js`).then(e=>e.n),[]))},{id:`shellsession`,name:`Shell Session`,aliases:[`console`],import:(()=>K(()=>import(`./_Cs6eIEq5.js`),__vite__mapDeps([102,29])))},{id:`smalltalk`,name:`GNU Smalltalk`,import:(()=>K(()=>import(`./_BHpQb5nM.js`),[]))},{id:`smithy`,name:`Smithy`,import:(()=>K(()=>import(`./_Dgaz7aur.js`),[]))},{id:`solidity`,name:`Solidity`,import:(()=>K(()=>import(`./_Bj7E1mRn.js`),[]))},{id:`soy`,name:`Closure Templates`,aliases:[`closure-templates`],import:(()=>K(()=>import(`./_Euo_IdCD.js`),__vite__mapDeps([103,1,2,3])))},{id:`sparql`,name:`SPARQL`,import:(()=>K(()=>import(`./_L8AbGenz.js`),__vite__mapDeps([104,105])))},{id:`splunk`,name:`Splunk Query Language`,aliases:[`spl`],import:(()=>K(()=>import(`./_BC2Px7Mm.js`),[]))},{id:`sql`,name:`SQL`,import:(()=>K(()=>import(`./_DWNYhaMZ2.js`).then(e=>e.n),[]))},{id:`ssh-config`,name:`SSH Config`,import:(()=>K(()=>import(`./_BgfXC-Er.js`),[]))},{id:`stata`,name:`Stata`,import:(()=>K(()=>import(`./_CBAwKZ_C.js`),__vite__mapDeps([106,16])))},{id:`stylus`,name:`Stylus`,aliases:[`styl`],import:(()=>K(()=>import(`./_B6D30XZt.js`),[]))},{id:`surrealql`,name:`SurrealQL`,aliases:[`surql`],import:(()=>K(()=>import(`./_Ddhm-dQX.js`),__vite__mapDeps([107,2])))},{id:`svelte`,name:`Svelte`,import:(()=>K(()=>import(`./_ClgMqvJk.js`),__vite__mapDeps([108,2,3,11,12])))},{id:`swift`,name:`Swift`,import:(()=>K(()=>import(`./_CyEgAFGc.js`),[]))},{id:`system-verilog`,name:`SystemVerilog`,import:(()=>K(()=>import(`./_Dh5ihWbf.js`),[]))},{id:`systemd`,name:`Systemd Units`,import:(()=>K(()=>import(`./_BxMlprV5.js`),[]))},{id:`talonscript`,name:`TalonScript`,aliases:[`talon`],import:(()=>K(()=>import(`./_CohzipZa.js`),[]))},{id:`tasl`,name:`Tasl`,import:(()=>K(()=>import(`./_DMoTqEGO.js`),[]))},{id:`tcl`,name:`Tcl`,import:(()=>K(()=>import(`./_CZd0xW_V2.js`),[]))},{id:`templ`,name:`Templ`,import:(()=>K(()=>import(`./_BYe0JdJ12.js`),__vite__mapDeps([109,2,3,81])))},{id:`terraform`,name:`Terraform`,aliases:[`tf`,`tfvars`],import:(()=>K(()=>import(`./_DswuEJGm2.js`),[]))},{id:`tex`,name:`TeX`,import:(()=>K(()=>import(`./_BwfU4p-S.js`).then(e=>e.n),__vite__mapDeps([67,63])))},{id:`toml`,name:`TOML`,import:(()=>K(()=>import(`./_CcmNWLt02.js`),[]))},{id:`ts-tags`,name:`TypeScript with Tags`,aliases:[`lit`],import:(()=>K(()=>import(`./_37DiDfEe2.js`),__vite__mapDeps([110,2,3,1,7,8,11,16,27,22])))},{id:`tsv`,name:`TSV`,import:(()=>K(()=>import(`./_sltzmVWM2.js`),[]))},{id:`tsx`,name:`TSX`,import:(()=>K(()=>import(`./_BZImyte8.js`).then(e=>e.n),[]))},{id:`turtle`,name:`Turtle`,import:(()=>K(()=>import(`./_ByJddavk.js`),[]))},{id:`twig`,name:`Twig`,import:(()=>K(()=>import(`./_DtifEQOQ2.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:(()=>K(()=>import(`./_C-2JDMwn.js`).then(e=>e.n),[]))},{id:`typespec`,name:`TypeSpec`,aliases:[`tsp`],import:(()=>K(()=>import(`./_BRdr0IET2.js`),[]))},{id:`typst`,name:`Typst`,aliases:[`typ`],import:(()=>K(()=>import(`./_DI99ib-x2.js`),[]))},{id:`v`,name:`V`,import:(()=>K(()=>import(`./_DBj4K9d_2.js`),[]))},{id:`vala`,name:`Vala`,import:(()=>K(()=>import(`./_zf12oZj62.js`),[]))},{id:`vb`,name:`Visual Basic`,import:(()=>K(()=>import(`./_DOwzaHZ02.js`),[]))},{id:`verilog`,name:`Verilog`,import:(()=>K(()=>import(`./_B2gwz-sJ2.js`),[]))},{id:`vhdl`,name:`VHDL`,import:(()=>K(()=>import(`./_BroJfC0k2.js`),[]))},{id:`viml`,name:`Vim Script`,aliases:[`vim`,`vimscript`],import:(()=>K(()=>import(`./_DvXPmvsu2.js`),[]))},{id:`vue`,name:`Vue`,import:(()=>K(()=>import(`./_wd5Ka9-u2.js`),__vite__mapDeps([112,2,3,1,9,11,15])))},{id:`vue-html`,name:`Vue HTML`,import:(()=>K(()=>import(`./_C36kllbW2.js`),__vite__mapDeps([113,2])))},{id:`vue-vine`,name:`Vue Vine`,import:(()=>K(()=>import(`./_Bym_871-2.js`),__vite__mapDeps([114,2,3,5,12,70,115])))},{id:`vyper`,name:`Vyper`,aliases:[`vy`],import:(()=>K(()=>import(`./_CgoNMtux2.js`),[]))},{id:`wasm`,name:`WebAssembly`,import:(()=>K(()=>import(`./_ByWQv1Qj2.js`),[]))},{id:`wenyan`,name:`Wenyan`,aliases:[`文言`],import:(()=>K(()=>import(`./_C8pVoKbM2.js`),[]))},{id:`wgsl`,name:`WGSL`,import:(()=>K(()=>import(`./_BsKzXJz42.js`),[]))},{id:`wikitext`,name:`Wikitext`,aliases:[`mediawiki`,`wiki`],import:(()=>K(()=>import(`./_ClFFjSW22.js`),[]))},{id:`wit`,name:`WebAssembly Interface Types`,import:(()=>K(()=>import(`./_DdvCle-K2.js`),[]))},{id:`wolfram`,name:`Wolfram`,aliases:[`wl`],import:(()=>K(()=>import(`./_DLL8P-h_2.js`),[]))},{id:`xml`,name:`XML`,import:(()=>K(()=>import(`./_DEubpY7q.js`).then(e=>e.n),__vite__mapDeps([7,8])))},{id:`xsl`,name:`XSL`,import:(()=>K(()=>import(`./_D5PUFlIB2.js`),__vite__mapDeps([93,7,8])))},{id:`yaml`,name:`YAML`,aliases:[`yml`],import:(()=>K(()=>import(`./_BDmZKLpT.js`).then(e=>e.n),[]))},{id:`zenscript`,name:`ZenScript`,import:(()=>K(()=>import(`./_BnlCZFoB2.js`),[]))},{id:`zig`,name:`Zig`,import:(()=>K(()=>import(`./_CMLA9XwU2.js`),[]))}],cw=Object.fromEntries(sw.map(e=>[e.id,e.import])),lw=Object.fromEntries(sw.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),uw={...cw,...lw},dw=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>K(()=>import(`./_vGVdxbeo2.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>K(()=>import(`./_CDeNXAV0.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>K(()=>import(`./_DluEY0Gj.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>K(()=>import(`./_C3h-C4tm.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>K(()=>import(`./_Bqwy1Gya.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>K(()=>import(`./_C9Q5zVZY.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>K(()=>import(`./_CtsyrtPq.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>K(()=>import(`./_R8nAf1vR.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>K(()=>import(`./_DjuaAJKi.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>K(()=>import(`./_Cs2F2srj.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>K(()=>import(`./_BHWKrbxM.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>K(()=>import(`./_5eyTD99u.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>K(()=>import(`./_sB-x3p7T.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>K(()=>import(`./_Df2xbC6M.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>K(()=>import(`./_C-LZuMrd.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>K(()=>import(`./_DXG-b-1a.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>K(()=>import(`./_Bx1FflLF.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>K(()=>import(`./_B_tTalzw.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>K(()=>import(`./_EUqPIrTm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>K(()=>import(`./_BXViO-2h.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>K(()=>import(`./_B68TUdTA.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>K(()=>import(`./_C820rvS2.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>K(()=>import(`./_BPjhmG05.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>K(()=>import(`./_MrdJrrXF.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>K(()=>import(`./_BC_s9l72.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>K(()=>import(`./_BAWPOn9u.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>K(()=>import(`./_BSMLrYjP.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>K(()=>import(`./_CE9ld1lL.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>K(()=>import(`./_DSNQnXHK.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>K(()=>import(`./_CsvMBhTu.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>K(()=>import(`./_Bozd7klA.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>K(()=>import(`./_BmuOG9ZW.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>K(()=>import(`./_BML5mF2J.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>K(()=>import(`./_C_8bwKvT.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>K(()=>import(`./_DVQuIRkW.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>K(()=>import(`./_Bm3Qr25_2.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>K(()=>import(`./_2IIEA8gg.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>K(()=>import(`./_uhdI0v04.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>K(()=>import(`./_CHQ94UKr.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>K(()=>import(`./_B5W6OYN7.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>K(()=>import(`./_BSWPekZh2.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>K(()=>import(`./_DDpmG2fV2.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>K(()=>import(`./_B_bV9PQ92.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>K(()=>import(`./_DhmEMT882.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>K(()=>import(`./_eJ-hLW7d2.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>K(()=>import(`./_Cb4Vim4T2.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>K(()=>import(`./_CLwyXe_n2.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>K(()=>import(`./_D7Lr4KcI2.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>K(()=>import(`./_DQwYfKfQ2.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>K(()=>import(`./_DRFjx7u42.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>K(()=>import(`./_DX1BQOs82.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>K(()=>import(`./_aMsaMD1D2.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>K(()=>import(`./_8PwUyIlP2.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>K(()=>import(`./_DO-qXg-I2.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>K(()=>import(`./_DnToyrRv2.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>K(()=>import(`./_B2OO5cIa2.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>K(()=>import(`./_4G7pJPwS2.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>K(()=>import(`./_UdsmMDCL2.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>K(()=>import(`./_C1IUL_tW2.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>K(()=>import(`./_nFMaYfgc2.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>K(()=>import(`./_oM2G3aXe2.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>K(()=>import(`./_DdrHHSXu2.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>K(()=>import(`./_fwtXNY1n2.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>K(()=>import(`./_BZCL-v6S2.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>K(()=>import(`./_VbXTXTou2.js`),[]))}].map(e=>[e.id,e.import])),fw=t({createOnigurumaEngine:()=>Bw,getDefaultWasmLoader:()=>zw,loadWasm:()=>Nw,setDefaultWasmLoader:()=>Rw}),pw=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function mw(){return 2147483648}function hw(){return typeof performance<`u`?performance.now():Date.now()}var gw=(e,t)=>e+(t-e%t)%t;async function _w(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=mw();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,gw(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:hw,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 vw=Object.defineProperty,yw=(e,t,n)=>t in e?vw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bw=(e,t,n)=>yw(e,typeof t==`symbol`?t:t+``,n),xw=null;function Sw(e){throw new pw(e.UTF8ToString(e.getLastOnigError()))}var Cw=class e{constructor(t){bw(this,`utf16Length`),bw(this,`utf8Length`),bw(this,`utf16Value`),bw(this,`utf8Value`),bw(this,`utf16OffsetToUtf8`),bw(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}},ww=class e{constructor(t){if(bw(this,`id`,++e.LAST_ID),bw(this,`_onigBinding`),bw(this,`content`),bw(this,`utf16Length`),bw(this,`utf8Length`),bw(this,`utf16OffsetToUtf8`),bw(this,`utf8OffsetToUtf16`),bw(this,`ptr`),!xw)throw new pw(`Must invoke loadWasm first.`);this._onigBinding=xw,this.content=t;let n=new Cw(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=xw.omalloc(1e4),e._sharedPtrInUse=!0,xw.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(xw)}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)}};bw(ww,`LAST_ID`,0),bw(ww,`_sharedPtr`,0),bw(ww,`_sharedPtrInUse`,!1);var Tw=ww,Ew=class{constructor(e){if(bw(this,`_onigBinding`),bw(this,`_ptr`),!xw)throw new pw(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new Cw(e[r]);t[r]=i.createString(xw),n[r]=i.utf8Length}let r=xw.omalloc(4*e.length);xw.HEAPU32.set(t,r/4);let i=xw.omalloc(4*e.length);xw.HEAPU32.set(n,i/4);let a=xw.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)xw.ofree(t[n]);xw.ofree(i),xw.ofree(r),a===0&&Sw(xw),this._onigBinding=xw,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 Tw(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 Dw(e){return typeof e.instantiator==`function`}function Ow(e){return typeof e.default==`function`}function kw(e){return e.data!==void 0}function Aw(e){return typeof Response<`u`&&e instanceof Response}function jw(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 Mw;function Nw(e){if(Mw)return Mw;async function t(){xw=await _w(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),Dw(n)?n=await n.instantiator(t):Ow(n)?n=await n.default(t):(kw(n)&&(n=n.data),Aw(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await Fw(n)(t):await Iw(n)(t):jw(n)||n instanceof WebAssembly.Module?n=await Pw(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await Pw(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return Mw=t(),Mw}function Pw(e){return t=>WebAssembly.instantiate(e,t)}function Fw(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Iw(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var Lw;function Rw(e){Lw=e}function zw(){return Lw}async function Bw(e){return e&&await Nw(e),{createScanner(e){return new Ew(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new Tw(e)}}}var Vw=tw({});rw(Vw,fw);var Hw=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function Uw(e){return Ww(e)}function Ww(e){return Array.isArray(e)?Gw(e):e instanceof RegExp?e:typeof e==`object`?Kw(e):e}function Gw(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=Ww(e[n]);return t}function Kw(e){let t={};for(let n in e)t[n]=Ww(e[n]);return t}function qw(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Jw(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Jw(e.substring(0,e.length-1)):e.substr(~t+1)}var Yw=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xw=class{static hasCaptures(e){return e!==null&&(Yw.lastIndex=0,Yw.test(e))}static replaceCaptures(e,t,n){return e.replace(Yw,(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 Zw(e,t){return e<t?-1:+(e>t)}function Qw(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=Zw(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function $w(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 eT(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var tT=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}},nT=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(sT(e),t)}static createFromParsedTheme(e,t){return uT(e,t)}_cachedMatchRoot=new tT(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=>iT(e.parent,t.parentScopes));return n?new oT(n.fontStyle,n.foreground,n.background):null}},rT=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 iT(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&&!aT(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function aT(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var oT=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function sT(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`&&$w(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&$w(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 cT(l,u,e,o,s,c)}}return n}var cT=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}},lT=(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))(lT||{});function uT(e,t){e.sort((e,t)=>{let n=Zw(e.scope,t.scope);return n!==0||(n=Qw(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 dT(t),o=new oT(n,a.getId(r),a.getId(i)),s=new mT(new pT(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 nT(a,o,s)}var dT=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)}},fT=Object.freeze([]),pT=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||fT,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)}},mT=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(),pT.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(Qw(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 pT(e,t,n,r,i))}},hT=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=_T(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 gT(e){return e}function _T(e){return e}function vT(e,t){let n=[],r=bT(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(yT(i)){let e=[];do e.push(i),i=r.next();while(yT(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 yT(e){return!!e&&!!e.match(/[\w\.:]+/)}function bT(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 xT(e){typeof e.dispose==`function`&&e.dispose()}var ST=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},CT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},wT=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))}},TT=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ST(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new wT;for(let n of e)ET(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof ST){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 ET(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 ST?OT({baseGrammar:a,selfGrammar:i},r):DT(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 ST(e))}function DT(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];kT([r],t,n)}}function OT(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&kT(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&kT(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function kT(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?qw({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&kT(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=FT(i);switch(a.kind){case 0:OT({...t,selfGrammar:t.baseGrammar},n);break;case 1:OT(t,n);break;case 2:DT(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?DT(a.ruleName,i,n):OT(i,n)}else a.kind===4?n.add(new CT(a.scopeName,a.ruleName)):n.add(new ST(a.scopeName))}}}var AT=class{kind=0},jT=class{kind=1},MT=class{constructor(e){this.ruleName=e}kind=2},NT=class{constructor(e){this.scopeName=e}kind=3},PT=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function FT(e){if(e===`$base`)return new AT;if(e===`$self`)return new jT;let t=e.indexOf(`#`);return t===-1?new NT(e):t===0?new MT(e.substring(1)):new PT(e.substring(0,t),e.substring(t+1))}var IT=/\\(\d+)/,LT=/\\(\d+)/g,RT=-1,zT=-2;function BT(e){return e}function VT(e){return e}var HT=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Xw.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Xw.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Jw(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:Xw.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Xw.replaceCaptures(this._contentName,e,t)}},UT=class extends HT{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!`)}},WT=class extends HT{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new YT(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 XT,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},GT=class extends HT{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 XT,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},KT=class extends HT{_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 YT(i,this.id),this.beginCaptures=a,this._end=new YT(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 XT;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}},qT=class extends HT{_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 YT(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new YT(o,zT),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 XT;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 XT,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||`￿`),this._cachedCompiledWhilePatterns}},JT=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new UT(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new WT(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=qw({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new GT(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new qT(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 KT(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=FT(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 GT||e instanceof KT||e instanceof qT)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},YT=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`&&IT.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 LT.lastIndex=0,this.source.replace(LT,(e,t)=>eT(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}},XT=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 ZT(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 ZT(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},ZT=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(`
37
37
  `)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},QT=class{constructor(e,t){this.languageId=e,this.tokenType=t}},$T=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new QT(e,8),this._embeddedLanguagesMatcher=new eE(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 QT(0,0);_getBasicScopeAttributes=new tT(e=>new QT(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/},eE=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])=>eT(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 tE=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function nE(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=rE(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 tE(i,!0);f()}return new tE(i,!1);function f(){let o=iE(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===RT){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),lE(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 KT){let r=o;lE(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 qT){let r=o;lE(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(lE(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 rE(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 qT&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=cE(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==zT){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),lE(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 iE(e,t,n,r,i,a){let o=aE(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=oE(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 aE(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=sE(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 oE(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}=sE(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 sE(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function cE(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function lE(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));nE(e,p,n&&d.start===0,d.start,f,i,!1,0),xT(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 uE(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var uE=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function dE(e,t,n,r,i,a,o,s){return new hE(e,t,n,r,i,a,o,s)}function fE(e,t,n,r,i){let a=vT(t,pE),o=JT.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 pE(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(mE(t[r],e))return n=r+1,!0;return!1})}function mE(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 hE=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new $T(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=gE(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=vT(e,pE);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)fE(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&&fE(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(BT(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[VT(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]=gE(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=JT.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===vE.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=hT.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?_E.createRootAndLookUpScopeName(a,r,this):_E.createRoot(`unknown`,r),t=new vE(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
38
38
  `;let a=this.createOnigString(e),o=a.content.length,s=new bE(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=nE(this,a,i,0,t,s,!0,r);return xT(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function gE(e,t){return e=Uw(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 _E=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=rT.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new rT(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new rT(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(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),hT.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}},vE=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)?_E.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:VT(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=_E.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,BT(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,_E.fromExtension(r,n.contentNameScopesList))}},yE=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):vT(e,pE).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>vT(e,pE).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}},bE=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=hT.set(n,0,gT(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=hT.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}},xE=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,dE(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},SE=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new xE(nT.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(nT.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 yE(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new TT(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)}},CE=vE.NULL;function wE(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 TE(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function EE(e){return Array.isArray(e)?e:[e]}async function DE(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function OE(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function kE(e){return e===`ansi`||OE(e)}function AE(e){return e===`none`}function jE(e){return AE(e)}var ME=/(\r?\n)/g;function NE(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(ME),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 PE={light:`#333333`,dark:`#bbbbbb`},FE={light:`#fffffe`,dark:`#1e1e1e`},IE=`__shiki_resolved`;function LE(e){if(e?.[IE])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`?PE.light:PE.dark,n||=t.type===`light`?FE.light:FE.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,IE,{enumerable:!1,writable:!1,value:!0}),t}async function RE(e){return[...new Set((await Promise.all(e.filter(e=>!kE(e)).map(async e=>await DE(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function zE(e){return(await Promise.all(e.map(async e=>jE(e)?null:LE(await DE(e))))).filter(e=>!!e)}function BE(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 Hw(`Circular alias \`${[...n].join(` -> `)} -> ${e}\``);n.add(e)}}return e}var VE=class extends SE{_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=LE(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=nT.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=BE(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 Hw(`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))}},HE=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}},UE=0;function WE(e){UE+=1,e.warnings!==!1&&UE>=10&&UE%10==0&&console.warn(`[Shiki] ${UE} 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 Hw("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(LE),i=new VE(new HE(e.engine,n),r,n,e.langAlias),a;function o(t){return BE(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new Hw(`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 Hw(`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 RE(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await zE(e))}function g(){if(t)throw new Hw(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--UE)}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 GE(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([zE(e.themes||[]),RE(e.langs||[]),e.engine]);return WE({...e,themes:t,langs:n,engine:r})}var KE=new WeakMap;function qE(e,t){KE.set(e,t)}function JE(e){return KE.get(e)}var YE=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(EE(n).map(e=>[e,CE])),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 XE(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function XE(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 ZE(e,t){if(!(e instanceof YE))throw new Hw(`Invalid grammar state`);return e.getInternalStack(t)}var QE=/,/,$E=/ /;function eD(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(OE(e.resolveLangAlias(n.lang||`text`))||AE(r))return NE(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 Hw(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new Hw(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return nD(t,o,i,a,n)}function tD(...e){if(e.length===2)return JE(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(OE(i)||AE(a))throw new Hw(`Plain language does not have grammar state`);if(i===`ansi`)throw new Hw(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new YE(rD(n,c,o,s,r).stateStack,c.name,o.name)}function nD(e,t,n,r,i){let a=rD(e,t,n,r,i),o=new YE(a.stateStack,t.name,n.name);return qE(a.tokens,o),a.tokens}function rD(e,t,n,r,i){let a=wE(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500,includeExplanation:c=!1}=i,l=NE(e),u=i.grammarState?ZE(i.grammarState,n.name)??CE:i.grammarContextCode==null?CE:rD(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=TE(r[hT.getForeground(s)],a),u=hT.getFontStyle(s),f={content:i.substring(t,o),offset:p+t,color:l,fontStyle:u};if(c===`tokenType`)f.type=hT.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(QE).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split($E))})}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`?iD(t.scopes):aD(e,t.scopes)}),g+=1}}d.push(f)}f.push(d),d=[],u=_.ruleStack}return{tokens:f,stateStack:u}}function iD(e){return e.map(e=>({scopeName:e}))}function aD(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:cD(e,i,t.slice(0,r))}}return n}function oD(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function sD(e,t,n){if(!oD(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)oD(e[r],n[i])&&--r,--i;return r===-1}function cD(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(sD(e,t,n)){r.push(a);break}return r}function lD(e,t,n,r=eD){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:JE(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=uD(...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 YE(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&qE(s,c),s}function uD(...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 dD=/\s+/g;function fD(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(dD)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(dD);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}var pD=/:?lang=["']([^"']+)["']/g,mD=/(?:```|~~~)([\w-]+)/g,hD=/\\begin\{([\w-]+)\}/g,gD=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,_D=/^\s*---\r?\n[\s\S]*?\r?\n---(?:\r?\n|\s*$)/;function vD(e){let t=NE(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 yD(e,t,n){let r=new Set;for(let t of e.matchAll(pD)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(mD)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(hD)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(gD)){let e=t[1].toLowerCase().trim(),n=e.includes(`/`)?e.split(`/`).pop():e;n&&r.add(n)}if(_D.test(e)&&r.add(`yaml`),!n)return[...r];let i=n.getBundledLanguages();return[...r].filter(e=>e&&i[e])}var bD=[`color`,`background-color`];function xD(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 SD(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 CD(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=SD(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 xD(e,a)})):e}function wD(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>TD(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&&bD.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 Hw('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 TD(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&lT.Italic&&(t[`font-style`]=`italic`),e.fontStyle&lT.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&lT.Underline&&n.push(`underline`),e.fontStyle&lT.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function ED(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function DD(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=vD(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new Hw(`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 Hw(`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 Hw(`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)}));OD(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 CD(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 Hw(`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+=kD(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new Hw(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new Hw(`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&&fD(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 OD(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new Hw(`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 Hw(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function kD(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(kD).join(``):``}var AD=[DD()];function jD(e){let t=MD(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...AD]}function MD(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 ND=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],PD={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function FD(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 ID(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 LD(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)PD[r]&&t.push({type:`setDecoration`,value:PD[r]});else if(r<=29){let e=PD[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:ND[r-30]}});else if(r===38){let n=ID(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:ND[r-40]}});else if(r===48){let n=ID(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:ND[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:ND[r-100+8]}})}}return t}function RD(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=FD(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=LD(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 zD={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 BD(e=zD){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<ND.length;e++)r.push(t(ND[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 VD=/#([0-9a-f]{3,8})/i,HD=/var\((--[\w-]+-ansi-[\w-]+)\)/,UD={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 WD(e,t,n){let r=wE(e,n),i=NE(t),a=BD(Object.fromEntries(ND.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||UD[t]]}))),o=RD();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=TE(i,r),o=TE(o,r),n.decorations.has(`dim`)&&(i=GD(i));let s=lT.None;return n.decorations.has(`bold`)&&(s|=lT.Bold),n.decorations.has(`italic`)&&(s|=lT.Italic),n.decorations.has(`underline`)&&(s|=lT.Underline),n.decorations.has(`strikethrough`)&&(s|=lT.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function GD(e){let t=e.match(VD);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(HD);return n?`var(${n[1]}-dim)`:e}function KD(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!OE(r)&&!AE(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return WD(r,t,n)}return eD(e,t,n)}function qD(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 Hw("`themes` option must not be empty");let p=lD(e,t,n,KD);if(c=JE(p),l&&l!==`light-dark()`&&!f.some(e=>e.color===l))throw new Hw(`\`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=>wD(e,h,u,l,d))),c&&qE(a,c);let g=f.map(e=>wE(e.theme,n));i=JD(f,m,g,u,l,`fg`,d),r=JD(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=wE(n.theme,n);a=KD(e,t,n);let l=e.getTheme(n.theme);r=TE(l.bg,s),i=TE(l.fg,s),o=l.name,c=JE(a)}else throw new Hw("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function JD(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=TE(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 Hw('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${TE(t[r][a],n[r])||`inherit`}, ${TE(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}var YD=/^\s+$/,XD=/^(\s*)(.*?)(\s*)$/;function ZD(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>ZD(e,t,n),codeToTokens:(t,n)=>qD(e,t,n)}){let i=t;for(let e of jD(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=qD(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=$D(a):d===`never`&&(a=eO(a)),f&&(a=tO(a));let p={...r,get source(){return i}};for(let e of jD(n))a=e.tokens?.call(p,a)||a;return QD(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function QD(e,t,n,r=JE(e)){let i=jD(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:fD,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:`
39
39
  `}));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=ED(a.htmlStyle||TD(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&&qE(m,r),m}function $D(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&lT.Underline||i.fontStyle&lT.Strikethrough));o&&YD.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 eO(e){return e.map(e=>e.flatMap(e=>{if(YD.test(e.content))return e;let t=e.content.match(XD);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 tO(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=ED(e.htmlStyle||TD(e)),i=ED(n.htmlStyle||TD(n)),a=e.fontStyle&&(e.fontStyle&lT.Underline||e.fontStyle&lT.Strikethrough),o=n.fontStyle&&(n.fontStyle&lT.Underline||n.fontStyle&lT.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var nO=pC;function rO(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>ZD(e,t,n),codeToTokens:(t,n)=>qD(e,t,n)},i=nO(ZD(e,t,n,r));for(let e of jD(n))i=e.postprocess?.call(r,i,n)||i;return i}async function iO(e){let t=await GE(e);return{getLastGrammarState:(...e)=>tD(t,...e),codeToTokensBase:(e,n)=>KD(t,e,n),codeToTokensWithThemes:(e,n)=>lD(t,e,n),codeToTokens:(e,n)=>qD(t,e,n),codeToHast:(e,n)=>ZD(t,e,n),codeToHtml:(e,n)=>rO(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function aO(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,kE(n))return[];let r=t[n];if(!r)throw new Hw(`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(jE(e))return`none`;if(typeof e==`string`){let t=n[e];if(!t)throw new Hw(`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 iO({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 oO(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 sO(e,t){let n=oO(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 cO=aO({langs:uw,themes:dw,engine:()=>(0,Vw.createOnigurumaEngine)(K(()=>import(`./_BnjxR4X6.js`),[]))}),{codeToHtml:Qee,codeToHast:$ee,codeToTokens:ete,codeToTokensBase:tte,codeToTokensWithThemes:nte,getSingletonHighlighter:rte,getLastGrammarState:ite}=sO(cO,{guessEmbeddedLanguages:yD}),lO=4294967295,uO=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:lO,end:lO,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 dO(e){if([...e].length!==1)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function fO(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}var pO=new Set([`alnum`,`alpha`,`ascii`,`blank`,`cntrl`,`digit`,`graph`,`lower`,`print`,`punct`,`space`,`upper`,`word`,`xdigit`]),mO=String.raw;function hO(e,t){if(e==null)throw Error(t??`Value expected`);return e}var gO=mO`\[\^?`,_O=`c.? | C(?:-.?)?|${mO`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${mO`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${mO`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${mO`o\{[^\}]*\}?`}|${mO`\d{1,3}`}`,vO=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,yO=new RegExp(mO`
@@ -1611,5 +1611,5 @@ out vec4 outColor;
1611
1611
 
1612
1612
  void main() {
1613
1613
  outColor = v_color;
1614
- }`,e1=8,t1=e1*Float32Array.BYTES_PER_ELEMENT,n1=20*e1,r1=class{constructor(){this.attributes=new Float32Array(n1),this.count=0}},i1=0,a1=0,o1=0,s1=0,c1=0,l1=0,u1=0,d1=class extends IZ{constructor(e,t,n,r){super(),this._terminal=e,this._gl=t,this._dimensions=n,this._themeService=r,this._vertices=new r1,this._verticesCursor=new r1;let i=this._gl;this._program=iQ(A$(i,Q$,$$)),this._register(NZ(()=>i.deleteProgram(this._program))),this._projectionLocation=iQ(i.getUniformLocation(this._program,`u_projection`)),this._vertexArrayObject=i.createVertexArray(),i.bindVertexArray(this._vertexArrayObject);let a=new Float32Array([0,0,1,0,0,1,1,1]),o=i.createBuffer();this._register(NZ(()=>i.deleteBuffer(o))),i.bindBuffer(i.ARRAY_BUFFER,o),i.bufferData(i.ARRAY_BUFFER,a,i.STATIC_DRAW),i.enableVertexAttribArray(3),i.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let s=new Uint8Array([0,1,2,3]),c=i.createBuffer();this._register(NZ(()=>i.deleteBuffer(c))),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,c),i.bufferData(i.ELEMENT_ARRAY_BUFFER,s,i.STATIC_DRAW),this._attributesBuffer=iQ(i.createBuffer()),this._register(NZ(()=>i.deleteBuffer(this._attributesBuffer))),i.bindBuffer(i.ARRAY_BUFFER,this._attributesBuffer),i.enableVertexAttribArray(0),i.vertexAttribPointer(0,2,i.FLOAT,!1,t1,0),i.vertexAttribDivisor(0,1),i.enableVertexAttribArray(1),i.vertexAttribPointer(1,2,i.FLOAT,!1,t1,2*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(1,1),i.enableVertexAttribArray(2),i.vertexAttribPointer(2,4,i.FLOAT,!1,t1,4*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(2,1),this._updateCachedColors(r.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,k$),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,n=this._vertices,r=1,i,a,o,s,c,l,u,d,f,p,m;for(i=0;i<t.rows;i++){for(o=-1,s=0,c=0,l=!1,a=0;a<t.cols;a++)u=(i*t.cols+a)*K$,d=e.cells[u+q$],f=e.cells[u+J$],p=!!(f&67108864),(d!==s||f!==c&&(l||p))&&((s!==0||l&&c!==0)&&(m=r++*e1,this._updateRectangle(n,m,c,s,o,a,i)),o=a,s=d,c=f,l=p);(s!==0||l&&c!==0)&&(m=r++*e1,this._updateRectangle(n,m,c,s,o,t.cols,i))}n.count=r}updateCursor(e){let t=this._verticesCursor,n=e.cursor;if(!n||n.style===`block`){t.count=0;return}let r,i=0;(n.style===`bar`||n.style===`outline`)&&(r=i++*e1,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.style===`bar`?n.dpr*n.cursorWidth:n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(n.style===`underline`||n.style===`outline`)&&(r=i++*e1,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,(n.y+1)*this._dimensions.device.cell.height-n.dpr,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat)),n.style===`outline`&&(r=i++*e1,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat),r=i++*e1,this._addRectangleFloat(t.attributes,r,(n.x+n.width)*this._dimensions.device.cell.width-n.dpr,n.y*this._dimensions.device.cell.height,n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=i}_updateRectangle(e,t,n,r,i,a,o){if(n&67108864)switch(n&50331648){case 16777216:case 33554432:i1=this._themeService.colors.ansi[n&255].rgba;break;case 50331648:i1=(n&16777215)<<8;break;case 0:default:i1=this._themeService.colors.foreground.rgba}else switch(r&50331648){case 16777216:case 33554432:i1=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:i1=(r&16777215)<<8;break;case 0:default:i1=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=M$(e.attributes,this._terminal.rows*this._terminal.cols*e1)),a1=i*this._dimensions.device.cell.width,o1=o*this._dimensions.device.cell.height,s1=(i1>>24&255)/255,c1=(i1>>16&255)/255,l1=(i1>>8&255)/255,u1=1,this._addRectangle(e.attributes,t,a1,o1,(a-i)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,s1,c1,l1,u1)}_addRectangle(e,t,n,r,i,a,o,s,c,l){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=s,e[t+6]=c,e[t+7]=l}_addRectangleFloat(e,t,n,r,i,a,o){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(e.rgba&255)/255])}},f1=class extends IZ{constructor(e,t,n,r,i,a,o,s){super(),this._container=t,this._alpha=i,this._coreBrowserService=a,this._optionsService=o,this._themeService=s,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-${n}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(NZ(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=iQ(this._canvas.getContext(`2d`,{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,n){}handleSelectionChanged(e,t,n,r=!1){}_setTransparency(e,t){if(t===this._alpha)return;let n=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,n),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=S$(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,n=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,n*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,n,r){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(e,t,n,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=wQ,this._clipCell(n,r,t.getWidth()),this._ctx.fillText(t.getChars(),n*this._deviceCellWidth+this._deviceCharLeft,r*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,n){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,n){let r=t?e.options.fontWeightBold:e.options.fontWeight;return`${n?`italic`:``} ${r} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},p1=class extends f1{constructor(e,t,n,r,i,a,o){super(n,e,`link`,t,!0,i,a,o),this._register(r.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(r.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&b$(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},m1=typeof window==`object`?window:globalThis,h1=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new c$,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new c$,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};h1.INSTANCE=new h1;var g1=h1;function _1(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}g1.INSTANCE.onDidChangeZoomLevel,g1.INSTANCE.onDidChangeFullscreen;var v1=typeof navigator==`object`?navigator.userAgent:``;v1.indexOf(`Firefox`);var y1=v1.indexOf(`AppleWebKit`)>=0;!(v1.indexOf(`Chrome`)>=0)&&v1.indexOf(`Safari`),v1.indexOf(`Electron/`),v1.indexOf(`Android`);var b1=!1;if(typeof m1.matchMedia==`function`){let e=m1.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=m1.matchMedia(`(display-mode: fullscreen)`);b1=e.matches,_1(m1,e,({matches:e})=>{b1&&t.matches||(b1=e)})}function x1(){return b1}var S1=`en`,C1=!1,w1=!1,T1=!1,E1=S1,D1,O1=globalThis,k1;typeof O1.vscode<`u`&&typeof O1.vscode.process<`u`?k1=O1.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(k1=process);var A1=typeof k1?.versions?.electron==`string`&&k1?.type===`renderer`;if(typeof k1==`object`){k1.platform,k1.platform,C1=k1.platform===`linux`,C1&&k1.env.SNAP&&k1.env.SNAP_REVISION,k1.env.CI||k1.env.BUILD_ARTIFACTSTAGINGDIRECTORY,E1=S1;let e=k1.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,E1=t.resolvedLanguage||S1,t.languagePack?.translationsConfigFile}catch{}w1=!0}else typeof navigator==`object`&&!A1?(D1=navigator.userAgent,D1.indexOf(`Windows`),D1.indexOf(`Macintosh`),(D1.indexOf(`Macintosh`)>=0||D1.indexOf(`iPad`)>=0||D1.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,C1=D1.indexOf(`Linux`)>=0,D1?.indexOf(`Mobi`),T1=!0,E1=globalThis._VSCODE_NLS_LANGUAGE||S1,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var j1=w1;T1&&typeof O1.importScripts==`function`&&O1.origin;var M1=D1,N1=E1,P1;(e=>{function t(){return N1}e.value=t;function n(){return N1.length===2?N1===`en`:N1.length>=3&&N1[0]===`e`&&N1[1]===`n`&&N1[2]===`-`}e.isDefaultVariant=n;function r(){return N1===`en`}e.isDefault=r})(P1||={});var F1=typeof O1.postMessage==`function`&&!O1.importScripts;(()=>{if(F1){let e=[];O1.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.id===t.data.vscodeScheduleAsyncWork){e.splice(n,1),r.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),O1.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var I1=!!(M1&&M1.indexOf(`Chrome`)>=0);M1&&M1.indexOf(`Firefox`),!I1&&M1&&M1.indexOf(`Safari`),M1&&M1.indexOf(`Edg/`),M1&&M1.indexOf(`Android`);var L1=typeof navigator==`object`?navigator:{};j1||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||L1&&L1.clipboard&&L1.clipboard.writeText,j1||L1&&L1.clipboard&&L1.clipboard.readText,j1||x1()||L1.keyboard,`ontouchstart`in m1||L1.maxTouchPoints,m1.PointerEvent&&(`ontouchstart`in m1||navigator.maxTouchPoints);var R1=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},z1=new R1,B1=new R1,V1=new R1;Array(230);var H1;(e=>{function t(e){return z1.keyCodeToStr(e)}e.toString=t;function n(e){return z1.strToKeyCode(e)}e.fromString=n;function r(e){return B1.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return V1.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return B1.strToKeyCode(e)||V1.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`}return z1.keyCodeToStr(e)}e.toElectronAccelerator=o})(H1||={});var U1=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),W1;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof G1?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:YQ.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:U1})})(W1||={});var G1=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?U1:(this._emitter||=new c$,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var K1;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(K1||={});var q1=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new c$,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await YQ.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};q1.EMPTY=q1.fromArray([]);function J1(e){return Y1(e,0)}function Y1(e,t){switch(typeof e){case`object`:return e===null?X1(349,t):Array.isArray(e)?$1(e,t):e0(e,t);case`string`:return Q1(e,t);case`boolean`:return Z1(e,t);case`number`:return X1(e,t);case`undefined`:return X1(937,t);default:return X1(617,t)}}function X1(e,t){return(t<<5)-t+e|0}function Z1(e,t){return X1(e?433:863,t)}function Q1(e,t){t=X1(149417,t);for(let n=0,r=e.length;n<r;n++)t=X1(e.charCodeAt(n),t);return t}function $1(e,t){return t=X1(104579,t),e.reduce((e,t)=>Y1(t,e),t)}function e0(e,t){return t=X1(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=Q1(n,t),Y1(e[n],t)),t)}var{registerWindow:ane,getWindow:t0,getDocument:one,getWindows:sne,getWindowsCount:cne,getWindowId:lne,getWindowById:une,hasWindow:dne,onDidRegisterWindow:fne,onWillUnregisterWindow:pne,onDidUnregisterWindow:mne}=function(){let e=new Map,t={window:m1,disposables:new FZ};e.set(m1.vscodeWindowId,t);let n=new c$,r=new c$,i=new c$;function a(n,r){return(typeof n==`number`?e.get(n):void 0)??(r?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(t){if(e.has(t.vscodeWindowId))return IZ.None;let a=new FZ,o={window:t,disposables:a.add(new FZ)};return e.set(t.vscodeWindowId,o),a.add(NZ(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(r0(t,a0.BEFORE_UNLOAD,()=>{i.fire(t)})),n.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:a,getWindow(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;let n=e;return n?.view?n.view.window:m1},getDocument(e){return t0(e).document}}}(),n0=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&=(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,null)}};function r0(e,t,n,r){return new n0(e,t,n,r)}var i0=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,n=this.height){return t!==this.width||n!==this.height?new e(t,n):this}static is(e){return typeof e==`object`&&typeof e.height==`number`&&typeof e.width==`number`}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};i0.None=new i0(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,t,n){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let i=J1(n),a=r.get(i);if(a)a.users+=1;else{let o=new c$,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(NZ(()=>{--c.users,c.users===0&&(o.dispose(),s.disconnect(),r?.delete(i),r?.size===0&&this.mutationObservers.delete(e))})),r.set(i,a)}return a.onDidMutate}};var a0={CLICK:`click`,AUXCLICK:`auxclick`,DBLCLICK:`dblclick`,MOUSE_UP:`mouseup`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_MOVE:`mousemove`,MOUSE_OUT:`mouseout`,MOUSE_ENTER:`mouseenter`,MOUSE_LEAVE:`mouseleave`,MOUSE_WHEEL:`wheel`,POINTER_UP:`pointerup`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_LEAVE:`pointerleave`,CONTEXT_MENU:`contextmenu`,WHEEL:`wheel`,KEY_DOWN:`keydown`,KEY_PRESS:`keypress`,KEY_UP:`keyup`,LOAD:`load`,BEFORE_UNLOAD:`beforeunload`,UNLOAD:`unload`,PAGE_SHOW:`pageshow`,PAGE_HIDE:`pagehide`,PASTE:`paste`,ABORT:`abort`,ERROR:`error`,RESIZE:`resize`,SCROLL:`scroll`,FULLSCREEN_CHANGE:`fullscreenchange`,WK_FULLSCREEN_CHANGE:`webkitfullscreenchange`,SELECT:`select`,CHANGE:`change`,SUBMIT:`submit`,RESET:`reset`,FOCUS:`focus`,FOCUS_IN:`focusin`,FOCUS_OUT:`focusout`,BLUR:`blur`,INPUT:`input`,STORAGE:`storage`,DRAG_START:`dragstart`,DRAG:`drag`,DRAG_ENTER:`dragenter`,DRAG_LEAVE:`dragleave`,DRAG_OVER:`dragover`,DROP:`drop`,DRAG_END:`dragend`,ANIMATION_START:y1?`webkitAnimationStart`:`animationstart`,ANIMATION_END:y1?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:y1?`webkitAnimationIteration`:`animationiteration`},o0=class extends IZ{constructor(e,t,n,r,i,a,o,s,c){super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._optionsService=o,this._themeService=s,this._cursorBlinkStateManager=new LZ,this._charAtlasDisposable=this._register(new LZ),this._observerDisposable=this._register(new LZ),this._model=new Z$,this._workCell=new O$,this._workCell2=new O$,this._rectangleRenderer=this._register(new LZ),this._glyphRenderer=this._register(new LZ),this._onChangeTextureAtlas=this._register(new c$),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new c$),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new c$),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new c$),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new c$),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`);let l={antialias:!1,depth:!1,preserveDrawingBuffer:c};if(this._gl=this._canvas.getContext(`webgl2`,l),!this._gl)throw Error(`WebGL2 not supported `+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new SQ(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new p1(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions=fQ(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(r0(this._canvas,`webglcontextlost`,e=>{console.log(`webglcontextlost event received`),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn(`webgl context not restored; firing onContextLoss`),this._onContextLoss.fire(e)},3e3)})),this._register(r0(this._canvas,`webglcontextrestored`,e=>{console.warn(`webglcontextrestored event received`),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,C$(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=E$(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=E$(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(NZ(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),C$(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let e of this._renderLayers)e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,n){for(let r of this._renderLayers)r.handleSelectionChanged(this._terminal,e,t,n);this._model.selection.update(this._core,e,t,n),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new d1(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new U$(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=S$(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=MZ(YQ.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),YQ.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let e of this._renderLayers)e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached){if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return}for(let n of this._renderLayers)n.handleGridChanged(this._terminal,e,t);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new T$(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let n=this._core,r=this._workCell,i,a,o,s,c,l,u=0,d=!0,f,p,m,h,g,_,v,y,b;e=c0(e,n.rows-1,0),t=c0(t,n.rows-1,0);let x=this._coreService.decPrivateModes.cursorStyle??n.options.cursorStyle??`block`,S=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,C=S-n.buffer.ydisp,ee=Math.min(this._terminal.buffer.active.cursorX,n.cols-1),te=-1,ne=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let w=!1;for(a=e;a<=t;a++)for(o=a+n.buffer.ydisp,s=n.buffer.lines.get(o),this._model.lineLengths[a]=0,m=S===o,u=0,c=this._characterJoinerService.getJoinedCharacters(o),y=0;y<n.cols;y++){if(i=this._cellColorResolver.result.bg,s.loadCell(y,r),y===0&&(i=this._cellColorResolver.result.bg),l=!1,d=y>=u,f=y,c.length>0&&y===c[0][0]&&d){p=c.shift();let e=this._model.selection.isCellSelected(this._terminal,p[0],o);for(v=p[0]+1;v<p[1];v++)d&&=e===this._model.selection.isCellSelected(this._terminal,v,o);d&&=!m||ee<p[0]||ee>=p[1],d?(l=!0,r=new s0(r,s.translateToString(!0,p[0],p[1]),p[1]-p[0]),f=p[1]-1):u=p[1]}if(h=r.getChars(),g=r.getCode(),v=(a*n.cols+y)*K$,this._cellColorResolver.resolve(r,y,o,this.dimensions.device.cell.width),ne&&o===S&&(y===ee&&(this._model.cursor={x:ee,y:C,width:r.getWidth(),style:this._coreBrowserService.isFocused?x:n.options.cursorInactiveStyle,cursorWidth:n.options.cursorWidth,dpr:this._devicePixelRatio},te=ee+r.getWidth()-1),y>=ee&&y<=te&&(this._coreBrowserService.isFocused&&x===`block`||this._coreBrowserService.isFocused===!1&&n.options.cursorInactiveStyle===`block`)&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),g!==0&&(this._model.lineLengths[a]=y+1),(this._model.cells[v]!==g||this._model.cells[v+q$]!==this._cellColorResolver.result.bg||this._model.cells[v+J$]!==this._cellColorResolver.result.fg||this._model.cells[v+Y$]!==this._cellColorResolver.result.ext)&&(w=!0,h.length>1&&(g|=X$),this._model.cells[v]=g,this._model.cells[v+q$]=this._cellColorResolver.result.bg,this._model.cells[v+J$]=this._cellColorResolver.result.fg,this._model.cells[v+Y$]=this._cellColorResolver.result.ext,_=r.getWidth(),this._glyphRenderer.value.updateCell(y,a,g,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,h,_,i),l)){for(r=this._workCell,y++;y<=f;y++)b=(a*n.cols+y)*K$,this._glyphRenderer.value.updateCell(y,a,0,0,0,0,GZ,0,0),this._model.cells[b]=0,this._model.cells[b+q$]=this._cellColorResolver.result.bg,this._model.cells[b+J$]=this._cellColorResolver.result.fg,this._model.cells[b+Y$]=this._cellColorResolver.result.ext;y--}}w&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},s0=class extends WQ{constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function c0(e,t,n=0){return Math.max(Math.min(e,t),n)}var l0=`di$target`,u0=`di$dependencies`,d0=new Map;function f0(e){if(d0.has(e))return d0.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);p0(t,e,r)};return t._id=e,d0.set(e,t),t}function p0(e,t,n){t[l0]===t?t[u0].push({id:e,index:n}):(t[u0]=[{id:e,index:n}],t[l0]=t)}f0(`BufferService`),f0(`CoreMouseService`),f0(`CoreService`),f0(`CharsetService`),f0(`InstantiationService`),f0(`LogService`);var m0=f0(`OptionsService`);f0(`OscLinkService`),f0(`UnicodeService`),f0(`DecorationService`);var h0={trace:0,debug:1,info:2,warn:3,error:4,off:5},g0=`xterm.js: `,_0=class extends IZ{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),v0=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=h0[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]==`function`&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?``:g0)+t,...n)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};_0=hZ([gZ(0,m0)],_0);var v0,y0=class extends IZ{constructor(e){if(UZ&&WZ()<16&&!document.createElement(`canvas`).getContext(`webgl2`,{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error(`Webgl2 is only supported on Safari 16 and above`);super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new c$),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new c$),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new c$),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new c$),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element){this._register(t.onWillOpen(()=>this.activate(e)));return}this._terminal=e;let n=t.coreService,r=t.optionsService,i=t,a=i._renderService,o=i._characterJoinerService,s=i._charSizeService,c=i._coreBrowserService,l=i._decorationService;i._logService;let u=i._themeService;this._renderer=this._register(new o0(e,o,s,c,n,l,r,u,this._preserveDrawingBuffer)),this._register(YQ.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(YQ.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(YQ.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(YQ.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(NZ(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},b0=2,x0=1,S0=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(b0,Math.floor(u/e.css.cell.width)),rows:Math.max(x0,Math.floor(l/e.css.cell.height))}}},C0=`3.7.8`,w0=C0,T0=typeof Buffer==`function`,E0=typeof TextDecoder==`function`?new TextDecoder:void 0,D0=typeof TextEncoder==`function`?new TextEncoder:void 0,O0=Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`),k0=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(O0),A0=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,j0=String.fromCharCode.bind(String),M0=typeof Uint8Array.from==`function`?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),N0=e=>e.replace(/=/g,``).replace(/[+\/]/g,e=>e==`+`?`-`:`_`),P0=e=>e.replace(/[^A-Za-z0-9\+\/]/g,``),F0=e=>{let t,n,r,i,a=``,o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw TypeError(`invalid character found`);t=n<<16|r<<8|i,a+=O0[t>>18&63]+O0[t>>12&63]+O0[t>>6&63]+O0[t&63]}return o?a.slice(0,o-3)+`===`.substring(o):a},I0=typeof btoa==`function`?e=>btoa(e):T0?e=>Buffer.from(e,`binary`).toString(`base64`):F0,L0=T0?e=>Buffer.from(e).toString(`base64`):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(j0.apply(null,e.subarray(n,n+4096)));return I0(t.join(``))},R0=(e,t=!1)=>t?N0(L0(e)):L0(e),z0=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?j0(192|t>>>6)+j0(128|t&63):j0(224|t>>>12&15)+j0(128|t>>>6&63)+j0(128|t&63)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return j0(240|t>>>18&7)+j0(128|t>>>12&63)+j0(128|t>>>6&63)+j0(128|t&63)},B0=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,V0=e=>e.replace(B0,z0),H0=T0?e=>Buffer.from(e,`utf8`).toString(`base64`):D0?e=>L0(D0.encode(e)):e=>I0(V0(e)),U0=(e,t=!1)=>t?N0(H0(e)):H0(e),W0=e=>U0(e,!0),G0=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,K0=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return j0((t>>>10)+55296)+j0((t&1023)+56320);case 3:return j0((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return j0((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},q0=e=>e.replace(G0,K0),J0=e=>{if(e=e.replace(/\s+/g,``),!A0.test(e))throw TypeError(`malformed base64.`);e+=`==`.slice(2-(e.length&3));let t,n,r,i=[];for(let a=0;a<e.length;)t=k0[e.charAt(a++)]<<18|k0[e.charAt(a++)]<<12|(n=k0[e.charAt(a++)])<<6|(r=k0[e.charAt(a++)]),n===64?i.push(j0(t>>16&255)):r===64?i.push(j0(t>>16&255,t>>8&255)):i.push(j0(t>>16&255,t>>8&255,t&255));return i.join(``)},Y0=typeof atob==`function`?e=>atob(P0(e)):T0?e=>Buffer.from(e,`base64`).toString(`binary`):J0,X0=T0?e=>M0(Buffer.from(e,`base64`)):e=>M0(Y0(e).split(``).map(e=>e.charCodeAt(0))),Z0=e=>X0($0(e)),Q0=T0?e=>Buffer.from(e,`base64`).toString(`utf8`):E0?e=>E0.decode(X0(e)):e=>q0(Y0(e)),$0=e=>P0(e.replace(/[-_]/g,e=>e==`-`?`+`:`/`)),e2=e=>Q0($0(e)),t2=e=>{if(typeof e!=`string`)return!1;let t=e.replace(/\s+/g,``).replace(/={0,2}$/,``);return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},n2=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),r2=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,n2(t));e(`fromBase64`,function(){return e2(this)}),e(`toBase64`,function(e){return U0(this,e)}),e(`toBase64URI`,function(){return U0(this,!0)}),e(`toBase64URL`,function(){return U0(this,!0)}),e(`toUint8Array`,function(){return Z0(this)})},i2=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,n2(t));e(`toBase64`,function(e){return R0(this,e)}),e(`toBase64URI`,function(){return R0(this,!0)}),e(`toBase64URL`,function(){return R0(this,!0)})},a2={version:C0,VERSION:w0,atob:Y0,atobPolyfill:J0,btoa:I0,btoaPolyfill:F0,fromBase64:e2,toBase64:U0,encode:U0,encodeURI:W0,encodeURL:W0,utob:V0,btou:q0,decode:e2,isValid:t2,fromUint8Array:R0,toUint8Array:Z0,extendString:r2,extendUint8Array:i2,extendBuiltins:()=>{r2(),i2()}},o2=class{constructor(e=new c2,t=new s2){this._base64=e,this._provider=t}activate(e){this._terminal=e,this._disposable=e.parser.registerOscHandler(52,e=>this._setOrReportClipboard(e))}dispose(){return this._disposable?.dispose()}_readText(e,t){let n=this._base64.encodeText(t);this._terminal?.input(`\x1B]52;${e};${n}\x07`,!1)}_setOrReportClipboard(e){let t=e.split(`;`);if(t.length<2)return!0;let n=t[0],r=t[1];if(r===`?`){let e=this._provider.readText(n);return e instanceof Promise?e.then(e=>(this._readText(n,e),!0)):(this._readText(n,e),!0)}let i=``;try{i=this._base64.decodeText(r)}catch{}let a=this._provider.writeText(n,i);return a instanceof Promise?a.then(()=>!0):!0}},s2=class{async readText(e){return e===`c`?navigator.clipboard.readText():Promise.resolve(``)}async writeText(e,t){return e===`c`?navigator.clipboard.writeText(t):Promise.resolve()}},c2=class{encodeText(e){return a2.encode(e)}decodeText(e){let t=a2.decode(e);return!a2.isValid(e)||a2.encode(t)!==e?``:t}},l2=class{constructor(e,t,n,r={}){this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){let n=d2.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(n))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(t,n)=>{if(this._options.hover){let{range:r}=e;this._options.hover(t,n,r)}},e))}};function u2(e){try{let t=new URL(e),n=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch{return!1}}var d2=class e{static computeLink(t,n,r,i){let a=new RegExp(n.source,(n.flags||``)+`g`),[o,s]=e._getWindowedLineStrings(t-1,r),c=o.join(``),l,u=[];for(;l=a.exec(c);){let t=l[0];if(!u2(t))continue;let[n,a]=e._mapStrIdx(r,s,0,l.index),[o,c]=e._mapStrIdx(r,n,a,t.length);if(n===-1||a===-1||o===-1||c===-1)continue;let d={start:{x:a+1,y:n+1},end:{x:c,y:o+1}};u.push({range:d,text:t,activate:i})}return u}static _getWindowedLineStrings(e,t){let n,r=e,i=e,a=0,o=``,s=[];if(n=t.buffer.active.getLine(e)){let e=n.translateToString(!0);if(n.isWrapped&&e[0]!==` `){for(a=0;(n=t.buffer.active.getLine(--r))&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),!(!n.isWrapped||o.indexOf(` `)!==-1)););s.reverse()}for(s.push(e),a=0;(n=t.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),o.indexOf(` `)===-1););}return[s,r]}static _mapStrIdx(e,t,n,r){let i=e.buffer.active,a=i.getNullCell(),o=n;for(;r;){let e=i.getLine(t);if(!e)return[-1,-1];for(let n=o;n<e.length;++n){e.getCell(n,a);let o=a.getChars();if(a.getWidth()&&(r-=o.length||1,n===e.length-1&&o===``)){let e=i.getLine(t+1);e&&e.isWrapped&&(e.getCell(0,a),a.getWidth()===2&&(r+=1))}if(r<0)return[t,n]}t++,o=0}return[t,o]}},f2=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function p2(e,t){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}var m2=class{constructor(e=p2,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,n=t.urlRegex||f2;this._linkProvider=this._terminal.registerLinkProvider(new l2(this._terminal,n,this._handler,t))}dispose(){this._linkProvider?.dispose()}};function h2(e,t){let{term:n,write:r}=e,i=new TextEncoder,a=null,o=0,s=!1,c=null,l=()=>{if(s)return;let i=location.protocol===`https:`?`wss`:`ws`,f=a=new WebSocket(`${i}://${location.host}/term/${e.sessionId}?cols=${n.cols}&rows=${n.rows}&visible=${+!!u()}`);f.onmessage=e=>r(e.data),f.onopen=()=>{o=0,d(f),c&&=(f.send(JSON.stringify({resize:c})),null),m()},f.onclose=()=>{if(!(t.aborted||s||a!==f)){if(document.visibilityState!==`visible`){let e=()=>{document.visibilityState===`visible`&&(document.removeEventListener(`visibilitychange`,e),!t.aborted&&a===f&&l())};document.addEventListener(`visibilitychange`,e,{signal:t})}else++o<=3?setTimeout(()=>{!t.aborted&&a===f&&l()},400*o):e.onDead()}}},u=()=>document.visibilityState===`visible`&&e.isVisible(),d=e=>{e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({visible:u()}))};document.addEventListener(`visibilitychange`,()=>a&&d(a),{signal:t}),l(),t.addEventListener(`abort`,()=>a?.close());let f=[],p=0,m=()=>{for(;f.length&&a?.readyState===WebSocket.OPEN;)a.send(i.encode(f.shift()));p=0};return{send(e){a?.readyState===WebSocket.OPEN?a.send(i.encode(e)):p<1024&&(f.push(e),p+=e.length)},resize(e,t){a?.readyState===WebSocket.OPEN?a.send(JSON.stringify({resize:[e,t]})):c=[e,t]},syncVisibility(){a&&d(a)},get readyState(){return a?.readyState},reconnect(){s=!1,l()},disconnect(){s=!0,a?.close()}}}function g2(e,t,n,r){let i=null,a=0,o=0,s=0,c=0,l=n=>{let r=t().querySelector(`.xterm-screen`)||t(),i=r.clientHeight/e.rows||17;c+=n/i;let a=Math.trunc(c);if(!a)return;c-=a;let o=r.getBoundingClientRect(),s=a>0?1:-1;for(let e=0;e!==a;e+=s)r.dispatchEvent(new WheelEvent(`wheel`,{deltaY:s,deltaMode:WheelEvent.DOM_DELTA_LINE,bubbles:!0,cancelable:!0,clientX:o.left+o.width/2,clientY:o.top+o.height/2}))},u=()=>{cancelAnimationFrame(s),s=0},d=()=>{o*=.97,!(Math.abs(o)<.25)&&(l(o*16),s=requestAnimationFrame(d))};n.addEventListener(`abort`,u),t().addEventListener(`touchstart`,e=>{u(),o=0,i=e.touches[0]?.clientY??null,a=e.timeStamp},{passive:!0,signal:n}),t().addEventListener(`touchmove`,e=>{if(r?.())return;let t=e.touches[0]?.clientY;if(t==null||i==null)return;let n=i-t;Math.abs(n)>=2&&(o=n/Math.max(1,e.timeStamp-a),i=t,a=e.timeStamp,l(n)),e.preventDefault()},{passive:!1,signal:n}),t().addEventListener(`touchend`,()=>{i=null,Math.abs(o)>.5&&(u(),s=requestAnimationFrame(d))},{signal:n})}function _2(e){let t=!1,n=[],r=0;return{write(i){if(!t){e.write(i);return}for(n.push(i),r+=i.length;r>1048576&&n.length>1;)r-=n.shift().length},setFrozen(i){if(t!==i&&(t=i,!i)){let t=n.join(``);n=[],r=0,t&&e.write(t)}}}}function v2(e,t,n){let r=e.textarea;if(!r)return;let i=`\xA0`.repeat(4),a={deleteContentBackward:``,deleteWordBackward:``,deleteSoftLineBackward:``,deleteHardLineBackward:``},o=!1,s=()=>{o||(r.value!==i&&(r.value=i),r.setSelectionRange(i.length,i.length))};r.addEventListener(`beforeinput`,e=>{let n=a[e.inputType];n&&(e.preventDefault(),e.stopImmediatePropagation(),t(n))},{capture:!0,signal:n}),r.addEventListener(`compositionstart`,()=>{o=!0},{signal:n}),r.addEventListener(`compositionend`,()=>{o=!1,setTimeout(s,0)},{signal:n}),r.addEventListener(`input`,()=>setTimeout(s,0),{signal:n}),r.addEventListener(`focus`,()=>setTimeout(s,0),{signal:n}),s()}var y2=450,b2=12,x2=` ·│┃()[]{}<>'"\`,;│|`;function S2(e,t,n,r){let i=!1,a,o=0,s=0,c=null,l=null,u=()=>t().querySelector(`.xterm-screen`)||t(),d=(t,n)=>{let r=u().getBoundingClientRect();return{col:Math.max(0,Math.min(e.cols-1,Math.floor((t-r.left)/r.width*e.cols))),row:Math.max(0,Math.min(e.rows-1,Math.floor((n-r.top)/r.height*e.rows)))+e.buffer.active.viewportY}},f=t=>{let n=e.buffer.active.getLine(t.row)?.translateToString()??``,r=e=>!e||e===` `||x2.includes(e);if(r(n[t.col]))return{start:t,end:t};let i=t.col,a=t.col;for(;i>0&&!r(n[i-1]);)i--;for(;a<n.length-1&&!r(n[a+1]);)a++;return{start:{col:i,row:t.row},end:{col:a,row:t.row}}},p=(e,t)=>e.row<t.row||e.row===t.row&&e.col<=t.col,m=()=>{if(!c||!l)return;let[t,n]=p(c,l)?[c,l]:[l,c],r=(n.row-t.row)*e.cols+(n.col-t.col)+1;e.select(t.col,t.row,Math.max(1,r))},h=()=>{clearTimeout(a),a=void 0};t().addEventListener(`touchstart`,t=>{if(t.touches.length!==1){h();return}!i&&e.hasSelection()&&e.clearSelection(),o=t.touches[0].clientX,s=t.touches[0].clientY,a=setTimeout(()=>{a=void 0,i=!0,n.onStart();let e=f(d(o,s));c=e.start,l=e.end,m(),navigator.vibrate?.(10)},y2)},{passive:!0,signal:r}),t().addEventListener(`touchmove`,e=>{let t=e.touches[0];if(t){if(i){l=d(t.clientX,t.clientY),m(),e.preventDefault();return}a&&Math.hypot(t.clientX-o,t.clientY-s)>b2&&h()}},{passive:!1,signal:r});let g=()=>{if(h(),!i)return;i=!1,n.onEnd();let t=e.getSelection();t&&Y_(t).then(e=>{e&&n.onCopy(t)})};return t().addEventListener(`touchend`,g,{signal:r}),t().addEventListener(`touchcancel`,g,{signal:r}),{selecting:()=>i}}var C2=5;function w2(e,t,n,r){let i=null,a=!1,o=0,s=0,c=()=>t().querySelector(`.xterm-screen`)||t(),l=(t,n)=>{let r=c().getBoundingClientRect();return{col:Math.max(0,Math.min(e.cols-1,Math.floor((t-r.left)/r.width*e.cols))),row:Math.max(0,Math.min(e.rows-1,Math.floor((n-r.top)/r.height*e.rows)))+e.buffer.active.viewportY}};t().addEventListener(`mousedown`,t=>{if(a||t.button!==0||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)return;t.preventDefault(),t.stopImmediatePropagation();let n=t.timeStamp;s=n-o<400?s+1:1,o=n;let r=l(t.clientX,t.clientY);i={startX:t.clientX,startY:t.clientY,startCol:r.col,startRow:r.row,selecting:!1,detail:s},e.focus()},{capture:!0,signal:r}),window.addEventListener(`mousemove`,t=>{if(!i)return;if(!i.selecting){if(Math.hypot(t.clientX-i.startX,t.clientY-i.startY)<C2)return;i.selecting=!0}let n=l(t.clientX,t.clientY),r=(n.row-i.startRow)*e.cols+(n.col-i.startCol)+1,[a,o,s]=r>=0?[i.startCol,i.startRow,Math.max(1,r)]:[n.col,n.row,Math.max(1,-r+1)];e.select(a,o,s),t.preventDefault()},{signal:r}),window.addEventListener(`mouseup`,async t=>{if(!i)return;let r=i.selecting,o=i;if(i=null,r){let t=e.getSelection();t&&await Y_(t)&&n(t);return}a=!0;let s={bubbles:!0,cancelable:!0,clientX:o.startX,clientY:o.startY,button:0,buttons:1,detail:o.detail,view:window},c=document.elementFromPoint(o.startX,o.startY);c?.dispatchEvent(new MouseEvent(`mousedown`,s)),c?.dispatchEvent(new MouseEvent(`mouseup`,{...s,buttons:0,button:0})),c?.dispatchEvent(new MouseEvent(`click`,{...s,buttons:0})),a=!1,t.preventDefault()},{signal:r})}var T2=gr,E2=(e=>`/${e}&`)(_r);function D2(e){xr(e.a,`M15 4L8 20`)}var O2=(e,t)=>yr(e.a,t),k2=(e,t)=>br(e.a,t),A2=gr,j2=(e=>`/${e}&`)(_r);function M2(e){xr(e.a,`M7 12L17 12 M7 8L13 8 M3 20.2895V5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V15C21 16.1046 20.1046 17 19 17H7.96125C7.35368 17 6.77906 17.2762 6.39951 17.7506L4.06852 20.6643C3.71421 21.1072 3 20.8567 3 20.2895Z`)}var N2=(e,t)=>yr(e.a,t),P2=(e,t)=>br(e.a,t),F2=gr,I2=(e=>`/${e}&`)(_r);function L2(e){xr(e.a,`M8.5 4H6C4.89543 4 4 4.89543 4 6V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V6C20 4.89543 19.1046 4 18 4H15.5 M8 6.4V4.5C8 4.22386 8.22386 4 8.5 4C8.77614 4 9.00422 3.77604 9.05152 3.50398C9.19968 2.65171 9.77399 1 12 1C14.226 1 14.8003 2.65171 14.9485 3.50398C14.9958 3.77604 15.2239 4 15.5 4C15.7761 4 16 4.22386 16 4.5V6.4C16 6.73137 15.7314 7 15.4 7H8.6C8.26863 7 8 6.73137 8 6.4Z`)}var R2=(e,t)=>yr(e.a,t),z2=(e,t)=>br(e.a,t),B2=gr,V2=(e=>`/${e}&`)(_r);function H2(e){xr(e.a,`M21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H3.6C3.26863 21 3 20.7314 3 20.4V3.6C3 3.26863 3.26863 3 3.6 3H20.4C20.7314 3 21 3.26863 21 3.6Z M3 16L10 13L21 18 M16 10C14.8954 10 14 9.10457 14 8C14 6.89543 14.8954 6 16 6C17.1046 6 18 6.89543 18 8C18 9.10457 17.1046 10 16 10Z`)}var U2=(e,t)=>yr(e.a,t),W2=(e,t)=>br(e.a,t),G2=`<div class=term-wrap><div class=term></div><!><!><!><!></div><!><!>`,K2=` D b%b%b%b%l%c`,q2=400,J2=55,Y2=3e4,X2=150,Z2=[[{kind:`paste`},{kind:`key`,label:`▲`,seq:`\x1B[A`},{kind:`attach`}],[{kind:`key`,label:`◀`,seq:`\x1B[D`},{kind:`key`,label:`↵`,seq:`\r`},{kind:`key`,label:`▶`,seq:`\x1B[C`}],[{kind:`key`,label:`⇥`,seq:` `},{kind:`key`,label:`▼`,seq:`\x1B[B`},{kind:`key`,label:`^C`,seq:``}]],Q2=L(`o20`,e=>A(e.a,`click`,function(){e._._._.d.click()})),$2=e=>{H2(e.b),U2(e.b,16),W2(e.b),Q2(e)},e4=L(`o19`,e=>{A(e.a,`pointerdown`,function(e){e.preventDefault()}),A(e.a,`click`,function(){e._._._._.ak()})}),t4=e=>{L2(e.b),R2(e.b,16),z2(e.b),e4(e)},n4=P(0,2,e=>{gt(e.a,{enter:e._.e===`↵`,"big-glyph":e._.e===`↵`||e._.e===`⇥`}),V(e.b,e._.e)}),r4=L(`o21`,e=>{A(e.a,`pointerdown`,function(t){t.preventDefault(),e._._._._.af(e._.f)}),A(e.a,`pointerup`,function(){e._._._._.ag()}),A(e.a,`pointercancel`,function(){e._._._._.ag()}),A(e.a,`pointerleave`,function(){e._._._._.ag()}),A(e.a,`contextmenu`,function(e){e.preventDefault()})}),i4=O(0,(e=>`<button title=Paste>${e}</button>`)(F2),(e=>` D/${e}&l`)(I2),t4,(e=>`<button title="Attach image">${e}</button>`)(B2),(e=>` D/${e}&l`)(V2),$2,`<button class=repeat> </button>`,` D `,e=>{n4._(e),r4(e)}),a4=(e,t)=>i4(e,t===`paste`?0:t===`attach`?1:2),o4=(e,t)=>{a4(e,t[0]?.kind),s4(e,t[0]?.label),c4(e,t[0]?.seq)},s4=M(4),c4=M(5),l4=k(0,`<!><!><!>`,`b%`,0,o4),u4=(e,t)=>l4(e,[t]),d4=(e,t)=>u4(e,t[0]),f4=I(60,L(`o17`,e=>A(e.a,`click`,function(){e._._.a7?.send(`\x1B`)})),e=>e._._),p4=L(`o18`,e=>A(e.a,`pointerdown`,function(e){e.preventDefault()})),m4=e=>{f4(e),p4(e)},h4=P(5,0,L(`o8`,e=>{e._.a5&&setTimeout(()=>e.c?.focus(),50)})),g4=L(`o9`,e=>{A(e.a,`click`,function(){F3(e._,!1)}),A(e.b,`click`,function(e){e.stopPropagation()}),A(e.c,`paste`,function(t){t.preventDefault(),e._.aj(t.clipboardData)}),A(e.d,`click`,function(){F3(e._,!1)})}),_4=e=>{h4._(e),g4(e)},v4=L(`o7`,e=>A(e.a,`click`,function(){E3(e._,!1)})),y4=I(51,e=>ht(e.a,[`dot`,hr(e._._.r)]),e=>e._._),b4=e=>{y4(e),x4(e)},x4=I(57,e=>V(e.b,e._._.y),e=>e._._),S4=M(3,e=>{z(e.a,`title`,`New ${e.d} session`),Yr(e.b,e.d)}),C4=L(`o15`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.p?.(e.d)})),w4=e=>{e.b,Kr(e.b,15),Xr(e.b),C4(e)},T4=(e,t)=>S4(e,t[0]),E4=N(1,e=>{B(e.a,`armed`,e._._._.g===e._.j),z(e.a,`title`,e._._._.g===e._.j?`Really kill this session?`:`Kill session`)}),D4=I(8,E4,e=>e._._._),O4=L(`o13`,e=>A(e.a,`click`,function(t,n){e._._._.g===e._.j?(X4(e._._._,null),n.closest(`[popover]`)?.hidePopover(),e._._._._._.w?.(e._.j)):X4(e._._._,e._.j)})),k4=e=>{D4(e),A4._(e),O4(e)},A4=P(6,0,E4),j4=L(`o12`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._._.v?.(e._.j)})),M4=e=>{Vf(e.b),Hf(e.b,12),Uf(e.b),j4(e)},N4=N(10,e=>B(e.a,`current`,e.j===e._._._._.t)),P4=I(53,N4,e=>e._._._._),F4=L(`o14`,e=>A(e.b,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e.j!==e._._._._.t&&e._._._._.u?.(e.j)})),I4=e=>{P4(e),R4(e),B4(e),e.d,Kr(e.d,14),Xr(e.d),F4(e)},L4=O(5,(e=>`<button class="sess-x sess-edit" title="Rename session">${e}</button>`)(zf),(e=>` D/${e}&l`)(Bf),M4),R4=I(54,e=>L4(e,+!e._._._._.v),e=>e._._._._),z4=O(6,`<button class=sess-x>×</button>`,` `,k4),B4=I(55,e=>z4(e,+!e._._._._.w),e=>e._._._._),V4=M(9,e=>{N4(e),A4(e)}),H4=(e,t)=>ht(e.c,[`dot`,hr(t)]),U4=N(14,e=>V(e.e,e.n||e.m)),W4=M(12,e=>{Yr(e.d,e.m),U4(e)}),G4=M(13,U4),K4=k(0,(e=>`<div class=sess-row><button class=sess-open><span></span>${e}<span class=sess-title> </span></button><!><!></div>`)(Lr),(e=>` D D b/${e}&D m%b%l`)(`b%c`),I4,(e,t)=>{V4(e,t[0]?.id),H4(e,t[0]?.state),W4(e,t[0]?.agent),G4(e,t[0]?.title)}),q4=I(52,e=>K4(e,[e._._._.s||[],`id`]),e=>e._._._),J4=q4,Y4=I(50,e=>Yr(e.b,e._._.q||`shell`),e=>e._._),X4=j(6,F(D4)),Z4=(e,t)=>{z(e.a,`popovertarget`,t),z(e.d,`id`,t)},Q4=L(`o16`,e=>A(e.d,`toggle`,function(t,n){if(X4(e,null),t.newState===`open`){let t=e.a.getBoundingClientRect();n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`,n.style.left=`${Math.max(8,Math.min(t.left+t.width/2-n.offsetWidth/2,window.innerWidth-n.offsetWidth-8))}px`}})),$4=e=>{Y4(e),e3(e),n3(e),i3(e),e.b,Kr(e.b,16),Xr(e.b),X4(e,null),Z4(e,Qe(e)),Q4(e)},e3=I(51,e=>ht(e.c,[`dot`,`sess-dot`,hr(e._._.r)]),e=>e._._),t3=O(4,`<!><!><!>`,`b%`,J4),n3=I(52,e=>{B(e.f,`lone`,(e._._.s||[]).length<=1),t3(e,(e._._.s||[]).length>1?0:1)},e=>e._._),r3=k(5,(e=>`<button class=icon-btn>${e}</button>`)(Lr),(e=>` D/${e}&l`)(`b%c`),w4,T4),i3=I(56,e=>r3(e,[[...e._._.x||[],`shell`],e=>e]),e=>e._._),a3=L(`o11`,e=>{A(e.a,`click`,function(){e._._.m?.()}),A(e.c,`click`,function(){e._._.n?.()}),A(e.e,`click`,function(){e._._.o?.()})}),o3=e=>{Jm(e.b),Ym(e.b,16),Xm(e.b),kr(e.d),Ar(e.d,16),jr(e.d),wr(e.f),Tr(e.f,16),Er(e.f),a3(e)},s3=L(`o10`,e=>A(e.a,`click`,function(){e._._.l?.()})),c3=O(0,(e=>`<button class="icon-btn kbtn" title="Back to terminal">${e}</button>`)(cv),(e=>` D/${e}&l`)(lv),e=>{uv(e.b),dv(e.b,16),fv(e.b),s3(e)},((e,t,n)=>`<button class="icon-btn kbtn" title=Workspaces>${e}</button><button class="icon-btn kbtn" title="Manage workspace">${t}</button><button class="icon-btn kbtn" title="Review changes">${n}</button>`)(Km,Dr,Sr),((e,t,n)=>` D/${e}&l D/${t}&l D/${n}&l`)(qm,Or,Cr),o3),l3=O(8,`<button class="icon-btn kbtn kbtn-esc" title=Escape>esc</button>`,` `,m4),u3=O(1,(e=>`<button class="icon-btn kbtn sess-btn" title=Sessions>${e}<span></span></button><div popover=auto class=sess-pop><!><div class=sess-new></div></div>`)(Lr),(e=>` D/${e}& l D%b l`)(`b%c`),$4),d3=N(11,e=>u3(e,e._.k!==`diff`&&e._.p?0:1)),f3=P(6,0,e=>{c3(e,e._.k===`diff`?0:1),l3(e,+(e._.k===`diff`)),d3(e)}),p3=(e,t)=>{z(e.e,`popovertarget`,t),z(e.j,`id`,t)},m3=k(9,`<!><!><!>`,`b%`,0,d4),h3=L(`o23`,e=>{A(e.d,`change`,function(t,n){for(let t of n.files||[])e._.ah(t);n.value=``}),A(e.e,`pointerdown`,function(e){e.preventDefault()}),A(e.g,`pointerdown`,function(e){e.preventDefault()}),A(e.j,`pointerdown`,function(e){e.preventDefault()}),A(e.j,`toggle`,function(t,n){if(t.newState===`open`){let t=e.e.getBoundingClientRect();n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`,n.style.bottom=`auto`}})}),g3=e=>{f3._(e),_3._(e),y3._(e),b3._(e),x3._(e),D2(e.f),O2(e.f,16),k2(e.f),M2(e.h),N2(e.h,16),P2(e.h),p3(e,Qe(e)),m3(e,[Z2]),h3(e)},_3=P(6,0,d3),v3=O(2,`<span class="kbar-ws dim" aria-hidden=true><span></span><span class=kbar-ws-name> </span></span>`,`D bD `,b4),y3=P(6,0,e=>v3(e,+!e._.y)),b3=P(6,0,e=>{B(e.g,`on`,e._.a1),z(e.g,`title`,e._.a1?`Hide keyboard`:`Show keyboard`)}),x3=P(6,0,L(`o22`,e=>A(e.g,`click`,function(){D3(e._,!e._.a1),e._.a7?.setKeyboard(e._.a1)}))),S3=tee(`o6`,1),C3=et(42),w3=O(4,`<div class=term-dead><button class="btn primary">Reconnect</button></div>`,`D `,v4),T3=N(47,L(`o24`,e=>Et(e,{onMount:function(){let t=new AbortController,n=t.signal,r=new fZ({fontSize:13,fontFamily:`ui-monospace, monospace`,scrollback:5e3,allowProposedApi:!0,rightClickSelectsWord:!0,macOptionClickForcesSelection:!0,linkHandler:{activate(e,t){ur(t)}}}),i=new S0;r.loadAddon(i),r.open(e.b);let a=sr();try{let e=new y0;e.onContextLoss(()=>e.dispose()),r.loadAddon(e)}catch{}try{r.loadAddon(new o2(void 0,{readText:()=>navigator.clipboard.readText().catch(()=>``),writeText:(e,t)=>Y_(t).then(()=>{})}))}catch{}r.loadAddon(new m2((e,t)=>ur(t))),i.fit();let o=a?_2(r):null,s=o?o.write:e=>r.write(e),c=h2({sessionId:e.t,term:r,write:s,onDead:()=>{E3(e,!0)},isVisible:()=>!!e.z},n);r.onData(e=>c.send(e)),r.attachCustomKeyEventHandler(t=>t.key===`Enter`&&t.shiftKey?(t.type===`keydown`&&c.send(`\x1B\r`),!1):(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&r.hasSelection()?(t.type===`keydown`&&Y_(r.getSelection()).then(t=>{t&&(r.clearSelection(),e.ab())}),!1):t.type===`keydown`&&(t.metaKey&&t.key.toLowerCase()===`v`||t.ctrlKey&&t.shiftKey&&t.key.toLowerCase()===`v`)?(e.ak(),!1):!(a&&t.type===`keydown`&&t.key===`Backspace`));let l=()=>{if(!e.b.clientWidth)return;let t=i.proposeDimensions();!t||t.cols===r.cols&&t.rows===r.rows||(i.fit(),c.resize(r.cols,r.rows))},u=new ResizeObserver(l);u.observe(e.b),n.addEventListener(`abort`,()=>u.disconnect());let d=()=>requestAnimationFrame(l);if(document.addEventListener(`visibilitychange`,()=>{document.hidden||d()},{signal:n}),window.addEventListener(`pageshow`,d,{signal:n}),window.addEventListener(`focus`,d,{signal:n}),window.visualViewport?.addEventListener(`resize`,d,{signal:n}),e.b.addEventListener(`paste`,t=>{let n=[...t.clipboardData?.files||[]];if(n.length){t.preventDefault(),t.stopImmediatePropagation();for(let t of n)e.ah(t)}},{capture:!0,signal:n}),e.a7={send(e){c.send(e)},setKeyboard(e){let t=r.textarea;t&&(t.inputMode=e?`text`:`none`,e?(t.focus(),setTimeout(()=>{document.activeElement!==t&&t.focus()},50)):t.blur())}},a){r.textarea&&(r.textarea.inputMode=`none`);let t=window.visualViewport;if(t){let i=0,a=()=>{i=Math.max(i,t.height),e.a1&&i-t.height<X2&&(D3(e,!1),r.textarea&&(r.textarea.inputMode=`none`))};a(),t.addEventListener(`resize`,a,{signal:n}),window.addEventListener(`orientationchange`,()=>{i=0},{signal:n})}let i=S2(r,S3(e),{onStart(){o?.setFrozen(!0)},onEnd(){o?.setFrozen(!1)},onCopy(){e.ab()}},n);g2(r,S3(e),n,i.selecting),v2(r,e=>c.send(e),n)}else w2(r,S3(e),()=>e.ab(),n);e.z&&!a&&r.focus();let f={term:r,socket:c,abort:t,suspend:void 0};return e.z||(f.suspend=setTimeout(()=>c.disconnect(),Y2)),f},onUpdate:function(){clearTimeout(this.suspend),this.socket.syncVisibility(),e.z?(!e.a0&&this.socket.readyState>=WebSocket.CLOSING&&(this.term.reset(),this.socket.reconnect()),!e.a0&&!e.a2&&this.term.focus()):this.suspend=setTimeout(()=>this.socket.disconnect(),Y2)},onDestroy:function(){clearTimeout(this.suspend),this.abort.abort(),this.term.dispose()}})),8),E3=j(26,e=>{w3(e,+!e.a0),T3(e)}),D3=j(27,e=>{T3(e),b3(e)}),O3=O(6,((e,t)=>`<div class=kb-slot><div class=key-bar><!><div class=kspacer></div><!><input type=file accept=image/* hidden><button class="icon-btn kbtn dpad-btn" title="More keys">${e}</button><button class="icon-btn kbtn kb-toggle">${t}</button><!><div popover=auto class=dpad-grid></div></div></div>`)(T2,A2),((e,t)=>`E%b b%b b D/${e}&l D/${t}&l%b m`)(E2,j2),g3),k3=j(28,e=>{O3(e,+!e.a2),T3(e)}),A3=O(2,`<div class="term-uploading dim">uploading…</div>`),j3=j(29,e=>A3(e,+!e.a3)),M3=O(3,`<div class=term-copied>Copied</div>`),N3=j(30,e=>M3(e,+!e.a4)),P3=O(5,`<div class=trap-backdrop><div class=paste-trap><p class=dim>Long-press below and choose Paste</p><input placeholder="Paste here…"><button class=btn>Cancel</button></div></div>`,` D Db b `,_4),F3=j(31,e=>{P3(e,+!e.a5),h4(e)}),I3=(e,t)=>J3(e,t.current),L3=(e,t)=>X3(e,t.timer),R3=(e,t)=>Q3(e,t.current),z3=L(`o25`,e=>{k3(e,sr()),A(e.a,`dragover`,function(e){e.preventDefault()}),A(e.a,`drop`,function(t){t.preventDefault();for(let n of t.dataTransfer?.files||[])e.ah(n)})});function B3(e){E3(e,!1),D3(e,!1),k3(e,!1),j3(e,!1),N3(e,!1),F3(e,!1),I3(e,{current:null}),L3(e,{timer:0}),R3(e,{current:null}),z3(e)}var V3=M(41),H3=N(40,e=>V3(e,v6(e))),U3=M(45),W3=M(46,T3),G3=N(44,e=>{U3(e,y6(e)),W3(e,b6(e))}),K3=M(43,e=>{G3(e),T3(e)}),q3=N(34,e=>K3(e,x6(e))),J3=M(33,e=>{H3(e),q3(e),G3(e),T3(e)}),Y3=M(37,T3),X3=M(36,e=>Y3(e,S6(e))),Z3=M(42),Q3=M(39,e=>{Z3(e,C6(e)),H3(e)}),$3=M(9,q3),e6=M(10,e=>{z(e.a,`hidden`,e.k===`diff`),f3(e)}),t6=F(P4),n6=M(19,e=>{T3(e),t6(e)}),r6=M(25,T3),i6=M(11),a6=M(12),o6=M(13),s6=M(14),c6=M(15,_3),l6=M(16,F(Y4)),u6=M(17,F(e3,y4)),d6=M(18,F(n3,q4)),f6=M(20),p6=M(21,F(R4)),m6=M(22,F(B4)),h6=M(23,F(i3)),g6=F(x4),_6=M(24,e=>{y3(e),g6(e)});function v6(e){return t=>{C3(e)(),e.a7?.send(t);let n={};n.delay=setTimeout(()=>{n.repeat=setInterval(()=>e.a7?.send(t),J2)},q2),e.ad=n}}function y6(e){return async t=>{let n=[...t?.files||[]];for(let t of n)await e.ah(t);if(!n.length){let n=t?.getData(`text/plain`);n&&e.a7?.send(n)}F3(e,!1)}}function b6(e){return async()=>{if(!navigator.clipboard?.read){F3(e,!0);return}try{for(let t of await navigator.clipboard.read()){let n=t.types.find(e=>e.startsWith(`image/`));if(n){let r=await t.getType(n);await e.ah(new File([r],`pasted.${n.split(`/`)[1]||`png`}`,{type:n}))}else if(t.types.includes(`text/plain`)){let n=await(await t.getType(`text/plain`)).text();n&&e.a7?.send(n)}}}catch{F3(e,!0)}}}function x6(e){return async t=>{if(t){j3(e,!0);try{let n=await(await fetch(`/api/workspaces/${e.j}/assets?name=${encodeURIComponent(t.name||`pasted.png`)}`,{method:`POST`,body:t})).json();n.path&&e.a7?.send(`${n.path} `)}finally{j3(e,!1)}}}}function S6(e){return()=>{clearTimeout(e.aa),N3(e,!0),e.aa=setTimeout(()=>{N3(e,!1)},1200)}}function C6(e){return()=>{let t=e.ad;t&&(clearTimeout(t.delay),clearInterval(t.repeat),e.ad=null)}}R(`o1`,v6),R(`o4`,y6),R(`o5`,b6),R(`o3`,x6),R(`o0`,S6),R(`o2`,C6);var w6=ks,T6=(e=>`/${e}&`)(As);function E6(e){let t=Math.round(e/6e4);if(t<60)return`${t}m`;let n=Math.round(t/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function D6(e,t){if(!e)return null;let n=new Date(e).getTime()-Date.now();return n<=0?t?null:`now`:E6(n)}var O6=(e,t)=>V(e.e,t?`↻ ${pt(t)}`:``),k6=N(9,e=>O6(e,D6(e.i,e._.h!=null))),A6=Ke(4,k6),j6=A6,M6=N(12,e=>z(e.a,`title`,`${e.k}: ${e.l}% used${e.i?` — resets ${new Date(e.i).toLocaleString()}`:``}`),2),N6=M(11,e=>{V(e.d,e.l),M6(e)}),P6=M(7,e=>{gt(e.c,{hot:e.h>=90,warm:e.h>=70&&e.h<90}),_t(e.c,`width:${Math.min(100,Math.max(2,e.h))}%`),N6(e,Math.round(e.h))}),F6=M(8,e=>{k6(e),M6(e)}),I6=M(10,e=>{V(e.b,e.k),M6(e)}),L6=(e,t)=>{P6(e,t[0]?.used_percent),F6(e,t[0]?.resets_at),I6(e,t[0]?.window)},R6=P(3,0,e=>{z(e.a,`title`,`plan-usage could not reach this provider — these are its last cached numbers, ${E6(e._.h*1e3)} old`),V(e.b,E6(e._.h*1e3))}),z6=R6,B6=P(2,0,e=>V(e.a,e._.j.replace(/^default_/,``).replaceAll(`_`,` `))),V6=B6,H6=O(3,`<span class=usage-stale>⚠ <!> old</span>`,` Db%`,z6),U6=M(7,e=>{B(e.a,`stale`,e.h!=null),H6(e,+(e.h==null)),R6(e),A6(e)}),W6=(e,t)=>V(e.b,t),G6=O(2,`<span class=dim> </span>`,`D `,V6),K6=M(9,e=>{G6(e,+!e.j),B6(e)}),q6=k(4,`<div class=meter><span class="meter-label dim"> </span><span class=meter-track><span class=meter-fill></span></span><span class=meter-pct><!>%</span><span class="meter-reset dim"> </span></div>`,` E lD lD%lD `,j6,L6),J6=(e,t)=>q6(e,[t||[],`window`]),Y6=k(0,`<div class=usage-row><div class=usage-name><strong> </strong><!><!></div><div class=usage-meters></div></div>`,` F l%b%l `,0,(e,t)=>{U6(e,t[0]?.stale_seconds),W6(e,t[0]?.agent),K6(e,t[0]?.plan),J6(e,t[0]?.windows)}),X6=I(12,e=>Y6(e,[e._._.g||[],e=>`${e.agent}-${e.account||``}`]),e=>e._._),Z6=X6,Q6=I(11,e=>V(e.a,e._._.f),e=>e._._),$6=O(2,`<p class=dim><span class=spin></span> Loading usage…</p>`,0,0,`<p class=dim> </p>`,`D `,Q6,`<div class=usage-list></div>`,` `,Z6),e8=I(10,e=>$6(e,e._.e?e._.e?.error?1:2:0)),t8=L(`p3`,e=>A(e.a,`click`,function(){e._.j()})),n8=e=>{e8(e),r8(e),So(e.b),Co(e.b,13),wo(e.b),t8(e)},r8=I(13,e=>{B(e.a,`spinning`,e._.h),z(e.a,`disabled`,e._.h)}),i8=ut(`p4`,(e=>`<header class=manage-head><div><h2>Usage</h2></div><button class=icon-btn title="Refresh usage">${e}</button></header><!><!>`)(bo),(e=>`Db D/${e}&m%c`)(xo),n8),a8=F(e8),o8=j(4,e=>{s8(e,e.e?.error),c8(e,e.e?.agents),a8(e)}),s8=M(5,F(Q6)),c8=M(6,F(X6)),l8=j(7,F(r8)),u8=M(9),d8=L(`p5`,e=>Et(e,{onMount:function(){e.i(!1)}})),f8=M(8,e=>{u8(e,h8(e)),d8(e)});function p8(e){zs(e.a),js(e.a,i8(e)),Vs(e.a,`Usage`),Bs(e.a,`usage-modal`),Rs(e.a),Gs(e.a),o8(e,null),l8(e,!1),f8(e,g8(e))}var m8=M(3,e=>Ws(e.a,_8(e)));function h8(e){return async()=>{l8(e,!0),await e.i(!0),l8(e,!1)}}function g8(e){return async t=>{try{o8(e,await H(`/api/usage${t?`?refresh`:``}`))}catch(t){o8(e,{error:String(t.message||t)})}}}function _8(e){return function(){e.d()}}R(`p1`,h8),R(`p0`,g8),R(`p2`,_8);var v8=ks,y8=(e=>`/${e}&`)(As),b8=et(1,`B2`),x8=I(12,e=>V(e.a,e._.f)),S8=L(`k4`,e=>{It(e,`b`),A(e.b,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._.l()):t.key===`Escape`&&e._.j&&e._.g()})}),C8=e=>{x8(e),w8(e),T8(e),S8(e)},w8=I(14,e=>z(e.b,`placeholder`,e._.i)),T8=I(15,e=>Ft(e,`b`,e._.j,G8(e))),E8=ut(`k6`,`<h2 class=prompt-title> </h2><input>`,`D l `,C8,0,`B2`),D8=I(13,e=>V(e.b,e._.h||`OK`)),O8=L(`k3`,e=>{A(e.a,`click`,function(){e._.l()}),A(e.c,`click`,function(){e._.g()})}),k8=e=>{D8(e),A8(e),O8(e)},A8=I(15,e=>z(e.a,`disabled`,!e._.j.trim())),j8=dt(`k5`,`<button class="btn primary"> </button><div class=spacer></div><button class=btn>Cancel</button>`,` D lb `,k8),M8=M(11),N8=N(10,e=>M8(e,K8(e))),P8=F(A8,T8),F8=j(9,e=>{N8(e),P8(e)}),I8=(e,t)=>F8(e,t||``),L8=M(4,N8),R8=L(`k7`,e=>Et(e,{onMount:function(){setTimeout(()=>{let t=b8(e)();t?.focus(),t?.select()},0)}}));function z8(e){zs(e.a),Gs(e.a,on({content:j8(e)})),js(e.a,E8(e)),Bs(e.a,`prompt-dlg`),Rs(e.a),R8(e)}var B8=F(x8),V8=M(5,e=>{Vs(e.a,e.f),B8(e)}),H8=M(6,e=>Ws(e.a,q8(e))),U8=M(7,F(D8)),W8=M(8,F(w8));function G8(e){return t=>{F8(e._,t)}}function K8(e){return()=>{let t=e.j.trim();t&&e.e(t)}}function q8(e){return function(){e.g()}}R(`k0`,G8),R(`k1`,K8),R(`k2`,q8);var J8=((e,t)=>`<div class=work-view>${e}<div class=main-col><!><!>${t}<!><!><div class=term-area></div></div><!><!></div>`)(fh,DF),Y8=((e,t)=>`D/${e}&D%b%b/${t}&%b%b l%b%l`)(ph,OF),X8=N(1,e=>I8(e.a,e._.a6||e._.a7)),Z8=P(8,0,X8),Q8=e=>{Z8._(e),$8._(e),t5._(e),n5._(e),z8(e.a),V8(e.a,`Rename session`),U8(e.a,`Rename`),H8(e.a,g7(e)),W8(e.a)},$8=P(8,0,X8),e5=N(2,e=>L8(e.a,_7(e))),t5=P(8,0,e5),n5=P(8,0,e5),r5=P(1,0,e=>V(e.a,e._.a3)),i5=L(`q29`,e=>A(e.b,`click`,function(){f7(e._,null)})),a5=e=>{r5._(e),i5(e)},o5=e=>{p8(e.a),m8(e.a,v7(e))},s5=N(2,e=>V(e.b,e._._.a4?`Starting…`:`Start ${e._._.o||`claude`}`)),c5=I(63,s5,e=>e._._),l5=L(`q30`,e=>A(e.a,`click`,function(){e._._.am(e._._.o||`claude`,!0)})),u5=e=>{c5(e),d5(e),l5(e)},d5=I(67,e=>{z(e.a,`disabled`,e._._.a4),s5(e)},e=>e._._),f5=N(8,e=>r6(e.b,e._._.n&&e._._.y===`term`&&e.g===e._._.ak),3),p5=I(62,f5,e=>e._._),m5=e=>{p5(e),h5(e),g5(e),v5(e),y5(e),b5(e),C5(e),w5(e),T5(e),B3(e.b),f6(e.b,S7(e)),s6(e.b,x7(e)),i6(e.b,b7(e)),a6(e.b,y7(e))},h5=I(64,e=>h6(e.b,e._._.r),e=>e._._),g5=I(65,e=>{e6(e.b,e._._.y),f5(e)},e=>e._._),_5=N(11,e=>c6(e.b,C7(e))),v5=I(71,e=>{$3(e.b,e._._.aa),o6(e.b,w7(e)),_5(e)},e=>e._._),y5=I(72,e=>_6(e.b,e._._.ag),e=>e._._),b5=I(73,e=>{d6(e.b,e._._.ah),p6(e.b,T7(e))},e=>e._._),x5=le(3,0,2),S5=N(7,e=>x5(e,e.g===e._._.ak)),C5=I(75,e=>{f5(e),S5(e)},e=>e._._),w5=I(76,e=>m6(e.b,E7(e)),e=>e._._),T5=I(78,_5,e=>e._._),E5=M(6,e=>{n6(e.b,e.g),f5(e),S5(e)}),D5=(e,t)=>u6(e.b,t),O5=(e,t)=>l6(e.b,t),k5=k(0,(e=>`<!><!>${e}<!><!><!>`)(G2),(e=>`b%b/${e}&%b%c`)(K2),m5,(e,t)=>{E5(e,t[0]?.id),D5(e,t[0]?.state),O5(e,t[0]?.agent)}),A5=P(6,0,e=>k5(e,[e._.ah,`id`])),j5=e=>{A5._(e),N5._(e)},M5=O(1,`<div class=empty-sess><p class=dim>No sessions in this workspace.</p><button class="btn primary"> </button></div>`,`Db D `,u5),N5=P(6,0,e=>M5(e,+!!e._.aj)),P5=M(59,n5),F5=O(6,`<!><!><!><!>`,`b%b%`,j5,`<p class="dim pad-inline">Loading sessions…</p>`),I5=L(`q33`,e=>{e.n&&window.addEventListener(`keydown`,t=>{if(t.key===`Escape`&&e.a1&&u7(e,!1),(t.metaKey||t.ctrlKey)&&t.shiftKey&&t.key.toLowerCase()===`d`&&(t.preventDefault(),c7(e,e.y===`diff`?`term`:`diff`)),t.altKey&&(t.key===`[`||t.key===`]`)&&(e.ah?.length??0)>1){t.preventDefault();let n=e.ah.map(e=>e.id);i7(e,n[(Math.max(0,n.indexOf(e.ak))+(t.key===`]`?1:n.length-1))%n.length]),c7(e,`term`)}},{capture:!0,signal:De(e,0)})}),L5=N(47,e=>{Ee(e,0),I5(e)},4),R5=F(C5),z5=M(46,e=>{Vg(e.a,e.ak),L5(e),R5(e)}),B5=N(44,e=>z5(e,(()=>{if(e.w&&e.ah?.some(t=>t.id===e.w))return e.w;let t=Jn(e.aa);return t&&e.ah?.some(e=>e.id===t)?t:e.ah?.[0]?.id??null})()),2),V5=F(b5),H5=M(43,e=>{T_(e.a,e.ah),WH(e.d,e.ah||[]),Ane(e,e.ah?.length),F5(e,+!e.ah),B5(e),L5(e),A5(e),V5(e)}),U5=N(40,e=>H5(e,e.v??e.m?.[e.aa]?.sessions??null),2),W5=N(57,L(`q31`,e=>Et(e,{active:e.n,load:e.au,onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,started:!1,stale:!1,timer:void 0,refresh:()=>{if(document.hidden){r.stale=!0;return}r.stale=!1,this.load(!1)},sync:()=>{this.active?(r.started||(r.started=!0,this.load(!0)),r.timer??=setInterval(r.refresh,1e4)):r.stop()},stop:()=>{clearInterval(r.timer),r.timer=void 0}};return kn().addEventListener(`sessions.changed`,t=>{let n=t.data?.workspaceId;r.started&&(!n||n===e.aa)&&r.refresh()},{signal:n}),document.addEventListener(`visibilitychange`,()=>{!document.hidden&&r.stale&&r.refresh()},{signal:n}),Nn(()=>{if(!this.active)return;let t=Fn(e.aa);t&&(l7(e,t.pr||``),c7(e,`diff`));let n=Ln(e.aa);n&&(i7(e,n),c7(e,`term`))},n),r.sync(),r},onUpdate:function(){this.sync()},onDestroy:function(){this.abort.abort(),this.stop()}})),2),G5=M(56,W5),K5=N(55,e=>G5(e,O7(e)),2),q5=M(54,K5),J5=N(52,e=>q5(e,k7(e)),6),Y5=F(T5),X5=M(60,e=>{x_(e.a,A7(e)),Y5(e)}),Z5=N(49,e=>X5(e,j7(e)),2),Q5=M(48,e=>{J5(e),Z5(e)}),$5=N(38,e=>Q5(e,M7(e))),e7=M(58,F(w5)),t7=N(23,e=>e7(e,N7(e))),n7=j(21,e=>{P5(e,D7(e)),U5(e),$5(e),J5(e),t7(e)}),r7=N(39,L(`q32`,e=>{e.w&&Yn(e.aa,e.w)})),i7=j(22,e=>{B5(e),J5(e),t7(e),r7(e)}),a7=le(5,2,4),o7=N(25,e=>zH(e.d,e.n&&e.y===`diff`)),s7=F(g5),c7=j(24,e=>{Kg(e.a,e.y),B(e.g,`as-bar`,e.y===`diff`),a7(e,e.y===`diff`),L5(e),o7(e),s7(e)}),l7=j(26,e=>FH(e.d,e.a0)),u7=j(27,e=>{Qg(e.a,e.a1),L5(e)}),hne=O(7,w6,(e=>`/${e}&`)(T6),o5),d7=j(28,e=>hne(e,+!e.a2)),gne=O(1,`<p class=toast-error> <button title=Dismiss>×</button></p>`,`D b `,a5),f7=j(29,e=>{gne(e,+!e.a3),r5(e)}),p7=j(30,F(d5)),_ne=O(8,v8,(e=>`/${e}&`)(y8),Q8),m7=j(31,e=>{xne(e,e.a5?.title),Sne(e,e.a5?.agent),Cne(e,e.a5?.id),_ne(e,+!e.a5)}),vne=(e,t)=>{Fne(e,t.wanted),Ine(e,t.run)},yne=M(61);function bne(e){c_(e.a),Hg(e.a,W7(e)),qg(e.a,U7(e)),$g(e.a,H7(e)),l_(e.a,V7(e)),j_(e.a,B7(e)),A_(e.a,z7(e)),O_(e.a,R7(e)),C_(e.a,L7(e)),SH(e.d),qH(e.d,I7(e)),YH(e.d,F7(e)),n7(e,null),i7(e,null),c7(e,`term`),l7(e,``),u7(e,!1),d7(e,!1),f7(e,null),p7(e,!1),m7(e,null),vne(e,{wanted:!1,run:void 0}),yne(e,P7(e))}var xne=M(32,Z8),Sne=M(33,$8),Cne=M(34,t5),wne=(e,t)=>{Lg(e.a,t),Ene(e,t?.id),Dne(e,t?.status),One(e,t?.name)},h7=N(37,L(`q34`,e=>{if(e.n){let t=Fn(e.aa);t&&(l7(e,t.pr||``),c7(e,`diff`));let n=Ln(e.aa);n&&(i7(e,n),c7(e,`term`))}})),Tne=F(v5),Ene=M(36,e=>{RH(e.d,e.aa),U5(e),B5(e),h7(e),$5(e),J5(e),r7(e),Z5(e),W5(e),Tne(e)}),Dne=M(41,J5),One=M(42,F(y5)),kne=wne,Ane=M(45,N5),jne=M(12,e=>{m_(e.a,e.m),U5(e)}),Mne=F(p5),Nne=L(`q35`,e=>{e.n||u7(e,!1)}),Pne=M(13,e=>{u_(e.a,e.n),h7(e),L5(e),W5(e),o7(e),Mne(e),Nne(e)}),Fne=M(51,e=>{J5(e),K5(e)}),Ine=M(53,K5),Lne=F(c5),Rne=M(14,e=>{J5(e),Lne(e)}),zne=M(15,e=>{g_(e.a,e.p),Z5(e)}),Bne=(e,t)=>d_(e.a,t),Vne=F(h5),Hne=M(17,e=>{y_(e.a,e.r),Vne(e)}),Une=(e,t)=>E_(e.a,t),Wne=M(19,e=>__(e.a,e.t)),Gne=(e,t)=>M_(e.a,t);function g7(e){return function(){m7(e._,null)}}function _7(e){return function(t){e._.ax(e._.a8,t),m7(e._,null)}}function v7(e){return function(){d7(e._,!1)}}function y7(e){return function(){u7(e._._,!0)}}function b7(e){return function(){c7(e._._,`term`)}}function x7(e){return function(){l7(e._._,``),c7(e._._,`diff`)}}function S7(e){return function(t){i7(e._._,t)}}function C7(e){return function(t){e._._.ay(e._._.aa,t)}}function w7(e){return function(){e._._.t?.(e._._.aa)}}function T7(e){return function(t){let n=(e._._.ah||[]).find(e=>e.id===t);n&&m7(e._._,n)}}function E7(e){return function(t){e._._.aw(t)}}function D7(e){return async(t,n)=>{n=n.trim(),n&&(n7(e,(e.v||[]).map(e=>e.id===t?{...e,title:n}:e)),await fetch(`/api/sessions/${t}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({title:n})}))}}function O7(e){return t=>(t&&(e.ap=!0),(e.ar??=Rn(e.as))())}function k7(e){return async()=>{let t=e.ap;e.ap=!1;try{let n=await H(`/api/workspaces/${e.aa}/sessions`);if(!n.length&&t&&e.af===`active`){let t=await e.am(e.o||`claude`,!1);n=t?[t]:[]}n7(e,n);let r=Jn(e.aa);r&&n.some(e=>e.id===r)&&i7(e,r),e.v.some(t=>t.id===e.w)||i7(e,e.v?.[0]?.id||null)}catch(t){n7(e,e.v||[]),f7(e,String(t))}}}function A7(e){return function(t,n){e.ay(t,n)}}function j7(e){return async(t,n)=>{if(t===e.aa){let r=await e.am(n,!0);r&&Yn(t,r.id);return}try{Yn(t,(await H(`/api/workspaces/${t}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})})).id),e.p?.(t)}catch(t){f7(e,String(t.message||t))}}}function M7(e){return async(t,n)=>{p7(e,!0);try{let r=await H(`/api/workspaces/${e.aa}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:t})});return n&&(n7(e,(e.v||[]).concat(r)),i7(e,r.id)),r}catch(t){return f7(e,String(t.message||t)),null}finally{p7(e,!1)}}}function N7(e){return async t=>{try{await H(`/api/sessions/${t}`,{method:`DELETE`}),n7(e,(e.v||[]).filter(e=>e.id!==t)),e.w===t&&i7(e,e.v?.[0]?.id||null)}catch(t){f7(e,`Kill session failed: ${String(t.message||t)}`)}}}function P7(e){return t=>{m7(e,t)}}function F7(e){return function(){c7(e,`term`)}}function I7(e){return function(t){i7(e,t),c7(e,`term`)}}function L7(e){return function(t){l7(e,t||``)}}function R7(e){return function(t){e.az(t)}}function z7(e){return function(t){e.aw(t)}}function B7(e){return function(){d7(e,!0)}}function V7(e){return function(t){f7(e,t)}}function H7(e){return t=>{u7(e,t)}}function U7(e){return t=>{c7(e,t)}}function W7(e){return function(t){i7(e,t)}}R(`q28`,g7),R(`q27`,_7),R(`q26`,v7),R(`q24`,y7),R(`q23`,b7),R(`q22`,x7),R(`q19`,S7),R(`q18`,C7),R(`q25`,w7),R(`q21`,T7),R(`q20`,E7),R(`q4`,D7),R(`q2`,O7),R(`q1`,k7),R(`q12`,A7),R(`q5`,j7),R(`q0`,M7),R(`q3`,N7),R(`q6`,P7),R(`q17`,F7),R(`q16`,I7),R(`q15`,L7),R(`q14`,R7),R(`q13`,z7),R(`q11`,B7),R(`q10`,V7),R(`q9`,H7),R(`q8`,U7),R(`q7`,W7);var G7=I(40,e=>V(e.a,e._._.t),e=>e._._),Kne=L(`b19`,e=>A(e.b,`click`,function(){I9(e._._,null),e._._.v()})),qne=O(0,`<p> </p><button class=btn>Retry</button>`,`D l `,e=>{G7(e),Kne(e)},`<span class=spin></span>Loading workspaces…`),K7=P(1,0,e=>qne(e,+!e._.t)),Jne=K7,q7=P(0,0,e=>V(e.a,e._.t)),Yne=L(`b18`,e=>A(e.b,`click`,function(){I9(e._,null)})),Xne=e=>{q7._(e),Yne(e)},J7=I(34,e=>Bne(e.b,e._._.g),e=>e._._),Zne=e=>{J7(e),Y7(e),X7(e),$7(e),e9(e),t9(e),n9(e),r9._(e),i9._(e),bne(e.b),Une(e.b,R9(e)),Gne(e.b,L9(e))},Y7=I(35,e=>jne(e.b,e._._.h),e=>e._._),X7=I(36,e=>{Rne(e.b,e._._.i?e._._.i?.preferredAgent:`claude`),Hne(e.b,e._._.i?e._._.i?.agents:[`claude`])},e=>e._._),Z7=N(5,e=>Pne(e.b,!e._._.p&&!e._._.a5&&e._.f===e._._.k),3),Qne=le(3,0,2),Q7=N(4,e=>Qne(e,e._.f===e._._.k)),$7=I(37,e=>{Z7(e),Q7(e)},e=>e._._),e9=I(38,Z7,e=>e._._),t9=I(41,e=>zne(e.b,z9(e)),e=>e._._),n9=I(42,Z7,e=>e._._),r9=P(0,0,e=>kne(e.b,e._.e)),i9=P(0,0,e=>{Wne(e.b,B9(e)),Z7(e),Q7(e)}),$ne=O(0,(e=>`<!><!>${e}<!><!><!>`)(J8),(e=>`b%b/${e}&%b%c`)(Y8),Zne),ere=M(4,e=>{nre(e,e.e?.id),$ne(e,+!e.e),r9(e)}),a9=N(3,e=>ere(e,e._.g.find(t=>t.id===e.c))),o9=Ke(5,a9),tre=o9,nre=M(5,i9),rre=M(2,a9),ire=(e,t)=>rre(e,t[0]),s9=N(1,e=>Of(e.a,V9(e))),c9=P(4,0,s9),are=e=>{c9._(e),l9._(e),Cf(e.a),kf(e.a,H9(e))},l9=P(4,0,s9),u9=P(3,0,e=>Zu(e.a,U9(e))),ore=e=>{u9._(e),d9._(e),Su(e.a),Qu(e.a,W9(e))},d9=P(3,0,e=>Xu(e.a,e._.a5)),f9=P(2,0,e=>Wa(e.a,e._.g)),sre=e=>{f9._(e),p9._(e),m9._(e),h9._(e),_9._(e),v9._(e),y9._(e),za(e.a),ho(e.a,J9(e)),Ya(e.a,q9(e)),to(e.a,K9(e)),so(e.a,G9(e))},p9=P(2,0,e=>mo(e.a,e._.h)),m9=P(2,0,e=>uo(e.a,e._.i)),h9=P(2,0,e=>qa(e.a,e._.k)),g9=N(1,e=>oo(e.a,!e._.s&&e._.a6)),_9=P(2,0,g9),v9=P(2,0,e=>{no(e.a,Z9(e)),Ja(e.a,X9(e)),Za(e.a,Y9(e))}),y9=P(2,0,g9),b9=N(28,L(`b20`,e=>Et(e,{paletteOpen:e.s,load:e.v,activeList:e.g.filter(e=>e.status===`active`).map(e=>e.id),onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,statusStale:!1,statusDebounce:void 0,timer:void 0};ir(n);let i=(t,n)=>{n&&(In(t,n),Yn(t,n)),e.a1(t)},a=new URLSearchParams(location.search);a.get(`ws`)&&(i(a.get(`ws`),a.get(`session`)),history.replaceState(null,``,`/`)),lr()&&document.addEventListener(`click`,e=>{let t=e.target?.closest?.(`a[target="_blank"][href^="http"]`);t&&(e.preventDefault(),ur(t.href))},{capture:!0,signal:n}),navigator.serviceWorker?.addEventListener(`message`,e=>{e.data?.type===`open-session`&&i(e.data.workspaceId,e.data.sessionId)},{signal:n}),H(`/api/settings`).then(t=>{O9(e,t)}).catch(()=>{});let o=()=>{if(document.hidden){r.statusStale=!0;return}r.statusStale=!1,e.a0()};document.addEventListener(`visibilitychange`,()=>{document.hidden||(r.statusStale=!1,e.a0(!0))},{signal:n}),this.load(),o(),kn().addEventListener(`workspaces.changed`,()=>{this.load(),o()},{signal:n}),kn().addEventListener(`sessions.changed`,()=>{clearTimeout(r.statusDebounce),r.statusDebounce=setTimeout(o,300)},{signal:n}),kn().addEventListener(`status.changed`,t=>{t.data&&(D9(e,t.data),r.statusStale=!1)},{signal:n}),r.timer=setInterval(o,6e4),window.addEventListener(`keydown`,t=>{if((t.metaKey||t.ctrlKey)&&t.key===`k`&&(t.preventDefault(),F9(e,!this.paletteOpen)),(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key>=`1`&&t.key<=`9`){let n=this.activeList?.[Number(t.key)-1];n&&(t.preventDefault(),e.a1(n))}},{capture:!0,signal:n});let s=window.visualViewport;if(s){let e=()=>{let e=Math.abs(s.height-window.innerHeight)<1;document.documentElement.style.setProperty(`--app-height`,e?``:`${Math.round(s.height)}px`),e||window.scrollTo(0,0)};s.addEventListener(`resize`,e,{signal:n}),s.addEventListener(`scroll`,e,{signal:n}),document.addEventListener(`visibilitychange`,()=>{document.hidden||e()},{signal:n}),window.addEventListener(`pageshow`,e,{signal:n}),window.addEventListener(`focus`,e,{signal:n})}return r},onDestroy:function(){this.abort.abort(),clearTimeout(this.statusDebounce),clearInterval(this.timer)}})),4),cre=F(t9),lre=M(27,e=>{b9(e),v9(e),l9(e),cre(e)}),x9=N(13,e=>lre(e,Q9(e))),ure=O(2,(e=>`<!>${e}`)(Zr),(e=>`b/${e}&`)(Qr),sre),S9=N(33,e=>ure(e,e.s||e.a6?0:1)),dre=M(32,e=>{S9(e),y9(e)}),C9=N(30,e=>dre(e,!e.p&&!e.a3&&e.j),2),fre=M(29,C9),w9=N(11,e=>fre(e,e.g.find(t=>t.id===e.k))),pre=O(3,qs,(e=>`/${e}&`)(Js),ore),mre=F(n9),hre=M(31,e=>{pre(e,+!e.a5),d9(e),mre(e)}),T9=N(17,e=>hre(e,e.g.find(t=>t.id===e.q))),gre=F(J7),E9=j(6,e=>{x9(e),b9(e),w9(e),T9(e),f9(e),u9(e),c9(e),o9(e),gre(e)}),_re=F(Y7),D9=j(7,e=>{p9(e),_re(e)}),vre=F(X7),O9=j(8,e=>{m9(e),vre(e)}),yre=O(1,`<div class="boot dim"></div>`,` `,Jne),bre=M(21,b9),k9=N(14,e=>bre(e,$9(e)),2),xre=O(0,`<p class=toast-error><!> <button>×</button></p>`,`D%c `,Xne),A9=N(20,e=>xre(e,e.t&&e.j?0:1)),Sre=j(9,e=>{yre(e,+!!e.j),k9(e),C9(e),A9(e)}),Cre=F($7),j9=j(10,e=>{k9(e),w9(e),h9(e),Cre(e)}),wre=k(5,`<!><!><!>`,`b%`,tre,ire),M9=j(12,e=>{wre(e,[e.m,e=>e]),k9(e),x9(e)}),Tre=O(4,pd,(e=>`/${e}&`)(md),are),Ere=F(e9),N9=j(15,e=>{Tre(e,+!e.p),C9(e),Ere(e)}),P9=j(16,T9),F9=j(18,e=>{b9(e),S9(e),_9(e)}),Dre=F(G7),I9=j(19,e=>{A9(e),q7(e),K7(e),Dre(e)});function L9(e){return function(){N9(e._._,!0)}}function R9(e){return function(t,n){In(t,n),Yn(t,n),e._._.a1(t)}}function z9(e){return function(t){e._._.a1(t)}}function B9(e){return function(t){P9(e._._,t||e._.f)}}function V9(e){return function(t){e._.g.some(e=>e.id===t.id)||E9(e._,[t,...e._.g]),N9(e._,!1),e._.a1(t.id)}}function H9(e){return function(){N9(e._,!1)}}function U9(e){return function(t){E9(e._,e._.g.map(e=>e.id===t.id?t:e))}}function W9(e){return function(){P9(e._,null)}}function G9(e){return function(){F9(e._,!1)}}function K9(e){return function(){N9(e._,!0),F9(e._,!1)}}function q9(e){return function(t){P9(e._,t.id),N9(e._,!1),F9(e._,!1)}}function J9(e){return function(t){O9(e._,t)}}function Y9(e){return function(t,n){F9(e._,!1),H(`/api/workspaces/${t.id}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})}).then(n=>{In(t.id,n.id),e._.a1(t.id)}).catch(t=>{I9(e._,`New session failed: ${String(t.message||t)}`)})}}function X9(e){return function(t){Pn(t.id),e._.a1(t.id)}}function Z9(e){return function(t){e._.a1(t.id)}}function Q9(e){return async t=>{e.g.find(e=>e.id===t)?.status===`archived`&&(await H(`/api/workspaces/${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}).catch(()=>{}),E9(e,e.g.map(e=>e.id===t?{...e,status:`active`}:e))),j9(e,t),N9(e,!1),P9(e,null),F9(e,!1),e.m.includes(t)||M9(e,e.m.concat(t)),Gn(t)}}function $9(e){return async()=>{try{let[t]=await Promise.all([H(`/api/workspaces`),Hn()]);if(E9(e,t),e.j){let n=new Set(t.filter(e=>e.status===`active`).map(e=>e.id));M9(e,e.m.filter(e=>n.has(e))),e.k&&!n.has(e.k)&&(j9(e,e.m[e.m?.length-1]||null),Gn(e.k))}else{let n=ree();n&&t.some(e=>e.id===n)&&(j9(e,n),M9(e,[n]))}Sre(e,!0)}catch(t){I9(e,`Loading workspaces failed: ${t.message||String(t)}`)}}}function Ore(e){return(t=!1)=>(e.x||=t,(e.y??=Rn(async()=>{let t=e.x;e.x=!1,D9(e,await H(`/api/status${t?`?fresh`:``}`))}))())}R(`b17`,L9),R(`b15`,R9),R(`b14`,z9),R(`b16`,B9),R(`b13`,V9),R(`b12`,H9),R(`b11`,U9),R(`b10`,W9),R(`b9`,G9),R(`b8`,K9),R(`b7`,q9),R(`b3`,J9),R(`b6`,Y9),R(`b5`,X9),R(`b4`,Z9),R(`b2`,Q9),R(`b0`,$9),R(`b1`,Ore),nt();export{t};
1615
- //# sourceMappingURL=index-DMpI1yWM.js.map
1614
+ }`,e1=8,t1=e1*Float32Array.BYTES_PER_ELEMENT,n1=20*e1,r1=class{constructor(){this.attributes=new Float32Array(n1),this.count=0}},i1=0,a1=0,o1=0,s1=0,c1=0,l1=0,u1=0,d1=class extends IZ{constructor(e,t,n,r){super(),this._terminal=e,this._gl=t,this._dimensions=n,this._themeService=r,this._vertices=new r1,this._verticesCursor=new r1;let i=this._gl;this._program=iQ(A$(i,Q$,$$)),this._register(NZ(()=>i.deleteProgram(this._program))),this._projectionLocation=iQ(i.getUniformLocation(this._program,`u_projection`)),this._vertexArrayObject=i.createVertexArray(),i.bindVertexArray(this._vertexArrayObject);let a=new Float32Array([0,0,1,0,0,1,1,1]),o=i.createBuffer();this._register(NZ(()=>i.deleteBuffer(o))),i.bindBuffer(i.ARRAY_BUFFER,o),i.bufferData(i.ARRAY_BUFFER,a,i.STATIC_DRAW),i.enableVertexAttribArray(3),i.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);let s=new Uint8Array([0,1,2,3]),c=i.createBuffer();this._register(NZ(()=>i.deleteBuffer(c))),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,c),i.bufferData(i.ELEMENT_ARRAY_BUFFER,s,i.STATIC_DRAW),this._attributesBuffer=iQ(i.createBuffer()),this._register(NZ(()=>i.deleteBuffer(this._attributesBuffer))),i.bindBuffer(i.ARRAY_BUFFER,this._attributesBuffer),i.enableVertexAttribArray(0),i.vertexAttribPointer(0,2,i.FLOAT,!1,t1,0),i.vertexAttribDivisor(0,1),i.enableVertexAttribArray(1),i.vertexAttribPointer(1,2,i.FLOAT,!1,t1,2*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(1,1),i.enableVertexAttribArray(2),i.vertexAttribPointer(2,4,i.FLOAT,!1,t1,4*Float32Array.BYTES_PER_ELEMENT),i.vertexAttribDivisor(2,1),this._updateCachedColors(r.colors),this._register(this._themeService.onChangeColors(e=>{this._updateCachedColors(e),this._updateViewportRectangle()}))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(e){let t=this._gl;t.useProgram(this._program),t.bindVertexArray(this._vertexArrayObject),t.uniformMatrix4fv(this._projectionLocation,!1,k$),t.bindBuffer(t.ARRAY_BUFFER,this._attributesBuffer),t.bufferData(t.ARRAY_BUFFER,e.attributes,t.DYNAMIC_DRAW),t.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,t.UNSIGNED_BYTE,0,e.count)}handleResize(){this._updateViewportRectangle()}setDimensions(e){this._dimensions=e}_updateCachedColors(e){this._bgFloat=this._colorToFloat32Array(e.background),this._cursorFloat=this._colorToFloat32Array(e.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(e){let t=this._terminal,n=this._vertices,r=1,i,a,o,s,c,l,u,d,f,p,m;for(i=0;i<t.rows;i++){for(o=-1,s=0,c=0,l=!1,a=0;a<t.cols;a++)u=(i*t.cols+a)*K$,d=e.cells[u+q$],f=e.cells[u+J$],p=!!(f&67108864),(d!==s||f!==c&&(l||p))&&((s!==0||l&&c!==0)&&(m=r++*e1,this._updateRectangle(n,m,c,s,o,a,i)),o=a,s=d,c=f,l=p);(s!==0||l&&c!==0)&&(m=r++*e1,this._updateRectangle(n,m,c,s,o,t.cols,i))}n.count=r}updateCursor(e){let t=this._verticesCursor,n=e.cursor;if(!n||n.style===`block`){t.count=0;return}let r,i=0;(n.style===`bar`||n.style===`outline`)&&(r=i++*e1,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.style===`bar`?n.dpr*n.cursorWidth:n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),(n.style===`underline`||n.style===`outline`)&&(r=i++*e1,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,(n.y+1)*this._dimensions.device.cell.height-n.dpr,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat)),n.style===`outline`&&(r=i++*e1,this._addRectangleFloat(t.attributes,r,n.x*this._dimensions.device.cell.width,n.y*this._dimensions.device.cell.height,n.width*this._dimensions.device.cell.width,n.dpr,this._cursorFloat),r=i++*e1,this._addRectangleFloat(t.attributes,r,(n.x+n.width)*this._dimensions.device.cell.width-n.dpr,n.y*this._dimensions.device.cell.height,n.dpr,this._dimensions.device.cell.height,this._cursorFloat)),t.count=i}_updateRectangle(e,t,n,r,i,a,o){if(n&67108864)switch(n&50331648){case 16777216:case 33554432:i1=this._themeService.colors.ansi[n&255].rgba;break;case 50331648:i1=(n&16777215)<<8;break;case 0:default:i1=this._themeService.colors.foreground.rgba}else switch(r&50331648){case 16777216:case 33554432:i1=this._themeService.colors.ansi[r&255].rgba;break;case 50331648:i1=(r&16777215)<<8;break;case 0:default:i1=this._themeService.colors.background.rgba}e.attributes.length<t+4&&(e.attributes=M$(e.attributes,this._terminal.rows*this._terminal.cols*e1)),a1=i*this._dimensions.device.cell.width,o1=o*this._dimensions.device.cell.height,s1=(i1>>24&255)/255,c1=(i1>>16&255)/255,l1=(i1>>8&255)/255,u1=1,this._addRectangle(e.attributes,t,a1,o1,(a-i)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,s1,c1,l1,u1)}_addRectangle(e,t,n,r,i,a,o,s,c,l){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o,e[t+5]=s,e[t+6]=c,e[t+7]=l}_addRectangleFloat(e,t,n,r,i,a,o){e[t]=n/this._dimensions.device.canvas.width,e[t+1]=r/this._dimensions.device.canvas.height,e[t+2]=i/this._dimensions.device.canvas.width,e[t+3]=a/this._dimensions.device.canvas.height,e[t+4]=o[0],e[t+5]=o[1],e[t+6]=o[2],e[t+7]=o[3]}_colorToFloat32Array(e){return new Float32Array([(e.rgba>>24&255)/255,(e.rgba>>16&255)/255,(e.rgba>>8&255)/255,(e.rgba&255)/255])}},f1=class extends IZ{constructor(e,t,n,r,i,a,o,s){super(),this._container=t,this._alpha=i,this._coreBrowserService=a,this._optionsService=o,this._themeService=s,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`),this._canvas.classList.add(`xterm-${n}-layer`),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this._register(this._themeService.onChangeColors(t=>{this._refreshCharAtlas(e,t),this.reset(e)})),this._register(NZ(()=>{this._canvas.remove()}))}_initCanvas(){this._ctx=iQ(this._canvas.getContext(`2d`,{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(e){}handleFocus(e){}handleCursorMove(e){}handleGridChanged(e,t,n){}handleSelectionChanged(e,t,n,r=!1){}_setTransparency(e,t){if(t===this._alpha)return;let n=this._canvas;this._alpha=t,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,n),this._refreshCharAtlas(e,this._themeService.colors),this.handleGridChanged(e,0,e.rows-1)}_refreshCharAtlas(e,t){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=S$(e,this._optionsService.rawOptions,t,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr,2048),this._charAtlas.warmUp())}resize(e,t){this._deviceCellWidth=t.device.cell.width,this._deviceCellHeight=t.device.cell.height,this._deviceCharWidth=t.device.char.width,this._deviceCharHeight=t.device.char.height,this._deviceCharLeft=t.device.char.left,this._deviceCharTop=t.device.char.top,this._canvas.width=t.device.canvas.width,this._canvas.height=t.device.canvas.height,this._canvas.style.width=`${t.css.canvas.width}px`,this._canvas.style.height=`${t.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(e,this._themeService.colors)}_fillBottomLineAtCells(e,t,n=1){this._ctx.fillRect(e*this._deviceCellWidth,(t+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,n*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(e,t,n,r){this._alpha?this._ctx.clearRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,r*this._deviceCellHeight))}_fillCharTrueColor(e,t,n,r){this._ctx.font=this._getFont(e,!1,!1),this._ctx.textBaseline=wQ,this._clipCell(n,r,t.getWidth()),this._ctx.fillText(t.getChars(),n*this._deviceCellWidth+this._deviceCharLeft,r*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(e,t,n){this._ctx.beginPath(),this._ctx.rect(e*this._deviceCellWidth,t*this._deviceCellHeight,n*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(e,t,n){let r=t?e.options.fontWeightBold:e.options.fontWeight;return`${n?`italic`:``} ${r} ${e.options.fontSize*this._coreBrowserService.dpr}px ${e.options.fontFamily}`}},p1=class extends f1{constructor(e,t,n,r,i,a,o){super(n,e,`link`,t,!0,i,a,o),this._register(r.onShowLinkUnderline(e=>this._handleShowLinkUnderline(e))),this._register(r.onHideLinkUnderline(e=>this._handleHideLinkUnderline(e)))}resize(e,t){super.resize(e,t),this._state=void 0}reset(e){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);let e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(e){if(e.fg===257?this._ctx.fillStyle=this._themeService.colors.background.css:e.fg!==void 0&&b$(e.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[e.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(let t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e}_handleHideLinkUnderline(e){this._clearCurrentLink()}},m1=typeof window==`object`?window:globalThis,h1=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new c$,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new c$,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(e){return this.mapWindowIdToZoomLevel.get(this.getWindowId(e))??0}setZoomLevel(e,t){if(this.getZoomLevel(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToZoomLevel.set(n,e),this._onDidChangeZoomLevel.fire(n)}getZoomFactor(e){return this.mapWindowIdToZoomFactor.get(this.getWindowId(e))??1}setZoomFactor(e,t){this.mapWindowIdToZoomFactor.set(this.getWindowId(t),e)}setFullscreen(e,t){if(this.isFullscreen(t)===e)return;let n=this.getWindowId(t);this.mapWindowIdToFullScreen.set(n,e),this._onDidChangeFullscreen.fire(n)}isFullscreen(e){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(e))}getWindowId(e){return e.vscodeWindowId}};h1.INSTANCE=new h1;var g1=h1;function _1(e,t,n){typeof t==`string`&&(t=e.matchMedia(t)),t.addEventListener(`change`,n)}g1.INSTANCE.onDidChangeZoomLevel,g1.INSTANCE.onDidChangeFullscreen;var v1=typeof navigator==`object`?navigator.userAgent:``;v1.indexOf(`Firefox`);var y1=v1.indexOf(`AppleWebKit`)>=0;!(v1.indexOf(`Chrome`)>=0)&&v1.indexOf(`Safari`),v1.indexOf(`Electron/`),v1.indexOf(`Android`);var b1=!1;if(typeof m1.matchMedia==`function`){let e=m1.matchMedia(`(display-mode: standalone) or (display-mode: window-controls-overlay)`),t=m1.matchMedia(`(display-mode: fullscreen)`);b1=e.matches,_1(m1,e,({matches:e})=>{b1&&t.matches||(b1=e)})}function x1(){return b1}var S1=`en`,C1=!1,w1=!1,T1=!1,E1=S1,D1,O1=globalThis,k1;typeof O1.vscode<`u`&&typeof O1.vscode.process<`u`?k1=O1.vscode.process:typeof process<`u`&&typeof process?.versions?.node==`string`&&(k1=process);var A1=typeof k1?.versions?.electron==`string`&&k1?.type===`renderer`;if(typeof k1==`object`){k1.platform,k1.platform,C1=k1.platform===`linux`,C1&&k1.env.SNAP&&k1.env.SNAP_REVISION,k1.env.CI||k1.env.BUILD_ARTIFACTSTAGINGDIRECTORY,E1=S1;let e=k1.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);t.userLocale,t.osLocale,E1=t.resolvedLanguage||S1,t.languagePack?.translationsConfigFile}catch{}w1=!0}else typeof navigator==`object`&&!A1?(D1=navigator.userAgent,D1.indexOf(`Windows`),D1.indexOf(`Macintosh`),(D1.indexOf(`Macintosh`)>=0||D1.indexOf(`iPad`)>=0||D1.indexOf(`iPhone`)>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints,C1=D1.indexOf(`Linux`)>=0,D1?.indexOf(`Mobi`),T1=!0,E1=globalThis._VSCODE_NLS_LANGUAGE||S1,navigator.language.toLowerCase()):console.error(`Unable to resolve platform.`);var j1=w1;T1&&typeof O1.importScripts==`function`&&O1.origin;var M1=D1,N1=E1,P1;(e=>{function t(){return N1}e.value=t;function n(){return N1.length===2?N1===`en`:N1.length>=3&&N1[0]===`e`&&N1[1]===`n`&&N1[2]===`-`}e.isDefaultVariant=n;function r(){return N1===`en`}e.isDefault=r})(P1||={});var F1=typeof O1.postMessage==`function`&&!O1.importScripts;(()=>{if(F1){let e=[];O1.addEventListener(`message`,t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.id===t.data.vscodeScheduleAsyncWork){e.splice(n,1),r.callback();return}}});let t=0;return n=>{let r=++t;e.push({id:r,callback:n}),O1.postMessage({vscodeScheduleAsyncWork:r},`*`)}}return e=>setTimeout(e)})();var I1=!!(M1&&M1.indexOf(`Chrome`)>=0);M1&&M1.indexOf(`Firefox`),!I1&&M1&&M1.indexOf(`Safari`),M1&&M1.indexOf(`Edg/`),M1&&M1.indexOf(`Android`);var L1=typeof navigator==`object`?navigator:{};j1||document.queryCommandSupported&&document.queryCommandSupported(`copy`)||L1&&L1.clipboard&&L1.clipboard.writeText,j1||L1&&L1.clipboard&&L1.clipboard.readText,j1||x1()||L1.keyboard,`ontouchstart`in m1||L1.maxTouchPoints,m1.PointerEvent&&(`ontouchstart`in m1||navigator.maxTouchPoints);var R1=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},z1=new R1,B1=new R1,V1=new R1;Array(230);var H1;(e=>{function t(e){return z1.keyCodeToStr(e)}e.toString=t;function n(e){return z1.strToKeyCode(e)}e.fromString=n;function r(e){return B1.keyCodeToStr(e)}e.toUserSettingsUS=r;function i(e){return V1.keyCodeToStr(e)}e.toUserSettingsGeneral=i;function a(e){return B1.strToKeyCode(e)||V1.strToKeyCode(e)}e.fromUserSettings=a;function o(e){if(e>=98&&e<=113)return null;switch(e){case 16:return`Up`;case 18:return`Down`;case 15:return`Left`;case 17:return`Right`}return z1.keyCodeToStr(e)}e.toElectronAccelerator=o})(H1||={});var U1=Object.freeze(function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}),W1;(e=>{function t(t){return t===e.None||t===e.Cancelled||t instanceof G1?!0:!t||typeof t!=`object`?!1:typeof t.isCancellationRequested==`boolean`&&typeof t.onCancellationRequested==`function`}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:YQ.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:U1})})(W1||={});var G1=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?U1:(this._emitter||=new c$,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),null)}};(function(){typeof globalThis.requestIdleCallback!=`function`||globalThis.cancelIdleCallback})();var K1;(e=>{async function t(e){let t,n=await Promise.all(e.map(e=>e.then(e=>e,e=>{t||=e})));if(typeof t<`u`)throw t;return n}e.settled=t;function n(e){return new Promise(async(t,n)=>{try{await e(t,n)}catch(e){n(e)}})}e.withAsyncBody=n})(K1||={});var q1=class e{static fromArray(t){return new e(e=>{e.emitMany(t)})}static fromPromise(t){return new e(async e=>{e.emitMany(await t)})}static fromPromises(t){return new e(async e=>{await Promise.all(t.map(async t=>e.emitOne(await t)))})}static merge(t){return new e(async e=>{await Promise.all(t.map(async t=>{for await(let n of t)e.emitOne(n)}))})}constructor(e,t){this._state=0,this._results=[],this._error=null,this._onReturn=t,this._onStateChanged=new c$,queueMicrotask(async()=>{let t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{await Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}})}[Symbol.asyncIterator](){let e=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(e<this._results.length)return{done:!1,value:this._results[e++]};if(this._state===1)return{done:!0,value:void 0};await YQ.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>(this._onReturn?.(),{done:!0,value:void 0})}}static map(t,n){return new e(async e=>{for await(let r of t)e.emitOne(n(r))})}map(t){return e.map(this,t)}static filter(t,n){return new e(async e=>{for await(let r of t)n(r)&&e.emitOne(r)})}filter(t){return e.filter(this,t)}static coalesce(t){return e.filter(t,e=>!!e)}coalesce(){return e.coalesce(this)}static async toPromise(e){let t=[];for await(let n of e)t.push(n);return t}toPromise(){return e.toPromise(this)}emitOne(e){this._state===0&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){this._state===0&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(e){this._state===0&&(this._state=2,this._error=e,this._onStateChanged.fire())}};q1.EMPTY=q1.fromArray([]);function J1(e){return Y1(e,0)}function Y1(e,t){switch(typeof e){case`object`:return e===null?X1(349,t):Array.isArray(e)?$1(e,t):e0(e,t);case`string`:return Q1(e,t);case`boolean`:return Z1(e,t);case`number`:return X1(e,t);case`undefined`:return X1(937,t);default:return X1(617,t)}}function X1(e,t){return(t<<5)-t+e|0}function Z1(e,t){return X1(e?433:863,t)}function Q1(e,t){t=X1(149417,t);for(let n=0,r=e.length;n<r;n++)t=X1(e.charCodeAt(n),t);return t}function $1(e,t){return t=X1(104579,t),e.reduce((e,t)=>Y1(t,e),t)}function e0(e,t){return t=X1(181387,t),Object.keys(e).sort().reduce((t,n)=>(t=Q1(n,t),Y1(e[n],t)),t)}var{registerWindow:ane,getWindow:t0,getDocument:one,getWindows:sne,getWindowsCount:cne,getWindowId:lne,getWindowById:une,hasWindow:dne,onDidRegisterWindow:fne,onWillUnregisterWindow:pne,onDidUnregisterWindow:mne}=function(){let e=new Map,t={window:m1,disposables:new FZ};e.set(m1.vscodeWindowId,t);let n=new c$,r=new c$,i=new c$;function a(n,r){return(typeof n==`number`?e.get(n):void 0)??(r?t:void 0)}return{onDidRegisterWindow:n.event,onWillUnregisterWindow:i.event,onDidUnregisterWindow:r.event,registerWindow(t){if(e.has(t.vscodeWindowId))return IZ.None;let a=new FZ,o={window:t,disposables:a.add(new FZ)};return e.set(t.vscodeWindowId,o),a.add(NZ(()=>{e.delete(t.vscodeWindowId),r.fire(t)})),a.add(r0(t,a0.BEFORE_UNLOAD,()=>{i.fire(t)})),n.fire(o),a},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(e){return e.vscodeWindowId},hasWindow(t){return e.has(t)},getWindowById:a,getWindow(e){let t=e;if(t?.ownerDocument?.defaultView)return t.ownerDocument.defaultView.window;let n=e;return n?.view?n.view.window:m1},getDocument(e){return t0(e).document}}}(),n0=class{constructor(e,t,n,r){this._node=e,this._type=t,this._handler=n,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&=(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,null)}};function r0(e,t,n,r){return new n0(e,t,n,r)}var i0=class e{constructor(e,t){this.width=e,this.height=t}with(t=this.width,n=this.height){return t!==this.width||n!==this.height?new e(t,n):this}static is(e){return typeof e==`object`&&typeof e.height==`number`&&typeof e.width==`number`}static lift(t){return t instanceof e?t:new e(t.width,t.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}};i0.None=new i0(0,0),new class{constructor(){this.mutationObservers=new Map}observe(e,t,n){let r=this.mutationObservers.get(e);r||(r=new Map,this.mutationObservers.set(e,r));let i=J1(n),a=r.get(i);if(a)a.users+=1;else{let o=new c$,s=new MutationObserver(e=>o.fire(e));s.observe(e,n);let c=a={users:1,observer:s,onDidMutate:o.event};t.add(NZ(()=>{--c.users,c.users===0&&(o.dispose(),s.disconnect(),r?.delete(i),r?.size===0&&this.mutationObservers.delete(e))})),r.set(i,a)}return a.onDidMutate}};var a0={CLICK:`click`,AUXCLICK:`auxclick`,DBLCLICK:`dblclick`,MOUSE_UP:`mouseup`,MOUSE_DOWN:`mousedown`,MOUSE_OVER:`mouseover`,MOUSE_MOVE:`mousemove`,MOUSE_OUT:`mouseout`,MOUSE_ENTER:`mouseenter`,MOUSE_LEAVE:`mouseleave`,MOUSE_WHEEL:`wheel`,POINTER_UP:`pointerup`,POINTER_DOWN:`pointerdown`,POINTER_MOVE:`pointermove`,POINTER_LEAVE:`pointerleave`,CONTEXT_MENU:`contextmenu`,WHEEL:`wheel`,KEY_DOWN:`keydown`,KEY_PRESS:`keypress`,KEY_UP:`keyup`,LOAD:`load`,BEFORE_UNLOAD:`beforeunload`,UNLOAD:`unload`,PAGE_SHOW:`pageshow`,PAGE_HIDE:`pagehide`,PASTE:`paste`,ABORT:`abort`,ERROR:`error`,RESIZE:`resize`,SCROLL:`scroll`,FULLSCREEN_CHANGE:`fullscreenchange`,WK_FULLSCREEN_CHANGE:`webkitfullscreenchange`,SELECT:`select`,CHANGE:`change`,SUBMIT:`submit`,RESET:`reset`,FOCUS:`focus`,FOCUS_IN:`focusin`,FOCUS_OUT:`focusout`,BLUR:`blur`,INPUT:`input`,STORAGE:`storage`,DRAG_START:`dragstart`,DRAG:`drag`,DRAG_ENTER:`dragenter`,DRAG_LEAVE:`dragleave`,DRAG_OVER:`dragover`,DROP:`drop`,DRAG_END:`dragend`,ANIMATION_START:y1?`webkitAnimationStart`:`animationstart`,ANIMATION_END:y1?`webkitAnimationEnd`:`animationend`,ANIMATION_ITERATION:y1?`webkitAnimationIteration`:`animationiteration`},o0=class extends IZ{constructor(e,t,n,r,i,a,o,s,c){super(),this._terminal=e,this._characterJoinerService=t,this._charSizeService=n,this._coreBrowserService=r,this._coreService=i,this._decorationService=a,this._optionsService=o,this._themeService=s,this._cursorBlinkStateManager=new LZ,this._charAtlasDisposable=this._register(new LZ),this._observerDisposable=this._register(new LZ),this._model=new Z$,this._workCell=new O$,this._workCell2=new O$,this._rectangleRenderer=this._register(new LZ),this._glyphRenderer=this._register(new LZ),this._onChangeTextureAtlas=this._register(new c$),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new c$),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new c$),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this._register(new c$),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this._register(new c$),this.onContextLoss=this._onContextLoss.event,this._canvas=this._coreBrowserService.mainDocument.createElement(`canvas`);let l={antialias:!1,depth:!1,preserveDrawingBuffer:c};if(this._gl=this._canvas.getContext(`webgl2`,l),!this._gl)throw Error(`WebGL2 not supported `+this._gl);this._register(this._themeService.onChangeColors(()=>this._handleColorChange())),this._cellColorResolver=new SQ(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new p1(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,o,this._themeService)],this.dimensions=fQ(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this._register(o.onOptionChange(()=>this._handleOptionsChanged())),this._deviceMaxTextureSize=this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),this._register(r0(this._canvas,`webglcontextlost`,e=>{console.log(`webglcontextlost event received`),e.preventDefault(),this._contextRestorationTimeout=setTimeout(()=>{this._contextRestorationTimeout=void 0,console.warn(`webgl context not restored; firing onContextLoss`),this._onContextLoss.fire(e)},3e3)})),this._register(r0(this._canvas,`webglcontextrestored`,e=>{console.warn(`webglcontextrestored event received`),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,C$(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()})),this._observerDisposable.value=E$(this._canvas,this._coreBrowserService.window,(e,t)=>this._setCanvasDevicePixelDimensions(e,t)),this._register(this._coreBrowserService.onWindowChange(e=>{this._observerDisposable.value=E$(this._canvas,e,(e,t)=>this._setCanvasDevicePixelDimensions(e,t))})),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._core.screenElement.isConnected,this._register(NZ(()=>{for(let e of this._renderLayers)e.dispose();this._canvas.parentElement?.removeChild(this._canvas),C$(this._terminal)}))}get textureAtlas(){return this._charAtlas?.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(e,t){this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(let e of this._renderLayers)e.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,this._rectangleRenderer.value?.setDimensions(this.dimensions),this._rectangleRenderer.value?.handleResize(),this._glyphRenderer.value?.setDimensions(this.dimensions),this._glyphRenderer.value?.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){for(let e of this._renderLayers)e.handleBlur(this._terminal);this._cursorBlinkStateManager.value?.pause(),this._requestRedrawViewport()}handleFocus(){for(let e of this._renderLayers)e.handleFocus(this._terminal);this._cursorBlinkStateManager.value?.resume(),this._requestRedrawViewport()}handleSelectionChanged(e,t,n){for(let r of this._renderLayers)r.handleSelectionChanged(this._terminal,e,t,n);this._model.selection.update(this._core,e,t,n),this._requestRedrawViewport()}handleCursorMove(){for(let e of this._renderLayers)e.handleCursorMove(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new d1(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new U$(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0){this._isAttached=!1;return}let e=S$(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr,this._deviceMaxTextureSize);this._charAtlas!==e&&(this._onChangeTextureAtlas.fire(e.pages[0].canvas),this._charAtlasDisposable.value=MZ(YQ.forward(e.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),YQ.forward(e.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas))),this._charAtlas=e,this._charAtlas.warmUp(),this._glyphRenderer.value?.setAtlas(this._charAtlas)}_clearModel(e){this._model.clear(),e&&this._glyphRenderer.value?.clear()}clearTextureAtlas(){this._charAtlas?.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){this._clearModel(!0);for(let e of this._renderLayers)e.reset(this._terminal);this._cursorBlinkStateManager.value?.restartBlinkAnimation(),this._updateCursorBlink()}renderRows(e,t){if(!this._isAttached){if(this._core.screenElement?.isConnected&&this._charSizeService.width&&this._charSizeService.height)this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0;else return}for(let n of this._renderLayers)n.handleGridChanged(this._terminal,e,t);!this._glyphRenderer.value||!this._rectangleRenderer.value||(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(e,t),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible)&&this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._coreService.decPrivateModes.cursorBlink??this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new T$(()=>{this._requestRedrawCursor()},this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(e,t){let n=this._core,r=this._workCell,i,a,o,s,c,l,u=0,d=!0,f,p,m,h,g,_,v,y,b;e=c0(e,n.rows-1,0),t=c0(t,n.rows-1,0);let x=this._coreService.decPrivateModes.cursorStyle??n.options.cursorStyle??`block`,S=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,C=S-n.buffer.ydisp,ee=Math.min(this._terminal.buffer.active.cursorX,n.cols-1),te=-1,ne=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let w=!1;for(a=e;a<=t;a++)for(o=a+n.buffer.ydisp,s=n.buffer.lines.get(o),this._model.lineLengths[a]=0,m=S===o,u=0,c=this._characterJoinerService.getJoinedCharacters(o),y=0;y<n.cols;y++){if(i=this._cellColorResolver.result.bg,s.loadCell(y,r),y===0&&(i=this._cellColorResolver.result.bg),l=!1,d=y>=u,f=y,c.length>0&&y===c[0][0]&&d){p=c.shift();let e=this._model.selection.isCellSelected(this._terminal,p[0],o);for(v=p[0]+1;v<p[1];v++)d&&=e===this._model.selection.isCellSelected(this._terminal,v,o);d&&=!m||ee<p[0]||ee>=p[1],d?(l=!0,r=new s0(r,s.translateToString(!0,p[0],p[1]),p[1]-p[0]),f=p[1]-1):u=p[1]}if(h=r.getChars(),g=r.getCode(),v=(a*n.cols+y)*K$,this._cellColorResolver.resolve(r,y,o,this.dimensions.device.cell.width),ne&&o===S&&(y===ee&&(this._model.cursor={x:ee,y:C,width:r.getWidth(),style:this._coreBrowserService.isFocused?x:n.options.cursorInactiveStyle,cursorWidth:n.options.cursorWidth,dpr:this._devicePixelRatio},te=ee+r.getWidth()-1),y>=ee&&y<=te&&(this._coreBrowserService.isFocused&&x===`block`||this._coreBrowserService.isFocused===!1&&n.options.cursorInactiveStyle===`block`)&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),g!==0&&(this._model.lineLengths[a]=y+1),(this._model.cells[v]!==g||this._model.cells[v+q$]!==this._cellColorResolver.result.bg||this._model.cells[v+J$]!==this._cellColorResolver.result.fg||this._model.cells[v+Y$]!==this._cellColorResolver.result.ext)&&(w=!0,h.length>1&&(g|=X$),this._model.cells[v]=g,this._model.cells[v+q$]=this._cellColorResolver.result.bg,this._model.cells[v+J$]=this._cellColorResolver.result.fg,this._model.cells[v+Y$]=this._cellColorResolver.result.ext,_=r.getWidth(),this._glyphRenderer.value.updateCell(y,a,g,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,h,_,i),l)){for(r=this._workCell,y++;y<=f;y++)b=(a*n.cols+y)*K$,this._glyphRenderer.value.updateCell(y,a,0,0,0,0,GZ,0,0),this._model.cells[b]=0,this._model.cells[b+q$]=this._cellColorResolver.result.bg,this._model.cells[b+J$]=this._cellColorResolver.result.fg,this._model.cells[b+Y$]=this._cellColorResolver.result.ext;y--}}w&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){!this._charSizeService.width||!this._charSizeService.height||(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(e,t){this._canvas.width===e&&this._canvas.height===t||(this._canvas.width=e,this._canvas.height=t,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){let e=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:e,end:e})}},s0=class extends WQ{constructor(e,t,n){super(),this.content=0,this.combinedData=``,this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=n}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw Error(`not implemented`)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}};function c0(e,t,n=0){return Math.max(Math.min(e,t),n)}var l0=`di$target`,u0=`di$dependencies`,d0=new Map;function f0(e){if(d0.has(e))return d0.get(e);let t=function(e,n,r){if(arguments.length!==3)throw Error(`@IServiceName-decorator can only be used to decorate a parameter`);p0(t,e,r)};return t._id=e,d0.set(e,t),t}function p0(e,t,n){t[l0]===t?t[u0].push({id:e,index:n}):(t[u0]=[{id:e,index:n}],t[l0]=t)}f0(`BufferService`),f0(`CoreMouseService`),f0(`CoreService`),f0(`CharsetService`),f0(`InstantiationService`),f0(`LogService`);var m0=f0(`OptionsService`);f0(`OscLinkService`),f0(`UnicodeService`),f0(`DecorationService`);var h0={trace:0,debug:1,info:2,warn:3,error:4,off:5},g0=`xterm.js: `,_0=class extends IZ{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange(`logLevel`,()=>this._updateLogLevel())),v0=this}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=h0[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]==`function`&&(e[t]=e[t]())}_log(e,t,n){this._evalLazyOptionalParams(n),e.call(console,(this._optionsService.options.logger?``:g0)+t,...n)}trace(e,...t){this._logLevel<=0&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,e,t)}debug(e,...t){this._logLevel<=1&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,e,t)}info(e,...t){this._logLevel<=2&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,e,t)}warn(e,...t){this._logLevel<=3&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,e,t)}error(e,...t){this._logLevel<=4&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,e,t)}};_0=hZ([gZ(0,m0)],_0);var v0,y0=class extends IZ{constructor(e){if(UZ&&WZ()<16&&!document.createElement(`canvas`).getContext(`webgl2`,{antialias:!1,depth:!1,preserveDrawingBuffer:!0}))throw Error(`Webgl2 is only supported on Safari 16 and above`);super(),this._preserveDrawingBuffer=e,this._onChangeTextureAtlas=this._register(new c$),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this._register(new c$),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this._register(new c$),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this._register(new c$),this.onContextLoss=this._onContextLoss.event}activate(e){let t=e._core;if(!e.element){this._register(t.onWillOpen(()=>this.activate(e)));return}this._terminal=e;let n=t.coreService,r=t.optionsService,i=t,a=i._renderService,o=i._characterJoinerService,s=i._charSizeService,c=i._coreBrowserService,l=i._decorationService;i._logService;let u=i._themeService;this._renderer=this._register(new o0(e,o,s,c,n,l,r,u,this._preserveDrawingBuffer)),this._register(YQ.forward(this._renderer.onContextLoss,this._onContextLoss)),this._register(YQ.forward(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this._register(YQ.forward(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this._register(YQ.forward(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),a.setRenderer(this._renderer),this._register(NZ(()=>{if(this._terminal._core._store._isDisposed)return;let t=this._terminal._core._renderService;t.setRenderer(this._terminal._core._createRenderer()),t.handleResize(e.cols,e.rows)}))}get textureAtlas(){return this._renderer?.textureAtlas}clearTextureAtlas(){this._renderer?.clearTextureAtlas()}},b0=2,x0=1,S0=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:this._terminal.options.overviewRuler?.width||14,n=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(n.getPropertyValue(`height`)),i=Math.max(0,parseInt(n.getPropertyValue(`width`))),a=window.getComputedStyle(this._terminal.element),o={top:parseInt(a.getPropertyValue(`padding-top`)),bottom:parseInt(a.getPropertyValue(`padding-bottom`)),right:parseInt(a.getPropertyValue(`padding-right`)),left:parseInt(a.getPropertyValue(`padding-left`))},s=o.top+o.bottom,c=o.right+o.left,l=r-s,u=i-c-t;return{cols:Math.max(b0,Math.floor(u/e.css.cell.width)),rows:Math.max(x0,Math.floor(l/e.css.cell.height))}}},C0=`3.7.8`,w0=C0,T0=typeof Buffer==`function`,E0=typeof TextDecoder==`function`?new TextDecoder:void 0,D0=typeof TextEncoder==`function`?new TextEncoder:void 0,O0=Array.prototype.slice.call(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=`),k0=(e=>{let t={};return e.forEach((e,n)=>t[e]=n),t})(O0),A0=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,j0=String.fromCharCode.bind(String),M0=typeof Uint8Array.from==`function`?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),N0=e=>e.replace(/=/g,``).replace(/[+\/]/g,e=>e==`+`?`-`:`_`),P0=e=>e.replace(/[^A-Za-z0-9\+\/]/g,``),F0=e=>{let t,n,r,i,a=``,o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw TypeError(`invalid character found`);t=n<<16|r<<8|i,a+=O0[t>>18&63]+O0[t>>12&63]+O0[t>>6&63]+O0[t&63]}return o?a.slice(0,o-3)+`===`.substring(o):a},I0=typeof btoa==`function`?e=>btoa(e):T0?e=>Buffer.from(e,`binary`).toString(`base64`):F0,L0=T0?e=>Buffer.from(e).toString(`base64`):e=>{let t=[];for(let n=0,r=e.length;n<r;n+=4096)t.push(j0.apply(null,e.subarray(n,n+4096)));return I0(t.join(``))},R0=(e,t=!1)=>t?N0(L0(e)):L0(e),z0=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?j0(192|t>>>6)+j0(128|t&63):j0(224|t>>>12&15)+j0(128|t>>>6&63)+j0(128|t&63)}var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return j0(240|t>>>18&7)+j0(128|t>>>12&63)+j0(128|t>>>6&63)+j0(128|t&63)},B0=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,V0=e=>e.replace(B0,z0),H0=T0?e=>Buffer.from(e,`utf8`).toString(`base64`):D0?e=>L0(D0.encode(e)):e=>I0(V0(e)),U0=(e,t=!1)=>t?N0(H0(e)):H0(e),W0=e=>U0(e,!0),G0=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,K0=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return j0((t>>>10)+55296)+j0((t&1023)+56320);case 3:return j0((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return j0((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},q0=e=>e.replace(G0,K0),J0=e=>{if(e=e.replace(/\s+/g,``),!A0.test(e))throw TypeError(`malformed base64.`);e+=`==`.slice(2-(e.length&3));let t,n,r,i=[];for(let a=0;a<e.length;)t=k0[e.charAt(a++)]<<18|k0[e.charAt(a++)]<<12|(n=k0[e.charAt(a++)])<<6|(r=k0[e.charAt(a++)]),n===64?i.push(j0(t>>16&255)):r===64?i.push(j0(t>>16&255,t>>8&255)):i.push(j0(t>>16&255,t>>8&255,t&255));return i.join(``)},Y0=typeof atob==`function`?e=>atob(P0(e)):T0?e=>Buffer.from(e,`base64`).toString(`binary`):J0,X0=T0?e=>M0(Buffer.from(e,`base64`)):e=>M0(Y0(e).split(``).map(e=>e.charCodeAt(0))),Z0=e=>X0($0(e)),Q0=T0?e=>Buffer.from(e,`base64`).toString(`utf8`):E0?e=>E0.decode(X0(e)):e=>q0(Y0(e)),$0=e=>P0(e.replace(/[-_]/g,e=>e==`-`?`+`:`/`)),e2=e=>Q0($0(e)),t2=e=>{if(typeof e!=`string`)return!1;let t=e.replace(/\s+/g,``).replace(/={0,2}$/,``);return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},n2=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),r2=function(){let e=(e,t)=>Object.defineProperty(String.prototype,e,n2(t));e(`fromBase64`,function(){return e2(this)}),e(`toBase64`,function(e){return U0(this,e)}),e(`toBase64URI`,function(){return U0(this,!0)}),e(`toBase64URL`,function(){return U0(this,!0)}),e(`toUint8Array`,function(){return Z0(this)})},i2=function(){let e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,n2(t));e(`toBase64`,function(e){return R0(this,e)}),e(`toBase64URI`,function(){return R0(this,!0)}),e(`toBase64URL`,function(){return R0(this,!0)})},a2={version:C0,VERSION:w0,atob:Y0,atobPolyfill:J0,btoa:I0,btoaPolyfill:F0,fromBase64:e2,toBase64:U0,encode:U0,encodeURI:W0,encodeURL:W0,utob:V0,btou:q0,decode:e2,isValid:t2,fromUint8Array:R0,toUint8Array:Z0,extendString:r2,extendUint8Array:i2,extendBuiltins:()=>{r2(),i2()}},o2=class{constructor(e=new c2,t=new s2){this._base64=e,this._provider=t}activate(e){this._terminal=e,this._disposable=e.parser.registerOscHandler(52,e=>this._setOrReportClipboard(e))}dispose(){return this._disposable?.dispose()}_readText(e,t){let n=this._base64.encodeText(t);this._terminal?.input(`\x1B]52;${e};${n}\x07`,!1)}_setOrReportClipboard(e){let t=e.split(`;`);if(t.length<2)return!0;let n=t[0],r=t[1];if(r===`?`){let e=this._provider.readText(n);return e instanceof Promise?e.then(e=>(this._readText(n,e),!0)):(this._readText(n,e),!0)}let i=``;try{i=this._base64.decodeText(r)}catch{}let a=this._provider.writeText(n,i);return a instanceof Promise?a.then(()=>!0):!0}},s2=class{async readText(e){return e===`c`?navigator.clipboard.readText():Promise.resolve(``)}async writeText(e,t){return e===`c`?navigator.clipboard.writeText(t):Promise.resolve()}},c2=class{encodeText(e){return a2.encode(e)}decodeText(e){let t=a2.decode(e);return!a2.isValid(e)||a2.encode(t)!==e?``:t}},l2=class{constructor(e,t,n,r={}){this._terminal=e,this._regex=t,this._handler=n,this._options=r}provideLinks(e,t){let n=d2.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(n))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(t,n)=>{if(this._options.hover){let{range:r}=e;this._options.hover(t,n,r)}},e))}};function u2(e){try{let t=new URL(e),n=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(n.toLocaleLowerCase())}catch{return!1}}var d2=class e{static computeLink(t,n,r,i){let a=new RegExp(n.source,(n.flags||``)+`g`),[o,s]=e._getWindowedLineStrings(t-1,r),c=o.join(``),l,u=[];for(;l=a.exec(c);){let t=l[0];if(!u2(t))continue;let[n,a]=e._mapStrIdx(r,s,0,l.index),[o,c]=e._mapStrIdx(r,n,a,t.length);if(n===-1||a===-1||o===-1||c===-1)continue;let d={start:{x:a+1,y:n+1},end:{x:c,y:o+1}};u.push({range:d,text:t,activate:i})}return u}static _getWindowedLineStrings(e,t){let n,r=e,i=e,a=0,o=``,s=[];if(n=t.buffer.active.getLine(e)){let e=n.translateToString(!0);if(n.isWrapped&&e[0]!==` `){for(a=0;(n=t.buffer.active.getLine(--r))&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),!(!n.isWrapped||o.indexOf(` `)!==-1)););s.reverse()}for(s.push(e),a=0;(n=t.buffer.active.getLine(++i))&&n.isWrapped&&a<2048&&(o=n.translateToString(!0),a+=o.length,s.push(o),o.indexOf(` `)===-1););}return[s,r]}static _mapStrIdx(e,t,n,r){let i=e.buffer.active,a=i.getNullCell(),o=n;for(;r;){let e=i.getLine(t);if(!e)return[-1,-1];for(let n=o;n<e.length;++n){e.getCell(n,a);let o=a.getChars();if(a.getWidth()&&(r-=o.length||1,n===e.length-1&&o===``)){let e=i.getLine(t+1);e&&e.isWrapped&&(e.getCell(0,a),a.getWidth()===2&&(r+=1))}if(r<0)return[t,n]}t++,o=0}return[t,o]}},f2=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function p2(e,t){let n=window.open();if(n){try{n.opener=null}catch{}n.location.href=t}else console.warn(`Opening link blocked as opener could not be cleared`)}var m2=class{constructor(e=p2,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;let t=this._options,n=t.urlRegex||f2;this._linkProvider=this._terminal.registerLinkProvider(new l2(this._terminal,n,this._handler,t))}dispose(){this._linkProvider?.dispose()}};function h2(e,t){let{term:n,write:r}=e,i=new TextEncoder,a=null,o=0,s=!1,c=null,l=()=>{if(s)return;let i=location.protocol===`https:`?`wss`:`ws`,f=a=new WebSocket(`${i}://${location.host}/term/${e.sessionId}?cols=${n.cols}&rows=${n.rows}&visible=${+!!u()}`);f.onmessage=e=>r(e.data),f.onopen=()=>{o=0,d(f),c&&=(f.send(JSON.stringify({resize:c})),null),m()},f.onclose=()=>{if(!(t.aborted||s||a!==f)){if(document.visibilityState!==`visible`){let e=()=>{document.visibilityState===`visible`&&(document.removeEventListener(`visibilitychange`,e),!t.aborted&&a===f&&l())};document.addEventListener(`visibilitychange`,e,{signal:t})}else++o<=3?setTimeout(()=>{!t.aborted&&a===f&&l()},400*o):e.onDead()}}},u=()=>document.visibilityState===`visible`&&e.isVisible(),d=e=>{e.readyState===WebSocket.OPEN&&e.send(JSON.stringify({visible:u()}))};document.addEventListener(`visibilitychange`,()=>a&&d(a),{signal:t}),l(),t.addEventListener(`abort`,()=>a?.close());let f=[],p=0,m=()=>{for(;f.length&&a?.readyState===WebSocket.OPEN;)a.send(i.encode(f.shift()));p=0};return{send(e){a?.readyState===WebSocket.OPEN?a.send(i.encode(e)):p<1024&&(f.push(e),p+=e.length)},resize(e,t){a?.readyState===WebSocket.OPEN?a.send(JSON.stringify({resize:[e,t]})):c=[e,t]},syncVisibility(){a&&d(a)},get readyState(){return a?.readyState},reconnect(){s=!1,l()},disconnect(){s=!0,a?.close()}}}function g2(e,t,n,r){let i=null,a=0,o=0,s=0,c=0,l=n=>{let r=t().querySelector(`.xterm-screen`)||t(),i=r.clientHeight/e.rows||17;c+=n/i;let a=Math.trunc(c);if(!a)return;c-=a;let o=r.getBoundingClientRect(),s=a>0?1:-1;for(let e=0;e!==a;e+=s)r.dispatchEvent(new WheelEvent(`wheel`,{deltaY:s,deltaMode:WheelEvent.DOM_DELTA_LINE,bubbles:!0,cancelable:!0,clientX:o.left+o.width/2,clientY:o.top+o.height/2}))},u=()=>{cancelAnimationFrame(s),s=0},d=()=>{o*=.97,!(Math.abs(o)<.25)&&(l(o*16),s=requestAnimationFrame(d))};n.addEventListener(`abort`,u),t().addEventListener(`touchstart`,e=>{u(),o=0,i=e.touches[0]?.clientY??null,a=e.timeStamp},{passive:!0,signal:n}),t().addEventListener(`touchmove`,e=>{if(r?.())return;let t=e.touches[0]?.clientY;if(t==null||i==null)return;let n=i-t;Math.abs(n)>=2&&(o=n/Math.max(1,e.timeStamp-a),i=t,a=e.timeStamp,l(n)),e.preventDefault()},{passive:!1,signal:n}),t().addEventListener(`touchend`,()=>{i=null,Math.abs(o)>.5&&(u(),s=requestAnimationFrame(d))},{signal:n})}function _2(e){let t=!1,n=[],r=0;return{write(i){if(!t){e.write(i);return}for(n.push(i),r+=i.length;r>1048576&&n.length>1;)r-=n.shift().length},setFrozen(i){if(t!==i&&(t=i,!i)){let t=n.join(``);n=[],r=0,t&&e.write(t)}}}}function v2(e,t,n){let r=e.textarea;if(!r)return;let i=`\xA0`.repeat(4),a={deleteContentBackward:``,deleteWordBackward:``,deleteSoftLineBackward:``,deleteHardLineBackward:``},o=!1,s=()=>{o||(r.value!==i&&(r.value=i),r.setSelectionRange(i.length,i.length))};r.addEventListener(`beforeinput`,e=>{let n=a[e.inputType];n&&(e.preventDefault(),e.stopImmediatePropagation(),t(n))},{capture:!0,signal:n}),r.addEventListener(`compositionstart`,()=>{o=!0},{signal:n}),r.addEventListener(`compositionend`,()=>{o=!1,setTimeout(s,0)},{signal:n}),r.addEventListener(`input`,()=>setTimeout(s,0),{signal:n}),r.addEventListener(`focus`,()=>setTimeout(s,0),{signal:n}),s()}var y2=450,b2=12,x2=` ·│┃()[]{}<>'"\`,;│|`;function S2(e,t,n,r){let i=!1,a,o=0,s=0,c=null,l=null,u=()=>t().querySelector(`.xterm-screen`)||t(),d=(t,n)=>{let r=u().getBoundingClientRect();return{col:Math.max(0,Math.min(e.cols-1,Math.floor((t-r.left)/r.width*e.cols))),row:Math.max(0,Math.min(e.rows-1,Math.floor((n-r.top)/r.height*e.rows)))+e.buffer.active.viewportY}},f=t=>{let n=e.buffer.active.getLine(t.row)?.translateToString()??``,r=e=>!e||e===` `||x2.includes(e);if(r(n[t.col]))return{start:t,end:t};let i=t.col,a=t.col;for(;i>0&&!r(n[i-1]);)i--;for(;a<n.length-1&&!r(n[a+1]);)a++;return{start:{col:i,row:t.row},end:{col:a,row:t.row}}},p=(e,t)=>e.row<t.row||e.row===t.row&&e.col<=t.col,m=()=>{if(!c||!l)return;let[t,n]=p(c,l)?[c,l]:[l,c],r=(n.row-t.row)*e.cols+(n.col-t.col)+1;e.select(t.col,t.row,Math.max(1,r))},h=()=>{clearTimeout(a),a=void 0};t().addEventListener(`touchstart`,t=>{if(t.touches.length!==1){h();return}!i&&e.hasSelection()&&e.clearSelection(),o=t.touches[0].clientX,s=t.touches[0].clientY,a=setTimeout(()=>{a=void 0,i=!0,n.onStart();let e=f(d(o,s));c=e.start,l=e.end,m(),navigator.vibrate?.(10)},y2)},{passive:!0,signal:r}),t().addEventListener(`touchmove`,e=>{let t=e.touches[0];if(t){if(i){l=d(t.clientX,t.clientY),m(),e.preventDefault();return}a&&Math.hypot(t.clientX-o,t.clientY-s)>b2&&h()}},{passive:!1,signal:r});let g=()=>{if(h(),!i)return;i=!1,n.onEnd();let t=e.getSelection();t&&Y_(t).then(e=>{e&&n.onCopy(t)})};return t().addEventListener(`touchend`,g,{signal:r}),t().addEventListener(`touchcancel`,g,{signal:r}),{selecting:()=>i}}var C2=5;function w2(e,t,n,r){let i=null,a=!1,o=0,s=0,c=()=>t().querySelector(`.xterm-screen`)||t(),l=(t,n)=>{let r=c().getBoundingClientRect();return{col:Math.max(0,Math.min(e.cols-1,Math.floor((t-r.left)/r.width*e.cols))),row:Math.max(0,Math.min(e.rows-1,Math.floor((n-r.top)/r.height*e.rows)))+e.buffer.active.viewportY}};t().addEventListener(`mousedown`,t=>{if(a||t.button!==0||t.shiftKey||t.altKey||t.ctrlKey||t.metaKey)return;t.preventDefault(),t.stopImmediatePropagation();let n=t.timeStamp;s=n-o<400?s+1:1,o=n;let r=l(t.clientX,t.clientY);i={startX:t.clientX,startY:t.clientY,startCol:r.col,startRow:r.row,selecting:!1,detail:s},e.focus()},{capture:!0,signal:r}),window.addEventListener(`mousemove`,t=>{if(!i)return;if(!i.selecting){if(Math.hypot(t.clientX-i.startX,t.clientY-i.startY)<C2)return;i.selecting=!0}let n=l(t.clientX,t.clientY),r=(n.row-i.startRow)*e.cols+(n.col-i.startCol)+1,[a,o,s]=r>=0?[i.startCol,i.startRow,Math.max(1,r)]:[n.col,n.row,Math.max(1,-r+1)];e.select(a,o,s),t.preventDefault()},{signal:r}),window.addEventListener(`mouseup`,async t=>{if(!i)return;let r=i.selecting,o=i;if(i=null,r){let t=e.getSelection();t&&await Y_(t)&&n(t);return}a=!0;let s={bubbles:!0,cancelable:!0,clientX:o.startX,clientY:o.startY,button:0,buttons:1,detail:o.detail,view:window},c=document.elementFromPoint(o.startX,o.startY);c?.dispatchEvent(new MouseEvent(`mousedown`,s)),c?.dispatchEvent(new MouseEvent(`mouseup`,{...s,buttons:0,button:0})),c?.dispatchEvent(new MouseEvent(`click`,{...s,buttons:0})),a=!1,t.preventDefault()},{signal:r})}var T2=gr,E2=(e=>`/${e}&`)(_r);function D2(e){xr(e.a,`M15 4L8 20`)}var O2=(e,t)=>yr(e.a,t),k2=(e,t)=>br(e.a,t),A2=gr,j2=(e=>`/${e}&`)(_r);function M2(e){xr(e.a,`M7 12L17 12 M7 8L13 8 M3 20.2895V5C3 3.89543 3.89543 3 5 3H19C20.1046 3 21 3.89543 21 5V15C21 16.1046 20.1046 17 19 17H7.96125C7.35368 17 6.77906 17.2762 6.39951 17.7506L4.06852 20.6643C3.71421 21.1072 3 20.8567 3 20.2895Z`)}var N2=(e,t)=>yr(e.a,t),P2=(e,t)=>br(e.a,t),F2=gr,I2=(e=>`/${e}&`)(_r);function L2(e){xr(e.a,`M8.5 4H6C4.89543 4 4 4.89543 4 6V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V6C20 4.89543 19.1046 4 18 4H15.5 M8 6.4V4.5C8 4.22386 8.22386 4 8.5 4C8.77614 4 9.00422 3.77604 9.05152 3.50398C9.19968 2.65171 9.77399 1 12 1C14.226 1 14.8003 2.65171 14.9485 3.50398C14.9958 3.77604 15.2239 4 15.5 4C15.7761 4 16 4.22386 16 4.5V6.4C16 6.73137 15.7314 7 15.4 7H8.6C8.26863 7 8 6.73137 8 6.4Z`)}var R2=(e,t)=>yr(e.a,t),z2=(e,t)=>br(e.a,t),B2=gr,V2=(e=>`/${e}&`)(_r);function H2(e){xr(e.a,`M21 3.6V20.4C21 20.7314 20.7314 21 20.4 21H3.6C3.26863 21 3 20.7314 3 20.4V3.6C3 3.26863 3.26863 3 3.6 3H20.4C20.7314 3 21 3.26863 21 3.6Z M3 16L10 13L21 18 M16 10C14.8954 10 14 9.10457 14 8C14 6.89543 14.8954 6 16 6C17.1046 6 18 6.89543 18 8C18 9.10457 17.1046 10 16 10Z`)}var U2=(e,t)=>yr(e.a,t),W2=(e,t)=>br(e.a,t),G2=`<div class=term-wrap><div class=term></div><!><!><!><!></div><!><!>`,K2=` D b%b%b%b%l%c`,q2=400,J2=55,Y2=3e4,X2=150,Z2=[[{kind:`paste`},{kind:`key`,label:`▲`,seq:`\x1B[A`},{kind:`attach`}],[{kind:`key`,label:`◀`,seq:`\x1B[D`},{kind:`key`,label:`↵`,seq:`\r`},{kind:`key`,label:`▶`,seq:`\x1B[C`}],[{kind:`key`,label:`⇥`,seq:` `},{kind:`key`,label:`▼`,seq:`\x1B[B`},{kind:`key`,label:`^C`,seq:``}]],Q2=L(`o20`,e=>A(e.a,`click`,function(){e._._._.d.click()})),$2=e=>{H2(e.b),U2(e.b,16),W2(e.b),Q2(e)},e4=L(`o19`,e=>{A(e.a,`pointerdown`,function(e){e.preventDefault()}),A(e.a,`click`,function(){e._._._._.al()})}),t4=e=>{L2(e.b),R2(e.b,16),z2(e.b),e4(e)},n4=P(0,2,e=>{gt(e.a,{enter:e._.e===`↵`,"big-glyph":e._.e===`↵`||e._.e===`⇥`}),V(e.b,e._.e)}),r4=L(`o21`,e=>{A(e.a,`pointerdown`,function(t){t.preventDefault(),e._._._._.af(e._.f)}),A(e.a,`pointerup`,function(){e._._._._.ag()}),A(e.a,`pointercancel`,function(){e._._._._.ag()}),A(e.a,`pointerleave`,function(){e._._._._.ag()}),A(e.a,`contextmenu`,function(e){e.preventDefault()})}),i4=O(0,(e=>`<button title=Paste>${e}</button>`)(F2),(e=>` D/${e}&l`)(I2),t4,(e=>`<button title="Attach image">${e}</button>`)(B2),(e=>` D/${e}&l`)(V2),$2,`<button class=repeat> </button>`,` D `,e=>{n4._(e),r4(e)}),a4=(e,t)=>i4(e,t===`paste`?0:t===`attach`?1:2),o4=(e,t)=>{a4(e,t[0]?.kind),s4(e,t[0]?.label),c4(e,t[0]?.seq)},s4=M(4),c4=M(5),l4=k(0,`<!><!><!>`,`b%`,0,o4),u4=(e,t)=>l4(e,[t]),d4=(e,t)=>u4(e,t[0]),f4=I(60,L(`o17`,e=>A(e.a,`click`,function(){e._._.a7?.send(`\x1B`)})),e=>e._._),p4=L(`o18`,e=>A(e.a,`pointerdown`,function(e){e.preventDefault()})),m4=e=>{f4(e),p4(e)},h4=P(5,0,L(`o8`,e=>{e._.a5&&setTimeout(()=>e.c?.focus(),50)})),g4=L(`o9`,e=>{A(e.a,`click`,function(){F3(e._,!1)}),A(e.b,`click`,function(e){e.stopPropagation()}),A(e.c,`paste`,function(t){t.preventDefault(),e._.ak(t.clipboardData)}),A(e.d,`click`,function(){F3(e._,!1)})}),_4=e=>{h4._(e),g4(e)},v4=L(`o7`,e=>A(e.a,`click`,function(){E3(e._,!1)})),y4=I(51,e=>ht(e.a,[`dot`,hr(e._._.r)]),e=>e._._),b4=e=>{y4(e),x4(e)},x4=I(57,e=>V(e.b,e._._.y),e=>e._._),S4=M(3,e=>{z(e.a,`title`,`New ${e.d} session`),Yr(e.b,e.d)}),C4=L(`o15`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._.p?.(e.d)})),w4=e=>{e.b,Kr(e.b,15),Xr(e.b),C4(e)},T4=(e,t)=>S4(e,t[0]),E4=N(1,e=>{B(e.a,`armed`,e._._._.g===e._.j),z(e.a,`title`,e._._._.g===e._.j?`Really kill this session?`:`Kill session`)}),D4=I(8,E4,e=>e._._._),O4=L(`o13`,e=>A(e.a,`click`,function(t,n){e._._._.g===e._.j?(X4(e._._._,null),n.closest(`[popover]`)?.hidePopover(),e._._._._._.w?.(e._.j)):X4(e._._._,e._.j)})),k4=e=>{D4(e),A4._(e),O4(e)},A4=P(6,0,E4),j4=L(`o12`,e=>A(e.a,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e._._._._._.v?.(e._.j)})),M4=e=>{Vf(e.b),Hf(e.b,12),Uf(e.b),j4(e)},N4=N(10,e=>B(e.a,`current`,e.j===e._._._._.t)),P4=I(53,N4,e=>e._._._._),F4=L(`o14`,e=>A(e.b,`click`,function(t,n){n.closest(`[popover]`)?.hidePopover(),e.j!==e._._._._.t&&e._._._._.u?.(e.j)})),I4=e=>{P4(e),R4(e),B4(e),e.d,Kr(e.d,14),Xr(e.d),F4(e)},L4=O(5,(e=>`<button class="sess-x sess-edit" title="Rename session">${e}</button>`)(zf),(e=>` D/${e}&l`)(Bf),M4),R4=I(54,e=>L4(e,+!e._._._._.v),e=>e._._._._),z4=O(6,`<button class=sess-x>×</button>`,` `,k4),B4=I(55,e=>z4(e,+!e._._._._.w),e=>e._._._._),V4=M(9,e=>{N4(e),A4(e)}),H4=(e,t)=>ht(e.c,[`dot`,hr(t)]),U4=N(14,e=>V(e.e,e.n||e.m)),W4=M(12,e=>{Yr(e.d,e.m),U4(e)}),G4=M(13,U4),K4=k(0,(e=>`<div class=sess-row><button class=sess-open><span></span>${e}<span class=sess-title> </span></button><!><!></div>`)(Lr),(e=>` D D b/${e}&D m%b%l`)(`b%c`),I4,(e,t)=>{V4(e,t[0]?.id),H4(e,t[0]?.state),W4(e,t[0]?.agent),G4(e,t[0]?.title)}),q4=I(52,e=>K4(e,[e._._._.s||[],`id`]),e=>e._._._),J4=q4,Y4=I(50,e=>Yr(e.b,e._._.q||`shell`),e=>e._._),X4=j(6,F(D4)),Z4=(e,t)=>{z(e.a,`popovertarget`,t),z(e.d,`id`,t)},Q4=L(`o16`,e=>A(e.d,`toggle`,function(t,n){if(X4(e,null),t.newState===`open`){let t=e.a.getBoundingClientRect();n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`,n.style.left=`${Math.max(8,Math.min(t.left+t.width/2-n.offsetWidth/2,window.innerWidth-n.offsetWidth-8))}px`}})),$4=e=>{Y4(e),e3(e),n3(e),i3(e),e.b,Kr(e.b,16),Xr(e.b),X4(e,null),Z4(e,Qe(e)),Q4(e)},e3=I(51,e=>ht(e.c,[`dot`,`sess-dot`,hr(e._._.r)]),e=>e._._),t3=O(4,`<!><!><!>`,`b%`,J4),n3=I(52,e=>{B(e.f,`lone`,(e._._.s||[]).length<=1),t3(e,(e._._.s||[]).length>1?0:1)},e=>e._._),r3=k(5,(e=>`<button class=icon-btn>${e}</button>`)(Lr),(e=>` D/${e}&l`)(`b%c`),w4,T4),i3=I(56,e=>r3(e,[[...e._._.x||[],`shell`],e=>e]),e=>e._._),a3=L(`o11`,e=>{A(e.a,`click`,function(){e._._.m?.()}),A(e.c,`click`,function(){e._._.n?.()}),A(e.e,`click`,function(){e._._.o?.()})}),o3=e=>{Jm(e.b),Ym(e.b,16),Xm(e.b),kr(e.d),Ar(e.d,16),jr(e.d),wr(e.f),Tr(e.f,16),Er(e.f),a3(e)},s3=L(`o10`,e=>A(e.a,`click`,function(){e._._.l?.()})),c3=O(0,(e=>`<button class="icon-btn kbtn" title="Back to terminal">${e}</button>`)(cv),(e=>` D/${e}&l`)(lv),e=>{uv(e.b),dv(e.b,16),fv(e.b),s3(e)},((e,t,n)=>`<button class="icon-btn kbtn" title=Workspaces>${e}</button><button class="icon-btn kbtn" title="Manage workspace">${t}</button><button class="icon-btn kbtn" title="Review changes">${n}</button>`)(Km,Dr,Sr),((e,t,n)=>` D/${e}&l D/${t}&l D/${n}&l`)(qm,Or,Cr),o3),l3=O(8,`<button class="icon-btn kbtn kbtn-esc" title=Escape>esc</button>`,` `,m4),u3=O(1,(e=>`<button class="icon-btn kbtn sess-btn" title=Sessions>${e}<span></span></button><div popover=auto class=sess-pop><!><div class=sess-new></div></div>`)(Lr),(e=>` D/${e}& l D%b l`)(`b%c`),$4),d3=N(11,e=>u3(e,e._.k!==`diff`&&e._.p?0:1)),f3=P(6,0,e=>{c3(e,e._.k===`diff`?0:1),l3(e,+(e._.k===`diff`)),d3(e)}),p3=(e,t)=>{z(e.e,`popovertarget`,t),z(e.j,`id`,t)},m3=k(9,`<!><!><!>`,`b%`,0,d4),h3=L(`o23`,e=>{A(e.d,`change`,function(t,n){for(let t of n.files||[])e._.ah(t);n.value=``}),A(e.e,`pointerdown`,function(e){e.preventDefault()}),A(e.g,`pointerdown`,function(e){e.preventDefault()}),A(e.j,`pointerdown`,function(e){e.preventDefault()}),A(e.j,`toggle`,function(t,n){if(t.newState===`open`){let t=e.e.getBoundingClientRect();n.style.top=`${Math.max(8,t.top-n.offsetHeight-8)}px`,n.style.bottom=`auto`}})}),g3=e=>{f3._(e),_3._(e),y3._(e),b3._(e),x3._(e),D2(e.f),O2(e.f,16),k2(e.f),M2(e.h),N2(e.h,16),P2(e.h),p3(e,Qe(e)),m3(e,[Z2]),h3(e)},_3=P(6,0,d3),v3=O(2,`<span class="kbar-ws dim" aria-hidden=true><span></span><span class=kbar-ws-name> </span></span>`,`D bD `,b4),y3=P(6,0,e=>v3(e,+!e._.y)),b3=P(6,0,e=>{B(e.g,`on`,e._.a1),z(e.g,`title`,e._.a1?`Hide keyboard`:`Show keyboard`)}),x3=P(6,0,L(`o22`,e=>A(e.g,`click`,function(){D3(e._,!e._.a1),e._.a7?.setKeyboard(e._.a1)}))),S3=tee(`o6`,1),C3=et(42),w3=O(4,`<div class=term-dead><button class="btn primary">Reconnect</button></div>`,`D `,v4),T3=N(45,L(`o24`,e=>Et(e,{onMount:function(){let t=new AbortController,n=t.signal,r=new fZ({fontSize:13,fontFamily:`ui-monospace, monospace`,scrollback:5e3,allowProposedApi:!0,rightClickSelectsWord:!0,macOptionClickForcesSelection:!0,linkHandler:{activate(e,t){ur(t)}}}),i=new S0;r.loadAddon(i),r.open(e.b);let a=sr();try{let e=new y0;e.onContextLoss(()=>e.dispose()),r.loadAddon(e)}catch{}try{r.loadAddon(new o2(void 0,{readText:()=>navigator.clipboard.readText().catch(()=>``),writeText:(e,t)=>Y_(t).then(()=>{})}))}catch{}r.loadAddon(new m2((e,t)=>ur(t))),i.fit();let o=a?_2(r):null,s=o?o.write:e=>r.write(e),c=h2({sessionId:e.t,term:r,write:s,onDead:()=>{E3(e,!0)},isVisible:()=>!!e.z},n);r.onData(e=>c.send(e)),r.attachCustomKeyEventHandler(t=>t.key===`Enter`&&t.shiftKey?(t.type===`keydown`&&c.send(`\x1B\r`),!1):(t.ctrlKey||t.metaKey)&&t.key.toLowerCase()===`c`&&r.hasSelection()?(t.type===`keydown`&&Y_(r.getSelection()).then(t=>{t&&(r.clearSelection(),e.ab())}),!1):!(a&&t.type===`keydown`&&t.key===`Backspace`));let l=()=>{if(!e.b.clientWidth)return;let t=i.proposeDimensions();!t||t.cols===r.cols&&t.rows===r.rows||(i.fit(),c.resize(r.cols,r.rows))},u=new ResizeObserver(l);u.observe(e.b),n.addEventListener(`abort`,()=>u.disconnect());let d=()=>requestAnimationFrame(l);if(document.addEventListener(`visibilitychange`,()=>{document.hidden||d()},{signal:n}),window.addEventListener(`pageshow`,d,{signal:n}),window.addEventListener(`focus`,d,{signal:n}),window.visualViewport?.addEventListener(`resize`,d,{signal:n}),e.b.addEventListener(`paste`,t=>{let n=[...t.clipboardData?.files||[]];if(n.length){t.preventDefault(),t.stopImmediatePropagation();for(let t of n)e.ah(t)}},{capture:!0,signal:n}),e.a7={send(e){c.send(e)},setKeyboard(e){let t=r.textarea;t&&(t.inputMode=e?`text`:`none`,e?(t.focus(),setTimeout(()=>{document.activeElement!==t&&t.focus()},50)):t.blur())}},a){r.textarea&&(r.textarea.inputMode=`none`);let t=window.visualViewport;if(t){let i=0,a=()=>{i=Math.max(i,t.height),e.a1&&i-t.height<X2&&(D3(e,!1),r.textarea&&(r.textarea.inputMode=`none`))};a(),t.addEventListener(`resize`,a,{signal:n}),window.addEventListener(`orientationchange`,()=>{i=0},{signal:n})}let i=S2(r,S3(e),{onStart(){o?.setFrozen(!0)},onEnd(){o?.setFrozen(!1)},onCopy(){e.ab()}},n);g2(r,S3(e),n,i.selecting),v2(r,e=>c.send(e),n)}else w2(r,S3(e),()=>e.ab(),n);e.z&&!a&&r.focus();let f={term:r,socket:c,abort:t,suspend:void 0};return e.z||(f.suspend=setTimeout(()=>c.disconnect(),Y2)),f},onUpdate:function(){clearTimeout(this.suspend),this.socket.syncVisibility(),e.z?(!e.a0&&this.socket.readyState>=WebSocket.CLOSING&&(this.term.reset(),this.socket.reconnect()),!e.a0&&!e.a2&&this.term.focus()):this.suspend=setTimeout(()=>this.socket.disconnect(),Y2)},onDestroy:function(){clearTimeout(this.suspend),this.abort.abort(),this.term.dispose()}})),7),E3=j(26,e=>{w3(e,+!e.a0),T3(e)}),D3=j(27,e=>{T3(e),b3(e)}),O3=O(6,((e,t)=>`<div class=kb-slot><div class=key-bar><!><div class=kspacer></div><!><input type=file accept=image/* hidden><button class="icon-btn kbtn dpad-btn" title="More keys">${e}</button><button class="icon-btn kbtn kb-toggle">${t}</button><!><div popover=auto class=dpad-grid></div></div></div>`)(T2,A2),((e,t)=>`E%b b%b b D/${e}&l D/${t}&l%b m`)(E2,j2),g3),k3=j(28,e=>{O3(e,+!e.a2),T3(e)}),A3=O(2,`<div class="term-uploading dim">uploading…</div>`),j3=j(29,e=>A3(e,+!e.a3)),M3=O(3,`<div class=term-copied>Copied</div>`),N3=j(30,e=>M3(e,+!e.a4)),P3=O(5,`<div class=trap-backdrop><div class=paste-trap><p class=dim>Long-press below and choose Paste</p><input placeholder="Paste here…"><button class=btn>Cancel</button></div></div>`,` D Db b `,_4),F3=j(31,e=>{P3(e,+!e.a5),h4(e)}),I3=(e,t)=>J3(e,t.current),L3=(e,t)=>X3(e,t.timer),R3=(e,t)=>Q3(e,t.current),z3=L(`o25`,e=>{k3(e,sr()),A(e.a,`dragover`,function(e){e.preventDefault()}),A(e.a,`drop`,function(t){t.preventDefault();for(let n of t.dataTransfer?.files||[])e.ah(n)})});function B3(e){E3(e,!1),D3(e,!1),k3(e,!1),j3(e,!1),N3(e,!1),F3(e,!1),I3(e,{current:null}),L3(e,{timer:0}),R3(e,{current:null}),z3(e)}var V3=M(41),H3=N(40,e=>V3(e,v6(e))),U3=M(46),W3=M(47),G3=N(44,e=>{U3(e,y6(e)),W3(e,b6(e))}),K3=M(43,e=>{G3(e),T3(e)}),q3=N(34,e=>K3(e,x6(e))),J3=M(33,e=>{H3(e),q3(e),G3(e),T3(e)}),Y3=M(37,T3),X3=M(36,e=>Y3(e,S6(e))),Z3=M(42),Q3=M(39,e=>{Z3(e,C6(e)),H3(e)}),$3=M(9,q3),e6=M(10,e=>{z(e.a,`hidden`,e.k===`diff`),f3(e)}),t6=F(P4),n6=M(19,e=>{T3(e),t6(e)}),r6=M(25,T3),i6=M(11),a6=M(12),o6=M(13),s6=M(14),c6=M(15,_3),l6=M(16,F(Y4)),u6=M(17,F(e3,y4)),d6=M(18,F(n3,q4)),f6=M(20),p6=M(21,F(R4)),m6=M(22,F(B4)),h6=M(23,F(i3)),g6=F(x4),_6=M(24,e=>{y3(e),g6(e)});function v6(e){return t=>{C3(e)(),e.a7?.send(t);let n={};n.delay=setTimeout(()=>{n.repeat=setInterval(()=>e.a7?.send(t),J2)},q2),e.ad=n}}function y6(e){return async t=>{let n=[...t?.files||[]];for(let t of n)await e.ah(t);if(!n.length){let n=t?.getData(`text/plain`);n&&e.a7?.send(n)}F3(e,!1)}}function b6(e){return async()=>{if(!navigator.clipboard?.read){F3(e,!0);return}try{for(let t of await navigator.clipboard.read()){let n=t.types.find(e=>e.startsWith(`image/`));if(n){let r=await t.getType(n);await e.ah(new File([r],`pasted.${n.split(`/`)[1]||`png`}`,{type:n}))}else if(t.types.includes(`text/plain`)){let n=await(await t.getType(`text/plain`)).text();n&&e.a7?.send(n)}}}catch{F3(e,!0)}}}function x6(e){return async t=>{if(t){j3(e,!0);try{let n=await(await fetch(`/api/workspaces/${e.j}/assets?name=${encodeURIComponent(t.name||`pasted.png`)}`,{method:`POST`,body:t})).json();n.path&&e.a7?.send(`${n.path} `)}finally{j3(e,!1)}}}}function S6(e){return()=>{clearTimeout(e.aa),N3(e,!0),e.aa=setTimeout(()=>{N3(e,!1)},1200)}}function C6(e){return()=>{let t=e.ad;t&&(clearTimeout(t.delay),clearInterval(t.repeat),e.ad=null)}}R(`o1`,v6),R(`o4`,y6),R(`o5`,b6),R(`o3`,x6),R(`o0`,S6),R(`o2`,C6);var w6=ks,T6=(e=>`/${e}&`)(As);function E6(e){let t=Math.round(e/6e4);if(t<60)return`${t}m`;let n=Math.round(t/60);return n<48?`${n}h`:`${Math.round(n/24)}d`}function D6(e,t){if(!e)return null;let n=new Date(e).getTime()-Date.now();return n<=0?t?null:`now`:E6(n)}var O6=(e,t)=>V(e.e,t?`↻ ${pt(t)}`:``),k6=N(9,e=>O6(e,D6(e.i,e._.h!=null))),A6=Ke(4,k6),j6=A6,M6=N(12,e=>z(e.a,`title`,`${e.k}: ${e.l}% used${e.i?` — resets ${new Date(e.i).toLocaleString()}`:``}`),2),N6=M(11,e=>{V(e.d,e.l),M6(e)}),P6=M(7,e=>{gt(e.c,{hot:e.h>=90,warm:e.h>=70&&e.h<90}),_t(e.c,`width:${Math.min(100,Math.max(2,e.h))}%`),N6(e,Math.round(e.h))}),F6=M(8,e=>{k6(e),M6(e)}),I6=M(10,e=>{V(e.b,e.k),M6(e)}),L6=(e,t)=>{P6(e,t[0]?.used_percent),F6(e,t[0]?.resets_at),I6(e,t[0]?.window)},R6=P(3,0,e=>{z(e.a,`title`,`plan-usage could not reach this provider — these are its last cached numbers, ${E6(e._.h*1e3)} old`),V(e.b,E6(e._.h*1e3))}),z6=R6,B6=P(2,0,e=>V(e.a,e._.j.replace(/^default_/,``).replaceAll(`_`,` `))),V6=B6,H6=O(3,`<span class=usage-stale>⚠ <!> old</span>`,` Db%`,z6),U6=M(7,e=>{B(e.a,`stale`,e.h!=null),H6(e,+(e.h==null)),R6(e),A6(e)}),W6=(e,t)=>V(e.b,t),G6=O(2,`<span class=dim> </span>`,`D `,V6),K6=M(9,e=>{G6(e,+!e.j),B6(e)}),q6=k(4,`<div class=meter><span class="meter-label dim"> </span><span class=meter-track><span class=meter-fill></span></span><span class=meter-pct><!>%</span><span class="meter-reset dim"> </span></div>`,` E lD lD%lD `,j6,L6),J6=(e,t)=>q6(e,[t||[],`window`]),Y6=k(0,`<div class=usage-row><div class=usage-name><strong> </strong><!><!></div><div class=usage-meters></div></div>`,` F l%b%l `,0,(e,t)=>{U6(e,t[0]?.stale_seconds),W6(e,t[0]?.agent),K6(e,t[0]?.plan),J6(e,t[0]?.windows)}),X6=I(12,e=>Y6(e,[e._._.g||[],e=>`${e.agent}-${e.account||``}`]),e=>e._._),Z6=X6,Q6=I(11,e=>V(e.a,e._._.f),e=>e._._),$6=O(2,`<p class=dim><span class=spin></span> Loading usage…</p>`,0,0,`<p class=dim> </p>`,`D `,Q6,`<div class=usage-list></div>`,` `,Z6),e8=I(10,e=>$6(e,e._.e?e._.e?.error?1:2:0)),t8=L(`p3`,e=>A(e.a,`click`,function(){e._.j()})),n8=e=>{e8(e),r8(e),So(e.b),Co(e.b,13),wo(e.b),t8(e)},r8=I(13,e=>{B(e.a,`spinning`,e._.h),z(e.a,`disabled`,e._.h)}),i8=ut(`p4`,(e=>`<header class=manage-head><div><h2>Usage</h2></div><button class=icon-btn title="Refresh usage">${e}</button></header><!><!>`)(bo),(e=>`Db D/${e}&m%c`)(xo),n8),a8=F(e8),o8=j(4,e=>{s8(e,e.e?.error),c8(e,e.e?.agents),a8(e)}),s8=M(5,F(Q6)),c8=M(6,F(X6)),l8=j(7,F(r8)),u8=M(9),d8=L(`p5`,e=>Et(e,{onMount:function(){e.i(!1)}})),f8=M(8,e=>{u8(e,h8(e)),d8(e)});function p8(e){zs(e.a),js(e.a,i8(e)),Vs(e.a,`Usage`),Bs(e.a,`usage-modal`),Rs(e.a),Gs(e.a),o8(e,null),l8(e,!1),f8(e,g8(e))}var m8=M(3,e=>Ws(e.a,_8(e)));function h8(e){return async()=>{l8(e,!0),await e.i(!0),l8(e,!1)}}function g8(e){return async t=>{try{o8(e,await H(`/api/usage${t?`?refresh`:``}`))}catch(t){o8(e,{error:String(t.message||t)})}}}function _8(e){return function(){e.d()}}R(`p1`,h8),R(`p0`,g8),R(`p2`,_8);var v8=ks,y8=(e=>`/${e}&`)(As),b8=et(1,`B2`),x8=I(12,e=>V(e.a,e._.f)),S8=L(`k4`,e=>{It(e,`b`),A(e.b,`keydown`,function(t){t.key===`Enter`?(t.preventDefault(),e._.l()):t.key===`Escape`&&e._.j&&e._.g()})}),C8=e=>{x8(e),w8(e),T8(e),S8(e)},w8=I(14,e=>z(e.b,`placeholder`,e._.i)),T8=I(15,e=>Ft(e,`b`,e._.j,G8(e))),E8=ut(`k6`,`<h2 class=prompt-title> </h2><input>`,`D l `,C8,0,`B2`),D8=I(13,e=>V(e.b,e._.h||`OK`)),O8=L(`k3`,e=>{A(e.a,`click`,function(){e._.l()}),A(e.c,`click`,function(){e._.g()})}),k8=e=>{D8(e),A8(e),O8(e)},A8=I(15,e=>z(e.a,`disabled`,!e._.j.trim())),j8=dt(`k5`,`<button class="btn primary"> </button><div class=spacer></div><button class=btn>Cancel</button>`,` D lb `,k8),M8=M(11),N8=N(10,e=>M8(e,K8(e))),P8=F(A8,T8),F8=j(9,e=>{N8(e),P8(e)}),I8=(e,t)=>F8(e,t||``),L8=M(4,N8),R8=L(`k7`,e=>Et(e,{onMount:function(){setTimeout(()=>{let t=b8(e)();t?.focus(),t?.select()},0)}}));function z8(e){zs(e.a),Gs(e.a,on({content:j8(e)})),js(e.a,E8(e)),Bs(e.a,`prompt-dlg`),Rs(e.a),R8(e)}var B8=F(x8),V8=M(5,e=>{Vs(e.a,e.f),B8(e)}),H8=M(6,e=>Ws(e.a,q8(e))),U8=M(7,F(D8)),W8=M(8,F(w8));function G8(e){return t=>{F8(e._,t)}}function K8(e){return()=>{let t=e.j.trim();t&&e.e(t)}}function q8(e){return function(){e.g()}}R(`k0`,G8),R(`k1`,K8),R(`k2`,q8);var J8=((e,t)=>`<div class=work-view>${e}<div class=main-col><!><!>${t}<!><!><div class=term-area></div></div><!><!></div>`)(fh,DF),Y8=((e,t)=>`D/${e}&D%b%b/${t}&%b%b l%b%l`)(ph,OF),X8=N(1,e=>I8(e.a,e._.a6||e._.a7)),Z8=P(8,0,X8),Q8=e=>{Z8._(e),$8._(e),t5._(e),n5._(e),z8(e.a),V8(e.a,`Rename session`),U8(e.a,`Rename`),H8(e.a,g7(e)),W8(e.a)},$8=P(8,0,X8),e5=N(2,e=>L8(e.a,_7(e))),t5=P(8,0,e5),n5=P(8,0,e5),r5=P(1,0,e=>V(e.a,e._.a3)),i5=L(`q29`,e=>A(e.b,`click`,function(){f7(e._,null)})),a5=e=>{r5._(e),i5(e)},o5=e=>{p8(e.a),m8(e.a,v7(e))},s5=N(2,e=>V(e.b,e._._.a4?`Starting…`:`Start ${e._._.o||`claude`}`)),c5=I(63,s5,e=>e._._),l5=L(`q30`,e=>A(e.a,`click`,function(){e._._.am(e._._.o||`claude`,!0)})),u5=e=>{c5(e),d5(e),l5(e)},d5=I(67,e=>{z(e.a,`disabled`,e._._.a4),s5(e)},e=>e._._),f5=N(8,e=>r6(e.b,e._._.n&&e._._.y===`term`&&e.g===e._._.ak),3),p5=I(62,f5,e=>e._._),m5=e=>{p5(e),h5(e),g5(e),v5(e),y5(e),b5(e),C5(e),w5(e),T5(e),B3(e.b),f6(e.b,S7(e)),s6(e.b,x7(e)),i6(e.b,b7(e)),a6(e.b,y7(e))},h5=I(64,e=>h6(e.b,e._._.r),e=>e._._),g5=I(65,e=>{e6(e.b,e._._.y),f5(e)},e=>e._._),_5=N(11,e=>c6(e.b,C7(e))),v5=I(71,e=>{$3(e.b,e._._.aa),o6(e.b,w7(e)),_5(e)},e=>e._._),y5=I(72,e=>_6(e.b,e._._.ag),e=>e._._),b5=I(73,e=>{d6(e.b,e._._.ah),p6(e.b,T7(e))},e=>e._._),x5=le(3,0,2),S5=N(7,e=>x5(e,e.g===e._._.ak)),C5=I(75,e=>{f5(e),S5(e)},e=>e._._),w5=I(76,e=>m6(e.b,E7(e)),e=>e._._),T5=I(78,_5,e=>e._._),E5=M(6,e=>{n6(e.b,e.g),f5(e),S5(e)}),D5=(e,t)=>u6(e.b,t),O5=(e,t)=>l6(e.b,t),k5=k(0,(e=>`<!><!>${e}<!><!><!>`)(G2),(e=>`b%b/${e}&%b%c`)(K2),m5,(e,t)=>{E5(e,t[0]?.id),D5(e,t[0]?.state),O5(e,t[0]?.agent)}),A5=P(6,0,e=>k5(e,[e._.ah,`id`])),j5=e=>{A5._(e),N5._(e)},M5=O(1,`<div class=empty-sess><p class=dim>No sessions in this workspace.</p><button class="btn primary"> </button></div>`,`Db D `,u5),N5=P(6,0,e=>M5(e,+!!e._.aj)),P5=M(59,n5),F5=O(6,`<!><!><!><!>`,`b%b%`,j5,`<p class="dim pad-inline">Loading sessions…</p>`),I5=L(`q33`,e=>{e.n&&window.addEventListener(`keydown`,t=>{if(t.key===`Escape`&&e.a1&&u7(e,!1),(t.metaKey||t.ctrlKey)&&t.shiftKey&&t.key.toLowerCase()===`d`&&(t.preventDefault(),c7(e,e.y===`diff`?`term`:`diff`)),t.altKey&&(t.key===`[`||t.key===`]`)&&(e.ah?.length??0)>1){t.preventDefault();let n=e.ah.map(e=>e.id);i7(e,n[(Math.max(0,n.indexOf(e.ak))+(t.key===`]`?1:n.length-1))%n.length]),c7(e,`term`)}},{capture:!0,signal:De(e,0)})}),L5=N(47,e=>{Ee(e,0),I5(e)},4),R5=F(C5),z5=M(46,e=>{Vg(e.a,e.ak),L5(e),R5(e)}),B5=N(44,e=>z5(e,(()=>{if(e.w&&e.ah?.some(t=>t.id===e.w))return e.w;let t=Jn(e.aa);return t&&e.ah?.some(e=>e.id===t)?t:e.ah?.[0]?.id??null})()),2),V5=F(b5),H5=M(43,e=>{T_(e.a,e.ah),WH(e.d,e.ah||[]),Ane(e,e.ah?.length),F5(e,+!e.ah),B5(e),L5(e),A5(e),V5(e)}),U5=N(40,e=>H5(e,e.v??e.m?.[e.aa]?.sessions??null),2),W5=N(57,L(`q31`,e=>Et(e,{active:e.n,load:e.au,onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,started:!1,stale:!1,timer:void 0,refresh:()=>{if(document.hidden){r.stale=!0;return}r.stale=!1,this.load(!1)},sync:()=>{this.active?(r.started||(r.started=!0,this.load(!0)),r.timer??=setInterval(r.refresh,1e4)):r.stop()},stop:()=>{clearInterval(r.timer),r.timer=void 0}};return kn().addEventListener(`sessions.changed`,t=>{let n=t.data?.workspaceId;r.started&&(!n||n===e.aa)&&r.refresh()},{signal:n}),document.addEventListener(`visibilitychange`,()=>{!document.hidden&&r.stale&&r.refresh()},{signal:n}),Nn(()=>{if(!this.active)return;let t=Fn(e.aa);t&&(l7(e,t.pr||``),c7(e,`diff`));let n=Ln(e.aa);n&&(i7(e,n),c7(e,`term`))},n),r.sync(),r},onUpdate:function(){this.sync()},onDestroy:function(){this.abort.abort(),this.stop()}})),2),G5=M(56,W5),K5=N(55,e=>G5(e,O7(e)),2),q5=M(54,K5),J5=N(52,e=>q5(e,k7(e)),6),Y5=F(T5),X5=M(60,e=>{x_(e.a,A7(e)),Y5(e)}),Z5=N(49,e=>X5(e,j7(e)),2),Q5=M(48,e=>{J5(e),Z5(e)}),$5=N(38,e=>Q5(e,M7(e))),e7=M(58,F(w5)),t7=N(23,e=>e7(e,N7(e))),n7=j(21,e=>{P5(e,D7(e)),U5(e),$5(e),J5(e),t7(e)}),r7=N(39,L(`q32`,e=>{e.w&&Yn(e.aa,e.w)})),i7=j(22,e=>{B5(e),J5(e),t7(e),r7(e)}),a7=le(5,2,4),o7=N(25,e=>zH(e.d,e.n&&e.y===`diff`)),s7=F(g5),c7=j(24,e=>{Kg(e.a,e.y),B(e.g,`as-bar`,e.y===`diff`),a7(e,e.y===`diff`),L5(e),o7(e),s7(e)}),l7=j(26,e=>FH(e.d,e.a0)),u7=j(27,e=>{Qg(e.a,e.a1),L5(e)}),hne=O(7,w6,(e=>`/${e}&`)(T6),o5),d7=j(28,e=>hne(e,+!e.a2)),gne=O(1,`<p class=toast-error> <button title=Dismiss>×</button></p>`,`D b `,a5),f7=j(29,e=>{gne(e,+!e.a3),r5(e)}),p7=j(30,F(d5)),_ne=O(8,v8,(e=>`/${e}&`)(y8),Q8),m7=j(31,e=>{xne(e,e.a5?.title),Sne(e,e.a5?.agent),Cne(e,e.a5?.id),_ne(e,+!e.a5)}),vne=(e,t)=>{Fne(e,t.wanted),Ine(e,t.run)},yne=M(61);function bne(e){c_(e.a),Hg(e.a,W7(e)),qg(e.a,U7(e)),$g(e.a,H7(e)),l_(e.a,V7(e)),j_(e.a,B7(e)),A_(e.a,z7(e)),O_(e.a,R7(e)),C_(e.a,L7(e)),SH(e.d),qH(e.d,I7(e)),YH(e.d,F7(e)),n7(e,null),i7(e,null),c7(e,`term`),l7(e,``),u7(e,!1),d7(e,!1),f7(e,null),p7(e,!1),m7(e,null),vne(e,{wanted:!1,run:void 0}),yne(e,P7(e))}var xne=M(32,Z8),Sne=M(33,$8),Cne=M(34,t5),wne=(e,t)=>{Lg(e.a,t),Ene(e,t?.id),Dne(e,t?.status),One(e,t?.name)},h7=N(37,L(`q34`,e=>{if(e.n){let t=Fn(e.aa);t&&(l7(e,t.pr||``),c7(e,`diff`));let n=Ln(e.aa);n&&(i7(e,n),c7(e,`term`))}})),Tne=F(v5),Ene=M(36,e=>{RH(e.d,e.aa),U5(e),B5(e),h7(e),$5(e),J5(e),r7(e),Z5(e),W5(e),Tne(e)}),Dne=M(41,J5),One=M(42,F(y5)),kne=wne,Ane=M(45,N5),jne=M(12,e=>{m_(e.a,e.m),U5(e)}),Mne=F(p5),Nne=L(`q35`,e=>{e.n||u7(e,!1)}),Pne=M(13,e=>{u_(e.a,e.n),h7(e),L5(e),W5(e),o7(e),Mne(e),Nne(e)}),Fne=M(51,e=>{J5(e),K5(e)}),Ine=M(53,K5),Lne=F(c5),Rne=M(14,e=>{J5(e),Lne(e)}),zne=M(15,e=>{g_(e.a,e.p),Z5(e)}),Bne=(e,t)=>d_(e.a,t),Vne=F(h5),Hne=M(17,e=>{y_(e.a,e.r),Vne(e)}),Une=(e,t)=>E_(e.a,t),Wne=M(19,e=>__(e.a,e.t)),Gne=(e,t)=>M_(e.a,t);function g7(e){return function(){m7(e._,null)}}function _7(e){return function(t){e._.ax(e._.a8,t),m7(e._,null)}}function v7(e){return function(){d7(e._,!1)}}function y7(e){return function(){u7(e._._,!0)}}function b7(e){return function(){c7(e._._,`term`)}}function x7(e){return function(){l7(e._._,``),c7(e._._,`diff`)}}function S7(e){return function(t){i7(e._._,t)}}function C7(e){return function(t){e._._.ay(e._._.aa,t)}}function w7(e){return function(){e._._.t?.(e._._.aa)}}function T7(e){return function(t){let n=(e._._.ah||[]).find(e=>e.id===t);n&&m7(e._._,n)}}function E7(e){return function(t){e._._.aw(t)}}function D7(e){return async(t,n)=>{n=n.trim(),n&&(n7(e,(e.v||[]).map(e=>e.id===t?{...e,title:n}:e)),await fetch(`/api/sessions/${t}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify({title:n})}))}}function O7(e){return t=>(t&&(e.ap=!0),(e.ar??=Rn(e.as))())}function k7(e){return async()=>{let t=e.ap;e.ap=!1;try{let n=await H(`/api/workspaces/${e.aa}/sessions`);if(!n.length&&t&&e.af===`active`){let t=await e.am(e.o||`claude`,!1);n=t?[t]:[]}n7(e,n);let r=Jn(e.aa);r&&n.some(e=>e.id===r)&&i7(e,r),e.v.some(t=>t.id===e.w)||i7(e,e.v?.[0]?.id||null)}catch(t){n7(e,e.v||[]),f7(e,String(t))}}}function A7(e){return function(t,n){e.ay(t,n)}}function j7(e){return async(t,n)=>{if(t===e.aa){let r=await e.am(n,!0);r&&Yn(t,r.id);return}try{Yn(t,(await H(`/api/workspaces/${t}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})})).id),e.p?.(t)}catch(t){f7(e,String(t.message||t))}}}function M7(e){return async(t,n)=>{p7(e,!0);try{let r=await H(`/api/workspaces/${e.aa}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:t})});return n&&(n7(e,(e.v||[]).concat(r)),i7(e,r.id)),r}catch(t){return f7(e,String(t.message||t)),null}finally{p7(e,!1)}}}function N7(e){return async t=>{try{await H(`/api/sessions/${t}`,{method:`DELETE`}),n7(e,(e.v||[]).filter(e=>e.id!==t)),e.w===t&&i7(e,e.v?.[0]?.id||null)}catch(t){f7(e,`Kill session failed: ${String(t.message||t)}`)}}}function P7(e){return t=>{m7(e,t)}}function F7(e){return function(){c7(e,`term`)}}function I7(e){return function(t){i7(e,t),c7(e,`term`)}}function L7(e){return function(t){l7(e,t||``)}}function R7(e){return function(t){e.az(t)}}function z7(e){return function(t){e.aw(t)}}function B7(e){return function(){d7(e,!0)}}function V7(e){return function(t){f7(e,t)}}function H7(e){return t=>{u7(e,t)}}function U7(e){return t=>{c7(e,t)}}function W7(e){return function(t){i7(e,t)}}R(`q28`,g7),R(`q27`,_7),R(`q26`,v7),R(`q24`,y7),R(`q23`,b7),R(`q22`,x7),R(`q19`,S7),R(`q18`,C7),R(`q25`,w7),R(`q21`,T7),R(`q20`,E7),R(`q4`,D7),R(`q2`,O7),R(`q1`,k7),R(`q12`,A7),R(`q5`,j7),R(`q0`,M7),R(`q3`,N7),R(`q6`,P7),R(`q17`,F7),R(`q16`,I7),R(`q15`,L7),R(`q14`,R7),R(`q13`,z7),R(`q11`,B7),R(`q10`,V7),R(`q9`,H7),R(`q8`,U7),R(`q7`,W7);var G7=I(40,e=>V(e.a,e._._.t),e=>e._._),Kne=L(`b19`,e=>A(e.b,`click`,function(){I9(e._._,null),e._._.v()})),qne=O(0,`<p> </p><button class=btn>Retry</button>`,`D l `,e=>{G7(e),Kne(e)},`<span class=spin></span>Loading workspaces…`),K7=P(1,0,e=>qne(e,+!e._.t)),Jne=K7,q7=P(0,0,e=>V(e.a,e._.t)),Yne=L(`b18`,e=>A(e.b,`click`,function(){I9(e._,null)})),Xne=e=>{q7._(e),Yne(e)},J7=I(34,e=>Bne(e.b,e._._.g),e=>e._._),Zne=e=>{J7(e),Y7(e),X7(e),$7(e),e9(e),t9(e),n9(e),r9._(e),i9._(e),bne(e.b),Une(e.b,R9(e)),Gne(e.b,L9(e))},Y7=I(35,e=>jne(e.b,e._._.h),e=>e._._),X7=I(36,e=>{Rne(e.b,e._._.i?e._._.i?.preferredAgent:`claude`),Hne(e.b,e._._.i?e._._.i?.agents:[`claude`])},e=>e._._),Z7=N(5,e=>Pne(e.b,!e._._.p&&!e._._.a5&&e._.f===e._._.k),3),Qne=le(3,0,2),Q7=N(4,e=>Qne(e,e._.f===e._._.k)),$7=I(37,e=>{Z7(e),Q7(e)},e=>e._._),e9=I(38,Z7,e=>e._._),t9=I(41,e=>zne(e.b,z9(e)),e=>e._._),n9=I(42,Z7,e=>e._._),r9=P(0,0,e=>kne(e.b,e._.e)),i9=P(0,0,e=>{Wne(e.b,B9(e)),Z7(e),Q7(e)}),$ne=O(0,(e=>`<!><!>${e}<!><!><!>`)(J8),(e=>`b%b/${e}&%b%c`)(Y8),Zne),ere=M(4,e=>{nre(e,e.e?.id),$ne(e,+!e.e),r9(e)}),a9=N(3,e=>ere(e,e._.g.find(t=>t.id===e.c))),o9=Ke(5,a9),tre=o9,nre=M(5,i9),rre=M(2,a9),ire=(e,t)=>rre(e,t[0]),s9=N(1,e=>Of(e.a,V9(e))),c9=P(4,0,s9),are=e=>{c9._(e),l9._(e),Cf(e.a),kf(e.a,H9(e))},l9=P(4,0,s9),u9=P(3,0,e=>Zu(e.a,U9(e))),ore=e=>{u9._(e),d9._(e),Su(e.a),Qu(e.a,W9(e))},d9=P(3,0,e=>Xu(e.a,e._.a5)),f9=P(2,0,e=>Wa(e.a,e._.g)),sre=e=>{f9._(e),p9._(e),m9._(e),h9._(e),_9._(e),v9._(e),y9._(e),za(e.a),ho(e.a,J9(e)),Ya(e.a,q9(e)),to(e.a,K9(e)),so(e.a,G9(e))},p9=P(2,0,e=>mo(e.a,e._.h)),m9=P(2,0,e=>uo(e.a,e._.i)),h9=P(2,0,e=>qa(e.a,e._.k)),g9=N(1,e=>oo(e.a,!e._.s&&e._.a6)),_9=P(2,0,g9),v9=P(2,0,e=>{no(e.a,Z9(e)),Ja(e.a,X9(e)),Za(e.a,Y9(e))}),y9=P(2,0,g9),b9=N(28,L(`b20`,e=>Et(e,{paletteOpen:e.s,load:e.v,activeList:e.g.filter(e=>e.status===`active`).map(e=>e.id),onMount:function(){let t=new AbortController,n=t.signal,r={abort:t,statusStale:!1,statusDebounce:void 0,timer:void 0};ir(n);let i=(t,n)=>{n&&(In(t,n),Yn(t,n)),e.a1(t)},a=new URLSearchParams(location.search);a.get(`ws`)&&(i(a.get(`ws`),a.get(`session`)),history.replaceState(null,``,`/`)),lr()&&document.addEventListener(`click`,e=>{let t=e.target?.closest?.(`a[target="_blank"][href^="http"]`);t&&(e.preventDefault(),ur(t.href))},{capture:!0,signal:n}),navigator.serviceWorker?.addEventListener(`message`,e=>{e.data?.type===`open-session`&&i(e.data.workspaceId,e.data.sessionId)},{signal:n}),H(`/api/settings`).then(t=>{O9(e,t)}).catch(()=>{});let o=()=>{if(document.hidden){r.statusStale=!0;return}r.statusStale=!1,e.a0()};document.addEventListener(`visibilitychange`,()=>{document.hidden||(r.statusStale=!1,e.a0(!0))},{signal:n}),this.load(),o(),kn().addEventListener(`workspaces.changed`,()=>{this.load(),o()},{signal:n}),kn().addEventListener(`sessions.changed`,()=>{clearTimeout(r.statusDebounce),r.statusDebounce=setTimeout(o,300)},{signal:n}),kn().addEventListener(`status.changed`,t=>{t.data&&(D9(e,t.data),r.statusStale=!1)},{signal:n}),r.timer=setInterval(o,6e4),window.addEventListener(`keydown`,t=>{if((t.metaKey||t.ctrlKey)&&t.key===`k`&&(t.preventDefault(),F9(e,!this.paletteOpen)),(t.metaKey||t.ctrlKey)&&!t.shiftKey&&!t.altKey&&t.key>=`1`&&t.key<=`9`){let n=this.activeList?.[Number(t.key)-1];n&&(t.preventDefault(),e.a1(n))}},{capture:!0,signal:n});let s=window.visualViewport;if(s){let e=()=>{let e=Math.abs(s.height-window.innerHeight)<1;document.documentElement.style.setProperty(`--app-height`,e?``:`${Math.round(s.height)}px`),e||window.scrollTo(0,0)};s.addEventListener(`resize`,e,{signal:n}),s.addEventListener(`scroll`,e,{signal:n}),document.addEventListener(`visibilitychange`,()=>{document.hidden||e()},{signal:n}),window.addEventListener(`pageshow`,e,{signal:n}),window.addEventListener(`focus`,e,{signal:n})}return r},onDestroy:function(){this.abort.abort(),clearTimeout(this.statusDebounce),clearInterval(this.timer)}})),4),cre=F(t9),lre=M(27,e=>{b9(e),v9(e),l9(e),cre(e)}),x9=N(13,e=>lre(e,Q9(e))),ure=O(2,(e=>`<!>${e}`)(Zr),(e=>`b/${e}&`)(Qr),sre),S9=N(33,e=>ure(e,e.s||e.a6?0:1)),dre=M(32,e=>{S9(e),y9(e)}),C9=N(30,e=>dre(e,!e.p&&!e.a3&&e.j),2),fre=M(29,C9),w9=N(11,e=>fre(e,e.g.find(t=>t.id===e.k))),pre=O(3,qs,(e=>`/${e}&`)(Js),ore),mre=F(n9),hre=M(31,e=>{pre(e,+!e.a5),d9(e),mre(e)}),T9=N(17,e=>hre(e,e.g.find(t=>t.id===e.q))),gre=F(J7),E9=j(6,e=>{x9(e),b9(e),w9(e),T9(e),f9(e),u9(e),c9(e),o9(e),gre(e)}),_re=F(Y7),D9=j(7,e=>{p9(e),_re(e)}),vre=F(X7),O9=j(8,e=>{m9(e),vre(e)}),yre=O(1,`<div class="boot dim"></div>`,` `,Jne),bre=M(21,b9),k9=N(14,e=>bre(e,$9(e)),2),xre=O(0,`<p class=toast-error><!> <button>×</button></p>`,`D%c `,Xne),A9=N(20,e=>xre(e,e.t&&e.j?0:1)),Sre=j(9,e=>{yre(e,+!!e.j),k9(e),C9(e),A9(e)}),Cre=F($7),j9=j(10,e=>{k9(e),w9(e),h9(e),Cre(e)}),wre=k(5,`<!><!><!>`,`b%`,tre,ire),M9=j(12,e=>{wre(e,[e.m,e=>e]),k9(e),x9(e)}),Tre=O(4,pd,(e=>`/${e}&`)(md),are),Ere=F(e9),N9=j(15,e=>{Tre(e,+!e.p),C9(e),Ere(e)}),P9=j(16,T9),F9=j(18,e=>{b9(e),S9(e),_9(e)}),Dre=F(G7),I9=j(19,e=>{A9(e),q7(e),K7(e),Dre(e)});function L9(e){return function(){N9(e._._,!0)}}function R9(e){return function(t,n){In(t,n),Yn(t,n),e._._.a1(t)}}function z9(e){return function(t){e._._.a1(t)}}function B9(e){return function(t){P9(e._._,t||e._.f)}}function V9(e){return function(t){e._.g.some(e=>e.id===t.id)||E9(e._,[t,...e._.g]),N9(e._,!1),e._.a1(t.id)}}function H9(e){return function(){N9(e._,!1)}}function U9(e){return function(t){E9(e._,e._.g.map(e=>e.id===t.id?t:e))}}function W9(e){return function(){P9(e._,null)}}function G9(e){return function(){F9(e._,!1)}}function K9(e){return function(){N9(e._,!0),F9(e._,!1)}}function q9(e){return function(t){P9(e._,t.id),N9(e._,!1),F9(e._,!1)}}function J9(e){return function(t){O9(e._,t)}}function Y9(e){return function(t,n){F9(e._,!1),H(`/api/workspaces/${t.id}/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({agent:n})}).then(n=>{In(t.id,n.id),e._.a1(t.id)}).catch(t=>{I9(e._,`New session failed: ${String(t.message||t)}`)})}}function X9(e){return function(t){Pn(t.id),e._.a1(t.id)}}function Z9(e){return function(t){e._.a1(t.id)}}function Q9(e){return async t=>{e.g.find(e=>e.id===t)?.status===`archived`&&(await H(`/api/workspaces/${t}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({action:`restore`})}).catch(()=>{}),E9(e,e.g.map(e=>e.id===t?{...e,status:`active`}:e))),j9(e,t),N9(e,!1),P9(e,null),F9(e,!1),e.m.includes(t)||M9(e,e.m.concat(t)),Gn(t)}}function $9(e){return async()=>{try{let[t]=await Promise.all([H(`/api/workspaces`),Hn()]);if(E9(e,t),e.j){let n=new Set(t.filter(e=>e.status===`active`).map(e=>e.id));M9(e,e.m.filter(e=>n.has(e))),e.k&&!n.has(e.k)&&(j9(e,e.m[e.m?.length-1]||null),Gn(e.k))}else{let n=ree();n&&t.some(e=>e.id===n)&&(j9(e,n),M9(e,[n]))}Sre(e,!0)}catch(t){I9(e,`Loading workspaces failed: ${t.message||String(t)}`)}}}function Ore(e){return(t=!1)=>(e.x||=t,(e.y??=Rn(async()=>{let t=e.x;e.x=!1,D9(e,await H(`/api/status${t?`?fresh`:``}`))}))())}R(`b17`,L9),R(`b15`,R9),R(`b14`,z9),R(`b16`,B9),R(`b13`,V9),R(`b12`,H9),R(`b11`,U9),R(`b10`,W9),R(`b9`,G9),R(`b8`,K9),R(`b7`,q9),R(`b3`,J9),R(`b6`,Y9),R(`b5`,X9),R(`b4`,Z9),R(`b2`,Q9),R(`b0`,$9),R(`b1`,Ore),nt();export{t};
1615
+ //# sourceMappingURL=index-DQjYJ4v3.js.map