termdock 1.4.374 → 1.4.375

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 (3832) hide show
  1. package/dist/client/assets/AndroidMirrorView-B0Hw8vBw.js +3 -0
  2. package/dist/client/assets/AndroidMirrorView-B0Hw8vBw.js.br +0 -0
  3. package/dist/client/assets/AndroidMirrorView-B0Hw8vBw.js.gz +0 -0
  4. package/dist/client/assets/App-DkP7RyRM.js +188 -0
  5. package/dist/client/assets/App-DkP7RyRM.js.br +0 -0
  6. package/dist/client/assets/App-DkP7RyRM.js.gz +0 -0
  7. package/dist/client/assets/ArchitecturePanel-CIlGwqp0.js +9 -0
  8. package/dist/client/assets/ArchitecturePanel-CIlGwqp0.js.br +0 -0
  9. package/dist/client/assets/ArchitecturePanel-CIlGwqp0.js.gz +0 -0
  10. package/dist/client/assets/ChangeWalkthroughPanel-BI7Ftf2M.js +2 -0
  11. package/dist/client/assets/ChangeWalkthroughPanel-BI7Ftf2M.js.br +0 -0
  12. package/dist/client/assets/ChangeWalkthroughPanel-BI7Ftf2M.js.gz +0 -0
  13. package/dist/client/assets/ChatChartReference-Y2ZRKqz0.js +284 -0
  14. package/dist/client/assets/ChatChartReference-Y2ZRKqz0.js.br +0 -0
  15. package/dist/client/assets/ChatChartReference-Y2ZRKqz0.js.gz +0 -0
  16. package/dist/client/assets/ChatContextPreview-BopNrAfx.js +1 -0
  17. package/dist/client/assets/ChatContextPreview-BopNrAfx.js.br +0 -0
  18. package/dist/client/assets/ChatContextPreview-BopNrAfx.js.gz +0 -0
  19. package/dist/client/assets/ChatFullContent-B3LN4QNb.js +67 -0
  20. package/dist/client/assets/ChatFullContent-B3LN4QNb.js.br +0 -0
  21. package/dist/client/assets/ChatFullContent-B3LN4QNb.js.gz +0 -0
  22. package/dist/client/assets/ChatRichContent-C0rgTM6j.js +2 -0
  23. package/dist/client/assets/ChatRichContent-C0rgTM6j.js.br +0 -0
  24. package/dist/client/assets/ChatRichContent-C0rgTM6j.js.gz +0 -0
  25. package/dist/client/assets/ChatVideoPreviewDialog-Cwxx1BOM.js +1 -0
  26. package/dist/client/assets/ChatVideoPreviewDialog-Cwxx1BOM.js.br +0 -0
  27. package/dist/client/assets/ChatVideoPreviewDialog-Cwxx1BOM.js.gz +0 -0
  28. package/dist/client/assets/CollaborationMainWorkspace-IOHs2OUa.js +1 -0
  29. package/dist/client/assets/CollaborationMainWorkspace-IOHs2OUa.js.br +0 -0
  30. package/dist/client/assets/CollaborationMainWorkspace-IOHs2OUa.js.gz +0 -0
  31. package/dist/client/assets/CollaborationTaskContent-DbPQoriz.js +1 -0
  32. package/dist/client/assets/ComputerControlView-BXuNQUF2.js +6 -0
  33. package/dist/client/assets/ComputerControlView-BXuNQUF2.js.br +0 -0
  34. package/dist/client/assets/ComputerControlView-BXuNQUF2.js.gz +0 -0
  35. package/dist/client/assets/DagPlayground-Dd5Vgqa4.js +1 -0
  36. package/dist/client/assets/DagPlayground-Dd5Vgqa4.js.br +0 -0
  37. package/dist/client/assets/DagPlayground-Dd5Vgqa4.js.gz +0 -0
  38. package/dist/client/assets/DiffLab-BAVVXLOS.js +455 -0
  39. package/dist/client/assets/DiffLab-BAVVXLOS.js.br +0 -0
  40. package/dist/client/assets/DiffLab-BAVVXLOS.js.gz +0 -0
  41. package/dist/client/assets/DiffReview-BOTaz5gZ.js +1 -0
  42. package/dist/client/assets/DiffReview-BOTaz5gZ.js.br +0 -0
  43. package/dist/client/assets/DiffReview-BOTaz5gZ.js.gz +0 -0
  44. package/dist/client/assets/DiffReviewLab-CWJb4OGL.js +2 -0
  45. package/dist/client/assets/DiffReviewLab-CWJb4OGL.js.br +0 -0
  46. package/dist/client/assets/DiffReviewLab-CWJb4OGL.js.gz +0 -0
  47. package/dist/client/assets/DiffViewer-Beo85Ou6.js +34 -0
  48. package/dist/client/assets/DiffViewer-Beo85Ou6.js.br +0 -0
  49. package/dist/client/assets/DiffViewer-Beo85Ou6.js.gz +0 -0
  50. package/dist/client/assets/GitLoadingSkeleton-DHSkruhR.js +1 -0
  51. package/dist/client/assets/GitLoadingSkeleton-DHSkruhR.js.br +0 -0
  52. package/dist/client/assets/GitLoadingSkeleton-DHSkruhR.js.gz +0 -0
  53. package/dist/client/assets/Markdown-CoYnDmB-.js +23 -0
  54. package/dist/client/assets/Markdown-CoYnDmB-.js.br +0 -0
  55. package/dist/client/assets/Markdown-CoYnDmB-.js.gz +0 -0
  56. package/dist/client/assets/MarkdownPreview-COxwQyqc.js +1 -0
  57. package/dist/client/assets/MarkdownPreview-COxwQyqc.js.br +0 -0
  58. package/dist/client/assets/MarkdownPreview-COxwQyqc.js.gz +0 -0
  59. package/dist/client/assets/ModelPreview-JqWADsgm.js +4112 -0
  60. package/dist/client/assets/ModelPreview-JqWADsgm.js.br +0 -0
  61. package/dist/client/assets/ModelPreview-JqWADsgm.js.gz +0 -0
  62. package/dist/client/assets/RecordingSaveDialog-cvqqrTqB.js +1 -0
  63. package/dist/client/assets/RecordingSaveDialog-cvqqrTqB.js.br +0 -0
  64. package/dist/client/assets/RecordingSaveDialog-cvqqrTqB.js.gz +0 -0
  65. package/dist/client/assets/RightSidebar-Ce1XCRqq.js +1729 -0
  66. package/dist/client/assets/RightSidebar-Ce1XCRqq.js.br +0 -0
  67. package/dist/client/assets/RightSidebar-Ce1XCRqq.js.gz +0 -0
  68. package/dist/client/assets/SessionChatView-cJA6rkOk.js +38 -0
  69. package/dist/client/assets/SessionChatView-cJA6rkOk.js.br +0 -0
  70. package/dist/client/assets/SessionChatView-cJA6rkOk.js.gz +0 -0
  71. package/dist/client/assets/SessionResourceSidebar-B_gGudIu.js +2 -0
  72. package/dist/client/assets/SessionResourceSidebar-B_gGudIu.js.br +0 -0
  73. package/dist/client/assets/SessionResourceSidebar-B_gGudIu.js.gz +0 -0
  74. package/dist/client/assets/TodoWorkspace-DY8rk2sf.js +1 -0
  75. package/dist/client/assets/TodoWorkspace-DY8rk2sf.js.br +0 -0
  76. package/dist/client/assets/TodoWorkspace-DY8rk2sf.js.gz +0 -0
  77. package/dist/client/assets/VideoPreviewPlayer-CXBOaNi_.js +1 -0
  78. package/dist/client/assets/VideoPreviewPlayer-CXBOaNi_.js.br +0 -0
  79. package/dist/client/assets/VideoPreviewPlayer-CXBOaNi_.js.gz +0 -0
  80. package/dist/client/assets/a-arrow-down-XgQ9uFvO.js +1 -0
  81. package/dist/client/assets/a-arrow-up-Dknr87gM.js +1 -0
  82. package/dist/client/assets/a-large-small-DPsFTSYM.js +1 -0
  83. package/dist/client/assets/abnfDiagram-VCTEODGH-ChpjjbX7.js +1 -0
  84. package/dist/client/assets/abnfDiagram-VCTEODGH-ChpjjbX7.js.br +0 -0
  85. package/dist/client/assets/abnfDiagram-VCTEODGH-ChpjjbX7.js.gz +0 -0
  86. package/dist/client/assets/accessibility-D3kwjnQG.js +1 -0
  87. package/dist/client/assets/activity-BT52tNHN.js +1 -0
  88. package/dist/client/assets/air-vent-BwarjSpT.js +1 -0
  89. package/dist/client/assets/airplay-B9xxO6Or.js +1 -0
  90. package/dist/client/assets/alarm-clock-XiDt0Fwm.js +1 -0
  91. package/dist/client/assets/alarm-clock-check-CXPBktw5.js +1 -0
  92. package/dist/client/assets/alarm-clock-minus-Dkmbjcnl.js +1 -0
  93. package/dist/client/assets/alarm-clock-off-DtZxYtC2.js +1 -0
  94. package/dist/client/assets/alarm-clock-plus-Bpm4KkHQ.js +1 -0
  95. package/dist/client/assets/alarm-smoke-DRVqGuKs.js +1 -0
  96. package/dist/client/assets/album-DG0MnK9T.js +1 -0
  97. package/dist/client/assets/align-center-horizontal-Do9_rngR.js +1 -0
  98. package/dist/client/assets/align-center-vertical-VsuEqpE1.js +1 -0
  99. package/dist/client/assets/align-end-horizontal-CsIUylvI.js +1 -0
  100. package/dist/client/assets/align-end-vertical-CIjM4axw.js +1 -0
  101. package/dist/client/assets/align-horizontal-distribute-center-q-yDjrP0.js +1 -0
  102. package/dist/client/assets/align-horizontal-distribute-end-RunDX1sT.js +1 -0
  103. package/dist/client/assets/align-horizontal-distribute-start-Ci23dKMN.js +1 -0
  104. package/dist/client/assets/align-horizontal-justify-center-BNu8jfB3.js +1 -0
  105. package/dist/client/assets/align-horizontal-justify-end-ByGNCmzD.js +1 -0
  106. package/dist/client/assets/align-horizontal-justify-start-Dexxv4Rw.js +1 -0
  107. package/dist/client/assets/align-horizontal-space-around-BAv9Z1Ts.js +1 -0
  108. package/dist/client/assets/align-horizontal-space-between-CCHNAfV-.js +1 -0
  109. package/dist/client/assets/align-start-horizontal-Dx2AdWyO.js +1 -0
  110. package/dist/client/assets/align-start-vertical-Cz_TVa5F.js +1 -0
  111. package/dist/client/assets/align-vertical-distribute-center-CWX6V8EV.js +1 -0
  112. package/dist/client/assets/align-vertical-distribute-end-BTCVBfoh.js +1 -0
  113. package/dist/client/assets/align-vertical-distribute-start-DsncEpYA.js +1 -0
  114. package/dist/client/assets/align-vertical-justify-center-BopFok-b.js +1 -0
  115. package/dist/client/assets/align-vertical-justify-end-DgYftQq2.js +1 -0
  116. package/dist/client/assets/align-vertical-justify-start-Cf4z0q1H.js +1 -0
  117. package/dist/client/assets/align-vertical-space-around-DBP5LWtq.js +1 -0
  118. package/dist/client/assets/align-vertical-space-between-Cfw-dA_o.js +1 -0
  119. package/dist/client/assets/ambulance-DeyKDsIH.js +1 -0
  120. package/dist/client/assets/ampersand-Df1t8sYC.js +1 -0
  121. package/dist/client/assets/ampersands-CkEd7iXo.js +1 -0
  122. package/dist/client/assets/amphora-BU96vE9a.js +1 -0
  123. package/dist/client/assets/anchor-Dz6PP7PC.js +1 -0
  124. package/dist/client/assets/angry-YN5-C1YT.js +1 -0
  125. package/dist/client/assets/annoyed-CTmZ0Ngz.js +1 -0
  126. package/dist/client/assets/antenna-1nlMWPYS.js +1 -0
  127. package/dist/client/assets/anvil-PwJZKUr6.js +1 -0
  128. package/dist/client/assets/aperture-91G2b9e7.js +1 -0
  129. package/dist/client/assets/app-window-C5uAHEFz.js +1 -0
  130. package/dist/client/assets/app-window-mac-BRdzXuuc.js +1 -0
  131. package/dist/client/assets/app-x3GyQcok.js +37 -0
  132. package/dist/client/assets/app-x3GyQcok.js.br +0 -0
  133. package/dist/client/assets/app-x3GyQcok.js.gz +0 -0
  134. package/dist/client/assets/apple-DKoGAlvV.js +1 -0
  135. package/dist/client/assets/architectureDiagram-5GKGNRK7-8Xekac2v.js +36 -0
  136. package/dist/client/assets/architectureDiagram-5GKGNRK7-8Xekac2v.js.br +0 -0
  137. package/dist/client/assets/architectureDiagram-5GKGNRK7-8Xekac2v.js.gz +0 -0
  138. package/dist/client/assets/archive-PbhwntiN.js +1 -0
  139. package/dist/client/assets/archive-restore-DOWQ34qY.js +1 -0
  140. package/dist/client/assets/archive-x-BQaOooOI.js +1 -0
  141. package/dist/client/assets/armchair-DBMnuwrQ.js +1 -0
  142. package/dist/client/assets/arrow-big-down-CmwQscLx.js +1 -0
  143. package/dist/client/assets/arrow-big-down-dash-C2wjfOc3.js +1 -0
  144. package/dist/client/assets/arrow-big-left-DNjQGeCf.js +1 -0
  145. package/dist/client/assets/arrow-big-left-dash-CZQTeeGo.js +1 -0
  146. package/dist/client/assets/arrow-big-right-BeWe8H98.js +1 -0
  147. package/dist/client/assets/arrow-big-right-dash-Cpo74x7t.js +1 -0
  148. package/dist/client/assets/arrow-big-up-BCWHnFQd.js +1 -0
  149. package/dist/client/assets/arrow-big-up-dash-CszEeFN4.js +1 -0
  150. package/dist/client/assets/arrow-down-0-1-BkJOFc6o.js +1 -0
  151. package/dist/client/assets/arrow-down-1-0-DejNiLs8.js +1 -0
  152. package/dist/client/assets/arrow-down-CDEtdEWy.js +1 -0
  153. package/dist/client/assets/arrow-down-from-line-y5DGPmbO.js +1 -0
  154. package/dist/client/assets/arrow-down-left-CE3XpXnr.js +1 -0
  155. package/dist/client/assets/arrow-down-narrow-wide-CGFsp4yN.js +1 -0
  156. package/dist/client/assets/arrow-down-right-Ci2B4MQ_.js +1 -0
  157. package/dist/client/assets/arrow-down-to-dot-D7tBnxWi.js +1 -0
  158. package/dist/client/assets/arrow-down-to-line-BFSxgAUU.js +1 -0
  159. package/dist/client/assets/arrow-down-up-aw5OTDLv.js +1 -0
  160. package/dist/client/assets/arrow-down-wide-narrow-DCuqiSW1.js +1 -0
  161. package/dist/client/assets/arrow-down-z-a-D2SryReD.js +1 -0
  162. package/dist/client/assets/arrow-left-from-line-BAUgMY9V.js +1 -0
  163. package/dist/client/assets/arrow-left-right-CCyy0FrC.js +1 -0
  164. package/dist/client/assets/arrow-left-to-line-P14XNRPG.js +1 -0
  165. package/dist/client/assets/arrow-right-from-line-DPewreaK.js +1 -0
  166. package/dist/client/assets/arrow-right-left-CrPBKE8c.js +1 -0
  167. package/dist/client/assets/arrow-right-to-line-BgNCCQS5.js +1 -0
  168. package/dist/client/assets/arrow-up-0-1-qBNt2uW0.js +1 -0
  169. package/dist/client/assets/arrow-up-1-0-DZuvmpRw.js +1 -0
  170. package/dist/client/assets/arrow-up-a-z-CkYzSCxl.js +1 -0
  171. package/dist/client/assets/arrow-up-down-DGGnhxLs.js +1 -0
  172. package/dist/client/assets/arrow-up-from-dot-CE0bkrDi.js +1 -0
  173. package/dist/client/assets/arrow-up-from-line-BJor9MsW.js +1 -0
  174. package/dist/client/assets/arrow-up-left-Bm857_lU.js +1 -0
  175. package/dist/client/assets/arrow-up-narrow-wide-BsNGUE3E.js +1 -0
  176. package/dist/client/assets/arrow-up-to-line-mV-8IupI.js +1 -0
  177. package/dist/client/assets/arrow-up-wide-narrow-BKdR7Cnm.js +1 -0
  178. package/dist/client/assets/arrow-up-z-a-BUFfMJ1p.js +1 -0
  179. package/dist/client/assets/arrows-up-from-line-D9zH0N0O.js +1 -0
  180. package/dist/client/assets/asterisk-DkxdrPNu.js +1 -0
  181. package/dist/client/assets/astroid-YwZtITD7.js +1 -0
  182. package/dist/client/assets/atom-CIgBlCEf.js +1 -0
  183. package/dist/client/assets/audio-lines-CE5Fq0hQ.js +1 -0
  184. package/dist/client/assets/audio-waveform-Hjryn8d5.js +1 -0
  185. package/dist/client/assets/award-6a8LJnEi.js +1 -0
  186. package/dist/client/assets/axe-CGe2Mijm.js +1 -0
  187. package/dist/client/assets/axis-3d-CVMkl-m-.js +1 -0
  188. package/dist/client/assets/baby-BvpgZEaQ.js +1 -0
  189. package/dist/client/assets/backpack-C3g6b8oH.js +1 -0
  190. package/dist/client/assets/badge-DFJufIWj.js +1 -0
  191. package/dist/client/assets/badge-alert-U3XN96Al.js +1 -0
  192. package/dist/client/assets/badge-cent-CCi44nGO.js +1 -0
  193. package/dist/client/assets/badge-check-BjKBC9a7.js +1 -0
  194. package/dist/client/assets/badge-dollar-sign-DSVxuRrv.js +1 -0
  195. package/dist/client/assets/badge-euro-Db2Vzgb2.js +1 -0
  196. package/dist/client/assets/badge-indian-rupee-BCYzch3j.js +1 -0
  197. package/dist/client/assets/badge-info-D8nV2ZaZ.js +1 -0
  198. package/dist/client/assets/badge-japanese-yen-Cxl6akiT.js +1 -0
  199. package/dist/client/assets/badge-minus-DQLn33ov.js +1 -0
  200. package/dist/client/assets/badge-percent-ia197CW_.js +1 -0
  201. package/dist/client/assets/badge-plus-Bl7i6GzJ.js +1 -0
  202. package/dist/client/assets/badge-pound-sterling-CHj61hQd.js +1 -0
  203. package/dist/client/assets/badge-question-mark-DuOZhaoU.js +1 -0
  204. package/dist/client/assets/badge-russian-ruble-BaAlrg13.js +1 -0
  205. package/dist/client/assets/badge-swiss-franc-CyVNpmP0.js +1 -0
  206. package/dist/client/assets/badge-turkish-lira-BWNgg5Up.js +1 -0
  207. package/dist/client/assets/badge-x-Bmeci0-T.js +1 -0
  208. package/dist/client/assets/baggage-claim-Cjj3OWob.js +1 -0
  209. package/dist/client/assets/balloon-i5qPGBgS.js +1 -0
  210. package/dist/client/assets/ban-YTuH_fDS.js +1 -0
  211. package/dist/client/assets/banana-Cv74B8yC.js +1 -0
  212. package/dist/client/assets/bandage-C8EdkCX0.js +1 -0
  213. package/dist/client/assets/banknote-CD0yyL1e.js +1 -0
  214. package/dist/client/assets/banknote-arrow-down-DH6lKfjT.js +1 -0
  215. package/dist/client/assets/banknote-arrow-up-B2z-x8lW.js +1 -0
  216. package/dist/client/assets/banknote-x-DAaIJSu7.js +1 -0
  217. package/dist/client/assets/barcode-CnW5FK0F.js +1 -0
  218. package/dist/client/assets/barrel-gOSWt2Bu.js +1 -0
  219. package/dist/client/assets/baseline-CjSlQqn7.js +1 -0
  220. package/dist/client/assets/bath-em-x7HWN.js +1 -0
  221. package/dist/client/assets/battery-BWrR12hf.js +1 -0
  222. package/dist/client/assets/battery-charging-tNbPhfgQ.js +1 -0
  223. package/dist/client/assets/battery-full-DFt1hBZl.js +1 -0
  224. package/dist/client/assets/battery-low-DG53LcHm.js +1 -0
  225. package/dist/client/assets/battery-medium-C18Mr3sT.js +1 -0
  226. package/dist/client/assets/battery-plus-Bnb7wHJe.js +1 -0
  227. package/dist/client/assets/battery-warning--9a8bhxx.js +1 -0
  228. package/dist/client/assets/beaker-Dz-E83uX.js +1 -0
  229. package/dist/client/assets/bean-DU0aJqHH.js +1 -0
  230. package/dist/client/assets/bean-off-CgM5zBGX.js +1 -0
  231. package/dist/client/assets/bed-B34T2dql.js +1 -0
  232. package/dist/client/assets/bed-double-D4pjHOZ9.js +1 -0
  233. package/dist/client/assets/bed-single-D8LNZv5x.js +1 -0
  234. package/dist/client/assets/beef-CLIjxrL2.js +1 -0
  235. package/dist/client/assets/beef-off-CJrMeqVq.js +1 -0
  236. package/dist/client/assets/beer-BQXjKDQY.js +1 -0
  237. package/dist/client/assets/beer-off-CaiHNf6t.js +1 -0
  238. package/dist/client/assets/bell-CQHNQDrd.js +1 -0
  239. package/dist/client/assets/bell-check-6iZmPbbb.js +1 -0
  240. package/dist/client/assets/bell-electric-C35cBmG0.js +1 -0
  241. package/dist/client/assets/bell-minus-zz0eO5r8.js +1 -0
  242. package/dist/client/assets/bell-off-CgTGMv56.js +1 -0
  243. package/dist/client/assets/bell-plus-HS9FUb2b.js +1 -0
  244. package/dist/client/assets/bell-ring-V3kgAnpD.js +1 -0
  245. package/dist/client/assets/between-horizontal-end-CsgcW_wR.js +1 -0
  246. package/dist/client/assets/between-horizontal-start-BJbV6xwD.js +1 -0
  247. package/dist/client/assets/between-vertical-end-CUa_4j0H.js +1 -0
  248. package/dist/client/assets/between-vertical-start-BOP3oCJ9.js +1 -0
  249. package/dist/client/assets/biceps-flexed-D3cTtLqS.js +1 -0
  250. package/dist/client/assets/bike-D5e1eGUS.js +1 -0
  251. package/dist/client/assets/binary-D5OaCzmf.js +1 -0
  252. package/dist/client/assets/binoculars-DQZfChs0.js +1 -0
  253. package/dist/client/assets/biohazard-DhP_dLXD.js +1 -0
  254. package/dist/client/assets/bird-BRMEkWFL.js +1 -0
  255. package/dist/client/assets/birdhouse-Dn3TPZ4K.js +1 -0
  256. package/dist/client/assets/bitcoin-CBKOKrFr.js +1 -0
  257. package/dist/client/assets/blend-DZuAwKqL.js +1 -0
  258. package/dist/client/assets/blender-DMsN_tpg.js +1 -0
  259. package/dist/client/assets/blinds-BJ8CM96J.js +1 -0
  260. package/dist/client/assets/blockDiagram-I7D4REHJ-BC3Qtitu.js +129 -0
  261. package/dist/client/assets/blockDiagram-I7D4REHJ-BC3Qtitu.js.br +0 -0
  262. package/dist/client/assets/blockDiagram-I7D4REHJ-BC3Qtitu.js.gz +0 -0
  263. package/dist/client/assets/blocks-BHUThDby.js +1 -0
  264. package/dist/client/assets/bluetooth-BPYnKvZe.js +1 -0
  265. package/dist/client/assets/bluetooth-connected-Dbly3v7w.js +1 -0
  266. package/dist/client/assets/bluetooth-off-CFk4RZRA.js +1 -0
  267. package/dist/client/assets/bluetooth-searching-I5-zTqKY.js +1 -0
  268. package/dist/client/assets/bold-SlTpqmau.js +1 -0
  269. package/dist/client/assets/bolt-B2QvCXyB.js +1 -0
  270. package/dist/client/assets/bomb-1vSY5xR4.js +1 -0
  271. package/dist/client/assets/bone-CKnO4q6t.js +1 -0
  272. package/dist/client/assets/book-CDNFISHi.js +1 -0
  273. package/dist/client/assets/book-a-XAmuM0Be.js +1 -0
  274. package/dist/client/assets/book-alert-B6kEWt6V.js +1 -0
  275. package/dist/client/assets/book-audio-frpkUqzT.js +1 -0
  276. package/dist/client/assets/book-check-DfWbA2kT.js +1 -0
  277. package/dist/client/assets/book-copy-L5YNNO4B.js +1 -0
  278. package/dist/client/assets/book-dashed-CdeiPMr9.js +1 -0
  279. package/dist/client/assets/book-down-BZGqYlNJ.js +1 -0
  280. package/dist/client/assets/book-headphones-BKg0TZzv.js +1 -0
  281. package/dist/client/assets/book-heart-7e48OOYP.js +1 -0
  282. package/dist/client/assets/book-image-Cs0tq3zd.js +1 -0
  283. package/dist/client/assets/book-key-FdLMt7JI.js +1 -0
  284. package/dist/client/assets/book-lock-BfLfy-0k.js +1 -0
  285. package/dist/client/assets/book-marked-EVGmHjCc.js +1 -0
  286. package/dist/client/assets/book-minus-rHYi7CPV.js +1 -0
  287. package/dist/client/assets/book-open-check-CQLxXf-u.js +1 -0
  288. package/dist/client/assets/book-open-phJ8F6Xm.js +1 -0
  289. package/dist/client/assets/book-open-text-D9Nzgctt.js +1 -0
  290. package/dist/client/assets/book-plus-BeUp_nyO.js +1 -0
  291. package/dist/client/assets/book-search-rwX59ylf.js +1 -0
  292. package/dist/client/assets/book-text-BykkwtLx.js +1 -0
  293. package/dist/client/assets/book-type-CKHKkt8k.js +1 -0
  294. package/dist/client/assets/book-up-2-Cx02N-Zl.js +1 -0
  295. package/dist/client/assets/book-up-DgnkT7nx.js +1 -0
  296. package/dist/client/assets/book-user-BMNEr8Tk.js +1 -0
  297. package/dist/client/assets/book-x-CqER94AK.js +1 -0
  298. package/dist/client/assets/bookmark-OfWnPk9Q.js +1 -0
  299. package/dist/client/assets/bookmark-check-o9EKO9SQ.js +1 -0
  300. package/dist/client/assets/bookmark-minus-D0kfHS0B.js +1 -0
  301. package/dist/client/assets/bookmark-off-DgK3EZWt.js +1 -0
  302. package/dist/client/assets/bookmark-plus-Cmz8O0gQ.js +1 -0
  303. package/dist/client/assets/bookmark-x-Bl31Gf1G.js +1 -0
  304. package/dist/client/assets/boom-box-BkwLKdsS.js +1 -0
  305. package/dist/client/assets/bot-message-square-DQSENKAv.js +1 -0
  306. package/dist/client/assets/bot-off-Brye8bsn.js +1 -0
  307. package/dist/client/assets/bottle-wine-7KoFTUTU.js +1 -0
  308. package/dist/client/assets/bow-arrow-B4aYBVWQ.js +1 -0
  309. package/dist/client/assets/boxes-B6vUZvp2.js +1 -0
  310. package/dist/client/assets/braces-BjLJ3H0J.js +1 -0
  311. package/dist/client/assets/brackets-hIHsTj32.js +1 -0
  312. package/dist/client/assets/brain-CfHHLRbb.js +1 -0
  313. package/dist/client/assets/brain-circuit-DP_MW3Q4.js +1 -0
  314. package/dist/client/assets/brain-cog-A8413U46.js +1 -0
  315. package/dist/client/assets/brain-cog-A8413U46.js.br +0 -0
  316. package/dist/client/assets/brain-cog-A8413U46.js.gz +0 -0
  317. package/dist/client/assets/brick-wall-D14s9EoF.js +1 -0
  318. package/dist/client/assets/brick-wall-fire-B5AyWoPQ.js +1 -0
  319. package/dist/client/assets/brick-wall-shield-HP-93dvf.js +1 -0
  320. package/dist/client/assets/briefcase-business-CjHIXs73.js +1 -0
  321. package/dist/client/assets/briefcase-conveyor-belt-BbtuSpji.js +1 -0
  322. package/dist/client/assets/briefcase-medical-CufNPExC.js +1 -0
  323. package/dist/client/assets/bring-to-front-Dl3BJk1b.js +1 -0
  324. package/dist/client/assets/broccoli-BArR-YmO.js +1 -0
  325. package/dist/client/assets/brush-BzE_8ER7.js +1 -0
  326. package/dist/client/assets/brush-cleaning-DH9Lweyp.js +1 -0
  327. package/dist/client/assets/bubbles-Dp8bVlm1.js +1 -0
  328. package/dist/client/assets/bug-DS3FkyjK.js +1 -0
  329. package/dist/client/assets/bug-off-BJ1_bgeL.js +1 -0
  330. package/dist/client/assets/bug-play-DjheBA2C.js +1 -0
  331. package/dist/client/assets/building-2-BemXN0wI.js +1 -0
  332. package/dist/client/assets/building-nOpNDlSe.js +1 -0
  333. package/dist/client/assets/bus-DYHroTL2.js +1 -0
  334. package/dist/client/assets/bus-front-DIeat9XB.js +1 -0
  335. package/dist/client/assets/c4Diagram-7LVT6UL2-BwZ5DlPu.js +38 -0
  336. package/dist/client/assets/c4Diagram-7LVT6UL2-BwZ5DlPu.js.br +0 -0
  337. package/dist/client/assets/c4Diagram-7LVT6UL2-BwZ5DlPu.js.gz +0 -0
  338. package/dist/client/assets/cable-CRR37yVI.js +1 -0
  339. package/dist/client/assets/cable-car-B0c2bvy9.js +1 -0
  340. package/dist/client/assets/cake-f56PK9Ld.js +1 -0
  341. package/dist/client/assets/cake-slice-DdBmHu-U.js +1 -0
  342. package/dist/client/assets/calculator-D3cjNffB.js +1 -0
  343. package/dist/client/assets/calendar-1-DzOsmHOQ.js +1 -0
  344. package/dist/client/assets/calendar-KAaNu5d3.js +1 -0
  345. package/dist/client/assets/calendar-arrow-down-Dg8W7Oks.js +1 -0
  346. package/dist/client/assets/calendar-arrow-up-CChhcQ0r.js +1 -0
  347. package/dist/client/assets/calendar-check-2-1vm_eoag.js +1 -0
  348. package/dist/client/assets/calendar-check-CJUPdpRk.js +1 -0
  349. package/dist/client/assets/calendar-clock-CdYGi3vx.js +1 -0
  350. package/dist/client/assets/calendar-cog-C-TzML8X.js +1 -0
  351. package/dist/client/assets/calendar-days-BYq1-JsE.js +1 -0
  352. package/dist/client/assets/calendar-fold-EXttAr9e.js +1 -0
  353. package/dist/client/assets/calendar-heart-yxAjM2K7.js +1 -0
  354. package/dist/client/assets/calendar-minus-2-HJtwEHu_.js +1 -0
  355. package/dist/client/assets/calendar-minus-BoIiYqA3.js +1 -0
  356. package/dist/client/assets/calendar-off-BXOap5-0.js +1 -0
  357. package/dist/client/assets/calendar-plus-2-Z39U_Smz.js +1 -0
  358. package/dist/client/assets/calendar-plus-TUSEaZXb.js +1 -0
  359. package/dist/client/assets/calendar-range-Jjx2QRVh.js +1 -0
  360. package/dist/client/assets/calendar-search-BL4sUHe5.js +1 -0
  361. package/dist/client/assets/calendar-sync-Br2TInD3.js +1 -0
  362. package/dist/client/assets/calendar-x-2-BGdEp8c9.js +1 -0
  363. package/dist/client/assets/calendar-x-Bq8775_K.js +1 -0
  364. package/dist/client/assets/calendars-BQaWZhsG.js +1 -0
  365. package/dist/client/assets/camera-Bxzjhlyy.js +1 -0
  366. package/dist/client/assets/camera-off-3XrLH_6a.js +1 -0
  367. package/dist/client/assets/candy-DXJcI_XB.js +1 -0
  368. package/dist/client/assets/candy-cane-CzkM4Kel.js +1 -0
  369. package/dist/client/assets/candy-off-CydX_MC6.js +1 -0
  370. package/dist/client/assets/cannabis-Dee79g4C.js +1 -0
  371. package/dist/client/assets/cannabis-off-Bk43CJlq.js +1 -0
  372. package/dist/client/assets/captions-CtaKVxfq.js +1 -0
  373. package/dist/client/assets/captions-off-9mKgd_H_.js +1 -0
  374. package/dist/client/assets/car-front-CzSDGgzE.js +1 -0
  375. package/dist/client/assets/car-jeqT8MX3.js +1 -0
  376. package/dist/client/assets/car-taxi-front-D2Y3KUEq.js +1 -0
  377. package/dist/client/assets/caravan-BEyG4cXZ.js +1 -0
  378. package/dist/client/assets/card-sim-92u0LrmC.js +1 -0
  379. package/dist/client/assets/carrot-_aZH6dpD.js +1 -0
  380. package/dist/client/assets/case-lower-fQDUTfRv.js +1 -0
  381. package/dist/client/assets/case-sensitive--cER3KyS.js +1 -0
  382. package/dist/client/assets/case-upper-BGfZCp4C.js +1 -0
  383. package/dist/client/assets/cassette-tape-DZXPdO_a.js +1 -0
  384. package/dist/client/assets/cast-nYgcJDeb.js +1 -0
  385. package/dist/client/assets/castle-gdB9kTzY.js +1 -0
  386. package/dist/client/assets/cat-4pg-4n1T.js +1 -0
  387. package/dist/client/assets/cctv-BR2i98Du.js +1 -0
  388. package/dist/client/assets/cctv-off-DBUnsZi6.js +1 -0
  389. package/dist/client/assets/channel-DBtU3GqF.js +1 -0
  390. package/dist/client/assets/chart-area-Dhbl1iHh.js +1 -0
  391. package/dist/client/assets/chart-bar-EcJZJcP4.js +1 -0
  392. package/dist/client/assets/chart-bar-big-BYV1-zpe.js +1 -0
  393. package/dist/client/assets/chart-bar-decreasing-CeNpxYUg.js +1 -0
  394. package/dist/client/assets/chart-bar-increasing-ugaTrltM.js +1 -0
  395. package/dist/client/assets/chart-bar-stacked-g6dEAbEO.js +1 -0
  396. package/dist/client/assets/chart-candlestick-D9KCT2da.js +1 -0
  397. package/dist/client/assets/chart-column-CoB25wby.js +1 -0
  398. package/dist/client/assets/chart-column-big-CYNLA_tZ.js +1 -0
  399. package/dist/client/assets/chart-column-decreasing-BaAEwnpw.js +1 -0
  400. package/dist/client/assets/chart-column-increasing-B6B8pkMq.js +1 -0
  401. package/dist/client/assets/chart-column-stacked-B8I6NI6T.js +1 -0
  402. package/dist/client/assets/chart-gantt-B1GS5V3C.js +1 -0
  403. package/dist/client/assets/chart-line-D3xzzQy8.js +1 -0
  404. package/dist/client/assets/chart-network-Bjag_hPK.js +1 -0
  405. package/dist/client/assets/chart-no-axes-column-Cho4s_DO.js +1 -0
  406. package/dist/client/assets/chart-no-axes-column-decreasing-81_ORRCG.js +1 -0
  407. package/dist/client/assets/chart-no-axes-column-increasing-DOLcBcqs.js +1 -0
  408. package/dist/client/assets/chart-no-axes-combined-1-rIbZs7.js +1 -0
  409. package/dist/client/assets/chart-no-axes-gantt-Bv-2glsD.js +1 -0
  410. package/dist/client/assets/chart-pie-CTkuBniK.js +1 -0
  411. package/dist/client/assets/chart-scatter-D0kVQJrp.js +1 -0
  412. package/dist/client/assets/chart-spline-BxGyi1QN.js +1 -0
  413. package/dist/client/assets/check-check-BNVCHVlY.js +1 -0
  414. package/dist/client/assets/check-line-0onAK0Fi.js +1 -0
  415. package/dist/client/assets/chef-hat-DEoodV63.js +1 -0
  416. package/dist/client/assets/cherry-C4eD4ZMo.js +1 -0
  417. package/dist/client/assets/chess-bishop-JrJmkb-a.js +1 -0
  418. package/dist/client/assets/chess-king-nzk_39lb.js +1 -0
  419. package/dist/client/assets/chess-knight-BSwhlibT.js +1 -0
  420. package/dist/client/assets/chess-pawn-D0JQc1qn.js +1 -0
  421. package/dist/client/assets/chess-queen-B1elDR_4.js +1 -0
  422. package/dist/client/assets/chess-rook-Bjm_McVb.js +1 -0
  423. package/dist/client/assets/chevron-first-a7hJygee.js +1 -0
  424. package/dist/client/assets/chevron-last-W3Foqs6n.js +1 -0
  425. package/dist/client/assets/chevron-left-T59bhjJp.js +1 -0
  426. package/dist/client/assets/chevrons-down-DjGQbOHO.js +1 -0
  427. package/dist/client/assets/chevrons-down-up-kgpnFL1P.js +1 -0
  428. package/dist/client/assets/chevrons-left-D63rk3xW.js +1 -0
  429. package/dist/client/assets/chevrons-left-right-7Tu-rXeD.js +1 -0
  430. package/dist/client/assets/chevrons-left-right-ellipsis-X7vz4GzY.js +1 -0
  431. package/dist/client/assets/chevrons-right-BHTNnx8u.js +1 -0
  432. package/dist/client/assets/chevrons-right-left-b0AOS-WL.js +1 -0
  433. package/dist/client/assets/chevrons-up-BNR_yaPq.js +1 -0
  434. package/dist/client/assets/chevrons-up-down-BJUlqV7V.js +1 -0
  435. package/dist/client/assets/chunk-2Q5K7J3B-1xdic9C_.js +1 -0
  436. package/dist/client/assets/chunk-5VM5RSS4-D0j29IE6.js +15 -0
  437. package/dist/client/assets/chunk-F27PBJKO-CEE6F4iF.js +1 -0
  438. package/dist/client/assets/chunk-F27PBJKO-CEE6F4iF.js.br +0 -0
  439. package/dist/client/assets/chunk-F27PBJKO-CEE6F4iF.js.gz +0 -0
  440. package/dist/client/assets/chunk-IMKFNOWR-Cj28GqWY.js +231 -0
  441. package/dist/client/assets/chunk-IMKFNOWR-Cj28GqWY.js.br +0 -0
  442. package/dist/client/assets/chunk-IMKFNOWR-Cj28GqWY.js.gz +0 -0
  443. package/dist/client/assets/chunk-JWPE2WC7-cY-UEXBd.js +1 -0
  444. package/dist/client/assets/chunk-POPQ4Y6H-D1woUCuU.js +1 -0
  445. package/dist/client/assets/chunk-SVP7TREG-BM-sgDpG.js +88 -0
  446. package/dist/client/assets/chunk-SVP7TREG-BM-sgDpG.js.br +0 -0
  447. package/dist/client/assets/chunk-SVP7TREG-BM-sgDpG.js.gz +0 -0
  448. package/dist/client/assets/chunk-TICWLB2K-sOMH-g7h.js +206 -0
  449. package/dist/client/assets/chunk-TICWLB2K-sOMH-g7h.js.br +0 -0
  450. package/dist/client/assets/chunk-TICWLB2K-sOMH-g7h.js.gz +0 -0
  451. package/dist/client/assets/chunk-XXDRQBXY-CkKSEWgg.js +1 -0
  452. package/dist/client/assets/church-BkmV_oMm.js +1 -0
  453. package/dist/client/assets/cigarette-TSzxzn_S.js +1 -0
  454. package/dist/client/assets/cigarette-off-DEQfmuJk.js +1 -0
  455. package/dist/client/assets/circle-BZgtRXHQ.js +1 -0
  456. package/dist/client/assets/circle-arrow-down-CLp0g_WH.js +1 -0
  457. package/dist/client/assets/circle-arrow-left-yPoEDfvK.js +1 -0
  458. package/dist/client/assets/circle-arrow-out-down-left-Bx4LF0SY.js +1 -0
  459. package/dist/client/assets/circle-arrow-out-down-right-COD-nYbp.js +1 -0
  460. package/dist/client/assets/circle-arrow-out-up-left-y4YPDfIR.js +1 -0
  461. package/dist/client/assets/circle-arrow-out-up-right-BxjFycqf.js +1 -0
  462. package/dist/client/assets/circle-arrow-right-Cfk2BRFt.js +1 -0
  463. package/dist/client/assets/circle-arrow-up-Du0im-Q1.js +1 -0
  464. package/dist/client/assets/circle-check-big-WfwtaQj4.js +1 -0
  465. package/dist/client/assets/circle-chevron-down-DLjWifM_.js +1 -0
  466. package/dist/client/assets/circle-chevron-left-BEDlmJTO.js +1 -0
  467. package/dist/client/assets/circle-chevron-right-DmnvIwDt.js +1 -0
  468. package/dist/client/assets/circle-chevron-up-B5981_U_.js +1 -0
  469. package/dist/client/assets/circle-dashed-BCL8axnc.js +1 -0
  470. package/dist/client/assets/circle-divide-PqjjIU8T.js +1 -0
  471. package/dist/client/assets/circle-dollar-sign-BPU9Xfkd.js +1 -0
  472. package/dist/client/assets/circle-dot-HSo9_QJM.js +1 -0
  473. package/dist/client/assets/circle-dot-dashed-W1FUrkHy.js +1 -0
  474. package/dist/client/assets/circle-ellipsis-CxgoBKa4.js +1 -0
  475. package/dist/client/assets/circle-equal-DIfAvY4R.js +1 -0
  476. package/dist/client/assets/circle-fading-arrow-up-C-q_mVNL.js +1 -0
  477. package/dist/client/assets/circle-fading-plus-DQQgudDq.js +1 -0
  478. package/dist/client/assets/circle-gauge-CpjmUqys.js +1 -0
  479. package/dist/client/assets/circle-minus-_6L8Brua.js +1 -0
  480. package/dist/client/assets/circle-off-CxsPyvHS.js +1 -0
  481. package/dist/client/assets/circle-parking-DPxwZyJ-.js +1 -0
  482. package/dist/client/assets/circle-parking-off-DX-Eid1H.js +1 -0
  483. package/dist/client/assets/circle-pause-BJVXb9CR.js +1 -0
  484. package/dist/client/assets/circle-percent-2pCxdsQ-.js +1 -0
  485. package/dist/client/assets/circle-pile-DdyWpPn4.js +1 -0
  486. package/dist/client/assets/circle-play-DdwVmxmd.js +1 -0
  487. package/dist/client/assets/circle-plus-DgYmGVY_.js +1 -0
  488. package/dist/client/assets/circle-pound-sterling-CtTDjh6U.js +1 -0
  489. package/dist/client/assets/circle-power-CeDD5Ude.js +1 -0
  490. package/dist/client/assets/circle-question-mark-ZKl8A6d4.js +1 -0
  491. package/dist/client/assets/circle-slash-2-BR_dFVtU.js +1 -0
  492. package/dist/client/assets/circle-slash-DiVFz_N8.js +1 -0
  493. package/dist/client/assets/circle-small-BkWON7Tp.js +1 -0
  494. package/dist/client/assets/circle-star-ByrKCKKs.js +1 -0
  495. package/dist/client/assets/circle-stop-DC99DjXT.js +1 -0
  496. package/dist/client/assets/circle-user-DNByOhk6.js +1 -0
  497. package/dist/client/assets/circle-user-round-DT4E9umA.js +1 -0
  498. package/dist/client/assets/circle-x-DQr55d0g.js +1 -0
  499. package/dist/client/assets/circuit-board-DhO1JMW_.js +1 -0
  500. package/dist/client/assets/citrus-CzpFwpYS.js +1 -0
  501. package/dist/client/assets/clapperboard-DuPfUhDw.js +1 -0
  502. package/dist/client/assets/classDiagram-ZZMXUADV-CTCOEL9r.js +1 -0
  503. package/dist/client/assets/classDiagram-v2-VYDZK3BY-CTCOEL9r.js +1 -0
  504. package/dist/client/assets/clipboard-C82gVIqO.js +1 -0
  505. package/dist/client/assets/clipboard-check-Ddk68rz4.js +1 -0
  506. package/dist/client/assets/clipboard-clock-BaBBUrRx.js +1 -0
  507. package/dist/client/assets/clipboard-copy-DEma0qEJ.js +1 -0
  508. package/dist/client/assets/clipboard-list-71Tdu7zB.js +1 -0
  509. package/dist/client/assets/clipboard-minus-BYl6ZNvc.js +1 -0
  510. package/dist/client/assets/clipboard-paste-DbFlbG5s.js +1 -0
  511. package/dist/client/assets/clipboard-pen-C371ver-.js +1 -0
  512. package/dist/client/assets/clipboard-pen-line-DayMwcxY.js +1 -0
  513. package/dist/client/assets/clipboard-plus-8Bcjhdj2.js +1 -0
  514. package/dist/client/assets/clipboard-type-CmFk-7L0.js +1 -0
  515. package/dist/client/assets/clipboard-x-CnYc7B8U.js +1 -0
  516. package/dist/client/assets/clock-1-C3TnzANf.js +1 -0
  517. package/dist/client/assets/clock-10-JA7fvIkN.js +1 -0
  518. package/dist/client/assets/clock-11-xgPSmHKU.js +1 -0
  519. package/dist/client/assets/clock-12-BUuKiy-f.js +1 -0
  520. package/dist/client/assets/clock-2-FES_p0lS.js +1 -0
  521. package/dist/client/assets/clock-4-InMqBFr4.js +1 -0
  522. package/dist/client/assets/clock-5-D35EoGy2.js +1 -0
  523. package/dist/client/assets/clock-6-DxBCJHbl.js +1 -0
  524. package/dist/client/assets/clock-7-B0Ithl2D.js +1 -0
  525. package/dist/client/assets/clock-8-BoxF_pPc.js +1 -0
  526. package/dist/client/assets/clock-9-CGVkZFcN.js +1 -0
  527. package/dist/client/assets/clock-Bx3H2Gg6.js +1 -0
  528. package/dist/client/assets/clock-alert-DlrTfOxD.js +1 -0
  529. package/dist/client/assets/clock-arrow-down-Bb0kOCYc.js +1 -0
  530. package/dist/client/assets/clock-arrow-up-CX7YHvHt.js +1 -0
  531. package/dist/client/assets/clock-check-B47GakVC.js +1 -0
  532. package/dist/client/assets/clock-fading-BERY7VPL.js +1 -0
  533. package/dist/client/assets/clock-plus-BpQdhYvx.js +1 -0
  534. package/dist/client/assets/closed-caption-CFihttQ3.js +1 -0
  535. package/dist/client/assets/cloud-D9p9Iz_b.js +1 -0
  536. package/dist/client/assets/cloud-alert-NfxgVpUG.js +1 -0
  537. package/dist/client/assets/cloud-backup-De09Q-nf.js +1 -0
  538. package/dist/client/assets/cloud-check-B4wloYGZ.js +1 -0
  539. package/dist/client/assets/cloud-cog-CY7KpL4p.js +1 -0
  540. package/dist/client/assets/cloud-download-Cn-zZmQj.js +1 -0
  541. package/dist/client/assets/cloud-drizzle-B8rxHyQ-.js +1 -0
  542. package/dist/client/assets/cloud-fog-DwWiem2_.js +1 -0
  543. package/dist/client/assets/cloud-hail-Bs82Fzic.js +1 -0
  544. package/dist/client/assets/cloud-lightning-D3hSEjcU.js +1 -0
  545. package/dist/client/assets/cloud-moon-DjZhbvD6.js +1 -0
  546. package/dist/client/assets/cloud-moon-rain-DI7WYt2G.js +1 -0
  547. package/dist/client/assets/cloud-off-TaJQjk8g.js +1 -0
  548. package/dist/client/assets/cloud-rain-VSzrogIi.js +1 -0
  549. package/dist/client/assets/cloud-rain-wind-CEQ3Do5-.js +1 -0
  550. package/dist/client/assets/cloud-snow-BODXB-eW.js +1 -0
  551. package/dist/client/assets/cloud-sun-BeyqXaki.js +1 -0
  552. package/dist/client/assets/cloud-sun-rain-B4FJExkX.js +1 -0
  553. package/dist/client/assets/cloud-sync-DTS1j_D7.js +1 -0
  554. package/dist/client/assets/cloud-upload-CxmijXnn.js +1 -0
  555. package/dist/client/assets/cloudy-DL5DmKVz.js +1 -0
  556. package/dist/client/assets/clover-DHFOb1Wu.js +1 -0
  557. package/dist/client/assets/club-DSfeHrBo.js +1 -0
  558. package/dist/client/assets/code-DLmhB0rK.js +1 -0
  559. package/dist/client/assets/coffee-CPTuWEvY.js +1 -0
  560. package/dist/client/assets/cog-BpIgyP6Y.js +1 -0
  561. package/dist/client/assets/coins-BNft5SX9.js +1 -0
  562. package/dist/client/assets/columns-3-Bfov-ufa.js +1 -0
  563. package/dist/client/assets/columns-3-cog-D5ABFABp.js +1 -0
  564. package/dist/client/assets/columns-4-C65KFIyx.js +1 -0
  565. package/dist/client/assets/combine-DaX3EZ7a.js +1 -0
  566. package/dist/client/assets/command-4YEXeRpj.js +1 -0
  567. package/dist/client/assets/compass-duy4_idL.js +1 -0
  568. package/dist/client/assets/component-BHbuc9Rv.js +1 -0
  569. package/dist/client/assets/computer-kRRevyFu.js +1 -0
  570. package/dist/client/assets/concierge-bell-CoSemaL2.js +1 -0
  571. package/dist/client/assets/cone-BmPCCMc-.js +1 -0
  572. package/dist/client/assets/construction-B1szh8OV.js +1 -0
  573. package/dist/client/assets/contact-g7f8X6aN.js +1 -0
  574. package/dist/client/assets/contact-round-CuiddmAP.js +1 -0
  575. package/dist/client/assets/container-DlBfZLp-.js +1 -0
  576. package/dist/client/assets/contrast-CxbKs6Ui.js +1 -0
  577. package/dist/client/assets/cookie-i-oDK8Vl.js +1 -0
  578. package/dist/client/assets/cooking-pot-erSKfQgK.js +1 -0
  579. package/dist/client/assets/copy-check-DsKvy-9e.js +1 -0
  580. package/dist/client/assets/copy-minus-D1SV7rZs.js +1 -0
  581. package/dist/client/assets/copy-plus-CObfk794.js +1 -0
  582. package/dist/client/assets/copy-slash-lNVablm2.js +1 -0
  583. package/dist/client/assets/copy-x-DwpmA6de.js +1 -0
  584. package/dist/client/assets/copyleft-xyQU-pGu.js +1 -0
  585. package/dist/client/assets/copyright-C5qwuAvB.js +1 -0
  586. package/dist/client/assets/corner-down-left-FlSZHn-A.js +1 -0
  587. package/dist/client/assets/corner-left-down--QthO9wH.js +1 -0
  588. package/dist/client/assets/corner-left-up-Xo006GDi.js +1 -0
  589. package/dist/client/assets/corner-right-down-C6ZH2tX3.js +1 -0
  590. package/dist/client/assets/corner-right-up-CU2GeVIb.js +1 -0
  591. package/dist/client/assets/corner-up-right-5h6wXaZU.js +1 -0
  592. package/dist/client/assets/cose-bilkent-JH36ORCC-vsxpbF5P.js +1 -0
  593. package/dist/client/assets/cose-bilkent-JH36ORCC-vsxpbF5P.js.br +0 -0
  594. package/dist/client/assets/cose-bilkent-JH36ORCC-vsxpbF5P.js.gz +0 -0
  595. package/dist/client/assets/cpu-CJ9efEwd.js +1 -0
  596. package/dist/client/assets/creative-commons-DjlsxDZd.js +1 -0
  597. package/dist/client/assets/credit-card-BWbn0W_0.js +1 -0
  598. package/dist/client/assets/croissant-C7Sx7MV1.js +1 -0
  599. package/dist/client/assets/crop-CG09kS15.js +1 -0
  600. package/dist/client/assets/cross-CdySrX0T.js +1 -0
  601. package/dist/client/assets/crosshair-BrTJ5Pe9.js +1 -0
  602. package/dist/client/assets/crown-CiCvhbqH.js +1 -0
  603. package/dist/client/assets/cuboid-NFnjTMCV.js +1 -0
  604. package/dist/client/assets/cup-soda-MCPjAjI4.js +1 -0
  605. package/dist/client/assets/currency-X6NStGwl.js +1 -0
  606. package/dist/client/assets/cylinder-oV6cTkch.js +1 -0
  607. package/dist/client/assets/cynefin-OW5HDTMX-C-Hqbx1M.js +166 -0
  608. package/dist/client/assets/cynefin-OW5HDTMX-C-Hqbx1M.js.br +0 -0
  609. package/dist/client/assets/cynefin-OW5HDTMX-C-Hqbx1M.js.gz +0 -0
  610. package/dist/client/assets/cynefinDiagram-5FMLGOSQ-CYsDIdIt.js +62 -0
  611. package/dist/client/assets/cynefinDiagram-5FMLGOSQ-CYsDIdIt.js.br +0 -0
  612. package/dist/client/assets/cynefinDiagram-5FMLGOSQ-CYsDIdIt.js.gz +0 -0
  613. package/dist/client/assets/dagre-GXQ25YYZ-Bi26AE4_.js +4 -0
  614. package/dist/client/assets/dagre-GXQ25YYZ-Bi26AE4_.js.br +0 -0
  615. package/dist/client/assets/dagre-GXQ25YYZ-Bi26AE4_.js.gz +0 -0
  616. package/dist/client/assets/dam-bEKnisJL.js +1 -0
  617. package/dist/client/assets/database-DfcZkMIk.js +1 -0
  618. package/dist/client/assets/database-backup-B0_YHBUO.js +1 -0
  619. package/dist/client/assets/database-search-C6OW3vN_.js +1 -0
  620. package/dist/client/assets/database-zap-D1Ohos4d.js +1 -0
  621. package/dist/client/assets/decimals-arrow-left-Cpz5LRDo.js +1 -0
  622. package/dist/client/assets/decimals-arrow-right-RVmPBg4G.js +1 -0
  623. package/dist/client/assets/delete-Ctlx2wl4.js +1 -0
  624. package/dist/client/assets/dessert-Cxs2o56r.js +1 -0
  625. package/dist/client/assets/diagram-S7CK7UJ4-vw3p0CV-.js +30 -0
  626. package/dist/client/assets/diagram-S7CK7UJ4-vw3p0CV-.js.br +0 -0
  627. package/dist/client/assets/diagram-S7CK7UJ4-vw3p0CV-.js.gz +0 -0
  628. package/dist/client/assets/diagram-UQ7AKVKN-DQ2n03Wv.js +41 -0
  629. package/dist/client/assets/diagram-UQ7AKVKN-DQ2n03Wv.js.br +0 -0
  630. package/dist/client/assets/diagram-UQ7AKVKN-DQ2n03Wv.js.gz +0 -0
  631. package/dist/client/assets/diagram-VSXAHHWV-DNtlcW-9.js +3 -0
  632. package/dist/client/assets/diagram-VSXAHHWV-DNtlcW-9.js.br +0 -0
  633. package/dist/client/assets/diagram-VSXAHHWV-DNtlcW-9.js.gz +0 -0
  634. package/dist/client/assets/diagram-VX7I27RA-Bs87mODY.js +24 -0
  635. package/dist/client/assets/diagram-VX7I27RA-Bs87mODY.js.br +0 -0
  636. package/dist/client/assets/diagram-VX7I27RA-Bs87mODY.js.gz +0 -0
  637. package/dist/client/assets/diagram-Z3DM3KII-0m-RVYys.js +24 -0
  638. package/dist/client/assets/diagram-Z3DM3KII-0m-RVYys.js.br +0 -0
  639. package/dist/client/assets/diagram-Z3DM3KII-0m-RVYys.js.gz +0 -0
  640. package/dist/client/assets/diameter-CfALbstt.js +1 -0
  641. package/dist/client/assets/diamond-DIAIjFLs.js +1 -0
  642. package/dist/client/assets/diamond-minus-lG3tHPmT.js +1 -0
  643. package/dist/client/assets/diamond-percent-DoiWNhBw.js +1 -0
  644. package/dist/client/assets/diamond-plus-DWuecz46.js +1 -0
  645. package/dist/client/assets/dice-1-J7KBh3Ps.js +1 -0
  646. package/dist/client/assets/dice-2-CtBTZ-Of.js +1 -0
  647. package/dist/client/assets/dice-3-DMuazLUb.js +1 -0
  648. package/dist/client/assets/dice-4-B1dbpedD.js +1 -0
  649. package/dist/client/assets/dice-5-C2pLI4Ca.js +1 -0
  650. package/dist/client/assets/dice-6-DGP7-S2C.js +1 -0
  651. package/dist/client/assets/dices-DTmL8zpk.js +1 -0
  652. package/dist/client/assets/diff-b94Y4WA0.js +1 -0
  653. package/dist/client/assets/disc-2-CsHlkgWf.js +1 -0
  654. package/dist/client/assets/disc-3-Ci2qXs_V.js +1 -0
  655. package/dist/client/assets/disc-DuwSycqw.js +1 -0
  656. package/dist/client/assets/disc-album-Btp1E6Kl.js +1 -0
  657. package/dist/client/assets/divide-DF-wRTlM.js +1 -0
  658. package/dist/client/assets/dna-CKm4qodt.js +1 -0
  659. package/dist/client/assets/dna-off-C0nIGU75.js +1 -0
  660. package/dist/client/assets/dock-Yd0dA6lJ.js +1 -0
  661. package/dist/client/assets/dog-BC1qZbTw.js +1 -0
  662. package/dist/client/assets/dollar-sign-poLKDhqm.js +1 -0
  663. package/dist/client/assets/donut-Cymy6Gw1.js +1 -0
  664. package/dist/client/assets/door-closed-CgP4_9OA.js +1 -0
  665. package/dist/client/assets/door-closed-locked-kHCpYkSO.js +1 -0
  666. package/dist/client/assets/door-open-Dwn3wFzd.js +1 -0
  667. package/dist/client/assets/dot-i1c8a65F.js +1 -0
  668. package/dist/client/assets/drafting-compass-D7bbDjJS.js +1 -0
  669. package/dist/client/assets/drama-yEne8Yec.js +1 -0
  670. package/dist/client/assets/drill-BjCotXFm.js +1 -0
  671. package/dist/client/assets/drone-Co_CEZlP.js +1 -0
  672. package/dist/client/assets/droplet-B3BAVovw.js +1 -0
  673. package/dist/client/assets/droplet-off-BI7QnTX9.js +1 -0
  674. package/dist/client/assets/droplets-DQ72Voga.js +1 -0
  675. package/dist/client/assets/drum-B7yG6fqj.js +1 -0
  676. package/dist/client/assets/drumstick-XHcuM3lv.js +1 -0
  677. package/dist/client/assets/dumbbell-CULeSpO5.js +1 -0
  678. package/dist/client/assets/ear-Dl1seojM.js +1 -0
  679. package/dist/client/assets/ear-off-DMlZ9RC8.js +1 -0
  680. package/dist/client/assets/earth-DiF3fbcw.js +1 -0
  681. package/dist/client/assets/earth-lock-CVPZgsCk.js +1 -0
  682. package/dist/client/assets/ebnfDiagram-PWID7BFC-BlPwQ0im.js +1 -0
  683. package/dist/client/assets/ebnfDiagram-PWID7BFC-BlPwQ0im.js.br +0 -0
  684. package/dist/client/assets/ebnfDiagram-PWID7BFC-BlPwQ0im.js.gz +0 -0
  685. package/dist/client/assets/eclipse-BlYrgi4M.js +1 -0
  686. package/dist/client/assets/egg-D9INPCkm.js +1 -0
  687. package/dist/client/assets/egg-fried-C_UYLJ1Y.js +1 -0
  688. package/dist/client/assets/egg-off-1Fpd_iu_.js +1 -0
  689. package/dist/client/assets/ellipse-WdbAbo9y.js +1 -0
  690. package/dist/client/assets/ellipsis-vertical-BHqDzM7D.js +1 -0
  691. package/dist/client/assets/equal-DqhZASX-.js +1 -0
  692. package/dist/client/assets/equal-approximately-D40mzqcp.js +1 -0
  693. package/dist/client/assets/equal-not-chFnQ1No.js +1 -0
  694. package/dist/client/assets/erDiagram-RLTQ6QDP-BzwrDm1z.js +99 -0
  695. package/dist/client/assets/erDiagram-RLTQ6QDP-BzwrDm1z.js.br +0 -0
  696. package/dist/client/assets/erDiagram-RLTQ6QDP-BzwrDm1z.js.gz +0 -0
  697. package/dist/client/assets/eraser-Ch3x0lUj.js +1 -0
  698. package/dist/client/assets/ethernet-port-BhR7lBYG.js +1 -0
  699. package/dist/client/assets/euro-1RquyD1c.js +1 -0
  700. package/dist/client/assets/ev-charger-D6jdCbcJ.js +1 -0
  701. package/dist/client/assets/expand-qGPkA-lB.js +1 -0
  702. package/dist/client/assets/external-link-BEZLXLDB.js +1 -0
  703. package/dist/client/assets/eye-BXb4uX3p.js +1 -0
  704. package/dist/client/assets/eye-closed-B1Gzds7q.js +1 -0
  705. package/dist/client/assets/eye-off-FevxaI5W.js +1 -0
  706. package/dist/client/assets/factory-DNlN02jt.js +1 -0
  707. package/dist/client/assets/fan-D2ZKvVer.js +1 -0
  708. package/dist/client/assets/fast-forward-BjJJvlnU.js +1 -0
  709. package/dist/client/assets/feather-CyNd94bj.js +1 -0
  710. package/dist/client/assets/fence-BAgRGLZh.js +1 -0
  711. package/dist/client/assets/ferris-wheel--3yA0CIP.js +1 -0
  712. package/dist/client/assets/file-archive-BMfVN8n6.js +1 -0
  713. package/dist/client/assets/file-axis-3d-DyIcW599.js +1 -0
  714. package/dist/client/assets/file-badge-DBgCsc4F.js +1 -0
  715. package/dist/client/assets/file-box-Cl7pgnEl.js +1 -0
  716. package/dist/client/assets/file-braces-BSyoIwDm.js +1 -0
  717. package/dist/client/assets/file-braces-corner-Bww0sw9W.js +1 -0
  718. package/dist/client/assets/file-chart-column-BvhhLuXv.js +1 -0
  719. package/dist/client/assets/file-chart-column-increasing-C0EfTxxr.js +1 -0
  720. package/dist/client/assets/file-chart-line-ZnTdODSE.js +1 -0
  721. package/dist/client/assets/file-chart-pie-sTfTLREI.js +1 -0
  722. package/dist/client/assets/file-check-BnxbP8IL.js +1 -0
  723. package/dist/client/assets/file-check-corner-CUU1iSSy.js +1 -0
  724. package/dist/client/assets/file-clock-DOkXBU5o.js +1 -0
  725. package/dist/client/assets/file-code-corner-B9wJoH45.js +1 -0
  726. package/dist/client/assets/file-cog-D34TVwph.js +1 -0
  727. package/dist/client/assets/file-diff-kcuI_MKf.js +1 -0
  728. package/dist/client/assets/file-digit-CQYQTnWh.js +1 -0
  729. package/dist/client/assets/file-down-Llsf1rKN.js +1 -0
  730. package/dist/client/assets/file-exclamation-point-CBrPXaET.js +1 -0
  731. package/dist/client/assets/file-headphone-DudfmDT1.js +1 -0
  732. package/dist/client/assets/file-heart-Dx-xcpuu.js +1 -0
  733. package/dist/client/assets/file-image-CswNiamU.js +1 -0
  734. package/dist/client/assets/file-input-BdsQ5Pgf.js +1 -0
  735. package/dist/client/assets/file-key-CqWtTPbx.js +1 -0
  736. package/dist/client/assets/file-lock-CeaiMb5Z.js +1 -0
  737. package/dist/client/assets/file-minus-DSvaYpvu.js +1 -0
  738. package/dist/client/assets/file-minus-corner-Dm37mZvk.js +1 -0
  739. package/dist/client/assets/file-music-BVMvQpC_.js +1 -0
  740. package/dist/client/assets/file-output-DAq3z-Bv.js +1 -0
  741. package/dist/client/assets/file-pen-CB_GhkZx.js +1 -0
  742. package/dist/client/assets/file-pen-line-C6yDZvc7.js +1 -0
  743. package/dist/client/assets/file-play-C87cbYs6.js +1 -0
  744. package/dist/client/assets/file-plus-BjIrjAlx.js +1 -0
  745. package/dist/client/assets/file-plus-corner-DgTiSu95.js +1 -0
  746. package/dist/client/assets/file-question-mark-CAFdEJMV.js +1 -0
  747. package/dist/client/assets/file-scan-C9oDGiA3.js +1 -0
  748. package/dist/client/assets/file-search-BD20SoOF.js +1 -0
  749. package/dist/client/assets/file-search-corner-yVghu06Q.js +1 -0
  750. package/dist/client/assets/file-signal-mTqKStfS.js +1 -0
  751. package/dist/client/assets/file-sliders-DSrYd7Jv.js +1 -0
  752. package/dist/client/assets/file-spreadsheet-ByQxqiBe.js +1 -0
  753. package/dist/client/assets/file-stack-DpTEKIOK.js +1 -0
  754. package/dist/client/assets/file-symlink-DMyyJ2RK.js +1 -0
  755. package/dist/client/assets/file-terminal-DXYBq6Ui.js +1 -0
  756. package/dist/client/assets/file-type-D3ul8pDV.js +1 -0
  757. package/dist/client/assets/file-type-corner-Dtm_yflH.js +1 -0
  758. package/dist/client/assets/file-up-BkMAF9c4.js +1 -0
  759. package/dist/client/assets/file-user-sOJcsXSd.js +1 -0
  760. package/dist/client/assets/file-video-camera-DYUrhqaJ.js +1 -0
  761. package/dist/client/assets/file-volume-DPgHbvym.js +1 -0
  762. package/dist/client/assets/file-x-DalblcSz.js +1 -0
  763. package/dist/client/assets/file-x-corner-f6DkP9RQ.js +1 -0
  764. package/dist/client/assets/files-19NMLuKM.js +1 -0
  765. package/dist/client/assets/film-CYNKGTlo.js +1 -0
  766. package/dist/client/assets/fingerprint-pattern-BzQNHzrg.js +1 -0
  767. package/dist/client/assets/fire-extinguisher-DjP3xYQd.js +1 -0
  768. package/dist/client/assets/fish-DHTJF5KS.js +1 -0
  769. package/dist/client/assets/fish-off-M3SjHq11.js +1 -0
  770. package/dist/client/assets/fish-symbol-Cr4JfFUv.js +1 -0
  771. package/dist/client/assets/fishing-hook-D0cAWf_K.js +1 -0
  772. package/dist/client/assets/fishing-rod-kcIIHDiY.js +1 -0
  773. package/dist/client/assets/flag-Bg0XEUBe.js +1 -0
  774. package/dist/client/assets/flag-off-dhBAbfRM.js +1 -0
  775. package/dist/client/assets/flag-triangle-left-Bq9aOR-D.js +1 -0
  776. package/dist/client/assets/flag-triangle-right-DCoBqPFy.js +1 -0
  777. package/dist/client/assets/flame-D30ZrsMv.js +1 -0
  778. package/dist/client/assets/flame-kindling-J8ktCWCu.js +1 -0
  779. package/dist/client/assets/flashlight-DcCSLQaH.js +1 -0
  780. package/dist/client/assets/flashlight-off-BLmR5UIy.js +1 -0
  781. package/dist/client/assets/flask-conical-BB8GSC44.js +1 -0
  782. package/dist/client/assets/flask-conical-off--LfPDeBX.js +1 -0
  783. package/dist/client/assets/flask-round-Bl72uRS_.js +1 -0
  784. package/dist/client/assets/flip-horizontal-2-C5Aa7MiY.js +1 -0
  785. package/dist/client/assets/flip-vertical-2-pxSTAunO.js +1 -0
  786. package/dist/client/assets/flowDiagram-HODETNUW-k_5kvWoK.js +168 -0
  787. package/dist/client/assets/flowDiagram-HODETNUW-k_5kvWoK.js.br +0 -0
  788. package/dist/client/assets/flowDiagram-HODETNUW-k_5kvWoK.js.gz +0 -0
  789. package/dist/client/assets/flower-2-BsVak-IE.js +1 -0
  790. package/dist/client/assets/flower-Bgs1oWyH.js +1 -0
  791. package/dist/client/assets/focus-OfJ6ldzt.js +1 -0
  792. package/dist/client/assets/fold-horizontal-Dq6EjGfX.js +1 -0
  793. package/dist/client/assets/fold-vertical-D1bluQUO.js +1 -0
  794. package/dist/client/assets/folder-archive-CS1JOcwb.js +1 -0
  795. package/dist/client/assets/folder-bookmark-CBDEygV9.js +1 -0
  796. package/dist/client/assets/folder-check-iZLBW-aT.js +1 -0
  797. package/dist/client/assets/folder-clock-B4DfoJXl.js +1 -0
  798. package/dist/client/assets/folder-closed-BChVJObi.js +1 -0
  799. package/dist/client/assets/folder-code-CwbFFi2f.js +1 -0
  800. package/dist/client/assets/folder-cog-AH0RPQZs.js +1 -0
  801. package/dist/client/assets/folder-dot-DlQnGWs7.js +1 -0
  802. package/dist/client/assets/folder-down-n3l2j8UC.js +1 -0
  803. package/dist/client/assets/folder-git-2-D303LXQt.js +1 -0
  804. package/dist/client/assets/folder-git-B02_srri.js +1 -0
  805. package/dist/client/assets/folder-heart-D5eEdDLL.js +1 -0
  806. package/dist/client/assets/folder-input-0jPqyUZU.js +1 -0
  807. package/dist/client/assets/folder-kanban-DNVA9K66.js +1 -0
  808. package/dist/client/assets/folder-key-D3OWHsJw.js +1 -0
  809. package/dist/client/assets/folder-lock-3ZoZex3R.js +1 -0
  810. package/dist/client/assets/folder-minus-DHoW8YQN.js +1 -0
  811. package/dist/client/assets/folder-open-dot-CQn5Hqlo.js +1 -0
  812. package/dist/client/assets/folder-output-CJbAOiAV.js +1 -0
  813. package/dist/client/assets/folder-pen-Ccd4mw3c.js +1 -0
  814. package/dist/client/assets/folder-plus-vbSnUZSg.js +1 -0
  815. package/dist/client/assets/folder-root-4Pcv8amT.js +1 -0
  816. package/dist/client/assets/folder-search-2-CGOTZO8E.js +1 -0
  817. package/dist/client/assets/folder-symlink-DpOvGQUm.js +1 -0
  818. package/dist/client/assets/folder-sync-L_7oT5Ro.js +1 -0
  819. package/dist/client/assets/folder-tree-DyWRt73x.js +1 -0
  820. package/dist/client/assets/folder-up-CRNrWKzg.js +1 -0
  821. package/dist/client/assets/folder-x-CDA0dLze.js +1 -0
  822. package/dist/client/assets/folders-DCRNWb66.js +1 -0
  823. package/dist/client/assets/footprints-ByjXouFJ.js +1 -0
  824. package/dist/client/assets/forklift-OdPuruOj.js +1 -0
  825. package/dist/client/assets/form-DlQVNf9c.js +1 -0
  826. package/dist/client/assets/forward-DfY9SqqQ.js +1 -0
  827. package/dist/client/assets/frame-Bd2SjFuz.js +1 -0
  828. package/dist/client/assets/frown-DbC5TX_5.js +1 -0
  829. package/dist/client/assets/fuel-C4EQIdWC.js +1 -0
  830. package/dist/client/assets/fullscreen-D6iLUOz0.js +1 -0
  831. package/dist/client/assets/funnel-Clh5WtBo.js +1 -0
  832. package/dist/client/assets/funnel-plus-pcEFgv3J.js +1 -0
  833. package/dist/client/assets/funnel-x-BD2LXHsU.js +1 -0
  834. package/dist/client/assets/gallery-horizontal-CkV1ogmg.js +1 -0
  835. package/dist/client/assets/gallery-horizontal-end-BMUwzoRv.js +1 -0
  836. package/dist/client/assets/gallery-thumbnails-m5Kzs2LS.js +1 -0
  837. package/dist/client/assets/gallery-vertical-D1fM2Vwv.js +1 -0
  838. package/dist/client/assets/gallery-vertical-end-B85tNZtS.js +1 -0
  839. package/dist/client/assets/gamepad-2-j4jGAcBk.js +1 -0
  840. package/dist/client/assets/gamepad-DHICJ4iw.js +1 -0
  841. package/dist/client/assets/gamepad-directional-CR12Qhpo.js +1 -0
  842. package/dist/client/assets/ganttDiagram-EL5Y4UJY-DCn36-OM.js +292 -0
  843. package/dist/client/assets/ganttDiagram-EL5Y4UJY-DCn36-OM.js.br +0 -0
  844. package/dist/client/assets/ganttDiagram-EL5Y4UJY-DCn36-OM.js.gz +0 -0
  845. package/dist/client/assets/gauge-pL7Sq01z.js +1 -0
  846. package/dist/client/assets/gavel-B35Rw9f4.js +1 -0
  847. package/dist/client/assets/gem-CTssB6fw.js +1 -0
  848. package/dist/client/assets/georgian-lari-Ckh6zUwR.js +1 -0
  849. package/dist/client/assets/ghost-DnzFdXgK.js +1 -0
  850. package/dist/client/assets/gift-BikBc2hj.js +1 -0
  851. package/dist/client/assets/git-branch-CGSo-alO.js +1 -0
  852. package/dist/client/assets/git-branch-minus-Bn7vvkC9.js +1 -0
  853. package/dist/client/assets/git-branch-plus-BxD2zC-0.js +1 -0
  854. package/dist/client/assets/git-commit-horizontal-DdsP2wqf.js +1 -0
  855. package/dist/client/assets/git-commit-vertical-DIvXGwhV.js +1 -0
  856. package/dist/client/assets/git-compare-XTS-0bEf.js +1 -0
  857. package/dist/client/assets/git-compare-arrows-BM4qXSqJ.js +1 -0
  858. package/dist/client/assets/git-fork-cXFHGQHE.js +1 -0
  859. package/dist/client/assets/git-graph-wPdPAp_y.js +1 -0
  860. package/dist/client/assets/git-merge-BI56FRuH.js +1 -0
  861. package/dist/client/assets/git-merge-conflict-CitSJeMt.js +1 -0
  862. package/dist/client/assets/git-pull-request-BJD9UxDn.js +1 -0
  863. package/dist/client/assets/git-pull-request-arrow-u8DKu2r1.js +1 -0
  864. package/dist/client/assets/git-pull-request-closed-Bh949ja6.js +1 -0
  865. package/dist/client/assets/git-pull-request-create-BWw4dhzB.js +1 -0
  866. package/dist/client/assets/git-pull-request-create-arrow-DwI4hecA.js +1 -0
  867. package/dist/client/assets/git-pull-request-draft-CsuqmPnc.js +1 -0
  868. package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CwXG9EZj.js +106 -0
  869. package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CwXG9EZj.js.br +0 -0
  870. package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CwXG9EZj.js.gz +0 -0
  871. package/dist/client/assets/glass-water-DSrE-lMo.js +1 -0
  872. package/dist/client/assets/glasses-B-8wJCWe.js +1 -0
  873. package/dist/client/assets/globe-DNjGDBUP.js +1 -0
  874. package/dist/client/assets/globe-check-KvAgCnZq.js +1 -0
  875. package/dist/client/assets/globe-lock-BQSQXDH6.js +1 -0
  876. package/dist/client/assets/globe-off-Lk1rTFYV.js +1 -0
  877. package/dist/client/assets/globe-x-qGQmaSol.js +1 -0
  878. package/dist/client/assets/goal-Cpu5giSJ.js +1 -0
  879. package/dist/client/assets/gpu-BQZbkZtd.js +1 -0
  880. package/dist/client/assets/graduation-cap-BG1zD3tL.js +1 -0
  881. package/dist/client/assets/grape-CHHvcmm5.js +1 -0
  882. package/dist/client/assets/grid-2x2-DMER6_BY.js +1 -0
  883. package/dist/client/assets/grid-2x2-check-hjgDA7KT.js +1 -0
  884. package/dist/client/assets/grid-2x2-plus-CDYd62fC.js +1 -0
  885. package/dist/client/assets/grid-2x2-x-DRP5ADRr.js +1 -0
  886. package/dist/client/assets/grid-3x2-9Ob6Druh.js +1 -0
  887. package/dist/client/assets/grid-3x3-CUQYXM3y.js +1 -0
  888. package/dist/client/assets/grip-CvXrUjbC.js +1 -0
  889. package/dist/client/assets/grip-horizontal-_fAbEOMm.js +1 -0
  890. package/dist/client/assets/grip-vertical-BTR1rjo6.js +1 -0
  891. package/dist/client/assets/group-DUj_URHg.js +1 -0
  892. package/dist/client/assets/guitar-BgGGFChl.js +1 -0
  893. package/dist/client/assets/ham-BX2cCJ5Z.js +1 -0
  894. package/dist/client/assets/hamburger-BmEeXm1s.js +1 -0
  895. package/dist/client/assets/hammer-DS0an8Qo.js +1 -0
  896. package/dist/client/assets/hand-C_5vZJtm.js +1 -0
  897. package/dist/client/assets/hand-coins-DWdraijB.js +1 -0
  898. package/dist/client/assets/hand-fist-BesOt-aa.js +1 -0
  899. package/dist/client/assets/hand-grab-rADDuaTN.js +1 -0
  900. package/dist/client/assets/hand-heart-BLGhafcB.js +1 -0
  901. package/dist/client/assets/hand-helping-CVs_csi3.js +1 -0
  902. package/dist/client/assets/hand-metal-Bz83Ni_a.js +1 -0
  903. package/dist/client/assets/hand-platter-CVO0HDAd.js +1 -0
  904. package/dist/client/assets/handbag-BLHseA0N.js +1 -0
  905. package/dist/client/assets/handshake-BPN0d9oI.js +1 -0
  906. package/dist/client/assets/hard-drive-D_2hfCBl.js +1 -0
  907. package/dist/client/assets/hard-drive-download-DihvNi4J.js +1 -0
  908. package/dist/client/assets/hard-drive-upload-EeORzvQs.js +1 -0
  909. package/dist/client/assets/hard-hat-BxF490d-.js +1 -0
  910. package/dist/client/assets/hash-DXpxtK5b.js +1 -0
  911. package/dist/client/assets/hat-glasses-Dlj3eReO.js +1 -0
  912. package/dist/client/assets/haze-DKX2pEE1.js +1 -0
  913. package/dist/client/assets/hd-DYyjUu4Z.js +1 -0
  914. package/dist/client/assets/hdmi-port-CwZ0O94x.js +1 -0
  915. package/dist/client/assets/heading-1-Bfckkf6S.js +1 -0
  916. package/dist/client/assets/heading-2-DWWU7viU.js +1 -0
  917. package/dist/client/assets/heading-3-DaJRtpab.js +1 -0
  918. package/dist/client/assets/heading-4-CkgUabcZ.js +1 -0
  919. package/dist/client/assets/heading-5-a5AUdJr-.js +1 -0
  920. package/dist/client/assets/heading-6-CQxCLL0c.js +1 -0
  921. package/dist/client/assets/heading-HYYQ_iPA.js +1 -0
  922. package/dist/client/assets/headphone-off-e5xq1BUf.js +1 -0
  923. package/dist/client/assets/headphones-DrAfoAqK.js +1 -0
  924. package/dist/client/assets/headset-BlA-IR5N.js +1 -0
  925. package/dist/client/assets/heart-crack-D7oeWA9i.js +1 -0
  926. package/dist/client/assets/heart-dnxkGwue.js +1 -0
  927. package/dist/client/assets/heart-handshake-B0a5Un3G.js +1 -0
  928. package/dist/client/assets/heart-minus-0_AhY01W.js +1 -0
  929. package/dist/client/assets/heart-off-N5R4u4am.js +1 -0
  930. package/dist/client/assets/heart-plus-3lSEs7MQ.js +1 -0
  931. package/dist/client/assets/heart-pulse-MzsX03nt.js +1 -0
  932. package/dist/client/assets/heart-x-9iT6BfGn.js +1 -0
  933. package/dist/client/assets/heater-CgYINMFq.js +1 -0
  934. package/dist/client/assets/helicopter-DmmyXtRg.js +1 -0
  935. package/dist/client/assets/hexagon-DXf25s19.js +1 -0
  936. package/dist/client/assets/highlighter-BdVgb44a.js +1 -0
  937. package/dist/client/assets/history-BBkBtqKJ.js +1 -0
  938. package/dist/client/assets/hop-MVIFbTWF.js +1 -0
  939. package/dist/client/assets/hop-MVIFbTWF.js.br +0 -0
  940. package/dist/client/assets/hop-MVIFbTWF.js.gz +0 -0
  941. package/dist/client/assets/hop-off-Cs83ENvn.js +1 -0
  942. package/dist/client/assets/hop-off-Cs83ENvn.js.br +0 -0
  943. package/dist/client/assets/hop-off-Cs83ENvn.js.gz +0 -0
  944. package/dist/client/assets/hospital-CWBiXcIX.js +1 -0
  945. package/dist/client/assets/hotel-CsUCEC5e.js +1 -0
  946. package/dist/client/assets/hourglass-B4MOA51c.js +1 -0
  947. package/dist/client/assets/house-DoOvaDGW.js +1 -0
  948. package/dist/client/assets/house-heart-BUhC9dU6.js +1 -0
  949. package/dist/client/assets/house-plug-NbiSGueN.js +1 -0
  950. package/dist/client/assets/house-plus-4fGg8HYx.js +1 -0
  951. package/dist/client/assets/house-wifi-BHvowkP2.js +1 -0
  952. package/dist/client/assets/ice-cream-bowl-B8e0nfN6.js +1 -0
  953. package/dist/client/assets/ice-cream-cone-Cl6e_0il.js +1 -0
  954. package/dist/client/assets/id-card-D6xM86Xf.js +1 -0
  955. package/dist/client/assets/id-card-lanyard-BnigQZFM.js +1 -0
  956. package/dist/client/assets/image-down-D08cP3oY.js +1 -0
  957. package/dist/client/assets/image-minus-CA9-5d46.js +1 -0
  958. package/dist/client/assets/image-off-Ccpgl49B.js +1 -0
  959. package/dist/client/assets/image-play-DU8_8Mb7.js +1 -0
  960. package/dist/client/assets/image-plus-B4LL6cG4.js +1 -0
  961. package/dist/client/assets/image-up-Cxm7Ziof.js +1 -0
  962. package/dist/client/assets/image-upscale-DcyNGEtO.js +1 -0
  963. package/dist/client/assets/images-zAveQAev.js +1 -0
  964. package/dist/client/assets/import-CQsdfxOZ.js +1 -0
  965. package/dist/client/assets/inbox-DK_GTp6x.js +1 -0
  966. package/dist/client/assets/index-CBb0xNS1.css +1 -0
  967. package/dist/client/assets/index-CBb0xNS1.css.br +0 -0
  968. package/dist/client/assets/index-CBb0xNS1.css.gz +0 -0
  969. package/dist/client/assets/index-RUWYr_nY.js +259 -0
  970. package/dist/client/assets/index-RUWYr_nY.js.br +0 -0
  971. package/dist/client/assets/index-RUWYr_nY.js.gz +0 -0
  972. package/dist/client/assets/indian-rupee-C7mWBRBE.js +1 -0
  973. package/dist/client/assets/infinity-dtAcNtGK.js +1 -0
  974. package/dist/client/assets/info-BsWeApaA.js +1 -0
  975. package/dist/client/assets/infoDiagram-27XIBGKW-BPdIviTi.js +2 -0
  976. package/dist/client/assets/inspection-panel-BuCYWi0l.js +1 -0
  977. package/dist/client/assets/ishikawaDiagram-5VMMS53U-CHliAZ_u.js +70 -0
  978. package/dist/client/assets/ishikawaDiagram-5VMMS53U-CHliAZ_u.js.br +0 -0
  979. package/dist/client/assets/ishikawaDiagram-5VMMS53U-CHliAZ_u.js.gz +0 -0
  980. package/dist/client/assets/italic-BTMbtGT8.js +1 -0
  981. package/dist/client/assets/iteration-ccw-CiKrCG_I.js +1 -0
  982. package/dist/client/assets/iteration-cw-ChO5Zx2Z.js +1 -0
  983. package/dist/client/assets/japanese-yen-zKL4lFJp.js +1 -0
  984. package/dist/client/assets/journeyDiagram-3NMN7TZE-KLzhRp1z.js +139 -0
  985. package/dist/client/assets/journeyDiagram-3NMN7TZE-KLzhRp1z.js.br +0 -0
  986. package/dist/client/assets/journeyDiagram-3NMN7TZE-KLzhRp1z.js.gz +0 -0
  987. package/dist/client/assets/joystick-B3Mdt8uk.js +1 -0
  988. package/dist/client/assets/kanban-DVW0mVt7.js +1 -0
  989. package/dist/client/assets/kanban-definition-UXKFOSKX-BtseX9Jk.js +89 -0
  990. package/dist/client/assets/kanban-definition-UXKFOSKX-BtseX9Jk.js.br +0 -0
  991. package/dist/client/assets/kanban-definition-UXKFOSKX-BtseX9Jk.js.gz +0 -0
  992. package/dist/client/assets/kayak-DL6Ez2P5.js +1 -0
  993. package/dist/client/assets/key-CDHtnsRx.js +1 -0
  994. package/dist/client/assets/key-round-BZn9Gv12.js +1 -0
  995. package/dist/client/assets/key-square-DBSX47_b.js +1 -0
  996. package/dist/client/assets/keyboard-B3AsNCG6.js +1 -0
  997. package/dist/client/assets/keyboard-music-CBwcpqX_.js +1 -0
  998. package/dist/client/assets/keyboard-off-wYD-7caw.js +1 -0
  999. package/dist/client/assets/lamp-DMelE-BE.js +1 -0
  1000. package/dist/client/assets/lamp-ceiling-D6arPLiL.js +1 -0
  1001. package/dist/client/assets/lamp-desk-CFvVcP15.js +1 -0
  1002. package/dist/client/assets/lamp-floor-C5JIoEmh.js +1 -0
  1003. package/dist/client/assets/lamp-wall-down-CUK3Jwcl.js +1 -0
  1004. package/dist/client/assets/lamp-wall-up-Dzc5KC4w.js +1 -0
  1005. package/dist/client/assets/land-plot-glnIrFfm.js +1 -0
  1006. package/dist/client/assets/landmark-CfEGtBVl.js +1 -0
  1007. package/dist/client/assets/languages-A74rdZ7y.js +1 -0
  1008. package/dist/client/assets/laptop-C3zAibvS.js +1 -0
  1009. package/dist/client/assets/laptop-minimal-BlUyUpR3.js +1 -0
  1010. package/dist/client/assets/laptop-minimal-check-BR5VsWEQ.js +1 -0
  1011. package/dist/client/assets/lasso-70dFiWUv.js +1 -0
  1012. package/dist/client/assets/lasso-select-mxw1S0oi.js +1 -0
  1013. package/dist/client/assets/laugh-BpGm9Aaq.js +1 -0
  1014. package/dist/client/assets/layers-2-CefcMGSK.js +1 -0
  1015. package/dist/client/assets/layers-ZzYwAvrT.js +1 -0
  1016. package/dist/client/assets/layers-minus-D77WOmgG.js +1 -0
  1017. package/dist/client/assets/layers-plus-C9E8doNw.js +1 -0
  1018. package/dist/client/assets/layout-CmK05lkq.js +1 -0
  1019. package/dist/client/assets/layout-CmK05lkq.js.br +0 -0
  1020. package/dist/client/assets/layout-CmK05lkq.js.gz +0 -0
  1021. package/dist/client/assets/layout-dashboard-CoPyJEEO.js +1 -0
  1022. package/dist/client/assets/layout-grid-C1QXHva2.js +1 -0
  1023. package/dist/client/assets/layout-list-DnM8Py6y.js +1 -0
  1024. package/dist/client/assets/layout-panel-left-s9u-5usU.js +1 -0
  1025. package/dist/client/assets/layout-panel-top-Be-bfgp0.js +1 -0
  1026. package/dist/client/assets/layout-template-DeJfxfaM.js +1 -0
  1027. package/dist/client/assets/leaf-B48OV3Dj.js +1 -0
  1028. package/dist/client/assets/leafy-green-C4v3-YXu.js +1 -0
  1029. package/dist/client/assets/lectern-BwWlJxuG.js +1 -0
  1030. package/dist/client/assets/lens-concave-BRIL8d_n.js +1 -0
  1031. package/dist/client/assets/lens-convex-DeUkOBCg.js +1 -0
  1032. package/dist/client/assets/library-big-C_6ufmSJ.js +1 -0
  1033. package/dist/client/assets/library-dDqYwK4J.js +1 -0
  1034. package/dist/client/assets/life-buoy-iioPOmnW.js +1 -0
  1035. package/dist/client/assets/ligature-B8FCydmC.js +1 -0
  1036. package/dist/client/assets/lightbulb-off-BGpjKOXS.js +1 -0
  1037. package/dist/client/assets/line-dot-right-horizontal-C65Qe5rd.js +1 -0
  1038. package/dist/client/assets/line-squiggle-CS4YxLFw.js +1 -0
  1039. package/dist/client/assets/line-style-D75NGS7j.js +1 -0
  1040. package/dist/client/assets/link-8mSEoJar.js +1 -0
  1041. package/dist/client/assets/list-CyAB3Dj2.js +1 -0
  1042. package/dist/client/assets/list-check-DVMVSWVb.js +1 -0
  1043. package/dist/client/assets/list-checks-Cj5Dfm4z.js +1 -0
  1044. package/dist/client/assets/list-chevrons-down-up-CIMc8S_g.js +1 -0
  1045. package/dist/client/assets/list-chevrons-up-down-BLcyE19K.js +1 -0
  1046. package/dist/client/assets/list-collapse-Da0fxJwj.js +1 -0
  1047. package/dist/client/assets/list-end-Yw1Iz4Mx.js +1 -0
  1048. package/dist/client/assets/list-filter-BQGopLDW.js +1 -0
  1049. package/dist/client/assets/list-filter-plus-DineR213.js +1 -0
  1050. package/dist/client/assets/list-indent-decrease-DoeVn-Ua.js +1 -0
  1051. package/dist/client/assets/list-indent-increase-BayD-0Ej.js +1 -0
  1052. package/dist/client/assets/list-minus-DInykg5e.js +1 -0
  1053. package/dist/client/assets/list-music-B5Ep3YL6.js +1 -0
  1054. package/dist/client/assets/list-ordered-BFrQPWqm.js +1 -0
  1055. package/dist/client/assets/list-plus-CE3Nsgdt.js +1 -0
  1056. package/dist/client/assets/list-restart-DTfGhwHk.js +1 -0
  1057. package/dist/client/assets/list-start-BWH21ddT.js +1 -0
  1058. package/dist/client/assets/list-tree-C2XK8Y65.js +1 -0
  1059. package/dist/client/assets/list-video-ADR2O8oS.js +1 -0
  1060. package/dist/client/assets/list-x-0BGf_75U.js +1 -0
  1061. package/dist/client/assets/loader-pinwheel-BkLMAflQ.js +1 -0
  1062. package/dist/client/assets/loader-wuih-qDg.js +1 -0
  1063. package/dist/client/assets/locate-BaXYg1fM.js +1 -0
  1064. package/dist/client/assets/locate-fixed-D9NoYPAO.js +1 -0
  1065. package/dist/client/assets/locate-off-o7OQQmz6.js +1 -0
  1066. package/dist/client/assets/lock-CvZzuDQz.js +1 -0
  1067. package/dist/client/assets/lock-keyhole-C4V07HjE.js +1 -0
  1068. package/dist/client/assets/lock-keyhole-open-DrDT_oY8.js +1 -0
  1069. package/dist/client/assets/lock-open-LA7wlhjP.js +1 -0
  1070. package/dist/client/assets/log-in-BUniNv3R.js +1 -0
  1071. package/dist/client/assets/log-out-BqR1vOWa.js +1 -0
  1072. package/dist/client/assets/logs-BLfDzOuF.js +1 -0
  1073. package/dist/client/assets/lollipop-C89bdYWc.js +1 -0
  1074. package/dist/client/assets/luggage-zrFOALTj.js +1 -0
  1075. package/dist/client/assets/magnet-CRy0GGI5.js +1 -0
  1076. package/dist/client/assets/mail-ClT3QP9I.js +1 -0
  1077. package/dist/client/assets/mail-check-BpO0SDj2.js +1 -0
  1078. package/dist/client/assets/mail-minus-DFyR6gcv.js +1 -0
  1079. package/dist/client/assets/mail-open-BwpaSUiW.js +1 -0
  1080. package/dist/client/assets/mail-plus-D1UA40g9.js +1 -0
  1081. package/dist/client/assets/mail-question-mark-CFDvW07g.js +1 -0
  1082. package/dist/client/assets/mail-search-CpGz0OSr.js +1 -0
  1083. package/dist/client/assets/mail-warning-B2JOd7as.js +1 -0
  1084. package/dist/client/assets/mail-x-QxY2TcFb.js +1 -0
  1085. package/dist/client/assets/mailbox-BVzgPa9v.js +1 -0
  1086. package/dist/client/assets/mails-C4AKxoYv.js +1 -0
  1087. package/dist/client/assets/map-AJSI0dhz.js +1 -0
  1088. package/dist/client/assets/map-minus-B2LP_moR.js +1 -0
  1089. package/dist/client/assets/map-pin-B-2BJheY.js +1 -0
  1090. package/dist/client/assets/map-pin-check-inside-Dc2KL_tH.js +1 -0
  1091. package/dist/client/assets/map-pin-check-k2zPx7Gr.js +1 -0
  1092. package/dist/client/assets/map-pin-house-n-5pWQYi.js +1 -0
  1093. package/dist/client/assets/map-pin-minus-DzE0jlFB.js +1 -0
  1094. package/dist/client/assets/map-pin-minus-inside-DsG8xlUN.js +1 -0
  1095. package/dist/client/assets/map-pin-off-B-ko7QkE.js +1 -0
  1096. package/dist/client/assets/map-pin-pen-D50TfIJK.js +1 -0
  1097. package/dist/client/assets/map-pin-plus-BtufmzZu.js +1 -0
  1098. package/dist/client/assets/map-pin-plus-inside-B8vlFy4e.js +1 -0
  1099. package/dist/client/assets/map-pin-search-DJPSmbtJ.js +1 -0
  1100. package/dist/client/assets/map-pin-x-CeW1p4OX.js +1 -0
  1101. package/dist/client/assets/map-pin-x-inside-DBUOwgMQ.js +1 -0
  1102. package/dist/client/assets/map-pinned-CNMD_ttx.js +1 -0
  1103. package/dist/client/assets/map-plus-DGYwqomd.js +1 -0
  1104. package/dist/client/assets/mars-D39Cmh0L.js +1 -0
  1105. package/dist/client/assets/mars-stroke-BkGJ3qt7.js +1 -0
  1106. package/dist/client/assets/martini-De5bgjAk.js +1 -0
  1107. package/dist/client/assets/maximize-2-BsT0V4WT.js +1 -0
  1108. package/dist/client/assets/maximize-BDXGdAUY.js +1 -0
  1109. package/dist/client/assets/medal-Cq_rCor2.js +1 -0
  1110. package/dist/client/assets/megaphone-BAHG4Vd7.js +1 -0
  1111. package/dist/client/assets/megaphone-off-DWwzo1f4.js +1 -0
  1112. package/dist/client/assets/meh-CeWmwmDW.js +1 -0
  1113. package/dist/client/assets/memory-stick-B2-k59mA.js +1 -0
  1114. package/dist/client/assets/menu-J4mawkVg.js +1 -0
  1115. package/dist/client/assets/merge-6Ga7DHlq.js +1 -0
  1116. package/dist/client/assets/mermaid.core-B5i7z4aH.js +308 -0
  1117. package/dist/client/assets/mermaid.core-B5i7z4aH.js.br +0 -0
  1118. package/dist/client/assets/mermaid.core-B5i7z4aH.js.gz +0 -0
  1119. package/dist/client/assets/message-circle-check-DhS4_9Sd.js +1 -0
  1120. package/dist/client/assets/message-circle-code-DirX6VhV.js +1 -0
  1121. package/dist/client/assets/message-circle-dashed-381TQl9B.js +1 -0
  1122. package/dist/client/assets/message-circle-heart-C6l2b2lS.js +1 -0
  1123. package/dist/client/assets/message-circle-more-DMzyGxzO.js +1 -0
  1124. package/dist/client/assets/message-circle-off-CgPuagHw.js +1 -0
  1125. package/dist/client/assets/message-circle-plus-CZ7LU4zK.js +1 -0
  1126. package/dist/client/assets/message-circle-question-mark-m-C1fNbq.js +1 -0
  1127. package/dist/client/assets/message-circle-reply-sEUGDDGq.js +1 -0
  1128. package/dist/client/assets/message-circle-warning-DY9-YDDR.js +1 -0
  1129. package/dist/client/assets/message-circle-x-sRVVlUGR.js +1 -0
  1130. package/dist/client/assets/message-square-CJ0PGPfe.js +1 -0
  1131. package/dist/client/assets/message-square-check-CTXyYyV6.js +1 -0
  1132. package/dist/client/assets/message-square-code-BUmX-YDI.js +1 -0
  1133. package/dist/client/assets/message-square-dashed-IyzkbOZ7.js +1 -0
  1134. package/dist/client/assets/message-square-diff-DrfLUvUX.js +1 -0
  1135. package/dist/client/assets/message-square-dot-C9jjyd28.js +1 -0
  1136. package/dist/client/assets/message-square-heart-CeliXVaD.js +1 -0
  1137. package/dist/client/assets/message-square-lock-Ds2FoGGM.js +1 -0
  1138. package/dist/client/assets/message-square-more-BTklgTnM.js +1 -0
  1139. package/dist/client/assets/message-square-off-Bn_0IEqE.js +1 -0
  1140. package/dist/client/assets/message-square-plus-DxCg0zuG.js +1 -0
  1141. package/dist/client/assets/message-square-quote-Ywot1uGZ.js +1 -0
  1142. package/dist/client/assets/message-square-reply-C1ioG5IH.js +1 -0
  1143. package/dist/client/assets/message-square-share-PtF79Jsh.js +1 -0
  1144. package/dist/client/assets/message-square-text-BLXWjM7q.js +1 -0
  1145. package/dist/client/assets/message-square-warning-6mh6PdaN.js +1 -0
  1146. package/dist/client/assets/message-square-x-CVWuXpPE.js +1 -0
  1147. package/dist/client/assets/messages-square-BSls4GJF.js +1 -0
  1148. package/dist/client/assets/metronome-DXXhdChu.js +1 -0
  1149. package/dist/client/assets/mic-BSmKt91c.js +1 -0
  1150. package/dist/client/assets/mic-off-BOAnbPMW.js +1 -0
  1151. package/dist/client/assets/mic-vocal-C0sRGX2z.js +1 -0
  1152. package/dist/client/assets/microchip-25RQ6Hmt.js +1 -0
  1153. package/dist/client/assets/microscope-BXAJ-Lqj.js +1 -0
  1154. package/dist/client/assets/microwave-BIlAe0P7.js +1 -0
  1155. package/dist/client/assets/milestone-CuqsjqFx.js +1 -0
  1156. package/dist/client/assets/milk-DDMUdTCt.js +1 -0
  1157. package/dist/client/assets/milk-off-CO_UuVzF.js +1 -0
  1158. package/dist/client/assets/mindmap-definition-YA3MSWOX-D2El9SeV.js +96 -0
  1159. package/dist/client/assets/mindmap-definition-YA3MSWOX-D2El9SeV.js.br +0 -0
  1160. package/dist/client/assets/mindmap-definition-YA3MSWOX-D2El9SeV.js.gz +0 -0
  1161. package/dist/client/assets/minimize-2-Ct0mHv0k.js +1 -0
  1162. package/dist/client/assets/minimize-CqzwPXkJ.js +1 -0
  1163. package/dist/client/assets/minus-fKI9JRJz.js +1 -0
  1164. package/dist/client/assets/mirror-rectangular-CrnxPDa7.js +1 -0
  1165. package/dist/client/assets/mirror-round-Dg3HktnH.js +1 -0
  1166. package/dist/client/assets/monitor-check-DhDVy7Uq.js +1 -0
  1167. package/dist/client/assets/monitor-cloud-CNj4ghcl.js +1 -0
  1168. package/dist/client/assets/monitor-cog-BvZcIcZb.js +1 -0
  1169. package/dist/client/assets/monitor-dot-J4fxBZqT.js +1 -0
  1170. package/dist/client/assets/monitor-down-CqSl0KB7.js +1 -0
  1171. package/dist/client/assets/monitor-off-CuCw0pY_.js +1 -0
  1172. package/dist/client/assets/monitor-pause-CmVCEB47.js +1 -0
  1173. package/dist/client/assets/monitor-play-nwN325--.js +1 -0
  1174. package/dist/client/assets/monitor-smartphone-PZkxDvAk.js +1 -0
  1175. package/dist/client/assets/monitor-speaker-CP6DcqUk.js +1 -0
  1176. package/dist/client/assets/monitor-stop-lNYq53oP.js +1 -0
  1177. package/dist/client/assets/monitor-up-p_LXeFA6.js +1 -0
  1178. package/dist/client/assets/monitor-x-B_QOv3iv.js +1 -0
  1179. package/dist/client/assets/moon-CepJ4VEe.js +1 -0
  1180. package/dist/client/assets/moon-star-_Cfe1JgD.js +1 -0
  1181. package/dist/client/assets/motorbike-HoAjnzi9.js +1 -0
  1182. package/dist/client/assets/mountain-D63lg3Wp.js +1 -0
  1183. package/dist/client/assets/mountain-snow-du--YEVT.js +1 -0
  1184. package/dist/client/assets/mouse-C-ke0dRy.js +1 -0
  1185. package/dist/client/assets/mouse-left-DPp-atwm.js +1 -0
  1186. package/dist/client/assets/mouse-off-BLuiQysh.js +1 -0
  1187. package/dist/client/assets/mouse-pointer-2-C4BoL6DM.js +1 -0
  1188. package/dist/client/assets/mouse-pointer-2-off-DOt14YmV.js +1 -0
  1189. package/dist/client/assets/mouse-pointer-2znZXSgT.js +1 -0
  1190. package/dist/client/assets/mouse-pointer-ban-BQEWARz6.js +1 -0
  1191. package/dist/client/assets/mouse-pointer-click-BmKaJezf.js +1 -0
  1192. package/dist/client/assets/mouse-right-BwTluxbn.js +1 -0
  1193. package/dist/client/assets/move-3d-3NQW6zO3.js +1 -0
  1194. package/dist/client/assets/move-DEVaDNyU.js +1 -0
  1195. package/dist/client/assets/move-diagonal-2-BBwnfXYW.js +1 -0
  1196. package/dist/client/assets/move-diagonal-lhsw_oii.js +1 -0
  1197. package/dist/client/assets/move-down-Bu0jAz_q.js +1 -0
  1198. package/dist/client/assets/move-down-left-eZh-AIba.js +1 -0
  1199. package/dist/client/assets/move-down-right-DsG1iTKp.js +1 -0
  1200. package/dist/client/assets/move-horizontal-DFpZ-dvH.js +1 -0
  1201. package/dist/client/assets/move-left-C1NDrrMw.js +1 -0
  1202. package/dist/client/assets/move-right-DhVS4sy9.js +1 -0
  1203. package/dist/client/assets/move-up-BN4ZPg-c.js +1 -0
  1204. package/dist/client/assets/move-up-left-C7GKcGU8.js +1 -0
  1205. package/dist/client/assets/move-up-right-DWiTCKzY.js +1 -0
  1206. package/dist/client/assets/move-vertical-DCeY01CD.js +1 -0
  1207. package/dist/client/assets/music-2-r6dbvMOc.js +1 -0
  1208. package/dist/client/assets/music-3-BLbdWfSg.js +1 -0
  1209. package/dist/client/assets/music-4-gMpfF6xm.js +1 -0
  1210. package/dist/client/assets/music-CTGLkSYi.js +1 -0
  1211. package/dist/client/assets/navigation-2-AgsGebt4.js +1 -0
  1212. package/dist/client/assets/navigation-2-off-C2O5bhTp.js +1 -0
  1213. package/dist/client/assets/navigation-CVmVUfEk.js +1 -0
  1214. package/dist/client/assets/navigation-off-CSE2LubQ.js +1 -0
  1215. package/dist/client/assets/network-Clkw1Lte.js +1 -0
  1216. package/dist/client/assets/newspaper-CP8wvQKL.js +1 -0
  1217. package/dist/client/assets/nfc-BN30MB1t.js +1 -0
  1218. package/dist/client/assets/non-binary-CrZGQ9gN.js +1 -0
  1219. package/dist/client/assets/notebook-igk9jmLA.js +1 -0
  1220. package/dist/client/assets/notebook-pen-DDr7Sodk.js +1 -0
  1221. package/dist/client/assets/notebook-tabs-BM3mSxN_.js +1 -0
  1222. package/dist/client/assets/notebook-text-Ncl9JsI8.js +1 -0
  1223. package/dist/client/assets/notepad-text-DB29-ZBG.js +1 -0
  1224. package/dist/client/assets/notepad-text-dashed-BN_Al7fX.js +1 -0
  1225. package/dist/client/assets/nut-ezM0-FLh.js +1 -0
  1226. package/dist/client/assets/nut-off-zCJa_EKu.js +1 -0
  1227. package/dist/client/assets/octagon-DzScEOtt.js +1 -0
  1228. package/dist/client/assets/octagon-alert-GWsmB26-.js +1 -0
  1229. package/dist/client/assets/octagon-minus-BEj9ImFG.js +1 -0
  1230. package/dist/client/assets/octagon-pause-Cnu4ahDF.js +1 -0
  1231. package/dist/client/assets/octagon-x-C4YGt1gY.js +1 -0
  1232. package/dist/client/assets/omega-4BCoiwwt.js +1 -0
  1233. package/dist/client/assets/option-vmKeSJrx.js +1 -0
  1234. package/dist/client/assets/orbit-BCC_P06U.js +1 -0
  1235. package/dist/client/assets/origami-9kNYa5i5.js +1 -0
  1236. package/dist/client/assets/package-2-DLy6y0hw.js +1 -0
  1237. package/dist/client/assets/package-CC0G5CYy.js +1 -0
  1238. package/dist/client/assets/package-check-ScYRbY7Q.js +1 -0
  1239. package/dist/client/assets/package-minus-CbjC5qqa.js +1 -0
  1240. package/dist/client/assets/package-open-COayo4Kb.js +1 -0
  1241. package/dist/client/assets/package-plus-3lfjUwMx.js +1 -0
  1242. package/dist/client/assets/package-search-DIu4A42E.js +1 -0
  1243. package/dist/client/assets/package-x-CQ6zMHz9.js +1 -0
  1244. package/dist/client/assets/paint-bucket-C0xzgBqJ.js +1 -0
  1245. package/dist/client/assets/paint-roller-Dv4g9dLO.js +1 -0
  1246. package/dist/client/assets/paintbrush-sm8pdGLS.js +1 -0
  1247. package/dist/client/assets/paintbrush-vertical-zwdcooV1.js +1 -0
  1248. package/dist/client/assets/palette-B6XiNDwH.js +1 -0
  1249. package/dist/client/assets/panda-IFVPcgpQ.js +1 -0
  1250. package/dist/client/assets/panel-bottom-BPgo4HVF.js +1 -0
  1251. package/dist/client/assets/panel-bottom-close-B0ISC7i6.js +1 -0
  1252. package/dist/client/assets/panel-bottom-dashed-N_zrSmNN.js +1 -0
  1253. package/dist/client/assets/panel-bottom-open-B3cC4ljS.js +1 -0
  1254. package/dist/client/assets/panel-left-CiWVzHmJ.js +1 -0
  1255. package/dist/client/assets/panel-left-close-BYMSCt4D.js +1 -0
  1256. package/dist/client/assets/panel-left-dashed-DjDNOPaL.js +1 -0
  1257. package/dist/client/assets/panel-left-open-D9BnbI1F.js +1 -0
  1258. package/dist/client/assets/panel-left-right-dashed-C7QE2omR.js +1 -0
  1259. package/dist/client/assets/panel-right-close-90OxPbN6.js +1 -0
  1260. package/dist/client/assets/panel-right-dashed-CFEGGJa2.js +1 -0
  1261. package/dist/client/assets/panel-right-open-b4zu3R7s.js +1 -0
  1262. package/dist/client/assets/panel-top-bottom-dashed-Dsg1-WUu.js +1 -0
  1263. package/dist/client/assets/panel-top-close-BMlAFp5P.js +1 -0
  1264. package/dist/client/assets/panel-top-dashed-CjIeHYJJ.js +1 -0
  1265. package/dist/client/assets/panel-top-open-v2AkMRUo.js +1 -0
  1266. package/dist/client/assets/panel-top-pLnr6DxT.js +1 -0
  1267. package/dist/client/assets/panels-left-bottom-BwlXbBQJ.js +1 -0
  1268. package/dist/client/assets/panels-right-bottom-Oy0GtnhM.js +1 -0
  1269. package/dist/client/assets/panels-top-left-Cc2nSdjw.js +1 -0
  1270. package/dist/client/assets/parasol-ufVKongX.js +1 -0
  1271. package/dist/client/assets/parentheses-B46a-ppZ.js +1 -0
  1272. package/dist/client/assets/parking-meter-BE1gzY-h.js +1 -0
  1273. package/dist/client/assets/party-popper-CJYvxESw.js +1 -0
  1274. package/dist/client/assets/passwordBootstrap-BF8HKmXV.js +2 -0
  1275. package/dist/client/assets/passwordBootstrap-BF8HKmXV.js.br +0 -0
  1276. package/dist/client/assets/passwordBootstrap-BF8HKmXV.js.gz +0 -0
  1277. package/dist/client/assets/pause-BkUQYJ6y.js +1 -0
  1278. package/dist/client/assets/paw-print-CCJ0QdY2.js +1 -0
  1279. package/dist/client/assets/pc-case-DD1isIs9.js +1 -0
  1280. package/dist/client/assets/pegDiagram-XKGWAZYB-DVAaQM1v.js +1 -0
  1281. package/dist/client/assets/pegDiagram-XKGWAZYB-DVAaQM1v.js.br +0 -0
  1282. package/dist/client/assets/pegDiagram-XKGWAZYB-DVAaQM1v.js.gz +0 -0
  1283. package/dist/client/assets/pen-CrEkikQR.js +1 -0
  1284. package/dist/client/assets/pen-line-CcJN1sNL.js +1 -0
  1285. package/dist/client/assets/pen-off-DjfHTFLB.js +1 -0
  1286. package/dist/client/assets/pen-tool-BZtaY220.js +1 -0
  1287. package/dist/client/assets/pencil-line-CJ7qfd8P.js +1 -0
  1288. package/dist/client/assets/pencil-off-DPgrXGM5.js +1 -0
  1289. package/dist/client/assets/pencil-ruler-Cz6tDDeC.js +1 -0
  1290. package/dist/client/assets/pentagon-CFAOC0Jq.js +1 -0
  1291. package/dist/client/assets/percent-e22p5HO2.js +1 -0
  1292. package/dist/client/assets/person-standing-DyesuHYj.js +1 -0
  1293. package/dist/client/assets/philippine-peso-CxUk52bW.js +1 -0
  1294. package/dist/client/assets/phone-Brvs0Zp6.js +1 -0
  1295. package/dist/client/assets/phone-call-DIYzW_fk.js +1 -0
  1296. package/dist/client/assets/phone-forwarded-CR9Ntu8-.js +1 -0
  1297. package/dist/client/assets/phone-incoming-CQa4UbYI.js +1 -0
  1298. package/dist/client/assets/phone-missed-BUqkN8y9.js +1 -0
  1299. package/dist/client/assets/phone-off-CnWctJPz.js +1 -0
  1300. package/dist/client/assets/phone-outgoing-Dy54vSi-.js +1 -0
  1301. package/dist/client/assets/pi-DHwPG5IB.js +1 -0
  1302. package/dist/client/assets/piano-D21aYUyr.js +1 -0
  1303. package/dist/client/assets/pickaxe-DPAiVCcB.js +1 -0
  1304. package/dist/client/assets/picture-in-picture-2-DQDeyP0o.js +1 -0
  1305. package/dist/client/assets/picture-in-picture-C3epgVEv.js +1 -0
  1306. package/dist/client/assets/pieDiagram-E7YTZNPT-DKJ3-Y5O.js +39 -0
  1307. package/dist/client/assets/pieDiagram-E7YTZNPT-DKJ3-Y5O.js.br +0 -0
  1308. package/dist/client/assets/pieDiagram-E7YTZNPT-DKJ3-Y5O.js.gz +0 -0
  1309. package/dist/client/assets/piggy-bank-CTpeEMgW.js +1 -0
  1310. package/dist/client/assets/pilcrow-BX-GG-N9.js +1 -0
  1311. package/dist/client/assets/pilcrow-left-7LrvsCx6.js +1 -0
  1312. package/dist/client/assets/pilcrow-right-Ctl4A3gG.js +1 -0
  1313. package/dist/client/assets/pill-Zk1e9Rkg.js +1 -0
  1314. package/dist/client/assets/pill-bottle-qQ1Og87K.js +1 -0
  1315. package/dist/client/assets/pipette-CikMKX7t.js +1 -0
  1316. package/dist/client/assets/pizza-B2PTi4Dm.js +1 -0
  1317. package/dist/client/assets/plane-Bcp0Yovu.js +1 -0
  1318. package/dist/client/assets/plane-landing-CDKquQ0f.js +1 -0
  1319. package/dist/client/assets/plane-takeoff-DmWghake.js +1 -0
  1320. package/dist/client/assets/play-Bu19BhWe.js +1 -0
  1321. package/dist/client/assets/plug-19-W7McZ.js +1 -0
  1322. package/dist/client/assets/plug-2-BbFa260B.js +1 -0
  1323. package/dist/client/assets/plug-zap-CWGTNp3M.js +1 -0
  1324. package/dist/client/assets/pocket-knife-Cu6wKyU2.js +1 -0
  1325. package/dist/client/assets/podcast-BlTGYFjY.js +1 -0
  1326. package/dist/client/assets/pointer-Cd_sgQRS.js +1 -0
  1327. package/dist/client/assets/pointer-off-COU7D-uv.js +1 -0
  1328. package/dist/client/assets/popcorn-Bn2BTShA.js +1 -0
  1329. package/dist/client/assets/popsicle-Bijmgyey.js +1 -0
  1330. package/dist/client/assets/pound-sterling-BzkBCxr8.js +1 -0
  1331. package/dist/client/assets/power-Dtifx8Tt.js +1 -0
  1332. package/dist/client/assets/power-off-CRRj-Et7.js +1 -0
  1333. package/dist/client/assets/presentation-D_t9xYFl.js +1 -0
  1334. package/dist/client/assets/printer-FLWexPu0.js +1 -0
  1335. package/dist/client/assets/printer-check-BQRJN8S7.js +1 -0
  1336. package/dist/client/assets/printer-x-BFsxhPS0.js +1 -0
  1337. package/dist/client/assets/projector-CF2ZXzMm.js +1 -0
  1338. package/dist/client/assets/proportions-Jx94Qaze.js +1 -0
  1339. package/dist/client/assets/puzzle-BZWiXM0m.js +1 -0
  1340. package/dist/client/assets/pyramid-DuHhW4qT.js +1 -0
  1341. package/dist/client/assets/quadrantDiagram-AXDQQJYC-D7BojI35.js +7 -0
  1342. package/dist/client/assets/quadrantDiagram-AXDQQJYC-D7BojI35.js.br +0 -0
  1343. package/dist/client/assets/quadrantDiagram-AXDQQJYC-D7BojI35.js.gz +0 -0
  1344. package/dist/client/assets/quote-Dl99G_Qx.js +1 -0
  1345. package/dist/client/assets/rabbit-BMDKbw_S.js +1 -0
  1346. package/dist/client/assets/radar-CIfiYNuC.js +1 -0
  1347. package/dist/client/assets/radiation-Aa2zte1g.js +1 -0
  1348. package/dist/client/assets/radical-CBfqRAp2.js +1 -0
  1349. package/dist/client/assets/radio-BDWv6awj.js +1 -0
  1350. package/dist/client/assets/radio-off-Bqio9pJH.js +1 -0
  1351. package/dist/client/assets/radio-receiver-Bxl6xFpd.js +1 -0
  1352. package/dist/client/assets/radio-tower-BpyD6h9X.js +1 -0
  1353. package/dist/client/assets/radius-H9bhlmpI.js +1 -0
  1354. package/dist/client/assets/railroadDiagram-O6MQD6OU-Bm-cgtsH.js +1 -0
  1355. package/dist/client/assets/railroadDiagram-O6MQD6OU-Bm-cgtsH.js.br +0 -0
  1356. package/dist/client/assets/railroadDiagram-O6MQD6OU-Bm-cgtsH.js.gz +0 -0
  1357. package/dist/client/assets/rainbow-B-jOb0vd.js +1 -0
  1358. package/dist/client/assets/rat-Bjwb16Ke.js +1 -0
  1359. package/dist/client/assets/ratio-CFdK_4u-.js +1 -0
  1360. package/dist/client/assets/rdpSession-ipoLaN_F.js +1 -0
  1361. package/dist/client/assets/rdpSession-ipoLaN_F.js.br +0 -0
  1362. package/dist/client/assets/rdpSession-ipoLaN_F.js.gz +0 -0
  1363. package/dist/client/assets/receipt-DnBnyN5G.js +1 -0
  1364. package/dist/client/assets/receipt-cent-DDbpJzU3.js +1 -0
  1365. package/dist/client/assets/receipt-euro-CJOSUxza.js +1 -0
  1366. package/dist/client/assets/receipt-indian-rupee-CsK6zsQt.js +1 -0
  1367. package/dist/client/assets/receipt-japanese-yen-B-M_7EEt.js +1 -0
  1368. package/dist/client/assets/receipt-pound-sterling-DZCgmdRt.js +1 -0
  1369. package/dist/client/assets/receipt-russian-ruble-kaNo6ig7.js +1 -0
  1370. package/dist/client/assets/receipt-swiss-franc-Cv-xGLY_.js +1 -0
  1371. package/dist/client/assets/receipt-text-CoEluHOb.js +1 -0
  1372. package/dist/client/assets/receipt-turkish-lira-CTz0LxWZ.js +1 -0
  1373. package/dist/client/assets/rectangle-circle-BBV37yi5.js +1 -0
  1374. package/dist/client/assets/rectangle-ellipsis-BQRmga5m.js +1 -0
  1375. package/dist/client/assets/rectangle-goggles-C3Ys-0E-.js +1 -0
  1376. package/dist/client/assets/rectangle-horizontal-Cbr7lgk4.js +1 -0
  1377. package/dist/client/assets/rectangle-vertical-D6GVVExV.js +1 -0
  1378. package/dist/client/assets/recycle-xJTvttlc.js +1 -0
  1379. package/dist/client/assets/redo-2-DKDjsMz9.js +1 -0
  1380. package/dist/client/assets/redo-B3N9HsyR.js +1 -0
  1381. package/dist/client/assets/redo-dot-XGlU-j-9.js +1 -0
  1382. package/dist/client/assets/referenceSelection-CGMa_B2n.js +4 -0
  1383. package/dist/client/assets/referenceSelection-CGMa_B2n.js.br +0 -0
  1384. package/dist/client/assets/referenceSelection-CGMa_B2n.js.gz +0 -0
  1385. package/dist/client/assets/refresh-ccw-CYMjO5xR.js +1 -0
  1386. package/dist/client/assets/refresh-ccw-dot-owTAvrK6.js +1 -0
  1387. package/dist/client/assets/refresh-cw-off-ivF1Bqvw.js +1 -0
  1388. package/dist/client/assets/refrigerator-BSHyMcAQ.js +1 -0
  1389. package/dist/client/assets/regex-VcfA42uY.js +1 -0
  1390. package/dist/client/assets/remove-formatting-CrCBdT4L.js +1 -0
  1391. package/dist/client/assets/repeat-1-ByR92NoX.js +1 -0
  1392. package/dist/client/assets/repeat-2-DZ1lH02c.js +1 -0
  1393. package/dist/client/assets/repeat-BopWqUvN.js +1 -0
  1394. package/dist/client/assets/repeat-off-gTapwQpQ.js +1 -0
  1395. package/dist/client/assets/replace-ER-4FVAS.js +1 -0
  1396. package/dist/client/assets/replace-all-CYozlGHx.js +1 -0
  1397. package/dist/client/assets/reply-CTIB01Pn.js +1 -0
  1398. package/dist/client/assets/reply-all-CTi3k45r.js +1 -0
  1399. package/dist/client/assets/requirementDiagram-BXWQKSXE-eSEOE1vg.js +84 -0
  1400. package/dist/client/assets/requirementDiagram-BXWQKSXE-eSEOE1vg.js.br +0 -0
  1401. package/dist/client/assets/requirementDiagram-BXWQKSXE-eSEOE1vg.js.gz +0 -0
  1402. package/dist/client/assets/rewind-BJXuosVR.js +1 -0
  1403. package/dist/client/assets/ribbon-CZlDsjuD.js +1 -0
  1404. package/dist/client/assets/road-Bad6WGkM.js +1 -0
  1405. package/dist/client/assets/rocking-chair-iW92U40e.js +1 -0
  1406. package/dist/client/assets/roller-coaster-CrCQOtH2.js +1 -0
  1407. package/dist/client/assets/rose-CXa4CcNM.js +1 -0
  1408. package/dist/client/assets/rotate-3d-BQrY8x4r.js +1 -0
  1409. package/dist/client/assets/rotate-ccw-key-B45JBdja.js +1 -0
  1410. package/dist/client/assets/rotate-ccw-square-B5DlmCVw.js +1 -0
  1411. package/dist/client/assets/rotate-cw-YKjB4Z-7.js +1 -0
  1412. package/dist/client/assets/rotate-cw-square-DHqMvUTR.js +1 -0
  1413. package/dist/client/assets/route-BpNvQG3o.js +1 -0
  1414. package/dist/client/assets/route-off-DLzLSjie.js +1 -0
  1415. package/dist/client/assets/router-DIKAmJkO.js +1 -0
  1416. package/dist/client/assets/rows-2-D0r48UAt.js +1 -0
  1417. package/dist/client/assets/rows-3-B4AIT5oN.js +1 -0
  1418. package/dist/client/assets/rows-4-DTdoVC6C.js +1 -0
  1419. package/dist/client/assets/rss-DpLpRGe5.js +1 -0
  1420. package/dist/client/assets/ruler-MpXWgsE2.js +1 -0
  1421. package/dist/client/assets/ruler-dimension-line-BXb4MMZK.js +1 -0
  1422. package/dist/client/assets/russian-ruble-Bdjo_2He.js +1 -0
  1423. package/dist/client/assets/sailboat-Bqw4QVBI.js +1 -0
  1424. package/dist/client/assets/salad-DyFBY7nn.js +1 -0
  1425. package/dist/client/assets/sandwich-H-IFI6Tz.js +1 -0
  1426. package/dist/client/assets/sankeyDiagram-P5KCCOFB-x-ydic-0.js +40 -0
  1427. package/dist/client/assets/sankeyDiagram-P5KCCOFB-x-ydic-0.js.br +0 -0
  1428. package/dist/client/assets/sankeyDiagram-P5KCCOFB-x-ydic-0.js.gz +0 -0
  1429. package/dist/client/assets/satellite-UsyY6lBg.js +1 -0
  1430. package/dist/client/assets/satellite-dish-Ah876uZA.js +1 -0
  1431. package/dist/client/assets/saudi-riyal-C4hExuKu.js +1 -0
  1432. package/dist/client/assets/save-DK17PlmM.js +1 -0
  1433. package/dist/client/assets/save-all-Bu7RRrlW.js +1 -0
  1434. package/dist/client/assets/save-off-DSqsQS5L.js +1 -0
  1435. package/dist/client/assets/scale-3d-Dm_97wgs.js +1 -0
  1436. package/dist/client/assets/scale-CboJVl89.js +1 -0
  1437. package/dist/client/assets/scaling-DawBFpkg.js +1 -0
  1438. package/dist/client/assets/scan-DnmziHEQ.js +1 -0
  1439. package/dist/client/assets/scan-barcode-D-QPZ1Po.js +1 -0
  1440. package/dist/client/assets/scan-eye-B_A5Iavq.js +1 -0
  1441. package/dist/client/assets/scan-face-DF61vi4j.js +1 -0
  1442. package/dist/client/assets/scan-heart-CyM8lI5M.js +1 -0
  1443. package/dist/client/assets/scan-line-CgSQwwmC.js +1 -0
  1444. package/dist/client/assets/scan-qr-code-BeWIKkQ-.js +1 -0
  1445. package/dist/client/assets/scan-search-DrkvUW53.js +1 -0
  1446. package/dist/client/assets/scan-text-BTm0aG2q.js +1 -0
  1447. package/dist/client/assets/school-LAfW__2u.js +1 -0
  1448. package/dist/client/assets/scissors-CbFYLICY.js +1 -0
  1449. package/dist/client/assets/scissors-line-dashed-BN9HtXPu.js +1 -0
  1450. package/dist/client/assets/scooter-C3Bqnrq6.js +1 -0
  1451. package/dist/client/assets/screen-share-KvXfHUVG.js +1 -0
  1452. package/dist/client/assets/screen-share-off-2EsdrInE.js +1 -0
  1453. package/dist/client/assets/scroll-CksZQsEu.js +1 -0
  1454. package/dist/client/assets/scroll-text-C4X1QQos.js +1 -0
  1455. package/dist/client/assets/search-DO7TweDR.js +1 -0
  1456. package/dist/client/assets/search-alert-CtErxfI6.js +1 -0
  1457. package/dist/client/assets/search-check-BXk4FN1e.js +1 -0
  1458. package/dist/client/assets/search-code-BrrO4DjL.js +1 -0
  1459. package/dist/client/assets/search-slash-DW0kmild.js +1 -0
  1460. package/dist/client/assets/search-x-C_GRxp06.js +1 -0
  1461. package/dist/client/assets/section-B2b_Jqek.js +1 -0
  1462. package/dist/client/assets/send-Cwq3J-bb.js +1 -0
  1463. package/dist/client/assets/send-horizontal-WkyKxINF.js +1 -0
  1464. package/dist/client/assets/send-to-back-BJqTvjFM.js +1 -0
  1465. package/dist/client/assets/separator-horizontal-D2aVlfi5.js +1 -0
  1466. package/dist/client/assets/separator-vertical-DaOWEZFF.js +1 -0
  1467. package/dist/client/assets/sequenceDiagram-WJ2MYXX4-B1YzXxjJ.js +162 -0
  1468. package/dist/client/assets/sequenceDiagram-WJ2MYXX4-B1YzXxjJ.js.br +0 -0
  1469. package/dist/client/assets/sequenceDiagram-WJ2MYXX4-B1YzXxjJ.js.gz +0 -0
  1470. package/dist/client/assets/server-cog-B-u_FT9r.js +1 -0
  1471. package/dist/client/assets/server-crash-D5hgPwqS.js +1 -0
  1472. package/dist/client/assets/server-off-DNOQ45BQ.js +1 -0
  1473. package/dist/client/assets/sessionChatStartup-5U_Wktvd.js +1 -0
  1474. package/dist/client/assets/sessionChatStartup-5U_Wktvd.js.br +0 -0
  1475. package/dist/client/assets/sessionChatStartup-5U_Wktvd.js.gz +0 -0
  1476. package/dist/client/assets/settings-2-mpSuxAGL.js +1 -0
  1477. package/dist/client/assets/settings-D7R8yWqs.js +1 -0
  1478. package/dist/client/assets/shapes-CdkeCQyy.js +1 -0
  1479. package/dist/client/assets/share-CXirOlwW.js +1 -0
  1480. package/dist/client/assets/sheet-h1Ec_obz.js +1 -0
  1481. package/dist/client/assets/shell-C1XTKVhR.js +1 -0
  1482. package/dist/client/assets/shelving-unit-CbRYeMKd.js +1 -0
  1483. package/dist/client/assets/shield-DX961WIO.js +1 -0
  1484. package/dist/client/assets/shield-alert-8T6sylNd.js +1 -0
  1485. package/dist/client/assets/shield-ban-DEQxlGnq.js +1 -0
  1486. package/dist/client/assets/shield-check-Czav1itR.js +1 -0
  1487. package/dist/client/assets/shield-cog-B_eMrG2P.js +1 -0
  1488. package/dist/client/assets/shield-cog-corner-CUEB43iO.js +1 -0
  1489. package/dist/client/assets/shield-ellipsis-Df7ts056.js +1 -0
  1490. package/dist/client/assets/shield-half-CKVxKMML.js +1 -0
  1491. package/dist/client/assets/shield-minus-BcXfS-da.js +1 -0
  1492. package/dist/client/assets/shield-off-VaKkQxps.js +1 -0
  1493. package/dist/client/assets/shield-plus-DbJigF71.js +1 -0
  1494. package/dist/client/assets/shield-question-mark-BgMlTrzk.js +1 -0
  1495. package/dist/client/assets/shield-user-CqapApet.js +1 -0
  1496. package/dist/client/assets/shield-x-BnFWHDaj.js +1 -0
  1497. package/dist/client/assets/ship-BuxiQY6_.js +1 -0
  1498. package/dist/client/assets/ship-wheel--c6D48z8.js +1 -0
  1499. package/dist/client/assets/shirt-zkUaUgC9.js +1 -0
  1500. package/dist/client/assets/shopping-bag-hinyl1-v.js +1 -0
  1501. package/dist/client/assets/shopping-basket-hweRXRll.js +1 -0
  1502. package/dist/client/assets/shopping-cart-DDNHX9gp.js +1 -0
  1503. package/dist/client/assets/shovel-DI33jXkP.js +1 -0
  1504. package/dist/client/assets/shower-head-CJCOw1HD.js +1 -0
  1505. package/dist/client/assets/shredder-B0_cN8V9.js +1 -0
  1506. package/dist/client/assets/shrimp-DM3e0cyl.js +1 -0
  1507. package/dist/client/assets/shrink-9h6knURW.js +1 -0
  1508. package/dist/client/assets/shrub-BPdEkz1o.js +1 -0
  1509. package/dist/client/assets/shuffle-DrhobO4W.js +1 -0
  1510. package/dist/client/assets/sigma-BdHWI_P8.js +1 -0
  1511. package/dist/client/assets/signal-WbvpjHUv.js +1 -0
  1512. package/dist/client/assets/signal-high-Dwvd29LZ.js +1 -0
  1513. package/dist/client/assets/signal-low-BKC8HGkM.js +1 -0
  1514. package/dist/client/assets/signal-medium-BPXHmoRo.js +1 -0
  1515. package/dist/client/assets/signal-zero-X96AgtxH.js +1 -0
  1516. package/dist/client/assets/signature-i8kh1Zi_.js +1 -0
  1517. package/dist/client/assets/signpost-C-RNhYaj.js +1 -0
  1518. package/dist/client/assets/signpost-big-DQrYrXtc.js +1 -0
  1519. package/dist/client/assets/siren-CEYD_PY_.js +1 -0
  1520. package/dist/client/assets/sizeCapture-INFHLROL-B8O-MKp4.js +1 -0
  1521. package/dist/client/assets/sizeCapture-INFHLROL-B8O-MKp4.js.br +0 -0
  1522. package/dist/client/assets/sizeCapture-INFHLROL-B8O-MKp4.js.gz +0 -0
  1523. package/dist/client/assets/skip-back-CUYgskSO.js +1 -0
  1524. package/dist/client/assets/skip-forward-COIvpvJE.js +1 -0
  1525. package/dist/client/assets/skull-jnoQSXc_.js +1 -0
  1526. package/dist/client/assets/slash-D2QTyd-7.js +1 -0
  1527. package/dist/client/assets/slice-C-XIrcC2.js +1 -0
  1528. package/dist/client/assets/sliders-horizontal-pWhs9tf8.js +1 -0
  1529. package/dist/client/assets/sliders-vertical-FzCMgz2f.js +1 -0
  1530. package/dist/client/assets/smartphone-charging-qqX7vsXq.js +1 -0
  1531. package/dist/client/assets/smartphone-nfc-DUfgSOMJ.js +1 -0
  1532. package/dist/client/assets/smile--DaqpTP2.js +1 -0
  1533. package/dist/client/assets/smile-plus-BwNugHpF.js +1 -0
  1534. package/dist/client/assets/snail-CJ5klIS2.js +1 -0
  1535. package/dist/client/assets/snowflake-CICGWLew.js +1 -0
  1536. package/dist/client/assets/soap-dispenser-droplet-z0s9eNtF.js +1 -0
  1537. package/dist/client/assets/sofa-C1PqECnS.js +1 -0
  1538. package/dist/client/assets/solar-panel-Bz28fHqF.js +1 -0
  1539. package/dist/client/assets/soup-Bqmwe0N6.js +1 -0
  1540. package/dist/client/assets/space-oROypLTm.js +1 -0
  1541. package/dist/client/assets/spade-BLEFXdK2.js +1 -0
  1542. package/dist/client/assets/sparkle-DGgjpo6U.js +1 -0
  1543. package/dist/client/assets/speaker-BafLcriT.js +1 -0
  1544. package/dist/client/assets/speech-chR6VBBo.js +1 -0
  1545. package/dist/client/assets/spell-check-2-Bx_FnEgT.js +1 -0
  1546. package/dist/client/assets/spell-check-Bp5YFC5S.js +1 -0
  1547. package/dist/client/assets/spline-c--YKvx8.js +1 -0
  1548. package/dist/client/assets/spline-pointer-Cr70MUjs.js +1 -0
  1549. package/dist/client/assets/split-BlQG958a.js +1 -0
  1550. package/dist/client/assets/spool-BLyem9NO.js +1 -0
  1551. package/dist/client/assets/sport-shoe-CqzROyUU.js +1 -0
  1552. package/dist/client/assets/spotlight-D33Ktld2.js +1 -0
  1553. package/dist/client/assets/spray-can-DcbjEao0.js +1 -0
  1554. package/dist/client/assets/sprout-D3LbLFPD.js +1 -0
  1555. package/dist/client/assets/square-activity-CX7Cgx_S.js +1 -0
  1556. package/dist/client/assets/square-arrow-down-BeQ6mJpU.js +1 -0
  1557. package/dist/client/assets/square-arrow-down-left-CrS5iW2K.js +1 -0
  1558. package/dist/client/assets/square-arrow-down-right-D2byst8P.js +1 -0
  1559. package/dist/client/assets/square-arrow-left-Bljaals3.js +1 -0
  1560. package/dist/client/assets/square-arrow-out-down-left-CNjNEIfG.js +1 -0
  1561. package/dist/client/assets/square-arrow-out-down-right-VljH1ivZ.js +1 -0
  1562. package/dist/client/assets/square-arrow-out-up-left-CO1c1PCG.js +1 -0
  1563. package/dist/client/assets/square-arrow-right-ColJn7Hm.js +1 -0
  1564. package/dist/client/assets/square-arrow-right-enter-BHJpMJ41.js +1 -0
  1565. package/dist/client/assets/square-arrow-right-exit-Bo5s7hGL.js +1 -0
  1566. package/dist/client/assets/square-arrow-up-B3Ne6G7Y.js +1 -0
  1567. package/dist/client/assets/square-arrow-up-left-iqBVJA_L.js +1 -0
  1568. package/dist/client/assets/square-arrow-up-right-B3tTFbPQ.js +1 -0
  1569. package/dist/client/assets/square-asterisk-DqVaLWe1.js +1 -0
  1570. package/dist/client/assets/square-bottom-dashed-scissors-BV3vyfRK.js +1 -0
  1571. package/dist/client/assets/square-centerline-dashed-horizontal-1ghlM4gA.js +1 -0
  1572. package/dist/client/assets/square-centerline-dashed-vertical--boW3vQV.js +1 -0
  1573. package/dist/client/assets/square-chart-gantt-Kp77pL0S.js +1 -0
  1574. package/dist/client/assets/square-check-BUHh9nBC.js +1 -0
  1575. package/dist/client/assets/square-check-big-BqVEeWps.js +1 -0
  1576. package/dist/client/assets/square-chevron-down-DQtB_s0Y.js +1 -0
  1577. package/dist/client/assets/square-chevron-left-1wruv14y.js +1 -0
  1578. package/dist/client/assets/square-chevron-right-C0LLEU6Q.js +1 -0
  1579. package/dist/client/assets/square-chevron-up-C0Mbz0Z7.js +1 -0
  1580. package/dist/client/assets/square-code-Df4mwcLc.js +1 -0
  1581. package/dist/client/assets/square-dashed-BSeGVAkr.js +1 -0
  1582. package/dist/client/assets/square-dashed-bottom-BBAe1gCD.js +1 -0
  1583. package/dist/client/assets/square-dashed-bottom-code-BndSYlEI.js +1 -0
  1584. package/dist/client/assets/square-dashed-kanban-DlsiEX0R.js +1 -0
  1585. package/dist/client/assets/square-dashed-mouse-pointer-6H9Aj07e.js +1 -0
  1586. package/dist/client/assets/square-dashed-text-CwsH8Wu1.js +1 -0
  1587. package/dist/client/assets/square-dashed-top-solid-c2YcBZEU.js +1 -0
  1588. package/dist/client/assets/square-divide-BM9txBHm.js +1 -0
  1589. package/dist/client/assets/square-dot-CJEh2W_k.js +1 -0
  1590. package/dist/client/assets/square-equal-CjILvpan.js +1 -0
  1591. package/dist/client/assets/square-function-DSLM5Uwz.js +1 -0
  1592. package/dist/client/assets/square-kanban-B4DzG_Ct.js +1 -0
  1593. package/dist/client/assets/square-library-CoOdXFxe.js +1 -0
  1594. package/dist/client/assets/square-m-BTYQ0c-v.js +1 -0
  1595. package/dist/client/assets/square-menu-BtWEpo44.js +1 -0
  1596. package/dist/client/assets/square-minus-DttRpSa_.js +1 -0
  1597. package/dist/client/assets/square-mouse-pointer-C5trwtku.js +1 -0
  1598. package/dist/client/assets/square-parking-off-BluVIPxM.js +1 -0
  1599. package/dist/client/assets/square-parking-yoTMOThM.js +1 -0
  1600. package/dist/client/assets/square-pause-Cc6Dkx6a.js +1 -0
  1601. package/dist/client/assets/square-pen-B9DCzI7v.js +1 -0
  1602. package/dist/client/assets/square-percent-BCCYk8KO.js +1 -0
  1603. package/dist/client/assets/square-pi-_07g6wwi.js +1 -0
  1604. package/dist/client/assets/square-pilcrow-BOL2Wkwl.js +1 -0
  1605. package/dist/client/assets/square-play-BMd-nlRt.js +1 -0
  1606. package/dist/client/assets/square-plus-seDNcGXS.js +1 -0
  1607. package/dist/client/assets/square-power-CornoZ7m.js +1 -0
  1608. package/dist/client/assets/square-radical-rK2KlPPP.js +1 -0
  1609. package/dist/client/assets/square-round-corner-Bi7NfGNP.js +1 -0
  1610. package/dist/client/assets/square-s2QWD8aH.js +1 -0
  1611. package/dist/client/assets/square-scissors-DwH1B4Oz.js +1 -0
  1612. package/dist/client/assets/square-sigma-DSMgeDWe.js +1 -0
  1613. package/dist/client/assets/square-slash-ELcSS_0l.js +1 -0
  1614. package/dist/client/assets/square-split-horizontal-BQZYpiAR.js +1 -0
  1615. package/dist/client/assets/square-split-vertical-DKRdW3ux.js +1 -0
  1616. package/dist/client/assets/square-square-eZnS_hLW.js +1 -0
  1617. package/dist/client/assets/square-stack-CAGfOUOf.js +1 -0
  1618. package/dist/client/assets/square-star-CVNDrW75.js +1 -0
  1619. package/dist/client/assets/square-stop-rzfb01Gq.js +1 -0
  1620. package/dist/client/assets/square-user-DTlGKcPq.js +1 -0
  1621. package/dist/client/assets/square-user-round-BR-0wB2O.js +1 -0
  1622. package/dist/client/assets/square-x-UOooUQLK.js +1 -0
  1623. package/dist/client/assets/squares-exclude-DonwE4FR.js +1 -0
  1624. package/dist/client/assets/squares-intersect-DbcDLdTm.js +1 -0
  1625. package/dist/client/assets/squares-subtract-ChuIwpMQ.js +1 -0
  1626. package/dist/client/assets/squares-unite-B8Qdxe-O.js +1 -0
  1627. package/dist/client/assets/squircle-DYmz4LtC.js +1 -0
  1628. package/dist/client/assets/squircle-dashed-CjgmSJ-O.js +1 -0
  1629. package/dist/client/assets/squirrel-DWhW7LL_.js +1 -0
  1630. package/dist/client/assets/stamp-Cy3fBrgs.js +1 -0
  1631. package/dist/client/assets/star-DVFb3ryo.js +1 -0
  1632. package/dist/client/assets/star-half-CjhbGNPv.js +1 -0
  1633. package/dist/client/assets/star-off-DA0tr_AF.js +1 -0
  1634. package/dist/client/assets/stateDiagram-D77RDMKH-D_H49R6x.js +1 -0
  1635. package/dist/client/assets/stateDiagram-D77RDMKH-D_H49R6x.js.br +0 -0
  1636. package/dist/client/assets/stateDiagram-D77RDMKH-D_H49R6x.js.gz +0 -0
  1637. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-BMcbfylv.js +1 -0
  1638. package/dist/client/assets/step-back-eNWbIQRS.js +1 -0
  1639. package/dist/client/assets/step-forward-WvUrwHMP.js +1 -0
  1640. package/dist/client/assets/stethoscope-DofGt2A3.js +1 -0
  1641. package/dist/client/assets/sticker-BcTlxfXb.js +1 -0
  1642. package/dist/client/assets/sticky-note-5wUG6Jy_.js +1 -0
  1643. package/dist/client/assets/sticky-note-check-gm2p1lcO.js +1 -0
  1644. package/dist/client/assets/sticky-note-minus-Cf-q228U.js +1 -0
  1645. package/dist/client/assets/sticky-note-off-HMDBfxWl.js +1 -0
  1646. package/dist/client/assets/sticky-note-plus-C9mcRqQC.js +1 -0
  1647. package/dist/client/assets/sticky-note-x-6VyRGCZg.js +1 -0
  1648. package/dist/client/assets/sticky-notes-Cu8qWMCP.js +1 -0
  1649. package/dist/client/assets/stone-BKlujj8D.js +1 -0
  1650. package/dist/client/assets/store-B__6GsFl.js +1 -0
  1651. package/dist/client/assets/stretch-horizontal-CRTSnYXP.js +1 -0
  1652. package/dist/client/assets/stretch-vertical-A1eTlAbg.js +1 -0
  1653. package/dist/client/assets/strikethrough-8cXHHVox.js +1 -0
  1654. package/dist/client/assets/subscript-C3YYTT8C.js +1 -0
  1655. package/dist/client/assets/sun-CEmVZgH5.js +1 -0
  1656. package/dist/client/assets/sun-dim-nX8yDXiS.js +1 -0
  1657. package/dist/client/assets/sun-medium-DrmFQyVC.js +1 -0
  1658. package/dist/client/assets/sun-moon-Bkm8WrPR.js +1 -0
  1659. package/dist/client/assets/sun-snow-CEa5JZFx.js +1 -0
  1660. package/dist/client/assets/sunrise-CDZ8Ku0t.js +1 -0
  1661. package/dist/client/assets/sunset-CfwocNg8.js +1 -0
  1662. package/dist/client/assets/superscript-yTK5cf6O.js +1 -0
  1663. package/dist/client/assets/swatch-book-BC0uv2mw.js +1 -0
  1664. package/dist/client/assets/swimlanes-42K2YHIH-BeFk0ZOE.js +1 -0
  1665. package/dist/client/assets/swimlanes-42K2YHIH-BeFk0ZOE.js.br +0 -0
  1666. package/dist/client/assets/swimlanes-42K2YHIH-BeFk0ZOE.js.gz +0 -0
  1667. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-CVsL7WKt.js +8 -0
  1668. package/dist/client/assets/swiper-HQML44_F.js +1 -0
  1669. package/dist/client/assets/swiper-HQML44_F.js.br +0 -0
  1670. package/dist/client/assets/swiper-HQML44_F.js.gz +0 -0
  1671. package/dist/client/assets/swiss-franc-CXm3IvQY.js +1 -0
  1672. package/dist/client/assets/switch-camera-DjpGCMR9.js +1 -0
  1673. package/dist/client/assets/sword--hY5-teL.js +1 -0
  1674. package/dist/client/assets/swords-CW3bNU0z.js +1 -0
  1675. package/dist/client/assets/syringe-CM-j37cM.js +1 -0
  1676. package/dist/client/assets/table-2-DW-Uk5u7.js +1 -0
  1677. package/dist/client/assets/table-CSLeTp9S.js +1 -0
  1678. package/dist/client/assets/table-cells-merge-kDXD_z-s.js +1 -0
  1679. package/dist/client/assets/table-cells-split-BHSj3eoD.js +1 -0
  1680. package/dist/client/assets/table-columns-split-CdTzWU5X.js +1 -0
  1681. package/dist/client/assets/table-of-contents-DysEAClu.js +1 -0
  1682. package/dist/client/assets/table-properties-Bw5q_Ufl.js +1 -0
  1683. package/dist/client/assets/table-rows-split-DdotEC0P.js +1 -0
  1684. package/dist/client/assets/tablet-BKGd3piG.js +1 -0
  1685. package/dist/client/assets/tablet-smartphone-DKAkp7nM.js +1 -0
  1686. package/dist/client/assets/tablets-Bvg0AJaf.js +1 -0
  1687. package/dist/client/assets/tag-Ddi2qSa8.js +1 -0
  1688. package/dist/client/assets/tags-BZrvGEyg.js +1 -0
  1689. package/dist/client/assets/tally-1-BKbX6ZPm.js +1 -0
  1690. package/dist/client/assets/tally-2-BDw-8289.js +1 -0
  1691. package/dist/client/assets/tally-3-Br5DSGpF.js +1 -0
  1692. package/dist/client/assets/tally-4-CXgU7-iB.js +1 -0
  1693. package/dist/client/assets/tally-5-Ldnio3Hw.js +1 -0
  1694. package/dist/client/assets/tangent-DdOs6Z-l.js +1 -0
  1695. package/dist/client/assets/target-Bnn0eSJD.js +1 -0
  1696. package/dist/client/assets/telescope-Btj8EiCO.js +1 -0
  1697. package/dist/client/assets/tent-BNcA0Ckr.js +1 -0
  1698. package/dist/client/assets/tent-tree-BswT9NEl.js +1 -0
  1699. package/dist/client/assets/test-tube-TDqGnIL1.js +1 -0
  1700. package/dist/client/assets/test-tube-diagonal-Dxj2bGXk.js +1 -0
  1701. package/dist/client/assets/test-tubes-DB5SGEBB.js +1 -0
  1702. package/dist/client/assets/text-align-center-Mu3izzJ-.js +1 -0
  1703. package/dist/client/assets/text-align-end-F3vE-OTU.js +1 -0
  1704. package/dist/client/assets/text-align-justify-BYeQ3XNv.js +1 -0
  1705. package/dist/client/assets/text-align-start-CX-Q9wji.js +1 -0
  1706. package/dist/client/assets/text-cursor-JwFSsayG.js +1 -0
  1707. package/dist/client/assets/text-cursor-input-CQD59fKB.js +1 -0
  1708. package/dist/client/assets/text-initial-B_y-Wnq_.js +1 -0
  1709. package/dist/client/assets/text-quote-Cjmpcasq.js +1 -0
  1710. package/dist/client/assets/text-search-BbKX4NeB.js +1 -0
  1711. package/dist/client/assets/text-wrap-DDEsqE9F.js +1 -0
  1712. package/dist/client/assets/theater-Upq5FczA.js +1 -0
  1713. package/dist/client/assets/thermometer-CSa9Xfix.js +1 -0
  1714. package/dist/client/assets/thermometer-snowflake-Dt-wvDpF.js +1 -0
  1715. package/dist/client/assets/thermometer-sun-BrH-UAel.js +1 -0
  1716. package/dist/client/assets/thumbs-down-DJFqEHlr.js +1 -0
  1717. package/dist/client/assets/thumbs-up-1WneQhim.js +1 -0
  1718. package/dist/client/assets/ticket-check-CyJHgFaW.js +1 -0
  1719. package/dist/client/assets/ticket-minus-D91QkYEu.js +1 -0
  1720. package/dist/client/assets/ticket-percent-DgvFZiah.js +1 -0
  1721. package/dist/client/assets/ticket-plus-DANoGU1a.js +1 -0
  1722. package/dist/client/assets/ticket-slash-CAVLgytA.js +1 -0
  1723. package/dist/client/assets/ticket-vCUEP7QT.js +1 -0
  1724. package/dist/client/assets/ticket-x-sq3-HkoN.js +1 -0
  1725. package/dist/client/assets/tickets-C-6Mx8_t.js +1 -0
  1726. package/dist/client/assets/tickets-plane-KW31WAwn.js +1 -0
  1727. package/dist/client/assets/timeline-DAYSA-7K.js +1 -0
  1728. package/dist/client/assets/timeline-definition-24CTP7MA-D230Qlos.js +120 -0
  1729. package/dist/client/assets/timeline-definition-24CTP7MA-D230Qlos.js.br +0 -0
  1730. package/dist/client/assets/timeline-definition-24CTP7MA-D230Qlos.js.gz +0 -0
  1731. package/dist/client/assets/timer-BYfkGLGL.js +1 -0
  1732. package/dist/client/assets/timer-off-C1SsfUQ5.js +1 -0
  1733. package/dist/client/assets/timer-reset-DuTVPtvO.js +1 -0
  1734. package/dist/client/assets/toggle-left-C9D_UTKk.js +1 -0
  1735. package/dist/client/assets/toggle-right-Zw5ACBTf.js +1 -0
  1736. package/dist/client/assets/toilet-Dl9jVpuW.js +1 -0
  1737. package/dist/client/assets/tool-case-Bib4EsP1.js +1 -0
  1738. package/dist/client/assets/toolbox-e56UyL4S.js +1 -0
  1739. package/dist/client/assets/tornado-jprywTko.js +1 -0
  1740. package/dist/client/assets/torus-BI4GtzUw.js +1 -0
  1741. package/dist/client/assets/touchpad-B6Aev-0u.js +1 -0
  1742. package/dist/client/assets/touchpad-off-pLPX2PnG.js +1 -0
  1743. package/dist/client/assets/towel-rack-EWvgG_mr.js +1 -0
  1744. package/dist/client/assets/tower-control-DGyldro_.js +1 -0
  1745. package/dist/client/assets/toy-brick-B0kGHefL.js +1 -0
  1746. package/dist/client/assets/tractor-DIbuEF7d.js +1 -0
  1747. package/dist/client/assets/traffic-cone-DwZ95KKG.js +1 -0
  1748. package/dist/client/assets/train-front-B_7HTQVV.js +1 -0
  1749. package/dist/client/assets/train-front-tunnel-BE0eN7hi.js +1 -0
  1750. package/dist/client/assets/train-track-ia5VMFid.js +1 -0
  1751. package/dist/client/assets/tram-front-DbgsifPV.js +1 -0
  1752. package/dist/client/assets/transgender-5Jl7sqJ8.js +1 -0
  1753. package/dist/client/assets/trash-BgWibxrO.js +1 -0
  1754. package/dist/client/assets/tree-deciduous-Ca_aH4pq.js +1 -0
  1755. package/dist/client/assets/tree-palm-DVbyPCHV.js +1 -0
  1756. package/dist/client/assets/tree-pine-BgWJjk_a.js +1 -0
  1757. package/dist/client/assets/trees-B-Jfk2cf.js +1 -0
  1758. package/dist/client/assets/trending-down-BSZGqf9a.js +1 -0
  1759. package/dist/client/assets/trending-up-BVrGdGpm.js +1 -0
  1760. package/dist/client/assets/trending-up-down-CH6yEFHI.js +1 -0
  1761. package/dist/client/assets/triangle-BcW24yDu.js +1 -0
  1762. package/dist/client/assets/triangle-alert-Bo7zdybT.js +1 -0
  1763. package/dist/client/assets/triangle-dashed-CO1zChSH.js +1 -0
  1764. package/dist/client/assets/triangle-right-BPFYHGCP.js +1 -0
  1765. package/dist/client/assets/trophy-B7tbPL97.js +1 -0
  1766. package/dist/client/assets/truck-BYJTHXJx.js +1 -0
  1767. package/dist/client/assets/truck-electric-DBc5HrJ7.js +1 -0
  1768. package/dist/client/assets/turkish-lira-BmWE3JyH.js +1 -0
  1769. package/dist/client/assets/turntable-BvoHmhsM.js +1 -0
  1770. package/dist/client/assets/turtle-iECjQFeW.js +1 -0
  1771. package/dist/client/assets/tv-Db-jUJf-.js +1 -0
  1772. package/dist/client/assets/tv-minimal-play-C9AQJq2k.js +1 -0
  1773. package/dist/client/assets/tv-minimal-rZ28A7ZR.js +1 -0
  1774. package/dist/client/assets/type-DrcvARhn.js +1 -0
  1775. package/dist/client/assets/type-outline-CCGLhIjB.js +1 -0
  1776. package/dist/client/assets/umbrella-DcmTmKDd.js +1 -0
  1777. package/dist/client/assets/umbrella-off-quUGutbj.js +1 -0
  1778. package/dist/client/assets/underline-BAklurbo.js +1 -0
  1779. package/dist/client/assets/undo-2-um_j5RD-.js +1 -0
  1780. package/dist/client/assets/undo-C0mye3o8.js +1 -0
  1781. package/dist/client/assets/undo-dot-HkSHho0_.js +1 -0
  1782. package/dist/client/assets/unfold-horizontal-DLU8Pnrd.js +1 -0
  1783. package/dist/client/assets/unfold-vertical-5H0DR3O-.js +1 -0
  1784. package/dist/client/assets/ungroup-nNAlCiK_.js +1 -0
  1785. package/dist/client/assets/university-CydGPeKz.js +1 -0
  1786. package/dist/client/assets/unlink-2-B65jbEen.js +1 -0
  1787. package/dist/client/assets/unlink-BnSlLrEp.js +1 -0
  1788. package/dist/client/assets/unplug-CIs9h9Fn.js +1 -0
  1789. package/dist/client/assets/upload-Bq8VkxNP.js +1 -0
  1790. package/dist/client/assets/usb-Clcr23Qy.js +1 -0
  1791. package/dist/client/assets/use-gesture-react.esm-BoHm6IWK.js +1 -0
  1792. package/dist/client/assets/use-gesture-react.esm-BoHm6IWK.js.br +0 -0
  1793. package/dist/client/assets/use-gesture-react.esm-BoHm6IWK.js.gz +0 -0
  1794. package/dist/client/assets/user-DYPThpQt.js +1 -0
  1795. package/dist/client/assets/user-check-D3zaQH6Z.js +1 -0
  1796. package/dist/client/assets/user-cog-CU5PVWYG.js +1 -0
  1797. package/dist/client/assets/user-key-Dw_60Y94.js +1 -0
  1798. package/dist/client/assets/user-lock-XimY1Ruo.js +1 -0
  1799. package/dist/client/assets/user-minus-BghKx4Cr.js +1 -0
  1800. package/dist/client/assets/user-pen-Rp3r3iLh.js +1 -0
  1801. package/dist/client/assets/user-plus-DdbN6NAn.js +1 -0
  1802. package/dist/client/assets/user-round-BG8Jh8nb.js +1 -0
  1803. package/dist/client/assets/user-round-check-Di5fp_NP.js +1 -0
  1804. package/dist/client/assets/user-round-cog-BXaHf12p.js +1 -0
  1805. package/dist/client/assets/user-round-key-CJHj-IpF.js +1 -0
  1806. package/dist/client/assets/user-round-minus-C8Jjlx38.js +1 -0
  1807. package/dist/client/assets/user-round-pen-BXpf-52W.js +1 -0
  1808. package/dist/client/assets/user-round-plus-CBeKxocZ.js +1 -0
  1809. package/dist/client/assets/user-round-search-DCegXsnF.js +1 -0
  1810. package/dist/client/assets/user-round-x-CDQotbV2.js +1 -0
  1811. package/dist/client/assets/user-search-CMd6RJ2K.js +1 -0
  1812. package/dist/client/assets/user-star-H7sSwFWS.js +1 -0
  1813. package/dist/client/assets/user-x-DuWfLQRK.js +1 -0
  1814. package/dist/client/assets/users-DYKLsjP_.js +1 -0
  1815. package/dist/client/assets/users-round-B5OSvEw1.js +1 -0
  1816. package/dist/client/assets/utensils-CUfS1VIl.js +1 -0
  1817. package/dist/client/assets/utensils-crossed-CW-19CQa.js +1 -0
  1818. package/dist/client/assets/utility-pole-DSZR_T42.js +1 -0
  1819. package/dist/client/assets/van-nDY0m1dL.js +1 -0
  1820. package/dist/client/assets/variable-CJEGjT85.js +1 -0
  1821. package/dist/client/assets/vault-D7EtsKzF.js +1 -0
  1822. package/dist/client/assets/vector-square-DFqwDpgU.js +1 -0
  1823. package/dist/client/assets/vegan-Dkfjtshg.js +1 -0
  1824. package/dist/client/assets/venetian-mask-BPhVLVdp.js +1 -0
  1825. package/dist/client/assets/vennDiagram-4TSXK5OY-DHIwZyjP.js +34 -0
  1826. package/dist/client/assets/vennDiagram-4TSXK5OY-DHIwZyjP.js.br +0 -0
  1827. package/dist/client/assets/vennDiagram-4TSXK5OY-DHIwZyjP.js.gz +0 -0
  1828. package/dist/client/assets/venus-and-mars-DuhRK8vv.js +1 -0
  1829. package/dist/client/assets/venus-nNgjNWj8.js +1 -0
  1830. package/dist/client/assets/vibrate-CoAXqj9f.js +1 -0
  1831. package/dist/client/assets/vibrate-off-DqM2LJV1.js +1 -0
  1832. package/dist/client/assets/video-off-DC3efLu1.js +1 -0
  1833. package/dist/client/assets/videoCompression-zwKxMCNz.js +3 -0
  1834. package/dist/client/assets/videoCompression-zwKxMCNz.js.br +0 -0
  1835. package/dist/client/assets/videoCompression-zwKxMCNz.js.gz +0 -0
  1836. package/dist/client/assets/videotape-D2tAY2Ch.js +1 -0
  1837. package/dist/client/assets/view-CgrZPoKF.js +1 -0
  1838. package/dist/client/assets/voicemail-C_2mxDF6.js +1 -0
  1839. package/dist/client/assets/volleyball-C2voEcRj.js +1 -0
  1840. package/dist/client/assets/volume-1-BnnH38xp.js +1 -0
  1841. package/dist/client/assets/volume-2-DyNqOgau.js +1 -0
  1842. package/dist/client/assets/volume-DziZYx83.js +1 -0
  1843. package/dist/client/assets/volume-off-BZFB1IbQ.js +1 -0
  1844. package/dist/client/assets/volume-x-CsySthcK.js +1 -0
  1845. package/dist/client/assets/vote-ZTWQdw0-.js +1 -0
  1846. package/dist/client/assets/wallet-0Eb6Viwz.js +1 -0
  1847. package/dist/client/assets/wallet-cards-Dt7zAJqM.js +1 -0
  1848. package/dist/client/assets/wallet-minimal-BZetuuwH.js +1 -0
  1849. package/dist/client/assets/wallpaper-BsG6Obzk.js +1 -0
  1850. package/dist/client/assets/wand-DGwngPKr.js +1 -0
  1851. package/dist/client/assets/wand-sparkles-BTokHl9r.js +1 -0
  1852. package/dist/client/assets/wardleyDiagram-VM6X3IG4-CGY9_Btg.js +78 -0
  1853. package/dist/client/assets/wardleyDiagram-VM6X3IG4-CGY9_Btg.js.br +0 -0
  1854. package/dist/client/assets/wardleyDiagram-VM6X3IG4-CGY9_Btg.js.gz +0 -0
  1855. package/dist/client/assets/warehouse-LAv0WNB_.js +1 -0
  1856. package/dist/client/assets/washing-machine-hVh3INt0.js +1 -0
  1857. package/dist/client/assets/watch-DXwng4ty.js +1 -0
  1858. package/dist/client/assets/waves-arrow-down-Bi0o0xXT.js +1 -0
  1859. package/dist/client/assets/waves-arrow-up-BeL02Qx1.js +1 -0
  1860. package/dist/client/assets/waves-horizontal-Bur3YUu6.js +1 -0
  1861. package/dist/client/assets/waves-ladder-CK6OpcXj.js +1 -0
  1862. package/dist/client/assets/waves-vertical-DJz3D03m.js +1 -0
  1863. package/dist/client/assets/waypoints-C3iS1SJw.js +1 -0
  1864. package/dist/client/assets/webcam-DoyQK7Bi.js +1 -0
  1865. package/dist/client/assets/webhook-DziMma4Z.js +1 -0
  1866. package/dist/client/assets/webhook-off-Bao4YwCa.js +1 -0
  1867. package/dist/client/assets/weight-CpAEuAyb.js +1 -0
  1868. package/dist/client/assets/weight-tilde-BUrZjNID.js +1 -0
  1869. package/dist/client/assets/wheat-B6hyBFx8.js +1 -0
  1870. package/dist/client/assets/wheat-off-OsGywhp7.js +1 -0
  1871. package/dist/client/assets/whole-word-DY2l5M3I.js +1 -0
  1872. package/dist/client/assets/wifi-CQCWpCTy.js +1 -0
  1873. package/dist/client/assets/wifi-cog-CsX1TRAG.js +1 -0
  1874. package/dist/client/assets/wifi-high-C7_RmhBB.js +1 -0
  1875. package/dist/client/assets/wifi-low-D2WeKDF9.js +1 -0
  1876. package/dist/client/assets/wifi-pen-DWHLnK43.js +1 -0
  1877. package/dist/client/assets/wifi-sync-zaq5oCqv.js +1 -0
  1878. package/dist/client/assets/wifi-zero-1zp2XIdy.js +1 -0
  1879. package/dist/client/assets/wind-Clsu1a5Q.js +1 -0
  1880. package/dist/client/assets/wind-arrow-down-Cqn5KTqA.js +1 -0
  1881. package/dist/client/assets/wine-BluUAHJn.js +1 -0
  1882. package/dist/client/assets/wine-off-PZL6H24n.js +1 -0
  1883. package/dist/client/assets/workflow-Og0paNZz.js +1 -0
  1884. package/dist/client/assets/worm-TnNQC8Cg.js +1 -0
  1885. package/dist/client/assets/wrench-KNHrg-Cq.js +1 -0
  1886. package/dist/client/assets/x-line-top-C1rFugR7.js +1 -0
  1887. package/dist/client/assets/xychartDiagram-S5SC5T6Z-BU7dQO52.js +7 -0
  1888. package/dist/client/assets/xychartDiagram-S5SC5T6Z-BU7dQO52.js.br +0 -0
  1889. package/dist/client/assets/xychartDiagram-S5SC5T6Z-BU7dQO52.js.gz +0 -0
  1890. package/dist/client/assets/zap-BLTkrLJk.js +1 -0
  1891. package/dist/client/assets/zap-off-BOAql0We.js +1 -0
  1892. package/dist/client/assets/zodiac-aquarius-BmY0PJIO.js +1 -0
  1893. package/dist/client/assets/zodiac-aries-C5I0IpGZ.js +1 -0
  1894. package/dist/client/assets/zodiac-cancer-2erMaZGP.js +1 -0
  1895. package/dist/client/assets/zodiac-capricorn-qrR1Ok6O.js +1 -0
  1896. package/dist/client/assets/zodiac-gemini-CgW2PjDb.js +1 -0
  1897. package/dist/client/assets/zodiac-leo-B7pl8r0l.js +1 -0
  1898. package/dist/client/assets/zodiac-libra-IifWQZwK.js +1 -0
  1899. package/dist/client/assets/zodiac-ophiuchus-DBxh8auv.js +1 -0
  1900. package/dist/client/assets/zodiac-pisces-CexJSJfy.js +1 -0
  1901. package/dist/client/assets/zodiac-sagittarius-DFgvXsx8.js +1 -0
  1902. package/dist/client/assets/zodiac-scorpio-BnnvS-Kg.js +1 -0
  1903. package/dist/client/assets/zodiac-taurus-BgAtMn84.js +1 -0
  1904. package/dist/client/assets/zodiac-virgo-pPRC6PRm.js +1 -0
  1905. package/dist/client/assets/zoom-in-CWyqDBIX.js +1 -0
  1906. package/dist/client/assets/zoom-out-CoWglUc-.js +1 -0
  1907. package/dist/client/index.html +2 -2
  1908. package/dist/client/index.html.br +0 -0
  1909. package/dist/client/index.html.gz +0 -0
  1910. package/dist/client/sw.js +1 -1
  1911. package/dist/client/sw.js.br +0 -0
  1912. package/dist/client/sw.js.gz +0 -0
  1913. package/dist/server/agent/collaborationDeliveryWorker.js +4 -0
  1914. package/dist/server/agent/sessionChatRoutes.js +6 -2
  1915. package/dist/server/agent/sharedChatTarget.js +10 -0
  1916. package/dist/server/entry.js +5 -3
  1917. package/dist/server/federation/accessPolicy.js +14 -8
  1918. package/dist/server/federation/authorization.js +31 -9
  1919. package/dist/server/federation/invitations.js +40 -19
  1920. package/dist/server/federation/requestContext.js +5 -1
  1921. package/dist/server/federation/routeInvitations.js +43 -14
  1922. package/dist/server/federation/runtime.js +30 -13
  1923. package/dist/server/federation/sessionAttachmentAccess.js +1 -1
  1924. package/dist/server/routes/terminal.js +21 -6
  1925. package/package.json +1 -1
  1926. package/runtime-manifest.json +3 -3
  1927. package/dist/client/assets/AndroidMirrorView-uLXVeTB_.js +0 -3
  1928. package/dist/client/assets/AndroidMirrorView-uLXVeTB_.js.br +0 -0
  1929. package/dist/client/assets/AndroidMirrorView-uLXVeTB_.js.gz +0 -0
  1930. package/dist/client/assets/App-Bd9XpX-B.js +0 -188
  1931. package/dist/client/assets/App-Bd9XpX-B.js.br +0 -0
  1932. package/dist/client/assets/App-Bd9XpX-B.js.gz +0 -0
  1933. package/dist/client/assets/ArchitecturePanel-DCUnsg2X.js +0 -9
  1934. package/dist/client/assets/ArchitecturePanel-DCUnsg2X.js.br +0 -0
  1935. package/dist/client/assets/ArchitecturePanel-DCUnsg2X.js.gz +0 -0
  1936. package/dist/client/assets/ChangeWalkthroughPanel-BtuBFg-T.js +0 -2
  1937. package/dist/client/assets/ChangeWalkthroughPanel-BtuBFg-T.js.br +0 -0
  1938. package/dist/client/assets/ChangeWalkthroughPanel-BtuBFg-T.js.gz +0 -0
  1939. package/dist/client/assets/ChatChartReference-CgqjAeZc.js +0 -284
  1940. package/dist/client/assets/ChatChartReference-CgqjAeZc.js.br +0 -0
  1941. package/dist/client/assets/ChatChartReference-CgqjAeZc.js.gz +0 -0
  1942. package/dist/client/assets/ChatContextPreview-K3ZfEkLs.js +0 -1
  1943. package/dist/client/assets/ChatContextPreview-K3ZfEkLs.js.br +0 -0
  1944. package/dist/client/assets/ChatContextPreview-K3ZfEkLs.js.gz +0 -0
  1945. package/dist/client/assets/ChatFullContent-BVUQwCo3.js +0 -67
  1946. package/dist/client/assets/ChatFullContent-BVUQwCo3.js.br +0 -0
  1947. package/dist/client/assets/ChatFullContent-BVUQwCo3.js.gz +0 -0
  1948. package/dist/client/assets/ChatRichContent-CV-KwXxD.js +0 -2
  1949. package/dist/client/assets/ChatRichContent-CV-KwXxD.js.br +0 -0
  1950. package/dist/client/assets/ChatRichContent-CV-KwXxD.js.gz +0 -0
  1951. package/dist/client/assets/ChatVideoPreviewDialog-CV8izL1M.js +0 -1
  1952. package/dist/client/assets/ChatVideoPreviewDialog-CV8izL1M.js.br +0 -0
  1953. package/dist/client/assets/ChatVideoPreviewDialog-CV8izL1M.js.gz +0 -0
  1954. package/dist/client/assets/CollaborationMainWorkspace-Dmpk78q4.js +0 -1
  1955. package/dist/client/assets/CollaborationMainWorkspace-Dmpk78q4.js.br +0 -0
  1956. package/dist/client/assets/CollaborationMainWorkspace-Dmpk78q4.js.gz +0 -0
  1957. package/dist/client/assets/CollaborationTaskContent-BQ1iupNb.js +0 -1
  1958. package/dist/client/assets/ComputerControlView-BkSnnHUj.js +0 -6
  1959. package/dist/client/assets/ComputerControlView-BkSnnHUj.js.br +0 -0
  1960. package/dist/client/assets/ComputerControlView-BkSnnHUj.js.gz +0 -0
  1961. package/dist/client/assets/DagPlayground-6i1MrDv4.js +0 -1
  1962. package/dist/client/assets/DagPlayground-6i1MrDv4.js.br +0 -0
  1963. package/dist/client/assets/DagPlayground-6i1MrDv4.js.gz +0 -0
  1964. package/dist/client/assets/DiffLab-CnzqYaW7.js +0 -455
  1965. package/dist/client/assets/DiffLab-CnzqYaW7.js.br +0 -0
  1966. package/dist/client/assets/DiffLab-CnzqYaW7.js.gz +0 -0
  1967. package/dist/client/assets/DiffReview-ZuBlDYd9.js +0 -1
  1968. package/dist/client/assets/DiffReview-ZuBlDYd9.js.br +0 -0
  1969. package/dist/client/assets/DiffReview-ZuBlDYd9.js.gz +0 -0
  1970. package/dist/client/assets/DiffReviewLab-D5u7sipT.js +0 -2
  1971. package/dist/client/assets/DiffReviewLab-D5u7sipT.js.br +0 -0
  1972. package/dist/client/assets/DiffReviewLab-D5u7sipT.js.gz +0 -0
  1973. package/dist/client/assets/DiffViewer-C7KTXtOo.js +0 -34
  1974. package/dist/client/assets/DiffViewer-C7KTXtOo.js.br +0 -0
  1975. package/dist/client/assets/DiffViewer-C7KTXtOo.js.gz +0 -0
  1976. package/dist/client/assets/GitLoadingSkeleton-C-d81rCC.js +0 -1
  1977. package/dist/client/assets/GitLoadingSkeleton-C-d81rCC.js.br +0 -0
  1978. package/dist/client/assets/GitLoadingSkeleton-C-d81rCC.js.gz +0 -0
  1979. package/dist/client/assets/Markdown-BQbIDL5g.js +0 -23
  1980. package/dist/client/assets/Markdown-BQbIDL5g.js.br +0 -0
  1981. package/dist/client/assets/Markdown-BQbIDL5g.js.gz +0 -0
  1982. package/dist/client/assets/MarkdownPreview-2WBbF4jy.js +0 -1
  1983. package/dist/client/assets/MarkdownPreview-2WBbF4jy.js.br +0 -0
  1984. package/dist/client/assets/MarkdownPreview-2WBbF4jy.js.gz +0 -0
  1985. package/dist/client/assets/ModelPreview-J22uvmA0.js +0 -4112
  1986. package/dist/client/assets/ModelPreview-J22uvmA0.js.br +0 -0
  1987. package/dist/client/assets/ModelPreview-J22uvmA0.js.gz +0 -0
  1988. package/dist/client/assets/RecordingSaveDialog-G-DoMMaD.js +0 -1
  1989. package/dist/client/assets/RecordingSaveDialog-G-DoMMaD.js.br +0 -0
  1990. package/dist/client/assets/RecordingSaveDialog-G-DoMMaD.js.gz +0 -0
  1991. package/dist/client/assets/RightSidebar-9Ay-BbmH.js +0 -1729
  1992. package/dist/client/assets/RightSidebar-9Ay-BbmH.js.br +0 -0
  1993. package/dist/client/assets/RightSidebar-9Ay-BbmH.js.gz +0 -0
  1994. package/dist/client/assets/SessionChatView-kTD9PR6z.js +0 -38
  1995. package/dist/client/assets/SessionChatView-kTD9PR6z.js.br +0 -0
  1996. package/dist/client/assets/SessionChatView-kTD9PR6z.js.gz +0 -0
  1997. package/dist/client/assets/SessionResourceSidebar-CM9Vxbf2.js +0 -2
  1998. package/dist/client/assets/SessionResourceSidebar-CM9Vxbf2.js.br +0 -0
  1999. package/dist/client/assets/SessionResourceSidebar-CM9Vxbf2.js.gz +0 -0
  2000. package/dist/client/assets/TodoWorkspace-DOPSphDB.js +0 -1
  2001. package/dist/client/assets/TodoWorkspace-DOPSphDB.js.br +0 -0
  2002. package/dist/client/assets/TodoWorkspace-DOPSphDB.js.gz +0 -0
  2003. package/dist/client/assets/VideoPreviewPlayer-C_2mAmnO.js +0 -1
  2004. package/dist/client/assets/VideoPreviewPlayer-C_2mAmnO.js.br +0 -0
  2005. package/dist/client/assets/VideoPreviewPlayer-C_2mAmnO.js.gz +0 -0
  2006. package/dist/client/assets/a-arrow-down-e_zpSq8x.js +0 -1
  2007. package/dist/client/assets/a-arrow-up-BUoSfazn.js +0 -1
  2008. package/dist/client/assets/a-large-small-CPPBs6rv.js +0 -1
  2009. package/dist/client/assets/abnfDiagram-VCTEODGH-BaNfEJNg.js +0 -1
  2010. package/dist/client/assets/abnfDiagram-VCTEODGH-BaNfEJNg.js.br +0 -0
  2011. package/dist/client/assets/abnfDiagram-VCTEODGH-BaNfEJNg.js.gz +0 -0
  2012. package/dist/client/assets/accessibility-zxXEh40k.js +0 -1
  2013. package/dist/client/assets/activity-eWQa3qo_.js +0 -1
  2014. package/dist/client/assets/air-vent-BguBAaNA.js +0 -1
  2015. package/dist/client/assets/airplay-BB2r8Mxm.js +0 -1
  2016. package/dist/client/assets/alarm-clock-8ZjAh0Rn.js +0 -1
  2017. package/dist/client/assets/alarm-clock-check-DEVKAa6a.js +0 -1
  2018. package/dist/client/assets/alarm-clock-minus-C6CUtkWJ.js +0 -1
  2019. package/dist/client/assets/alarm-clock-off-BCGN-Zdr.js +0 -1
  2020. package/dist/client/assets/alarm-clock-plus-D25gHx9D.js +0 -1
  2021. package/dist/client/assets/alarm-smoke-Bqc9l05k.js +0 -1
  2022. package/dist/client/assets/album-BeEk75XM.js +0 -1
  2023. package/dist/client/assets/align-center-horizontal-CVIHhKXU.js +0 -1
  2024. package/dist/client/assets/align-center-vertical-B6AAG6ZV.js +0 -1
  2025. package/dist/client/assets/align-end-horizontal-DmdZzPMy.js +0 -1
  2026. package/dist/client/assets/align-end-vertical-9qg5_jJL.js +0 -1
  2027. package/dist/client/assets/align-horizontal-distribute-center-DU1Gap3j.js +0 -1
  2028. package/dist/client/assets/align-horizontal-distribute-end-BoGcm9J_.js +0 -1
  2029. package/dist/client/assets/align-horizontal-distribute-start-BZqGTU6H.js +0 -1
  2030. package/dist/client/assets/align-horizontal-justify-center-Be5ckdVq.js +0 -1
  2031. package/dist/client/assets/align-horizontal-justify-end-D2z-sknO.js +0 -1
  2032. package/dist/client/assets/align-horizontal-justify-start-C5B0IjXf.js +0 -1
  2033. package/dist/client/assets/align-horizontal-space-around-DFYYlP_E.js +0 -1
  2034. package/dist/client/assets/align-horizontal-space-between-LQW9JQ0V.js +0 -1
  2035. package/dist/client/assets/align-start-horizontal-Db0MyarJ.js +0 -1
  2036. package/dist/client/assets/align-start-vertical-DzCVI_S9.js +0 -1
  2037. package/dist/client/assets/align-vertical-distribute-center-CT8ktztL.js +0 -1
  2038. package/dist/client/assets/align-vertical-distribute-end-Dkj1qHTT.js +0 -1
  2039. package/dist/client/assets/align-vertical-distribute-start-DqChWQpe.js +0 -1
  2040. package/dist/client/assets/align-vertical-justify-center-B0_V6FY0.js +0 -1
  2041. package/dist/client/assets/align-vertical-justify-end-DablKLTr.js +0 -1
  2042. package/dist/client/assets/align-vertical-justify-start-CEMVwEQe.js +0 -1
  2043. package/dist/client/assets/align-vertical-space-around-C3QhVVP6.js +0 -1
  2044. package/dist/client/assets/align-vertical-space-between-DQSW7V6z.js +0 -1
  2045. package/dist/client/assets/ambulance-dGTihdtq.js +0 -1
  2046. package/dist/client/assets/ampersand-DfHlv2TV.js +0 -1
  2047. package/dist/client/assets/ampersands-BG1KtjTz.js +0 -1
  2048. package/dist/client/assets/amphora-CkO4blGr.js +0 -1
  2049. package/dist/client/assets/anchor-L-FdO1zq.js +0 -1
  2050. package/dist/client/assets/angry-BP8f7yl3.js +0 -1
  2051. package/dist/client/assets/annoyed-Cs9cHknK.js +0 -1
  2052. package/dist/client/assets/antenna-BmZWSEBk.js +0 -1
  2053. package/dist/client/assets/anvil-CePgB2D2.js +0 -1
  2054. package/dist/client/assets/aperture-CxoOAEB8.js +0 -1
  2055. package/dist/client/assets/app-DTAZ_mHv.js +0 -37
  2056. package/dist/client/assets/app-DTAZ_mHv.js.br +0 -0
  2057. package/dist/client/assets/app-DTAZ_mHv.js.gz +0 -0
  2058. package/dist/client/assets/app-window-C-hRYXQG.js +0 -1
  2059. package/dist/client/assets/app-window-mac-DICw9L5R.js +0 -1
  2060. package/dist/client/assets/apple-DNJ9gkh6.js +0 -1
  2061. package/dist/client/assets/architectureDiagram-5GKGNRK7-B3BdaDV5.js +0 -36
  2062. package/dist/client/assets/architectureDiagram-5GKGNRK7-B3BdaDV5.js.br +0 -0
  2063. package/dist/client/assets/architectureDiagram-5GKGNRK7-B3BdaDV5.js.gz +0 -0
  2064. package/dist/client/assets/archive-XOJr3PBG.js +0 -1
  2065. package/dist/client/assets/archive-restore-DoIpxe52.js +0 -1
  2066. package/dist/client/assets/archive-x-DJw_BTe4.js +0 -1
  2067. package/dist/client/assets/armchair-OPEZ0eyZ.js +0 -1
  2068. package/dist/client/assets/arrow-big-down-D75LUgym.js +0 -1
  2069. package/dist/client/assets/arrow-big-down-dash-EvgVmCcy.js +0 -1
  2070. package/dist/client/assets/arrow-big-left-DhTQP6CF.js +0 -1
  2071. package/dist/client/assets/arrow-big-left-dash-C50YGn_W.js +0 -1
  2072. package/dist/client/assets/arrow-big-right-CvSqXSen.js +0 -1
  2073. package/dist/client/assets/arrow-big-right-dash-D3NwloUc.js +0 -1
  2074. package/dist/client/assets/arrow-big-up-DRnHa_wU.js +0 -1
  2075. package/dist/client/assets/arrow-big-up-dash-DRzv0ZqC.js +0 -1
  2076. package/dist/client/assets/arrow-down-0-1-DOCgEzA_.js +0 -1
  2077. package/dist/client/assets/arrow-down-1-0-CHEvAbRN.js +0 -1
  2078. package/dist/client/assets/arrow-down-1Kl4oM72.js +0 -1
  2079. package/dist/client/assets/arrow-down-from-line-BpkjJJBP.js +0 -1
  2080. package/dist/client/assets/arrow-down-left-BRwJmHU4.js +0 -1
  2081. package/dist/client/assets/arrow-down-narrow-wide-F6bGAsW_.js +0 -1
  2082. package/dist/client/assets/arrow-down-right-ClX5L319.js +0 -1
  2083. package/dist/client/assets/arrow-down-to-dot-DxjhhRMq.js +0 -1
  2084. package/dist/client/assets/arrow-down-to-line-D8W5iI9d.js +0 -1
  2085. package/dist/client/assets/arrow-down-up-CgeCVVBG.js +0 -1
  2086. package/dist/client/assets/arrow-down-wide-narrow-CjzwY1_W.js +0 -1
  2087. package/dist/client/assets/arrow-down-z-a-D8u2wMRx.js +0 -1
  2088. package/dist/client/assets/arrow-left-from-line-C7z0E3wR.js +0 -1
  2089. package/dist/client/assets/arrow-left-right-D10GQnmS.js +0 -1
  2090. package/dist/client/assets/arrow-left-to-line-X45QefNX.js +0 -1
  2091. package/dist/client/assets/arrow-right-from-line-BZ6f0dG8.js +0 -1
  2092. package/dist/client/assets/arrow-right-left-Bc284RIu.js +0 -1
  2093. package/dist/client/assets/arrow-right-to-line-DtSSm7ij.js +0 -1
  2094. package/dist/client/assets/arrow-up-0-1-CL5f_1re.js +0 -1
  2095. package/dist/client/assets/arrow-up-1-0-DFLFspjN.js +0 -1
  2096. package/dist/client/assets/arrow-up-a-z-CFX9UJiF.js +0 -1
  2097. package/dist/client/assets/arrow-up-down-m_i7ylT8.js +0 -1
  2098. package/dist/client/assets/arrow-up-from-dot-FF1tQDJK.js +0 -1
  2099. package/dist/client/assets/arrow-up-from-line-COQEmp-D.js +0 -1
  2100. package/dist/client/assets/arrow-up-left-Bbf1_dsI.js +0 -1
  2101. package/dist/client/assets/arrow-up-narrow-wide-DjcbthJb.js +0 -1
  2102. package/dist/client/assets/arrow-up-to-line-C_YGqKwD.js +0 -1
  2103. package/dist/client/assets/arrow-up-wide-narrow-Cn6HPrB7.js +0 -1
  2104. package/dist/client/assets/arrow-up-z-a-BA0b19s9.js +0 -1
  2105. package/dist/client/assets/arrows-up-from-line-CUZa8aBr.js +0 -1
  2106. package/dist/client/assets/asterisk-CUSXcAPm.js +0 -1
  2107. package/dist/client/assets/astroid-CjUpM-2u.js +0 -1
  2108. package/dist/client/assets/atom-gG5eP8PO.js +0 -1
  2109. package/dist/client/assets/audio-lines-BKFfvZ9u.js +0 -1
  2110. package/dist/client/assets/audio-waveform-Db6x0woW.js +0 -1
  2111. package/dist/client/assets/award-BXZvfp-2.js +0 -1
  2112. package/dist/client/assets/axe-BlPZ4mAa.js +0 -1
  2113. package/dist/client/assets/axis-3d-DlVXRp_i.js +0 -1
  2114. package/dist/client/assets/baby-BHcYE9oL.js +0 -1
  2115. package/dist/client/assets/backpack-CSlObfpu.js +0 -1
  2116. package/dist/client/assets/badge-CNThPUTd.js +0 -1
  2117. package/dist/client/assets/badge-alert-DhsreX1x.js +0 -1
  2118. package/dist/client/assets/badge-cent-K9vY3d8q.js +0 -1
  2119. package/dist/client/assets/badge-check-CmXSY-Hv.js +0 -1
  2120. package/dist/client/assets/badge-dollar-sign-BXF5KsVJ.js +0 -1
  2121. package/dist/client/assets/badge-euro-iF4VqvwB.js +0 -1
  2122. package/dist/client/assets/badge-indian-rupee-DG5uWjB7.js +0 -1
  2123. package/dist/client/assets/badge-info-oTuwLbqf.js +0 -1
  2124. package/dist/client/assets/badge-japanese-yen-CTdVa5x8.js +0 -1
  2125. package/dist/client/assets/badge-minus-BKfLGMhg.js +0 -1
  2126. package/dist/client/assets/badge-percent-B2w9knQG.js +0 -1
  2127. package/dist/client/assets/badge-plus-CwNAbzU4.js +0 -1
  2128. package/dist/client/assets/badge-pound-sterling-CSRRGrER.js +0 -1
  2129. package/dist/client/assets/badge-question-mark-BW7QYii2.js +0 -1
  2130. package/dist/client/assets/badge-russian-ruble-BC2LjeFo.js +0 -1
  2131. package/dist/client/assets/badge-swiss-franc-DQRNZVw1.js +0 -1
  2132. package/dist/client/assets/badge-turkish-lira-4xEmPN67.js +0 -1
  2133. package/dist/client/assets/badge-x-Bgulx9VF.js +0 -1
  2134. package/dist/client/assets/baggage-claim-C9SHq8fW.js +0 -1
  2135. package/dist/client/assets/balloon-B9BZp-nf.js +0 -1
  2136. package/dist/client/assets/ban-2bH0hu0-.js +0 -1
  2137. package/dist/client/assets/banana-wn71JOj4.js +0 -1
  2138. package/dist/client/assets/bandage-B6-vIfc5.js +0 -1
  2139. package/dist/client/assets/banknote-DtiEq8Z9.js +0 -1
  2140. package/dist/client/assets/banknote-arrow-down-7YgxDWTB.js +0 -1
  2141. package/dist/client/assets/banknote-arrow-up-C7uJumV_.js +0 -1
  2142. package/dist/client/assets/banknote-x-DT-YBEe-.js +0 -1
  2143. package/dist/client/assets/barcode-DQ6gVIzD.js +0 -1
  2144. package/dist/client/assets/barrel-BD1knUQU.js +0 -1
  2145. package/dist/client/assets/baseline-DZCFfHUH.js +0 -1
  2146. package/dist/client/assets/bath-DP5fSVFY.js +0 -1
  2147. package/dist/client/assets/battery-3YOL7_CW.js +0 -1
  2148. package/dist/client/assets/battery-charging-Bo1BmtT8.js +0 -1
  2149. package/dist/client/assets/battery-full-CjVgBFTI.js +0 -1
  2150. package/dist/client/assets/battery-low-Dm087Twg.js +0 -1
  2151. package/dist/client/assets/battery-medium-VQmOwE6-.js +0 -1
  2152. package/dist/client/assets/battery-plus-ClRWqPFZ.js +0 -1
  2153. package/dist/client/assets/battery-warning-CiXdmT6Z.js +0 -1
  2154. package/dist/client/assets/beaker-CIvIpOyF.js +0 -1
  2155. package/dist/client/assets/bean-DYre6bQ4.js +0 -1
  2156. package/dist/client/assets/bean-off-BJKbhjUe.js +0 -1
  2157. package/dist/client/assets/bed-Cx_MP9it.js +0 -1
  2158. package/dist/client/assets/bed-double-COWv50RZ.js +0 -1
  2159. package/dist/client/assets/bed-single-D6iVuNid.js +0 -1
  2160. package/dist/client/assets/beef-N7w8ls9K.js +0 -1
  2161. package/dist/client/assets/beef-off-BhV2a7Cl.js +0 -1
  2162. package/dist/client/assets/beer-D_-VSXJh.js +0 -1
  2163. package/dist/client/assets/beer-off-CisdqTo-.js +0 -1
  2164. package/dist/client/assets/bell-CFqQzD7v.js +0 -1
  2165. package/dist/client/assets/bell-check-BxplTnP7.js +0 -1
  2166. package/dist/client/assets/bell-electric-DrsqVDDU.js +0 -1
  2167. package/dist/client/assets/bell-minus-B3QeyYdg.js +0 -1
  2168. package/dist/client/assets/bell-off-2rdW8_TC.js +0 -1
  2169. package/dist/client/assets/bell-plus-5sEwgWpR.js +0 -1
  2170. package/dist/client/assets/bell-ring-75QLFnDA.js +0 -1
  2171. package/dist/client/assets/between-horizontal-end-BrTDQ9WI.js +0 -1
  2172. package/dist/client/assets/between-horizontal-start-Dejr8g80.js +0 -1
  2173. package/dist/client/assets/between-vertical-end-Coz3x86w.js +0 -1
  2174. package/dist/client/assets/between-vertical-start-C5hgQZWv.js +0 -1
  2175. package/dist/client/assets/biceps-flexed-Cyc4p-Vp.js +0 -1
  2176. package/dist/client/assets/bike-pDOBJjfV.js +0 -1
  2177. package/dist/client/assets/binary-5if3nrPc.js +0 -1
  2178. package/dist/client/assets/binoculars-DECMcYAl.js +0 -1
  2179. package/dist/client/assets/biohazard-myCmuNoq.js +0 -1
  2180. package/dist/client/assets/bird-BV7epRnE.js +0 -1
  2181. package/dist/client/assets/birdhouse-DQ4aThJ0.js +0 -1
  2182. package/dist/client/assets/bitcoin-BGDQvP62.js +0 -1
  2183. package/dist/client/assets/blend-BnqrGmXY.js +0 -1
  2184. package/dist/client/assets/blender-CFDnz6ZP.js +0 -1
  2185. package/dist/client/assets/blinds-D1M8DFoY.js +0 -1
  2186. package/dist/client/assets/blockDiagram-I7D4REHJ-BwCXSbW7.js +0 -129
  2187. package/dist/client/assets/blockDiagram-I7D4REHJ-BwCXSbW7.js.br +0 -0
  2188. package/dist/client/assets/blockDiagram-I7D4REHJ-BwCXSbW7.js.gz +0 -0
  2189. package/dist/client/assets/blocks-BRSV2wlD.js +0 -1
  2190. package/dist/client/assets/bluetooth-DPRI-ube.js +0 -1
  2191. package/dist/client/assets/bluetooth-connected-VtPYoMxu.js +0 -1
  2192. package/dist/client/assets/bluetooth-off-DNO8X9Il.js +0 -1
  2193. package/dist/client/assets/bluetooth-searching-B3N2Tfsf.js +0 -1
  2194. package/dist/client/assets/bold-CQoKOVM2.js +0 -1
  2195. package/dist/client/assets/bolt-JlPE69qt.js +0 -1
  2196. package/dist/client/assets/bomb-ciV5mXxX.js +0 -1
  2197. package/dist/client/assets/bone-DMFz8-Mp.js +0 -1
  2198. package/dist/client/assets/book-a-IxOX4Cm9.js +0 -1
  2199. package/dist/client/assets/book-alert-CkTPAzSt.js +0 -1
  2200. package/dist/client/assets/book-audio-CV65Tf7W.js +0 -1
  2201. package/dist/client/assets/book-check-ajD14cSP.js +0 -1
  2202. package/dist/client/assets/book-copy-BBUC_C-z.js +0 -1
  2203. package/dist/client/assets/book-dashed-B43xPsG8.js +0 -1
  2204. package/dist/client/assets/book-down-WOgp8Dox.js +0 -1
  2205. package/dist/client/assets/book-headphones-Dupzza5p.js +0 -1
  2206. package/dist/client/assets/book-heart-CY20E7yj.js +0 -1
  2207. package/dist/client/assets/book-iUzdjyU_.js +0 -1
  2208. package/dist/client/assets/book-image-BhIkLFQM.js +0 -1
  2209. package/dist/client/assets/book-key-MN16fKEt.js +0 -1
  2210. package/dist/client/assets/book-lock-BWdcFfPk.js +0 -1
  2211. package/dist/client/assets/book-marked-Cd_PFR42.js +0 -1
  2212. package/dist/client/assets/book-minus-De0pGDHb.js +0 -1
  2213. package/dist/client/assets/book-open-BnwFn9ww.js +0 -1
  2214. package/dist/client/assets/book-open-check-D1qAQOzi.js +0 -1
  2215. package/dist/client/assets/book-open-text-BW4Tr8AL.js +0 -1
  2216. package/dist/client/assets/book-plus-dYF--Dxd.js +0 -1
  2217. package/dist/client/assets/book-search-8OCi7yzL.js +0 -1
  2218. package/dist/client/assets/book-text-BcT6LN5l.js +0 -1
  2219. package/dist/client/assets/book-type-DV38otCj.js +0 -1
  2220. package/dist/client/assets/book-up-2-qN9Q_mX9.js +0 -1
  2221. package/dist/client/assets/book-up-Cir_IO9k.js +0 -1
  2222. package/dist/client/assets/book-user-D_CsdmYe.js +0 -1
  2223. package/dist/client/assets/book-x-DEifm33L.js +0 -1
  2224. package/dist/client/assets/bookmark-HgTOgOll.js +0 -1
  2225. package/dist/client/assets/bookmark-check-YkAENy_q.js +0 -1
  2226. package/dist/client/assets/bookmark-minus-CEUCbwlk.js +0 -1
  2227. package/dist/client/assets/bookmark-off-OzGmsngE.js +0 -1
  2228. package/dist/client/assets/bookmark-plus-BPCxEwlu.js +0 -1
  2229. package/dist/client/assets/bookmark-x-C3K53k_a.js +0 -1
  2230. package/dist/client/assets/boom-box-CJkXvIBP.js +0 -1
  2231. package/dist/client/assets/bot-message-square-D018EDTj.js +0 -1
  2232. package/dist/client/assets/bot-off-Cg2JedoX.js +0 -1
  2233. package/dist/client/assets/bottle-wine-2Nlt3RRe.js +0 -1
  2234. package/dist/client/assets/bow-arrow-wbqBVM0S.js +0 -1
  2235. package/dist/client/assets/boxes-BfouWwhq.js +0 -1
  2236. package/dist/client/assets/braces-CzyzCKy9.js +0 -1
  2237. package/dist/client/assets/brackets-CTcwm65I.js +0 -1
  2238. package/dist/client/assets/brain-Dce5ao-H.js +0 -1
  2239. package/dist/client/assets/brain-circuit-BvpQn3GJ.js +0 -1
  2240. package/dist/client/assets/brain-cog-CKdbmVNI.js +0 -1
  2241. package/dist/client/assets/brain-cog-CKdbmVNI.js.br +0 -0
  2242. package/dist/client/assets/brain-cog-CKdbmVNI.js.gz +0 -0
  2243. package/dist/client/assets/brick-wall-BSglwvMe.js +0 -1
  2244. package/dist/client/assets/brick-wall-fire-eYvxgqQa.js +0 -1
  2245. package/dist/client/assets/brick-wall-shield-CkwLSInn.js +0 -1
  2246. package/dist/client/assets/briefcase-business-B_cLC10v.js +0 -1
  2247. package/dist/client/assets/briefcase-conveyor-belt-QRmr--Ko.js +0 -1
  2248. package/dist/client/assets/briefcase-medical-Dz3G5rMQ.js +0 -1
  2249. package/dist/client/assets/bring-to-front-C4Elabj2.js +0 -1
  2250. package/dist/client/assets/broccoli-BMKvWS6L.js +0 -1
  2251. package/dist/client/assets/brush-1oOVVV9f.js +0 -1
  2252. package/dist/client/assets/brush-cleaning-CGY8Nv70.js +0 -1
  2253. package/dist/client/assets/bubbles-DualWs-l.js +0 -1
  2254. package/dist/client/assets/bug-BDPSvx3D.js +0 -1
  2255. package/dist/client/assets/bug-off-BjHabV3o.js +0 -1
  2256. package/dist/client/assets/bug-play-gHJ6upCR.js +0 -1
  2257. package/dist/client/assets/building-2-DtrqXzcI.js +0 -1
  2258. package/dist/client/assets/building-Dzd1_ATk.js +0 -1
  2259. package/dist/client/assets/bus-DxqIP8uc.js +0 -1
  2260. package/dist/client/assets/bus-front-CYIJrbZX.js +0 -1
  2261. package/dist/client/assets/c4Diagram-7LVT6UL2-D-J9XDta.js +0 -38
  2262. package/dist/client/assets/c4Diagram-7LVT6UL2-D-J9XDta.js.br +0 -0
  2263. package/dist/client/assets/c4Diagram-7LVT6UL2-D-J9XDta.js.gz +0 -0
  2264. package/dist/client/assets/cable-car-DTDLuGHB.js +0 -1
  2265. package/dist/client/assets/cable-f1W52QQX.js +0 -1
  2266. package/dist/client/assets/cake-1CK2OvA5.js +0 -1
  2267. package/dist/client/assets/cake-slice--HlUvrSK.js +0 -1
  2268. package/dist/client/assets/calculator-C5Fl3FUY.js +0 -1
  2269. package/dist/client/assets/calendar-1-Bu5dZJ_1.js +0 -1
  2270. package/dist/client/assets/calendar-D7js_AP9.js +0 -1
  2271. package/dist/client/assets/calendar-arrow-down-DQmSRV3d.js +0 -1
  2272. package/dist/client/assets/calendar-arrow-up-B2wlgJju.js +0 -1
  2273. package/dist/client/assets/calendar-check-2-BQ7Q4ISh.js +0 -1
  2274. package/dist/client/assets/calendar-check-xMkiMoHZ.js +0 -1
  2275. package/dist/client/assets/calendar-clock-DajVjMER.js +0 -1
  2276. package/dist/client/assets/calendar-cog-B2HIN2ZV.js +0 -1
  2277. package/dist/client/assets/calendar-days-BQtl7rhx.js +0 -1
  2278. package/dist/client/assets/calendar-fold-CDrEOgU-.js +0 -1
  2279. package/dist/client/assets/calendar-heart-DSuTvV1u.js +0 -1
  2280. package/dist/client/assets/calendar-minus-2-CnkPXE3u.js +0 -1
  2281. package/dist/client/assets/calendar-minus-BQQcryEv.js +0 -1
  2282. package/dist/client/assets/calendar-off-CMRbAZJg.js +0 -1
  2283. package/dist/client/assets/calendar-plus-2-BLAxr7Hw.js +0 -1
  2284. package/dist/client/assets/calendar-plus-av4cntDb.js +0 -1
  2285. package/dist/client/assets/calendar-range-Cwo0XQNM.js +0 -1
  2286. package/dist/client/assets/calendar-search-GOlRSbI3.js +0 -1
  2287. package/dist/client/assets/calendar-sync-CY3-REJZ.js +0 -1
  2288. package/dist/client/assets/calendar-x-2-DIgSg3My.js +0 -1
  2289. package/dist/client/assets/calendar-x-DHEa-mhA.js +0 -1
  2290. package/dist/client/assets/calendars-LPpySn0f.js +0 -1
  2291. package/dist/client/assets/camera-ClSAif5y.js +0 -1
  2292. package/dist/client/assets/camera-off-BSYRb1Ew.js +0 -1
  2293. package/dist/client/assets/candy-C3qaOE4z.js +0 -1
  2294. package/dist/client/assets/candy-cane-CGGBDUl3.js +0 -1
  2295. package/dist/client/assets/candy-off-DOQMAmmr.js +0 -1
  2296. package/dist/client/assets/cannabis-C7PrAdVZ.js +0 -1
  2297. package/dist/client/assets/cannabis-off-CGX1Kbk2.js +0 -1
  2298. package/dist/client/assets/captions-BS7MJHdo.js +0 -1
  2299. package/dist/client/assets/captions-off-OScDoqUg.js +0 -1
  2300. package/dist/client/assets/car-C2ANTvUr.js +0 -1
  2301. package/dist/client/assets/car-front-DuXjvp0P.js +0 -1
  2302. package/dist/client/assets/car-taxi-front-fpUeTBbO.js +0 -1
  2303. package/dist/client/assets/caravan-CyZ5ZBLw.js +0 -1
  2304. package/dist/client/assets/card-sim-DHSKeRH9.js +0 -1
  2305. package/dist/client/assets/carrot-CmZCbAHl.js +0 -1
  2306. package/dist/client/assets/case-lower-DzpyNc6K.js +0 -1
  2307. package/dist/client/assets/case-sensitive-Ct0tKsq7.js +0 -1
  2308. package/dist/client/assets/case-upper-BD_CxLPW.js +0 -1
  2309. package/dist/client/assets/cassette-tape-CQhjJGUB.js +0 -1
  2310. package/dist/client/assets/cast-DLTKE8OU.js +0 -1
  2311. package/dist/client/assets/castle-Bs2B5eBA.js +0 -1
  2312. package/dist/client/assets/cat-VRtoy5Hj.js +0 -1
  2313. package/dist/client/assets/cctv-BG7wSige.js +0 -1
  2314. package/dist/client/assets/cctv-off-Do7PQM8O.js +0 -1
  2315. package/dist/client/assets/channel-BUVS5U9P.js +0 -1
  2316. package/dist/client/assets/chart-area-BZkTdDRs.js +0 -1
  2317. package/dist/client/assets/chart-bar-KFIWGGK6.js +0 -1
  2318. package/dist/client/assets/chart-bar-big-DFl7Lo0x.js +0 -1
  2319. package/dist/client/assets/chart-bar-decreasing-DAOUVaav.js +0 -1
  2320. package/dist/client/assets/chart-bar-increasing-TVdPTcLl.js +0 -1
  2321. package/dist/client/assets/chart-bar-stacked-znzELDdF.js +0 -1
  2322. package/dist/client/assets/chart-candlestick-DSE8a4gS.js +0 -1
  2323. package/dist/client/assets/chart-column-BajGC4GN.js +0 -1
  2324. package/dist/client/assets/chart-column-big-DFGOesdZ.js +0 -1
  2325. package/dist/client/assets/chart-column-decreasing-taE1i0Nt.js +0 -1
  2326. package/dist/client/assets/chart-column-increasing-C9UIgWSa.js +0 -1
  2327. package/dist/client/assets/chart-column-stacked-CtoPc9mj.js +0 -1
  2328. package/dist/client/assets/chart-gantt-BalrV1IR.js +0 -1
  2329. package/dist/client/assets/chart-line-CtMYSN4e.js +0 -1
  2330. package/dist/client/assets/chart-network-DgVpD64K.js +0 -1
  2331. package/dist/client/assets/chart-no-axes-column-QcT0Dk68.js +0 -1
  2332. package/dist/client/assets/chart-no-axes-column-decreasing-D4O3LR6R.js +0 -1
  2333. package/dist/client/assets/chart-no-axes-column-increasing-CN-xYrOC.js +0 -1
  2334. package/dist/client/assets/chart-no-axes-combined-BLB-3hN7.js +0 -1
  2335. package/dist/client/assets/chart-no-axes-gantt-Dki3qOCt.js +0 -1
  2336. package/dist/client/assets/chart-pie-DsmXiGbO.js +0 -1
  2337. package/dist/client/assets/chart-scatter-DXD2V7jz.js +0 -1
  2338. package/dist/client/assets/chart-spline-sZ4VrZvb.js +0 -1
  2339. package/dist/client/assets/check-check-CuzLJI7t.js +0 -1
  2340. package/dist/client/assets/check-line-BlrEta37.js +0 -1
  2341. package/dist/client/assets/chef-hat-BFNayv-7.js +0 -1
  2342. package/dist/client/assets/cherry-HSBF80bU.js +0 -1
  2343. package/dist/client/assets/chess-bishop-LgO77AGu.js +0 -1
  2344. package/dist/client/assets/chess-king-HXjIyOOR.js +0 -1
  2345. package/dist/client/assets/chess-knight-CYEuOC4g.js +0 -1
  2346. package/dist/client/assets/chess-pawn-CfY17G2D.js +0 -1
  2347. package/dist/client/assets/chess-queen-C1oX74kI.js +0 -1
  2348. package/dist/client/assets/chess-rook-BrWO82CQ.js +0 -1
  2349. package/dist/client/assets/chevron-first-CvGmXSR7.js +0 -1
  2350. package/dist/client/assets/chevron-last-Di2jms4e.js +0 -1
  2351. package/dist/client/assets/chevron-left-Cg1C8O4K.js +0 -1
  2352. package/dist/client/assets/chevrons-down-JkROHLhX.js +0 -1
  2353. package/dist/client/assets/chevrons-down-up-CVUI4ofm.js +0 -1
  2354. package/dist/client/assets/chevrons-left-DjCrVyKj.js +0 -1
  2355. package/dist/client/assets/chevrons-left-right-DTYY4_0q.js +0 -1
  2356. package/dist/client/assets/chevrons-left-right-ellipsis-BqJJDNJW.js +0 -1
  2357. package/dist/client/assets/chevrons-right-BUlDw982.js +0 -1
  2358. package/dist/client/assets/chevrons-right-left-CiOgoevD.js +0 -1
  2359. package/dist/client/assets/chevrons-up-DT8wlKLk.js +0 -1
  2360. package/dist/client/assets/chevrons-up-down-CTqVP4x0.js +0 -1
  2361. package/dist/client/assets/chunk-2Q5K7J3B-CQREd_6P.js +0 -1
  2362. package/dist/client/assets/chunk-5VM5RSS4-qTIJ6HPt.js +0 -15
  2363. package/dist/client/assets/chunk-F27PBJKO-CdaTkMk8.js +0 -1
  2364. package/dist/client/assets/chunk-F27PBJKO-CdaTkMk8.js.br +0 -0
  2365. package/dist/client/assets/chunk-F27PBJKO-CdaTkMk8.js.gz +0 -0
  2366. package/dist/client/assets/chunk-IMKFNOWR-BaJxWV6t.js +0 -231
  2367. package/dist/client/assets/chunk-IMKFNOWR-BaJxWV6t.js.br +0 -0
  2368. package/dist/client/assets/chunk-IMKFNOWR-BaJxWV6t.js.gz +0 -0
  2369. package/dist/client/assets/chunk-JWPE2WC7-B6VZAVC6.js +0 -1
  2370. package/dist/client/assets/chunk-POPQ4Y6H-BrkO14PZ.js +0 -1
  2371. package/dist/client/assets/chunk-SVP7TREG-B2QW2Yps.js +0 -88
  2372. package/dist/client/assets/chunk-SVP7TREG-B2QW2Yps.js.br +0 -0
  2373. package/dist/client/assets/chunk-SVP7TREG-B2QW2Yps.js.gz +0 -0
  2374. package/dist/client/assets/chunk-TICWLB2K-D2h3cCfN.js +0 -206
  2375. package/dist/client/assets/chunk-TICWLB2K-D2h3cCfN.js.br +0 -0
  2376. package/dist/client/assets/chunk-TICWLB2K-D2h3cCfN.js.gz +0 -0
  2377. package/dist/client/assets/chunk-XXDRQBXY-CBw_LXYV.js +0 -1
  2378. package/dist/client/assets/church-Cf-oWqcp.js +0 -1
  2379. package/dist/client/assets/cigarette-MF8HITyz.js +0 -1
  2380. package/dist/client/assets/cigarette-off-C8j63yTO.js +0 -1
  2381. package/dist/client/assets/circle-9UYK5vx5.js +0 -1
  2382. package/dist/client/assets/circle-arrow-down-Dm60lysk.js +0 -1
  2383. package/dist/client/assets/circle-arrow-left-DyS6fX01.js +0 -1
  2384. package/dist/client/assets/circle-arrow-out-down-left-DgRKcC4o.js +0 -1
  2385. package/dist/client/assets/circle-arrow-out-down-right-ChnCEhFf.js +0 -1
  2386. package/dist/client/assets/circle-arrow-out-up-left-hmhSEdnX.js +0 -1
  2387. package/dist/client/assets/circle-arrow-out-up-right-CQsYqYte.js +0 -1
  2388. package/dist/client/assets/circle-arrow-right-BCbPhkUN.js +0 -1
  2389. package/dist/client/assets/circle-arrow-up-DiEDW0Pm.js +0 -1
  2390. package/dist/client/assets/circle-check-big-2Sz8Udkh.js +0 -1
  2391. package/dist/client/assets/circle-chevron-down-BipGeMzP.js +0 -1
  2392. package/dist/client/assets/circle-chevron-left-C4EzvZXx.js +0 -1
  2393. package/dist/client/assets/circle-chevron-right-C1lI3FXP.js +0 -1
  2394. package/dist/client/assets/circle-chevron-up-D9zMr-oo.js +0 -1
  2395. package/dist/client/assets/circle-dashed-CoRslLyE.js +0 -1
  2396. package/dist/client/assets/circle-divide-CEhl0sxz.js +0 -1
  2397. package/dist/client/assets/circle-dollar-sign-CD9qvLAv.js +0 -1
  2398. package/dist/client/assets/circle-dot-BVLEj6KQ.js +0 -1
  2399. package/dist/client/assets/circle-dot-dashed-Bfxm8LdE.js +0 -1
  2400. package/dist/client/assets/circle-ellipsis-CllujpXG.js +0 -1
  2401. package/dist/client/assets/circle-equal-ClXI3fwu.js +0 -1
  2402. package/dist/client/assets/circle-fading-arrow-up-CXXW_Ze2.js +0 -1
  2403. package/dist/client/assets/circle-fading-plus-CDwo5ONj.js +0 -1
  2404. package/dist/client/assets/circle-gauge-22s6onjV.js +0 -1
  2405. package/dist/client/assets/circle-minus-CyCTL3-I.js +0 -1
  2406. package/dist/client/assets/circle-off-BBXomzlG.js +0 -1
  2407. package/dist/client/assets/circle-parking-DuDQSHks.js +0 -1
  2408. package/dist/client/assets/circle-parking-off-DZpZrAqM.js +0 -1
  2409. package/dist/client/assets/circle-pause-BMorKBdg.js +0 -1
  2410. package/dist/client/assets/circle-percent-DCZLf4-l.js +0 -1
  2411. package/dist/client/assets/circle-pile-njEy4ya1.js +0 -1
  2412. package/dist/client/assets/circle-play-BAbzxT7O.js +0 -1
  2413. package/dist/client/assets/circle-plus-Clph8ggS.js +0 -1
  2414. package/dist/client/assets/circle-pound-sterling-C8qkSI86.js +0 -1
  2415. package/dist/client/assets/circle-power-DvVw3LLD.js +0 -1
  2416. package/dist/client/assets/circle-question-mark-BY5PcJ_L.js +0 -1
  2417. package/dist/client/assets/circle-slash-2-JOCQBG-2.js +0 -1
  2418. package/dist/client/assets/circle-slash-B1b-f9Xd.js +0 -1
  2419. package/dist/client/assets/circle-small-DpjCqQli.js +0 -1
  2420. package/dist/client/assets/circle-star-DmtrsmD4.js +0 -1
  2421. package/dist/client/assets/circle-stop-CauMbxh1.js +0 -1
  2422. package/dist/client/assets/circle-user-DjNOpbCC.js +0 -1
  2423. package/dist/client/assets/circle-user-round-B-xzr03M.js +0 -1
  2424. package/dist/client/assets/circle-x-BIRYB1tm.js +0 -1
  2425. package/dist/client/assets/circuit-board-Dc3HrRa4.js +0 -1
  2426. package/dist/client/assets/citrus-p3_WM7u6.js +0 -1
  2427. package/dist/client/assets/clapperboard-CDguPhg7.js +0 -1
  2428. package/dist/client/assets/classDiagram-ZZMXUADV-Cv21gZEY.js +0 -1
  2429. package/dist/client/assets/classDiagram-v2-VYDZK3BY-Cv21gZEY.js +0 -1
  2430. package/dist/client/assets/clipboard-check-C16Swphg.js +0 -1
  2431. package/dist/client/assets/clipboard-clock-C3wFqUKk.js +0 -1
  2432. package/dist/client/assets/clipboard-copy-COi6dwUG.js +0 -1
  2433. package/dist/client/assets/clipboard-list-DqCOc4Sg.js +0 -1
  2434. package/dist/client/assets/clipboard-minus-B9XAM3Qa.js +0 -1
  2435. package/dist/client/assets/clipboard-paste-cVvyZKQb.js +0 -1
  2436. package/dist/client/assets/clipboard-pen-Opfxbi9H.js +0 -1
  2437. package/dist/client/assets/clipboard-pen-line-DJ4oMIpg.js +0 -1
  2438. package/dist/client/assets/clipboard-plus-vIvEjco5.js +0 -1
  2439. package/dist/client/assets/clipboard-stZ1W8LA.js +0 -1
  2440. package/dist/client/assets/clipboard-type-BvxiUYkS.js +0 -1
  2441. package/dist/client/assets/clipboard-x-DgMIjds1.js +0 -1
  2442. package/dist/client/assets/clock-1-CWq8AHFy.js +0 -1
  2443. package/dist/client/assets/clock-10-B9lNkw3y.js +0 -1
  2444. package/dist/client/assets/clock-11-B16GN_VG.js +0 -1
  2445. package/dist/client/assets/clock-12-CJ4VGWCr.js +0 -1
  2446. package/dist/client/assets/clock-2-CxEWVf23.js +0 -1
  2447. package/dist/client/assets/clock-4-rberE6fK.js +0 -1
  2448. package/dist/client/assets/clock-5-jPuEKzF-.js +0 -1
  2449. package/dist/client/assets/clock-6-OLxyjnGY.js +0 -1
  2450. package/dist/client/assets/clock-7-rOAuaq1C.js +0 -1
  2451. package/dist/client/assets/clock-8-D3nooKw8.js +0 -1
  2452. package/dist/client/assets/clock-9-D8jHGhAc.js +0 -1
  2453. package/dist/client/assets/clock-DQ1-qjg_.js +0 -1
  2454. package/dist/client/assets/clock-alert-wNKmDibM.js +0 -1
  2455. package/dist/client/assets/clock-arrow-down-DnWss1x8.js +0 -1
  2456. package/dist/client/assets/clock-arrow-up-ClYA6BLk.js +0 -1
  2457. package/dist/client/assets/clock-check-BiuV_j1C.js +0 -1
  2458. package/dist/client/assets/clock-fading-jVXllVrb.js +0 -1
  2459. package/dist/client/assets/clock-plus-Bry0XOX7.js +0 -1
  2460. package/dist/client/assets/closed-caption-BJfamE6z.js +0 -1
  2461. package/dist/client/assets/cloud-DQQoJcst.js +0 -1
  2462. package/dist/client/assets/cloud-alert-6J2UlsBn.js +0 -1
  2463. package/dist/client/assets/cloud-backup-Bc2cLliP.js +0 -1
  2464. package/dist/client/assets/cloud-check-DB2qdS_a.js +0 -1
  2465. package/dist/client/assets/cloud-cog-BV4OYOGo.js +0 -1
  2466. package/dist/client/assets/cloud-download-DZDrA8GP.js +0 -1
  2467. package/dist/client/assets/cloud-drizzle-DqPbEbUt.js +0 -1
  2468. package/dist/client/assets/cloud-fog-BaE0QBXf.js +0 -1
  2469. package/dist/client/assets/cloud-hail-Ds5MkLPR.js +0 -1
  2470. package/dist/client/assets/cloud-lightning-Bxw5rsaf.js +0 -1
  2471. package/dist/client/assets/cloud-moon-DUf-cRlq.js +0 -1
  2472. package/dist/client/assets/cloud-moon-rain-DlldUeTr.js +0 -1
  2473. package/dist/client/assets/cloud-off-D12q5y9n.js +0 -1
  2474. package/dist/client/assets/cloud-rain-B9c_xoNt.js +0 -1
  2475. package/dist/client/assets/cloud-rain-wind-BjQA0VNP.js +0 -1
  2476. package/dist/client/assets/cloud-snow-DkJfQlJZ.js +0 -1
  2477. package/dist/client/assets/cloud-sun-Bsm5vDoa.js +0 -1
  2478. package/dist/client/assets/cloud-sun-rain-e6HHkuVA.js +0 -1
  2479. package/dist/client/assets/cloud-sync-uvcsQwn-.js +0 -1
  2480. package/dist/client/assets/cloud-upload-DWpOEQnD.js +0 -1
  2481. package/dist/client/assets/cloudy-DUoxwZ1j.js +0 -1
  2482. package/dist/client/assets/clover-8Duegb5W.js +0 -1
  2483. package/dist/client/assets/club-DwMeRlHi.js +0 -1
  2484. package/dist/client/assets/code-CdskSBVx.js +0 -1
  2485. package/dist/client/assets/coffee-BFLGuS2L.js +0 -1
  2486. package/dist/client/assets/cog-C0GLLNvj.js +0 -1
  2487. package/dist/client/assets/coins-D0yJE0Uk.js +0 -1
  2488. package/dist/client/assets/columns-3-DfEWWU-C.js +0 -1
  2489. package/dist/client/assets/columns-3-cog-DKpLc4w9.js +0 -1
  2490. package/dist/client/assets/columns-4-DAhFYCwS.js +0 -1
  2491. package/dist/client/assets/combine-Chv3hsFL.js +0 -1
  2492. package/dist/client/assets/command-YLs5Q-hJ.js +0 -1
  2493. package/dist/client/assets/compass-DYCgB0xw.js +0 -1
  2494. package/dist/client/assets/component-WEbENHCy.js +0 -1
  2495. package/dist/client/assets/computer-B3UajK6-.js +0 -1
  2496. package/dist/client/assets/concierge-bell-DoZvsN_-.js +0 -1
  2497. package/dist/client/assets/cone-C2iKmeJm.js +0 -1
  2498. package/dist/client/assets/construction-BkoqPUEU.js +0 -1
  2499. package/dist/client/assets/contact-cV7h02jQ.js +0 -1
  2500. package/dist/client/assets/contact-round-BlKVs_RW.js +0 -1
  2501. package/dist/client/assets/container-CsEa150P.js +0 -1
  2502. package/dist/client/assets/contrast-BXryzzOd.js +0 -1
  2503. package/dist/client/assets/cookie-lz9hDCGl.js +0 -1
  2504. package/dist/client/assets/cooking-pot-mXi5pBAQ.js +0 -1
  2505. package/dist/client/assets/copy-check-B9xBC_d9.js +0 -1
  2506. package/dist/client/assets/copy-minus-QNdddK1x.js +0 -1
  2507. package/dist/client/assets/copy-plus-3UAVYdm9.js +0 -1
  2508. package/dist/client/assets/copy-slash-DkHR1xfC.js +0 -1
  2509. package/dist/client/assets/copy-x-CKDUjR0l.js +0 -1
  2510. package/dist/client/assets/copyleft-BdUjGMk5.js +0 -1
  2511. package/dist/client/assets/copyright-Do1wE4bw.js +0 -1
  2512. package/dist/client/assets/corner-down-left-CISz8eob.js +0 -1
  2513. package/dist/client/assets/corner-left-down-Cb2XJcOb.js +0 -1
  2514. package/dist/client/assets/corner-left-up-CymrHbso.js +0 -1
  2515. package/dist/client/assets/corner-right-down-BrRx9xKZ.js +0 -1
  2516. package/dist/client/assets/corner-right-up-3eDUQYYk.js +0 -1
  2517. package/dist/client/assets/corner-up-right-BrecVfMY.js +0 -1
  2518. package/dist/client/assets/cose-bilkent-JH36ORCC-BMDDOVdG.js +0 -1
  2519. package/dist/client/assets/cose-bilkent-JH36ORCC-BMDDOVdG.js.br +0 -0
  2520. package/dist/client/assets/cose-bilkent-JH36ORCC-BMDDOVdG.js.gz +0 -0
  2521. package/dist/client/assets/cpu-CJsfiD-w.js +0 -1
  2522. package/dist/client/assets/creative-commons-BTLDYBv3.js +0 -1
  2523. package/dist/client/assets/credit-card-CkgyogGO.js +0 -1
  2524. package/dist/client/assets/croissant-n0zNPPPu.js +0 -1
  2525. package/dist/client/assets/crop-CX_fdc1G.js +0 -1
  2526. package/dist/client/assets/cross-DYrZYEjn.js +0 -1
  2527. package/dist/client/assets/crosshair-Bz2YXcLc.js +0 -1
  2528. package/dist/client/assets/crown-MeJCBzwV.js +0 -1
  2529. package/dist/client/assets/cuboid-mdtAbKL1.js +0 -1
  2530. package/dist/client/assets/cup-soda-3sAOCho1.js +0 -1
  2531. package/dist/client/assets/currency-1hVcVJCQ.js +0 -1
  2532. package/dist/client/assets/cylinder-Bep7hIlI.js +0 -1
  2533. package/dist/client/assets/cynefin-OW5HDTMX-lzFy0gAY.js +0 -166
  2534. package/dist/client/assets/cynefin-OW5HDTMX-lzFy0gAY.js.br +0 -0
  2535. package/dist/client/assets/cynefin-OW5HDTMX-lzFy0gAY.js.gz +0 -0
  2536. package/dist/client/assets/cynefinDiagram-5FMLGOSQ-DZUisZBm.js +0 -62
  2537. package/dist/client/assets/cynefinDiagram-5FMLGOSQ-DZUisZBm.js.br +0 -0
  2538. package/dist/client/assets/cynefinDiagram-5FMLGOSQ-DZUisZBm.js.gz +0 -0
  2539. package/dist/client/assets/dagre-GXQ25YYZ-LgqTl11t.js +0 -4
  2540. package/dist/client/assets/dagre-GXQ25YYZ-LgqTl11t.js.br +0 -0
  2541. package/dist/client/assets/dagre-GXQ25YYZ-LgqTl11t.js.gz +0 -0
  2542. package/dist/client/assets/dam-BJA1E8Nl.js +0 -1
  2543. package/dist/client/assets/database-CFEplxKx.js +0 -1
  2544. package/dist/client/assets/database-backup-B1DFN9UN.js +0 -1
  2545. package/dist/client/assets/database-search-pzJgah1P.js +0 -1
  2546. package/dist/client/assets/database-zap-CTtVGhPc.js +0 -1
  2547. package/dist/client/assets/decimals-arrow-left-C3gRwyNX.js +0 -1
  2548. package/dist/client/assets/decimals-arrow-right-F0tpCEy6.js +0 -1
  2549. package/dist/client/assets/delete-D_bel-Bm.js +0 -1
  2550. package/dist/client/assets/dessert-B0fWxRiZ.js +0 -1
  2551. package/dist/client/assets/diagram-S7CK7UJ4-DYQCj6ah.js +0 -30
  2552. package/dist/client/assets/diagram-S7CK7UJ4-DYQCj6ah.js.br +0 -0
  2553. package/dist/client/assets/diagram-S7CK7UJ4-DYQCj6ah.js.gz +0 -0
  2554. package/dist/client/assets/diagram-UQ7AKVKN-Clq6olZ7.js +0 -41
  2555. package/dist/client/assets/diagram-UQ7AKVKN-Clq6olZ7.js.br +0 -0
  2556. package/dist/client/assets/diagram-UQ7AKVKN-Clq6olZ7.js.gz +0 -0
  2557. package/dist/client/assets/diagram-VSXAHHWV-Bre_gL1f.js +0 -3
  2558. package/dist/client/assets/diagram-VSXAHHWV-Bre_gL1f.js.br +0 -0
  2559. package/dist/client/assets/diagram-VSXAHHWV-Bre_gL1f.js.gz +0 -0
  2560. package/dist/client/assets/diagram-VX7I27RA-CtTiItYT.js +0 -24
  2561. package/dist/client/assets/diagram-VX7I27RA-CtTiItYT.js.br +0 -0
  2562. package/dist/client/assets/diagram-VX7I27RA-CtTiItYT.js.gz +0 -0
  2563. package/dist/client/assets/diagram-Z3DM3KII-C9DoJwcn.js +0 -24
  2564. package/dist/client/assets/diagram-Z3DM3KII-C9DoJwcn.js.br +0 -0
  2565. package/dist/client/assets/diagram-Z3DM3KII-C9DoJwcn.js.gz +0 -0
  2566. package/dist/client/assets/diameter-DzdyACJK.js +0 -1
  2567. package/dist/client/assets/diamond-CaK3n8tM.js +0 -1
  2568. package/dist/client/assets/diamond-minus-BWD4tndP.js +0 -1
  2569. package/dist/client/assets/diamond-percent-Dm2EuJ8R.js +0 -1
  2570. package/dist/client/assets/diamond-plus-ed_3IsTc.js +0 -1
  2571. package/dist/client/assets/dice-1-CCkVB9uB.js +0 -1
  2572. package/dist/client/assets/dice-2-BSNd4QO4.js +0 -1
  2573. package/dist/client/assets/dice-3-DlwfA-Sn.js +0 -1
  2574. package/dist/client/assets/dice-4-vS_oYAd8.js +0 -1
  2575. package/dist/client/assets/dice-5-D6JHlV3Z.js +0 -1
  2576. package/dist/client/assets/dice-6-BjIsJyko.js +0 -1
  2577. package/dist/client/assets/dices-CabSdF-J.js +0 -1
  2578. package/dist/client/assets/diff-Ds33W-TI.js +0 -1
  2579. package/dist/client/assets/disc-2-CJIo_TGy.js +0 -1
  2580. package/dist/client/assets/disc-3-DqyITJE0.js +0 -1
  2581. package/dist/client/assets/disc-album-DBB_ocuQ.js +0 -1
  2582. package/dist/client/assets/disc-jmSvTBCw.js +0 -1
  2583. package/dist/client/assets/divide-CWhq2g4t.js +0 -1
  2584. package/dist/client/assets/dna-CPv8A0z9.js +0 -1
  2585. package/dist/client/assets/dna-off-Czip43CU.js +0 -1
  2586. package/dist/client/assets/dock-OBKLZT2m.js +0 -1
  2587. package/dist/client/assets/dog-CJ7FQkRG.js +0 -1
  2588. package/dist/client/assets/dollar-sign-DRBrq-GW.js +0 -1
  2589. package/dist/client/assets/donut-CdvQ9N16.js +0 -1
  2590. package/dist/client/assets/door-closed-locked-DwGYjdT3.js +0 -1
  2591. package/dist/client/assets/door-closed-tORSXwq-.js +0 -1
  2592. package/dist/client/assets/door-open-DkWaK6hR.js +0 -1
  2593. package/dist/client/assets/dot-C6c3R7mm.js +0 -1
  2594. package/dist/client/assets/drafting-compass-B-BtT0sp.js +0 -1
  2595. package/dist/client/assets/drama-BM1sh3__.js +0 -1
  2596. package/dist/client/assets/drill-ekN64CK2.js +0 -1
  2597. package/dist/client/assets/drone-DoAdlzDo.js +0 -1
  2598. package/dist/client/assets/droplet-Cfmhv8-1.js +0 -1
  2599. package/dist/client/assets/droplet-off-EYtCZQPv.js +0 -1
  2600. package/dist/client/assets/droplets-CoqAbu1P.js +0 -1
  2601. package/dist/client/assets/drum-PRuoDRvv.js +0 -1
  2602. package/dist/client/assets/drumstick-UsaR7Ffa.js +0 -1
  2603. package/dist/client/assets/dumbbell-LValYnzt.js +0 -1
  2604. package/dist/client/assets/ear-DlbcdTYU.js +0 -1
  2605. package/dist/client/assets/ear-off-BWjFtyN5.js +0 -1
  2606. package/dist/client/assets/earth-DRjazTSR.js +0 -1
  2607. package/dist/client/assets/earth-lock-B-4zzWJR.js +0 -1
  2608. package/dist/client/assets/ebnfDiagram-PWID7BFC-DyxEEjwd.js +0 -1
  2609. package/dist/client/assets/ebnfDiagram-PWID7BFC-DyxEEjwd.js.br +0 -0
  2610. package/dist/client/assets/ebnfDiagram-PWID7BFC-DyxEEjwd.js.gz +0 -0
  2611. package/dist/client/assets/eclipse-LA3GjROK.js +0 -1
  2612. package/dist/client/assets/egg-IecpFVCB.js +0 -1
  2613. package/dist/client/assets/egg-fried-BePh1MG_.js +0 -1
  2614. package/dist/client/assets/egg-off--ct9qnr9.js +0 -1
  2615. package/dist/client/assets/ellipse-DeaI8CpE.js +0 -1
  2616. package/dist/client/assets/ellipsis-vertical-CAmqe-WW.js +0 -1
  2617. package/dist/client/assets/equal-CdkXOjL6.js +0 -1
  2618. package/dist/client/assets/equal-approximately-BmFU0YGB.js +0 -1
  2619. package/dist/client/assets/equal-not-C7g8iHED.js +0 -1
  2620. package/dist/client/assets/erDiagram-RLTQ6QDP-BWI-MWAK.js +0 -99
  2621. package/dist/client/assets/erDiagram-RLTQ6QDP-BWI-MWAK.js.br +0 -0
  2622. package/dist/client/assets/erDiagram-RLTQ6QDP-BWI-MWAK.js.gz +0 -0
  2623. package/dist/client/assets/eraser-D5662r3h.js +0 -1
  2624. package/dist/client/assets/ethernet-port-C2wnecoP.js +0 -1
  2625. package/dist/client/assets/euro-CxkcmITa.js +0 -1
  2626. package/dist/client/assets/ev-charger-CZ51uup3.js +0 -1
  2627. package/dist/client/assets/expand-BK4gPFNG.js +0 -1
  2628. package/dist/client/assets/external-link-H9_oJhBN.js +0 -1
  2629. package/dist/client/assets/eye-CC89kv3u.js +0 -1
  2630. package/dist/client/assets/eye-closed-CeNcH5PS.js +0 -1
  2631. package/dist/client/assets/eye-off-B95TdVpe.js +0 -1
  2632. package/dist/client/assets/factory-EjTYr5nH.js +0 -1
  2633. package/dist/client/assets/fan-CNXzvNMF.js +0 -1
  2634. package/dist/client/assets/fast-forward-BC3bMLr9.js +0 -1
  2635. package/dist/client/assets/feather-Cl6KdYLb.js +0 -1
  2636. package/dist/client/assets/fence-Bl-Q8ko6.js +0 -1
  2637. package/dist/client/assets/ferris-wheel-8I1MYH8M.js +0 -1
  2638. package/dist/client/assets/file-archive-Ds_Xybcp.js +0 -1
  2639. package/dist/client/assets/file-axis-3d-BV-ozCh9.js +0 -1
  2640. package/dist/client/assets/file-badge-Bat6NW0n.js +0 -1
  2641. package/dist/client/assets/file-box-C_z7EXBk.js +0 -1
  2642. package/dist/client/assets/file-braces-1jtCEm9P.js +0 -1
  2643. package/dist/client/assets/file-braces-corner-BgQQK1eT.js +0 -1
  2644. package/dist/client/assets/file-chart-column-BnUFYrtM.js +0 -1
  2645. package/dist/client/assets/file-chart-column-increasing-Ct9wqo4L.js +0 -1
  2646. package/dist/client/assets/file-chart-line-BvtYzP6V.js +0 -1
  2647. package/dist/client/assets/file-chart-pie-CT_4uhHZ.js +0 -1
  2648. package/dist/client/assets/file-check-D8XpQJd2.js +0 -1
  2649. package/dist/client/assets/file-check-corner-BY3s5enV.js +0 -1
  2650. package/dist/client/assets/file-clock-a1bO0e_B.js +0 -1
  2651. package/dist/client/assets/file-code-corner-D7aIGPO1.js +0 -1
  2652. package/dist/client/assets/file-cog-CUPzIuRx.js +0 -1
  2653. package/dist/client/assets/file-diff-DF0GD1gf.js +0 -1
  2654. package/dist/client/assets/file-digit-CoXPKYwz.js +0 -1
  2655. package/dist/client/assets/file-down-u-vtnSNN.js +0 -1
  2656. package/dist/client/assets/file-exclamation-point-DBsT4Szx.js +0 -1
  2657. package/dist/client/assets/file-headphone-BNEpa8jO.js +0 -1
  2658. package/dist/client/assets/file-heart-BuBoVlRa.js +0 -1
  2659. package/dist/client/assets/file-image-DATVHX24.js +0 -1
  2660. package/dist/client/assets/file-input-DVBJHztn.js +0 -1
  2661. package/dist/client/assets/file-key-BJAQeist.js +0 -1
  2662. package/dist/client/assets/file-lock-DdOLrxKc.js +0 -1
  2663. package/dist/client/assets/file-minus-BecAADK0.js +0 -1
  2664. package/dist/client/assets/file-minus-corner-M0P_8kTz.js +0 -1
  2665. package/dist/client/assets/file-music-DA8xB8Ia.js +0 -1
  2666. package/dist/client/assets/file-output-CaeAo5uE.js +0 -1
  2667. package/dist/client/assets/file-pen-BJmxNhX5.js +0 -1
  2668. package/dist/client/assets/file-pen-line-xDME3rbD.js +0 -1
  2669. package/dist/client/assets/file-play-ChVWYUmN.js +0 -1
  2670. package/dist/client/assets/file-plus-Bo-ayUAv.js +0 -1
  2671. package/dist/client/assets/file-plus-corner-CGpA_gTU.js +0 -1
  2672. package/dist/client/assets/file-question-mark-DbXhUWrW.js +0 -1
  2673. package/dist/client/assets/file-scan-CGpdLMH0.js +0 -1
  2674. package/dist/client/assets/file-search-corner-qPPiie9k.js +0 -1
  2675. package/dist/client/assets/file-search-lBHq_K4z.js +0 -1
  2676. package/dist/client/assets/file-signal-BVqRkXAu.js +0 -1
  2677. package/dist/client/assets/file-sliders-Cs3j5rf8.js +0 -1
  2678. package/dist/client/assets/file-spreadsheet-C10tppsG.js +0 -1
  2679. package/dist/client/assets/file-stack-BslrfFU2.js +0 -1
  2680. package/dist/client/assets/file-symlink-Bm5dHAbS.js +0 -1
  2681. package/dist/client/assets/file-terminal-Cx19460U.js +0 -1
  2682. package/dist/client/assets/file-type-BQWoRU_4.js +0 -1
  2683. package/dist/client/assets/file-type-corner-CYRDGblh.js +0 -1
  2684. package/dist/client/assets/file-up-DZw7z8vG.js +0 -1
  2685. package/dist/client/assets/file-user-BWdOlJSW.js +0 -1
  2686. package/dist/client/assets/file-video-camera-BMv2j8Pw.js +0 -1
  2687. package/dist/client/assets/file-volume-DW5iyrA0.js +0 -1
  2688. package/dist/client/assets/file-x-BdSNW5c_.js +0 -1
  2689. package/dist/client/assets/file-x-corner-Cgqx_yFS.js +0 -1
  2690. package/dist/client/assets/files-tcC3vUvZ.js +0 -1
  2691. package/dist/client/assets/film-4Mw8rnx0.js +0 -1
  2692. package/dist/client/assets/fingerprint-pattern-D8O-eQ-N.js +0 -1
  2693. package/dist/client/assets/fire-extinguisher-DPkCItEx.js +0 -1
  2694. package/dist/client/assets/fish-DDi7gRVs.js +0 -1
  2695. package/dist/client/assets/fish-off-D96fPgQb.js +0 -1
  2696. package/dist/client/assets/fish-symbol-DXpfT5Wt.js +0 -1
  2697. package/dist/client/assets/fishing-hook-C-Vgdoh9.js +0 -1
  2698. package/dist/client/assets/fishing-rod-SR5y2hmL.js +0 -1
  2699. package/dist/client/assets/flag-DcHv0Qi_.js +0 -1
  2700. package/dist/client/assets/flag-off-Bg0M9ya9.js +0 -1
  2701. package/dist/client/assets/flag-triangle-left-DButOWBe.js +0 -1
  2702. package/dist/client/assets/flag-triangle-right-BjV_vr_H.js +0 -1
  2703. package/dist/client/assets/flame-CH_32gAB.js +0 -1
  2704. package/dist/client/assets/flame-kindling-B3i2DK_W.js +0 -1
  2705. package/dist/client/assets/flashlight-DMvoAxCp.js +0 -1
  2706. package/dist/client/assets/flashlight-off-B9ij4nt3.js +0 -1
  2707. package/dist/client/assets/flask-conical-BBKCrti1.js +0 -1
  2708. package/dist/client/assets/flask-conical-off-9AFBlRlp.js +0 -1
  2709. package/dist/client/assets/flask-round-CCiGq9Ea.js +0 -1
  2710. package/dist/client/assets/flip-horizontal-2-BQoCWHd8.js +0 -1
  2711. package/dist/client/assets/flip-vertical-2-CNqYkxzx.js +0 -1
  2712. package/dist/client/assets/flowDiagram-HODETNUW-BjaBfG-7.js +0 -168
  2713. package/dist/client/assets/flowDiagram-HODETNUW-BjaBfG-7.js.br +0 -0
  2714. package/dist/client/assets/flowDiagram-HODETNUW-BjaBfG-7.js.gz +0 -0
  2715. package/dist/client/assets/flower-2-BTycbiZl.js +0 -1
  2716. package/dist/client/assets/flower-CQibHW7g.js +0 -1
  2717. package/dist/client/assets/focus-WUUCWMfm.js +0 -1
  2718. package/dist/client/assets/fold-horizontal-Cl0lsvsV.js +0 -1
  2719. package/dist/client/assets/fold-vertical-BGj3kip1.js +0 -1
  2720. package/dist/client/assets/folder-archive-DKszMIAw.js +0 -1
  2721. package/dist/client/assets/folder-bookmark-v1Ke2Wn1.js +0 -1
  2722. package/dist/client/assets/folder-check-D0fJtg_p.js +0 -1
  2723. package/dist/client/assets/folder-clock-BSApdTtc.js +0 -1
  2724. package/dist/client/assets/folder-closed-Bts5yykO.js +0 -1
  2725. package/dist/client/assets/folder-code-DQwwvS6Q.js +0 -1
  2726. package/dist/client/assets/folder-cog-COlkUcnq.js +0 -1
  2727. package/dist/client/assets/folder-dot-B3PBcfcw.js +0 -1
  2728. package/dist/client/assets/folder-down-BtXu_RhS.js +0 -1
  2729. package/dist/client/assets/folder-git-2-BtRDuJhs.js +0 -1
  2730. package/dist/client/assets/folder-git-BccZE8P9.js +0 -1
  2731. package/dist/client/assets/folder-heart-o0FW4nx2.js +0 -1
  2732. package/dist/client/assets/folder-input-Dsd-fEae.js +0 -1
  2733. package/dist/client/assets/folder-kanban-BMcaPH7W.js +0 -1
  2734. package/dist/client/assets/folder-key-Bprt0lcB.js +0 -1
  2735. package/dist/client/assets/folder-lock-BhQTEgw0.js +0 -1
  2736. package/dist/client/assets/folder-minus-BNUnyI9B.js +0 -1
  2737. package/dist/client/assets/folder-open-dot-fAWekO1-.js +0 -1
  2738. package/dist/client/assets/folder-output-CJq4wTuu.js +0 -1
  2739. package/dist/client/assets/folder-pen-B--Wcwdc.js +0 -1
  2740. package/dist/client/assets/folder-plus-C06oS7KC.js +0 -1
  2741. package/dist/client/assets/folder-root-Cdn7_LvP.js +0 -1
  2742. package/dist/client/assets/folder-search-2-CJdqr-GZ.js +0 -1
  2743. package/dist/client/assets/folder-symlink-G3BDIhqB.js +0 -1
  2744. package/dist/client/assets/folder-sync-DBCVj9f1.js +0 -1
  2745. package/dist/client/assets/folder-tree-qwcCuddu.js +0 -1
  2746. package/dist/client/assets/folder-up-BhA4RAOc.js +0 -1
  2747. package/dist/client/assets/folder-x-CxAA2D9D.js +0 -1
  2748. package/dist/client/assets/folders-C72DRGYD.js +0 -1
  2749. package/dist/client/assets/footprints-Do76BgmC.js +0 -1
  2750. package/dist/client/assets/forklift-BDxJp2tt.js +0 -1
  2751. package/dist/client/assets/form-BkSGv-7U.js +0 -1
  2752. package/dist/client/assets/forward-w_tzH-CN.js +0 -1
  2753. package/dist/client/assets/frame-DxKRnasQ.js +0 -1
  2754. package/dist/client/assets/frown-tiSvy4vI.js +0 -1
  2755. package/dist/client/assets/fuel-c0GpV4-I.js +0 -1
  2756. package/dist/client/assets/fullscreen-BCeAYE0A.js +0 -1
  2757. package/dist/client/assets/funnel-CCoS8PUN.js +0 -1
  2758. package/dist/client/assets/funnel-plus-DXk9bKjB.js +0 -1
  2759. package/dist/client/assets/funnel-x-B3PfbmtY.js +0 -1
  2760. package/dist/client/assets/gallery-horizontal-C9atJU7x.js +0 -1
  2761. package/dist/client/assets/gallery-horizontal-end-BeoX98jP.js +0 -1
  2762. package/dist/client/assets/gallery-thumbnails-BRrN6PP5.js +0 -1
  2763. package/dist/client/assets/gallery-vertical-DYdeJQHy.js +0 -1
  2764. package/dist/client/assets/gallery-vertical-end-BpQTav8P.js +0 -1
  2765. package/dist/client/assets/gamepad-2-BkliLKPC.js +0 -1
  2766. package/dist/client/assets/gamepad-B9qtBxF_.js +0 -1
  2767. package/dist/client/assets/gamepad-directional-BQjMhwqY.js +0 -1
  2768. package/dist/client/assets/ganttDiagram-EL5Y4UJY-DavEN02d.js +0 -292
  2769. package/dist/client/assets/ganttDiagram-EL5Y4UJY-DavEN02d.js.br +0 -0
  2770. package/dist/client/assets/ganttDiagram-EL5Y4UJY-DavEN02d.js.gz +0 -0
  2771. package/dist/client/assets/gauge-BhQ_40gv.js +0 -1
  2772. package/dist/client/assets/gavel-Cv_5UeLl.js +0 -1
  2773. package/dist/client/assets/gem-B7cGZcHj.js +0 -1
  2774. package/dist/client/assets/georgian-lari-dzPvoGub.js +0 -1
  2775. package/dist/client/assets/ghost-Cj2lzRx7.js +0 -1
  2776. package/dist/client/assets/gift-weFM9nvn.js +0 -1
  2777. package/dist/client/assets/git-branch-DQTHd8Jw.js +0 -1
  2778. package/dist/client/assets/git-branch-minus-BN7OBTLz.js +0 -1
  2779. package/dist/client/assets/git-branch-plus-CVjpGwiE.js +0 -1
  2780. package/dist/client/assets/git-commit-horizontal-DXffpS2P.js +0 -1
  2781. package/dist/client/assets/git-commit-vertical-GyfqOZgw.js +0 -1
  2782. package/dist/client/assets/git-compare-DIMK0bq1.js +0 -1
  2783. package/dist/client/assets/git-compare-arrows-C1FeEXKh.js +0 -1
  2784. package/dist/client/assets/git-fork-DCbJY5f4.js +0 -1
  2785. package/dist/client/assets/git-graph-D5Og9nQZ.js +0 -1
  2786. package/dist/client/assets/git-merge-BgpcKUz6.js +0 -1
  2787. package/dist/client/assets/git-merge-conflict-DX94L6kx.js +0 -1
  2788. package/dist/client/assets/git-pull-request-CC3Z0OMu.js +0 -1
  2789. package/dist/client/assets/git-pull-request-arrow-DnwgIcnH.js +0 -1
  2790. package/dist/client/assets/git-pull-request-closed-DBd2BQD7.js +0 -1
  2791. package/dist/client/assets/git-pull-request-create-D-wO9BK2.js +0 -1
  2792. package/dist/client/assets/git-pull-request-create-arrow-B4RETyuC.js +0 -1
  2793. package/dist/client/assets/git-pull-request-draft-DC5YLEg4.js +0 -1
  2794. package/dist/client/assets/gitGraphDiagram-WWUBYQGX-zHnCXyS_.js +0 -106
  2795. package/dist/client/assets/gitGraphDiagram-WWUBYQGX-zHnCXyS_.js.br +0 -0
  2796. package/dist/client/assets/gitGraphDiagram-WWUBYQGX-zHnCXyS_.js.gz +0 -0
  2797. package/dist/client/assets/glass-water-0L_bhEz9.js +0 -1
  2798. package/dist/client/assets/glasses-nUYFY8Pz.js +0 -1
  2799. package/dist/client/assets/globe-DZMdHZMX.js +0 -1
  2800. package/dist/client/assets/globe-check-D6MRw6LI.js +0 -1
  2801. package/dist/client/assets/globe-lock-ByRhQVqZ.js +0 -1
  2802. package/dist/client/assets/globe-off-DE39nVsB.js +0 -1
  2803. package/dist/client/assets/globe-x-CiW7Ksx2.js +0 -1
  2804. package/dist/client/assets/goal-D_EbP7nM.js +0 -1
  2805. package/dist/client/assets/gpu-CbRV0N04.js +0 -1
  2806. package/dist/client/assets/graduation-cap-BtBy0vYc.js +0 -1
  2807. package/dist/client/assets/grape-D8L-3SxD.js +0 -1
  2808. package/dist/client/assets/grid-2x2-CNFzUSHm.js +0 -1
  2809. package/dist/client/assets/grid-2x2-check-2VluV1xz.js +0 -1
  2810. package/dist/client/assets/grid-2x2-plus-DRobO1-U.js +0 -1
  2811. package/dist/client/assets/grid-2x2-x-bVsUiJBW.js +0 -1
  2812. package/dist/client/assets/grid-3x2-CdFmhO3a.js +0 -1
  2813. package/dist/client/assets/grid-3x3-D77v-cVP.js +0 -1
  2814. package/dist/client/assets/grip-horizontal-RcX00j7H.js +0 -1
  2815. package/dist/client/assets/grip-jN-IzBRP.js +0 -1
  2816. package/dist/client/assets/grip-vertical--nr9_UbN.js +0 -1
  2817. package/dist/client/assets/group-taQi5IaV.js +0 -1
  2818. package/dist/client/assets/guitar-BKlAYqCf.js +0 -1
  2819. package/dist/client/assets/ham-CgqhmY6-.js +0 -1
  2820. package/dist/client/assets/hamburger-CerYK8M3.js +0 -1
  2821. package/dist/client/assets/hammer-BDjEQux6.js +0 -1
  2822. package/dist/client/assets/hand-CjexLIuc.js +0 -1
  2823. package/dist/client/assets/hand-coins-dV1AsooT.js +0 -1
  2824. package/dist/client/assets/hand-fist-C3cuwZub.js +0 -1
  2825. package/dist/client/assets/hand-grab-Bf_l4gK2.js +0 -1
  2826. package/dist/client/assets/hand-heart-BcR1Foio.js +0 -1
  2827. package/dist/client/assets/hand-helping-BcZmceKc.js +0 -1
  2828. package/dist/client/assets/hand-metal-WbOHf0Ck.js +0 -1
  2829. package/dist/client/assets/hand-platter-CvbXQA6g.js +0 -1
  2830. package/dist/client/assets/handbag-a5X23re7.js +0 -1
  2831. package/dist/client/assets/handshake-ity4pfiy.js +0 -1
  2832. package/dist/client/assets/hard-drive-DrrBFY4Q.js +0 -1
  2833. package/dist/client/assets/hard-drive-download-CbqfybEO.js +0 -1
  2834. package/dist/client/assets/hard-drive-upload-CqnJEQSP.js +0 -1
  2835. package/dist/client/assets/hard-hat-BIqZcV4N.js +0 -1
  2836. package/dist/client/assets/hash-CqvUwtmQ.js +0 -1
  2837. package/dist/client/assets/hat-glasses-BTV9jMdI.js +0 -1
  2838. package/dist/client/assets/haze-ePuIA_IN.js +0 -1
  2839. package/dist/client/assets/hd-CJAorJfb.js +0 -1
  2840. package/dist/client/assets/hdmi-port-BsZw_Z5u.js +0 -1
  2841. package/dist/client/assets/heading-1-BDmyPXEb.js +0 -1
  2842. package/dist/client/assets/heading-2-BWSTCerZ.js +0 -1
  2843. package/dist/client/assets/heading-3-BvXaBjhJ.js +0 -1
  2844. package/dist/client/assets/heading-4-BALiw7Bk.js +0 -1
  2845. package/dist/client/assets/heading-5-3KH7H6ev.js +0 -1
  2846. package/dist/client/assets/heading-6-vLChdk0T.js +0 -1
  2847. package/dist/client/assets/heading-B2n_Z52_.js +0 -1
  2848. package/dist/client/assets/headphone-off-SJFcOQ6r.js +0 -1
  2849. package/dist/client/assets/headphones-IFSJxRT9.js +0 -1
  2850. package/dist/client/assets/headset-U-MUq-Az.js +0 -1
  2851. package/dist/client/assets/heart-CcOevQMl.js +0 -1
  2852. package/dist/client/assets/heart-crack-DCukMWzS.js +0 -1
  2853. package/dist/client/assets/heart-handshake-Dl705d7T.js +0 -1
  2854. package/dist/client/assets/heart-minus-CuoahDi5.js +0 -1
  2855. package/dist/client/assets/heart-off-DJkiafrf.js +0 -1
  2856. package/dist/client/assets/heart-plus-HE53VRnn.js +0 -1
  2857. package/dist/client/assets/heart-pulse-DlAIBme_.js +0 -1
  2858. package/dist/client/assets/heart-x-DbyfAtbr.js +0 -1
  2859. package/dist/client/assets/heater-Cj5akANG.js +0 -1
  2860. package/dist/client/assets/helicopter-Cz95-ab9.js +0 -1
  2861. package/dist/client/assets/hexagon-D282FRkJ.js +0 -1
  2862. package/dist/client/assets/highlighter-BopRLNqs.js +0 -1
  2863. package/dist/client/assets/history-C1Vismkc.js +0 -1
  2864. package/dist/client/assets/hop-CCqkRVDh.js +0 -1
  2865. package/dist/client/assets/hop-CCqkRVDh.js.br +0 -0
  2866. package/dist/client/assets/hop-CCqkRVDh.js.gz +0 -0
  2867. package/dist/client/assets/hop-off-3d42uJ3X.js +0 -1
  2868. package/dist/client/assets/hop-off-3d42uJ3X.js.br +0 -0
  2869. package/dist/client/assets/hop-off-3d42uJ3X.js.gz +0 -0
  2870. package/dist/client/assets/hospital-DYJSyfwa.js +0 -1
  2871. package/dist/client/assets/hotel-CX9hS9Hn.js +0 -1
  2872. package/dist/client/assets/hourglass-DcdQEbqh.js +0 -1
  2873. package/dist/client/assets/house-B5Lkl0hs.js +0 -1
  2874. package/dist/client/assets/house-heart-_qtKdwjk.js +0 -1
  2875. package/dist/client/assets/house-plug-CLDfGu37.js +0 -1
  2876. package/dist/client/assets/house-plus-Drli6lUF.js +0 -1
  2877. package/dist/client/assets/house-wifi-D9ojbww9.js +0 -1
  2878. package/dist/client/assets/ice-cream-bowl-BpgAjEtA.js +0 -1
  2879. package/dist/client/assets/ice-cream-cone-C3N0XjUH.js +0 -1
  2880. package/dist/client/assets/id-card-CqFXQX_S.js +0 -1
  2881. package/dist/client/assets/id-card-lanyard-0XNFLbkR.js +0 -1
  2882. package/dist/client/assets/image-down-wGbEgaKi.js +0 -1
  2883. package/dist/client/assets/image-minus-SJFz-_hi.js +0 -1
  2884. package/dist/client/assets/image-off-umVpVaRq.js +0 -1
  2885. package/dist/client/assets/image-play-BuYVGK4O.js +0 -1
  2886. package/dist/client/assets/image-plus-BFRorP0M.js +0 -1
  2887. package/dist/client/assets/image-up-_SBc60EA.js +0 -1
  2888. package/dist/client/assets/image-upscale-CD7Uoq-c.js +0 -1
  2889. package/dist/client/assets/images-D_F9cdC6.js +0 -1
  2890. package/dist/client/assets/import-C851sa1b.js +0 -1
  2891. package/dist/client/assets/inbox-DSSD1NLf.js +0 -1
  2892. package/dist/client/assets/index-Bxti5y6a.css +0 -1
  2893. package/dist/client/assets/index-Bxti5y6a.css.br +0 -0
  2894. package/dist/client/assets/index-Bxti5y6a.css.gz +0 -0
  2895. package/dist/client/assets/index-DFA2vCpo.js +0 -259
  2896. package/dist/client/assets/index-DFA2vCpo.js.br +0 -0
  2897. package/dist/client/assets/index-DFA2vCpo.js.gz +0 -0
  2898. package/dist/client/assets/indian-rupee-CZzy_usp.js +0 -1
  2899. package/dist/client/assets/infinity-BUBCCUPe.js +0 -1
  2900. package/dist/client/assets/info-Dhv-bFU0.js +0 -1
  2901. package/dist/client/assets/infoDiagram-27XIBGKW-abSbtAmh.js +0 -2
  2902. package/dist/client/assets/inspection-panel-B8Vbm3dr.js +0 -1
  2903. package/dist/client/assets/ishikawaDiagram-5VMMS53U-B8u60-t6.js +0 -70
  2904. package/dist/client/assets/ishikawaDiagram-5VMMS53U-B8u60-t6.js.br +0 -0
  2905. package/dist/client/assets/ishikawaDiagram-5VMMS53U-B8u60-t6.js.gz +0 -0
  2906. package/dist/client/assets/italic-BkUXKHBF.js +0 -1
  2907. package/dist/client/assets/iteration-ccw-D9duF376.js +0 -1
  2908. package/dist/client/assets/iteration-cw-RjC8ljU8.js +0 -1
  2909. package/dist/client/assets/japanese-yen-CJbkShuk.js +0 -1
  2910. package/dist/client/assets/journeyDiagram-3NMN7TZE-CkZlYTgR.js +0 -139
  2911. package/dist/client/assets/journeyDiagram-3NMN7TZE-CkZlYTgR.js.br +0 -0
  2912. package/dist/client/assets/journeyDiagram-3NMN7TZE-CkZlYTgR.js.gz +0 -0
  2913. package/dist/client/assets/joystick-D7WheuA1.js +0 -1
  2914. package/dist/client/assets/kanban-UmgzG93w.js +0 -1
  2915. package/dist/client/assets/kanban-definition-UXKFOSKX-0FcMJv2z.js +0 -89
  2916. package/dist/client/assets/kanban-definition-UXKFOSKX-0FcMJv2z.js.br +0 -0
  2917. package/dist/client/assets/kanban-definition-UXKFOSKX-0FcMJv2z.js.gz +0 -0
  2918. package/dist/client/assets/kayak-CMrlXYIL.js +0 -1
  2919. package/dist/client/assets/key-nLpUFNnr.js +0 -1
  2920. package/dist/client/assets/key-round-CplDCQC5.js +0 -1
  2921. package/dist/client/assets/key-square-DwenzMta.js +0 -1
  2922. package/dist/client/assets/keyboard-Kab98cxu.js +0 -1
  2923. package/dist/client/assets/keyboard-music-Cq4ZgOkN.js +0 -1
  2924. package/dist/client/assets/keyboard-off-DHOtfXzu.js +0 -1
  2925. package/dist/client/assets/lamp-B_mBJ-gH.js +0 -1
  2926. package/dist/client/assets/lamp-ceiling-CZABAy5i.js +0 -1
  2927. package/dist/client/assets/lamp-desk-DJJUm2Uw.js +0 -1
  2928. package/dist/client/assets/lamp-floor-DCunoucB.js +0 -1
  2929. package/dist/client/assets/lamp-wall-down-D7AjXa3Z.js +0 -1
  2930. package/dist/client/assets/lamp-wall-up-DK6jSSmo.js +0 -1
  2931. package/dist/client/assets/land-plot-C0iut6vC.js +0 -1
  2932. package/dist/client/assets/landmark-B_T3PJH3.js +0 -1
  2933. package/dist/client/assets/languages-hNhcM76T.js +0 -1
  2934. package/dist/client/assets/laptop-BkWyvKLh.js +0 -1
  2935. package/dist/client/assets/laptop-minimal-MVPAU_Un.js +0 -1
  2936. package/dist/client/assets/laptop-minimal-check-D8t_U3rd.js +0 -1
  2937. package/dist/client/assets/lasso-BX4y3L57.js +0 -1
  2938. package/dist/client/assets/lasso-select-6BzXw7dr.js +0 -1
  2939. package/dist/client/assets/laugh-BS6k3NFX.js +0 -1
  2940. package/dist/client/assets/layers-2-C19yCYWM.js +0 -1
  2941. package/dist/client/assets/layers-BANvDJfh.js +0 -1
  2942. package/dist/client/assets/layers-minus-3G5OFD2z.js +0 -1
  2943. package/dist/client/assets/layers-plus-BojWYRQ3.js +0 -1
  2944. package/dist/client/assets/layout-3Fqh5005.js +0 -1
  2945. package/dist/client/assets/layout-3Fqh5005.js.br +0 -0
  2946. package/dist/client/assets/layout-3Fqh5005.js.gz +0 -0
  2947. package/dist/client/assets/layout-dashboard-B7iUmEMY.js +0 -1
  2948. package/dist/client/assets/layout-grid-C0V7dQsb.js +0 -1
  2949. package/dist/client/assets/layout-list-CQP0O6CR.js +0 -1
  2950. package/dist/client/assets/layout-panel-left-CAi2HTMb.js +0 -1
  2951. package/dist/client/assets/layout-panel-top-CL0cj0U2.js +0 -1
  2952. package/dist/client/assets/layout-template-BEwTSZwl.js +0 -1
  2953. package/dist/client/assets/leaf-Q1X2HAZ9.js +0 -1
  2954. package/dist/client/assets/leafy-green-C9hvgiGx.js +0 -1
  2955. package/dist/client/assets/lectern-cFZ6LmSX.js +0 -1
  2956. package/dist/client/assets/lens-concave-gJAHwbuj.js +0 -1
  2957. package/dist/client/assets/lens-convex-D_lxfPiw.js +0 -1
  2958. package/dist/client/assets/library-big-cM9EIL8n.js +0 -1
  2959. package/dist/client/assets/library-yZZDTHPJ.js +0 -1
  2960. package/dist/client/assets/life-buoy-Qnr8ggGC.js +0 -1
  2961. package/dist/client/assets/ligature-Co0AVFtu.js +0 -1
  2962. package/dist/client/assets/lightbulb-off-CtFr7c-V.js +0 -1
  2963. package/dist/client/assets/line-dot-right-horizontal-DX38eu__.js +0 -1
  2964. package/dist/client/assets/line-squiggle-D_r4gE9b.js +0 -1
  2965. package/dist/client/assets/line-style-Ch77Pvjg.js +0 -1
  2966. package/dist/client/assets/link-HalVju9n.js +0 -1
  2967. package/dist/client/assets/list-Q16BplFI.js +0 -1
  2968. package/dist/client/assets/list-check-6eQiKhVW.js +0 -1
  2969. package/dist/client/assets/list-checks-euqGfpN4.js +0 -1
  2970. package/dist/client/assets/list-chevrons-down-up-z8y8fxGH.js +0 -1
  2971. package/dist/client/assets/list-chevrons-up-down-CqojI_1q.js +0 -1
  2972. package/dist/client/assets/list-collapse-DaOr0QrL.js +0 -1
  2973. package/dist/client/assets/list-end-B9paNKBe.js +0 -1
  2974. package/dist/client/assets/list-filter-Cvin-URv.js +0 -1
  2975. package/dist/client/assets/list-filter-plus-CtvTo4d7.js +0 -1
  2976. package/dist/client/assets/list-indent-decrease-CpA7F5TC.js +0 -1
  2977. package/dist/client/assets/list-indent-increase-D1_dQjgw.js +0 -1
  2978. package/dist/client/assets/list-minus-DfSDLgIT.js +0 -1
  2979. package/dist/client/assets/list-music-DsLZ9vM8.js +0 -1
  2980. package/dist/client/assets/list-ordered-CBPrn6P3.js +0 -1
  2981. package/dist/client/assets/list-plus-Bv_P89Ag.js +0 -1
  2982. package/dist/client/assets/list-restart-DdHuJ3hz.js +0 -1
  2983. package/dist/client/assets/list-start-D_fj8f4F.js +0 -1
  2984. package/dist/client/assets/list-tree-CEajyeq-.js +0 -1
  2985. package/dist/client/assets/list-video-_ONxeHc6.js +0 -1
  2986. package/dist/client/assets/list-x-CUBhUeYS.js +0 -1
  2987. package/dist/client/assets/loader-DF5k8NYe.js +0 -1
  2988. package/dist/client/assets/loader-pinwheel-BhegYj6P.js +0 -1
  2989. package/dist/client/assets/locate-Z590Jvj3.js +0 -1
  2990. package/dist/client/assets/locate-fixed-99jmnqI2.js +0 -1
  2991. package/dist/client/assets/locate-off-B-fSXN2G.js +0 -1
  2992. package/dist/client/assets/lock-D7Ca19Fg.js +0 -1
  2993. package/dist/client/assets/lock-keyhole-Z3aL_-ml.js +0 -1
  2994. package/dist/client/assets/lock-keyhole-open-VTgMjOvf.js +0 -1
  2995. package/dist/client/assets/lock-open-DVz9gMGT.js +0 -1
  2996. package/dist/client/assets/log-in-CxDO_OWi.js +0 -1
  2997. package/dist/client/assets/log-out-BEuaQqK8.js +0 -1
  2998. package/dist/client/assets/logs-BTLKGn1_.js +0 -1
  2999. package/dist/client/assets/lollipop-BsioGOeS.js +0 -1
  3000. package/dist/client/assets/luggage-DW5BbDIP.js +0 -1
  3001. package/dist/client/assets/magnet-CVkp4uEd.js +0 -1
  3002. package/dist/client/assets/mail-CEzpioni.js +0 -1
  3003. package/dist/client/assets/mail-check-B5skuzoM.js +0 -1
  3004. package/dist/client/assets/mail-minus-C5InCETd.js +0 -1
  3005. package/dist/client/assets/mail-open-DJPg7Q3J.js +0 -1
  3006. package/dist/client/assets/mail-plus-BNnrX8Tx.js +0 -1
  3007. package/dist/client/assets/mail-question-mark-C4YToJhg.js +0 -1
  3008. package/dist/client/assets/mail-search-DAU8d064.js +0 -1
  3009. package/dist/client/assets/mail-warning-CMFHu0JN.js +0 -1
  3010. package/dist/client/assets/mail-x-CC_NYcZe.js +0 -1
  3011. package/dist/client/assets/mailbox-f22CgWRh.js +0 -1
  3012. package/dist/client/assets/mails-Ma664nnh.js +0 -1
  3013. package/dist/client/assets/map-BPNeJ3aO.js +0 -1
  3014. package/dist/client/assets/map-minus-BOLbSEMQ.js +0 -1
  3015. package/dist/client/assets/map-pin-0wLGL3WY.js +0 -1
  3016. package/dist/client/assets/map-pin-check-Ctj3ODoE.js +0 -1
  3017. package/dist/client/assets/map-pin-check-inside-BmWUWh80.js +0 -1
  3018. package/dist/client/assets/map-pin-house-CgcPzu4y.js +0 -1
  3019. package/dist/client/assets/map-pin-minus-Cx3VVbF6.js +0 -1
  3020. package/dist/client/assets/map-pin-minus-inside-B02FLHJx.js +0 -1
  3021. package/dist/client/assets/map-pin-off-CRc3iFkt.js +0 -1
  3022. package/dist/client/assets/map-pin-pen-DmLcCOSp.js +0 -1
  3023. package/dist/client/assets/map-pin-plus-DGbSWtHo.js +0 -1
  3024. package/dist/client/assets/map-pin-plus-inside-DGgpq3Q-.js +0 -1
  3025. package/dist/client/assets/map-pin-search-DvNrNiOz.js +0 -1
  3026. package/dist/client/assets/map-pin-x-CwEjRx5I.js +0 -1
  3027. package/dist/client/assets/map-pin-x-inside-D9J2CK-a.js +0 -1
  3028. package/dist/client/assets/map-pinned-p48aoZWi.js +0 -1
  3029. package/dist/client/assets/map-plus-BwUMGbTu.js +0 -1
  3030. package/dist/client/assets/mars-BgFbp3id.js +0 -1
  3031. package/dist/client/assets/mars-stroke-CzA5u_Jm.js +0 -1
  3032. package/dist/client/assets/martini-CoSGZqCd.js +0 -1
  3033. package/dist/client/assets/maximize-2-XIp_cYxK.js +0 -1
  3034. package/dist/client/assets/maximize-slKh4Ovw.js +0 -1
  3035. package/dist/client/assets/medal-CRavxtUH.js +0 -1
  3036. package/dist/client/assets/megaphone-CavfIviL.js +0 -1
  3037. package/dist/client/assets/megaphone-off-BqsK7TpD.js +0 -1
  3038. package/dist/client/assets/meh-KyMl6btU.js +0 -1
  3039. package/dist/client/assets/memory-stick-CcQOrEnu.js +0 -1
  3040. package/dist/client/assets/menu-BnESe4E8.js +0 -1
  3041. package/dist/client/assets/merge-CyPljbqX.js +0 -1
  3042. package/dist/client/assets/mermaid.core-B6xE4Vf4.js +0 -308
  3043. package/dist/client/assets/mermaid.core-B6xE4Vf4.js.br +0 -0
  3044. package/dist/client/assets/mermaid.core-B6xE4Vf4.js.gz +0 -0
  3045. package/dist/client/assets/message-circle-check-SzVg8Uos.js +0 -1
  3046. package/dist/client/assets/message-circle-code-CrNLTRKk.js +0 -1
  3047. package/dist/client/assets/message-circle-dashed-DGehDIbJ.js +0 -1
  3048. package/dist/client/assets/message-circle-heart-CmiSxGNZ.js +0 -1
  3049. package/dist/client/assets/message-circle-more-f_g6zKH6.js +0 -1
  3050. package/dist/client/assets/message-circle-off-C46jnNrg.js +0 -1
  3051. package/dist/client/assets/message-circle-plus-lc1Zif5L.js +0 -1
  3052. package/dist/client/assets/message-circle-question-mark-Cwxaiegf.js +0 -1
  3053. package/dist/client/assets/message-circle-reply-BV6C1dfI.js +0 -1
  3054. package/dist/client/assets/message-circle-warning-QHh15HhX.js +0 -1
  3055. package/dist/client/assets/message-circle-x-DhGkXphI.js +0 -1
  3056. package/dist/client/assets/message-square-BwSDtuZi.js +0 -1
  3057. package/dist/client/assets/message-square-check-bTTdQm0y.js +0 -1
  3058. package/dist/client/assets/message-square-code-Dunv9gu9.js +0 -1
  3059. package/dist/client/assets/message-square-dashed-BJexYaus.js +0 -1
  3060. package/dist/client/assets/message-square-diff-CtHHA-LS.js +0 -1
  3061. package/dist/client/assets/message-square-dot-DXHeyoAh.js +0 -1
  3062. package/dist/client/assets/message-square-heart-nLTXoBCs.js +0 -1
  3063. package/dist/client/assets/message-square-lock-Bqt21edT.js +0 -1
  3064. package/dist/client/assets/message-square-more-CgsIM-nM.js +0 -1
  3065. package/dist/client/assets/message-square-off-zEJ7H4tr.js +0 -1
  3066. package/dist/client/assets/message-square-plus-DD9ZzIK5.js +0 -1
  3067. package/dist/client/assets/message-square-quote-C02JyIOQ.js +0 -1
  3068. package/dist/client/assets/message-square-reply-DRLLjSKc.js +0 -1
  3069. package/dist/client/assets/message-square-share-CS6dsQnD.js +0 -1
  3070. package/dist/client/assets/message-square-text-Cx1wnZM1.js +0 -1
  3071. package/dist/client/assets/message-square-warning-Br5BTE6X.js +0 -1
  3072. package/dist/client/assets/message-square-x-BiFAChPl.js +0 -1
  3073. package/dist/client/assets/messages-square-C1f9ihRo.js +0 -1
  3074. package/dist/client/assets/metronome-O_2yHHRG.js +0 -1
  3075. package/dist/client/assets/mic-BMCuVhmt.js +0 -1
  3076. package/dist/client/assets/mic-off-C4XKjY5Q.js +0 -1
  3077. package/dist/client/assets/mic-vocal-mAX3T9aO.js +0 -1
  3078. package/dist/client/assets/microchip-B56nEmLz.js +0 -1
  3079. package/dist/client/assets/microscope-Dru76GXX.js +0 -1
  3080. package/dist/client/assets/microwave-mykaV8-V.js +0 -1
  3081. package/dist/client/assets/milestone-CjmA0jpp.js +0 -1
  3082. package/dist/client/assets/milk-CwTtmxKQ.js +0 -1
  3083. package/dist/client/assets/milk-off-DktP5TAz.js +0 -1
  3084. package/dist/client/assets/mindmap-definition-YA3MSWOX-DQfREt6W.js +0 -96
  3085. package/dist/client/assets/mindmap-definition-YA3MSWOX-DQfREt6W.js.br +0 -0
  3086. package/dist/client/assets/mindmap-definition-YA3MSWOX-DQfREt6W.js.gz +0 -0
  3087. package/dist/client/assets/minimize-2-BT7WsdpS.js +0 -1
  3088. package/dist/client/assets/minimize-CSSXU40C.js +0 -1
  3089. package/dist/client/assets/minus-rsR8kOVX.js +0 -1
  3090. package/dist/client/assets/mirror-rectangular-7anq34No.js +0 -1
  3091. package/dist/client/assets/mirror-round-BK9-dDP4.js +0 -1
  3092. package/dist/client/assets/monitor-check-B0Pyf-yu.js +0 -1
  3093. package/dist/client/assets/monitor-cloud-DgrFzqef.js +0 -1
  3094. package/dist/client/assets/monitor-cog-DGloklBJ.js +0 -1
  3095. package/dist/client/assets/monitor-dot-DGS7-f0f.js +0 -1
  3096. package/dist/client/assets/monitor-down-BCJfCFaJ.js +0 -1
  3097. package/dist/client/assets/monitor-off-BgSn8-s1.js +0 -1
  3098. package/dist/client/assets/monitor-pause-r9zmfzl3.js +0 -1
  3099. package/dist/client/assets/monitor-play-Q1GXult1.js +0 -1
  3100. package/dist/client/assets/monitor-smartphone-DXpObQkI.js +0 -1
  3101. package/dist/client/assets/monitor-speaker-CLWvj29U.js +0 -1
  3102. package/dist/client/assets/monitor-stop-DKL_C-wp.js +0 -1
  3103. package/dist/client/assets/monitor-up-7yeLvWkr.js +0 -1
  3104. package/dist/client/assets/monitor-x-Brl7MUOR.js +0 -1
  3105. package/dist/client/assets/moon-DszlF5VG.js +0 -1
  3106. package/dist/client/assets/moon-star-D2AfMLYe.js +0 -1
  3107. package/dist/client/assets/motorbike-DQK6O3MZ.js +0 -1
  3108. package/dist/client/assets/mountain-DB-FYKcC.js +0 -1
  3109. package/dist/client/assets/mountain-snow-CVuyljFu.js +0 -1
  3110. package/dist/client/assets/mouse-B9YJ00HV.js +0 -1
  3111. package/dist/client/assets/mouse-left-khHZ7a0_.js +0 -1
  3112. package/dist/client/assets/mouse-off-D7VcH2mF.js +0 -1
  3113. package/dist/client/assets/mouse-pointer-2-2DLmmZC-.js +0 -1
  3114. package/dist/client/assets/mouse-pointer-2-off-LYUEbVxq.js +0 -1
  3115. package/dist/client/assets/mouse-pointer-D1fUOap2.js +0 -1
  3116. package/dist/client/assets/mouse-pointer-ban-C7bLgbHN.js +0 -1
  3117. package/dist/client/assets/mouse-pointer-click-CBX8IM8_.js +0 -1
  3118. package/dist/client/assets/mouse-right-BtzVGBDN.js +0 -1
  3119. package/dist/client/assets/move-3d-BPdizJb4.js +0 -1
  3120. package/dist/client/assets/move-diagonal-2-CK2s6i1d.js +0 -1
  3121. package/dist/client/assets/move-diagonal-CLXKl3Yy.js +0 -1
  3122. package/dist/client/assets/move-down-VN8xZn8j.js +0 -1
  3123. package/dist/client/assets/move-down-left-CznwZplk.js +0 -1
  3124. package/dist/client/assets/move-down-right-DkE_6D1W.js +0 -1
  3125. package/dist/client/assets/move-horizontal-Czn3dC11.js +0 -1
  3126. package/dist/client/assets/move-left-NiD9hU-7.js +0 -1
  3127. package/dist/client/assets/move-rI_psr6S.js +0 -1
  3128. package/dist/client/assets/move-right-CXiW8Zcx.js +0 -1
  3129. package/dist/client/assets/move-up-CrMIo1F-.js +0 -1
  3130. package/dist/client/assets/move-up-left-CyI_CpAq.js +0 -1
  3131. package/dist/client/assets/move-up-right-CLWB_JWL.js +0 -1
  3132. package/dist/client/assets/move-vertical-DwBcUm7s.js +0 -1
  3133. package/dist/client/assets/music-2-DBhGdTXp.js +0 -1
  3134. package/dist/client/assets/music-3-x6NFKGPz.js +0 -1
  3135. package/dist/client/assets/music-4-C8370pLl.js +0 -1
  3136. package/dist/client/assets/music-BNUAUYx3.js +0 -1
  3137. package/dist/client/assets/navigation-2-2DgL5nUm.js +0 -1
  3138. package/dist/client/assets/navigation-2-off-DzEWNpuG.js +0 -1
  3139. package/dist/client/assets/navigation-2-rBuxJP.js +0 -1
  3140. package/dist/client/assets/navigation-off-C_uJO7_0.js +0 -1
  3141. package/dist/client/assets/network-CuwtecJy.js +0 -1
  3142. package/dist/client/assets/newspaper-Di2TWK73.js +0 -1
  3143. package/dist/client/assets/nfc-HbPy0MKx.js +0 -1
  3144. package/dist/client/assets/non-binary-C0dOmbfu.js +0 -1
  3145. package/dist/client/assets/notebook-Di-s4PvA.js +0 -1
  3146. package/dist/client/assets/notebook-pen-D5_R76RF.js +0 -1
  3147. package/dist/client/assets/notebook-tabs-V7RQZHB7.js +0 -1
  3148. package/dist/client/assets/notebook-text-DwkVGus6.js +0 -1
  3149. package/dist/client/assets/notepad-text-CHpjNpHD.js +0 -1
  3150. package/dist/client/assets/notepad-text-dashed-BjfwpIlB.js +0 -1
  3151. package/dist/client/assets/nut-DlahCyJU.js +0 -1
  3152. package/dist/client/assets/nut-off-BtLoh-rK.js +0 -1
  3153. package/dist/client/assets/octagon-TDoj2f8v.js +0 -1
  3154. package/dist/client/assets/octagon-alert-B2taZVv6.js +0 -1
  3155. package/dist/client/assets/octagon-minus-CBFqh99o.js +0 -1
  3156. package/dist/client/assets/octagon-pause-Cr5b4j7M.js +0 -1
  3157. package/dist/client/assets/octagon-x-D0zbNi59.js +0 -1
  3158. package/dist/client/assets/omega-DDASMNWr.js +0 -1
  3159. package/dist/client/assets/option-CxVn0FSz.js +0 -1
  3160. package/dist/client/assets/orbit-AW4YJZIj.js +0 -1
  3161. package/dist/client/assets/origami-DnrsVwpc.js +0 -1
  3162. package/dist/client/assets/package-2-ClNoqf2y.js +0 -1
  3163. package/dist/client/assets/package-D1L3snux.js +0 -1
  3164. package/dist/client/assets/package-check-CR9b7e1m.js +0 -1
  3165. package/dist/client/assets/package-minus-uBmpR7nr.js +0 -1
  3166. package/dist/client/assets/package-open-DX7Yyjdp.js +0 -1
  3167. package/dist/client/assets/package-plus-CEDLdkFJ.js +0 -1
  3168. package/dist/client/assets/package-search-CWRT1C3t.js +0 -1
  3169. package/dist/client/assets/package-x-B53rhtgz.js +0 -1
  3170. package/dist/client/assets/paint-bucket-D-LfUSKj.js +0 -1
  3171. package/dist/client/assets/paint-roller-CWZJqaQV.js +0 -1
  3172. package/dist/client/assets/paintbrush-2rvWckvD.js +0 -1
  3173. package/dist/client/assets/paintbrush-vertical-OCjWFavO.js +0 -1
  3174. package/dist/client/assets/palette-Be99D5Ti.js +0 -1
  3175. package/dist/client/assets/panda-4bIc08tS.js +0 -1
  3176. package/dist/client/assets/panel-bottom-DMdI7P2k.js +0 -1
  3177. package/dist/client/assets/panel-bottom-close-CI106ZmH.js +0 -1
  3178. package/dist/client/assets/panel-bottom-dashed-C3HHmJ49.js +0 -1
  3179. package/dist/client/assets/panel-bottom-open-6FvY7y-i.js +0 -1
  3180. package/dist/client/assets/panel-left-BS0x_UAi.js +0 -1
  3181. package/dist/client/assets/panel-left-close-EfL-CBSg.js +0 -1
  3182. package/dist/client/assets/panel-left-dashed-B8Gj1aEr.js +0 -1
  3183. package/dist/client/assets/panel-left-open-mczOolrF.js +0 -1
  3184. package/dist/client/assets/panel-left-right-dashed-BlFQxHyg.js +0 -1
  3185. package/dist/client/assets/panel-right-close-B2AY3oAg.js +0 -1
  3186. package/dist/client/assets/panel-right-dashed-BMFrhRD2.js +0 -1
  3187. package/dist/client/assets/panel-right-open-DsHBGdw1.js +0 -1
  3188. package/dist/client/assets/panel-top-1j3HlVZU.js +0 -1
  3189. package/dist/client/assets/panel-top-bottom-dashed-DQU5MeOS.js +0 -1
  3190. package/dist/client/assets/panel-top-close-EB1g93Qo.js +0 -1
  3191. package/dist/client/assets/panel-top-dashed-DWo0ldD7.js +0 -1
  3192. package/dist/client/assets/panel-top-open-Bs0gVi3P.js +0 -1
  3193. package/dist/client/assets/panels-left-bottom-DfnOJZD5.js +0 -1
  3194. package/dist/client/assets/panels-right-bottom-QxBWB4ID.js +0 -1
  3195. package/dist/client/assets/panels-top-left-BBkEbH1z.js +0 -1
  3196. package/dist/client/assets/parasol-_Ivy73Sm.js +0 -1
  3197. package/dist/client/assets/parentheses-C67MDlSu.js +0 -1
  3198. package/dist/client/assets/parking-meter-CLtm7Bqh.js +0 -1
  3199. package/dist/client/assets/party-popper-1_azJUye.js +0 -1
  3200. package/dist/client/assets/passwordBootstrap-BW7oAKGJ.js +0 -2
  3201. package/dist/client/assets/passwordBootstrap-BW7oAKGJ.js.br +0 -0
  3202. package/dist/client/assets/passwordBootstrap-BW7oAKGJ.js.gz +0 -0
  3203. package/dist/client/assets/pause-mkQz4Haj.js +0 -1
  3204. package/dist/client/assets/paw-print-BuuvIZn7.js +0 -1
  3205. package/dist/client/assets/pc-case-D7jkDeS9.js +0 -1
  3206. package/dist/client/assets/pegDiagram-XKGWAZYB-CQzbIu3T.js +0 -1
  3207. package/dist/client/assets/pegDiagram-XKGWAZYB-CQzbIu3T.js.br +0 -0
  3208. package/dist/client/assets/pegDiagram-XKGWAZYB-CQzbIu3T.js.gz +0 -0
  3209. package/dist/client/assets/pen-BDUlJYwV.js +0 -1
  3210. package/dist/client/assets/pen-line-CuxWt1Wb.js +0 -1
  3211. package/dist/client/assets/pen-off-B4yfAlQe.js +0 -1
  3212. package/dist/client/assets/pen-tool-Ckm9EGjL.js +0 -1
  3213. package/dist/client/assets/pencil-line-aiFWg3Bx.js +0 -1
  3214. package/dist/client/assets/pencil-off-CmnHN4Ss.js +0 -1
  3215. package/dist/client/assets/pencil-ruler-CwvFIG4x.js +0 -1
  3216. package/dist/client/assets/pentagon-IcS534Bf.js +0 -1
  3217. package/dist/client/assets/percent-D4ZJNwa6.js +0 -1
  3218. package/dist/client/assets/person-standing-BGbrHxhJ.js +0 -1
  3219. package/dist/client/assets/philippine-peso-DLvQqbNF.js +0 -1
  3220. package/dist/client/assets/phone-D-HeOid_.js +0 -1
  3221. package/dist/client/assets/phone-call-BLB4qe35.js +0 -1
  3222. package/dist/client/assets/phone-forwarded-DIC4H5Re.js +0 -1
  3223. package/dist/client/assets/phone-incoming-DppBQNKg.js +0 -1
  3224. package/dist/client/assets/phone-missed-Dsio5IgH.js +0 -1
  3225. package/dist/client/assets/phone-off-YBi187lq.js +0 -1
  3226. package/dist/client/assets/phone-outgoing-KUEpONIx.js +0 -1
  3227. package/dist/client/assets/pi-DqcDA7yg.js +0 -1
  3228. package/dist/client/assets/piano-BHoKPzao.js +0 -1
  3229. package/dist/client/assets/pickaxe-DclFcaFv.js +0 -1
  3230. package/dist/client/assets/picture-in-picture-2-U6Mt8rwA.js +0 -1
  3231. package/dist/client/assets/picture-in-picture-CP4oVY9N.js +0 -1
  3232. package/dist/client/assets/pieDiagram-E7YTZNPT-DUyIFoyS.js +0 -39
  3233. package/dist/client/assets/pieDiagram-E7YTZNPT-DUyIFoyS.js.br +0 -0
  3234. package/dist/client/assets/pieDiagram-E7YTZNPT-DUyIFoyS.js.gz +0 -0
  3235. package/dist/client/assets/piggy-bank-D6svMhtd.js +0 -1
  3236. package/dist/client/assets/pilcrow-CP_gkYtM.js +0 -1
  3237. package/dist/client/assets/pilcrow-left-Bkg9KB7d.js +0 -1
  3238. package/dist/client/assets/pilcrow-right-CDgViB4l.js +0 -1
  3239. package/dist/client/assets/pill-BhW90Wna.js +0 -1
  3240. package/dist/client/assets/pill-bottle-CMPz8rRH.js +0 -1
  3241. package/dist/client/assets/pipette-C73bqFyO.js +0 -1
  3242. package/dist/client/assets/pizza-DiMBoOoh.js +0 -1
  3243. package/dist/client/assets/plane-Cz8XANq3.js +0 -1
  3244. package/dist/client/assets/plane-landing-ge4TLqdO.js +0 -1
  3245. package/dist/client/assets/plane-takeoff-CM4UtX2T.js +0 -1
  3246. package/dist/client/assets/play-6sYJOOLI.js +0 -1
  3247. package/dist/client/assets/plug-2-U-KII5pS.js +0 -1
  3248. package/dist/client/assets/plug-DozrepPw.js +0 -1
  3249. package/dist/client/assets/plug-zap-BUtyMZLg.js +0 -1
  3250. package/dist/client/assets/pocket-knife-Xb1KytJ4.js +0 -1
  3251. package/dist/client/assets/podcast-DnD91t5w.js +0 -1
  3252. package/dist/client/assets/pointer-BmymMoXY.js +0 -1
  3253. package/dist/client/assets/pointer-off-0ZfB-Tmw.js +0 -1
  3254. package/dist/client/assets/popcorn-RzgU0bML.js +0 -1
  3255. package/dist/client/assets/popsicle-CqYlTSlz.js +0 -1
  3256. package/dist/client/assets/pound-sterling-B4KE4yRU.js +0 -1
  3257. package/dist/client/assets/power-off-DWfDDezT.js +0 -1
  3258. package/dist/client/assets/power-v0e_wtP-.js +0 -1
  3259. package/dist/client/assets/presentation-Bp1aW-N3.js +0 -1
  3260. package/dist/client/assets/printer-DRpTnlWO.js +0 -1
  3261. package/dist/client/assets/printer-check-BBmV47FC.js +0 -1
  3262. package/dist/client/assets/printer-x-g6OAfyIa.js +0 -1
  3263. package/dist/client/assets/projector--bgxqdaF.js +0 -1
  3264. package/dist/client/assets/proportions-BVkyHlZ6.js +0 -1
  3265. package/dist/client/assets/puzzle-BCl3NPw7.js +0 -1
  3266. package/dist/client/assets/pyramid-B4wkSvGD.js +0 -1
  3267. package/dist/client/assets/quadrantDiagram-AXDQQJYC-D0WdMFaq.js +0 -7
  3268. package/dist/client/assets/quadrantDiagram-AXDQQJYC-D0WdMFaq.js.br +0 -0
  3269. package/dist/client/assets/quadrantDiagram-AXDQQJYC-D0WdMFaq.js.gz +0 -0
  3270. package/dist/client/assets/quote-DI8iPwKh.js +0 -1
  3271. package/dist/client/assets/rabbit-BDa6Q27c.js +0 -1
  3272. package/dist/client/assets/radar-Bx_n--rh.js +0 -1
  3273. package/dist/client/assets/radiation-CHCFxwVq.js +0 -1
  3274. package/dist/client/assets/radical-fJiowMfO.js +0 -1
  3275. package/dist/client/assets/radio-6pLvdwJd.js +0 -1
  3276. package/dist/client/assets/radio-off-3aqmFa_M.js +0 -1
  3277. package/dist/client/assets/radio-receiver-XWcq03a0.js +0 -1
  3278. package/dist/client/assets/radio-tower-CuLnYX4T.js +0 -1
  3279. package/dist/client/assets/radius-DMEeB-ta.js +0 -1
  3280. package/dist/client/assets/railroadDiagram-O6MQD6OU-Dl66huV5.js +0 -1
  3281. package/dist/client/assets/railroadDiagram-O6MQD6OU-Dl66huV5.js.br +0 -0
  3282. package/dist/client/assets/railroadDiagram-O6MQD6OU-Dl66huV5.js.gz +0 -0
  3283. package/dist/client/assets/rainbow-BxxcOabE.js +0 -1
  3284. package/dist/client/assets/rat-C6Ck2q2o.js +0 -1
  3285. package/dist/client/assets/ratio-Bp9q1Ipe.js +0 -1
  3286. package/dist/client/assets/rdpSession-bZdZ0HhC.js +0 -1
  3287. package/dist/client/assets/rdpSession-bZdZ0HhC.js.br +0 -0
  3288. package/dist/client/assets/rdpSession-bZdZ0HhC.js.gz +0 -0
  3289. package/dist/client/assets/receipt-6gAtbPgM.js +0 -1
  3290. package/dist/client/assets/receipt-cent-Bg3OmoiZ.js +0 -1
  3291. package/dist/client/assets/receipt-euro-QYQDD3vw.js +0 -1
  3292. package/dist/client/assets/receipt-indian-rupee-D7KX7ARn.js +0 -1
  3293. package/dist/client/assets/receipt-japanese-yen-B6OumBfa.js +0 -1
  3294. package/dist/client/assets/receipt-pound-sterling-DWNfu-5O.js +0 -1
  3295. package/dist/client/assets/receipt-russian-ruble-DR-NsJrx.js +0 -1
  3296. package/dist/client/assets/receipt-swiss-franc-BuDCqCnF.js +0 -1
  3297. package/dist/client/assets/receipt-text-Ct40Ogn2.js +0 -1
  3298. package/dist/client/assets/receipt-turkish-lira-SntvIPY_.js +0 -1
  3299. package/dist/client/assets/rectangle-circle-C52yOXrT.js +0 -1
  3300. package/dist/client/assets/rectangle-ellipsis-smMZh1_p.js +0 -1
  3301. package/dist/client/assets/rectangle-goggles-CXRi76S4.js +0 -1
  3302. package/dist/client/assets/rectangle-horizontal-DGHl4orB.js +0 -1
  3303. package/dist/client/assets/rectangle-vertical-B13u-IVE.js +0 -1
  3304. package/dist/client/assets/recycle-DlSG0-B2.js +0 -1
  3305. package/dist/client/assets/redo-2-DVEegsZa.js +0 -1
  3306. package/dist/client/assets/redo-BkdmmNjd.js +0 -1
  3307. package/dist/client/assets/redo-dot-0koxnEla.js +0 -1
  3308. package/dist/client/assets/referenceSelection-C35KrNSb.js +0 -4
  3309. package/dist/client/assets/referenceSelection-C35KrNSb.js.br +0 -0
  3310. package/dist/client/assets/referenceSelection-C35KrNSb.js.gz +0 -0
  3311. package/dist/client/assets/refresh-ccw-CPIge9fY.js +0 -1
  3312. package/dist/client/assets/refresh-ccw-dot-D9vhLePu.js +0 -1
  3313. package/dist/client/assets/refresh-cw-off-Du7JVhks.js +0 -1
  3314. package/dist/client/assets/refrigerator-DQFHj3tA.js +0 -1
  3315. package/dist/client/assets/regex-Bg6UPTk4.js +0 -1
  3316. package/dist/client/assets/remove-formatting-CApW7xL0.js +0 -1
  3317. package/dist/client/assets/repeat-1-C5T5HmaC.js +0 -1
  3318. package/dist/client/assets/repeat-2-Cayd8LtU.js +0 -1
  3319. package/dist/client/assets/repeat-DIoY-crS.js +0 -1
  3320. package/dist/client/assets/repeat-off-D2uJUSRZ.js +0 -1
  3321. package/dist/client/assets/replace-CQJi8A-J.js +0 -1
  3322. package/dist/client/assets/replace-all-g7Rk4QdW.js +0 -1
  3323. package/dist/client/assets/reply-CclsWowR.js +0 -1
  3324. package/dist/client/assets/reply-all-DsZB3ngg.js +0 -1
  3325. package/dist/client/assets/requirementDiagram-BXWQKSXE-CLquvEQk.js +0 -84
  3326. package/dist/client/assets/requirementDiagram-BXWQKSXE-CLquvEQk.js.br +0 -0
  3327. package/dist/client/assets/requirementDiagram-BXWQKSXE-CLquvEQk.js.gz +0 -0
  3328. package/dist/client/assets/rewind-DBFDWG2W.js +0 -1
  3329. package/dist/client/assets/ribbon-BOvK9TbP.js +0 -1
  3330. package/dist/client/assets/road-ZVtNN2jg.js +0 -1
  3331. package/dist/client/assets/rocking-chair-ZB8-vvWp.js +0 -1
  3332. package/dist/client/assets/roller-coaster-C4ZNkUsY.js +0 -1
  3333. package/dist/client/assets/rose-BqsOUA8x.js +0 -1
  3334. package/dist/client/assets/rotate-3d-DqNrHZ1H.js +0 -1
  3335. package/dist/client/assets/rotate-ccw-key-CA6HMhk2.js +0 -1
  3336. package/dist/client/assets/rotate-ccw-square-CYCXvSmp.js +0 -1
  3337. package/dist/client/assets/rotate-cw-DKLcWsMY.js +0 -1
  3338. package/dist/client/assets/rotate-cw-square-J4HwJPaS.js +0 -1
  3339. package/dist/client/assets/route-Ca_GktgV.js +0 -1
  3340. package/dist/client/assets/route-off-DlkuY0oE.js +0 -1
  3341. package/dist/client/assets/router-Dfre8J0H.js +0 -1
  3342. package/dist/client/assets/rows-2-CHxcuA6t.js +0 -1
  3343. package/dist/client/assets/rows-3-BXwNg_1l.js +0 -1
  3344. package/dist/client/assets/rows-4-BHOJILIe.js +0 -1
  3345. package/dist/client/assets/rss-DX1sTY58.js +0 -1
  3346. package/dist/client/assets/ruler-CKIHS5ZG.js +0 -1
  3347. package/dist/client/assets/ruler-dimension-line-BU2aXGyq.js +0 -1
  3348. package/dist/client/assets/russian-ruble-iChuT8-A.js +0 -1
  3349. package/dist/client/assets/sailboat-BzfEgHUp.js +0 -1
  3350. package/dist/client/assets/salad-lkQP45Og.js +0 -1
  3351. package/dist/client/assets/sandwich-BJmqjljA.js +0 -1
  3352. package/dist/client/assets/sankeyDiagram-P5KCCOFB-vDwufXmy.js +0 -40
  3353. package/dist/client/assets/sankeyDiagram-P5KCCOFB-vDwufXmy.js.br +0 -0
  3354. package/dist/client/assets/sankeyDiagram-P5KCCOFB-vDwufXmy.js.gz +0 -0
  3355. package/dist/client/assets/satellite-CFW8ft4J.js +0 -1
  3356. package/dist/client/assets/satellite-dish-C-_hgB1b.js +0 -1
  3357. package/dist/client/assets/saudi-riyal-9mNrKZlh.js +0 -1
  3358. package/dist/client/assets/save-BhKfw0XV.js +0 -1
  3359. package/dist/client/assets/save-all-L85Vgdtd.js +0 -1
  3360. package/dist/client/assets/save-off-D5VRhNpK.js +0 -1
  3361. package/dist/client/assets/scale-3d-BvoV5uen.js +0 -1
  3362. package/dist/client/assets/scale-Co1ZiHGC.js +0 -1
  3363. package/dist/client/assets/scaling-BWuPfkzk.js +0 -1
  3364. package/dist/client/assets/scan-BnIYzTvS.js +0 -1
  3365. package/dist/client/assets/scan-barcode-DjZ6cYxg.js +0 -1
  3366. package/dist/client/assets/scan-eye-DGb5eXSQ.js +0 -1
  3367. package/dist/client/assets/scan-face-D1uhXPZ8.js +0 -1
  3368. package/dist/client/assets/scan-heart-NqOlFJvV.js +0 -1
  3369. package/dist/client/assets/scan-line-DGfGu3sQ.js +0 -1
  3370. package/dist/client/assets/scan-qr-code-az5OW_zn.js +0 -1
  3371. package/dist/client/assets/scan-search-CMeS85h4.js +0 -1
  3372. package/dist/client/assets/scan-text-jQ9erDXi.js +0 -1
  3373. package/dist/client/assets/school-CyIhKU1o.js +0 -1
  3374. package/dist/client/assets/scissors-Omg54llA.js +0 -1
  3375. package/dist/client/assets/scissors-line-dashed-DPXiAzCK.js +0 -1
  3376. package/dist/client/assets/scooter-D3ElfFt0.js +0 -1
  3377. package/dist/client/assets/screen-share-BUAn1aeR.js +0 -1
  3378. package/dist/client/assets/screen-share-off-BQ-9Qlt5.js +0 -1
  3379. package/dist/client/assets/scroll-DB36nSY-.js +0 -1
  3380. package/dist/client/assets/scroll-text-DWXES5cJ.js +0 -1
  3381. package/dist/client/assets/search-Slp2tMAZ.js +0 -1
  3382. package/dist/client/assets/search-alert-DMW1fVVP.js +0 -1
  3383. package/dist/client/assets/search-check-dmKijaBC.js +0 -1
  3384. package/dist/client/assets/search-code-BpgSFDWY.js +0 -1
  3385. package/dist/client/assets/search-slash-Cqw7R5mc.js +0 -1
  3386. package/dist/client/assets/search-x-C_pGq2eU.js +0 -1
  3387. package/dist/client/assets/section-BazdhiGq.js +0 -1
  3388. package/dist/client/assets/send--HS9plgx.js +0 -1
  3389. package/dist/client/assets/send-horizontal-CVHf4R9m.js +0 -1
  3390. package/dist/client/assets/send-to-back-BYd68ump.js +0 -1
  3391. package/dist/client/assets/separator-horizontal-CBp3npze.js +0 -1
  3392. package/dist/client/assets/separator-vertical-BVsoYabq.js +0 -1
  3393. package/dist/client/assets/sequenceDiagram-WJ2MYXX4-CNukf6PN.js +0 -162
  3394. package/dist/client/assets/sequenceDiagram-WJ2MYXX4-CNukf6PN.js.br +0 -0
  3395. package/dist/client/assets/sequenceDiagram-WJ2MYXX4-CNukf6PN.js.gz +0 -0
  3396. package/dist/client/assets/server-cog-3mrN-4_g.js +0 -1
  3397. package/dist/client/assets/server-crash-R5UxBn0f.js +0 -1
  3398. package/dist/client/assets/server-off-0TNz9Jel.js +0 -1
  3399. package/dist/client/assets/sessionChatStartup-DUNj3bnb.js +0 -1
  3400. package/dist/client/assets/sessionChatStartup-DUNj3bnb.js.br +0 -0
  3401. package/dist/client/assets/sessionChatStartup-DUNj3bnb.js.gz +0 -0
  3402. package/dist/client/assets/settings-2-DF5ZXdpO.js +0 -1
  3403. package/dist/client/assets/settings-D2KRDBgF.js +0 -1
  3404. package/dist/client/assets/shapes-DHJbGYJ1.js +0 -1
  3405. package/dist/client/assets/share-DWznRVzy.js +0 -1
  3406. package/dist/client/assets/sheet-BxCeUsrr.js +0 -1
  3407. package/dist/client/assets/shell-DI9chSwA.js +0 -1
  3408. package/dist/client/assets/shelving-unit-B82p6Oie.js +0 -1
  3409. package/dist/client/assets/shield-9n4XQhL-.js +0 -1
  3410. package/dist/client/assets/shield-alert-DuVVAKhQ.js +0 -1
  3411. package/dist/client/assets/shield-ban-CFwuKZ5W.js +0 -1
  3412. package/dist/client/assets/shield-check-DxP-O23p.js +0 -1
  3413. package/dist/client/assets/shield-cog-CBqSeGbK.js +0 -1
  3414. package/dist/client/assets/shield-cog-corner-v0wE32ka.js +0 -1
  3415. package/dist/client/assets/shield-ellipsis-DCWMESNw.js +0 -1
  3416. package/dist/client/assets/shield-half-C_mYe2Ul.js +0 -1
  3417. package/dist/client/assets/shield-minus-pN0W_5qB.js +0 -1
  3418. package/dist/client/assets/shield-off-XRxsFBOv.js +0 -1
  3419. package/dist/client/assets/shield-plus-CNkI3PFD.js +0 -1
  3420. package/dist/client/assets/shield-question-mark-B04jOa0R.js +0 -1
  3421. package/dist/client/assets/shield-user-CUY6ayl7.js +0 -1
  3422. package/dist/client/assets/shield-x-mf-8M4fA.js +0 -1
  3423. package/dist/client/assets/ship-MtM3Cxzr.js +0 -1
  3424. package/dist/client/assets/ship-wheel-Dy_hUFLT.js +0 -1
  3425. package/dist/client/assets/shirt-B5KowWcr.js +0 -1
  3426. package/dist/client/assets/shopping-bag-BtPx5Wdk.js +0 -1
  3427. package/dist/client/assets/shopping-basket-4W1S50Mn.js +0 -1
  3428. package/dist/client/assets/shopping-cart-mc_1xWV1.js +0 -1
  3429. package/dist/client/assets/shovel-DSTXpKh1.js +0 -1
  3430. package/dist/client/assets/shower-head-TUo9LucQ.js +0 -1
  3431. package/dist/client/assets/shredder-BWBP2Qmo.js +0 -1
  3432. package/dist/client/assets/shrimp-C3K6Hrnz.js +0 -1
  3433. package/dist/client/assets/shrink-DQ1FFrPe.js +0 -1
  3434. package/dist/client/assets/shrub-DsFBzIaL.js +0 -1
  3435. package/dist/client/assets/shuffle-guJlIFRz.js +0 -1
  3436. package/dist/client/assets/sigma-DXyYKJSb.js +0 -1
  3437. package/dist/client/assets/signal-DBuEh89J.js +0 -1
  3438. package/dist/client/assets/signal-high-bM1H06pT.js +0 -1
  3439. package/dist/client/assets/signal-low-DG3KJfDa.js +0 -1
  3440. package/dist/client/assets/signal-medium-GF68Y0Ne.js +0 -1
  3441. package/dist/client/assets/signal-zero-CenVEPyq.js +0 -1
  3442. package/dist/client/assets/signature-DaCIdFKK.js +0 -1
  3443. package/dist/client/assets/signpost-D8KzUwel.js +0 -1
  3444. package/dist/client/assets/signpost-big-CSKUbd_D.js +0 -1
  3445. package/dist/client/assets/siren-4ro4wduW.js +0 -1
  3446. package/dist/client/assets/sizeCapture-INFHLROL-CMQSYdw4.js +0 -1
  3447. package/dist/client/assets/sizeCapture-INFHLROL-CMQSYdw4.js.br +0 -0
  3448. package/dist/client/assets/sizeCapture-INFHLROL-CMQSYdw4.js.gz +0 -0
  3449. package/dist/client/assets/skip-back-BP5xR5v9.js +0 -1
  3450. package/dist/client/assets/skip-forward-DSaaip1r.js +0 -1
  3451. package/dist/client/assets/skull-CZ6bOTdM.js +0 -1
  3452. package/dist/client/assets/slash-BnTX82fU.js +0 -1
  3453. package/dist/client/assets/slice-UW9VYWQj.js +0 -1
  3454. package/dist/client/assets/sliders-horizontal-CG4TPFC4.js +0 -1
  3455. package/dist/client/assets/sliders-vertical-BFRtd4yF.js +0 -1
  3456. package/dist/client/assets/smartphone-charging-C0xG3IbX.js +0 -1
  3457. package/dist/client/assets/smartphone-nfc-BXo6JegX.js +0 -1
  3458. package/dist/client/assets/smile-3Gch-6RB.js +0 -1
  3459. package/dist/client/assets/smile-plus-5I9_9Z_1.js +0 -1
  3460. package/dist/client/assets/snail-CrbitpOD.js +0 -1
  3461. package/dist/client/assets/snowflake-B020XL3h.js +0 -1
  3462. package/dist/client/assets/soap-dispenser-droplet-Dpg8k_xa.js +0 -1
  3463. package/dist/client/assets/sofa-NDPNuBm_.js +0 -1
  3464. package/dist/client/assets/solar-panel-C4z3Asg6.js +0 -1
  3465. package/dist/client/assets/soup-CB6W0Hny.js +0 -1
  3466. package/dist/client/assets/space-BDb_X-KW.js +0 -1
  3467. package/dist/client/assets/spade-CkzTTJHa.js +0 -1
  3468. package/dist/client/assets/sparkle-gfmJlkxQ.js +0 -1
  3469. package/dist/client/assets/speaker-Dnngiql2.js +0 -1
  3470. package/dist/client/assets/speech-XjN8NRCk.js +0 -1
  3471. package/dist/client/assets/spell-check-2-DY31tOu6.js +0 -1
  3472. package/dist/client/assets/spell-check-QjVLHfq3.js +0 -1
  3473. package/dist/client/assets/spline-Da5zW8bX.js +0 -1
  3474. package/dist/client/assets/spline-pointer-BWqGiDGR.js +0 -1
  3475. package/dist/client/assets/split-Cs36CmGI.js +0 -1
  3476. package/dist/client/assets/spool-DfoivjbK.js +0 -1
  3477. package/dist/client/assets/sport-shoe-2O0S3uw-.js +0 -1
  3478. package/dist/client/assets/spotlight-Cj4XA-N7.js +0 -1
  3479. package/dist/client/assets/spray-can-H-yMswWf.js +0 -1
  3480. package/dist/client/assets/sprout-DPPvSP6N.js +0 -1
  3481. package/dist/client/assets/square-CfBuYQYR.js +0 -1
  3482. package/dist/client/assets/square-activity-D2J6TE0N.js +0 -1
  3483. package/dist/client/assets/square-arrow-down-BCcdw4Xa.js +0 -1
  3484. package/dist/client/assets/square-arrow-down-left-DB5O9aRM.js +0 -1
  3485. package/dist/client/assets/square-arrow-down-right-COoNFkmw.js +0 -1
  3486. package/dist/client/assets/square-arrow-left-DXZ8WiFL.js +0 -1
  3487. package/dist/client/assets/square-arrow-out-down-left-D8s3uIe2.js +0 -1
  3488. package/dist/client/assets/square-arrow-out-down-right-Bp4jcnGh.js +0 -1
  3489. package/dist/client/assets/square-arrow-out-up-left-wUO4BeHc.js +0 -1
  3490. package/dist/client/assets/square-arrow-right-Bw9ymnDC.js +0 -1
  3491. package/dist/client/assets/square-arrow-right-enter-BH9PIJTO.js +0 -1
  3492. package/dist/client/assets/square-arrow-right-exit-DsMREhga.js +0 -1
  3493. package/dist/client/assets/square-arrow-up-DtGnDS2H.js +0 -1
  3494. package/dist/client/assets/square-arrow-up-left-Bq4MLRlZ.js +0 -1
  3495. package/dist/client/assets/square-arrow-up-right-CHyr-xLt.js +0 -1
  3496. package/dist/client/assets/square-asterisk-CrIaD5Hy.js +0 -1
  3497. package/dist/client/assets/square-bottom-dashed-scissors-C5Bqq6to.js +0 -1
  3498. package/dist/client/assets/square-centerline-dashed-horizontal-BfhwnYzr.js +0 -1
  3499. package/dist/client/assets/square-centerline-dashed-vertical-DdkSJMr-.js +0 -1
  3500. package/dist/client/assets/square-chart-gantt-B14zPmvl.js +0 -1
  3501. package/dist/client/assets/square-check-CMVDAAs-.js +0 -1
  3502. package/dist/client/assets/square-check-big-DNB88aqQ.js +0 -1
  3503. package/dist/client/assets/square-chevron-down-DB0PxDec.js +0 -1
  3504. package/dist/client/assets/square-chevron-left-LDsTOaMG.js +0 -1
  3505. package/dist/client/assets/square-chevron-right-Bx7diAnI.js +0 -1
  3506. package/dist/client/assets/square-chevron-up-DO_MSqPa.js +0 -1
  3507. package/dist/client/assets/square-code-CHHkOF_5.js +0 -1
  3508. package/dist/client/assets/square-dashed-CiXaNDyD.js +0 -1
  3509. package/dist/client/assets/square-dashed-bottom-SQjFjhtH.js +0 -1
  3510. package/dist/client/assets/square-dashed-bottom-code-CGbOur8O.js +0 -1
  3511. package/dist/client/assets/square-dashed-kanban-BrSW3KlN.js +0 -1
  3512. package/dist/client/assets/square-dashed-mouse-pointer-GPF-9aUy.js +0 -1
  3513. package/dist/client/assets/square-dashed-text-DTtLkYa4.js +0 -1
  3514. package/dist/client/assets/square-dashed-top-solid-C6SC4KJy.js +0 -1
  3515. package/dist/client/assets/square-divide-DblkYJSl.js +0 -1
  3516. package/dist/client/assets/square-dot-D9gIF_3Q.js +0 -1
  3517. package/dist/client/assets/square-equal-DqSwQ7bJ.js +0 -1
  3518. package/dist/client/assets/square-function-CappOLF6.js +0 -1
  3519. package/dist/client/assets/square-kanban-BGnf3uff.js +0 -1
  3520. package/dist/client/assets/square-library-R8G8k0U-.js +0 -1
  3521. package/dist/client/assets/square-m-5e1_oltn.js +0 -1
  3522. package/dist/client/assets/square-menu-TyYkHDpq.js +0 -1
  3523. package/dist/client/assets/square-minus-DhgBbOkV.js +0 -1
  3524. package/dist/client/assets/square-mouse-pointer-gsA-h1jb.js +0 -1
  3525. package/dist/client/assets/square-parking-nMLsNZVc.js +0 -1
  3526. package/dist/client/assets/square-parking-off-u_mpRe__.js +0 -1
  3527. package/dist/client/assets/square-pause-DNNJpOXc.js +0 -1
  3528. package/dist/client/assets/square-pen-DMBnlHDX.js +0 -1
  3529. package/dist/client/assets/square-percent-BUU3J0--.js +0 -1
  3530. package/dist/client/assets/square-pi--eZ7lNfH.js +0 -1
  3531. package/dist/client/assets/square-pilcrow-B4dwgoO4.js +0 -1
  3532. package/dist/client/assets/square-play-B4mVjTCo.js +0 -1
  3533. package/dist/client/assets/square-plus-ywHpUqpt.js +0 -1
  3534. package/dist/client/assets/square-power-Bi7tLTTK.js +0 -1
  3535. package/dist/client/assets/square-radical-BMvRqh7Y.js +0 -1
  3536. package/dist/client/assets/square-round-corner-Dh_KnHWq.js +0 -1
  3537. package/dist/client/assets/square-scissors-BUVX0YjC.js +0 -1
  3538. package/dist/client/assets/square-sigma-XjGZCv4v.js +0 -1
  3539. package/dist/client/assets/square-slash-DfjCM2EM.js +0 -1
  3540. package/dist/client/assets/square-split-horizontal-urhogzqI.js +0 -1
  3541. package/dist/client/assets/square-split-vertical-Do2lTvGd.js +0 -1
  3542. package/dist/client/assets/square-square-Dx8jMc1E.js +0 -1
  3543. package/dist/client/assets/square-stack-7LpXWLMK.js +0 -1
  3544. package/dist/client/assets/square-star-DvZklZ4t.js +0 -1
  3545. package/dist/client/assets/square-stop-kMBIRJCv.js +0 -1
  3546. package/dist/client/assets/square-user-02JxZ5fv.js +0 -1
  3547. package/dist/client/assets/square-user-round-CUJ0txH5.js +0 -1
  3548. package/dist/client/assets/square-x-Coydk_Yd.js +0 -1
  3549. package/dist/client/assets/squares-exclude-CqTKm6G_.js +0 -1
  3550. package/dist/client/assets/squares-intersect-H5CN6r1k.js +0 -1
  3551. package/dist/client/assets/squares-subtract-6UCc-l9s.js +0 -1
  3552. package/dist/client/assets/squares-unite-B291YKik.js +0 -1
  3553. package/dist/client/assets/squircle-DaP-q7-F.js +0 -1
  3554. package/dist/client/assets/squircle-dashed-BlL-bMFQ.js +0 -1
  3555. package/dist/client/assets/squirrel-DVfUJfTp.js +0 -1
  3556. package/dist/client/assets/stamp-DPp-APYP.js +0 -1
  3557. package/dist/client/assets/star-DASAgZh5.js +0 -1
  3558. package/dist/client/assets/star-half-DR14XWdE.js +0 -1
  3559. package/dist/client/assets/star-off-C1QI5k9D.js +0 -1
  3560. package/dist/client/assets/stateDiagram-D77RDMKH-CTvEZ_aB.js +0 -1
  3561. package/dist/client/assets/stateDiagram-D77RDMKH-CTvEZ_aB.js.br +0 -0
  3562. package/dist/client/assets/stateDiagram-D77RDMKH-CTvEZ_aB.js.gz +0 -0
  3563. package/dist/client/assets/stateDiagram-v2-MP3YSRHH-BzMFDywk.js +0 -1
  3564. package/dist/client/assets/step-back-Bp1tOnK3.js +0 -1
  3565. package/dist/client/assets/step-forward-CdP1NG87.js +0 -1
  3566. package/dist/client/assets/stethoscope-D3V2EzYd.js +0 -1
  3567. package/dist/client/assets/sticker-BK2eW0lk.js +0 -1
  3568. package/dist/client/assets/sticky-note-CFNTUoLC.js +0 -1
  3569. package/dist/client/assets/sticky-note-check-DBGQ4TO0.js +0 -1
  3570. package/dist/client/assets/sticky-note-minus-Basse0ml.js +0 -1
  3571. package/dist/client/assets/sticky-note-off-BTcNsUR4.js +0 -1
  3572. package/dist/client/assets/sticky-note-plus-C7_ynDXh.js +0 -1
  3573. package/dist/client/assets/sticky-note-x-XOiGIi5q.js +0 -1
  3574. package/dist/client/assets/sticky-notes-BvzqFcFb.js +0 -1
  3575. package/dist/client/assets/stone-Dexj40MQ.js +0 -1
  3576. package/dist/client/assets/store-CJ7wiPyO.js +0 -1
  3577. package/dist/client/assets/stretch-horizontal-DOf2RnzN.js +0 -1
  3578. package/dist/client/assets/stretch-vertical-DwQwQo6j.js +0 -1
  3579. package/dist/client/assets/strikethrough-5GTgWsFl.js +0 -1
  3580. package/dist/client/assets/subscript-Vq9GProx.js +0 -1
  3581. package/dist/client/assets/sun-EjMFxups.js +0 -1
  3582. package/dist/client/assets/sun-dim--BNmF4Sz.js +0 -1
  3583. package/dist/client/assets/sun-medium-j5DnSULt.js +0 -1
  3584. package/dist/client/assets/sun-moon-BFseVzRb.js +0 -1
  3585. package/dist/client/assets/sun-snow-BDJ9fTXo.js +0 -1
  3586. package/dist/client/assets/sunrise-ONyzN0TG.js +0 -1
  3587. package/dist/client/assets/sunset-fYsMKHTl.js +0 -1
  3588. package/dist/client/assets/superscript-B154id5K.js +0 -1
  3589. package/dist/client/assets/swatch-book-6Dhlv1A4.js +0 -1
  3590. package/dist/client/assets/swimlanes-42K2YHIH-Dw9cr-Jh.js +0 -1
  3591. package/dist/client/assets/swimlanes-42K2YHIH-Dw9cr-Jh.js.br +0 -0
  3592. package/dist/client/assets/swimlanes-42K2YHIH-Dw9cr-Jh.js.gz +0 -0
  3593. package/dist/client/assets/swimlanesDiagram-VR7AAH4N-2Lny2a4P.js +0 -8
  3594. package/dist/client/assets/swiper-DcVGWmat.js +0 -1
  3595. package/dist/client/assets/swiper-DcVGWmat.js.br +0 -0
  3596. package/dist/client/assets/swiper-DcVGWmat.js.gz +0 -0
  3597. package/dist/client/assets/swiss-franc-fXKDfNxm.js +0 -1
  3598. package/dist/client/assets/switch-camera-CkjpQodo.js +0 -1
  3599. package/dist/client/assets/sword-MgBinHon.js +0 -1
  3600. package/dist/client/assets/swords-BiJ7cVUS.js +0 -1
  3601. package/dist/client/assets/syringe-DRIkAbPL.js +0 -1
  3602. package/dist/client/assets/table-2-D7DUQyHV.js +0 -1
  3603. package/dist/client/assets/table-CYjho6ld.js +0 -1
  3604. package/dist/client/assets/table-cells-merge-BoRXjTH3.js +0 -1
  3605. package/dist/client/assets/table-cells-split-5pfnPI2i.js +0 -1
  3606. package/dist/client/assets/table-columns-split-CJJ0zn5P.js +0 -1
  3607. package/dist/client/assets/table-of-contents-BZ1MZUyJ.js +0 -1
  3608. package/dist/client/assets/table-properties-Rv9Yc6Jy.js +0 -1
  3609. package/dist/client/assets/table-rows-split-TONwFzRU.js +0 -1
  3610. package/dist/client/assets/tablet-BW9Egf2n.js +0 -1
  3611. package/dist/client/assets/tablet-smartphone-DvSxiPGO.js +0 -1
  3612. package/dist/client/assets/tablets-CWHPLHSV.js +0 -1
  3613. package/dist/client/assets/tag-DRoOo5vu.js +0 -1
  3614. package/dist/client/assets/tags-DsunTq6b.js +0 -1
  3615. package/dist/client/assets/tally-1-DyhZgSnM.js +0 -1
  3616. package/dist/client/assets/tally-2-i2K8duf2.js +0 -1
  3617. package/dist/client/assets/tally-3-CDlVjB6X.js +0 -1
  3618. package/dist/client/assets/tally-4-UUPPE9XV.js +0 -1
  3619. package/dist/client/assets/tally-5-BNEVnZEK.js +0 -1
  3620. package/dist/client/assets/tangent-qZVSFD7A.js +0 -1
  3621. package/dist/client/assets/target-BJePzUEj.js +0 -1
  3622. package/dist/client/assets/telescope-BkqUnsvv.js +0 -1
  3623. package/dist/client/assets/tent-DuODaXZD.js +0 -1
  3624. package/dist/client/assets/tent-tree-BQaY6OBO.js +0 -1
  3625. package/dist/client/assets/test-tube-C_hpsbh8.js +0 -1
  3626. package/dist/client/assets/test-tube-diagonal-CXGwyTVV.js +0 -1
  3627. package/dist/client/assets/test-tubes-Dn2-pWGC.js +0 -1
  3628. package/dist/client/assets/text-align-center-CRoOmwza.js +0 -1
  3629. package/dist/client/assets/text-align-end-CmS0Zg77.js +0 -1
  3630. package/dist/client/assets/text-align-justify-BDN4pvBS.js +0 -1
  3631. package/dist/client/assets/text-align-start-CSmrcFJu.js +0 -1
  3632. package/dist/client/assets/text-cursor-DgJeWJOy.js +0 -1
  3633. package/dist/client/assets/text-cursor-input-CVMTunoD.js +0 -1
  3634. package/dist/client/assets/text-initial-CosLbcBx.js +0 -1
  3635. package/dist/client/assets/text-quote-Brn5GhoN.js +0 -1
  3636. package/dist/client/assets/text-search-CxlXSNzk.js +0 -1
  3637. package/dist/client/assets/text-wrap-B673POaz.js +0 -1
  3638. package/dist/client/assets/theater-tHsHHLvJ.js +0 -1
  3639. package/dist/client/assets/thermometer-cAlA0Vys.js +0 -1
  3640. package/dist/client/assets/thermometer-snowflake-BNHd8qOp.js +0 -1
  3641. package/dist/client/assets/thermometer-sun-C4oL5H3S.js +0 -1
  3642. package/dist/client/assets/thumbs-down-CUUBDdW2.js +0 -1
  3643. package/dist/client/assets/thumbs-up-wD3y57Og.js +0 -1
  3644. package/dist/client/assets/ticket-Wd5yEh4Z.js +0 -1
  3645. package/dist/client/assets/ticket-check-Awryaf0s.js +0 -1
  3646. package/dist/client/assets/ticket-minus-qoY_3Jsm.js +0 -1
  3647. package/dist/client/assets/ticket-percent-C96Y1Al7.js +0 -1
  3648. package/dist/client/assets/ticket-plus-BgBIgeH_.js +0 -1
  3649. package/dist/client/assets/ticket-slash-Qh9UB9lr.js +0 -1
  3650. package/dist/client/assets/ticket-x-D3FOAe61.js +0 -1
  3651. package/dist/client/assets/tickets-Cd66H5Am.js +0 -1
  3652. package/dist/client/assets/tickets-plane-bFwrO8PI.js +0 -1
  3653. package/dist/client/assets/timeline-BZsB2AfH.js +0 -1
  3654. package/dist/client/assets/timeline-definition-24CTP7MA-Dr5AA87P.js +0 -120
  3655. package/dist/client/assets/timeline-definition-24CTP7MA-Dr5AA87P.js.br +0 -0
  3656. package/dist/client/assets/timeline-definition-24CTP7MA-Dr5AA87P.js.gz +0 -0
  3657. package/dist/client/assets/timer-CSkua-FT.js +0 -1
  3658. package/dist/client/assets/timer-off-CaFH8n_I.js +0 -1
  3659. package/dist/client/assets/timer-reset-puFmlMuC.js +0 -1
  3660. package/dist/client/assets/toggle-left-C-y084bR.js +0 -1
  3661. package/dist/client/assets/toggle-right-BNOcKobt.js +0 -1
  3662. package/dist/client/assets/toilet-CuD76N0J.js +0 -1
  3663. package/dist/client/assets/tool-case-CL0ZVf4t.js +0 -1
  3664. package/dist/client/assets/toolbox-_T6Qz6Gp.js +0 -1
  3665. package/dist/client/assets/tornado-BpPidPeE.js +0 -1
  3666. package/dist/client/assets/torus-DiJ_wLV5.js +0 -1
  3667. package/dist/client/assets/touchpad-VKM1vFpP.js +0 -1
  3668. package/dist/client/assets/touchpad-off-C1Xb1Q6a.js +0 -1
  3669. package/dist/client/assets/towel-rack-CCRO-Kuf.js +0 -1
  3670. package/dist/client/assets/tower-control-Cmg3Qykx.js +0 -1
  3671. package/dist/client/assets/toy-brick-DkOTF83V.js +0 -1
  3672. package/dist/client/assets/tractor-CYCLZicX.js +0 -1
  3673. package/dist/client/assets/traffic-cone-C1YN-rf0.js +0 -1
  3674. package/dist/client/assets/train-front-D8_SqfBZ.js +0 -1
  3675. package/dist/client/assets/train-front-tunnel-CyfNTyho.js +0 -1
  3676. package/dist/client/assets/train-track-C2iBhOop.js +0 -1
  3677. package/dist/client/assets/tram-front-CP-2E2MD.js +0 -1
  3678. package/dist/client/assets/transgender-OSa-s64W.js +0 -1
  3679. package/dist/client/assets/trash-DWpgZDxL.js +0 -1
  3680. package/dist/client/assets/tree-deciduous-Dgm5JyL8.js +0 -1
  3681. package/dist/client/assets/tree-palm-FE2QIpZW.js +0 -1
  3682. package/dist/client/assets/tree-pine-CB5eKova.js +0 -1
  3683. package/dist/client/assets/trees-DKOWogtA.js +0 -1
  3684. package/dist/client/assets/trending-down-Be9MqeCn.js +0 -1
  3685. package/dist/client/assets/trending-up-OWqGRoIx.js +0 -1
  3686. package/dist/client/assets/trending-up-down-CNbNmNQ0.js +0 -1
  3687. package/dist/client/assets/triangle-Fle68_eD.js +0 -1
  3688. package/dist/client/assets/triangle-alert-BcpaQxCW.js +0 -1
  3689. package/dist/client/assets/triangle-dashed-Djmthg0v.js +0 -1
  3690. package/dist/client/assets/triangle-right-LqpXno2r.js +0 -1
  3691. package/dist/client/assets/trophy-B18-FlqG.js +0 -1
  3692. package/dist/client/assets/truck-Q2xm26Oa.js +0 -1
  3693. package/dist/client/assets/truck-electric-PCxzxf6J.js +0 -1
  3694. package/dist/client/assets/turkish-lira-CvSj15ad.js +0 -1
  3695. package/dist/client/assets/turntable-CaLr6Kyz.js +0 -1
  3696. package/dist/client/assets/turtle-DMPxp5Sd.js +0 -1
  3697. package/dist/client/assets/tv-CtOPSwv6.js +0 -1
  3698. package/dist/client/assets/tv-minimal-CNCRml_i.js +0 -1
  3699. package/dist/client/assets/tv-minimal-play-DC7-IGBY.js +0 -1
  3700. package/dist/client/assets/type-C8dAyHWL.js +0 -1
  3701. package/dist/client/assets/type-outline-DNLjlIU8.js +0 -1
  3702. package/dist/client/assets/umbrella-CKry7Kly.js +0 -1
  3703. package/dist/client/assets/umbrella-off-Dyz5BJds.js +0 -1
  3704. package/dist/client/assets/underline-BthpiC3C.js +0 -1
  3705. package/dist/client/assets/undo-2-Dr5V6HB4.js +0 -1
  3706. package/dist/client/assets/undo-dot-DL35veUK.js +0 -1
  3707. package/dist/client/assets/undo-yeZA6IjQ.js +0 -1
  3708. package/dist/client/assets/unfold-horizontal-9Kb2d04M.js +0 -1
  3709. package/dist/client/assets/unfold-vertical-CnZfdMBG.js +0 -1
  3710. package/dist/client/assets/ungroup-CBBBcyOE.js +0 -1
  3711. package/dist/client/assets/university-LdBS_U_3.js +0 -1
  3712. package/dist/client/assets/unlink-2-DcMRTQIP.js +0 -1
  3713. package/dist/client/assets/unlink-yxEGIxws.js +0 -1
  3714. package/dist/client/assets/unplug-Cv2A6wsR.js +0 -1
  3715. package/dist/client/assets/upload-DHFik5jS.js +0 -1
  3716. package/dist/client/assets/usb-V9OOEi4_.js +0 -1
  3717. package/dist/client/assets/use-gesture-react.esm-Usl56Uy4.js +0 -1
  3718. package/dist/client/assets/use-gesture-react.esm-Usl56Uy4.js.br +0 -0
  3719. package/dist/client/assets/use-gesture-react.esm-Usl56Uy4.js.gz +0 -0
  3720. package/dist/client/assets/user-BpITwq1d.js +0 -1
  3721. package/dist/client/assets/user-check-CeIDKvV-.js +0 -1
  3722. package/dist/client/assets/user-cog-DKlJMTW0.js +0 -1
  3723. package/dist/client/assets/user-key-vVDYVFTB.js +0 -1
  3724. package/dist/client/assets/user-lock-Dpys-ZmU.js +0 -1
  3725. package/dist/client/assets/user-minus-Dstg6N_7.js +0 -1
  3726. package/dist/client/assets/user-pen-CEB03yYn.js +0 -1
  3727. package/dist/client/assets/user-plus-Cc3mhJOv.js +0 -1
  3728. package/dist/client/assets/user-round-D6qa-HDT.js +0 -1
  3729. package/dist/client/assets/user-round-check-BkecHWCR.js +0 -1
  3730. package/dist/client/assets/user-round-cog-pQzknQJm.js +0 -1
  3731. package/dist/client/assets/user-round-key-KisIsEmz.js +0 -1
  3732. package/dist/client/assets/user-round-minus-DUcnQdxM.js +0 -1
  3733. package/dist/client/assets/user-round-pen-DX6Mo72a.js +0 -1
  3734. package/dist/client/assets/user-round-plus-CaDtcByx.js +0 -1
  3735. package/dist/client/assets/user-round-search-BbyOshO5.js +0 -1
  3736. package/dist/client/assets/user-round-x-DqExXjHN.js +0 -1
  3737. package/dist/client/assets/user-search-Ct6EMNCk.js +0 -1
  3738. package/dist/client/assets/user-star-DhlVEwVb.js +0 -1
  3739. package/dist/client/assets/user-x-CLKv-zQY.js +0 -1
  3740. package/dist/client/assets/users-iPX-nuVZ.js +0 -1
  3741. package/dist/client/assets/users-round-fajSlpZU.js +0 -1
  3742. package/dist/client/assets/utensils-D3VIbqfA.js +0 -1
  3743. package/dist/client/assets/utensils-crossed-xg6fY2Nd.js +0 -1
  3744. package/dist/client/assets/utility-pole-DJUJnoGx.js +0 -1
  3745. package/dist/client/assets/van-1H6d4xpU.js +0 -1
  3746. package/dist/client/assets/variable-Dv9bRM21.js +0 -1
  3747. package/dist/client/assets/vault-Cl1gZ4na.js +0 -1
  3748. package/dist/client/assets/vector-square-ff04lVx0.js +0 -1
  3749. package/dist/client/assets/vegan-DgTYKaIf.js +0 -1
  3750. package/dist/client/assets/venetian-mask-BwgZK_d2.js +0 -1
  3751. package/dist/client/assets/vennDiagram-4TSXK5OY-ClUdzJv_.js +0 -34
  3752. package/dist/client/assets/vennDiagram-4TSXK5OY-ClUdzJv_.js.br +0 -0
  3753. package/dist/client/assets/vennDiagram-4TSXK5OY-ClUdzJv_.js.gz +0 -0
  3754. package/dist/client/assets/venus-BYcnERSU.js +0 -1
  3755. package/dist/client/assets/venus-and-mars-Bw8zoKxx.js +0 -1
  3756. package/dist/client/assets/vibrate-B-JGi570.js +0 -1
  3757. package/dist/client/assets/vibrate-off-B2TuGOAv.js +0 -1
  3758. package/dist/client/assets/video-off-CGbPZJx9.js +0 -1
  3759. package/dist/client/assets/videoCompression-FazlZ86q.js +0 -3
  3760. package/dist/client/assets/videoCompression-FazlZ86q.js.br +0 -0
  3761. package/dist/client/assets/videoCompression-FazlZ86q.js.gz +0 -0
  3762. package/dist/client/assets/videotape-D6OxNc8g.js +0 -1
  3763. package/dist/client/assets/view-C2_YCzXR.js +0 -1
  3764. package/dist/client/assets/voicemail-DJQJBkqe.js +0 -1
  3765. package/dist/client/assets/volleyball-DS2Jp-Ru.js +0 -1
  3766. package/dist/client/assets/volume-1-COAGo1-B.js +0 -1
  3767. package/dist/client/assets/volume-2-BzOmfi6e.js +0 -1
  3768. package/dist/client/assets/volume-l9ZfD3_c.js +0 -1
  3769. package/dist/client/assets/volume-off-Bl45dQ3h.js +0 -1
  3770. package/dist/client/assets/volume-x-G3F0_ClK.js +0 -1
  3771. package/dist/client/assets/vote-CheiurVw.js +0 -1
  3772. package/dist/client/assets/wallet-Dnd3Pevr.js +0 -1
  3773. package/dist/client/assets/wallet-cards-ylEx1JVa.js +0 -1
  3774. package/dist/client/assets/wallet-minimal-DQZMEYci.js +0 -1
  3775. package/dist/client/assets/wallpaper-DlCBaBmr.js +0 -1
  3776. package/dist/client/assets/wand-CoGCHkvm.js +0 -1
  3777. package/dist/client/assets/wand-sparkles-JKiN2Ehp.js +0 -1
  3778. package/dist/client/assets/wardleyDiagram-VM6X3IG4-CMHuDBS0.js +0 -78
  3779. package/dist/client/assets/wardleyDiagram-VM6X3IG4-CMHuDBS0.js.br +0 -0
  3780. package/dist/client/assets/wardleyDiagram-VM6X3IG4-CMHuDBS0.js.gz +0 -0
  3781. package/dist/client/assets/warehouse-10WBTYIL.js +0 -1
  3782. package/dist/client/assets/washing-machine-CuG1I9sD.js +0 -1
  3783. package/dist/client/assets/watch-DLqEaZKy.js +0 -1
  3784. package/dist/client/assets/waves-arrow-down-B7ZTMhIq.js +0 -1
  3785. package/dist/client/assets/waves-arrow-up-DB5pV5G-.js +0 -1
  3786. package/dist/client/assets/waves-horizontal-CupHROOx.js +0 -1
  3787. package/dist/client/assets/waves-ladder-OhwP3Hwc.js +0 -1
  3788. package/dist/client/assets/waves-vertical-Ctn2yb4Q.js +0 -1
  3789. package/dist/client/assets/waypoints-jWHECajG.js +0 -1
  3790. package/dist/client/assets/webcam-CvMXtmFA.js +0 -1
  3791. package/dist/client/assets/webhook-CIA4s5L-.js +0 -1
  3792. package/dist/client/assets/webhook-off-DOcEaSnl.js +0 -1
  3793. package/dist/client/assets/weight-BONj21SZ.js +0 -1
  3794. package/dist/client/assets/weight-tilde-Cgqb__Qz.js +0 -1
  3795. package/dist/client/assets/wheat-off-B0dMFx8j.js +0 -1
  3796. package/dist/client/assets/wheat-vnILBVDT.js +0 -1
  3797. package/dist/client/assets/whole-word-jRtnuljT.js +0 -1
  3798. package/dist/client/assets/wifi-CW1gOf6M.js +0 -1
  3799. package/dist/client/assets/wifi-cog-uN42nWod.js +0 -1
  3800. package/dist/client/assets/wifi-high-DFM99RHD.js +0 -1
  3801. package/dist/client/assets/wifi-low-Bnvn0y_G.js +0 -1
  3802. package/dist/client/assets/wifi-pen-6sa_R8zI.js +0 -1
  3803. package/dist/client/assets/wifi-sync-DwEvsJby.js +0 -1
  3804. package/dist/client/assets/wifi-zero-DJShUQSw.js +0 -1
  3805. package/dist/client/assets/wind-XJkgQ-he.js +0 -1
  3806. package/dist/client/assets/wind-arrow-down-DqHiQwgO.js +0 -1
  3807. package/dist/client/assets/wine-BpbnfeRM.js +0 -1
  3808. package/dist/client/assets/wine-off-DUtwQIeM.js +0 -1
  3809. package/dist/client/assets/workflow-DOtXYxEd.js +0 -1
  3810. package/dist/client/assets/worm-Xn4rMDu3.js +0 -1
  3811. package/dist/client/assets/wrench-ICEzQG2S.js +0 -1
  3812. package/dist/client/assets/x-line-top-DB-azT8W.js +0 -1
  3813. package/dist/client/assets/xychartDiagram-S5SC5T6Z-BmLn6Ovo.js +0 -7
  3814. package/dist/client/assets/xychartDiagram-S5SC5T6Z-BmLn6Ovo.js.br +0 -0
  3815. package/dist/client/assets/xychartDiagram-S5SC5T6Z-BmLn6Ovo.js.gz +0 -0
  3816. package/dist/client/assets/zap-BM7PoKmH.js +0 -1
  3817. package/dist/client/assets/zap-off-CxreBkm2.js +0 -1
  3818. package/dist/client/assets/zodiac-aquarius-DLp5Iko_.js +0 -1
  3819. package/dist/client/assets/zodiac-aries-BR-oYSMf.js +0 -1
  3820. package/dist/client/assets/zodiac-cancer-Bj6nT0Jx.js +0 -1
  3821. package/dist/client/assets/zodiac-capricorn-Bei0rf6E.js +0 -1
  3822. package/dist/client/assets/zodiac-gemini-Bqo0JSmd.js +0 -1
  3823. package/dist/client/assets/zodiac-leo-k3yfbqGM.js +0 -1
  3824. package/dist/client/assets/zodiac-libra-_yscR4_w.js +0 -1
  3825. package/dist/client/assets/zodiac-ophiuchus-WdDZtX-e.js +0 -1
  3826. package/dist/client/assets/zodiac-pisces-DcD5MF9p.js +0 -1
  3827. package/dist/client/assets/zodiac-sagittarius-Dh0_REKG.js +0 -1
  3828. package/dist/client/assets/zodiac-scorpio-FhuwIr7w.js +0 -1
  3829. package/dist/client/assets/zodiac-taurus-DRLDnNFX.js +0 -1
  3830. package/dist/client/assets/zodiac-virgo-BA7VaWz5.js +0 -1
  3831. package/dist/client/assets/zoom-in-DSfxRkuZ.js +0 -1
  3832. package/dist/client/assets/zoom-out-BRshezzc.js +0 -1
@@ -1,37 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/passwordBootstrap-BW7oAKGJ.js","assets/dnd-CYu7YLJF.js","assets/terminal-DaiFCKy_.js","assets/videoCompression-FazlZ86q.js","assets/SessionResourceSidebar-CM9Vxbf2.js","assets/RecordingSaveDialog-G-DoMMaD.js","assets/use-gesture-react.esm-Usl56Uy4.js","assets/gestureArbiter-DszagC-d.js","assets/house-B5Lkl0hs.js","assets/folder-tree-qwcCuddu.js","assets/upload-DHFik5jS.js","assets/SessionChatView-kTD9PR6z.js","assets/sessionChatStartup-DUNj3bnb.js","assets/sessionChatStartup-BqUw9ShQ.css","assets/Markdown-BQbIDL5g.js","assets/swiper-DcVGWmat.js","assets/swiper-C2J0D0kV.css","assets/referenceSelection-C35KrNSb.js","assets/list-tree-CEajyeq-.js","assets/Markdown-DKQhs57e.css","assets/quote-DI8iPwKh.js","assets/sliders-horizontal-CG4TPFC4.js","assets/arrow-down-1Kl4oM72.js","assets/App-Bd9XpX-B.js","assets/link-D4yDVdfg.js","assets/layout-grid-C0V7dQsb.js","assets/log-out-BEuaQqK8.js","assets/triangle-alert-BcpaQxCW.js","assets/grip-vertical--nr9_UbN.js","assets/wand-sparkles-JKiN2Ehp.js","assets/file-up-DZw7z8vG.js","assets/corner-down-left-CISz8eob.js","assets/clipboard-stZ1W8LA.js","assets/move-rI_psr6S.js","assets/clipboard-paste-cVvyZKQb.js","assets/v4-EwEgHOG0.js","assets/GitLoadingSkeleton-C-d81rCC.js","assets/panel-left-close-EfL-CBSg.js","assets/panel-left-open-mczOolrF.js","assets/panel-right-close-B2AY3oAg.js","assets/panel-right-open-DsHBGdw1.js","assets/archive-XOJr3PBG.js","assets/circle-question-mark-BY5PcJ_L.js","assets/circle-dot-BVLEj6KQ.js","assets/history-C1Vismkc.js","assets/settings-D2KRDBgF.js","assets/search-Slp2tMAZ.js","assets/users-iPX-nuVZ.js","assets/settings-2-DF5ZXdpO.js","assets/layout-dashboard-B7iUmEMY.js","assets/star-DASAgZh5.js","assets/circle-9UYK5vx5.js","assets/play-6sYJOOLI.js","assets/send--HS9plgx.js","assets/external-link-H9_oJhBN.js","assets/maximize-2-XIp_cYxK.js","assets/calendar-clock-DajVjMER.js","assets/pause-mkQz4Haj.js","assets/unlink-yxEGIxws.js","assets/chart-bar-KFIWGGK6.js","assets/workflow-DOtXYxEd.js","assets/rows-2-CHxcuA6t.js","assets/grid-2x2-CNFzUSHm.js","assets/pencil-line-aiFWg3Bx.js","assets/git-branch-DQTHd8Jw.js","assets/git-compare-DIMK0bq1.js","assets/network-CuwtecJy.js","assets/AndroidMirrorView-uLXVeTB_.js","assets/unplug-Cv2A6wsR.js","assets/plug-DozrepPw.js","assets/camera-ClSAif5y.js","assets/square-CfBuYQYR.js","assets/minimize-CSSXU40C.js","assets/maximize-slKh4Ovw.js","assets/monitor-smartphone-DXpObQkI.js","assets/layers-BANvDJfh.js","assets/bell-CFqQzD7v.js","assets/rotate-cw-DKLcWsMY.js","assets/volume-1-COAGo1-B.js","assets/volume-2-BzOmfi6e.js","assets/power-v0e_wtP-.js","assets/keyboard-Kab98cxu.js","assets/minus-rsR8kOVX.js","assets/hand-CjexLIuc.js","assets/undo-2-Dr5V6HB4.js","assets/stethoscope-D3V2EzYd.js","assets/code-CdskSBVx.js","assets/shield-alert-DuVVAKhQ.js","assets/shield-check-DxP-O23p.js","assets/mouse-pointer-2-2DLmmZC-.js","assets/moon-DszlF5VG.js","assets/sun-EjMFxups.js","assets/cable-f1W52QQX.js","assets/hash-CqvUwtmQ.js","assets/clock-DQ1-qjg_.js","assets/pen-line-CuxWt1Wb.js","assets/type-C8dAyHWL.js","assets/App-D-2enNLe.css","assets/DagPlayground-6i1MrDv4.js","assets/ChangeWalkthroughPanel-BtuBFg-T.js","assets/chevron-left-Cg1C8O4K.js","assets/minimize-2-BT7WsdpS.js","assets/DiffLab-CnzqYaW7.js","assets/DiffViewer-C7KTXtOo.js","assets/link-HalVju9n.js","assets/DiffViewer-T3uj2-aP.css","assets/DiffReviewLab-D5u7sipT.js","assets/DiffReview-ZuBlDYd9.js","assets/list-Q16BplFI.js"])))=>i.map(i=>d[i]);
2
- import{i as Tu,g as zg,R as Ut,f as y,r as Kn,j as lS}from"./dnd-CYu7YLJF.js";import{T as dS,l as uS}from"./terminal-DaiFCKy_.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();const fS="modulepreload",hS=function(e){return"/"+e},vh={},Zt=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(d){return Promise.all(d.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=i?.nonce||i?.getAttribute("nonce");o=c(n.map(d=>{if(d=hS(d),d in vh)return;vh[d]=!0;const u=d.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${f}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":fS,u||(h.as="script"),h.crossOrigin="",h.href=d,a&&h.setAttribute("nonce",a),document.head.appendChild(h),u)return new Promise((p,m)=>{h.addEventListener("load",p),h.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${d}`)))})}))}function s(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return o.then(i=>{for(const a of i||[])a.status==="rejected"&&s(a.reason);return t().catch(s)})};var Zc={exports:{}},ts={};var xh;function pS(){if(xh)return ts;xh=1;var e=Tu(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,c,d){var u,f={},h=null,p=null;d!==void 0&&(h=""+d),c.key!==void 0&&(h=""+c.key),c.ref!==void 0&&(p=c.ref);for(u in c)r.call(c,u)&&!s.hasOwnProperty(u)&&(f[u]=c[u]);if(a&&a.defaultProps)for(u in c=a.defaultProps,c)f[u]===void 0&&(f[u]=c[u]);return{$$typeof:t,type:a,key:h,ref:p,props:f,_owner:o.current}}return ts.Fragment=n,ts.jsx=i,ts.jsxs=i,ts}var Sh;function mS(){return Sh||(Sh=1,Zc.exports=pS()),Zc.exports}var l=mS();function gS(){typeof crypto>"u"||typeof crypto.randomUUID=="function"||Object.defineProperty(crypto,"randomUUID",{configurable:!0,value:()=>{const e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=[...e].map(n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}})}gS();const Ar="termdock-secure-target-v1",Au="termdock-secure-entry-v1",yS=new Set([Ar,Au,"termdock-color-theme","termdock:locale","termdock.federation.connections.v1"]),Ni=typeof Storage>"u"?void 0:Storage.prototype.getItem,Qc=typeof Storage>"u"?void 0:Storage.prototype.setItem,Eh="termdock-secure-legacy-owner",hc=typeof window<"u"&&window.parent!==window&&location.pathname==="/workspace.html";function wS(){if(typeof window>"u")return null;try{if(hc){const t=new URLSearchParams(location.search).get("termdock-workspace"),n=JSON.parse(localStorage.getItem("termdock.federation.connections.v1")||"[]"),r=Array.isArray(n)?n.find(o=>o?.targetPeerId===t):void 0;return r&&typeof r.url=="string"&&typeof r.targetPeerId=="string"?{...r,serviceName:r.label||r.serviceName}:null}const e=JSON.parse(sessionStorage.getItem(Ar)??localStorage.getItem(Ar)??"null");return e&&typeof e.url=="string"&&typeof e.targetPeerId=="string"?e:null}catch{return null}}let oi=wS();const ld=new Set,go=oi?.targetPeerId??"unpaired";function dt(){return oi}function bS(e){return ld.add(e),()=>ld.delete(e)}function qg(){for(const e of ld)e(oi)}function Pu(e){if(oi=e,qg(),hc)return;const t=JSON.stringify(e);sessionStorage.setItem(Ar,t),localStorage.setItem(Ar,t)}function vS(){oi=null,qg(),!hc&&(localStorage.removeItem(Ar),sessionStorage.removeItem(Ar),localStorage.removeItem(Au))}function Ns(e,t=go){return yS.has(e)||e.startsWith("termdock-secure-")?e:`termdock-service:${t}:${e}`}function xS(e){if(!(!Ni||!Qc))try{if(Ni.call(localStorage,Eh))return;Qc.call(localStorage,Eh,e);for(const n of[localStorage,sessionStorage]){const r=Array.from({length:n.length},(o,s)=>n.key(s)).filter(o=>!!o);for(const o of r){if(o.startsWith("termdock-service:")||Ns(o,e)===o)continue;const s=Ns(o,e),i=Ni.call(n,o);i!==null&&Ni.call(n,s)===null&&Qc.call(n,s,i)}}}catch{}}let kh=!1;function SS(){if(kh||typeof Storage>"u")return;kh=!0;const e=Storage.prototype.getItem,t=Storage.prototype.setItem,n=Storage.prototype.removeItem;Storage.prototype.getItem=function(r){return e.call(this,Ns(String(r)))},Storage.prototype.setItem=function(r,o){t.call(this,Ns(String(r)),o)},Storage.prototype.removeItem=function(r){n.call(this,Ns(String(r)))}}SS();const ES={},Ih=e=>{let t;const n=new Set,r=(u,f)=>{const h=typeof u=="function"?u(t):u;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(m=>m(t,p))}},o=()=>t,c={setState:r,getState:o,getInitialState:()=>d,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(ES?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(r,o,c);return c},Kg=e=>e?Ih(e):Ih;var el={exports:{}},tl={},nl={exports:{}},rl={};var Ch;function kS(){if(Ch)return rl;Ch=1;var e=Tu();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var p=h(),m=r({inst:{value:p,getSnapshot:h}}),g=m[0].inst,b=m[1];return s(function(){g.value=p,g.getSnapshot=h,c(g)&&b({inst:g})},[f,p,h]),o(function(){return c(g)&&b({inst:g}),f(function(){c(g)&&b({inst:g})})},[f]),i(p),p}function c(f){var h=f.getSnapshot;f=f.value;try{var p=h();return!n(f,p)}catch{return!0}}function d(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return rl.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,rl}var Rh;function IS(){return Rh||(Rh=1,nl.exports=kS()),nl.exports}var Th;function CS(){if(Th)return tl;Th=1;var e=Tu(),t=IS();function n(d,u){return d===u&&(d!==0||1/d===1/u)||d!==d&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,a=e.useMemo,c=e.useDebugValue;return tl.useSyncExternalStoreWithSelector=function(d,u,f,h,p){var m=s(null);if(m.current===null){var g={hasValue:!1,value:null};m.current=g}else g=m.current;m=a(function(){function w(R){if(!E){if(E=!0,v=R,R=h(R),p!==void 0&&g.hasValue){var k=g.value;if(p(k,R))return C=k}return C=R}if(k=C,r(v,R))return k;var x=h(R);return p!==void 0&&p(k,x)?(v=R,k):(v=R,C=x)}var E=!1,v,C,_=f===void 0?null:f;return[function(){return w(u())},_===null?void 0:function(){return w(_())}]},[u,f,h,p]);var b=o(d,m[0],m[1]);return i(function(){g.hasValue=!0,g.value=b},[b]),c(b),b},tl}var Ah;function RS(){return Ah||(Ah=1,el.exports=CS()),el.exports}var TS=RS();const AS=zg(TS),Gg={},{useDebugValue:PS}=Ut,{useSyncExternalStoreWithSelector:NS}=AS;let Ph=!1;const _S=e=>e;function Wg(e,t=_S,n){(Gg?"production":void 0)!=="production"&&n&&!Ph&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Ph=!0);const r=NS(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return PS(r),r}const Nh=e=>{(Gg?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?Kg(e):e,n=(r,o)=>Wg(t,r,o);return Object.assign(n,t),n},dr=e=>e?Nh(e):Nh;const Vg=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const LS=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const DS=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const _h=e=>{const t=DS(e);return t.charAt(0).toUpperCase()+t.slice(1)};var ol={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const jS=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},OS=y.createContext({}),MS=()=>y.useContext(OS),BS=y.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},c)=>{const{size:d=24,strokeWidth:u=2,absoluteStrokeWidth:f=!1,color:h="currentColor",className:p=""}=MS()??{},m=r??f?Number(n??u)*24/Number(t??d):n??u;return y.createElement("svg",{ref:c,...ol,width:t??d??ol.width,height:t??d??ol.height,stroke:e??h,strokeWidth:m,className:Vg("lucide",p,o),...!s&&!jS(a)&&{"aria-hidden":"true"},...a},[...i.map(([g,b])=>y.createElement(g,b)),...Array.isArray(s)?s:[s]])});const ve=(e,t)=>{const n=y.forwardRef(({className:r,...o},s)=>y.createElement(BS,{ref:s,iconNode:t,className:Vg(`lucide-${LS(_h(e))}`,`lucide-${e}`,r),...o}));return n.displayName=_h(e),n};const Yg=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M20 8h-5",key:"1vsyxs"}],["path",{d:"M15 10V6.5a2.5 2.5 0 0 1 5 0V10",key:"ag13bf"}],["path",{d:"M15 14h5l-5 6h5",key:"ur5jdg"}]],Xg=ve("arrow-down-a-z",Yg),KO=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Yg,default:Xg},Symbol.toStringTag,{value:"Module"}));const Jg=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Nu=ve("arrow-left",Jg),GO=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Jg,default:Nu},Symbol.toStringTag,{value:"Module"}));const Zg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Qg=ve("arrow-right",Zg),WO=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Zg,default:Qg},Symbol.toStringTag,{value:"Module"}));const ey=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],ty=ve("arrow-up-right",ey),VO=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ey,default:ty},Symbol.toStringTag,{value:"Module"}));const ny=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M11.68 2.009A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673c-.824-.85-1.678-1.731-2.21-3.348",key:"xaq59h"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],_u=ve("bell-dot",ny),YO=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ny,default:_u},Symbol.toStringTag,{value:"Module"}));const ry=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],oy=ve("bot",ry),XO=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ry,default:oy},Symbol.toStringTag,{value:"Module"}));const sy=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],iy=ve("box",sy),JO=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:sy,default:iy},Symbol.toStringTag,{value:"Module"}));const ay=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],cy=ve("briefcase",ay),ZO=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ay,default:cy},Symbol.toStringTag,{value:"Module"}));const ly=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ln=ve("check",ly),QO=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ly,default:Ln},Symbol.toStringTag,{value:"Module"}));const dy=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Pr=ve("chevron-down",dy),eM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:dy,default:Pr},Symbol.toStringTag,{value:"Module"}));const uy=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],On=ve("chevron-right",uy),tM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:uy,default:On},Symbol.toStringTag,{value:"Module"}));const fy=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],hy=ve("chevron-up",fy),nM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:fy,default:hy},Symbol.toStringTag,{value:"Module"}));const py=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],my=ve("circle-alert",py),rM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:py,default:my},Symbol.toStringTag,{value:"Module"}));const gy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],yy=ve("circle-check",gy),oM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:gy,default:yy},Symbol.toStringTag,{value:"Module"}));const wy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],xa=ve("clock-3",wy),sM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:wy,default:xa},Symbol.toStringTag,{value:"Module"}));const by=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],vy=ve("code-xml",by),iM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:by,default:vy},Symbol.toStringTag,{value:"Module"}));const xy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],Sy=ve("columns-2",xy),aM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:xy,default:Sy},Symbol.toStringTag,{value:"Module"}));const Ey=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],si=ve("copy",Ey),cM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ey,default:si},Symbol.toStringTag,{value:"Module"}));const ky=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],pc=ve("download",ky),lM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ky,default:pc},Symbol.toStringTag,{value:"Module"}));const Iy=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Nr=ve("ellipsis",Iy),dM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Iy,default:Nr},Symbol.toStringTag,{value:"Module"}));const Cy=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],Ry=ve("file-code",Cy),uM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Cy,default:Ry},Symbol.toStringTag,{value:"Module"}));const Ty=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Ay=ve("file-text",Ty),fM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ty,default:Ay},Symbol.toStringTag,{value:"Module"}));const Py=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Lu=ve("file",Py),hM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Py,default:Lu},Symbol.toStringTag,{value:"Module"}));const Ny=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],_s=ve("folder-open",Ny),pM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ny,default:_s},Symbol.toStringTag,{value:"Module"}));const _y=[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]],mc=ve("folder-search",_y),mM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:_y,default:mc},Symbol.toStringTag,{value:"Module"}));const Ly=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],gc=ve("folder",Ly),gM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ly,default:gc},Symbol.toStringTag,{value:"Module"}));const Dy=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],jy=ve("lightbulb",Dy),yM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Dy,default:jy},Symbol.toStringTag,{value:"Module"}));const Oy=[["path",{d:"M9 17H7A5 5 0 0 1 7 7",key:"10o201"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8",key:"1d3206"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12",key:"rvw6j4"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],My=ve("link-2-off",Oy),wM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Oy,default:My},Symbol.toStringTag,{value:"Module"}));const By=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],_o=ve("link-2",By),bM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:By,default:_o},Symbol.toStringTag,{value:"Module"}));const Fy=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Uy=ve("loader-circle",Fy),vM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Fy,default:Uy},Symbol.toStringTag,{value:"Module"}));const Hy=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],ii=ve("message-circle",Hy),xM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Hy,default:ii},Symbol.toStringTag,{value:"Module"}));const $y=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Du=ve("monitor",$y),SM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:$y,default:Du},Symbol.toStringTag,{value:"Module"}));const zy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],qy=ve("panel-right",zy),EM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:zy,default:qy},Symbol.toStringTag,{value:"Module"}));const Ky=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],Gy=ve("paperclip",Ky),kM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Ky,default:Gy},Symbol.toStringTag,{value:"Module"}));const Wy=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Vy=ve("pencil",Wy),IM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Wy,default:Vy},Symbol.toStringTag,{value:"Module"}));const Yy=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Gs=ve("pin",Yy),CM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Yy,default:Gs},Symbol.toStringTag,{value:"Module"}));const Xy=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]],Ws=ve("pin-off",Xy),RM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Xy,default:Ws},Symbol.toStringTag,{value:"Module"}));const Jy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ju=ve("plus",Jy),TM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Jy,default:ju},Symbol.toStringTag,{value:"Module"}));const Zy=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],Qy=ve("qr-code",Zy),AM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:Zy,default:Qy},Symbol.toStringTag,{value:"Module"}));const ew=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ou=ve("refresh-cw",ew),PM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:ew,default:Ou},Symbol.toStringTag,{value:"Module"}));const tw=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],nw=ve("rocket",tw),NM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:tw,default:nw},Symbol.toStringTag,{value:"Module"}));const rw=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],ow=ve("rotate-ccw",rw),_M=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:rw,default:ow},Symbol.toStringTag,{value:"Module"}));const sw=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],ai=ve("server",sw),LM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:sw,default:ai},Symbol.toStringTag,{value:"Module"}));const iw=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],yc=ve("smartphone",iw),DM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:iw,default:yc},Symbol.toStringTag,{value:"Module"}));const aw=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],cw=ve("sparkles",aw),jM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:aw,default:cw},Symbol.toStringTag,{value:"Module"}));const lw=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Mu=ve("square-terminal",lw),OM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:lw,default:Mu},Symbol.toStringTag,{value:"Module"}));const dw=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],uw=ve("terminal",dw),MM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:dw,default:uw},Symbol.toStringTag,{value:"Module"}));const fw=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Bu=ve("trash-2",fw),BM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:fw,default:Bu},Symbol.toStringTag,{value:"Module"}));const hw=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],pw=ve("video",hw),FM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:hw,default:pw},Symbol.toStringTag,{value:"Module"}));const mw=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],gw=ve("wifi-off",mw),UM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:mw,default:gw},Symbol.toStringTag,{value:"Module"}));const yw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ci=ve("x",yw),HM=Object.freeze(Object.defineProperty({__proto__:null,__iconNode:yw,default:ci},Symbol.toStringTag,{value:"Module"})),FS="termdock:secure-ready";let dd="ready";const ud=new Set;function Ls(e){if(e!==dd){dd=e;for(const t of ud)t();e==="ready"&&window.dispatchEvent(new Event(FS))}}function ww(){return y.useSyncExternalStore(e=>(ud.add(e),()=>{ud.delete(e)}),()=>dd)}function bw(e){const t=e instanceof Error?e.message:String(e);return/^(Secure connection closed|Secure connection timed out|Secure request closed|Secure response ended unexpectedly|Encrypted connection unavailable|Encrypted transport disconnected|Secure transport unavailable|Secure handshake timed out|WebSocket closed|WebSocket connection failed)$/.test(t)}const US={architecture:{choosePaths:"Choose folders or files",browsePaths:"Browse",addScopeReference:"Add to analysis scope",searchScopePaths:"Search files or folders",useCurrentFile:"Use current file",useCurrentDirectory:"Use current folder",browsePathsHint:"Expand folders to browse. Use the reference button on a row to add it to the analysis scope.",correctPathsFirst:"Correct the entered paths before adding more scope.",pathsHint:"Choose scope or paste file/line references. Paths are relative to this project.",featureScopeHint:"Locate this feature within the selected scope first",removePath:"Remove path",chooseThisDirectory:"Select this folder",filterDirectory:"Filter this folder",loadingPaths:"Loading folder…",pathsLoadFailed:"Could not read this folder. Check connection or access, then retry.",noPaths:"No matching files or folders here.",pathsTruncated:"This folder has too many entries to show at once. Open a subfolder or paste its path directly.",selectedPaths:"Selected paths",usePaths:"Use selected scope",expandDetail:"Read module details",collapseDetail:"Collapse module details",backToMap:"Back to map",backToModule:"Back to module",previousModule:"Previous module",parentModule:"Back to parent",viewPrepared:"View this analysis",closeDetail:"Close module details",connections:"Connections",outgoing:"To",incoming:"From",browseMode:"Browse mode",outlineMode:"Module details",graphMode:"Relationship diagram",analysisNotes:"Analysis notes",limitations:"Scope and limitations",analyzedPaths:"Analyzed sources",fitGraph:"Fit entire diagram",fullscreen:"Open fullscreen diagram",closeFullscreen:"Close fullscreen diagram",panHint:"Drag to pan, pinch to zoom; select a module for details",newAnalysis:"New analysis",updateAnalysis:"Update current analysis",closePreparation:"Close analysis settings",analysisRange:"Analysis scope",projectRange:"Entire project",moduleRange:"Directory / module",featureRange:"Feature flow",modulePaths:"Module paths (one per line)",modulePlaceholder:"Choose folders/files or paste existing references, one per line",featureTarget:"Feature to understand",featurePlaceholder:"For example: file upload from selecting a file to storage",invalidPaths:"Choose up to 20 project folders/files or paste their references; outside paths and .. are not allowed.",requiredFeature:"Describe a specific feature and check that optional starting paths are project-relative.",independentHint:"Scoped analyses are saved separately. Repeating the same scope updates its map; the entire project uses the project overview.",updateOnly:"Only this analysis will be updated. Other maps are preserved.",analysisOptions:"Dependencies and other options",dependencyDepth:"Dependency tracing",boundaryDepth:"Scope boundary (faster)",followDepth:"Follow relevant calls and dependencies",startPaths:"Feature scope (optional)",focus:"Analysis request and constraints (optional)",focusPlaceholder:"For example: explain permission checks and retries; skip styling.",savedAnalyses:"Saved analyses",libraryFailed:"Could not list analyses. The current map is still available. Refresh to retry.",awaitingFile:"This analysis has not been saved yet. Send the prepared prompt to your Agent; the result will appear after the file is saved.",analyzeModule:"Analyze this module in detail",scopeUnavailable:"This scoped map is missing analysis metadata. Create a new analysis to specify its boundaries.",tab:"Map",title:"Code architecture",generate:"Generate",update:"Update",refresh:"Refresh architecture",prepare:"Prepare architecture analysis",promptHint:"Use the Agent in this project's terminal to analyze the code. The prompt goes into the current input or context draft for you to review and send. This view refreshes when the architecture is saved. Open an Agent first; analysis uses its time and allowance.",insertPrompt:"Insert prompt",copyPrompt:"Copy prompt",previewPrompt:"Review analysis prompt",inserting:"Adding to the current input…",insertFailed:"Could not add the prompt. Check the current session, or copy it below.",inserted:"Review the current input or context draft, then send it to your Agent.",copied:"Prompt copied.",failed:"Copy failed. Copy manually from the prompt below.",loading:"Reading project architecture…",invalid:"The architecture file is invalid. Analyze the project again to repair it.",loadFailed:"Could not read project architecture. Check connection and access, then retry.",previous:"The last successfully loaded architecture remains below.",retry:"Retry",empty:"Understand this project's architecture",emptyHint:"Start with the project, selected paths or one feature. A full project map is not required.",savedAt:"Saved",perspective:"Perspective",breadcrumb:"Architecture hierarchy",modules:"Modules",explore:"Explore submodules",sourceFiles:"Related source",diagram:"Architecture diagram",diagramHint:"Select a module for details",zoomOut:"Zoom out diagram",zoomIn:"Zoom in diagram",resetZoom:"Reset diagram zoom",download:"Download architecture SVG",downloadFailed:"Download failed. Please retry.",diagramFailed:"The diagram could not render. You can still explore the modules below.",rendering:"Drawing architecture…"},computer:{returnToDesktop:"Return to desktop",tools:"Control settings",closeTools:"Close control settings",keyboard:"Keyboard",keyboardInput:"Type directly on the computer",keyboardPlaceholder:"Tap to type directly on the computer",hideKeyboard:"Hide keyboard",keyboardNavigation:"Keyboard navigation",desktopZoom:"Desktop zoom",zoomIn:"Zoom in desktop",zoomOut:"Zoom out desktop",resetZoom:"Fit desktop to screen",pinchHint:"Pinch to zoom",keyEscape:"Send Esc",keyLeft:"Move left",keyDown:"Move down",keyUp:"Move up",keyRight:"Move right",keySelectAll:"Select all",clipboardTool:"Clipboard",zoom:"Zoom in",expand:"Full screen",switchTouchMode:"Switch touch mode",touchMode:"Touch mode",trackpadMode:"Trackpad",directTouchMode:"Direct touch",trackpadHint:"Slide to move, tap to click, hold to drag. Use two fingers to scroll or tap for right-click.",directTouchHint:"Tap a position on the screen to click. Drag your finger to interact with the desktop.",trustCertificateHere:"Trust this computer’s certificate",rememberLogin:"Remember login",autoConnect:"Connect automatically next time",forgetLogin:"Forget login",savedPassword:"Saved — leave empty to connect",loginExpired:"Saved login expired. Enter your password again.",loginSaveFailed:"Could not save or retrieve login details. Please retry.",title:"Computer control",host:"Computer address",hostPlaceholder:"192.168.1.20 or computer.local",username:"Username (optional)",password:"Password",passwordHint:"Enter the target computer’s VNC password. Include a username if the server requires account sign-in. Remember login encrypts credentials on the service after a successful connection.",connect:"Connect",disconnect:"Disconnect",cancel:"Cancel",connecting:"Connecting…",connected:"Connected",disconnected:"Disconnected. You can reconnect.",viewOnly:"View only",control:"Allow control",fit:"Fit to panel",actualSize:"Actual size",fullscreen:"Expand desktop",exitFullscreen:"Collapse desktop",setup:"How to connect a computer",step1:"On your Mac, open System Settings → General → Sharing → Screen Sharing.",step2:"Allow your user in Screen Sharing settings. For a VNC password, enable “VNC viewers may control screen with password”.",step3:"Enter a private computer address reachable from this service. To control the computer running this service, choose “This computer”.",networkHint:"Uses VNC port 5900. Browser-to-Termdock traffic is encrypted; use a trusted LAN or VPN for the VNC connection from the service to the target computer.",service:"Current service: {name}",remoteTitle:"Remote computer desktop",startHint:"Connect to view the desktop and control the computer with mouse, touch, and keyboard.",credentials:"Enter login credentials",authenticate:"Sign in",authFailed:"Sign-in failed. Check the username, password, and remote desktop permissions.",sharingOff:"VNC connection refused. Start desktop sharing and check port 5900.",unreachable:"Cannot reach the computer. Check the address, network, and firewall.",timeout:"Connection timed out. Make sure the target computer is awake and reachable from this service.",invalidHost:"Enter a private IP or hostname without a protocol or port.",privateOnly:"Only private or local addresses are supported. For remote access, switch to the Termdock service on the target computer.",permission:"This invitation does not authorize this computer or operation.",sharedViewUnsupported:"This VNC authentication method cannot be safely shared in view-only mode. Change the screen sharing authentication method and reconnect.",failed:"Connection failed. Please reconnect.",clipboard:"Send clipboard",clipboardPlaceholder:"Send text to the computer clipboard",clipboardHint:"Enter text and press {shortcut} to paste, or send it to the clipboard only. Character support depends on the target computer.",remoteClipboard:"Text copied on the computer",copyToDevice:"Copy to this device",clipboardCopied:"Copied to this device",clipboardAccessFailed:"System clipboard is unavailable. Enter text here to send, or select the received text and copy it manually.",clipboardSent:"Sent to computer clipboard",shortcuts:"Shortcuts",switchApps:"Switch apps",spotlight:"Spotlight search",desktop:"Show desktop",loading:"Loading computer control…",platform:"Target system",thisComputer:"This computer",otherComputer:"Another computer",target:"Computer to connect",localService:"Computer running the current Termdock service · {name}",advanced:"Advanced settings",rdpLoginHint:"Use the credentials from Remote Desktop settings.",vncLoginHint:"Use your screen sharing VNC password.",checkSettings:"Check connection settings",localHint:"Local means the computer running the current Termdock service. Enable the selected remote desktop protocol on the target first.",linuxStep1:"Ubuntu / Linux needs a VNC server. To share the current desktop with x11vnc, use an X11 session; select “Ubuntu on Xorg” at the Ubuntu login screen.",linuxStep2:"Set a VNC password and listen on port 5900. RDP-only desktop sharing cannot connect here.",linuxCommandHint:"Run these commands in a desktop terminal on the target, then enter the VNC password you set. This example only accepts connections from the service computer. Commands are not run automatically:",linuxProtocolHint:"Ubuntu 24.04’s built-in Remote Desktop uses RDP; this panel uses VNC. Wayland needs a VNC server compatible with the desktop. TigerVNC virtual desktops are separate sessions, not the current screen.",windowsStep1:"Install and start a compatible VNC server on Windows. Windows RDP Remote Desktop cannot connect here.",windowsStep2:"Set a VNC password, enable keyboard and mouse control, and allow this service to reach port 5900 through the firewall.",systemSearch:"System search",protocol:"Connection protocol",port:"RDP port",rdpUsername:"RDP username",domain:"Domain (optional)",rdpPasswordHint:"Use the RDP username and password configured in Remote Desktop settings. Ubuntu remote login credentials may differ from your system account. Remember login encrypts credentials on the service after a successful connection.",rdpBackendUnavailable:"RDP support is unavailable on this service. Complete the server-side RDP setup first.",rdpBackendRecovery:"Start the RDP backend (guacd) on the computer running this Termdock service, then refresh this page to check again. Connection settings are kept; you can also switch to VNC in advanced settings.",rdpFailed:"RDP connection failed. Check Remote Desktop, the port, and credentials. For a self-signed certificate, verify the computer’s identity before enabling certificate trust.",rdpLinuxStep1:"On Ubuntu, open Settings → System → Remote Desktop. Enable Desktop Sharing or Remote Login and configure RDP credentials.",rdpStep1:"Enable RDP on the target computer. On Windows, use Settings → System → Remote Desktop. Use VNC for built-in Mac Screen Sharing.",rdpStep2:"Enter the username, password, and port from Remote Desktop settings. The default RDP port is 3389; Ubuntu Desktop Sharing may use 3390. Verify the target before trusting a self-signed certificate.",rdpNetworkHint:"Display and input use the encrypted browser-to-Termdock channel. The current service connects to the target over RDP. Desktop Sharing and Remote Login may use different sessions; showing the current screen depends on the target service’s settings.",trustCertificate:"Trust this computer’s RDP certificate (skip verification)",settingsLoading:"Loading connection settings…",settingsSaving:"Saving settings…",settingsSaved:"Connection settings saved on this service.",settingsSaveFailed:"Settings could not be saved. Your edits are still on this page.",settingsLoadFailed:"Connection settings could not be loaded. Please retry.",retry:"Retry",retryConnect:"Retry connection",rdpCertificate:"The target computer’s RDP certificate could not be verified. After confirming the computer’s identity, trust its certificate below and retry.",clipboardFailed:"Failed to send clipboard. Try again."},app:{name:"Termdock"},android:{device:"Device",selectDevice:"Select device",noDevices:"No device found",closeTab:"Close device tab",refresh:"Refresh devices",connect:"Connect",disconnect:"Stop mirroring",addDevice:"Connect over network",addressPlaceholder:"ip:port, e.g. 192.168.1.20:5555",adbUnavailable:"adb (Android platform-tools) not found; mirroring is unavailable. macOS: brew install android-platform-tools; Ubuntu: sudo apt install adb; or set TERMDOCK_ADB_BIN in ~/.termdock/.env.",scrcpyUnavailable:"scrcpy / scrcpy-server not found; mirroring is unavailable. macOS: brew install scrcpy; Ubuntu: sudo apt install scrcpy; or set TERMDOCK_SCRCPY_BIN in ~/.termdock/.env.",connecting:"Connecting to device…",reconnecting:"Connection lost, reconnecting…",retrySchedule:"Retry {attempt} starts in {seconds} seconds",lastError:"Last error (retained while reconnecting)",retry:"Retry",idleHint:"Pick a device to start mirroring",noDevicesHint:"Connect a phone over USB with debugging enabled, or add a network device",back:"Back",home:"Home",recents:"Recents",notifications:"Notifications",rotate:"Rotate",volumeUp:"Volume up",volumeDown:"Volume down",power:"Power",zoomIn:"Zoom in",zoomOut:"Zoom out",zoomPanHint:"Two-finger drag to move the view",inputText:"Type text",inputPlaceholder:"Text to send to the phone",send:"Send",splitOpen:"Open in split view",splitClose:"Exit split view",splitDockedHint:"Mirroring is shown in the split area.",splitDrag:"Drag to reposition",insertFixPrompt:"Insert fix prompt",screenshot:"Screenshot and insert",recordingStart:"Start recording",recordingStop:"Stop recording",recording:"Recording…",recordingLimit:"Reached the 5-minute limit, recording stopped",recordingStopped:"Mirroring stopped, recording ended",captureInserted:"Screenshot inserted",recordingInserted:"Recording inserted",recordingConfirm:"Recording finished. What next?",recordingInsert:"Insert directly",recordingSave:"Save to a folder",recordingSaveHint:"The recording is ready. Add it to the current input or save it to a folder.",recordingDiscard:"Discard recording",captureInserting:"Inserting…",recordingSaving:"Saving recording…",captureFailed:"Insert failed",captureUnavailable:"Cannot add right now. Check that this session allows input.",more:"More",fullscreen:"Fullscreen",fillSidebar:"Fill sidebar",exitFullscreen:"Exit fullscreen",fullscreenHint:"Mirroring is shown in fullscreen.",quality:"Quality",qualityAutoHint:"Adapts bitrate to connection and decoding performance without reconnecting. Resolution stays stable; controls and server recording are unaffected.",qualityAutoUnavailable:"Automatic bitrate adjustment paused; video stays connected.",qualityAutoVersionError:"Server scrcpy version is not supported (details).",qualityAutoBuildError:"Server scrcpy build has not been verified (details).",qualityAutoExtensionError:"Bitrate extension could not be read, verified or transferred (details).",qualityAutoTimeoutError:"Bitrate confirmation timed out; encoder support is unknown (details).",qualityAutoEncoderError:"Device encoder rejected this adjustment (details).",qualityAutoChannelError:"Bitrate control channel failed (details).",qualityAutoUnknownError:"Server did not provide a reason; update that server and retry (details).",qualityLow:"Smooth",qualityMedium:"Standard",qualityHigh:"HD",qualityCustom:"Custom",qualityResolution:"Resolution",qualityBitRate:"Bitrate",qualityFrameRate:"Frame rate",qualityAuto:"Auto",qualityApply:"Apply",presetNamePlaceholder:"Preset name",presetSave:"Save preset",presetDelete:"Delete preset",stateUnauthorized:"unauthorized",stateOffline:"offline",stateUnknown:"unknown state",unauthorizedHint:"Confirm the USB debugging prompt on the phone.",offlineHint:"Device is offline; reconnect the cable or network device."},common:{cancel:"Cancel",close:"Close",save:"Save",reset:"Reset",loading:"Loading…",error:"Error",retry:"Retry",refresh:"Refresh",search:"Search",clear:"Clear",delete:"Delete",on:"On",off:"Off",back:"Back",copy:"Copy",decrease:"Decrease",increase:"Increase",use:"Use",previous:"Previous",next:"Next"},login:{prompt:"termdock login",placeholder:"Enter password",placeholderBlocked:({s:e})=>`Please wait ${e}s`,submit:"Sign in",invalidPassword:"The password is incorrect, or the service identity could not be verified. Check and try again.",identityMismatch:"The service identity has changed. Check the address with its owner before trying again.",unavailable:"Password sign-in is temporarily unavailable. Check the connection and try again.",authorizationRequired:"This device needs authorization. Ask the service owner for a new invitation.",passwordNotConfigured:"The target service has no access password, and this device is not authorized. Ask the target service owner for an invitation or device authorization, then reconnect.",targetPasswordRequired:"Relay access is disabled because the target service has no valid access password. Ask the target service owner to configure one first.",securityUpgradeRequired:"Relay password protection cannot be verified. Update the target service and relay before connecting.",viaEntry:({entry:e,address:t})=>`Via relay ${e} (${t}). Use the target service password.`,currentTarget:({address:e})=>`Signing in to ${e}`,manageServices:"Manage services / use another address",failed:"Could not sign in. Check the connection and try again.",rateLimited:"Too many attempts. Please wait and try again.",continueAfterReconnect:"You can continue signing in when the network returns.",savedConnectionRetained:"Saved service retained. Access will be checked after reconnecting.",invalidAddress:"Enter a valid HTTPS service address, for example computer.example:9834 or https://computer.example:9834.",invalidInvitation:"This invitation is incomplete or invalid. Copy the full invitation link and try again."},sidebar:{sessionCreating:"Starting…",sessionCreateWaiting:"Still waiting for the service…",sessionCreateElapsed:"{seconds}s",sessionCreateContinue:"You can keep using your current session.",sessionCreateDirectoryUnavailable:"The working directory is unavailable. Choose another folder and try again.",sessionCreatePermissionDenied:"You do not have permission to start here. Choose another folder.",sessionCreateConnectionFailed:"Could not connect. Check the connection and try again.",sessionCreateFailed:"Could not start the session. Please try again.",sessions:"Sessions",noSessions:"No open sessions yet.",noMatchingSessions:"No matching sessions.",toggleSearch:"Toggle search",settings:"Settings",moreActions:"More actions",subscriptionQuota:"Subscription quota",collapseSessions:"Collapse session list",expandSessions:"Expand session list",collapseTools:"Collapse tools panel",expandTools:"Expand tools panel",runningSessionButton:"Running sessions button",runningSessionButtonHint:"Tap to cycle, swipe sideways to select, hold to drag",attentionButton:"Attention button",attentionButtonHint:"Show the yellow floating bell for unread or pending sessions",updateAvailable:({version:e})=>`Termdock ${e} is available`,updateInstalling:"Installing in the background without interrupting this service.",updateReady:"The update is installed and ready for a confirmed restart.",updateRestart:"Restart and finish update",updateRestartConfirm:({version:e})=>`Restart Termdock and switch to ${e}? This page will reconnect briefly and sessions will stay open.`,updateRestarting:"Restarting; this page will reconnect automatically…",updateFailed:"Automatic installation failed. This reminder will remain.",updateRetry:"Try again",serverAttention:"The service had a problem",filterSessions:"Filter sessions",clearSearch:"Clear search",groupByFolder:"Group by folder",groupByFolderTitle:"Collapse sessions into groups by working directory. Mutually exclusive with drag sorting.",ungrouped:"Other",needsAttention:"Needs attention",waitingForYou:"Waiting for you",completedUnread:"Completed · unread",closeSession:({name:e})=>`Close ${e}`,newShell:"Shell",newTmux:"Tmux",newTmuxDisabled:"tmux not available on server",confirmNewShell:"Create Shell?",confirmNewTmux:"Create Tmux?",newSession:"New terminal",newSessionWithAgent:({agent:e})=>`New ${e}`,moreLaunchOptions:"More launch options",recoverableSessions:"Recoverable sessions",confirmCloseRecoverableSession:({name:e})=>`End ${e}? This stops all processes in the session.`,endRecoverableSession:"End session",closeRecoverableSessionFailed:"Could not end the session. Please retry.",refreshRecoverableSessions:"Refresh recoverable sessions",restoreRecoverableSession:({name:e})=>`Restore ${e}`,restoringRecoverableSession:"Restoring…",restore:"Restore",newSessionAdvanced:"Quick-launch agent",newSessionComposerTitle:"Start a session",newSessionHint:"Choose how and where it starts",launchSessionWith:({name:e})=>`Start ${e}`,setNewSessionDefault:({name:e})=>`Set ${e} as default`,currentNewSessionDefault:({name:e})=>`${e} is the current default`,currentDefaultAgent:({name:e})=>`Current default: ${e}`,defaultAgent:"Default",makeDefault:"Make default",sessionMode:"Run mode",tmuxKeepsRunning:"Keeps running after disconnect",resumeHistory:"Recent conversations",resumeHistoryCount:({n:e})=>`${e} saved`,resumeHistoryLoading:"Loading recent Agent conversations…",resumeHistoryAction:({title:e})=>`Resume ${e}`,resumeHistoryRemove:({title:e})=>`Remove ${e} from recent conversations`,resumeHistoryLoadFailed:"Could not load recent Agent conversations.",resumeHistoryFailed:"Could not prepare this Agent conversation for resume.",resumeHistoryRemoveFailed:"Could not remove the conversation from history.",customStartupCommand:"Custom command",changeStartupCommand:"Change startup command",saveStartupCommand:"Save command",commandPreset:"Command preset",commandPresetName:"Preset name",agentDefaultCommand:"Agent original command",addAgentCommand:"+ Add command preset…",currentAgentCommand:"Current custom command",sharedAgentCommandsHint:"Shared by Todos and new sessions in this browser. Existing task configurations keep their commands.",startupCommandSaved:"Saved",saveStartupCommandFailed:"Could not save. Check browser storage permissions.",addStartupCommand:"Add custom command…",deleteStartupCommand:"Delete command",startupCommand:"Startup command",resetStartupCommand:"Reset",startupCommandPlaceholder:"e.g. vim, htop or npm run dev",agentStartupCommandHint:"Edit the full command; leave blank for the Agent default. Saved in this browser.",terminalStartupCommandHint:"Run a program in the selected directory, e.g. vim README.md. Saved in this browser.",workingDirectory:"Working directory",directoryPlaceholder:"Enter a directory path",browseDirectories:"Browse",hideDirectoryBrowser:"Hide browser",chooseDirectory:"Choose working directory",directoryPickerHint:"Open a folder, then confirm the current location.",useThisFolder:"Use folder",recentDirectories:"Recent directories",startCommand:"Start command",customCommand:"Other command",commandPlaceholder:"Optional, e.g. codex",detectAgents:"Detect agents again",savePreset:"Save as preset",createAndRun:"Create and run",createSession:"Create terminal",openLeftSidebar:"Open left sidebar",openRightSidebar:"Open right sidebar",closeSidebar:"Close sidebar"},rightSidebar:{workspace:"Workspace",currentProject:"Project",browsingLocation:"Browsing",parentFolder:"Parent folder",backToProjectRoot:"Back to project",refreshFiles:"Refresh current folder",resizeFileTree:"Drag to resize file browser",pinCurrentFolder:"Pin current folder to this project",unpinCurrentFolder:"Unpin current folder",showHiddenFiles:"Show hidden files",hideHiddenFiles:"Hide hidden files",hideGitIgnoredFiles:"Hide Git-ignored files",showGitIgnoredFiles:"Show Git-ignored files",gitIgnoreSaveFailed:"Could not save Git ignore visibility. Please retry.",gitIgnoreConfigureHint:"Long-press or right-click to configure exceptions",gitIgnoreExceptionsTitle:"Git ignore filter exceptions",gitIgnoreExceptionsHint:"Select files or folders to keep visible while filtering is enabled. Use the arrow beside a folder to browse inside it. Selected folders include all descendants; parent folders of selected files stay visible. Save to apply.",gitIgnoreExceptionsPaths:"Select files or folders",gitIgnoreExceptionsInvalid:"Select up to 200 files or folders.",gitIgnoreExceptionsLoadFailed:"Could not load this folder. Please retry.",gitIgnoreExceptionsEmptyDirectory:"This folder is empty",gitIgnoreExceptionsOpenDirectory:({name:e})=>`Open folder ${e}`,gitIgnoreExceptionsSelected:({count:e})=>`${e} selected`,gitIgnoreExceptionsClear:"Clear selection",gitIgnoreExceptionsRemove:({path:e})=>`Remove ${e}`,gitIgnoreExceptionsTruncated:"This folder has too many entries; only some are shown.",gitIgnoreExceptionsSaveFailed:"Could not save. Check that all paths are inside the current folder (up to 200), then retry.",insertCurrentFolder:"Insert current folder reference",insertCurrentFolderShort:"Insert",pinnedFolders:"Pinned",unpinFolder:({name:e})=>`Unpin ${e}`,fileWatchUnavailable:({message:e})=>`File watcher unavailable: ${e}. Click to refresh manually.`,browsingOutsideProject:"Browsing outside current project",browsingOutsideProjectHint:"Git and Changes still use the current project. File references from here are inserted as external paths.",toggleSearch:"Toggle search",refreshGit:"Refresh Git status",gitLastUpdated:({time:e})=>`Last updated: ${e}`,close:"Close",filterChanges:"Filter changes or files",searchPlaceholderContent:"Search text in files…",searchModeName:"File",searchModeContent:"Content",clearSearch:"Clear search",searchScope:"Scope",searchScopePlaceholder:"Relative folder or absolute path",resetSearchScope:"Reset to current folder",searchOptions:"Search options",searchExclude:"Exclude",searchExcludePlaceholder:"dist/**, *.lock",clearSearchExclude:"Clear exclusions",contentSearchOptions:"Content search options",matchCase:"Match case",matchWholeWord:"Whole word",useRegex:"Regex",insertGitContext:"Insert current Git context into terminal",copyGitContext:"Copy Git context",insertChangeAuditPrompt:"Explain changes",insertChangeAuditPromptTitle:"Insert the change audit prompt into the current session",changeAuditShort:"Explain changes",changeAuditLoading:"Loading hunk explanations…",changeAuditLoaded:({count:e})=>`${e} hunk explanation${e===1?"":"s"} loaded`,changeAuditLoadedAt:({time:e})=>`Generated ${e}`,changeAuditRegenerate:"Regenerate",changeAuditRefreshStale:"Fill stale",changeAuditRefreshStaleTitle:"Insert a prompt to refresh stale hunk explanations",clearChangeAudit:"Clear change explanations",clearChangeAuditTitle:"Clear hunk explanations for the current repository",changeAuditClearFailed:({message:e})=>`Failed to clear hunk explanations: ${e}`,changeAuditScopeAll:"All repositories",changeAuditScopeLabel:"Explain scope",branchAuditTitle:"Branch explanation",branchAuditShort:"Explain branch changes",branchAuditBaseLabel:"Base branch",branchAuditBasePlaceholder:"Base branch, e.g. master",branchAuditBaseSearchPlaceholder:"Search base branch",branchAuditBaseEmpty:"No branch options. Type a branch name directly.",branchAuditGenerate:"Generate",branchAuditRegenerate:"Regenerate",branchAuditGenerateTitle:"Insert a prompt to explain this branch against the base branch",branchAuditViewDiff:"View diff",branchAuditViewDiffTitle:"View target branch changes against the base branch",branchAuditDiffLoading:"Loading branch diff...",branchAuditDiffEmpty:"No changes between this branch and the base branch.",branchAuditMissingBase:({repo:e})=>`${e} has no base branch set`,branchAuditRefreshDiff:"Refresh diff",branchAuditRefreshStale:"Fill stale",branchAuditRefreshStaleTitle:"Insert a prompt to refresh stale branch explanations",branchAuditClearTitle:"Clear current branch explanation",branchAuditClearFailed:({message:e})=>`Failed to clear branch explanation: ${e}`,branchAuditCommitCount:({count:e})=>`${e} commit${e===1?"":"s"}`,branchAuditFileCount:({count:e})=>`${e} file${e===1?"":"s"}`,branchAuditTruncated:"diff truncated",branchAuditCurrent:"Saved explanation",branchAuditStale:"Explanation is stale",branchAuditEmpty:"No branch explanation yet. Generate one to persist it here for later review.",branchAuditView:"View explanations",branchAuditSaved:({count:e})=>`${e} hunk explanation${e===1?"":"s"} saved`,branchAuditGeneratedAt:({time:e})=>`Generated ${e}`,insertPreset:({label:e})=>`Insert: ${e}`,tabChanges:"Changes",tabGit:"Git",tabFiles:"Files",tabAndroid:"Device",tabComputer:"Mac",showAndroidTab:"Show device tab",showArchitectureTab:"Show architecture tab",showComputerTab:"Show computer tab",inserted:"Inserted",copied:"Copied",toggleContextDraft:"Toggle context draft",contextDraftTitle:"Context draft",contextDraftHint:"References are added here while enabled. Keep browsing, add instructions, then insert once.",contextDraftPlaceholder:"Compose a longer prompt here. Keep using sidebar references to add context…",contextDraftCollapse:"Collapse context draft",contextDraftExpand:"Expand context draft",contextDraftDisable:"Disable context draft",contextDraftClear:"Clear draft",contextDraftInsert:"Insert",contextDraftInsertAndSend:"Insert & send",contextDraftInserted:"Inserted",contextDraftSent:"Sent",contextDraftSend:"Send draft",contextDraftAppended:"Reference added",contextDraftResize:"Drag to resize, double-click for default height",contextDraftAutoCollapseAfterSend:"Collapse after insert/send",referenceInsertFailed:"Could not insert. Check the target terminal connection and retry.",contextDraftInsertFailed:"Input not accepted — draft kept. Close the active form or return to the terminal and retry.",contextDraftPending:"Waiting…",contextDraftCharacterCount:({count:e})=>`${e} chars`,selectFilePrompt:"Select a file to preview its contents",backToFileList:"Back to file list",backToPreviousPreview:"Back to source document",insertLineRef:({lineLabel:e})=>`Insert ${e}`,insertFileRef:"Insert",copyFileRef:"Copy file reference",findInFile:"Find in file",findInFilePlaceholder:"Find in this file…",previousSearchMatch:"Previous match",nextSearchMatch:"Next match",closeFileSearch:"Close file search",downloadFile:"Download file",downloadFailed:"Download failed",downloadCanceled:"Download canceled",downloadSaved:"File saved",downloadStarted:"Browser download started",uploadPending:"Uploading…",uploadInserting:"File uploaded · waiting for input acceptance…",uploadDone:({count:e})=>`${e} files uploaded`,uploadReferenceDone:"File uploaded · reference added",uploadReferenceRejected:"File uploaded; reference not added. Close the active form or return to the original terminal and retry.",uploadLimit:"Choose up to 50 files. None were uploaded; select a smaller batch.",uploadCanceled:"Upload stopped. Check the target directory before uploading again.",uploadFileCount:({count:e})=>`${e} selected files`,uploadFile:"Upload file",uploadFiles:"Upload files",insertLocalFile:"Insert local file",insertLocalImage:"Insert local image",layoutMode:"Display mode",layoutModeAuto:"Auto",layoutModeNarrow:"Narrow",layoutModeWide:"Wide",dropToUpload:"Drop files to upload",uploading:"Uploading…",uploadSuccess:({count:e})=>`${e} file${e===1?"":"s"} uploaded`,uploadFailed:"Upload failed",binaryPreviewHint:"Binary files cannot be previewed. Use the download button above to save it.",selectedLineHint:({lineLabel:e})=>`Selected ${e} · tap "Insert" below to add to terminal`,multiLineHint:"Multi-line select: tap start line, then end line",loadingImage:"Loading image…",imagePreviewHint:"Pinch or ⌘/Ctrl + scroll to zoom · double-tap to reset",imageLoadFailed:"Failed to load image preview",loadingVideo:"Loading video…",videoPreviewHint:"Click to play · hold 2× and drag forward to speed up · arrows seek/volume · space pauses",videoLoadFailed:"Failed to load video preview",videoUnsupported:"Your browser does not support this video format",videoPlay:"Play",videoPause:"Pause",videoLongPressSpeed:({rate:e})=>`Playing at ${e}×`,videoVolume:({percent:e})=>`Volume ${e}%`,videoRotate:"Rotate 90° clockwise",videoFullscreenEnter:"Enter fullscreen",videoFullscreenExit:"Exit fullscreen",model3dLoading:"Loading 3D model…",model3dExplode:"Exploded view",model3dExplodeAxis:"Explosion axis (viewer coordinates)",model3dExplodeAmount:"Explosion amount",model3dHome:"Reset view",model3dFit:"Fit visible parts",model3dFront:"Front view",model3dTop:"Top view",model3dRight:"Right view",model3dAssemble:"Restore assembly",model3dExplodedNotice:"Exploded · dimensions and references remain assembled",model3dLoadFailed:"Failed to load 3D model preview",model3dTimeout:"3D model transfer timed out. Check your connection and retry.",model3dDimensions:({dims:e})=>`Dimensions: ${e}`,model3dHintMouse:"Drag to orbit · two-finger pan · pinch or scroll to zoom",model3dHintTouch:"One finger to orbit · two fingers to zoom & pan",model3dFullscreenEnter:"Fullscreen",model3dFullscreenExit:"Exit fullscreen",model3dBgToLight:"Light background",model3dBgToDark:"Dark background",model3dRefresh:"Reload model",model3dClipToggle:"Section view",model3dClipPosition:"Section position",model3dClipFlip:"Flip section direction",model3dFeatureToggle:"Features",model3dFeatureStatus:({total:e,positioned:t})=>`Features: ${e} · positioned ${t}`,model3dFeatureInsert:"Insert reference",model3dGlossaryToggle:"Modeling terms",model3dPickToggle:"Select part / reference",model3dPickHint:"Select a part to hide it or insert a point reference",model3dHidePart:"Hide part",model3dShowAllParts:({count:e})=>`Show all (${e})`,model3dParts:"Parts",model3dCloseParts:"Close parts",model3dSearchParts:"Find a part",model3dClearPartSearch:"Clear part search",model3dHiddenParts:({count:e})=>`${e} hidden`,model3dShowNamedPart:({name:e})=>`Show ${e}`,model3dHideNamedPart:({name:e})=>`Hide ${e}`,model3dIsolateNamedPart:({name:e})=>`Only show ${e}`,model3dIsolatePart:"Only this part",model3dShowPart:"Show part",model3dNoParts:"No matching parts",model3dUndoVisibility:"Undo",model3dClearSelection:"Clear selection",model3dAllPartsVisible:"All parts visible",model3dInspectHint:"Drag to orbit · double-tap to zoom · double-tap empty space to fit",model3dUnnamedPart:({index:e})=>`Part ${e}`,model3dCanvas:"3D model",model3dMore:"More model options",edaLoading:"Rendering KiCad file…",reviewTargetChanged:"The active session changed. Return to the original session before inserting this reference.",reviewReference:"Review reference",reviewReferenceHint:"Add context, then insert. Nothing is sent automatically.",reviewSnapshot:"Snapshot of the selected viewer",reviewCapturing:"Capturing this view…",reviewIncludeImage:"Include snapshot (stored temporarily on this server)",reviewCaptureFailed:"Snapshot unavailable; location can still be inserted.",reviewNote:"Your comment (optional)",reviewNotePlaceholder:"What should change here?",reviewDetails:"View location and quoted content",reviewUploading:"Preparing reference…",reviewAddToDraft:"Add to context draft",reviewInsert:"Insert reference",reviewUploadFailed:"Could not prepare the reference. Your comment is kept. Retry, or uncheck the snapshot to insert text only.",edaLoadFailed:"Failed to render KiCad preview",edaTimeout:"KiCad preview rendering or transfer timed out. Please retry.",edaRefresh:"Render again",edaPickHint:"Click a schematic or PCB location to create an electronics annotation",edaPickedPosition:({x:e,y:t})=>`Selected ${e}%, ${t}%`,edaPickedBoardPosition:({x:e,y:t,object:n})=>`Board ${e}, ${t} mm · ${n}`,edaInspecting:"Reading board coordinates and nearby object…",edaNoNearbyObject:"No nearby object",edaInsertAnnotation:"Insert electronics annotation",csvUnnamedColumn:({index:e})=>`Column ${e}`,csvSelectedCell:({row:e,column:t})=>`Row ${e} · ${t}`,csvPickHint:({rows:e,columns:t})=>`${e} records · ${t} columns; click a cell to reference`,csvInsertAnnotation:"Insert table annotation",csvTablePreview:"Table preview: select a cell to reference its record",kicadLocalStateNotice:"This is local UI state and is not part of schematic, PCB, or manufacturing review.",kicadShowRawJson:"Show raw JSON",kicadProjectPickHint:"Select a setting to insert a reference",kicadInsertSetting:"Insert setting",markdownPreview:"Preview",markdownSource:"Source",markdownParseFailed:"Markdown preview parsing failed or exceeded its limits. Showing the source text.",markdownPreviewHint:"Tap a line/section to reference, tap another to extend; drag the left rail to select a range",htmlPreview:"Preview",htmlSource:"Source",htmlPreviewHint:"Sandboxed iframe preview; scripts run sandboxed",htmlFullscreenEnter:"Enter fullscreen preview",htmlFullscreenExit:"Exit fullscreen preview",markdownOutline:"Markdown outline",markdownOutlineShort:"Outline",closeMarkdownOutline:"Close outline",changedFromPath:({path:e})=>`from ${e}`,selectedLineFooter:({lineLabel:e})=>`Selected ${e}`,clearSelection:"Clear",allChanges:"All changes",backToChangeList:"Back to list",allRepositories:"All repositories",allRepositoriesShort:"All",repositories:"Repositories",gitRepositorySectionTitle:"Repository",gitRepositoryLabel:"Repository",gitRepositoryPlaceholder:"Select repository",gitRepositorySearchPlaceholder:"Search repositories",gitRepositoryEmpty:"No available repositories",selectRepositoryForGitActions:"Select a repository before running Git actions",selectRepositoryForDiff:"Select a repository or file to view diff",repoNotLoaded:"Tap to load",repoChangedCount:({count:e})=>`${e} change${e===1?"":"s"}`,repoStagedCount:({count:e})=>`${e} staged`,noChanges:"No changes",noMatchingChanges:"No matching changes",loadingGitChanges:"Loading Git changes…",loadingGitChangesSlow:"Large repositories can take a few seconds.",refreshingGitChanges:"Refreshing Git changes…",gitChangesLoadFailed:"Unable to load Git changes",retryGitChanges:"Retry",insertThisFile:"Insert this file reference into terminal",viewDiff:"View diff",diffViewMode:"Change file display mode",diffViewModeList:"Flat list",diffViewModeTree:"Folder tree",diffViewModeAi:"AI walkthrough",changeWalkthroughEmpty:"No AI walkthrough yet. Generate explanations to show the overview, flow, and checks here.",gitInfo:"Git context",wrapLongLines:"Wrap long lines",wrapOn:"Wrapped",wrapOff:"Raw",multiRepoScan:"Scan sub-repos",multiRepoScanTitle:"Scan this workspace for nested Git repositories. Off keeps a single-repo view, which opens much faster on large repos.",horizontalScrollHint:"Swipe left/right to see the full diff",stageFile:"Stage",stageAll:"Stage all",unstageFile:"Unstage",stashFile:"Stash",stashAll:"Stash all",restoreFile:"Restore",gitQuickActions:"Git Actions",gitUnavailable:"Current directory is not a Git repository",branchSectionTitle:"Current branch",currentBranchLabel:"Branch",switchBranchPlaceholder:"Select branch",switchBranchSearchPlaceholder:"Search local branch",switchNoBranches:"No local branches",switchBranch:"Switch",noStagedChangesShort:"no staged",stagedCount:({count:e})=>`${e} staged`,stagedCountShort:({count:e})=>`${e} staged`,commitSectionTitle:"Commit",commitReadyHint:({count:e})=>`${e} file${e===1?"":"s"} ready`,commitMessagePlaceholder:"Commit message",commitChanges:"Commit",commitNeedsStaged:"Stage changes before committing",commitAhead:"↑ Unpushed",commitBehind:"↓ Incoming",commitSynced:"Synced",recentCommitsTitle:"Recent commits",recentCommitsSearchPlaceholder:"Search commit hash or message",recentCommitsLoadMore:"Load more commits",recentCommitsEmpty:"No commit history",pushSectionTitle:"Remote sync",pushRemoteLabel:"Remote",pushRemotePlaceholder:"origin",pushRemoteSearchPlaceholder:"Search remote",pushNoRemotes:"No remotes",pushBranchLabel:"Target",pushBranchPlaceholder:({branch:e})=>`${e}`,pushBranchSearchPlaceholder:"Search branch",pushNoBranches:"No branches",pushUpstreamBadge:"upstream",pushCurrentBranchBadge:"current",pushNoUpstream:"No upstream configured",pushUpToDate:"Up to date with remote",pushAheadCount:({count:e})=>`${e} commit${e===1?"":"s"} to push`,pushBehindCount:({count:e})=>`${e} commit${e===1?"":"s"} to pull`,pushDivergedCount:({ahead:e,behind:t})=>`${e} ahead / ${t} behind`,pullChanges:"Pull",pushChanges:"Push",gitActionRunning:"Running…",gitActionFailed:({message:e})=>`Git action failed: ${e}`,confirmRestoreTitle:"Discard changes?",confirmRestoreDescription:({path:e})=>`This will discard unstaged changes in ${e}. Termdock cannot recover them.`,confirmRestorePhrase:"discard changes",confirmRestorePlaceholder:"Type “discard changes” to confirm",confirmStashAllTitle:"Stash all changes?",confirmStashAllDescription:"This moves current working tree changes, including untracked files, into a stash.",confirmAction:"Confirm",renderingHtml:"Rendering HTML…",footnotes:"Footnotes",backToFootnote:({index:e})=>`Back to footnote ${e}`,openMermaidDiagram:"Open Mermaid diagram",mermaidDiagram:"Mermaid diagram",renderingDiagram:"Rendering diagram…",markdownImage:"Markdown image",image:"Image",previousImage:"Previous image",nextImage:"Next image",closeImagePreview:"Close image preview",emptyFile:"Empty file.",insertReference:({reference:e})=>`Insert reference: ${e}`,copyReference:({reference:e})=>`Copy reference: ${e}`,byteCount:({count:e})=>`${e} bytes`,previewTruncated:"Preview truncated to 1 MB",branchCandidatesLoading:"Loading branch candidates…",includeUncommitted:"Include local uncommitted changes",includeUncommittedCurrentBranchOnly:"Available only when the compared branch is checked out",includeUncommittedHint:"Include working tree and untracked diffs when viewing or explaining changes",missingBaseReposSkipped:({repositories:e})=>`Repositories without a base branch will be skipped: ${e}`,localBranch:"local",remoteBranch:"remote"},fileTree:{insertRef:"Insert",insertRefTitle:"Insert file reference into active terminal",openDirRoot:"Open",openDirRootTitle:"Use this folder as the current browsing root",openInFileBrowser:"Reveal in Finder",openInFileBrowserTitle:"Open this item in the system file browser",openInFileBrowserFailed:"Failed to open file browser",moreDirActions:"More folder actions",searchFromDir:"Search from here",searchFromDirTitle:"Search only this folder and its descendants",pinDir:"Pin",pinDirTitle:"Pin this folder to the current project",unpinDir:"Pinned",unpinDirTitle:"Unpin this folder",pinFileTitle:"Pin this file to the current project",unpinFileTitle:"Unpin this file",pinFile:"Pin",unpinFile:"Unpin",moreFileActions:"More file actions",deleteFile:"Delete file",deleteFileConfirm:({name:e})=>`Delete “${e}”? This action cannot be undone.`,deleteFileFailed:({message:e})=>`Failed to delete file: ${e}`,noWorkingDir:"No working directory detected.",emptyDir:"Empty directory.",noMatchingFiles:"No matching files.",searching:"Searching files…",searchingWithCount:({count:e})=>`Searching… ${e} found`,searchResults:({count:e})=>`${e} results`,searchScope:"Search scope",searchTruncatedHint:({count:e})=>`Fallback search scanned a large directory and stopped after ${e} matches. Install ripgrep or refine the query for complete results.`,searchStillRunning:"Search is still running. More results will appear automatically.",showingSearchResults:({shown:e,total:t})=>`Showing ${e} of ${t}`,loadMoreSearchResults:({shown:e,total:t})=>`Show more (${e}/${t})`,contentMatchesCount:({count:e})=>`${e} file${e===1?"":"s"} with matches`,moreMatches:({count:e})=>`+${e} more match${e===1?"":"es"}`,noContentMatches:"No matches found in file contents.",contentSearchNeedsRipgrep:"Content search requires ripgrep (rg). Install it on the server to search inside files.",truncatedHint:"Showing first 1000 entries. Use search or open a smaller folder for better performance.",dropToUploadHere:"Upload here",symbolicLink:"Symbolic link",sortByModified:"Sort by recent changes",sortByName:"Sort by name",sortedByModified:"Sorted by recent changes"},diffViewer:{noFileChanges:"No changes in this file.",noUnstagedChanges:"No unstaged changes.",emptyHint:"Make some changes, or pull from a remote.",loading:"Loading diff…",insertAllDiff:"Insert current diff as context",insertFileDiff:"Insert this file's diff",insertHunkDiff:"Insert this hunk",insertLineDiff:"Insert the selected diff lines",insertHunkShort:"Insert",insertFileShort:"Insert",insertAllShort:"Insert all",stageHunk:"Stage",stageHunkTitle:"Stage only this hunk (git apply --cached)",revertHunk:"Revert",revertHunkTitle:"Revert this hunk in the worktree (cannot be undone)",revertHunkConfirm:"Confirm revert?",hunkActionReverted:"Reverted",hunkActionStaged:"Staged",hunkActionApplying:"Applying…",hunkActionUnavailable:"Cannot build a patch for this hunk",hunkActionFailed:({message:e})=>`Failed: ${e}. If the changes moved on, refresh and retry.`,auditExplanation:"Change meaning",auditStale:"Explanation stale",auditClear:"Clear explanation",auditGeneratedAt:({time:e})=>`Generated ${e}`,allDiffLabel:"all changes",allChangesLabel:"all changes",workingTree:"Working tree changes",allUnstaged:"All unstaged changes",binaryOrEmpty:"No textual changes to display.",noFinalNewline:"No newline at end of file",noHunks:"No hunks",hunkOutline:"Hunks",expandHunkRail:"Show hunk list",collapseHunkRail:"Hide hunk list",prevHunk:"Previous hunk",nextHunk:"Next hunk",prevFile:"Previous",nextFile:"Next",expandFile:"Expand file",collapseFile:"Collapse file",expandAll:"Expand all",collapseAll:"Collapse all",collapseHunk:"Collapse hunk",useBracketKeysHint:"Press [ / ] to jump between hunks",unified:"Unified",unifiedMode:"Unified view",split:"Split",splitMode:"Side-by-side view",moreActions:"More actions",view:"View",loadingPreviousFile:"Loading previous file…",loadingNextFile:"Loading next file…",resizeNavigation:"Resize diff navigation",focusPathHint:"Select a label to focus its path",whitespace:"Whitespace",whitespaceDefault:"Default",whitespaceTrim:"Ignore trailing",whitespaceIgnore:"Ignore all",whitespaceIgnoreBlankLines:"Ignore blank lines",context:"Context",expandAbove:({count:e})=>`Expand ${e} lines above`,expandBelow:({count:e})=>`Expand ${e} lines below`,contextLines:({count:e})=>`${e} lines`,contextAll:"All"},settings:{title:"Settings",appearanceSection:"Appearance and terminal",controlsSection:"Controls and alerts",serviceSection:"Service and diagnostics",serverHealthRecoveryOn:"Recovery on",serverHealthRecoveryOff:"Recovery off",serverHealthNeedsAttention:"Needs attention",font:"Font",render:"Render",workspaceLimit:"Keep service pages",workspaceUnlimited:"Unlimited",workspaceLimitHint:"Applies on this device, including the entry page. Lower limits save memory. Older background pages reconnect when revisited; terminal tasks keep running.",theme:"Theme",darkTheme:"Dark",lightTheme:"Light",newTab:"New tab",debug:"Debug",noSleep:"No sleep",noSleepUnavailable:"No network — disabled",updateTitle:"Termdock update",updateRuntimeTitle:"CLI and service runtime",updateServiceTitle:"Service updates",updateDetails:"Version details",updateHint:"A manual check downloads and installs a new version immediately. The service restarts only after you confirm.",updateCheck:"Check for updates",updateCheckAgain:"Check again",updateChecking:"Checking npm for the latest version…",updateCheckingShort:"Checking…",updateInstallingShort:"Installing…",updateCurrent:"This service is up to date.",desktopUpdateTitle:"macOS desktop app",desktopUpdateHint:"Manually check signed desktop releases published on GitHub.",desktopUpdateUnsupported:"In-app updates require an installed, signed macOS app.",desktopUpdateChecking:"Checking for a desktop update…",desktopUpdateCurrent:"The desktop app is up to date.",desktopUpdateDownloadingShort:"Downloading…",desktopUpdateDownloading:"A new version is downloading in the background…",desktopUpdateReady:"The desktop update is downloaded and ready to install.",desktopUpdateInstalling:"Restarting to install the desktop update…",desktopUpdateCheck:"Check desktop app",desktopUpdateCheckAgain:"Check again",desktopUpdateRestart:"Restart and install",desktopUpdateRestartConfirm:"Restart Termdock and install the downloaded desktop update? The terminal service and tmux sessions will remain running.",serverHealthTitle:"Service health",serverHealthHint:"What happened to the Termdock service recently.",serverHealthSupervised:"Automatic recovery is on: the service will attempt to restart if it crashes or stops responding.",serverHealthUnsupervised:"Built-in automatic recovery is off. A crash may require a manual restart.",serverHealthEnable:"Enable and restart",serverHealthEnableHint:"Enabling restarts the service and briefly disconnects clients. Plain terminals may close; tmux sessions can reconnect. Repeated startup failures stop automatic retries.",serverHealthEnabling:"Enabling…",serverHealthEnablePending:"Waiting for reconnection to confirm automatic recovery…",serverHealthEnableError:"Could not confirm automatic recovery. Reconnect to check its status. If the service is unreachable, check the startup logs on its host.",serverHealthEnableUnavailable:"This launch method cannot enable recovery here. Configure supervision on the service host; desktop and externally managed services remain managed by their launcher.",serverHealthClean:"No problems recorded.",serverHealthHistory:"Previous problem",serverHealthRunningNow:"The service is running now with automatic recovery enabled.",serverHealthLastIncident:"Last problem",serverHealthRestarted:({count:e})=>`Restarted automatically ${e}${e===1?" time":" times"}`,serverHealthGaveUp:({count:e})=>`This supervisor stopped retrying after ${e} consecutive failures.`,serverHealthSupervisorLost:"Automatic recovery is unavailable. The service is still running.",serverHealthOomNote:"Memory was near the limit before it died; the OOM killer may have taken it.",serverHealthUptime:({duration:e})=>`ran for ${e}`,serverHealthDismiss:"Got it",serverHealthDismissed:"Acknowledged",serverHealthUnknownEvent:"Something went wrong",serverHealthEventStartupFailure:"Failed to start",serverHealthEventCrash:"Crashed",serverHealthEventCrashNative:"Crashed in native code",serverHealthEventKilled:"Killed outright",serverHealthEventWedge:"Stopped responding and had to be killed",serverHealthEventPortConflict:"Could not start: the port is already in use",serverHealthEventGaveUp:"Repeated failures; retries stopped at that time",serverHealthEventExitZero:"Exited with code 0 without being asked to",serverHealthEventTerminated:"Terminated by another process",serverHealthEventSupervisorLost:"Lost contact with the supervisor",serverHealthEventUncaughtException:"Hit an uncaught exception",serverHealthEventUnhandledRejection:"Had an unhandled promise rejection",serverHealthEventExitNonzero:"Exited with an error code",notifications:"Notify",notificationsTitle:"Notification settings",notificationsHint:"Notify when an AI task finishes while Termdock is hidden.",notificationsPageHint:"Choose which Termdock events can send system notifications. The master switch controls browser permission and delivery; event switches decide what should notify you.",notificationsMaster:"System notifications",notificationsMasterHint:"Allow Termdock to send notifications when it is hidden or running as an installed PWA.",notificationsIOSInstallHint:"On iPhone and iPad, install Termdock to the Home Screen before enabling notifications.",notificationsPermission:"Permission",notificationsPermissionSystem:"Managed by macOS",notificationsTest:"Send test",notificationsTestChecking:"Waiting for macOS to confirm delivery…",notificationsTestDelivered:"Delivered to Notification Center. If no banner appeared, check the alert style and Focus.",notificationsTestFailed:"macOS did not deliver the notification. Allow Termdock in System Settings.",notificationsOpenSystemSettings:"Open system notification settings",notificationsAlertStyle:"Alert style",notificationsAlertStyleHint:"Browsers and Android still decide the final heads-up behavior. Termdock can only request quiet/default/sticky notification options.",notificationsStyleNormal:"Default",notificationsStyleNormalHint:"Sound/vibration if allowed",notificationsStyleQuiet:"Quiet",notificationsStyleQuietHint:"Status tray, no sound",notificationsStylePersistent:"Sticky",notificationsStylePersistentHint:"Stay until dismissed",notificationsEvents:"Events",notificationsAiFinished:"AI task finished",notificationsAiFinishedHint:"Notify when an AI agent stops while Termdock is in the background.",notificationsSessionExited:"Terminal exited",notificationsSessionExitedHint:"Notify when a terminal process exits on its own (closing it yourself does not trigger; delivered via Web Push).",notificationsFutureHint:"More notification types can be added here later without changing the top-level settings layout.",notificationsOffSummary:"System notifications disabled",notificationsAiOnSummary:"AI task finished enabled",notificationsExitOnSummary:"Terminal exit enabled",notificationsBothOnSummary:"AI task finished and terminal exit enabled",notificationsNoEventsSummary:"No notification events enabled",notificationsDenied:"Browser notification permission is blocked. Enable it in site settings.",notificationsUnsupported:"Notifications require a secure context and service worker support.",notificationsTestBody:"Notifications are enabled. You will be notified when an AI task finishes in the background.",shell:"Temporary",tmux:"Keep on disconnect",auto:"Auto",webgl:"WebGL",canvas:"Built-in",tmuxServer:"Tmux server",tmuxUnavailable:"unavailable",noTmuxSessions:"No tmux sessions on the server.",installTmuxHint:"Install tmux on the server to enable.",refresh:"Refresh",attached:"Attached",restorable:"Restorable",attach:"Attach",attaching:"Attaching…",destroy:"Destroy",sessions:({n:e})=>`${e} session${e===1?"":"s"}`,windows:({n:e})=>`${e} window${e===1?"":"s"}`,keyboardToolbar:"Keyboard toolbar",aiAgentDetection:"AI agent detection",signOut:"Sign out",language:"Language",programNamePlaceholder:"Program name (e.g. claude)",patternPlaceholder:"Regex pattern (e.g. Thinking|Generating)",statusPlaceholder:"Status",addProgram:"Add program",addPattern:"Add pattern",resetDefaults:"Reset defaults",invalidRegex:"Invalid regex",removeProgram:"Remove program",removeRule:"Remove rule",keepLabel:"keep",customColor:"Custom color",tabIndicator:"Tab indicator style",toolbarPresets:"Customize toolbar",detectionRules:"Detection rules",agentHooksHint:"With hooks installed, agents report their own status: working (green), waiting for you (amber), turn done (check) — and you get a notification the moment one needs your input. Hooks install globally but only fire inside termdock terminals.",agentHooksInstall:"Install",agentHooksInstalled:"Installed",agentHooksOutdated:"Outdated",agentHooksNeedsApproval:"Needs approval",agentHooksUnverified:"Runtime unverified",agentHooksUnverifiedHint:"The configuration exists, but Codex could not confirm that these hooks are enabled and trusted. Check /hooks in Codex.",agentHooksApprovalHint:"Run /hooks in Codex and approve the Termdock hooks",agentHooksNotInstalled:"Not installed",agentHooksUninstall:"Uninstall",agentHooksReinstall:"Reinstall",agentHooksDevMode:"Dev mode: hooks point at TS sources and need a built install to fire",agentHooksTarget:"writes to",agentAutoRename:"Automatic session titles",agentAutoRenameHint:"Update the title from recent work when an agent finishes a turn. Off by default; manual titles are never overwritten. External plugin CLIs run only after their title feature is enabled.",agentAutoRenameToggle:"Toggle automatic titles for this agent",agentAutoRenameShort:"Auto title",agentAutoRenameNamer:"Title agent",agentAutoRenameFollow:"Follow current session",agentAutoRenameModelsFromCli:"Models discovered from local CLIs",agentAutoRenameRefreshModels:"Refresh CLI models",agentAutoRenameCliDefault:"CLI default model",agentAutoRenameAutomatic:"Automatic selection",agentAutoRenameNoCli:"No supported title CLI detected",agentAutoRenameAdvanced:"Advanced title preferences",agentAutoRenamePreference:"Additional preferences",agentAutoRenamePreferenceHint:"Optional. Add preferences for title style or emphasis; Termdock keeps its default naming rules. Saved when you leave the field.",agentAutoRenamePreferencePlaceholder:"For example: emphasize user value; use action phrases; avoid technical jargon",agentAutoRenamePayloadLimit:"User-message context limit (characters)",agentAutoRenamePayloadLimitHint:"Total raw prompt-submit payload characters retained. Default 12000; range 1000–64000.",agentPlugins:"Agent Plugins",agentPluginAdd:"Add Plugin",agentPluginHint:"Public or private Git (HTTPS, HTTP, SSH) and local directories are supported. The connected service computer fetches using its Git credentials and SSH configuration. Enable hooks and title CLIs separately.",agentPluginCreate:"Create Plugin",agentPluginDelete:"Delete Plugin",agentPluginInvalid:"Invalid plugin manifest",agentPluginCopyAiPrompt:"Copy AI fix prompt",agentPluginCopied:"Copied",agentPluginSourcePlaceholder:"Git URL, git@host:team/plugin.git or local directory",agentPluginInstallPackage:"Install plugin",agentPluginAdvancedManifest:"Advanced: paste manifest.json",agentPluginUpdateAvailable:"Update available",agentPluginManualSource:"Manual manifest",agentPluginUpdate:"Update",agentPluginCheck:"Check",agentPluginDoctor:"Diagnose",agentPluginDoctorHint:"Explicitly probe plugin models without generating a title",agentPluginDoctorStatusOk:"Title and model capabilities are healthy",agentPluginDoctorStatusMissing:"titleNamer is not declared",agentPluginDoctorStatusCliDefault:"Titles are available using the CLI default model",agentPluginDoctorStatusNoModels:"No usable model data was returned",agentPluginDoctorStatusFailed:"Model probe failed",agentPluginDoctorModels:"usable models",agentPluginDoctorAutomatic:"automatic",agentPluginDoctorCliDefault:"When no model is specified, the Agent CLI default model is used",agentAutoRenameInterval:"Recheck interval",agentAutoRenameMinutes:"minutes",mobileKeyboard:"Mobile keyboard",saving:"Saving…",rulesHint:"Configure regex patterns to detect what an AI tool is doing in a terminal tab. Each rule can choose its label, color, icon style and how long the indicator is kept after output quiets down. When it stops and you haven't viewed the tab yet, the tab keeps a yellow review hint.",programsHelp:"Supports multiple programs in one config. Separate with commas.",programLabelResolution:"Program label resolution",rawCommandMapping:"Raw command mapping",rawCommandMappingHint:"Rules below map the raw command line to the tab display label. User rules run before built-ins.",genericProgramNames:"Generic program names",genericProgramNamesHint:"Trigger ps-based deep detection (e.g. node, python)",wrapperScriptNames:"Wrapper script names",wrapperScriptNamesHint:"CLI wrappers that launch another tool (e.g. aiden, npx)",shellNamesConfig:"Shell names",shellNamesHint:"Filtered out from tab display (e.g. bash, zsh)",addTag:"+ add",customRules:"Custom rules",addRule:"Add rule",localAccess:"Local access",localAccessHint:"Connection addresses and phone setup instructions",resetAutoName:"Reset auto",mobileSetupIntro:"Connect your phone to the same network as this service. If HTTPS is enabled, install and trust its CA certificate first, then open an address below.",mobileSetupDownload:"1. Scan to download the CA certificate",mobileSetupIos:"iPhone / iPad: scan with the Camera and open in Safari. Install the downloaded profile in Settings → General → VPN & Device Management, then enable full trust in Settings → General → About → Certificate Trust Settings.",mobileSetupAndroid:"Android: download the certificate and install it as a CA certificate in system security settings. Menu names vary by device.",mobileSetupConnect:"2. Open Termdock",mobileSetupConnectHint:"After trusting the certificate, scan an IP address QR code below or copy the local address to your phone browser. If the hostname does not resolve, use an IP address.",onboardingUrl:"Mobile setup",httpsActive:"HTTPS active",httpsInactive:"HTTPS inactive",caMissing:"CA download unavailable",closeSettings:"Close settings",desktopTitle:"Termdock Desktop",desktopStatusLoading:"Reading native macOS status…",desktopSwitchService:"Switch service",desktopOpenDataDirectory:"Open data directory"},toolbarPresets:{toolbarOptions:"Toolbar options",arrangement:"Arrangement",currentLayout:"Current",reorderAction:"Reorder {name}",autoMatch:"Auto match",manualShort:"Manual",previewFor:"Preview · {name}",previewTapHint:"Tap custom actions to edit",useInTerminal:"Use in this terminal",automatic:"Auto (follow program)",autoToolbar:"Auto toolbar · {name}",manualToolbar:"Current toolbar · {name}",switchToolbar:"Switch or customize toolbar",reloadTitle:"Reload saved toolbars?",reloadHint:"This discards unsaved local edits and loads the latest configuration from the service.",staleAction:"This button changed while you were editing. Your draft is still here; cancel and reopen the latest button.",previewMobile:"Mobile",previewDesktop:"Desktop",desktopPreviewHint:"Desktop shows these actions without the mobile main row.",enableDesktop:"Currently hidden on desktop · Show it",done:"Done",confirmChange:"Confirm",comboHelp:"Choose modifiers and the key to press together.",matchedHint:"In Auto mode, used for {programs}.",intro:"Keep useful actions within reach",introHint:"Choose a toolbar, then tap a button to edit it or add another.",chooseToolbar:"Toolbar to customize",baseName:"General terminal",autoHint:"Choose what to edit here. The terminal keeps its current selection mode.",baseHint:"In Auto mode, used when no other toolbar matches.",manualHint:"Choose this toolbar from the terminal switcher, or link a program in more settings.",previewHint:"Tap a button to edit. This previews the expanded action area.",fixedKeysHint:"Esc, Ctrl, paste and other fixed keys stay in the main toolbar.",editAction:"Edit {name}",newToolbar:"Make a copy",copyName:"{name} copy",moreSettings:"Name, automatic switching and more",appearance:"Button size",comfortable:"4 per row",balanced:"6 per row",compact:"8 per row",customLayout:"Custom row sizes",advanced:"Advanced settings",advancedHint:"For special key codes, multi-step input or double-tap actions.",saveAction:"Save button",addAction:"Add to toolbar",actionName:"Button name",otherKeys:"Other keys",backToKeys:"Back to button library",addKey:"Add {key}",keyAlreadyAdded:"{key} is on the toolbar",renameAction:"Rename button",actionType:"What happens when tapped",commonKeys:"Common keys",inputText:"Command or text",combination:"Key combination",rawAction:"Custom sequence",chooseKey:"Choose a key",textContent:"Text or command to type",textPlaceholder:"e.g. /compact or git status",sendEnter:"Press Enter after typing",sendEnterHint:"On submits the command immediately. Off only types the text.",namePlaceholder:"Uses the action name when empty",draftHint:"Changes apply when saved. Cancel keeps the original button.",pressSummary:"Press {key}",typeSummary:"Type “{text}”",submitSummary:"Type “{text}” and press Enter",customSummary:"Custom action",doubleTapSummary:"Includes a double-tap action",doubleTapHelp:"Sent on two quick taps. Leave empty to disable double-tap.",sequenceHelp:"Use \\r for Enter, \\t for Tab, \\u001b for Esc, and || between delayed steps.",emptyAction:"Choose a key or enter some text first.",removeButton:"Delete button",lastButton:"Keep at least one button",undo:"Undo",changed:"Toolbar updated",removed:"Button removed",restoreToolbar:"Restore this toolbar’s defaults",restoreAll:"Restore all default toolbars",restoreTitle:"Restore all default toolbars?",restoreHint:"This replaces custom toolbars and edits. You can undo afterward.",deleteTitle:"Delete this toolbar?",deleteHint:"Its program will use another matching toolbar or the general toolbar. You can undo afterward.",defaultsHint:"Using default buttons. Editing keeps the other keys.",sharedHint:"Saved on this service and shared with devices connected to it.",saving:"Saving…",saved:"Saved",loading:"Loading toolbars…",saveFailed:"Not saved to the service. Please retry.",loadFailed:"Could not load saved toolbars. Retry before editing.",conflict:"Another device changed these toolbars. Reload before editing.",reload:"Reload",configure:"Customize toolbar…",entryHint:"Edit buttons, order and size",programNames:"Use automatically for these programs",programHint:"Enter program names such as codex or vim. Leave empty to choose manually.",programPlaceholder:"Enter a program name",layoutHint:"Buttons wrap automatically. No need to count empty slots.",key_interrupt:"Interrupt running task",key_tab:"Complete / next field",key_enter:"Confirm / Enter",key_escape:"Cancel / go back",key_clear:"Clear screen",key_search:"Search command history",key_up:"Up / previous history",key_down:"Down / next history",key_left:"Move cursor left",key_right:"Move cursor right",key_home:"Start of line",key_end:"End of line",key_shiftLeft:"Shift + Left",key_deleteLine:"Delete before cursor",key_eof:"End input",preview:"Preview",presets:"Toolbars",label:"Label",new:"New",reset:"Reset",presetLabelPlaceholder:"Preset label",deletePreset:({name:e})=>`Delete preset ${e}`,matchPrograms:"Match programs",typeEnterHint:"Type & Enter",programsPlaceholder:"vim, nvim, /^claude(-code)?$/i …",programsHelp:"Plain names match as case-insensitive substrings. Wrap in /…/flags for regex (tested against the lowercase program name).",altSlot:"Alt modifier slot",altSlotHint:"Reserve one preview slot for the Alt key.",desktopVisibility:"Show on desktop",desktopVisibilityHint:"Desktop shows only this preset’s custom actions, not the basic keyboard shortcuts.",rowLayout:"Row layout",rowLayoutHint:"Buttons per expanded row.",addRow:"Row",rowN:({n:e})=>`Row ${e}`,del:"Del",buttons:"Buttons",buttonsHint:"Tap to edit. Use ↑↓ to reorder.",addButton:"Add button",noCustomButtons:"No custom buttons yet. Add one to override the default toolbar.",moveUp:"Move up",moveDown:"Move down",removeRow:({n:e})=>`Remove row ${e}`,removeAction:({name:e})=>`Remove ${e}`,labelField:"Label",labelPlaceholder:"Label shown on the button",sequence:"Sequence",keyCombo:"Key combination",comboKey:"Key",namedKeys:"Navigation and control keys",functionKeys:"Function keys",characterKeys:"Letters, numbers and symbols",insertCombo:"Insert key combination",keyComboHint:"Choose modifiers and a key to append to the sequence. Behavior depends on the terminal application.",unsupportedCombo:"The terminal cannot distinguish this combination. Change the modifiers or key.",sequencePlaceholder:"e.g. /undo or \\t or /||undo",sequenceHint:"Double-tap sequence",doubleTap:"Double-tap sequence",doubleTapAdd:"+ Add",doubleTapPlaceholder:"e.g. /undo\\r or /||undo ||\\r",remove:"Remove",noSequence:"No sequence",preset:"Preset",overCapacityHint:"More buttons than slots. Extra rows will use the last row size."},agentRules:{ruleColors:{green:"Green",yellow:"Yellow",red:"Red",blue:"Blue",purple:"Purple",orange:"Orange",gray:"Gray"}},tab:{session:"Session",new:"New session",rename:"Rename",renameHint:"Change the tab display name",renamePlaceholder:"Leave empty to reset to default",copyCwd:"Copy cwd",copyCwdHint:"Copy the current working directory",closeMenu:"Close menu",openGroup:"Open collaboration group",leaveGroup:"Leave collaboration group",leaveGroupShortHint:"Keep the terminal running",leaveGroupConfirm:"Confirm leave",leaveGroupQuestion:({name:e})=>`Remove this session from “${e}”?`,leaveGroupHint:"The terminal keeps running. Other members and message history stay. This session will stop receiving new group messages and can rejoin later.",leavingGroup:"Leaving…",leaveGroupFailed:"Could not leave the group. Please retry.",fontSize:"Font size",fontSizeHint:"Only for this session",fontSizeReset:"Follow global",resumeAgent:"Resume agent session",resumeAgentHint:"Resume the last conversation by its native session id",resumeAgentAvailable:"Agent conversation available to resume",resumeAgentRecoveredTitle:({agent:e})=>`${e} conversation available`,resumeAgentRecoveredHint:"This terminal was rebuilt after an interruption. Continue where you left off.",resumeAgentNow:"Resume",resumeAgentLater:"Dismiss for now",resumeAgentSubmitting:"Submitting the native resume command…",resumeAgentWaiting:"Waiting for the Agent to confirm the restored conversation…",resumeAgentSuccess:({agent:e})=>`${e} conversation restored`,resumeAgentFailed:"Could not resume the Agent conversation. You can retry.",resumeAgentConflict:"This Agent conversation is already open in another terminal.",resumeAgentBusy:"Wait for the current Agent turn to finish before resuming.",resumeAgentTimeout:"The Agent did not confirm the restored conversation. Check the terminal or retry.",tmuxRecoveryTitle:({count:e})=>`Terminal interrupted · ${e} conversations to reconnect`,tmuxRecoveryHint:"Reconnect the original conversations and keep their history. Progress stays visible.",tmuxRecoveryRestoreAll:"Restore all",tmuxRecoveryRestoring:"Restoring…",tmuxRecoveryDismiss:"Not now",tmuxRecoveryPartial:({restored:e,failed:t})=>`${e} reconnected · ${t} need attention`,tmuxRecoveryFailed:"Recovery failed. Check the terminals and try again.",tmuxRecoveryDismissFailed:"Could not dismiss the recovery notice.",tmuxRecoveryProgress:({total:e,queued:t,paused:n,resourceWait:r,running:o,succeeded:s,failed:i})=>`Recovery: ${s}/${e} complete · ${t} queued · ${n} paused (${r} waiting for resources) · ${o} running · ${i} failed`,tmuxRecoveryPausedForResources:"Resources are below budget. New launches are paused and will resume automatically when capacity returns.",tmuxRecoveryPause:"Pause",tmuxRecoveryResume:"Resume",tmuxRecoveryInProgress:"Recovery in progress",tmuxRecoveryDetails:"Affected conversations",tmuxRecoveryDiagnostics:"Recovery details",tmuxRecoveryWaiting:"Waiting to reconnect",tmuxRecoveryDone:"Reconnected",tmuxRecoverySuccess:({count:e})=>`${e} original conversations reconnected`,tmuxRecoveryReturn:"Return to recovery",tmuxRecoveryInspect:"View terminal",tmuxRecoveryRetryFailed:"Retry failed sessions",copied:"Copied",close:"Close session",closeHint:"Remove this tab from the list",longPressTip:"Tip: hold a tab still for a moment to open actions; hold and drag to reorder.",sessionsTitle:"Sessions",explorerTitle:"Explorer",split:"Split",splitTitle:"Add to split workspace",closeFailed:({name:e})=>`Could not close ${e}. The session is still open. Try again.`,splitNew:"New session in workspace",splitNewHint:"Uses the current directory and default type; add as many panes as needed",splitExisting:"Choose a session or workspace",splitExistingHint:"Create multiple independent workspaces; choosing another workspace merges them",splitCurrent:"Current",splitClose:"Exit split",splitLayout:"Split layout",splitHorizontal:"Side by side",splitVertical:"Stacked",splitGrid:"Grid",splitWorkspace:"Split group",splitWorkspaces:"Split workspaces",splitRename:"Rename split group",splitRemovePane:"Remove from split",splitExistingGroups:"Existing split groups",splitAvailableSessions:"Available sessions",splitOccupied:"Grouped",splitUnavailableGrouped:"Grouped mode only supports sessions in the same directory",splitEndedGrouped:"Split ended: grouped mode does not support mixed directories",splitNoOtherSessions:"No other sessions are available",sessionCount:({count:e})=>`${e} session${e===1?"":"s"}`,closeChooserTitle:"Destroy tmux session?",closeChooserDescription:"This will stop the session and every process inside it. This cannot be undone.",destroySession:"Destroy session",confirmDestroySession:"Confirm destroy",destroySessionHint:"Stop the tmux session and every process inside it.",dragToClose:"Drag here to close",releaseToClose:"Release to confirm"},agent:{aiRunning:"AI running",recentActivity:"Recent session activity",needsReview:"Needs review",finishedReview:"AI finished — needs review",chatUnread:"{count} unread messages",aiWaiting:"AI waiting",copyMode:"Copy mode",jumpToNext:"Jump to next session needing attention",jumpToNextRunning:"Jump to next running session",selectRunningSession:"Select a running session",runningSessionGestureHint:"Tap to cycle · swipe sideways to select · hold to drag",currentSession:"Current"},serviceAttention:{title:"Attention across services",summary:"{services} services · {count} sessions",currentService:"Current service",waiting:"Waiting for you",offline:"Offline · Last known status",login:"Sign-in required · Last known status",empty:"No sessions need attention",viewService:"Open service",scope:"Includes opened services. Select a session to go directly to it.",changed:"The pending sessions have changed. Please choose again.",unavailable:"Unable to open this service. Retry from the service list."},connection:{reconnecting:"Reconnecting…"},desktopServices:{switchService:"Switch Termdock service",openServices:"Open services",idle:"Idle",manageServices:"Manage services and names"},terminal:{input:"Terminal input",error:"Error",dropFilesToPastePaths:"Drop files to paste paths",loading:"Loading terminal…",initializing:"Initializing terminal engine…",failedToLoad:"Failed to load terminal",unknownError:"An unknown error occurred",componentFailed:"Terminal component failed to load",paste:"Paste",copied:"Copied",copyFailed:"Copy failed",longPressSelectsText:"Long press selects text",longPressSendsArrows:"Long press sends arrow keys",switchLongPressToArrows:"Switch long press to arrow keys",switchLongPressToCopy:"Switch long press to copy selection"},quota:{title:"Subscription Quota",noProviders:"No subscription providers detected.",noProvidersHint:"Quota tracking becomes available when you use AI coding agents with API keys or OAuth login.",exhausted:"Exhausted",left:({n:e})=>`${e} left`,updated:({time:e})=>`Updated ${e}`,refresh:"Refresh",close:"Close"},errorBoundary:{title:"Something went wrong",unexpected:"An unexpected error occurred",retry:"Try Again",copyDetails:"Copy error details",copied:"Copied",copyFailed:"Copy failed"},error:{type:{network:"Network error",session:"Session error",terminal:"Terminal error",auth:"Authentication error",validation:"Validation error",unknown:"Unknown error"},severity:{low:"Notice: ",medium:"Warning: ",high:"Error: ",critical:"Critical: "},suggestion:{networkCheck:"Check your network connection",networkRetry:"Try reconnecting",networkProxy:"Check proxy settings",networkWait:"Wait for the network to recover",sessionRecreate:"Recreate the session",sessionServer:"Check the server status",sessionCache:"Clear your browser cache",terminalRestart:"Restart the terminal",terminalConfig:"Check the terminal configuration",terminalClear:"Clear the terminal output",authRelogin:"Sign in again",authCredentials:"Check your credentials",authAdmin:"Contact the administrator",validationFormat:"Check the input format",validationParams:"Verify your parameters",validationDocs:"See the documentation",unknownReload:"Reload the page",unknownApp:"Restart the app",unknownSupport:"Contact support"}}},HS={architecture:{choosePaths:"选择目录或文件",browsePaths:"浏览目录",addScopeReference:"引用到分析范围",searchScopePaths:"搜索文件或目录",useCurrentFile:"引用当前文件",useCurrentDirectory:"引用当前目录",browsePathsHint:"展开目录浏览,点击右侧引用按钮加入分析范围。",correctPathsFirst:"请先修正已填写的路径,再添加范围。",pathsHint:"可选择范围或粘贴文件/行引用,路径相对当前项目。",featureScopeHint:"优先在所选范围内定位功能",removePath:"移除路径",chooseThisDirectory:"选择此目录",filterDirectory:"筛选当前目录",loadingPaths:"正在读取目录…",pathsLoadFailed:"无法读取目录,请检查连接或访问权限后重试。",noPaths:"当前目录没有匹配的文件或子目录。",pathsTruncated:"当前目录条目较多,仅显示部分结果;可进入子目录,或直接粘贴目标路径。",selectedPaths:"已选路径",usePaths:"使用所选范围",expandDetail:"查看详情",collapseDetail:"收起说明",backToMap:"返回架构",backToModule:"返回模块",previousModule:"上一模块",parentModule:"返回上一级",viewPrepared:"查看这份分析",closeDetail:"关闭模块详情",connections:"连接关系",outgoing:"连向",incoming:"来自",browseMode:"浏览方式",outlineMode:"模块说明",graphMode:"关系图",analysisNotes:"分析说明",limitations:"范围与限制",analyzedPaths:"已分析源码",fitGraph:"查看全图",fullscreen:"全屏看图",closeFullscreen:"关闭全屏图",panHint:"拖动浏览,双指缩放;点击模块查看说明",newAnalysis:"新建分析",updateAnalysis:"更新当前分析",closePreparation:"关闭分析设置",analysisRange:"分析范围",projectRange:"整个项目",moduleRange:"目录 / 模块",featureRange:"功能链路",modulePaths:"模块路径(每行一个)",modulePlaceholder:"选择目录或文件,或粘贴已有引用,每行一个",featureTarget:"想了解的功能",featurePlaceholder:"例如:文件上传从选择文件到写入存储的完整流程",invalidPaths:"请选择项目内的目录或文件,或粘贴其引用,最多 20 个;项目外路径和 .. 无法使用。",requiredFeature:"请描述一个具体功能,并检查可选起始路径是否为项目内相对路径。",independentHint:"局部分析单独保存,可随时切换。同一范围再次生成会更新对应的图;整个项目使用项目总览。",updateOnly:"只更新当前这份分析,其他架构图会保留。",analysisOptions:"依赖深度与其他选项",dependencyDepth:"依赖追踪",boundaryDepth:"范围边界(更快)",followDepth:"追踪相关调用与依赖",startPaths:"功能范围(可选)",focus:"分析诉求与限制(可选)",focusPlaceholder:"例如:重点解释权限检查和失败重试,忽略界面样式。",savedAnalyses:"已保存分析",libraryFailed:"无法读取分析列表,当前图仍可浏览。请点击刷新重试。",awaitingFile:"这份分析尚未保存。将准备好的指令发送给 Agent;文件保存后这里会自动显示结果。",analyzeModule:"细化分析这个模块",scopeUnavailable:"这份局部架构缺少范围信息,请新建分析以明确分析边界。",tab:"架构",title:"代码架构",generate:"生成",update:"更新",refresh:"刷新架构",prepare:"准备架构分析",promptHint:"使用当前项目的 Agent 分析代码。提示词会放入当前输入区或上下文草稿,检查后发送;架构保存后,这里会自动刷新。请先在终端打开 Agent,分析会消耗其时间和额度。",insertPrompt:"放入输入区",copyPrompt:"复制提示词",previewPrompt:"查看分析提示词",inserting:"正在添加到当前输入区…",insertFailed:"未能添加提示词,请检查当前会话,或从下方复制。",inserted:"请检查当前输入区或上下文草稿,并发送给 Agent。",copied:"提示词已复制。",failed:"复制失败,请从下方提示词中手动复制。",loading:"正在读取项目架构…",invalid:"架构文件格式有误。可以重新分析项目来修复。",loadFailed:"无法读取项目架构,请检查连接与访问权限后重试。",previous:"下面保留上次成功读取的架构。",retry:"重试",empty:"了解这个项目的代码架构",emptyHint:"可以从整个项目、指定目录或某个功能开始分析,无需先生成全项目架构。",savedAt:"保存于",perspective:"视角",breadcrumb:"架构层级",modules:"模块",explore:"展开子模块",sourceFiles:"相关源码",diagram:"架构关系图",diagramHint:"点击模块查看详情",zoomOut:"缩小架构图",zoomIn:"放大架构图",resetZoom:"重置架构图缩放",download:"下载架构图 SVG",downloadFailed:"下载失败,请重试。",diagramFailed:"图表暂时无法渲染,仍可通过下方模块查看架构。",rendering:"正在绘制架构图…"},computer:{returnToDesktop:"返回桌面",tools:"控制设置",closeTools:"关闭控制设置",keyboard:"键盘",keyboardInput:"直接输入到电脑",keyboardPlaceholder:"点这里打字,文字直接发送到电脑",hideKeyboard:"收起键盘",keyboardNavigation:"键盘导航",desktopZoom:"桌面缩放",zoomIn:"放大桌面",zoomOut:"缩小桌面",resetZoom:"恢复适应屏幕",pinchHint:"双指捏合缩放",keyEscape:"发送 Esc",keyLeft:"向左",keyDown:"向下",keyUp:"向上",keyRight:"向右",keySelectAll:"全选",clipboardTool:"剪贴板",zoom:"放大",expand:"全屏",switchTouchMode:"切换触摸方式",touchMode:"触控模式",trackpadMode:"触控板",directTouchMode:"直接触摸",trackpadHint:"单指滑动移动鼠标,轻点点击,长按拖动;双指滚动,双指轻点右键。",directTouchHint:"轻点屏幕上的位置即可点击,拖动手指操作桌面。",trustCertificateHere:"信任此电脑的证书",rememberLogin:"记住登录",autoConnect:"下次打开自动连接",forgetLogin:"清除登录",savedPassword:"已保存,留空直接连接",loginExpired:"登录信息已失效,请重新输入密码。",loginSaveFailed:"登录信息保存或读取失败,请重试。",title:"电脑控制",host:"电脑地址",hostPlaceholder:"192.168.1.20 或 computer.local",username:"用户名(可选)",password:"密码",passwordHint:"填写目标电脑的 VNC 密码;服务器要求账户登录时,同时填写用户名。勾选记住登录后,成功连接时在服务端加密保存。",connect:"连接",disconnect:"断开",cancel:"取消",connecting:"正在连接…",connected:"已连接",disconnected:"连接已断开,可以重新连接。",viewOnly:"仅查看",control:"允许控制",fit:"适应面板",actualSize:"原始尺寸",fullscreen:"展开桌面",exitFullscreen:"收起桌面",setup:"如何连接电脑",step1:"在 Mac 上打开「系统设置 → 通用 → 共享 → 屏幕共享」。",step2:"在屏幕共享设置中允许你的用户访问;使用 VNC 密码时,开启「VNC 查看器可以使用密码控制屏幕」。",step3:"填写当前服务能访问的电脑内网地址;控制服务所在电脑时,选择「当前电脑」。",networkHint:"使用 VNC 端口 5900。浏览器到 Termdock 全程加密;服务到目标电脑的 VNC 段请使用可信内网或 VPN。",service:"当前服务:{name}",remoteTitle:"远程电脑桌面",startHint:"连接后可在这里查看桌面,用鼠标、触摸和键盘操作电脑。",credentials:"请填写登录信息",authenticate:"登录",authFailed:"登录失败,请检查用户名、密码和目标电脑的远程桌面权限。",sharingOff:"电脑未接受 VNC 连接,请先启动桌面共享服务,并检查端口 5900。",unreachable:"无法连接电脑,请检查地址、网络以及防火墙。",timeout:"连接超时,请确认目标电脑已唤醒且能从当前服务访问。",invalidHost:"请填写电脑的内网 IP 或主机名,无需协议或端口。",privateOnly:"仅支持内网或本机地址;远程访问可切换到目标电脑上的 Termdock 服务。",permission:"当前邀请未授权这台电脑或此项操作。",sharedViewUnsupported:"这台电脑使用了不支持只读过滤的 VNC 登录方式。请调整屏幕共享认证方式后重试。",failed:"电脑连接失败,请重新连接。",clipboard:"发送剪贴板",clipboardPlaceholder:"发送文字到电脑剪贴板",clipboardHint:"输入文字后点 {shortcut} 即可粘贴;也可以只发送到剪贴板。字符支持取决于目标电脑。",remoteClipboard:"电脑复制的文字",copyToDevice:"复制到本机",clipboardCopied:"已复制到本机",clipboardAccessFailed:"无法访问系统剪贴板。可在此输入文字发送,或选中电脑复制的文字手动复制。",clipboardSent:"已发送到电脑剪贴板",shortcuts:"快捷键",switchApps:"切换应用",spotlight:"Spotlight 搜索",desktop:"显示桌面",loading:"正在加载电脑控制…",platform:"目标系统",thisComputer:"当前电脑",otherComputer:"其他电脑",target:"连接哪台电脑",localService:"运行当前 Termdock 服务的电脑 · {name}",advanced:"高级设置",rdpLoginHint:"使用远程桌面设置中的账号和密码。",vncLoginHint:"使用屏幕共享的 VNC 密码。",checkSettings:"检查连接设置",localHint:"本机指运行当前 Termdock 服务的电脑;目标电脑需先启用所选协议的远程桌面服务。",linuxStep1:"Ubuntu / Linux 需要运行 VNC 服务。共享当前桌面时,x11vnc 需要 X11 会话;Ubuntu 登录界面可选择「Ubuntu on Xorg」。",linuxStep2:"设置 VNC 密码,并让服务监听 5900 端口;只有 RDP 的桌面共享无法在此连接。",linuxCommandHint:"在目标电脑的桌面终端执行以下命令,然后填写设置的 VNC 密码。此示例仅允许连接服务所在电脑,不会自动执行:",linuxProtocolHint:"Ubuntu 24.04 的内置远程桌面使用 RDP,此处使用 VNC。Wayland 需要兼容该桌面的 VNC 服务;TigerVNC 虚拟桌面是独立会话,不等同于当前屏幕。",windowsStep1:"在 Windows 上安装并启动兼容 VNC 的桌面共享服务器;Windows 的 RDP 远程桌面无法在此连接。",windowsStep2:"设置 VNC 密码,启用键盘和鼠标控制,并允许当前服务通过防火墙访问 5900 端口。",systemSearch:"系统搜索",protocol:"连接协议",port:"RDP 端口",rdpUsername:"RDP 用户名",domain:"域(可选)",rdpPasswordHint:"填写远程桌面设置中的 RDP 用户名和密码;Ubuntu 的远程登录凭据可能与系统账户不同。勾选记住登录后,成功连接时在服务端加密保存。",rdpBackendUnavailable:"当前服务的 RDP 支持不可用,请先完成服务端 RDP 配置。",rdpBackendRecovery:"请在运行 Termdock 服务的电脑上启动 RDP 后台(guacd),然后刷新此页面重新检查。连接设置会保留;也可在高级设置中切换为 VNC。",rdpFailed:"远程桌面连接失败。请检查目标地址、端口和电脑上的远程桌面设置。",rdpLinuxStep1:"在 Ubuntu 打开「设置 → 系统 → 远程桌面」,启用「桌面共享」或「远程登录」,并设置 RDP 登录凭据。",rdpStep1:"在目标电脑启用 RDP 远程桌面。Windows 可在「设置 → 系统 → 远程桌面」中开启;Mac 内置屏幕共享请使用 VNC。",rdpStep2:"填写远程桌面设置中的用户名、密码和实际端口。RDP 默认端口为 3389;Ubuntu 的桌面共享也可能使用 3390。目标使用自签名证书时,确认电脑身份后可勾选信任证书。",rdpNetworkHint:"浏览器到 Termdock 的画面和输入复用加密通道;RDP 由当前服务连接目标电脑。桌面共享与远程登录可能连接不同会话,是否显示当前屏幕取决于目标服务的设置。",trustCertificate:"信任此电脑的 RDP 证书(跳过校验)",settingsLoading:"正在读取连接设置…",settingsSaving:"正在保存设置…",settingsSaved:"连接设置已保存到当前服务。",settingsSaveFailed:"设置未能保存,当前修改仍在此页面。",settingsLoadFailed:"连接设置读取失败,请重试。",retry:"重试",retryConnect:"重试连接",rdpCertificate:"目标电脑的 RDP 证书未通过校验。确认是你的电脑后,可勾选信任证书并重试。",clipboardFailed:"剪贴板发送失败,请重试。"},app:{name:"Termdock"},android:{device:"设备",selectDevice:"选择设备",noDevices:"未发现设备",closeTab:"关闭设备 Tab",refresh:"刷新设备",connect:"连接",disconnect:"停止投屏",addDevice:"网络连接",addressPlaceholder:"ip:port,例如 192.168.1.20:5555",adbUnavailable:"本机未找到 adb(Android platform-tools),无法投屏。macOS: brew install android-platform-tools;Ubuntu: sudo apt install adb;或在 ~/.termdock/.env 设置 TERMDOCK_ADB_BIN。",scrcpyUnavailable:"本机未找到 scrcpy / scrcpy-server,无法投屏。macOS: brew install scrcpy;Ubuntu: sudo apt install scrcpy;或在 ~/.termdock/.env 设置 TERMDOCK_SCRCPY_BIN。",connecting:"正在连接设备…",reconnecting:"连接断开,正在自动重连…",retrySchedule:"第 {attempt} 次重试将在 {seconds} 秒后开始",lastError:"最近一次错误(重连期间保留)",retry:"重试",idleHint:"选择设备开始投屏",noDevicesHint:"用 USB 连接手机并开启 USB 调试,或在此添加网络设备",back:"返回",home:"主页",recents:"多任务",notifications:"通知栏",rotate:"旋转屏幕",volumeUp:"音量 +",volumeDown:"音量 -",power:"电源",zoomIn:"放大",zoomOut:"缩小",zoomPanHint:"双指拖动可移动画面",inputText:"输入文字",inputPlaceholder:"输入要发送到手机的文字",send:"发送",splitOpen:"在分屏中打开",splitClose:"退出分屏",splitDockedHint:"投屏已在分屏区域显示。",splitDrag:"按住拖动调整位置",insertFixPrompt:"插入修复提示词",screenshot:"截图并插入",recordingStart:"开始录屏",recordingStop:"停止录屏",recording:"正在录屏…",recordingLimit:"已达 5 分钟上限,录屏已停止",recordingStopped:"投屏已中断,录屏已停止",captureInserted:"截图已插入",recordingInserted:"录屏已插入",recordingConfirm:"录屏已结束,如何处理?",recordingInsert:"直接插入",recordingSave:"保存到指定目录",recordingSaveHint:"录像已准备好,可添加到当前输入框,或保存到文件目录。",recordingDiscard:"丢弃录屏",captureInserting:"正在插入…",recordingSaving:"正在保存录屏…",captureFailed:"插入失败",captureUnavailable:"当前无法添加,请确认会话允许输入",more:"更多",fullscreen:"全屏",fillSidebar:"铺满侧栏",exitFullscreen:"退出全屏",fullscreenHint:"投屏正在全屏显示。",quality:"画质",qualityAutoHint:"根据连接与解码表现动态调码率,不断流、不重连。分辨率保持稳定,操作和服务端录屏不受影响。",qualityAutoUnavailable:"自动调码率已暂停,画面保持连接。",qualityAutoVersionError:"服务端 scrcpy 版本尚未适配(点击查看详情)。",qualityAutoBuildError:"服务端 scrcpy 文件尚未验证兼容(点击查看详情)。",qualityAutoExtensionError:"调码率扩展文件读取、校验或推送失败(点击查看详情)。",qualityAutoTimeoutError:"调码率确认超时,不能据此判断编码器不支持(点击查看详情)。",qualityAutoEncoderError:"设备编码器拒绝了这次调节(点击查看详情)。",qualityAutoChannelError:"调码率控制通道异常(点击查看详情)。",qualityAutoUnknownError:"服务端未提供具体原因,请更新该服务端后重试(点击查看详情)。",qualityLow:"流畅",qualityMedium:"标准",qualityHigh:"高清",qualityCustom:"自定义",qualityResolution:"分辨率",qualityBitRate:"码率",qualityFrameRate:"帧率",qualityAuto:"自动",qualityApply:"应用",presetNamePlaceholder:"预设名称",presetSave:"保存预设",presetDelete:"删除预设",stateUnauthorized:"未授权",stateOffline:"离线",stateUnknown:"状态未知",unauthorizedHint:"请在手机上确认 USB 调试授权。",offlineHint:"设备离线,请重新插拔或重连。"},common:{cancel:"取消",close:"关闭",save:"保存",reset:"重置",loading:"加载中…",error:"错误",retry:"重试",refresh:"刷新",search:"搜索",clear:"清除",delete:"删除",on:"开",off:"关",back:"返回",copy:"复制",decrease:"减少",increase:"增加",use:"使用",previous:"上一个",next:"下一个"},login:{prompt:"termdock login",placeholder:"请输入密码",placeholderBlocked:({s:e})=>`请稍候 ${e}s`,submit:"登录",invalidPassword:"密码不正确,或服务身份无法验证。请检查后重试。",identityMismatch:"服务身份已改变。请与服务所有者核对地址后再试。",unavailable:"暂时无法登录此服务,请检查连接后重试。",authorizationRequired:"此设备需要授权。请向服务所有者索取新的邀请。",passwordNotConfigured:"目标服务未配置访问密码,且此设备尚未获得访问授权。请让目标服务管理员发送邀请或授权此设备后重新连接。",targetPasswordRequired:"目标服务未配置有效访问密码,已禁用中转。请让目标服务管理员先配置访问密码。",securityUpgradeRequired:"无法核验中转的密码保护,已禁用中转。请更新目标服务和中继程序。",viaEntry:({entry:e,address:t})=>`经入口“${e}”(${t})中转,请使用目标服务的密码。`,currentTarget:({address:e})=>`正在登录 ${e}`,manageServices:"管理服务 / 使用其他地址",failed:"暂时无法登录,请检查连接后重试。",rateLimited:"尝试次数较多,请稍后再试。",continueAfterReconnect:"网络恢复后可继续登录。",savedConnectionRetained:"已保留服务记录,恢复连接后会重新检查访问权限。",invalidAddress:"请输入有效的 HTTPS 服务地址,例如 computer.example:9834 或 https://computer.example:9834。",invalidInvitation:"邀请链接不完整或无效,请重新复制完整链接后重试。"},sidebar:{sessionCreating:"正在启动…",sessionCreateWaiting:"仍在等待服务响应…",sessionCreateElapsed:"{seconds} 秒",sessionCreateContinue:"可以继续使用当前会话。",sessionCreateDirectoryUnavailable:"工作目录已失效,请重新选择目录后重试。",sessionCreatePermissionDenied:"没有权限在此目录启动,请选择其他目录。",sessionCreateConnectionFailed:"连接失败,请检查连接后重试。",sessionCreateFailed:"无法启动会话,请重试。",sessions:"会话",noSessions:"暂无打开的会话。",noMatchingSessions:"没有匹配的会话。",toggleSearch:"切换搜索",settings:"设置",moreActions:"更多操作",subscriptionQuota:"订阅额度",collapseSessions:"收起会话列表",expandSessions:"展开会话列表",collapseTools:"收起工具面板",expandTools:"展开工具面板",runningSessionButton:"运行中会话按钮",runningSessionButtonHint:"轻点循环,横向滑动选择,长按拖动",attentionButton:"待处理提醒按钮",attentionButtonHint:"显示未读、等待处理的黄色悬浮铃铛",updateAvailable:({version:e})=>`Termdock ${e} 可用`,updateInstalling:"正在后台安装,不会中断当前服务。",updateReady:"更新已安装,确认后将重启服务。",updateRestart:"重启并完成更新",updateRestartConfirm:({version:e})=>`确认重启 Termdock 并切换到 ${e}?当前网页会短暂重连,会话不会被关闭。`,updateRestarting:"正在重启,网页将自动重连…",updateFailed:"自动安装失败,提醒会保留。",updateRetry:"重新尝试",serverAttention:"服务出过问题",filterSessions:"过滤会话",clearSearch:"清除搜索",groupByFolder:"按文件夹分组",groupByFolderTitle:"按工作目录把会话归组折叠;与拖拽排序互斥。",ungrouped:"其他",needsAttention:"待处理",waitingForYou:"等你操作",completedUnread:"完成待查看",closeSession:({name:e})=>`关闭 ${e}`,newShell:"Shell",newTmux:"Tmux",newTmuxDisabled:"服务端未安装 tmux",confirmNewShell:"创建 Shell?",confirmNewTmux:"创建 Tmux?",newSession:"新建 Terminal",newSessionWithAgent:({agent:e})=>`新建 ${e}`,moreLaunchOptions:"更多启动选项",recoverableSessions:"可恢复会话",confirmCloseRecoverableSession:({name:e})=>`结束 ${e}?这会停止该会话中的所有进程。`,endRecoverableSession:"结束会话",closeRecoverableSessionFailed:"结束会话失败,请重试。",refreshRecoverableSessions:"刷新可恢复会话",restoreRecoverableSession:({name:e})=>`恢复 ${e}`,restoringRecoverableSession:"恢复中…",restore:"恢复",newSessionAdvanced:"快速启动 Agent",newSessionComposerTitle:"开始新会话",newSessionHint:"选好运行方式和目录后再启动",launchSessionWith:({name:e})=>`启动 ${e}`,setNewSessionDefault:({name:e})=>`将 ${e} 设为默认`,currentNewSessionDefault:({name:e})=>`${e} 是当前默认`,currentDefaultAgent:({name:e})=>`当前默认:${e}`,defaultAgent:"默认",makeDefault:"设为默认",sessionMode:"运行方式",tmuxKeepsRunning:"断开后继续运行",resumeHistory:"最近会话",resumeHistoryCount:({n:e})=>`已保存 ${e} 条`,resumeHistoryLoading:"正在载入最近的 Agent 会话…",resumeHistoryAction:({title:e})=>`恢复 ${e}`,resumeHistoryRemove:({title:e})=>`从最近会话中移除 ${e}`,resumeHistoryLoadFailed:"无法载入最近的 Agent 会话。",resumeHistoryFailed:"无法准备恢复该 Agent 会话。",resumeHistoryRemoveFailed:"无法从历史中移除该会话。",customStartupCommand:"自定义命令",changeStartupCommand:"更改启动命令",saveStartupCommand:"保存命令",commandPreset:"命令方案",commandPresetName:"方案名称",agentDefaultCommand:"Agent 原始命令",addAgentCommand:"+ 新增命令方案…",currentAgentCommand:"当前自定义命令",sharedAgentCommandsHint:"与待办、新会话共享,保存在当前浏览器。已有任务配置保持原命令。",startupCommandSaved:"已保存",saveStartupCommandFailed:"保存失败,请检查浏览器存储权限",addStartupCommand:"新增自定义命令…",deleteStartupCommand:"删除命令",startupCommand:"启动命令",resetStartupCommand:"恢复默认",startupCommandPlaceholder:"例如 vim、htop 或 npm run dev",agentStartupCommandHint:"可修改完整命令;留空使用 Agent 默认命令。保存到当前浏览器。",terminalStartupCommandHint:"在所选目录启动程序,例如 vim README.md。保存到当前浏览器。",workingDirectory:"工作目录",directoryPlaceholder:"输入目录路径",browseDirectories:"浏览目录",hideDirectoryBrowser:"收起目录",chooseDirectory:"选择工作目录",directoryPickerHint:"进入文件夹,确认后才会更改工作目录。",useThisFolder:"使用此目录",recentDirectories:"最近使用的目录",startCommand:"启动命令",customCommand:"其他命令",commandPlaceholder:"可选,例如 codex",detectAgents:"重新检测 Agent",savePreset:"保存为预设",createAndRun:"创建并运行",createSession:"创建 Terminal",openLeftSidebar:"打开左侧边栏",openRightSidebar:"打开右侧边栏",closeSidebar:"关闭边栏"},rightSidebar:{workspace:"工作区",currentProject:"项目",browsingLocation:"浏览中",parentFolder:"上一级目录",backToProjectRoot:"回到当前项目",refreshFiles:"刷新当前目录",resizeFileTree:"拖动调整文件目录宽度",pinCurrentFolder:"固定当前目录到这个项目",unpinCurrentFolder:"取消固定当前目录",showHiddenFiles:"显示隐藏文件",hideHiddenFiles:"不显示隐藏文件",hideGitIgnoredFiles:"隐藏 Git 忽略文件",showGitIgnoredFiles:"显示 Git 忽略文件",gitIgnoreSaveFailed:"保存 Git 忽略文件显示设置失败,请重试",gitIgnoreConfigureHint:"长按或右键配置例外",gitIgnoreExceptionsTitle:"Git 忽略过滤例外",gitIgnoreExceptionsHint:"勾选过滤开启时仍需显示的文件或目录。点击目录右侧箭头可进入选择;选中目录会包含所有子项,文件的父目录会自动保留。保存后生效。",gitIgnoreExceptionsPaths:"选择文件或目录",gitIgnoreExceptionsInvalid:"最多选择 200 个文件或目录。",gitIgnoreExceptionsLoadFailed:"无法加载目录,请重试。",gitIgnoreExceptionsEmptyDirectory:"此目录为空",gitIgnoreExceptionsOpenDirectory:({name:e})=>`进入目录 ${e}`,gitIgnoreExceptionsSelected:({count:e})=>`已选 ${e} 项`,gitIgnoreExceptionsClear:"清空选择",gitIgnoreExceptionsRemove:({path:e})=>`移除 ${e}`,gitIgnoreExceptionsTruncated:"此目录项目过多,仅显示部分内容。",gitIgnoreExceptionsSaveFailed:"保存失败,请检查路径是否位于当前目录内(最多 200 个),然后重试。",insertCurrentFolder:"引用当前目录",insertCurrentFolderShort:"引用",pinnedFolders:"固定",unpinFolder:({name:e})=>`取消固定 ${e}`,fileWatchUnavailable:({message:e})=>`文件监听不可用:${e}。可点击手动刷新。`,browsingOutsideProject:"正在浏览当前项目外目录",browsingOutsideProjectHint:"Git 和改动仍使用当前项目;这里引用的文件会按外部路径插入。",toggleSearch:"切换搜索",refreshGit:"刷新 Git 状态",gitLastUpdated:({time:e})=>`上次更新:${e}`,close:"关闭",filterChanges:"过滤改动或文件",searchPlaceholderContent:"在文件内容中搜索…",searchModeName:"文件",searchModeContent:"内容",clearSearch:"清除搜索",searchScope:"范围",searchScopePlaceholder:"相对目录或绝对路径",resetSearchScope:"恢复搜索当前目录",searchOptions:"搜索选项",searchExclude:"排除",searchExcludePlaceholder:"dist/**, *.lock",clearSearchExclude:"清空排除规则",contentSearchOptions:"内容搜索选项",matchCase:"区分大小写",matchWholeWord:"全词",useRegex:"正则",insertGitContext:"把当前 Git 信息插入 Terminal",copyGitContext:"复制 Git 信息",insertChangeAuditPrompt:"解释当前改动",insertChangeAuditPromptTitle:"把更改审计提示词插入当前会话",changeAuditShort:"解释当前改动",changeAuditLoading:"正在加载 hunk 解释…",changeAuditLoaded:({count:e})=>`已加载 ${e} 条 hunk 解释`,changeAuditLoadedAt:({time:e})=>`最近生成 ${e}`,changeAuditRegenerate:"重新生成",changeAuditRefreshStale:"补充失效",changeAuditRefreshStaleTitle:"为已失效的 hunk 解释插入补充生成提示词",clearChangeAudit:"清理改动解释",clearChangeAuditTitle:"清理当前仓库的 hunk 解释",changeAuditClearFailed:({message:e})=>`清理 hunk 解释失败:${e}`,changeAuditScopeAll:"全部仓库",changeAuditScopeLabel:"解释范围",branchAuditTitle:"分支解释",branchAuditShort:"解释分支改动",branchAuditBaseLabel:"基线分支",branchAuditBasePlaceholder:"基线分支,例如 master",branchAuditBaseSearchPlaceholder:"搜索基线分支",branchAuditBaseEmpty:"没有可选分支,可直接输入分支名",branchAuditGenerate:"生成解释",branchAuditRegenerate:"重新生成",branchAuditGenerateTitle:"生成当前分支相对于基线分支的解释提示词",branchAuditViewDiff:"查看对比",branchAuditViewDiffTitle:"查看目标分支相对于基线分支的改动",branchAuditDiffLoading:"正在加载分支对比…",branchAuditDiffEmpty:"当前分支相对于基线分支暂无改动。",branchAuditMissingBase:({repo:e})=>`${e} 未设置基线分支`,branchAuditRefreshDiff:"刷新对比",branchAuditRefreshStale:"补充失效",branchAuditRefreshStaleTitle:"为已失效的分支解释插入补充生成提示词",branchAuditClearTitle:"清理当前分支解释",branchAuditClearFailed:({message:e})=>`清理分支解释失败:${e}`,branchAuditCommitCount:({count:e})=>`${e} 个提交`,branchAuditFileCount:({count:e})=>`${e} 个文件`,branchAuditTruncated:"diff 已截断",branchAuditCurrent:"已保存解释",branchAuditStale:"解释已失效",branchAuditEmpty:"暂无分支解释。生成后会持久化保存,可随时回来查看。",branchAuditView:"查看解释",branchAuditSaved:({count:e})=>`已保存 ${e} 条 hunk 解释`,branchAuditGeneratedAt:({time:e})=>`生成于 ${e}`,insertPreset:({label:e})=>`插入:${e}`,tabChanges:"改动",tabGit:"Git",tabFiles:"文件",tabAndroid:"设备",tabComputer:"电脑",showAndroidTab:"显示设备 Tab",showArchitectureTab:"显示架构 Tab",showComputerTab:"显示电脑 Tab",inserted:"已插入",copied:"已复制",toggleContextDraft:"切换上下文草稿",contextDraftTitle:"上下文草稿",contextDraftHint:"启用后,引用会追加到这里;可以继续浏览、补写描述,最后一次插入。",contextDraftPlaceholder:"在这里组织长提示词,继续点击侧栏中的引用来追加上下文…",contextDraftCollapse:"收起上下文草稿",contextDraftExpand:"展开上下文草稿",contextDraftDisable:"停用上下文草稿",contextDraftClear:"清空草稿",contextDraftInsert:"插入",contextDraftInsertAndSend:"插入并发送",contextDraftInserted:"已插入",contextDraftSent:"已发送",contextDraftSend:"发送草稿",contextDraftAppended:"已追加引用",contextDraftResize:"拖动调整高度,双击恢复默认",contextDraftAutoCollapseAfterSend:"插入/发送后收起",referenceInsertFailed:"未能插入,请检查目标终端连接后重试。",contextDraftInsertFailed:"输入未被接受,草稿已保留。关闭当前表单或返回终端后重试。",contextDraftPending:"等待接收…",contextDraftCharacterCount:({count:e})=>`${e} 字`,selectFilePrompt:"选择文件以预览内容",backToFileList:"返回文件列表",backToPreviousPreview:"返回来源文档",insertLineRef:({lineLabel:e})=>`引用${e}`,insertFileRef:"引用",copyFileRef:"复制文件引用",findInFile:"在文件内查找",findInFilePlaceholder:"在当前文件中查找…",previousSearchMatch:"上一个匹配项",nextSearchMatch:"下一个匹配项",closeFileSearch:"关闭文件搜索",downloadFile:"下载文件",downloadFailed:"下载失败",downloadCanceled:"下载已取消",downloadSaved:"文件已保存",downloadStarted:"浏览器已开始下载",uploadPending:"正在上传…",uploadInserting:"文件已上传,等待输入接收…",uploadDone:({count:e})=>`已上传 ${e} 个文件`,uploadReferenceDone:"文件已上传,引用已添加",uploadReferenceRejected:"文件已上传,引用尚未添加。关闭当前表单或返回原终端后重试。",uploadLimit:"每次最多上传 50 个文件。本次未上传,请重新选择较小批次。",uploadCanceled:"已停止上传。再次上传前请检查目标目录。",uploadFileCount:({count:e})=>`已选择 ${e} 个文件`,uploadFile:"上传文件",uploadFiles:"上传文件",insertLocalFile:"插入本地文件",insertLocalImage:"插入本地图片",layoutMode:"显示模式",layoutModeAuto:"自动",layoutModeNarrow:"窄版",layoutModeWide:"宽版",dropToUpload:"拖放文件以上传",uploading:"上传中…",uploadSuccess:({count:e})=>`已上传 ${e} 个文件`,uploadFailed:"上传失败",binaryPreviewHint:"二进制文件无法预览,请使用上方下载按钮保存到本地",selectedLineHint:({lineLabel:e})=>`已选 ${e} · 点下方「引用」按钮插入`,multiLineHint:"多行引用:先点起始行,再点结束行",loadingImage:"正在加载图片…",imagePreviewHint:"双指捏合或 ⌘/Ctrl + 滚动缩放 · 双击还原",imageLoadFailed:"图片预览加载失败",loadingVideo:"正在加载视频…",videoPreviewHint:"点击播放 · 长按 2× 并前拖提速 · 方向键调进度/音量 · 空格暂停",videoLoadFailed:"视频预览加载失败",videoUnsupported:"当前浏览器不支持该视频格式",videoPlay:"播放",videoPause:"暂停",videoLongPressSpeed:({rate:e})=>`正在 ${e}× 播放`,videoVolume:({percent:e})=>`音量 ${e}%`,videoRotate:"顺时针旋转 90°",videoFullscreenEnter:"全屏播放",videoFullscreenExit:"退出全屏",model3dLoading:"正在加载 3D 模型…",model3dExplode:"爆炸展开",model3dExplodeAxis:"展开方向(查看器坐标)",model3dExplodeAmount:"展开程度",model3dHome:"回正并看全",model3dFit:"看全可见零件",model3dFront:"正视图",model3dTop:"俯视图",model3dRight:"右视图",model3dAssemble:"恢复装配",model3dExplodedNotice:"爆炸展示 · 尺寸与引用仍为原始装配坐标",model3dLoadFailed:"3D 模型预览加载失败",model3dTimeout:"3D 模型传输超时,请检查连接后重试。",model3dDimensions:({dims:e})=>`尺寸: ${e}`,model3dHintMouse:"拖拽旋转 / 双指平移 / 捏合或滚轮缩放",model3dHintTouch:"单指旋转 / 双指缩放平移",model3dFullscreenEnter:"全屏查看",model3dFullscreenExit:"退出全屏",model3dBgToLight:"切换为白底",model3dBgToDark:"切换为黑底",model3dRefresh:"重新加载模型",model3dClipToggle:"切面查看",model3dClipPosition:"切面位置",model3dClipFlip:"反转切面方向",model3dFeatureToggle:"特征标注",model3dFeatureStatus:({total:e,positioned:t})=>`特征: ${e} 个 · 已定位 ${t}`,model3dFeatureInsert:"引用",model3dGlossaryToggle:"建模名词说明",model3dPickToggle:"选择零件 / 引用",model3dPickHint:"点选零件后可临时隐藏,或引用所选位置",model3dHidePart:"隐藏零件",model3dShowAllParts:({count:e})=>`显示全部(${e})`,model3dParts:"零件",model3dCloseParts:"关闭零件列表",model3dSearchParts:"查找零件",model3dClearPartSearch:"清空零件搜索",model3dHiddenParts:({count:e})=>`已隐藏 ${e}`,model3dShowNamedPart:({name:e})=>`显示 ${e}`,model3dHideNamedPart:({name:e})=>`隐藏 ${e}`,model3dIsolateNamedPart:({name:e})=>`只看 ${e}`,model3dIsolatePart:"只看此件",model3dShowPart:"显示零件",model3dNoParts:"没有匹配的零件",model3dUndoVisibility:"撤销",model3dClearSelection:"取消选择",model3dAllPartsVisible:"全部可见",model3dInspectHint:"单指旋转 · 双指缩放平移 · 双击局部放大,双击空白看全",model3dUnnamedPart:({index:e})=>`零件 ${e}`,model3dCanvas:"三维模型",model3dMore:"更多模型选项",edaLoading:"正在渲染 KiCad 文件…",reviewTargetChanged:"当前会话已切换,请回到创建这条引用的会话后再插入。",reviewReference:"审阅引用",reviewReferenceHint:"补充意见后插入,不会自动发送。",reviewSnapshot:"选中位置的视图快照",reviewCapturing:"正在截取当前视图…",reviewIncludeImage:"附带截图(临时保存在当前服务器)",reviewCaptureFailed:"截图未成功,仍可插入定位信息。",reviewNote:"你的意见(可选)",reviewNotePlaceholder:"例如:这里太厚了,能否减薄?",reviewDetails:"查看定位信息和引用原文",reviewUploading:"正在准备引用…",reviewAddToDraft:"加入引用草稿",reviewInsert:"插入引用",reviewUploadFailed:"引用准备失败,意见已保留。请重试,或取消附带截图后只插入文字。",edaLoadFailed:"KiCad 预览渲染失败",edaTimeout:"KiCad 预览生成或传输超时,请重试。",edaRefresh:"重新渲染",edaPickHint:"点击原理图或 PCB 上的问题位置,生成电子标注",edaPickedPosition:({x:e,y:t})=>`已选位置 ${e}%, ${t}%`,edaPickedBoardPosition:({x:e,y:t,object:n})=>`板坐标 ${e}, ${t} mm · ${n}`,edaInspecting:"正在读取板坐标和附近对象…",edaNoNearbyObject:"附近无对象",edaInsertAnnotation:"引用电子标注",csvUnnamedColumn:({index:e})=>`第 ${e} 列`,csvSelectedCell:({row:e,column:t})=>`已选第 ${e} 行 · ${t}`,csvPickHint:({rows:e,columns:t})=>`${e} 条记录 · ${t} 列,点击单元格引用`,csvInsertAnnotation:"引用表格标注",csvTablePreview:"表格预览:点击单元格后可引用完整记录",kicadLocalStateNotice:"这是本机界面状态文件,不参与原理图、PCB 或生产审查。",kicadShowRawJson:"查看原始 JSON",kicadProjectPickHint:"点击一项配置后可插入引用",kicadInsertSetting:"引用配置",markdownPreview:"预览",markdownSource:"源码",markdownParseFailed:"Markdown 预览解析失败或超过限制,已显示原文。",markdownPreviewHint:"点按行/段落引用,再点一行扩选;拖左侧竖条可连续框选",htmlPreview:"预览",htmlSource:"源码",htmlPreviewHint:"HTML 沙箱 iframe 预览,脚本受限",htmlFullscreenEnter:"全屏预览",htmlFullscreenExit:"退出全屏预览",markdownOutline:"Markdown 目录",markdownOutlineShort:"目录",closeMarkdownOutline:"关闭目录",changedFromPath:({path:e})=>`来自 ${e}`,selectedLineFooter:({lineLabel:e})=>`已选 ${e}`,clearSelection:"清除",allChanges:"全部改动",backToChangeList:"返回目录",allRepositories:"全部仓库",allRepositoriesShort:"全部",repositories:"仓库",gitRepositorySectionTitle:"操作仓库",gitRepositoryLabel:"仓库",gitRepositoryPlaceholder:"选择仓库",gitRepositorySearchPlaceholder:"搜索仓库",gitRepositoryEmpty:"没有可操作的仓库",selectRepositoryForGitActions:"请选择一个仓库后再执行 Git 操作",selectRepositoryForDiff:"选择一个仓库或文件查看 diff",repoNotLoaded:"点击加载",repoChangedCount:({count:e})=>`${e} 个改动`,repoStagedCount:({count:e})=>`${e} 已暂存`,noChanges:"没有改动",noMatchingChanges:"没有匹配的改动",loadingGitChanges:"正在加载 Git 改动…",loadingGitChangesSlow:"仓库较大时可能需要几秒。",refreshingGitChanges:"正在刷新 Git 改动…",gitChangesLoadFailed:"无法加载 Git 改动",retryGitChanges:"重试",insertThisFile:"把这个文件引用插入 Terminal",viewDiff:"查看 diff",diffViewMode:"改动文件展示方式",diffViewModeList:"平铺列表",diffViewModeTree:"目录结构",diffViewModeAi:"AI 导览",changeWalkthroughEmpty:"暂无 AI 导览。生成解释后会在这里展示总览、链路和验证点。",gitInfo:"Git 信息",wrapLongLines:"长行换行",wrapOn:"已换行",wrapOff:"原始",multiRepoScan:"扫描子仓库",multiRepoScanTitle:"扫描当前工作区下的嵌套 Git 仓库。关闭时只看单个仓库,大仓库打开更快。",horizontalScrollHint:"左右滑动查看完整 diff",stageFile:"暂存",stageAll:"全部暂存",unstageFile:"取消暂存",stashFile:"贮藏",stashAll:"全部贮藏",restoreFile:"丢弃",gitQuickActions:"Git 操作",gitUnavailable:"当前目录不是 Git 仓库",branchSectionTitle:"当前分支",currentBranchLabel:"分支",switchBranchPlaceholder:"选择分支",switchBranchSearchPlaceholder:"搜索本地分支",switchNoBranches:"没有本地分支",switchBranch:"切换",noStagedChangesShort:"无暂存",stagedCount:({count:e})=>`已暂存 ${e}`,stagedCountShort:({count:e})=>`已暂存 ${e}`,commitSectionTitle:"提交",commitReadyHint:({count:e})=>`${e} 个文件已准备提交`,commitMessagePlaceholder:"提交信息",commitChanges:"提交",commitNeedsStaged:"请先暂存要提交的改动",commitAhead:"↑ 待推送",commitBehind:"↓ 待拉取",commitSynced:"已同步",recentCommitsTitle:"近期提交",recentCommitsSearchPlaceholder:"搜索提交 hash 或信息",recentCommitsLoadMore:"加载更多提交",recentCommitsEmpty:"暂无提交历史",pushSectionTitle:"同步远端",pushRemoteLabel:"Remote",pushRemotePlaceholder:"origin",pushRemoteSearchPlaceholder:"搜索 Remote",pushNoRemotes:"没有 Remote",pushBranchLabel:"目标分支",pushBranchPlaceholder:({branch:e})=>`${e}`,pushBranchSearchPlaceholder:"搜索分支",pushNoBranches:"没有分支",pushUpstreamBadge:"upstream",pushCurrentBranchBadge:"当前",pushNoUpstream:"当前分支未设置 upstream",pushUpToDate:"与远端同步",pushAheadCount:({count:e})=>`领先远端 ${e} 个提交`,pushBehindCount:({count:e})=>`落后远端 ${e} 个提交`,pushDivergedCount:({ahead:e,behind:t})=>`领先 ${e} / 落后 ${t} 个提交`,pullChanges:"拉取",pushChanges:"推送",gitActionRunning:"执行中…",gitActionFailed:({message:e})=>`Git 操作失败:${e}`,confirmRestoreTitle:"确认丢弃改动",confirmRestoreDescription:({path:e})=>`将丢弃 ${e} 的未暂存改动,此操作不可从 Termdock 恢复。`,confirmRestorePhrase:"丢弃改动",confirmRestorePlaceholder:"输入“丢弃改动”确认",confirmStashAllTitle:"确认贮藏全部改动",confirmStashAllDescription:"会把当前工作区改动(包含未跟踪文件)移入贮藏。",confirmAction:"确认",renderingHtml:"正在渲染 HTML…",footnotes:"脚注",backToFootnote:({index:e})=>`返回脚注 ${e}`,openMermaidDiagram:"打开 Mermaid 图表",mermaidDiagram:"Mermaid 图表",renderingDiagram:"正在渲染图表…",markdownImage:"Markdown 图片",image:"图片",previousImage:"上一张图片",nextImage:"下一张图片",closeImagePreview:"关闭图片预览",emptyFile:"空文件。",insertReference:({reference:e})=>`插入引用:${e}`,copyReference:({reference:e})=>`复制引用:${e}`,byteCount:({count:e})=>`${e} 字节`,previewTruncated:"预览已截断至 1 MB",branchCandidatesLoading:"正在加载分支候选…",includeUncommitted:"包含本地未提交改动",includeUncommittedCurrentBranchOnly:"仅当对比分支是当前检出分支时可开启",includeUncommittedHint:"查看对比或生成解释时纳入工作区和未跟踪文件的 diff",missingBaseReposSkipped:({repositories:e})=>`未设置基线的仓库会跳过:${e}`,localBranch:"本地",remoteBranch:"远端"},fileTree:{insertRef:"引用",insertRefTitle:"Insert file reference into active terminal",openDirRoot:"进入",openDirRootTitle:"把这个目录作为当前浏览根目录",openInFileBrowser:"在 Finder 中显示",openInFileBrowserTitle:"在系统文件浏览器中打开这个项目",openInFileBrowserFailed:"打开文件浏览器失败",moreDirActions:"更多目录操作",searchFromDir:"从这里搜索",searchFromDirTitle:"只搜索这个目录及其子目录",pinDir:"固定",pinDirTitle:"固定这个目录到当前项目",unpinDir:"已固定",unpinDirTitle:"取消固定这个目录",pinFileTitle:"固定这个文件到当前项目",unpinFileTitle:"取消固定这个文件",pinFile:"固定",unpinFile:"已固定",moreFileActions:"更多文件操作",deleteFile:"删除文件",deleteFileConfirm:({name:e})=>`确认删除“${e}”?此操作无法撤销。`,deleteFileFailed:({message:e})=>`删除文件失败:${e}`,noWorkingDir:"未检测到工作目录。",emptyDir:"空目录。",noMatchingFiles:"没有匹配的文件。",searching:"正在搜索文件…",searchingWithCount:({count:e})=>`搜索中…已找到 ${e} 项`,searchResults:({count:e})=>`${e} 个结果`,searchScope:"搜索范围",searchTruncatedHint:({count:e})=>`降级搜索已扫描大量目录并在找到 ${e} 项后停止。安装 ripgrep 或输入更精确关键词可获得完整结果。`,searchStillRunning:"搜索仍在进行,更多结果会自动出现。",showingSearchResults:({shown:e,total:t})=>`正在展示 ${e}/${t}`,loadMoreSearchResults:({shown:e,total:t})=>`查看更多(${e}/${t})`,contentMatchesCount:({count:e})=>`${e} 个文件命中`,moreMatches:({count:e})=>`还有 ${e} 处匹配`,noContentMatches:"文件内容中没有匹配。",contentSearchNeedsRipgrep:"内容搜索需要 ripgrep(rg),请在服务端安装后再在文件内搜索。",truncatedHint:"仅展示前 1000 项。使用搜索或打开更小的文件夹以获得更好性能。",dropToUploadHere:"上传到这里",symbolicLink:"符号链接",sortByModified:"按最近修改排序",sortByName:"按名称排序",sortedByModified:"已按最近修改排序"},diffViewer:{noFileChanges:"此文件无改动。",noUnstagedChanges:"没有未暂存的改动。",emptyHint:"做一些改动,或从远程拉取。",loading:"正在加载 diff…",insertAllDiff:"把当前 diff 内容作为上下文插入 Terminal",insertFileDiff:"引用这个文件的 diff",insertHunkDiff:"引用这段 diff hunk",insertLineDiff:"引用选中的这几行 diff",insertHunkShort:"引用",insertFileShort:"引用",insertAllShort:"全部",stageHunk:"暂存",stageHunkTitle:"只把这个 hunk 加入暂存区 (git apply --cached)",revertHunk:"撤销",revertHunkTitle:"撤销这个 hunk 的工作区改动(不可恢复)",revertHunkConfirm:"确认撤销?",hunkActionReverted:"已撤销",hunkActionStaged:"已暂存",hunkActionApplying:"应用中…",hunkActionUnavailable:"无法为这个 hunk 构造补丁",hunkActionFailed:({message:e})=>`操作失败:${e}。如改动已变化,请刷新后重试。`,auditExplanation:"更改意义",auditStale:"解释已失效",auditClear:"清除解释",auditGeneratedAt:({time:e})=>`生成于 ${e}`,allDiffLabel:"全部 diff",allChangesLabel:"全部改动",workingTree:"工作区改动",allUnstaged:"所有未暂存改动",binaryOrEmpty:"没有可显示的文本改动。",noFinalNewline:"文件末尾没有换行符",noHunks:"没有 hunk",hunkOutline:"Hunk 列表",expandHunkRail:"显示 hunk 列表",collapseHunkRail:"隐藏 hunk 列表",prevHunk:"上一个 hunk",nextHunk:"下一个 hunk",prevFile:"上一个",nextFile:"下一个",expandFile:"展开文件",collapseFile:"折叠文件",expandAll:"全部展开",collapseAll:"全部折叠",collapseHunk:"折叠 hunk",useBracketKeysHint:"按 [ / ] 在 hunk 之间跳转",unified:"统一",unifiedMode:"统一视图",split:"分屏",splitMode:"左右分屏视图",moreActions:"更多操作",view:"视图",loadingPreviousFile:"正在加载上一个文件…",loadingNextFile:"正在加载下一个文件…",resizeNavigation:"调整 diff 导航宽度",focusPathHint:"点击标注聚焦路径",whitespace:"空白",whitespaceDefault:"默认",whitespaceTrim:"忽略行尾空白",whitespaceIgnore:"忽略所有空白",whitespaceIgnoreBlankLines:"忽略空行",context:"上下文",expandAbove:({count:e})=>`向上展开 ${e} 行`,expandBelow:({count:e})=>`向下展开 ${e} 行`,contextLines:({count:e})=>`${e} 行`,contextAll:"全部"},settings:{title:"设置",appearanceSection:"外观与终端",controlsSection:"操作与提醒",serviceSection:"服务与诊断",serverHealthRecoveryOn:"自动恢复已开",serverHealthRecoveryOff:"自动恢复未开",serverHealthNeedsAttention:"有异常",font:"字体",render:"渲染",workspaceLimit:"保留服务页面",workspaceUnlimited:"不限制",workspaceLimitHint:"在本机生效,包含入口页面。数量越少越省内存;超限释放最久未用的后台页面,切回时重新连接,终端任务继续运行。",theme:"主题",darkTheme:"深色",lightTheme:"浅色",newTab:"新标签",debug:"调试",noSleep:"常亮",noSleepUnavailable:"无网络 — 已禁用",updateTitle:"Termdock 更新",updateRuntimeTitle:"CLI 与服务 Runtime",updateServiceTitle:"服务更新",updateDetails:"版本详情",updateHint:"手动检查会立即下载并安装新版本;服务只会在你确认后重启。",updateCheck:"检查更新",updateCheckAgain:"再次检查",updateChecking:"正在检查 npm 上的最新版本…",updateCheckingShort:"检查中…",updateInstallingShort:"安装中…",updateCurrent:"当前服务已是最新版本。",desktopUpdateTitle:"macOS 桌面版",desktopUpdateHint:"手动检查 GitHub 发布的签名桌面版本。",desktopUpdateUnsupported:"仅签名安装的 macOS 桌面版支持应用内更新。",desktopUpdateChecking:"正在检查桌面版更新…",desktopUpdateCurrent:"桌面版已是最新版本。",desktopUpdateDownloadingShort:"下载中…",desktopUpdateDownloading:"发现新版本,正在后台下载…",desktopUpdateReady:"桌面版更新已下载,可以重启安装。",desktopUpdateInstalling:"正在重启并安装桌面版更新…",desktopUpdateCheck:"检查桌面版",desktopUpdateCheckAgain:"再次检查",desktopUpdateRestart:"重启并安装",desktopUpdateRestartConfirm:"重启 Termdock 并安装已下载的桌面版更新?终端服务和 tmux 会话不会被停止。",serverHealthTitle:"服务健康",serverHealthHint:"Termdock 服务最近出过什么事。",serverHealthSupervised:"自动恢复已开启:服务崩溃或无响应时会尝试自动重启。",serverHealthUnsupervised:"内置自动恢复未开启,服务异常退出后可能需要手动重启。",serverHealthEnable:"开启并重启",serverHealthEnableHint:"开启后会重启服务并短暂断连。普通终端可能中断,tmux 会话可在重连后恢复。连续多次启动失败时会停止重试。",serverHealthEnabling:"正在开启…",serverHealthEnablePending:"等待服务重连并确认自动恢复状态…",serverHealthEnableError:"未能确认自动恢复已开启。请重连后查看状态;若服务无法连接,请在服务所在设备检查启动日志。",serverHealthEnableUnavailable:"当前启动方式不支持在此开启。请在服务所在设备配置守护启动;桌面版或外部托管服务由原启动程序管理。",serverHealthClean:"没有异常记录。",serverHealthHistory:"历史异常",serverHealthRunningNow:"当前服务正在运行,自动恢复已开启。",serverHealthLastIncident:"最近一次异常",serverHealthRestarted:({count:e})=>`已自动重启 ${e} 次`,serverHealthGaveUp:({count:e})=>`连续失败 ${e} 次后,该守护进程已停止重试。`,serverHealthSupervisorLost:"自动恢复已失效,服务仍在运行。",serverHealthOomNote:"退出前内存接近上限,可能是被 OOM killer 杀掉的。",serverHealthUptime:({duration:e})=>`运行了 ${e}`,serverHealthDismiss:"知道了",serverHealthDismissed:"已确认",serverHealthUnknownEvent:"服务出过问题",serverHealthEventStartupFailure:"启动失败",serverHealthEventCrash:"崩溃退出",serverHealthEventCrashNative:"原生代码崩溃",serverHealthEventKilled:"被强制杀掉",serverHealthEventWedge:"卡死无响应,只能杀掉",serverHealthEventPortConflict:"起不来:端口已被占用",serverHealthEventGaveUp:"当时连续失败,停止重试",serverHealthEventExitZero:"未经要求地以 0 退出",serverHealthEventTerminated:"被其他进程终止",serverHealthEventSupervisorLost:"与监督者失联",serverHealthEventUncaughtException:"触发了未捕获异常",serverHealthEventUnhandledRejection:"有未处理的 Promise 拒绝",serverHealthEventExitNonzero:"以错误码退出",notifications:"通知",notificationsTitle:"通知设置",notificationsHint:"Termdock 在后台时,AI 任务结束后发送系统通知。",notificationsPageHint:"选择哪些 Termdock 事件可以发送系统通知。总开关负责浏览器权限和投递,事件开关决定具体哪些内容提醒你。",notificationsMaster:"系统通知",notificationsMasterHint:"允许 Termdock 在隐藏或作为 PWA 安装运行时发送通知。",notificationsIOSInstallHint:"在 iPhone 或 iPad 上,请先将 Termdock 添加到主屏幕,再开启通知。",notificationsPermission:"权限",notificationsPermissionSystem:"由 macOS 管理",notificationsTest:"发送测试",notificationsTestChecking:"正在等待 macOS 确认投递…",notificationsTestDelivered:"已投递到通知中心;若没有横幅,请检查提醒样式和专注模式。",notificationsTestFailed:"macOS 未投递通知,请在系统设置中允许 Termdock 通知。",notificationsOpenSystemSettings:"打开系统通知设置",notificationsAlertStyle:"提醒方式",notificationsAlertStyleHint:"最终是否横幅弹出仍由浏览器和 Android 系统决定。Termdock 只能请求静默、默认或持续显示等通知选项。",notificationsStyleNormal:"默认",notificationsStyleNormalHint:"允许时声音/震动",notificationsStyleQuiet:"静默",notificationsStyleQuietHint:"仅状态栏,无声音",notificationsStylePersistent:"持续",notificationsStylePersistentHint:"保留到手动关闭",notificationsEvents:"事件",notificationsAiFinished:"AI 任务结束",notificationsAiFinishedHint:"当 Termdock 在后台时,AI agent 停止后发送通知。",notificationsSessionExited:"终端退出",notificationsSessionExitedHint:"终端进程自行结束时发送通知(主动关闭不触发,经 Web Push 投递)。",notificationsFutureHint:"后续可以在这里继续增加更多通知类型,不需要改变顶层设置布局。",notificationsOffSummary:"系统通知已关闭",notificationsAiOnSummary:"AI 任务结束通知已开启",notificationsExitOnSummary:"终端退出通知已开启",notificationsBothOnSummary:"AI 任务结束、终端退出通知已开启",notificationsNoEventsSummary:"暂无开启的通知事件",notificationsDenied:"浏览器通知权限已被阻止,请在站点设置中开启。",notificationsUnsupported:"通知需要安全上下文和 Service Worker 支持。",notificationsTestBody:"通知已开启。后台 AI 任务结束后会提醒你。",shell:"临时会话",tmux:"断线保留",auto:"自动",webgl:"WebGL",canvas:"内置",tmuxServer:"Tmux 服务",tmuxUnavailable:"不可用",noTmuxSessions:"服务端没有 tmux 会话。",installTmuxHint:"请在服务端安装 tmux 后启用。",refresh:"刷新",attached:"已连接",restorable:"可恢复",attach:"连接",attaching:"连接中…",destroy:"销毁",sessions:({n:e})=>`${e} 个会话`,windows:({n:e})=>`${e} 个窗口`,keyboardToolbar:"键盘工具栏",aiAgentDetection:"AI 代理检测",signOut:"退出登录",language:"语言",programNamePlaceholder:"程序名(如 claude)",patternPlaceholder:"正则表达式(如 Thinking|Generating)",statusPlaceholder:"状态",addProgram:"添加程序",addPattern:"添加规则",resetDefaults:"恢复默认",invalidRegex:"无效的正则",removeProgram:"移除程序",removeRule:"移除规则",keepLabel:"保持",customColor:"自定义颜色",tabIndicator:"标签指示器样式",toolbarPresets:"自定义工具栏",detectionRules:"检测规则",agentHooksHint:"安装 hooks 后,agent 会主动上报状态:回合进行中(绿)、等你授权/回答(黄)、回合完成(对勾),并在等待你输入时推送通知。hooks 全局安装但只在 termdock 的终端里生效。",agentHooksInstall:"安装",agentHooksInstalled:"已安装",agentHooksOutdated:"需更新",agentHooksNeedsApproval:"待授权",agentHooksUnverified:"运行状态未确认",agentHooksUnverifiedHint:"配置已写入,但尚未确认 Codex 已启用并信任这些 Hook。请在 Codex 中运行 /hooks 检查。",agentHooksApprovalHint:"在 Codex 中输入 /hooks,批准 Termdock Hook 后生效",agentHooksNotInstalled:"未安装",agentHooksUninstall:"卸载",agentHooksReinstall:"重新安装",agentHooksDevMode:"开发模式:hooks 指向 TS 源码,需要构建后的版本才能生效",agentHooksTarget:"写入",agentAutoRename:"自动更新会话标题",agentAutoRenameHint:"Agent 完成一轮后,根据近期内容更新标题。默认全部关闭,手工命名的会话不会被覆盖;启用外部插件标题后才会执行其 CLI。",agentAutoRenameToggle:"切换此 Agent 的自动标题",agentAutoRenameShort:"自动标题",agentAutoRenameNamer:"起名 Agent",agentAutoRenameFollow:"跟随当前会话",agentAutoRenameModelsFromCli:"模型由本机 CLI 动态提供",agentAutoRenameRefreshModels:"重新查询 CLI 模型",agentAutoRenameCliDefault:"CLI 默认模型",agentAutoRenameAutomatic:"自动选择",agentAutoRenameNoCli:"未检测到可用于起名的 CLI",agentAutoRenameAdvanced:"高级标题偏好",agentAutoRenamePreference:"补充偏好",agentAutoRenamePreferenceHint:"可选。仅补充你对标题风格或重点的偏好;Termdock 的默认起名规则仍会保留。离开输入框时自动保存。",agentAutoRenamePreferencePlaceholder:"例如:突出用户收益;优先使用动宾结构;避免技术术语",agentAutoRenamePayloadLimit:"用户消息上下文上限(字符)",agentAutoRenamePayloadLimitHint:"保留 prompt-submit 原始 payload 的总字符数,默认 12000,可设置 1000–64000。",agentPlugins:"Agent 插件",agentPluginAdd:"添加插件",agentPluginHint:"支持公开或内网 Git(HTTPS、HTTP、SSH)及本地目录。由当前服务电脑拉取,使用该电脑的 Git 凭证和 SSH 配置。Hooks 和标题 CLI 需分别启用。",agentPluginCreate:"创建插件",agentPluginDelete:"删除插件",agentPluginInvalid:"插件配置无效",agentPluginCopyAiPrompt:"复制 AI 修复提示",agentPluginCopied:"已复制",agentPluginSourcePlaceholder:"Git 仓库地址、git@host:team/plugin.git 或本地目录",agentPluginInstallPackage:"安装插件",agentPluginAdvancedManifest:"高级:直接粘贴 manifest.json",agentPluginUpdateAvailable:"有更新",agentPluginManualSource:"手动 manifest",agentPluginUpdate:"更新",agentPluginCheck:"检查更新",agentPluginDoctor:"诊断",agentPluginDoctorHint:"显式运行插件模型探测,不会调用标题生成",agentPluginDoctorStatusOk:"标题与模型能力正常",agentPluginDoctorStatusMissing:"未声明 titleNamer",agentPluginDoctorStatusCliDefault:"标题可用,使用 CLI 默认模型",agentPluginDoctorStatusNoModels:"没有可用的模型数据",agentPluginDoctorStatusFailed:"模型探测失败",agentPluginDoctorModels:"个可用模型",agentPluginDoctorAutomatic:"自动选择",agentPluginDoctorCliDefault:"未指定模型时使用 Agent CLI 默认模型",agentAutoRenameInterval:"重新判断间隔",agentAutoRenameMinutes:"分钟",mobileKeyboard:"移动键盘",saving:"保存中…",rulesHint:"配置正则表达式来识别 AI 工具在终端标签中的状态。每条规则可独立设置标签、颜色、图标样式以及输出静默后指示器保留的时长。停止后若你未查看该标签,标签会保留一个黄色待查看提示。",programsHelp:"支持在一个配置中匹配多个程序,用英文逗号分隔。",programLabelResolution:"程序名识别",rawCommandMapping:"原始命令映射",rawCommandMappingHint:"以下规则将原始命令行映射为标签显示名。用户规则优先于内置规则。",genericProgramNames:"通用程序名",genericProgramNamesHint:"触发 ps 深度识别(如 node, python)",wrapperScriptNames:"包装脚本名",wrapperScriptNamesHint:"CLI 包装器,启动其他工具(如 aiden, npx)",shellNamesConfig:"Shell 名称",shellNamesHint:"从标签显示中过滤(如 bash, zsh)",addTag:"+ 添加",customRules:"自定义规则",addRule:"添加规则",localAccess:"本地访问",localAccessHint:"连接地址与手机访问引导",resetAutoName:"恢复自动",mobileSetupIntro:"手机与此服务需处于同一网络。启用 HTTPS 时,先安装并信任本地 CA 证书,再打开下方访问地址。",mobileSetupDownload:"1. 扫码下载 CA 证书",mobileSetupIos:"iPhone / iPad:用相机扫码后在 Safari 打开。在「设置 → 通用 → VPN 与设备管理」安装已下载的描述文件,再到「设置 → 通用 → 关于本机 → 证书信任设置」开启完全信任。",mobileSetupAndroid:"Android:下载证书后,在系统安全设置中将其安装为 CA 证书。不同品牌的菜单名称可能有所不同。",mobileSetupConnect:"2. 打开 Termdock",mobileSetupConnectHint:"信任证书后,扫描下方 IP 地址二维码,或将本地地址复制到手机浏览器。若域名无法解析,请使用 IP 地址。",onboardingUrl:"手机引导",httpsActive:"HTTPS 已启用",httpsInactive:"HTTPS 未启用",caMissing:"未配置 CA 下载",closeSettings:"关闭设置",desktopTitle:"Termdock 桌面端",desktopStatusLoading:"正在读取 macOS 原生状态…",desktopSwitchService:"切换服务",desktopOpenDataDirectory:"打开数据目录"},toolbarPresets:{toolbarOptions:"工具栏选项",arrangement:"排列",currentLayout:"当前",reorderAction:"拖动 {name} 排序",autoMatch:"自动匹配",manualShort:"手动选择",previewFor:"预览 · {name}",previewTapHint:"点自定义按钮编辑",useInTerminal:"在当前终端使用这套",automatic:"自动(跟随程序)",autoToolbar:"自动跟随程序 · {name}",manualToolbar:"当前工具栏 · {name}",switchToolbar:"切换或自定义工具栏",reloadTitle:"重新读取已保存的配置?",reloadHint:"这会放弃本机尚未保存的修改,改用服务上的最新配置。",staleAction:"此按钮在编辑期间发生了变化。草稿仍保留,请取消后重新打开最新按钮。",previewMobile:"手机",previewDesktop:"电脑",desktopPreviewHint:"电脑工具栏显示这里的按钮,不显示手机主工具栏。",enableDesktop:"这套目前在电脑上隐藏 · 点击显示",done:"完成",confirmChange:"确认",comboHelp:"选择要一起按下的修饰键和按键。",matchedHint:"自动模式下,运行 {programs} 时使用。",intro:"把常用操作放到手边",introHint:"先选要调整的工具栏,再点按钮修改或添加。",chooseToolbar:"要调整哪套工具栏",baseName:"通用终端",autoHint:"这里选择要编辑的工具栏;终端仍按原来的方式选择。",baseHint:"自动模式下,未匹配其他程序时使用这套。",manualHint:"这套需要在终端工具栏的切换菜单中选择。可在更多设置中关联程序。",previewHint:"点按钮即可修改。这里预览展开后的按钮区。",fixedKeysHint:"手机主工具栏的 Esc、Ctrl、粘贴等常用键始终保留。",editAction:"编辑 {name}",newToolbar:"复制为新工具栏",copyName:"{name} 副本",moreSettings:"名称、自动切换与更多设置",appearance:"按钮大小",comfortable:"每行 4 个",balanced:"每行 6 个",compact:"每行 8 个",customLayout:"自定义每行数量",advanced:"高级设置",advancedHint:"仅在需要特殊按键、多步输入或双击操作时使用。",saveAction:"保存按钮",addAction:"添加到工具栏",actionName:"按钮名称",otherKeys:"其他按键",backToKeys:"返回按钮库",addKey:"添加 {key}",keyAlreadyAdded:"{key} 已在工具栏",renameAction:"修改按钮名称",actionType:"点击后做什么",commonKeys:"常用按键",inputText:"命令或文字",combination:"组合按键",rawAction:"自定义序列",chooseKey:"选择一个按键",textContent:"要输入的文字或命令",textPlaceholder:"例如 /compact 或 git status",sendEnter:"输入后按回车",sendEnterHint:"开启后会直接提交命令;关闭则只填入文字。",namePlaceholder:"留空时使用操作名称",draftHint:"保存后才会更新工具栏。取消不会修改原按钮。",pressSummary:"按下 {key}",typeSummary:"输入「{text}」",submitSummary:"输入「{text}」并回车",customSummary:"自定义多步操作",doubleTapSummary:"另有双击操作",doubleTapHelp:"连续点两次时发送的内容。留空则关闭双击操作。",sequenceHelp:"支持 \\r 回车、\\t Tab、\\u001b Esc;用 || 分隔需要间隔发送的步骤。",emptyAction:"请先选择按键或填写文字。",removeButton:"删除按钮",lastButton:"至少保留一个按钮",undo:"撤销",changed:"已更新工具栏",removed:"已删除按钮",restoreToolbar:"恢复这套的默认按钮",restoreAll:"恢复所有默认工具栏",restoreTitle:"恢复所有默认工具栏?",restoreHint:"自定义工具栏和修改都会被替换。恢复后仍可撤销。",deleteTitle:"删除这套工具栏?",deleteHint:"对应程序会改用其他匹配的工具栏或通用终端。删除后可撤销。",defaultsHint:"当前使用默认按钮,修改时会保留其他按键。",sharedHint:"配置保存在当前服务,连接此服务的设备共享。",saving:"正在保存…",saved:"已保存",loading:"正在读取工具栏…",saveFailed:"尚未保存到服务,请重试。",loadFailed:"未能读取已保存的配置,请重试后再编辑。",conflict:"另一台设备刚修改了配置,请重新读取后再编辑。",reload:"重新读取",configure:"自定义工具栏…",entryHint:"增删按钮、调整顺序与大小",programNames:"在哪些程序中自动使用",programHint:"输入程序名后回车,例如 codex 或 vim。留空则手动选择。",programPlaceholder:"输入程序名称",layoutHint:"按按钮数量自动换行,不必计算空位。",key_interrupt:"停止当前运行",key_tab:"补全 / 切换",key_enter:"确认 / 回车",key_escape:"取消 / 返回",key_clear:"清空屏幕",key_search:"搜索命令历史",key_up:"向上 / 上条历史",key_down:"向下 / 下条历史",key_left:"光标向左",key_right:"光标向右",key_home:"移到行首",key_end:"移到行尾",key_shiftLeft:"Shift + 向左",key_deleteLine:"删除光标前内容",key_eof:"结束输入",preview:"预览",presets:"工具栏",label:"标签",new:"新建",reset:"重置",presetLabelPlaceholder:"预设名称",deletePreset:({name:e})=>`删除预设 ${e}`,matchPrograms:"匹配程序",typeEnterHint:"输入后回车",programsPlaceholder:"vim, nvim, /^claude(-code)?$/i …",programsHelp:"纯字符串按大小写不敏感子串匹配。用 /…/flags 包裹则为正则(针对小写程序名测试)。",altSlot:"Alt 修饰键槽",altSlotHint:"在预览中保留一个 Alt 键槽位。",desktopVisibility:"桌面端显示",desktopVisibilityHint:"桌面端只显示该预设的自定义按钮,不显示基础快捷键。",rowLayout:"行布局",rowLayoutHint:"每行按钮数。",addRow:"行",rowN:({n:e})=>`第 ${e} 行`,del:"删",buttons:"按钮",buttonsHint:"点击编辑,使用 ↑↓ 排序。",addButton:"添加按钮",noCustomButtons:"暂无自定义按钮。添加一个来覆盖默认工具栏。",moveUp:"上移",moveDown:"下移",removeRow:({n:e})=>`移除第 ${e} 行`,removeAction:({name:e})=>`移除 ${e}`,labelField:"标签",labelPlaceholder:"按钮上显示的文本",sequence:"序列",keyCombo:"组合键",comboKey:"按键",namedKeys:"方向与控制键",functionKeys:"功能键",characterKeys:"字母、数字与符号",insertCombo:"插入组合键",keyComboHint:"选择修饰键和按键,追加到当前序列末尾。具体效果由终端程序决定。",unsupportedCombo:"终端无法区分此组合键,请调整修饰键或按键。",sequencePlaceholder:"例如 /undo 或 \\t 或 /||undo",sequenceHint:"双击序列",doubleTap:"双击序列",doubleTapAdd:"+ 添加",doubleTapPlaceholder:"例如 /undo\\r 或 /||undo ||\\r",remove:"移除",noSequence:"无序列",preset:"预设",overCapacityHint:"按钮数超过槽位,多余按钮将使用最后一行的尺寸。"},agentRules:{ruleColors:{green:"绿",yellow:"黄",red:"红",blue:"蓝",purple:"紫",orange:"橙",gray:"灰"}},tab:{session:"会话",new:"新建会话",rename:"重命名",renameHint:"修改标签的显示名称",renamePlaceholder:"留空则恢复默认名称",copyCwd:"复制当前目录",copyCwdHint:"复制当前工作目录",closeMenu:"关闭菜单",openGroup:"打开协作组",leaveGroup:"退出协作组",leaveGroupShortHint:"保留终端,仅退出这个协作组",leaveGroupConfirm:"确认退出",leaveGroupQuestion:({name:e})=>`让这个会话退出“${e}”?`,leaveGroupHint:"终端继续运行,其他成员和历史消息会保留。退出后不再接收这个组的新消息,可以重新加入。",leavingGroup:"正在退出…",leaveGroupFailed:"退出失败,请重试",fontSize:"字体大小",fontSizeHint:"仅对这个会话生效",fontSizeReset:"跟随全局",resumeAgent:"恢复 Agent 会话",resumeAgentHint:"用原生 session id 恢复上次对话",resumeAgentAvailable:"有可恢复的 Agent 对话",resumeAgentRecoveredTitle:({agent:e})=>`可继续上次的 ${e} 对话`,resumeAgentRecoveredHint:"Terminal 曾异常中断,已重新创建;可以从上次对话继续。",resumeAgentNow:"恢复",resumeAgentLater:"暂不恢复",resumeAgentSubmitting:"正在提交原生恢复命令…",resumeAgentWaiting:"正在等待 Agent 确认已载入原会话…",resumeAgentSuccess:({agent:e})=>`${e} 会话已恢复`,resumeAgentFailed:"Agent 会话恢复失败,可以重试。",resumeAgentConflict:"该 Agent 会话已在另一个 Terminal 中打开。",resumeAgentBusy:"当前 Agent 回合尚未结束,暂时不能恢复。",resumeAgentTimeout:"Agent 未确认已载入原会话,请查看 Terminal 输出或重试。",tmuxRecoveryTitle:({count:e})=>`终端中断,${e} 个对话待接回`,tmuxRecoveryHint:"接回原对话,保留历史。进度会持续显示。",tmuxRecoveryRestoreAll:"恢复全部",tmuxRecoveryRestoring:"正在恢复…",tmuxRecoveryDismiss:"暂不处理",tmuxRecoveryPartial:({restored:e,failed:t})=>`已接回 ${e} 个 · 失败 ${t} 个`,tmuxRecoveryFailed:"恢复失败,请检查终端状态后重试。",tmuxRecoveryDismissFailed:"暂时无法关闭该恢复提示。",tmuxRecoveryProgress:({total:e,queued:t,paused:n,resourceWait:r,running:o,succeeded:s,failed:i})=>`恢复进度:总计 ${e} · 排队 ${t} · 暂停 ${n}(资源等待 ${r}) · 执行中 ${o} · 完成 ${s} · 失败 ${i}`,tmuxRecoveryPausedForResources:"资源不足,已暂停启动;资源恢复后会自动继续。",tmuxRecoveryPause:"暂停",tmuxRecoveryResume:"继续",tmuxRecoveryInProgress:"恢复进行中",tmuxRecoveryDetails:"受影响的对话",tmuxRecoveryDiagnostics:"查看恢复详情",tmuxRecoveryWaiting:"等待接回",tmuxRecoveryDone:"已接回",tmuxRecoverySuccess:({count:e})=>`${e} 个原对话已接回`,tmuxRecoveryReturn:"返回恢复",tmuxRecoveryInspect:"查看终端",tmuxRecoveryRetryFailed:"重试失败会话",copied:"已复制",close:"关闭会话",closeHint:"从列表移除该标签",longPressTip:"提示:按住标签不动约半秒打开操作菜单,按住并拖动可排序。",sessionsTitle:"会话",explorerTitle:"资源管理器",split:"分屏",splitTitle:"添加到分屏工作区",closeFailed:({name:e})=>`未能关闭「${e}」。会话仍保留,请重试。`,splitNew:"新建会话并加入",splitNewHint:"沿用当前目录和默认会话类型;可连续加入多个会话",splitExisting:"选择已有会话或工作区",splitExistingHint:"会话可组成多个独立工作区;选择另一工作区会将两组合并",splitCurrent:"当前",splitClose:"退出分屏",splitLayout:"分屏布局",splitHorizontal:"左右",splitVertical:"上下",splitGrid:"网格",splitWorkspace:"分屏组",splitWorkspaces:"分屏工作区",splitRename:"重命名分屏组",splitRemovePane:"移出分屏",splitExistingGroups:"已有分屏组",splitAvailableSessions:"可加入的会话",splitOccupied:"已成组",splitUnavailableGrouped:"分组模式下只能分屏同一目录的会话",splitEndedGrouped:"已退出分屏:分组模式不支持跨目录组合",splitNoOtherSessions:"没有可组合的其他会话",sessionCount:({count:e})=>`${e} 个会话`,closeChooserTitle:"销毁 Tmux 会话?",closeChooserDescription:"确认后会终止该会话及其中的所有进程,此操作无法撤销。",destroySession:"销毁会话",confirmDestroySession:"确认销毁",destroySessionHint:"终止 tmux 会话及其中的所有进程。",dragToClose:"拖到此处关闭",releaseToClose:"松手后确认"},agent:{aiRunning:"AI 运行中",recentActivity:"会话有新动态",needsReview:"需要查看",finishedReview:"AI 已完成 — 需要查看",chatUnread:"{count} 条未读消息",aiWaiting:"AI 等待中",copyMode:"Copy 模式",jumpToNext:"跳到下一个待处理",jumpToNextRunning:"跳到下一个运行中会话",selectRunningSession:"选择运行中的 Session",runningSessionGestureHint:"轻点循环 · 横向滑动选择 · 长按拖动",currentSession:"当前"},serviceAttention:{title:"所有服务的待处理",summary:"{services} 个服务 · {count} 个会话",currentService:"当前服务",waiting:"等待你处理",offline:"连接已断开 · 显示上次状态",login:"需要重新登录 · 显示上次状态",empty:"暂时没有待处理会话",viewService:"进入服务查看",scope:"汇总已打开的服务,点会话直接进入",changed:"待处理状态已更新,请重新选择。",unavailable:"暂时无法打开该服务,请从服务列表重试。"},connection:{reconnecting:"正在重连…"},desktopServices:{switchService:"切换 Termdock 服务",openServices:"已打开的服务",idle:"空闲",manageServices:"管理服务与名称"},terminal:{input:"终端输入",error:"错误",dropFilesToPastePaths:"拖放文件以输入路径",loading:"正在加载终端…",initializing:"正在初始化终端引擎…",failedToLoad:"终端加载失败",unknownError:"发生未知错误",componentFailed:"终端组件加载失败",paste:"粘贴",copied:"已复制",copyFailed:"复制失败",longPressSelectsText:"长按选择文本",longPressSendsArrows:"长按发送方向键",switchLongPressToArrows:"将长按切换为方向键",switchLongPressToCopy:"将长按切换为复制所选文本"},quota:{title:"订阅配额",noProviders:"未检测到订阅服务。",noProvidersHint:"使用 AI 编程工具并登录后,自动显示配额信息。",exhausted:"已用完",left:({n:e})=>`剩余 ${e}`,updated:({time:e})=>`${e} 更新`,refresh:"刷新",close:"关闭"},errorBoundary:{title:"出现了一些问题",unexpected:"发生意外错误",retry:"重试",copyDetails:"复制错误信息",copied:"已复制",copyFailed:"复制失败"},error:{type:{network:"网络连接错误",session:"会话错误",terminal:"终端错误",auth:"认证错误",validation:"验证错误",unknown:"未知错误"},severity:{low:"提示:",medium:"警告:",high:"错误:",critical:"严重错误:"},suggestion:{networkCheck:"检查网络连接",networkRetry:"尝试重新连接",networkProxy:"检查代理设置",networkWait:"等待网络恢复",sessionRecreate:"重新创建会话",sessionServer:"检查服务器状态",sessionCache:"清理浏览器缓存",terminalRestart:"重启终端",terminalConfig:"检查终端配置",terminalClear:"清除终端输出",authRelogin:"重新登录",authCredentials:"检查凭证",authAdmin:"联系管理员",validationFormat:"检查输入格式",validationParams:"验证参数",validationDocs:"参考文档",unknownReload:"刷新页面",unknownApp:"重启应用",unknownSupport:"联系技术支持"}}},$S=["en","zh"],Lo="en",fd=new WeakMap;let zS=0;function qS(e,t,n){const r=fd.get(e);if(!r?.pending||r.pending.id!==t)return;const o=performance.now();if(!document.hidden&&o-r.lastPoll<2500){const s=o-r.pending.sentAt;r.samples.push(s<8e3?s:null),r.samples=r.samples.slice(-20),s<8e3&&(r.lastReply=o,r.handlerMs=typeof n=="number"&&Number.isFinite(n)&&n>=0&&n<=s?n:void 0)}r.pending=void 0}function KS(e){const t={connected:!1,rtt:null,average:null,jitter:null,timeouts:0,samples:0,waiting:!1};if(!e||e.readyState!==WebSocket.OPEN)return t;const n=performance.now();let r=fd.get(e);if(r||(r={lastPoll:n,lastSent:-1/0,lastReply:-1/0,samples:[]},fd.set(e,r)),(document.hidden||n-r.lastPoll>=2500)&&(r.pending=void 0,r.lastSent=-1/0,r.lastReply=-1/0),r.lastPoll=n,!document.hidden&&(r.pending&&n-r.pending.sentAt>=8e3&&(r.samples.push(null),r.samples=r.samples.slice(-20),r.pending=void 0),!r.pending&&n-r.lastSent>=5e3)){const d=`quality-${++zS}`;r.pending={id:d,sentAt:n},r.lastSent=n;try{e.send(JSON.stringify({type:"ping",qualityProbeId:d}))}catch{return r.pending=void 0,t}}const o=r.samples.filter(d=>d!==null),s=r.samples[r.samples.length-1],i=n-r.lastReply<15e3,a=o.slice(1).map((d,u)=>Math.abs(d-o[u])),c=[...o].sort((d,u)=>d-u);return{diagnostics:e.getConnectionDiagnostics?.(),minimum:c[0],maximum:c[c.length-1],p95:c[Math.ceil(c.length*.95)-1],history:[...r.samples],handlerMs:i&&s!=null?r.handlerMs:void 0,lastReplyAgeMs:Number.isFinite(r.lastReply)?n-r.lastReply:void 0,connected:!0,rtt:i&&s!=null?Math.round(s):null,average:o.length?Math.round(o.reduce((d,u)=>d+u,0)/o.length):null,jitter:a.length?Math.round(a.reduce((d,u)=>d+u,0)/a.length):null,timeouts:r.samples.length-o.length,samples:r.samples.length,waiting:!!r.pending&&n-r.pending.sentAt>=1500}}function Fu(e){return e.displayName?.trim()?{displayName:e.displayName,displaySubtitle:e.displaySubtitle??null}:vw({name:e.name,sessionId:e.sessionId,agent:e.agent})}const wc=new Set(["bash","zsh","fish","sh","dash","ksh","tcsh","csh","nu"]);function _i(e){if(!e)return null;if(e==="/")return"/";const t=e.replace(/\/+$/,"").split("/");return t[t.length-1]||e}function GS(e,t,n,r=wc,o=null,s=null){if(e.customName&&e.name.trim())return{primary:e.name,secondary:_i(n)};if(o){const d=_i(n),u=o===n||o===d;if(s!=="idle"&&!r.has(o)&&!u)return{primary:o,secondary:d}}if(t&&!r.has(t))return{primary:t,secondary:_i(n)};const i=_i(n);if(i)return{primary:i,secondary:null};const a=e.name.trim(),c=/^(?:tmux:|remote:|wt-)/i.test(a)||a===e.sessionId||a===e.id;return{primary:a&&!c?a:e.agent?.displayName||"终端会话",secondary:null}}function vw(e,t=wc){const{primary:n,secondary:r}=GS(e,e.activeProgram??null,e.cwd??null,t,e.shellTitle??null,e.promptState??null);return{displayName:n,displaySubtitle:r}}function WS(e){const t=e.serviceLabel?.trim();if(!t||/^https?:\/\//i.test(t)||t===e.serviceOrigin)return"远端服务";try{const n=new URL(e.serviceOrigin??"");if(t===n.host||t===n.hostname)return"远端服务"}catch{}return t}function $M(e,t){const n=s=>Fu(s).displayName,r=n(e),o=t.filter(s=>n(s)===r);return o.length>1?`${r} ${o.findIndex(s=>s.sessionId===e.sessionId)+1}`:r}function zM(e){return e.serviceConnected===!1||["offline","disconnected","service-unreachable","closed","exited"].includes(e.status??"")?"disconnected":e.serviceConnected===!0?"connected":"unknown"}const xw={RELAY_AUTHORIZATION_REQUIRED:"没有有效中转授权",TARGET_AUTHORIZATION_REQUIRED:"目标服务需要重新登录",PERMISSION_DENIED:"当前权限不允许此操作",TARGET_IDENTITY_MISMATCH:"服务身份与保存的身份不一致",RELAY_SELF_TARGET:"不能通过服务中转到其自身;同一服务的其它地址请添加为备用地址。",TARGET_PASSWORD_REQUIRED:"目标服务未配置有效访问密码,已禁用中转。请让目标服务管理员先配置访问密码。",TARGET_SECURITY_UPGRADE_REQUIRED:"中转服务版本不支持密码保护核验,已禁用中转。请更新目标服务和中继程序。"};class ut extends Error{constructor(t,n={}){super(xw[t]),this.code=t,this.context=n}code;context;name="ConnectionAccessError"}function _r(e,t={}){if(e instanceof ut)return Object.assign(e.context,{...t,...e.context}),e;if(e instanceof Error&&(e.message==="TARGET_PASSWORD_REQUIRED"||e.message==="TARGET_SECURITY_UPGRADE_REQUIRED"))return new ut(e.message,t);if(e instanceof Error&&e.name==="ConnectionAccessError"&&"code"in e&&typeof e.code=="string"&&Object.hasOwn(xw,e.code))return new ut(e.code,t);if(e instanceof Error&&e.name==="UnexpectedPeerError")return new ut("TARGET_IDENTITY_MISMATCH",t)}function Uu(e,t){return e instanceof Error&&(e.message==="TARGET_PASSWORD_REQUIRED"||e.message==="TARGET_SECURITY_UPGRADE_REQUIRED")?new ut(e.message,t):e instanceof Error&&(e.message==="AUTHORIZATION_DENIED"||e instanceof ut&&e.code==="PERMISSION_DENIED")?new ut("RELAY_AUTHORIZATION_REQUIRED",t):e instanceof Error?e:new Error("中转连接暂不可用")}const Lr=4;function ze(e){if(typeof e!="string"||!e.trim()||e.length>2048)throw new Error("请输入服务地址。");const t=e.trim(),n=new URL(/^[a-z][a-z\d+.-]*:\/\//i.test(t)?t:`https://${t}`);if(n.protocol==="wss:"&&(n.protocol="https:"),n.protocol==="ws:"&&(n.protocol="http:"),!["https:","http:"].includes(n.protocol))throw new Error("请使用 HTTP 或 HTTPS 服务地址。");if(n.username||n.password||n.search||n.hash||!["/","/api/federation/secure"].includes(n.pathname))throw new Error("请输入服务首页地址,不要包含账号或额外参数。");return n.origin}function Hu(e){if(e.entryServiceId&&e.entryServiceId===e.targetPeerId)throw new ut("RELAY_SELF_TARGET",{entryServiceId:e.entryServiceId,targetServiceId:e.targetPeerId});const t=Array.isArray(e.routes)?e.routes.slice(0,64):[];e.entryServiceId&&t.unshift({url:e.url,targetPeerId:e.entryServiceId});const n=new Set;return t.flatMap(r=>{try{if(!r||typeof r.targetPeerId!="string"||!/^[a-zA-Z0-9_.:-]{1,160}$/.test(r.targetPeerId))return[];const o=ze(r.url),s=JSON.stringify([r.targetPeerId,o]);return n.has(s)?[]:(n.add(s),[{url:o,targetPeerId:r.targetPeerId}])}catch{return[]}}).slice(0,Lr)}function Sw(e){return Hu(e).filter(t=>t.targetPeerId!==e.targetPeerId)}function Ew(e){const t=Hu(e),n=new Set(t.filter(s=>s.targetPeerId!==e.targetPeerId).map(s=>s.url)),r=[e.serviceOrigin||e.url,...t.filter(s=>s.targetPeerId===e.targetPeerId).map(s=>s.url)],o=new Set;for(const s of r)try{const i=ze(s);n.has(i)||o.add(i)}catch{}return[...o]}function VS(e,t,n=new Set){return Ew(e).length>0||!!t&&Sw(e).some(r=>r.targetPeerId!==t&&!n.has(r.targetPeerId))}function Sa(e){const t={...e,url:ze(e.url)},n=Hu(e);if(e.routes!==void 0&&(t.routes=n),e.serviceOrigin){const r=ze(e.serviceOrigin);n.some(o=>o.targetPeerId!==e.targetPeerId&&o.url===r)?delete t.serviceOrigin:t.serviceOrigin=r}return t}function YS(e,t="secure"){const n=new URL(ze(e));return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.pathname=`/api/federation/${t}`,n}const bc="termdock.federation.connections.v1",hd="termdock:services-changed",$u="termdock-secure-removed-services",Ea=e=>[e.id,e.targetPeerId,e.serviceOrigin||e.url].filter(t=>!!t);function zu(){try{const e=JSON.parse(localStorage.getItem($u)||"[]");return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}catch{return[]}}function Mn(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.url=="string")try{const n=ze(t.url),r=typeof t.targetPeerId=="string"&&t.targetPeerId?t.targetPeerId:void 0,o=(typeof t.label=="string"?t.label:typeof t.serviceName=="string"?t.serviceName:"").trim().slice(0,120)||new URL(n).host;return Sa({id:typeof t.id=="string"&&t.id?t.id:r||n,url:n,label:o,...r?{targetPeerId:r}:{},...typeof t.serviceOrigin=="string"?{serviceOrigin:ze(t.serviceOrigin)}:{},...typeof t.entryServiceId=="string"&&t.entryServiceId?{entryServiceId:t.entryServiceId}:{},...Array.isArray(t.routes)?{routes:t.routes.slice(0,Lr).flatMap(s=>{try{return s&&typeof s.targetPeerId=="string"&&s.targetPeerId?[{url:ze(s.url),targetPeerId:s.targetPeerId}]:[]}catch{return[]}})}:{}})}catch{return}}function sn(e,t){return e.targetPeerId&&t.targetPeerId?e.targetPeerId===t.targetPeerId:(e.serviceOrigin||e.url)===(t.serviceOrigin||t.url)}function kw(e){const t=[];for(const n of e){const r=t.findIndex(o=>sn(o,n));r<0?t.push(Sa(n)):t[r]=Sa({...t[r],...n,id:t[r].id})}return t}function li(){return typeof window>"u"?void 0:window.termdockDesktop}function Dr(){try{const e=JSON.parse(localStorage.getItem(bc)||"[]");return Array.isArray(e)?kw(e.map(Mn).filter(t=>!!t)):[]}catch{return[]}}function Iw(e){localStorage.setItem(bc,JSON.stringify(e.map(t=>({...t,serviceName:t.label})))),window.dispatchEvent(new Event(hd))}let ns;async function mt(){const e=li();if(!e?.serviceConnections||!e.saveServiceConnection)return Dr();if(ns)return ns;ns=(async()=>{let t=await e.serviceConnections();const n=Dr();for(const r of n)t.some(o=>sn(o,r))||(t=await(e.importServiceConnection||e.saveServiceConnection)(r));return n.length&&localStorage.removeItem(bc),t.map(Mn).filter(r=>!!r)})();try{return await ns}finally{ns=void 0}}async function Bn(e){if(e.entryServiceId&&e.entryServiceId===e.targetPeerId)throw new Error("不能保存服务到自身的中转;请将其它地址添加为备用地址。");const t=Mn(e);if(!t)throw new Error("服务地址无效。");const n=li();if(n?.saveServiceConnection)return(await n.saveServiceConnection(t)).map(Mn).filter(a=>!!a);const r=Dr(),o=r.find(a=>a.id===t.id||sn(a,t)),s=new Set([...Ea(t),...o?Ea(o):[]]);localStorage.setItem($u,JSON.stringify(zu().filter(a=>!s.has(a))));const i=kw([...r.filter(a=>a!==o),Sa({...o,...t,id:o?.id||t.id})]);return Iw(i),i}async function XS(e){if(e.entryServiceId&&e.entryServiceId===e.targetPeerId)throw new Error("不能保存服务到自身的中转;请将其它地址添加为备用地址。");const t=Mn(e);if(!t)throw new Error("服务地址无效。");const n=li();if(n?.importServiceConnection)return(await n.importServiceConnection(t)).map(Mn).filter(r=>!!r);if(n?.serviceConnections){const r=await n.serviceConnections();return r.some(o=>sn(o,t))?Bn(t):r}return Ea(t).some(r=>zu().includes(r))?Dr():Bn(t)}async function JS(e){const t=li();if(t?.removeServiceConnection)return(await t.removeServiceConnection(e)).map(Mn).filter(s=>!!s);const n=Dr(),r=n.find(s=>s.id===e);r&&localStorage.setItem($u,JSON.stringify([...new Set([...zu(),...Ea(r)])].slice(-768)));const o=n.filter(s=>s.id!==e);return Iw(o),o}function di(e){const t=r=>{(r.key===bc||r.key===null)&&e()};window.addEventListener(hd,e),window.addEventListener("storage",t);const n=li()?.onServiceConnections?.(e);return()=>{window.removeEventListener(hd,e),window.removeEventListener("storage",t),n?.()}}function Ss(e){if(!e.startsWith("remote:"))return null;const t=e.slice(7).split(":");if(t.length!==2)return null;try{const n=decodeURIComponent(t[0]),r=decodeURIComponent(t[1]);return!r||new URL(n).origin!==n||!/^https?:/.test(n)?null:{origin:n,id:r}}catch{return null}}class ZS{constructor(t){this.source=t,this.peers={state:t.peerProtocol==="unsupported"?"unsupported":t.readPeers?"loading":"unavailable",checkedAt:null}}source;local=null;remote=[];peers;localInFlight=null;peerInFlight=null;listeners=new Set;disposed=!1;peerTimer;lastPeerAttempt=-1/0;generation=0;localHealthy=!1;subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}snapshot(){if(!this.local)return null;const t=new Map;for(const n of this.local.groups)for(const r of n.remoteSessions??[]){const o=Ss(r.sessionId);o&&o.origin!==this.source.origin&&o.origin!==this.source.peerOrigin&&t.set(r.sessionId,{...r,status:"offline",serviceConnected:!1})}for(const n of this.remote)t.set(n.sessionId,n);for(const n of this.local.sessions){const r=Ss(n.sessionId);t.set(n.sessionId,r&&r.origin!==this.source.origin&&r.origin!==this.source.peerOrigin?{...n,status:"offline",serviceConnected:!1}:n)}for(const n of this.remote){const r=this.peers.services?.find(o=>o.origin===n.serviceOrigin||o.origin===Ss(n.sessionId)?.origin);t.set(n.sessionId,r?.connected===!1?{...n,status:"offline",serviceConnected:!1}:n)}return{groups:this.local.groups.map(n=>({...n,remoteSessions:n.remoteSessions?.map(r=>t.get(r.sessionId)??r)})),sessions:[...t.values()],peers:this.peers,capabilities:this.local.capabilities}}emit(){if(this.disposed||!this.localHealthy)return;const t=this.snapshot();if(t)for(const n of this.listeners)n(t)}load(){if(this.disposed)return Promise.reject(new Error("协作连接已切换,请重新加载"));if(this.localInFlight)return this.localInFlight;this.refreshPeers();const t=this.generation,n=Promise.resolve().then(()=>this.source.readLocal()).then(r=>{if(this.disposed)throw new Error("协作连接已切换,请重新加载");if(t!==this.generation)return this.load();if(!Array.isArray(r.groups)||!Array.isArray(r.sessions))throw new Error("协作会话响应无效,请更新服务后重试");return this.local=r,this.localHealthy=!0,this.emit(),this.snapshot()}).catch(r=>{throw t===this.generation&&(this.localHealthy=!1,this.remote=this.remote.map(o=>({...o,status:"offline",serviceConnected:!1}))),r}).finally(()=>{this.localInFlight===n&&(this.localInFlight=null)});return this.localInFlight=n,n}invalidate(){this.generation++,this.localInFlight=null,this.localHealthy=!1}refreshPeers(t=!1){if(this.disposed||!this.source.readPeers||this.peerInFlight||!t&&Date.now()-this.lastPeerAttempt<2e3)return;this.lastPeerAttempt=Date.now(),this.peers.checkedAt||(this.peers={state:"loading",checkedAt:null}),this.emit();const n=this.source.readPeers;this.peerInFlight=Promise.race([Promise.resolve().then(()=>n()),new Promise((r,o)=>{this.peerTimer=setTimeout(()=>o(new Error("服务端协作目录加载超时,请检查服务连接")),2e4)})]).then(r=>{if(this.disposed)return;const o=r.origin===this.source.origin||!!this.source.peerOrigin&&r.origin===this.source.peerOrigin;if(!Array.isArray(r.sessions)||this.source.peerProtocol==="v2"&&(r.protocolVersion!==2||!o)||r.origin&&!o||r.protocolVersion!==void 0&&r.protocolVersion!==2)throw new Error("协作目录响应与当前服务不匹配,请升级服务后重试");this.remote=r.sessions.filter(i=>{const a=Ss(i.sessionId);return a&&a.origin!==this.source.origin&&a.origin!==this.source.peerOrigin});const s=r.services?.filter(i=>i.origin!==this.source.origin&&i.origin!==this.source.peerOrigin);this.peers={state:s?.some(i=>!i.connected)?"partial":"ready",checkedAt:Date.now(),services:s,removedServices:r.removedServices}}).catch(r=>{this.disposed||(this.remote=this.remote.map(o=>({...o,status:"offline",serviceConnected:!1})),this.peers={state:"error",checkedAt:Date.now(),error:r instanceof Error?r.message:"跨服务会话加载失败"})}).finally(()=>{clearTimeout(this.peerTimer),this.peerInFlight=null,this.emit()})}dispose(){this.disposed=!0,clearTimeout(this.peerTimer),this.listeners.clear(),this.local=null,this.remote=[]}}const ka=e=>`@collaboration:${e}`,Cw=dr(e=>({activePaneId:null,setActivePane:t=>e({activePaneId:t}),docks:{},hosts:{},setDock:(t,n)=>e(r=>{const o={...r.docks};return n?o[t]=n:delete o[t],{docks:o,...!n&&r.activePaneId===ka(t)?{activePaneId:r.docks[t]?.sessionId??null}:{}}}),setHost:(t,n)=>e(r=>{const o={...r.hosts};return n?o[t]=n:delete o[t],{hosts:o}})})),mr=new Map;let Ia;function Rw(){const e=Cw.getState().activePaneId,t=mr.get(Ia??"");if(t?.requiresFocus&&e===ka(t.paneKey))return t.receive;for(const n of mr.values())if(n.requiresFocus&&e===ka(n.paneKey))return n.receive;return t&&!t.requiresFocus?t.receive:void 0}function QS(e){const t=mr.get(e);t&&(Ia=e,Cw.getState().setActivePane(t.requiresFocus?ka(t.paneKey):null))}function eE(e){const t=Rw();return!t||!e?!1:(t(e),!0)}function qM(e,t="default",n=!1,r=t){mr.set(t,{receive:e,requiresFocus:n,paneKey:r}),n||QS(t);const o=s=>{const{text:i,nonce:a}=s.detail??{};!i||Rw()!==e||(e(i),s.stopImmediatePropagation(),a&&window.dispatchEvent(new CustomEvent("termdock-insert-reference-ack",{detail:{nonce:a,ok:!0}})))};return window.addEventListener("termdock-insert-reference",o,!0),()=>{mr.get(t)?.receive===e&&(mr.delete(t),Ia===t&&(Ia=[...mr.keys()].at(-1))),window.removeEventListener("termdock-insert-reference",o,!0)}}const tE=/^[A-Za-z0-9_@%+=:,./-]$/;function Tw(e){return Array.from(e,t=>(t.codePointAt(0)??0)>127||tE.test(t)?t:`\\${t}`).join("")}let nE=0;function rE(e,t){if(!t)return!1;try{const n=new URL(t.serviceOrigin||t.url);return n.origin===e&&/^(localhost|\[::1\]|127(?:\.\d{1,3}){3})$/.test(n.hostname)&&!(t.routes??[]).some(r=>r.targetPeerId!==t.targetPeerId)}catch{return!1}}function oE(e,t=!0){const n=new Set,r=new Set,o=new WeakMap,s=d=>d.target instanceof Element?d.target.closest("[data-termdock-terminal-dropzone]"):null,i=()=>!t||!rE(location.origin,dt()),a=d=>{const u=s(d);!u||!i()||!d.dataTransfer?.types.includes("Files")||(d.preventDefault(),d.stopImmediatePropagation(),d.dataTransfer.dropEffect="copy",u.dataset.nativeFileDrag="true",u.dataset.nativeFileDropState="remote")},c=d=>{const u=s(d),f=Array.from(d.dataTransfer?.files??[]);if(!u||!f.length||!i())return;d.preventDefault(),d.stopImmediatePropagation(),o.get(u)?.abort();const h=new AbortController;o.set(u,h);const p=u.dataset.termdockTerminalDropzone??"",m=dt(),g=u.dataset.termdockTerminalOwner,b=m?.targetPeerId??null,w=String(++nE),E=()=>!h.signal.aborted&&u.isConnected&&u.dataset.termdockTerminalDropzone===p&&u.dataset.nativeFileDropOperation===w&&dt()===m&&dt()?.targetPeerId===b&&u.dataset.termdockTerminalOwner===g,v=()=>E()?!1:(u.dataset.nativeFileDropOperation===w&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation,delete u.dataset.nativeFileDropProgress,delete u.dataset.nativeFileDropCancellable),!0);u.dataset.nativeFileDropOperation=w,u.dataset.nativeFileDrag="true",u.dataset.nativeFileDropState="uploading",u.dataset.nativeFileDropCancellable="true",delete u.dataset.nativeFileDropProgress;const C=S=>{(S?.type==="auth:unauthorized"||S?.type==="pagehide"||!E())&&(h.abort(),v())},_=new MutationObserver(()=>C());_.observe(u,{attributes:!0,attributeFilter:["data-termdock-terminal-dropzone","data-termdock-terminal-owner","data-native-file-drop-operation"]});const R=()=>{h.abort(),v(),x()},k=S=>{if(!(S.target instanceof Element)||S.target.closest("[data-termdock-terminal-dropzone]")!==u||!E())return;R(),u.dataset.nativeFileDrag="true",u.dataset.nativeFileDropOperation=w,u.dataset.nativeFileDropState="cancelled";const I=window.setTimeout(()=>{r.delete(I),u.dataset.nativeFileDropOperation===w&&u.dataset.nativeFileDropState==="cancelled"&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation)},3e3);r.add(I)};window.addEventListener("termdock:file-drop-cancel",k);const x=()=>{window.removeEventListener("termdock:file-drop-cancel",k),_.disconnect();for(const S of["termdock:secure-state","auth:unauthorized","pagehide"])window.removeEventListener(S,C);n.delete(R)};n.add(R);for(const S of["termdock:secure-state","auth:unauthorized","pagehide"])window.addEventListener(S,C);Zt(async()=>{const{uploadFiles:S}=await Promise.resolve().then(()=>i_);return{uploadFiles:S}},void 0).then(({uploadFiles:S})=>{if(!E())throw new DOMException("Drop target changed","AbortError");return S("/tmp",f,h.signal,I=>{E()&&(u.dataset.nativeFileDropProgress=String(Math.round(I)))},E)}).then(S=>{if(S.files.length!==f.length||S.files.some(P=>!P.path))throw new Error("Upload did not return every file path");if(v())return;delete u.dataset.nativeFileDropCancellable,delete u.dataset.nativeFileDropProgress,e({sessionKey:p,paths:S.files.map(P=>P.path)}),u.dataset.nativeFileDropState="uploaded";const I=window.setTimeout(()=>{r.delete(I),E()&&u.dataset.nativeFileDropState==="uploaded"&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation)},3e3);r.add(I)}).catch(S=>{if(v())return;delete u.dataset.nativeFileDropCancellable,delete u.dataset.nativeFileDropProgress,u.dataset.nativeFileDropState="error",u.dispatchEvent(new CustomEvent("termdock:file-drop-error",{bubbles:!0,detail:S instanceof Error?S.message:"File upload failed"}));const I=window.setTimeout(()=>{r.delete(I),E()&&u.dataset.nativeFileDropState==="error"&&(delete u.dataset.nativeFileDrag,delete u.dataset.nativeFileDropState,delete u.dataset.nativeFileDropOperation)},3e3);r.add(I)}).finally(x)};return window.addEventListener("dragover",a,!0),window.addEventListener("drop",c,!0),()=>{window.removeEventListener("dragover",a,!0),window.removeEventListener("drop",c,!0);for(const d of n)d();for(const d of r)clearTimeout(d);r.clear()}}function ft(){return typeof window>"u"?null:window.termdockDesktop??null}const sl=new Set;let Lh=!1;function KM(e){const t=ft();if(sl.add(e),!Lh){const n=r=>{if(!eE(r.paths.map(Tw).join(" ")+" "))for(const o of sl)o(r)};oE(n,!!t),t?.onNativeFileDrop(n),Lh=!0}return()=>{sl.delete(e)}}async function sE(e,t){const n=navigator.serviceWorker?.controller;if(!n)return null;const r=new MessageChannel;return new Promise(o=>{const s=a=>{clearTimeout(i),r.port1.close(),o(a)},i=setTimeout(()=>s(null),5e3);r.port1.onmessage=a=>{try{const c=new URL(a.data.url,location.origin);s(c.origin===location.origin&&/^\/__termdock-download\/[a-f0-9-]{36}$/.test(c.pathname)?c.href:null)}catch{s(null)}},r.port1.onmessageerror=()=>s(null);try{n.postMessage({type:"termdock:prepare-download",blob:e,filename:t},[r.port2])}catch{s(null)}})}const iE=4*1024*1024,aE=256*1024,cE=1440*6e4;let yo=0,Dh;function qu(){return typeof indexedDB>"u"?Promise.resolve(null):Dh??=new Promise(e=>{const t=indexedDB.open(`termdock-terminal-snapshots:${go}`,1);t.onupgradeneeded=()=>t.result.createObjectStore("snapshots",{keyPath:"id"}),t.onerror=()=>e(null),t.onblocked=()=>e(null),t.onsuccess=()=>{t.result.onversionchange=()=>{t.result.close(),Dh=void 0},e(t.result)}})}function pd(e){return!!e&&e.version===1&&typeof e.epoch=="string"&&e.epoch.length>0&&Number.isSafeInteger(e.cols)&&e.cols>0&&Number.isSafeInteger(e.rows)&&e.rows>0&&Number.isSafeInteger(e.seq)&&e.seq>0&&typeof e.data=="string"&&e.data.length*2<=aE&&e.savedAt<=Date.now()&&Date.now()-e.savedAt<cE}async function GM(e){const t=yo;try{const n=await qu();return!n||t!==yo?null:await new Promise(r=>{const o=n.transaction("snapshots").objectStore("snapshots").get(e);o.onerror=()=>r(null),o.onsuccess=()=>r(t===yo&&pd(o.result)?o.result:null)})}catch{return null}}async function WM(e){const t=yo;if(pd(e))try{const n=await qu();if(!n||t!==yo)return;await new Promise(r=>{const o=n.transaction("snapshots","readwrite"),s=o.objectStore("snapshots");s.put(e);const i=s.getAll();i.onsuccess=()=>{let a=0,c=0;for(const d of i.result.sort((u,f)=>f.savedAt-u.savedAt))a+=d.data.length*2,(++c>32||a>iE||!pd(d))&&s.delete(d.id)},o.oncomplete=()=>r(),o.onerror=o.onabort=()=>r()})}catch{}}async function Aw(){yo+=1;try{(await qu())?.transaction("snapshots","readwrite").objectStore("snapshots").clear()}catch{}}typeof window<"u"&&window.addEventListener("auth:unauthorized",()=>{Aw()});const md=8,Pw=128,Ku=2e4,lE=256*1024,dE=1024*1024,uE=3e4;function Nw(e){if(e.label)return e.label;if(e.url)try{return new URL(e.url).host}catch{}return`中转服务 ${e.serviceId.slice(-8)}`}function gr(e){return e.error==="TARGET_PASSWORD_REQUIRED"?"目标服务未配置有效访问密码,已禁用中转。请让目标管理员先配置访问密码":e.error==="TARGET_SECURITY_UPGRADE_REQUIRED"?"无法核验密码保护,已禁用中转。请更新目标服务和中继程序":e.error==="TARGET_IDENTITY_MISMATCH"?"服务身份与登记地址不一致,请修正登记":e.error==="TARGET_CHECKING"?"正在验证目标服务身份":e.error==="TARGET_UNREACHABLE"?"目标连接失败,请检查地址、网络与证书":"中转暂不可用"}const fE=1024*1024;function hE(e){return(e==="/api/terminal/fs/upload"||/^\/api\/terminal\/[^/]+\/chat\/attachments$/.test(e)?110:5)*fE}class pE extends Error{static name="UnexpectedPeerError";constructor(t="Unexpected Peer"){super(t),this.name="UnexpectedPeerError"}}let mE=class extends Error{static name="InvalidCryptoExchangeError";constructor(t="Invalid crypto exchange"){super(t),this.name="InvalidCryptoExchangeError"}},cn=class extends Error{static name="InvalidParametersError";constructor(t="Invalid parameters"){super(t),this.name="InvalidParametersError"}};class _w extends Error{static name="InvalidPublicKeyError";constructor(t="Invalid public key"){super(t),this.name="InvalidPublicKeyError"}}class Lw extends Error{static name="InvalidPrivateKeyError";constructor(t="Invalid private key"){super(t),this.name="InvalidPrivateKeyError"}}class gE extends Error{static name="InvalidCIDError";constructor(t="Invalid CID"){super(t),this.name="InvalidCIDError"}}class yE extends Error{static name="InvalidMultihashError";constructor(t="Invalid Multihash"){super(t),this.name="InvalidMultihashError"}}class vc extends Error{static name="UnsupportedKeyTypeError";constructor(t="Unsupported key type"){super(t),this.name="UnsupportedKeyTypeError"}}const Dw=Symbol.for("@libp2p/peer-id");function wE(e){return typeof e?.handleEvent=="function"}function bE(e){return e===!0||e===!1}function vE(e){return bE(e)?e:e?.capture??!1}function gd(e){const t={capture:vE(e),once:!!e?.once};return e?.passive!=null&&(t.passive=e?.passive),e?.signal!=null&&(t.signal=e?.signal),t}function jh(e,t){return gd(e).capture===gd(t).capture}class xE extends EventTarget{#e=new Map;constructor(){super()}listenerCount(t){const n=this.#e.get(t);return n==null?0:n.length}addEventListener(t,n,r){const o=gd(r);if(o?.signal?.aborted===!0)return;const s=d=>{o.once&&this.removeEventListener(t,n,o),wE(n)?n.handleEvent(d):n(d)};let i=this.#e.get(t);if(i==null&&(i=[],this.#e.set(t,i)),i.some(d=>d.callback!==n?!1:jh(d.options,o)))return;super.addEventListener(t,s,o);const c=()=>{this.removeEventListener(t,n,o)};o.signal?.addEventListener("abort",c),i.push({callback:n,wrapper:s,options:o,onAbort:c})}removeEventListener(t,n,r){const o=this.#e.get(t);if(o==null){super.removeEventListener(t,n??null,r);return}this.#e.set(t,o.filter(s=>s.callback===n&&jh(s.options,r)?(super.removeEventListener(t,s.wrapper,r),s.options?.signal?.removeEventListener("abort",s.onAbort),!1):!0))}safeDispatchEvent(t,n={}){return this.dispatchEvent(new CustomEvent(t,n))}}const SE=Symbol.for("@libp2p/service-capabilities");function EE(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0}function xc(e){if(e instanceof Uint8Array&&e.constructor.name==="Uint8Array")return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")}function kE(e){return new TextEncoder().encode(e)}function IE(e){return new TextDecoder().decode(e)}function CE(e,t){if(e.length>=255)throw new TypeError("Alphabet too long");for(var n=new Uint8Array(256),r=0;r<n.length;r++)n[r]=255;for(var o=0;o<e.length;o++){var s=e.charAt(o),i=s.charCodeAt(0);if(n[i]!==255)throw new TypeError(s+" is ambiguous");n[i]=o}var a=e.length,c=e.charAt(0),d=Math.log(a)/Math.log(256),u=Math.log(256)/Math.log(a);function f(m){if(m instanceof Uint8Array||(ArrayBuffer.isView(m)?m=new Uint8Array(m.buffer,m.byteOffset,m.byteLength):Array.isArray(m)&&(m=Uint8Array.from(m))),!(m instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(m.length===0)return"";for(var g=0,b=0,w=0,E=m.length;w!==E&&m[w]===0;)w++,g++;for(var v=(E-w)*u+1>>>0,C=new Uint8Array(v);w!==E;){for(var _=m[w],R=0,k=v-1;(_!==0||R<b)&&k!==-1;k--,R++)_+=256*C[k]>>>0,C[k]=_%a>>>0,_=_/a>>>0;if(_!==0)throw new Error("Non-zero carry");b=R,w++}for(var x=v-b;x!==v&&C[x]===0;)x++;for(var S=c.repeat(g);x<v;++x)S+=e.charAt(C[x]);return S}function h(m){if(typeof m!="string")throw new TypeError("Expected String");if(m.length===0)return new Uint8Array;var g=0;if(m[g]!==" "){for(var b=0,w=0;m[g]===c;)b++,g++;for(var E=(m.length-g)*d+1>>>0,v=new Uint8Array(E);m[g];){var C=n[m.charCodeAt(g)];if(C===255)return;for(var _=0,R=E-1;(C!==0||_<w)&&R!==-1;R--,_++)C+=a*v[R]>>>0,v[R]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");w=_,g++}if(m[g]!==" "){for(var k=E-w;k!==E&&v[k]===0;)k++;for(var x=new Uint8Array(b+(E-k)),S=b;k!==E;)x[S++]=v[k++];return x}}}function p(m){var g=h(m);if(g)return g;throw new Error(`Non-${t} character`)}return{encode:f,decodeUnsafe:h,decode:p}}var RE=CE,TE=RE;class AE{name;prefix;baseEncode;constructor(t,n,r){this.name=t,this.prefix=n,this.baseEncode=r}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class PE{name;prefix;baseDecode;prefixCodePoint;constructor(t,n,r){this.name=t,this.prefix=n;const o=n.codePointAt(0);if(o===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=o,this.baseDecode=r}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return jw(this,t)}}class NE{decoders;constructor(t){this.decoders=t}or(t){return jw(this,t)}decode(t){const n=t[0],r=this.decoders[n];if(r!=null)return r.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}function jw(e,t){return new NE({...e.decoders??{[e.prefix]:e},...t.decoders??{[t.prefix]:t}})}class _E{name;prefix;baseEncode;baseDecode;encoder;decoder;constructor(t,n,r,o){this.name=t,this.prefix=n,this.baseEncode=r,this.baseDecode=o,this.encoder=new AE(t,n,r),this.decoder=new PE(t,n,o)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}function Sc({name:e,prefix:t,encode:n,decode:r}){return new _E(e,t,n,r)}function ui({name:e,prefix:t,alphabet:n}){const{encode:r,decode:o}=TE(n,e);return Sc({prefix:t,name:e,encode:r,decode:s=>xc(o(s))})}function LE(e,t,n,r){let o=e.length;for(;e[o-1]==="=";)--o;const s=new Uint8Array(o*n/8|0);let i=0,a=0,c=0;for(let d=0;d<o;++d){const u=t[e[d]];if(u===void 0)throw new SyntaxError(`Non-${r} character`);a=a<<n|u,i+=n,i>=8&&(i-=8,s[c++]=255&a>>i)}if(i>=n||(255&a<<8-i)!==0)throw new SyntaxError("Unexpected end of data");return s}function DE(e,t,n){const r=t[t.length-1]==="=",o=(1<<n)-1;let s="",i=0,a=0;for(let c=0;c<e.length;++c)for(a=a<<8|e[c],i+=8;i>n;)i-=n,s+=t[o&a>>i];if(i!==0&&(s+=t[o&a<<n-i]),r)for(;(s.length*n&7)!==0;)s+="=";return s}function jE(e){const t={};for(let n=0;n<e.length;++n)t[e[n]]=n;return t}function Et({name:e,prefix:t,bitsPerChar:n,alphabet:r}){const o=jE(r);return Sc({prefix:t,name:e,encode(s){return DE(s,r,n)},decode(s){return LE(s,o,n,e)}})}const Dt=ui({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),OE=ui({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),ME=Object.freeze(Object.defineProperty({__proto__:null,base58btc:Dt,base58flickr:OE},Symbol.toStringTag,{value:"Module"})),Ds=Et({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),BE=Et({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),FE=Et({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),UE=Et({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),HE=Et({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),$E=Et({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),zE=Et({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),qE=Et({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),KE=Et({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),GE=Object.freeze(Object.defineProperty({__proto__:null,base32:Ds,base32hex:HE,base32hexpad:zE,base32hexpadupper:qE,base32hexupper:$E,base32pad:FE,base32padupper:UE,base32upper:BE,base32z:KE},Symbol.toStringTag,{value:"Module"})),ia=ui({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),WE=ui({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),VE=Object.freeze(Object.defineProperty({__proto__:null,base36:ia,base36upper:WE},Symbol.toStringTag,{value:"Module"}));var YE=Ow,Oh=128,XE=-128,JE=Math.pow(2,31);function Ow(e,t,n){t=t||[],n=n||0;for(var r=n;e>=JE;)t[n++]=e&255|Oh,e/=128;for(;e&XE;)t[n++]=e&255|Oh,e>>>=7;return t[n]=e|0,Ow.bytes=n-r+1,t}var ZE=yd,QE=128,Mh=127;function yd(e,r){var n=0,r=r||0,o=0,s=r,i,a=e.length;do{if(s>=a)throw yd.bytes=0,new RangeError("Could not decode varint");i=e[s++],n+=o<28?(i&Mh)<<o:(i&Mh)*Math.pow(2,o),o+=7}while(i>=QE);return yd.bytes=s-r,n}var e1=Math.pow(2,7),t1=Math.pow(2,14),n1=Math.pow(2,21),r1=Math.pow(2,28),o1=Math.pow(2,35),s1=Math.pow(2,42),i1=Math.pow(2,49),a1=Math.pow(2,56),c1=Math.pow(2,63),l1=function(e){return e<e1?1:e<t1?2:e<n1?3:e<r1?4:e<o1?5:e<s1?6:e<i1?7:e<a1?8:e<c1?9:10},d1={encode:YE,decode:ZE,encodingLength:l1},Ca=d1;function wd(e,t=0){return[Ca.decode(e,t),Ca.decode.bytes]}function Ra(e,t,n=0){return Ca.encode(e,t,n),t}function Ta(e){return Ca.encodingLength(e)}function fi(e,t){const n=t.byteLength,r=Ta(e),o=r+Ta(n),s=new Uint8Array(o+n);return Ra(e,s,0),Ra(n,s,r),s.set(t,o),new Gu(e,n,t,s)}function Mw(e){const t=xc(e),[n,r]=wd(t),[o,s]=wd(t.subarray(r)),i=t.subarray(r+s);if(i.byteLength!==o)throw new Error("Incorrect length");return new Gu(n,o,i,t)}function u1(e,t){if(e===t)return!0;{const n=t;return e.code===n.code&&e.size===n.size&&n.bytes instanceof Uint8Array&&EE(e.bytes,n.bytes)}}class Gu{code;size;digest;bytes;constructor(t,n,r,o){this.code=t,this.size=n,this.digest=r,this.bytes=o}}function Bh(e,t){const{bytes:n,version:r}=e;return r===0?h1(n,bd(e),t??Dt.encoder):p1(n,bd(e),t??Ds.encoder)}const Fh=new WeakMap;function bd(e){const t=Fh.get(e);if(t==null){const n=new Map;return Fh.set(e,n),n}return t}class Ze{code;version;multihash;bytes;"/";constructor(t,n,r,o){this.code=n,this.version=t,this.multihash=r,this.bytes=o,this["/"]=o}get asCID(){return this}get byteOffset(){return this.bytes.byteOffset}get byteLength(){return this.bytes.byteLength}toV0(){switch(this.version){case 0:return this;case 1:{const{code:t,multihash:n}=this;if(t!==rs)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(n.code!==m1)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return Ze.createV0(n)}default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}toV1(){switch(this.version){case 0:{const{code:t,digest:n}=this.multihash,r=fi(t,n);return Ze.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 1. This is a bug please report`)}}equals(t){return Ze.equals(this,t)}static equals(t,n){const r=n;return r!=null&&t.code===r.code&&t.version===r.version&&u1(t.multihash,r.multihash)}toString(t){return Bh(this,t)}toJSON(){return{"/":Bh(this)}}link(){return this}[Symbol.toStringTag]="CID";[Symbol.for("nodejs.util.inspect.custom")](){return`CID(${this.toString()})`}static asCID(t){if(t==null)return null;const n=t;if(n instanceof Ze)return n;if(n["/"]!=null&&n["/"]===n.bytes||n.asCID===n){const{version:r,code:o,multihash:s,bytes:i}=n;return new Ze(r,o,s,i??Uh(r,o,s.bytes))}else if(n[g1]===!0){const{version:r,multihash:o,code:s}=n,i=Mw(o);return Ze.create(r,s,i)}else return null}static create(t,n,r){if(typeof n!="number")throw new Error("String codecs are no longer supported");if(!(r.bytes instanceof Uint8Array))throw new Error("Invalid digest");switch(t){case 0:{if(n!==rs)throw new Error(`Version 0 CID must use dag-pb (code: ${rs}) block encoding`);return new Ze(t,n,r,r.bytes)}case 1:{const o=Uh(t,n,r.bytes);return new Ze(t,n,r,o)}default:throw new Error("Invalid version")}}static createV0(t){return Ze.create(0,rs,t)}static createV1(t,n){return Ze.create(1,t,n)}static decode(t){const[n,r]=Ze.decodeFirst(t);if(r.length!==0)throw new Error("Incorrect length");return n}static decodeFirst(t){const n=Ze.inspectBytes(t),r=n.size-n.multihashSize,o=xc(t.subarray(r,r+n.multihashSize));if(o.byteLength!==n.multihashSize)throw new Error("Incorrect length");const s=o.subarray(n.multihashSize-n.digestSize),i=new Gu(n.multihashCode,n.digestSize,s,o);return[n.version===0?Ze.createV0(i):Ze.createV1(n.codec,i),t.subarray(n.size)]}static inspectBytes(t){let n=0;const r=()=>{const[f,h]=wd(t.subarray(n));return n+=h,f};let o=r(),s=rs;if(o===18?(o=0,n=0):s=r(),o!==0&&o!==1)throw new RangeError(`Invalid CID version ${o}`);const i=n,a=r(),c=r(),d=n+c,u=d-i;return{version:o,codec:s,multihashCode:a,digestSize:c,multihashSize:u,size:d}}static parse(t,n){const[r,o]=f1(t,n),s=Ze.decode(o);if(s.version===0&&t[0]!=="Q")throw Error("Version 0 CID string must not include multibase prefix");return bd(s).set(r,t),s}}function f1(e,t){switch(e[0]){case"Q":{const n=t??Dt;return[Dt.prefix,n.decode(`${Dt.prefix}${e}`)]}case Dt.prefix:{const n=t??Dt;return[Dt.prefix,n.decode(e)]}case Ds.prefix:{const n=t??Ds;return[Ds.prefix,n.decode(e)]}case ia.prefix:{const n=t??ia;return[ia.prefix,n.decode(e)]}default:{if(t==null)throw Error("To parse non base32, base36 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}}}function h1(e,t,n){const{prefix:r}=n;if(r!==Dt.prefix)throw Error(`Cannot string encode V0 in ${n.name} encoding`);const o=t.get(r);if(o==null){const s=n.encode(e).slice(1);return t.set(r,s),s}else return o}function p1(e,t,n){const{prefix:r}=n,o=t.get(r);if(o==null){const s=n.encode(e);return t.set(r,s),s}else return o}const rs=112,m1=18;function Uh(e,t,n){const r=Ta(e),o=r+Ta(t),s=new Uint8Array(o+n.byteLength);return Ra(e,s,0),Ra(t,s,r),s.set(n,o),s}const g1=Symbol.for("@ipld/js-cid/CID"),Bw=0,y1="identity",Fw=xc;function w1(e,t){if(t?.truncate!=null&&t.truncate!==e.byteLength){if(t.truncate<0||t.truncate>e.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${e.byteLength}`);e=e.subarray(0,t.truncate)}return fi(Bw,Fw(e))}const hi={code:Bw,name:y1,encode:Fw,digest:w1};function ln(e,t){if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0}function Ht(e=0){return new Uint8Array(e)}function Fn(e=0){return new Uint8Array(e)}function vd(e,t){t==null&&(t=e.reduce((o,s)=>o+s.length,0));const n=Fn(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}const Uw=Symbol.for("@achingbrain/uint8arraylist");function Hh(e,t){if(t==null||t<0)throw new RangeError("index is out of bounds");let n=0;for(const r of e){const o=n+r.byteLength;if(t<o)return{buf:r,index:t-n};n=o}throw new RangeError("index is out of bounds")}function Li(e){return!!e?.[Uw]}class qe{bufs;length;[Uw]=!0;constructor(...t){this.bufs=[],this.length=0,t.length>0&&this.appendAll(t)}*[Symbol.iterator](){yield*this.bufs}get byteLength(){return this.length}append(...t){this.appendAll(t)}appendAll(t){let n=0;for(const r of t)if(r instanceof Uint8Array)n+=r.byteLength,this.bufs.push(r);else if(Li(r)){n+=r.byteLength;for(const o of r.bufs)this.bufs.push(o)}else throw new Error("Could not append value, must be an Uint8Array or a Uint8ArrayList");this.length+=n}prepend(...t){this.prependAll(t)}prependAll(t){let n=0;for(const r of t.reverse())if(r instanceof Uint8Array)n+=r.byteLength,this.bufs.unshift(r);else if(Li(r))n+=r.byteLength,this.bufs.unshift(...r.bufs);else throw new Error("Could not prepend value, must be an Uint8Array or a Uint8ArrayList");this.length+=n}get(t){const n=Hh(this.bufs,t);return n.buf[n.index]}set(t,n){const r=Hh(this.bufs,t);r.buf[r.index]=n}write(t,n=0){if(t instanceof Uint8Array)for(let r=0;r<t.length;r++)this.set(n+r,t[r]);else if(Li(t))for(let r=0;r<t.length;r++)this.set(n+r,t.get(r));else throw new Error("Could not write value, must be an Uint8Array or a Uint8ArrayList")}consume(t){if(t=Math.trunc(t),!(Number.isNaN(t)||t<=0)){if(t===this.byteLength){this.bufs=[],this.length=0;return}for(;this.bufs.length>0;)if(t>=this.bufs[0].byteLength)t-=this.bufs[0].byteLength,this.length-=this.bufs[0].byteLength,this.bufs.shift();else{this.bufs[0]=this.bufs[0].subarray(t),this.length-=t;break}}}slice(t,n){const{bufs:r,length:o}=this._subList(t,n);return vd(r,o)}subarray(t,n){const{bufs:r,length:o}=this._subList(t,n);return r.length===1?r[0]:vd(r,o)}sublist(t,n){const{bufs:r,length:o}=this._subList(t,n),s=new qe;return s.length=o,s.bufs=r,s}_subList(t,n){if(t=t??0,n=n??this.length,t<0&&(t=this.length+t),n<0&&(n=this.length+n),t<0||n>this.length)throw new RangeError("index is out of bounds");if(t===n)return{bufs:[],length:0};if(t===0&&n===this.length)return{bufs:[...this.bufs],length:this.length};const r=[];let o=0;for(let s=0;s<this.bufs.length;s++){const i=this.bufs[s],a=o,c=a+i.byteLength;if(o=c,t>=c)continue;const d=t>=a&&t<c,u=n>a&&n<=c;if(d&&u){if(t===a&&n===c){r.push(i);break}const f=t-a;r.push(i.subarray(f,f+(n-t)));break}if(d){if(t===0){r.push(i);continue}r.push(i.subarray(t-a));continue}if(u){if(n===c){r.push(i);break}r.push(i.subarray(0,n-a));break}r.push(i)}return{bufs:r,length:n-t}}indexOf(t,n=0){if(!Li(t)&&!(t instanceof Uint8Array))throw new TypeError('The "value" argument must be a Uint8ArrayList or Uint8Array');const r=t instanceof Uint8Array?t:t.subarray();if(n=Number(n??0),isNaN(n)&&(n=0),n<0&&(n=this.length+n),n<0&&(n=0),t.length===0)return n>this.length?this.length:n;const o=r.byteLength;if(o===0)throw new TypeError("search must be at least 1 byte long");const s=256,i=new Int32Array(s);for(let f=0;f<s;f++)i[f]=-1;for(let f=0;f<o;f++)i[r[f]]=f;const a=i,c=this.byteLength-r.byteLength,d=r.byteLength-1;let u;for(let f=n;f<=c;f+=u){u=0;for(let h=d;h>=0;h--){const p=this.get(f+h);if(r[h]!==p){u=Math.max(1,h-a[p]);break}}if(u===0)return f}return-1}getInt8(t){const n=this.subarray(t,t+1);return new DataView(n.buffer,n.byteOffset,n.byteLength).getInt8(0)}setInt8(t,n){const r=Fn(1);new DataView(r.buffer,r.byteOffset,r.byteLength).setInt8(0,n),this.write(r,t)}getInt16(t,n){const r=this.subarray(t,t+2);return new DataView(r.buffer,r.byteOffset,r.byteLength).getInt16(0,n)}setInt16(t,n,r){const o=Ht(2);new DataView(o.buffer,o.byteOffset,o.byteLength).setInt16(0,n,r),this.write(o,t)}getInt32(t,n){const r=this.subarray(t,t+4);return new DataView(r.buffer,r.byteOffset,r.byteLength).getInt32(0,n)}setInt32(t,n,r){const o=Ht(4);new DataView(o.buffer,o.byteOffset,o.byteLength).setInt32(0,n,r),this.write(o,t)}getBigInt64(t,n){const r=this.subarray(t,t+8);return new DataView(r.buffer,r.byteOffset,r.byteLength).getBigInt64(0,n)}setBigInt64(t,n,r){const o=Ht(8);new DataView(o.buffer,o.byteOffset,o.byteLength).setBigInt64(0,n,r),this.write(o,t)}getUint8(t){const n=this.subarray(t,t+1);return new DataView(n.buffer,n.byteOffset,n.byteLength).getUint8(0)}setUint8(t,n){const r=Fn(1);new DataView(r.buffer,r.byteOffset,r.byteLength).setUint8(0,n),this.write(r,t)}getUint16(t,n){const r=this.subarray(t,t+2);return new DataView(r.buffer,r.byteOffset,r.byteLength).getUint16(0,n)}setUint16(t,n,r){const o=Ht(2);new DataView(o.buffer,o.byteOffset,o.byteLength).setUint16(0,n,r),this.write(o,t)}getUint32(t,n){const r=this.subarray(t,t+4);return new DataView(r.buffer,r.byteOffset,r.byteLength).getUint32(0,n)}setUint32(t,n,r){const o=Ht(4);new DataView(o.buffer,o.byteOffset,o.byteLength).setUint32(0,n,r),this.write(o,t)}getBigUint64(t,n){const r=this.subarray(t,t+8);return new DataView(r.buffer,r.byteOffset,r.byteLength).getBigUint64(0,n)}setBigUint64(t,n,r){const o=Ht(8);new DataView(o.buffer,o.byteOffset,o.byteLength).setBigUint64(0,n,r),this.write(o,t)}getFloat32(t,n){const r=this.subarray(t,t+4);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat32(0,n)}setFloat32(t,n,r){const o=Ht(4);new DataView(o.buffer,o.byteOffset,o.byteLength).setFloat32(0,n,r),this.write(o,t)}getFloat64(t,n){const r=this.subarray(t,t+8);return new DataView(r.buffer,r.byteOffset,r.byteLength).getFloat64(0,n)}setFloat64(t,n,r){const o=Ht(8);new DataView(o.buffer,o.byteOffset,o.byteLength).setFloat64(0,n,r),this.write(o,t)}equals(t){if(t==null||!(t instanceof qe)||t.bufs.length!==this.bufs.length)return!1;for(let n=0;n<this.bufs.length;n++)if(!ln(this.bufs[n],t.bufs[n]))return!1;return!0}static fromUint8Arrays(t,n){const r=new qe;return r.bufs=t,n==null&&(n=t.reduce((o,s)=>o+s.byteLength,0)),r.length=n,r}}const b1=ui({prefix:"9",name:"base10",alphabet:"0123456789"}),v1=Object.freeze(Object.defineProperty({__proto__:null,base10:b1},Symbol.toStringTag,{value:"Module"})),x1=Et({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),S1=Et({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),E1=Object.freeze(Object.defineProperty({__proto__:null,base16:x1,base16upper:S1},Symbol.toStringTag,{value:"Module"})),k1=Et({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),I1=Object.freeze(Object.defineProperty({__proto__:null,base2:k1},Symbol.toStringTag,{value:"Module"})),Hw=Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"),C1=Hw.reduce((e,t,n)=>(e[n]=t,e),[]),R1=Hw.reduce((e,t,n)=>{const r=t.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${t}`);return e[r]=n,e},[]);function T1(e){return e.reduce((t,n)=>(t+=C1[n],t),"")}function A1(e){const t=[];for(const n of e){const r=n.codePointAt(0);if(r==null)throw new Error(`Invalid character: ${n}`);const o=R1[r];if(o==null)throw new Error(`Non-base256emoji character: ${n}`);t.push(o)}return new Uint8Array(t)}const P1=Sc({prefix:"🚀",name:"base256emoji",encode:T1,decode:A1}),N1=Object.freeze(Object.defineProperty({__proto__:null,base256emoji:P1},Symbol.toStringTag,{value:"Module"})),_1=Et({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),L1=Et({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),D1=Et({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),j1=Et({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),O1=Object.freeze(Object.defineProperty({__proto__:null,base64:_1,base64pad:L1,base64url:D1,base64urlpad:j1},Symbol.toStringTag,{value:"Module"})),M1=Et({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),B1=Object.freeze(Object.defineProperty({__proto__:null,base8:M1},Symbol.toStringTag,{value:"Module"})),F1=Sc({prefix:"\0",name:"identity",encode:e=>IE(e),decode:e=>kE(e)}),U1=Object.freeze(Object.defineProperty({__proto__:null,identity:F1},Symbol.toStringTag,{value:"Module"}));new TextEncoder;new TextDecoder;const H1=20;function $1({name:e,code:t,encode:n,minDigestLength:r,maxDigestLength:o}){return new z1(e,t,n,r,o)}class z1{name;code;encode;minDigestLength;maxDigestLength;constructor(t,n,r,o,s){this.name=t,this.code=n,this.encode=r,this.minDigestLength=o??H1,this.maxDigestLength=s}digest(t,n){if(n?.truncate!=null){if(n.truncate<this.minDigestLength)throw new Error(`Invalid truncate option, must be greater than or equal to ${this.minDigestLength}`);if(this.maxDigestLength!=null&&n.truncate>this.maxDigestLength)throw new Error(`Invalid truncate option, must be less than or equal to ${this.maxDigestLength}`)}if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?$h(r,this.code,n?.truncate):r.then(o=>$h(o,this.code,n?.truncate))}else throw Error("Unknown type, must be binary type")}}function $h(e,t,n){if(n!=null&&n!==e.byteLength){if(n>e.byteLength)throw new Error(`Invalid truncate option, must be less than or equal to ${e.byteLength}`);e=e.subarray(0,n)}return fi(t,e)}function q1(e){return async t=>new Uint8Array(await crypto.subtle.digest(e,t))}const Wu=$1({name:"sha2-256",code:18,encode:q1("SHA-256")}),zh={...U1,...I1,...B1,...v1,...E1,...GE,...VE,...ME,...O1,...N1};function $w(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}const qh=$w("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),il=$w("ascii","a",e=>{let t="a";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},e=>{e=e.substring(1);const t=Fn(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}),zw={utf8:qh,"utf-8":qh,hex:zh.base16,latin1:il,ascii:il,binary:il,...zh};function ct(e,t="utf8"){const n=zw[t];if(n==null)throw new Error(`Unsupported encoding "${t}"`);return n.decoder.decode(`${n.prefix}${e}`)}function Le(e,t="utf8"){const n=zw[t];if(n==null)throw new Error(`Unsupported encoding "${t}"`);return n.encoder.encode(e).substring(1)}const K1=parseInt("11111",2),xd=parseInt("10000000",2),G1=parseInt("01111111",2),Kh={0:os,1:os,2:W1,3:X1,4:J1,5:Y1,6:V1,16:os,22:os,48:os};function Ko(e,t={offset:0}){const n=e[t.offset]&K1;if(t.offset++,Kh[n]!=null)return Kh[n](e,t);throw new Error("No decoder for tag "+n)}function pi(e,t){let n=0;if((e[t.offset]&xd)===xd){const r=e[t.offset]&G1;let o="0x";t.offset++;for(let s=0;s<r;s++,t.offset++)o+=e[t.offset].toString(16).padStart(2,"0");n=parseInt(o,16)}else n=e[t.offset],t.offset++;return n}function os(e,t){pi(e,t);const n=[];for(;!(t.offset>=e.byteLength);){const r=Ko(e,t);if(r===null)break;n.push(r)}return n}function W1(e,t){const n=pi(e,t),r=t.offset,o=t.offset+n,s=[];for(let i=r;i<o;i++)i===r&&e[i]===0||s.push(e[i]);return t.offset+=n,Uint8Array.from(s)}function V1(e,t){const n=pi(e,t),r=t.offset+n,o=e[t.offset];t.offset++;let s=0,i=0;o<40?(s=0,i=o):o<80?(s=1,i=o-40):(s=2,i=o-80);let a=`${s}.${i}`,c=[];for(;t.offset<r;){const d=e[t.offset];if(t.offset++,c.push(d&127),d<128){c.reverse();let u=0;for(let f=0;f<c.length;f++)u+=c[f]<<f*7;a+=`.${u}`,c=[]}}return a}function Y1(e,t){return t.offset++,null}function X1(e,t){const n=pi(e,t),r=e[t.offset];t.offset++;const o=e.subarray(t.offset,t.offset+n-1);if(t.offset+=n,r!==0)throw new Error("Unused bits in bit string is unimplemented");return o}function J1(e,t){const n=pi(e,t),r=e.subarray(t.offset,t.offset+n);return t.offset+=n,r}function Z1(e){let t=e.toString(16);t.length%2===1&&(t="0"+t);const n=new qe;for(let r=0;r<t.length;r+=2)n.append(Uint8Array.from([parseInt(`${t[r]}${t[r+1]}`,16)]));return n}function Ec(e){if(e.byteLength<128)return Uint8Array.from([e.byteLength]);const t=Z1(e.byteLength);return new qe(Uint8Array.from([t.byteLength|xd]),t)}function Wt(e){const t=new qe,n=128;return(e.subarray()[0]&n)===n&&t.append(Uint8Array.from([0])),t.append(e),new qe(Uint8Array.from([2]),Ec(t),t)}function Vu(e){const t=Uint8Array.from([0]),n=new qe(t,e);return new qe(Uint8Array.from([3]),Ec(n),n)}function Q1(e){return new qe(Uint8Array.from([4]),Ec(e),e)}function Dn(e,t=48){const n=new qe;for(const r of e)n.append(r);return new qe(Uint8Array.from([t]),Ec(n),n)}async function ek(e,t,n){const r=await crypto.subtle.importKey("jwk",e,{name:"ECDSA",namedCurve:e.crv??"P-256"},!1,["sign"]);n?.signal?.throwIfAborted();const o=await crypto.subtle.sign({name:"ECDSA",hash:{name:"SHA-256"}},r,t.subarray());return n?.signal?.throwIfAborted(),new Uint8Array(o,0,o.byteLength)}async function tk(e,t,n,r){const o=await crypto.subtle.importKey("jwk",e,{name:"ECDSA",namedCurve:e.crv??"P-256"},!1,["verify"]);r?.signal?.throwIfAborted();const s=await crypto.subtle.verify({name:"ECDSA",hash:{name:"SHA-256"}},o,t,n.subarray());return r?.signal?.throwIfAborted(),s}const nk=Uint8Array.from([6,8,42,134,72,206,61,3,1,7]),rk=Uint8Array.from([6,5,43,129,4,0,34]),ok=Uint8Array.from([6,5,43,129,4,0,35]),qw={ext:!0,kty:"EC",crv:"P-256"},Kw={ext:!0,kty:"EC",crv:"P-384"},Gw={ext:!0,kty:"EC",crv:"P-521"},wo=32,bo=48,vo=66;function sk(e){const t=Ko(e);return ik(t)}function ik(e){const t=e[1],n=Le(t,"base64url"),r=e[2][1][0],o=1;let s,i;if(t.byteLength===wo)return s=Le(r.subarray(o,o+wo),"base64url"),i=Le(r.subarray(o+wo),"base64url"),new al({...qw,key_ops:["sign"],d:n,x:s,y:i});if(t.byteLength===bo)return s=Le(r.subarray(o,o+bo),"base64url"),i=Le(r.subarray(o+bo),"base64url"),new al({...Kw,key_ops:["sign"],d:n,x:s,y:i});if(t.byteLength===vo)return s=Le(r.subarray(o,o+vo),"base64url"),i=Le(r.subarray(o+vo),"base64url"),new al({...Gw,key_ops:["sign"],d:n,x:s,y:i});throw new cn(`Private key length was wrong length, got ${t.byteLength}, expected 32, 48 or 66`)}function Ww(e){const t=Ko(e);return ak(t)}function ak(e){const t=e[1][1][0],n=1;let r,o;if(t.byteLength===wo*2+1)return r=Le(t.subarray(n,n+wo),"base64url"),o=Le(t.subarray(n+wo),"base64url"),new aa({...qw,key_ops:["verify"],x:r,y:o});if(t.byteLength===bo*2+1)return r=Le(t.subarray(n,n+bo),"base64url"),o=Le(t.subarray(n+bo),"base64url"),new aa({...Kw,key_ops:["verify"],x:r,y:o});if(t.byteLength===vo*2+1)return r=Le(t.subarray(n,n+vo),"base64url"),o=Le(t.subarray(n+vo),"base64url"),new aa({...Gw,key_ops:["verify"],x:r,y:o});throw new cn(`coordinates were wrong length, got ${t.byteLength}, expected 65, 97 or 133`)}function ck(e){return Dn([Wt(Uint8Array.from([1])),Q1(ct(e.d??"","base64url")),Dn([Vw(e.crv)],160),Dn([Vu(new qe(Uint8Array.from([4]),ct(e.x??"","base64url"),ct(e.y??"","base64url")))],161)]).subarray()}function lk(e){return Dn([Wt(Uint8Array.from([1])),Dn([Vw(e.crv)],160),Dn([Vu(new qe(Uint8Array.from([4]),ct(e.x??"","base64url"),ct(e.y??"","base64url")))],161)]).subarray()}function Vw(e){if(e==="P-256")return nk;if(e==="P-384")return rk;if(e==="P-521")return ok;throw new cn(`Invalid curve ${e}`)}class aa{type="ECDSA";jwk;_raw;constructor(t){this.jwk=t}get raw(){return this._raw==null&&(this._raw=lk(this.jwk)),this._raw}toMultihash(){return hi.digest(Ac(this))}toCID(){return Ze.createV1(114,this.toMultihash())}toString(){return Dt.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:ln(this.raw,t.raw)}async verify(t,n,r){return tk(this.jwk,n,t,r)}}class al{type="ECDSA";jwk;publicKey;_raw;constructor(t){this.jwk=t,this.publicKey=new aa({crv:t.crv,ext:t.ext,key_ops:["verify"],kty:"EC",x:t.x,y:t.y})}get raw(){return this._raw==null&&(this._raw=ck(this.jwk)),this._raw}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:ln(this.raw,t.raw)}async sign(t,n){return ek(this.jwk,t,n)}}const to=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;function mi(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function Sd(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function $r(e,...t){if(!mi(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Yw(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.createHasher");Sd(e.outputLen),Sd(e.blockLen)}function Aa(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function dk(e,t){$r(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}function Do(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function cl(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function fn(e,t){return e<<32-t|e>>>t}const Xw=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",uk=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function kr(e){if($r(e),Xw)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=uk[e[n]];return t}const xn={_0:48,_9:57,A:65,F:70,a:97,f:102};function Gh(e){if(e>=xn._0&&e<=xn._9)return e-xn._0;if(e>=xn.A&&e<=xn.F)return e-(xn.A-10);if(e>=xn.a&&e<=xn.f)return e-(xn.a-10)}function Pa(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);if(Xw)return Uint8Array.fromHex(e);const t=e.length,n=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=Gh(e.charCodeAt(s)),a=Gh(e.charCodeAt(s+1));if(i===void 0||a===void 0){const c=e[s]+e[s+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+s)}r[o]=i*16+a}return r}function fk(e){if(typeof e!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}function Yu(e){return typeof e=="string"&&(e=fk(e)),$r(e),e}function mn(...e){let t=0;for(let r=0;r<e.length;r++){const o=e[r];$r(o),t+=o.length}const n=new Uint8Array(t);for(let r=0,o=0;r<e.length;r++){const s=e[r];n.set(s,o),o+=s.length}return n}class Jw{}function Zw(e){const t=r=>e().update(Yu(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function Xu(e=32){if(to&&typeof to.getRandomValues=="function")return to.getRandomValues(new Uint8Array(e));if(to&&typeof to.randomBytes=="function")return Uint8Array.from(to.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")}function hk(e,t,n,r){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,r);const o=BigInt(32),s=BigInt(4294967295),i=Number(n>>o&s),a=Number(n&s),c=r?4:0,d=r?0:4;e.setUint32(t+c,i,r),e.setUint32(t+d,a,r)}function pk(e,t,n){return e&t^~e&n}function mk(e,t,n){return e&t^e&n^t&n}let Qw=class extends Jw{constructor(t,n,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=cl(this.buffer)}update(t){Aa(this),t=Yu(t),$r(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;for(let i=0;i<s;){const a=Math.min(o-this.pos,s-i);if(a===o){const c=cl(t);for(;o<=s-i;i+=o)this.process(c,i);continue}r.set(t.subarray(i,i+a),this.pos),this.pos+=a,i+=a,this.pos===o&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Aa(this),dk(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,Do(this.buffer.subarray(i)),this.padOffset>o-i&&(this.process(r,0),i=0);for(let f=i;f<o;f++)n[f]=0;hk(r,o-8,BigInt(this.length*8),s),this.process(r,0);const a=cl(t),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const d=c/4,u=this.get();if(d>u.length)throw new Error("_sha2: outputLen bigger than state");for(let f=0;f<d;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:r,length:o,finished:s,destroyed:i,pos:a}=this;return t.destroyed=i,t.finished=s,t.length=o,t.pos=a,o%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}};const Wn=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),It=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Di=BigInt(2**32-1),Wh=BigInt(32);function gk(e,t=!1){return t?{h:Number(e&Di),l:Number(e>>Wh&Di)}:{h:Number(e>>Wh&Di)|0,l:Number(e&Di)|0}}function yk(e,t=!1){const n=e.length;let r=new Uint32Array(n),o=new Uint32Array(n);for(let s=0;s<n;s++){const{h:i,l:a}=gk(e[s],t);[r[s],o[s]]=[i,a]}return[r,o]}const Vh=(e,t,n)=>e>>>n,Yh=(e,t,n)=>e<<32-n|t>>>n,no=(e,t,n)=>e>>>n|t<<32-n,ro=(e,t,n)=>e<<32-n|t>>>n,ji=(e,t,n)=>e<<64-n|t>>>n-32,Oi=(e,t,n)=>e>>>n-32|t<<64-n;function Sn(e,t,n,r){const o=(t>>>0)+(r>>>0);return{h:e+n+(o/2**32|0)|0,l:o|0}}const wk=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),bk=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,vk=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),xk=(e,t,n,r,o)=>t+n+r+o+(e/2**32|0)|0,Sk=(e,t,n,r,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(o>>>0),Ek=(e,t,n,r,o,s)=>t+n+r+o+s+(e/2**32|0)|0,kk=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Vn=new Uint32Array(64);class Ik extends Qw{constructor(t=32){super(64,t,8,!1),this.A=Wn[0]|0,this.B=Wn[1]|0,this.C=Wn[2]|0,this.D=Wn[3]|0,this.E=Wn[4]|0,this.F=Wn[5]|0,this.G=Wn[6]|0,this.H=Wn[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:a,H:c}=this;return[t,n,r,o,s,i,a,c]}set(t,n,r,o,s,i,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}process(t,n){for(let f=0;f<16;f++,n+=4)Vn[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const h=Vn[f-15],p=Vn[f-2],m=fn(h,7)^fn(h,18)^h>>>3,g=fn(p,17)^fn(p,19)^p>>>10;Vn[f]=g+Vn[f-7]+m+Vn[f-16]|0}let{A:r,B:o,C:s,D:i,E:a,F:c,G:d,H:u}=this;for(let f=0;f<64;f++){const h=fn(a,6)^fn(a,11)^fn(a,25),p=u+h+pk(a,c,d)+kk[f]+Vn[f]|0,g=(fn(r,2)^fn(r,13)^fn(r,22))+mk(r,o,s)|0;u=d,d=c,c=a,a=i+p|0,i=s,s=o,o=r,r=p+g|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,u=u+this.H|0,this.set(r,o,s,i,a,c,d,u)}roundClean(){Do(Vn)}destroy(){this.set(0,0,0,0,0,0,0,0),Do(this.buffer)}}const eb=yk(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ck=eb[0],Rk=eb[1],Yn=new Uint32Array(80),Xn=new Uint32Array(80);class Tk extends Qw{constructor(t=64){super(128,t,16,!1),this.Ah=It[0]|0,this.Al=It[1]|0,this.Bh=It[2]|0,this.Bl=It[3]|0,this.Ch=It[4]|0,this.Cl=It[5]|0,this.Dh=It[6]|0,this.Dl=It[7]|0,this.Eh=It[8]|0,this.El=It[9]|0,this.Fh=It[10]|0,this.Fl=It[11]|0,this.Gh=It[12]|0,this.Gl=It[13]|0,this.Hh=It[14]|0,this.Hl=It[15]|0}get(){const{Ah:t,Al:n,Bh:r,Bl:o,Ch:s,Cl:i,Dh:a,Dl:c,Eh:d,El:u,Fh:f,Fl:h,Gh:p,Gl:m,Hh:g,Hl:b}=this;return[t,n,r,o,s,i,a,c,d,u,f,h,p,m,g,b]}set(t,n,r,o,s,i,a,c,d,u,f,h,p,m,g,b){this.Ah=t|0,this.Al=n|0,this.Bh=r|0,this.Bl=o|0,this.Ch=s|0,this.Cl=i|0,this.Dh=a|0,this.Dl=c|0,this.Eh=d|0,this.El=u|0,this.Fh=f|0,this.Fl=h|0,this.Gh=p|0,this.Gl=m|0,this.Hh=g|0,this.Hl=b|0}process(t,n){for(let v=0;v<16;v++,n+=4)Yn[v]=t.getUint32(n),Xn[v]=t.getUint32(n+=4);for(let v=16;v<80;v++){const C=Yn[v-15]|0,_=Xn[v-15]|0,R=no(C,_,1)^no(C,_,8)^Vh(C,_,7),k=ro(C,_,1)^ro(C,_,8)^Yh(C,_,7),x=Yn[v-2]|0,S=Xn[v-2]|0,I=no(x,S,19)^ji(x,S,61)^Vh(x,S,6),P=ro(x,S,19)^Oi(x,S,61)^Yh(x,S,6),T=vk(k,P,Xn[v-7],Xn[v-16]),A=xk(T,R,I,Yn[v-7],Yn[v-16]);Yn[v]=A|0,Xn[v]=T|0}let{Ah:r,Al:o,Bh:s,Bl:i,Ch:a,Cl:c,Dh:d,Dl:u,Eh:f,El:h,Fh:p,Fl:m,Gh:g,Gl:b,Hh:w,Hl:E}=this;for(let v=0;v<80;v++){const C=no(f,h,14)^no(f,h,18)^ji(f,h,41),_=ro(f,h,14)^ro(f,h,18)^Oi(f,h,41),R=f&p^~f&g,k=h&m^~h&b,x=Sk(E,_,k,Rk[v],Xn[v]),S=Ek(x,w,C,R,Ck[v],Yn[v]),I=x|0,P=no(r,o,28)^ji(r,o,34)^ji(r,o,39),T=ro(r,o,28)^Oi(r,o,34)^Oi(r,o,39),A=r&s^r&a^s&a,N=o&i^o&c^i&c;w=g|0,E=b|0,g=p|0,b=m|0,p=f|0,m=h|0,{h:f,l:h}=Sn(d|0,u|0,S|0,I|0),d=a|0,u=c|0,a=s|0,c=i|0,s=r|0,i=o|0;const L=wk(I,T,N);r=bk(L,S,P,A),o=L|0}({h:r,l:o}=Sn(this.Ah|0,this.Al|0,r|0,o|0)),{h:s,l:i}=Sn(this.Bh|0,this.Bl|0,s|0,i|0),{h:a,l:c}=Sn(this.Ch|0,this.Cl|0,a|0,c|0),{h:d,l:u}=Sn(this.Dh|0,this.Dl|0,d|0,u|0),{h:f,l:h}=Sn(this.Eh|0,this.El|0,f|0,h|0),{h:p,l:m}=Sn(this.Fh|0,this.Fl|0,p|0,m|0),{h:g,l:b}=Sn(this.Gh|0,this.Gl|0,g|0,b|0),{h:w,l:E}=Sn(this.Hh|0,this.Hl|0,w|0,E|0),this.set(r,o,s,i,a,c,d,u,f,h,p,m,g,b,w,E)}roundClean(){Do(Yn,Xn)}destroy(){Do(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const tb=Zw(()=>new Ik),Ak=Zw(()=>new Tk);const Ju=BigInt(0),Ed=BigInt(1);function jr(e,t=""){if(typeof e!="boolean"){const n=t&&`"${t}"`;throw new Error(n+"expected boolean, got type="+typeof e)}return e}function an(e,t,n=""){const r=mi(e),o=e?.length,s=t!==void 0;if(!r||s&&o!==t){const i=n&&`"${n}" `,a=s?` of length ${t}`:"",c=r?`length=${o}`:`type=${typeof e}`;throw new Error(i+"expected Uint8Array"+a+", got "+c)}return e}function Mi(e){const t=e.toString(16);return t.length&1?"0"+t:t}function nb(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return e===""?Ju:BigInt("0x"+e)}function kc(e){return nb(kr(e))}function Vs(e){return $r(e),nb(kr(Uint8Array.from(e).reverse()))}function Zu(e,t){return Pa(e.toString(16).padStart(t*2,"0"))}function rb(e,t){return Zu(e,t).reverse()}function rt(e,t,n){let r;if(typeof t=="string")try{r=Pa(t)}catch(s){throw new Error(e+" must be hex string or Uint8Array, cause: "+s)}else if(mi(t))r=Uint8Array.from(t);else throw new Error(e+" must be hex string or Uint8Array");const o=r.length;if(typeof n=="number"&&o!==n)throw new Error(e+" of length "+n+" expected, got "+o);return r}function Xh(e){return Uint8Array.from(e)}const ll=e=>typeof e=="bigint"&&Ju<=e;function Pk(e,t,n){return ll(e)&&ll(t)&&ll(n)&&t<=e&&e<n}function kd(e,t,n,r){if(!Pk(t,n,r))throw new Error("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function ob(e){let t;for(t=0;e>Ju;e>>=Ed,t+=1);return t}const gi=e=>(Ed<<BigInt(e))-Ed;function Nk(e,t,n){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");const r=p=>new Uint8Array(p),o=p=>Uint8Array.of(p);let s=r(e),i=r(e),a=0;const c=()=>{s.fill(1),i.fill(0),a=0},d=(...p)=>n(i,s,...p),u=(p=r(0))=>{i=d(o(0),p),s=d(),p.length!==0&&(i=d(o(1),p),s=d())},f=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let p=0;const m=[];for(;p<t;){s=d();const g=s.slice();m.push(g),p+=s.length}return mn(...m)};return(p,m)=>{c(),u(p);let g;for(;!(g=m(f()));)u();return c(),g}}function yi(e,t,n={}){if(!e||typeof e!="object")throw new Error("expected valid options object");function r(o,s,i){const a=e[o];if(i&&a===void 0)return;const c=typeof a;if(c!==s||a===null)throw new Error(`param "${o}" is invalid: expected ${s}, got ${c}`)}Object.entries(t).forEach(([o,s])=>r(o,s,!1)),Object.entries(n).forEach(([o,s])=>r(o,s,!0))}function Na(e){const t=new WeakMap;return(n,...r)=>{const o=t.get(n);if(o!==void 0)return o;const s=e(n,...r);return t.set(n,s),s}}const $t=BigInt(0),St=BigInt(1),yr=BigInt(2),sb=BigInt(3),ib=BigInt(4),ab=BigInt(5),_k=BigInt(7),cb=BigInt(8),Lk=BigInt(9),lb=BigInt(16);function lt(e,t){const n=e%t;return n>=$t?n:t+n}function nt(e,t,n){let r=e;for(;t-- >$t;)r*=r,r%=n;return r}function Jh(e,t){if(e===$t)throw new Error("invert: expected non-zero number");if(t<=$t)throw new Error("invert: expected positive modulus, got "+t);let n=lt(e,t),r=t,o=$t,s=St;for(;n!==$t;){const a=r/n,c=r%n,d=o-s*a;r=n,n=c,o=s,s=d}if(r!==St)throw new Error("invert: does not exist");return lt(o,t)}function Qu(e,t,n){if(!e.eql(e.sqr(t),n))throw new Error("Cannot find square root")}function db(e,t){const n=(e.ORDER+St)/ib,r=e.pow(t,n);return Qu(e,r,t),r}function Dk(e,t){const n=(e.ORDER-ab)/cb,r=e.mul(t,yr),o=e.pow(r,n),s=e.mul(t,o),i=e.mul(e.mul(s,yr),o),a=e.mul(s,e.sub(i,e.ONE));return Qu(e,a,t),a}function jk(e){const t=zr(e),n=ub(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),i=(e+_k)/lb;return(a,c)=>{let d=a.pow(c,i),u=a.mul(d,r);const f=a.mul(d,o),h=a.mul(d,s),p=a.eql(a.sqr(u),c),m=a.eql(a.sqr(f),c);d=a.cmov(d,u,p),u=a.cmov(h,f,m);const g=a.eql(a.sqr(u),c),b=a.cmov(d,u,g);return Qu(a,b,c),b}}function ub(e){if(e<sb)throw new Error("sqrt is not defined for small field");let t=e-St,n=0;for(;t%yr===$t;)t/=yr,n++;let r=yr;const o=zr(e);for(;Zh(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return db;let s=o.pow(r,t);const i=(t+St)/yr;return function(c,d){if(c.is0(d))return d;if(Zh(c,d)!==1)throw new Error("Cannot find square root");let u=n,f=c.mul(c.ONE,s),h=c.pow(d,t),p=c.pow(d,i);for(;!c.eql(h,c.ONE);){if(c.is0(h))return c.ZERO;let m=1,g=c.sqr(h);for(;!c.eql(g,c.ONE);)if(m++,g=c.sqr(g),m===u)throw new Error("Cannot find square root");const b=St<<BigInt(u-m-1),w=c.pow(f,b);u=m,f=c.sqr(w),h=c.mul(h,f),p=c.mul(p,w)}return p}}function Ok(e){return e%ib===sb?db:e%cb===ab?Dk:e%lb===Lk?jk(e):ub(e)}const Mk=(e,t)=>(lt(e,t)&St)===St,Bk=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Fk(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"},n=Bk.reduce((r,o)=>(r[o]="function",r),t);return yi(e,n),e}function Uk(e,t,n){if(n<$t)throw new Error("invalid exponent, negatives unsupported");if(n===$t)return e.ONE;if(n===St)return t;let r=e.ONE,o=t;for(;n>$t;)n&St&&(r=e.mul(r,o)),o=e.sqr(o),n>>=St;return r}function fb(e,t,n=!1){const r=new Array(t.length).fill(n?e.ZERO:void 0),o=t.reduce((i,a,c)=>e.is0(a)?i:(r[c]=i,e.mul(i,a)),e.ONE),s=e.inv(o);return t.reduceRight((i,a,c)=>e.is0(a)?i:(r[c]=e.mul(i,r[c]),e.mul(i,a)),s),r}function Zh(e,t){const n=(e.ORDER-St)/yr,r=e.pow(t,n),o=e.eql(r,e.ONE),s=e.eql(r,e.ZERO),i=e.eql(r,e.neg(e.ONE));if(!o&&!s&&!i)throw new Error("invalid Legendre symbol result");return o?1:s?0:-1}function hb(e,t){t!==void 0&&Sd(t);const n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function zr(e,t,n=!1,r={}){if(e<=$t)throw new Error("invalid field: expected ORDER > 0, got "+e);let o,s,i=!1,a;if(typeof t=="object"&&t!=null){if(r.sqrt||n)throw new Error("cannot specify opts in two arguments");const h=t;h.BITS&&(o=h.BITS),h.sqrt&&(s=h.sqrt),typeof h.isLE=="boolean"&&(n=h.isLE),typeof h.modFromBytes=="boolean"&&(i=h.modFromBytes),a=h.allowedLengths}else typeof t=="number"&&(o=t),r.sqrt&&(s=r.sqrt);const{nBitLength:c,nByteLength:d}=hb(e,o);if(d>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let u;const f=Object.freeze({ORDER:e,isLE:n,BITS:c,BYTES:d,MASK:gi(c),ZERO:$t,ONE:St,allowedLengths:a,create:h=>lt(h,e),isValid:h=>{if(typeof h!="bigint")throw new Error("invalid field element: expected bigint, got "+typeof h);return $t<=h&&h<e},is0:h=>h===$t,isValidNot0:h=>!f.is0(h)&&f.isValid(h),isOdd:h=>(h&St)===St,neg:h=>lt(-h,e),eql:(h,p)=>h===p,sqr:h=>lt(h*h,e),add:(h,p)=>lt(h+p,e),sub:(h,p)=>lt(h-p,e),mul:(h,p)=>lt(h*p,e),pow:(h,p)=>Uk(f,h,p),div:(h,p)=>lt(h*Jh(p,e),e),sqrN:h=>h*h,addN:(h,p)=>h+p,subN:(h,p)=>h-p,mulN:(h,p)=>h*p,inv:h=>Jh(h,e),sqrt:s||(h=>(u||(u=Ok(e)),u(f,h))),toBytes:h=>n?rb(h,d):Zu(h,d),fromBytes:(h,p=!0)=>{if(a){if(!a.includes(h.length)||h.length>d)throw new Error("Field.fromBytes: expected "+a+" bytes, got "+h.length);const g=new Uint8Array(d);g.set(h,n?0:g.length-h.length),h=g}if(h.length!==d)throw new Error("Field.fromBytes: expected "+d+" bytes, got "+h.length);let m=n?Vs(h):kc(h);if(i&&(m=lt(m,e)),!p&&!f.isValid(m))throw new Error("invalid field element: outside of range 0..ORDER");return m},invertBatch:h=>fb(f,h),cmov:(h,p,m)=>m?p:h});return Object.freeze(f)}function pb(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function mb(e){const t=pb(e);return t+Math.ceil(t/2)}function Hk(e,t,n=!1){const r=e.length,o=pb(t),s=mb(t);if(r<16||r<s||r>1024)throw new Error("expected "+s+"-1024 bytes of input, got "+r);const i=n?Vs(e):kc(e),a=lt(i,t-St)+St;return n?rb(a,o):Zu(a,o)}const jo=BigInt(0),wr=BigInt(1);function _a(e,t){const n=t.negate();return e?n:t}function br(e,t){const n=fb(e.Fp,t.map(r=>r.Z));return t.map((r,o)=>e.fromAffine(r.toAffine(n[o])))}function gb(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function dl(e,t){gb(e,t);const n=Math.ceil(t/e)+1,r=2**(e-1),o=2**e,s=gi(e),i=BigInt(e);return{windows:n,windowSize:r,mask:s,maxNumber:o,shiftBy:i}}function Qh(e,t,n){const{windowSize:r,mask:o,maxNumber:s,shiftBy:i}=n;let a=Number(e&o),c=e>>i;a>r&&(a-=s,c+=wr);const d=t*r,u=d+Math.abs(a)-1,f=a===0,h=a<0,p=t%2!==0;return{nextN:c,offset:u,isZero:f,isNeg:h,isNegF:p,offsetF:d}}function $k(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function zk(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((n,r)=>{if(!t.isValid(n))throw new Error("invalid scalar at index "+r)})}const ul=new WeakMap,yb=new WeakMap;function fl(e){return yb.get(e)||1}function ep(e){if(e!==jo)throw new Error("invalid wNAF")}class wb{constructor(t,n){this.BASE=t.BASE,this.ZERO=t.ZERO,this.Fn=t.Fn,this.bits=n}_unsafeLadder(t,n,r=this.ZERO){let o=t;for(;n>jo;)n&wr&&(r=r.add(o)),o=o.double(),n>>=wr;return r}precomputeWindow(t,n){const{windows:r,windowSize:o}=dl(n,this.bits),s=[];let i=t,a=i;for(let c=0;c<r;c++){a=i,s.push(a);for(let d=1;d<o;d++)a=a.add(i),s.push(a);i=a.double()}return s}wNAF(t,n,r){if(!this.Fn.isValid(r))throw new Error("invalid scalar");let o=this.ZERO,s=this.BASE;const i=dl(t,this.bits);for(let a=0;a<i.windows;a++){const{nextN:c,offset:d,isZero:u,isNeg:f,isNegF:h,offsetF:p}=Qh(r,a,i);r=c,u?s=s.add(_a(h,n[p])):o=o.add(_a(f,n[d]))}return ep(r),{p:o,f:s}}wNAFUnsafe(t,n,r,o=this.ZERO){const s=dl(t,this.bits);for(let i=0;i<s.windows&&r!==jo;i++){const{nextN:a,offset:c,isZero:d,isNeg:u}=Qh(r,i,s);if(r=a,!d){const f=n[c];o=o.add(u?f.negate():f)}}return ep(r),o}getPrecomputes(t,n,r){let o=ul.get(n);return o||(o=this.precomputeWindow(n,t),t!==1&&(typeof r=="function"&&(o=r(o)),ul.set(n,o))),o}cached(t,n,r){const o=fl(t);return this.wNAF(o,this.getPrecomputes(o,t,r),n)}unsafe(t,n,r,o){const s=fl(t);return s===1?this._unsafeLadder(t,n,o):this.wNAFUnsafe(s,this.getPrecomputes(s,t,r),n,o)}createCache(t,n){gb(n,this.bits),yb.set(t,n),ul.delete(t)}hasCache(t){return fl(t)!==1}}function qk(e,t,n,r){let o=t,s=e.ZERO,i=e.ZERO;for(;n>jo||r>jo;)n&wr&&(s=s.add(o)),r&wr&&(i=i.add(o)),o=o.double(),n>>=wr,r>>=wr;return{p1:s,p2:i}}function bb(e,t,n,r){$k(n,e),zk(r,t);const o=n.length,s=r.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const i=e.ZERO,a=ob(BigInt(o));let c=1;a>12?c=a-3:a>4?c=a-2:a>0&&(c=2);const d=gi(c),u=new Array(Number(d)+1).fill(i),f=Math.floor((t.BITS-1)/c)*c;let h=i;for(let p=f;p>=0;p-=c){u.fill(i);for(let g=0;g<s;g++){const b=r[g],w=Number(b>>BigInt(p)&d);u[w]=u[w].add(n[g])}let m=i;for(let g=u.length-1,b=i;g>0;g--)b=b.add(u[g]),m=m.add(b);if(h=h.add(m),p!==0)for(let g=0;g<c;g++)h=h.double()}return h}function tp(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Fk(t),t}else return zr(e,{isLE:n})}function vb(e,t,n={},r){if(r===void 0&&(r=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);for(const c of["p","n","h"]){const d=t[c];if(!(typeof d=="bigint"&&d>jo))throw new Error(`CURVE.${c} must be positive bigint`)}const o=tp(t.p,n.Fp,r),s=tp(t.n,n.Fn,r),a=["Gx","Gy","a",e==="weierstrass"?"b":"d"];for(const c of a)if(!o.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:o,Fn:s}}const Jn=BigInt(0),yt=BigInt(1),hl=BigInt(2),Kk=BigInt(8);function Gk(e,t,n,r){const o=e.sqr(n),s=e.sqr(r),i=e.add(e.mul(t.a,o),s),a=e.add(e.ONE,e.mul(t.d,e.mul(o,s)));return e.eql(i,a)}function Wk(e,t={}){const n=vb("edwards",e,t,t.FpFnLE),{Fp:r,Fn:o}=n;let s=n.CURVE;const{h:i}=s;yi(t,{},{uvRatio:"function"});const a=hl<<BigInt(o.BYTES*8)-yt,c=b=>r.create(b),d=t.uvRatio||((b,w)=>{try{return{isValid:!0,value:r.sqrt(r.div(b,w))}}catch{return{isValid:!1,value:Jn}}});if(!Gk(r,s,s.Gx,s.Gy))throw new Error("bad curve params: generator point");function u(b,w,E=!1){const v=E?yt:Jn;return kd("coordinate "+b,w,v,a),w}function f(b){if(!(b instanceof m))throw new Error("ExtendedPoint expected")}const h=Na((b,w)=>{const{X:E,Y:v,Z:C}=b,_=b.is0();w==null&&(w=_?Kk:r.inv(C));const R=c(E*w),k=c(v*w),x=r.mul(C,w);if(_)return{x:Jn,y:yt};if(x!==yt)throw new Error("invZ was invalid");return{x:R,y:k}}),p=Na(b=>{const{a:w,d:E}=s;if(b.is0())throw new Error("bad point: ZERO");const{X:v,Y:C,Z:_,T:R}=b,k=c(v*v),x=c(C*C),S=c(_*_),I=c(S*S),P=c(k*w),T=c(S*c(P+x)),A=c(I+c(E*c(k*x)));if(T!==A)throw new Error("bad point: equation left != right (1)");const N=c(v*C),L=c(_*R);if(N!==L)throw new Error("bad point: equation left != right (2)");return!0});class m{constructor(w,E,v,C){this.X=u("x",w),this.Y=u("y",E),this.Z=u("z",v,!0),this.T=u("t",C),Object.freeze(this)}static CURVE(){return s}static fromAffine(w){if(w instanceof m)throw new Error("extended point not allowed");const{x:E,y:v}=w||{};return u("x",E),u("y",v),new m(E,v,yt,c(E*v))}static fromBytes(w,E=!1){const v=r.BYTES,{a:C,d:_}=s;w=Xh(an(w,v,"point")),jr(E,"zip215");const R=Xh(w),k=w[v-1];R[v-1]=k&-129;const x=Vs(R),S=E?a:r.ORDER;kd("point.y",x,Jn,S);const I=c(x*x),P=c(I-yt),T=c(_*I-C);let{isValid:A,value:N}=d(P,T);if(!A)throw new Error("bad point: invalid y coordinate");const L=(N&yt)===yt,D=(k&128)!==0;if(!E&&N===Jn&&D)throw new Error("bad point: x=0 and x_0=1");return D!==L&&(N=c(-N)),m.fromAffine({x:N,y:x})}static fromHex(w,E=!1){return m.fromBytes(rt("point",w),E)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(w=8,E=!0){return g.createCache(this,w),E||this.multiply(hl),this}assertValidity(){p(this)}equals(w){f(w);const{X:E,Y:v,Z:C}=this,{X:_,Y:R,Z:k}=w,x=c(E*k),S=c(_*C),I=c(v*k),P=c(R*C);return x===S&&I===P}is0(){return this.equals(m.ZERO)}negate(){return new m(c(-this.X),this.Y,this.Z,c(-this.T))}double(){const{a:w}=s,{X:E,Y:v,Z:C}=this,_=c(E*E),R=c(v*v),k=c(hl*c(C*C)),x=c(w*_),S=E+v,I=c(c(S*S)-_-R),P=x+R,T=P-k,A=x-R,N=c(I*T),L=c(P*A),D=c(I*A),j=c(T*P);return new m(N,L,j,D)}add(w){f(w);const{a:E,d:v}=s,{X:C,Y:_,Z:R,T:k}=this,{X:x,Y:S,Z:I,T:P}=w,T=c(C*x),A=c(_*S),N=c(k*v*P),L=c(R*I),D=c((C+_)*(x+S)-T-A),j=L-N,B=L+N,M=c(A-E*T),F=c(D*j),$=c(B*M),H=c(D*M),te=c(j*B);return new m(F,$,te,H)}subtract(w){return this.add(w.negate())}multiply(w){if(!o.isValidNot0(w))throw new Error("invalid scalar: expected 1 <= sc < curve.n");const{p:E,f:v}=g.cached(this,w,C=>br(m,C));return br(m,[E,v])[0]}multiplyUnsafe(w,E=m.ZERO){if(!o.isValid(w))throw new Error("invalid scalar: expected 0 <= sc < curve.n");return w===Jn?m.ZERO:this.is0()||w===yt?this:g.unsafe(this,w,v=>br(m,v),E)}isSmallOrder(){return this.multiplyUnsafe(i).is0()}isTorsionFree(){return g.unsafe(this,s.n).is0()}toAffine(w){return h(this,w)}clearCofactor(){return i===yt?this:this.multiplyUnsafe(i)}toBytes(){const{x:w,y:E}=this.toAffine(),v=r.toBytes(E);return v[v.length-1]|=w&yt?128:0,v}toHex(){return kr(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get ex(){return this.X}get ey(){return this.Y}get ez(){return this.Z}get et(){return this.T}static normalizeZ(w){return br(m,w)}static msm(w,E){return bb(m,o,w,E)}_setWindowSize(w){this.precompute(w)}toRawBytes(){return this.toBytes()}}m.BASE=new m(s.Gx,s.Gy,yt,c(s.Gx*s.Gy)),m.ZERO=new m(Jn,yt,yt,Jn),m.Fp=r,m.Fn=o;const g=new wb(m,o.BITS);return m.BASE.precompute(8),m}function Vk(e,t,n={}){if(typeof t!="function")throw new Error('"hash" function param is required');yi(n,{},{adjustScalarBytes:"function",randomBytes:"function",domain:"function",prehash:"function",mapToCurve:"function"});const{prehash:r}=n,{BASE:o,Fp:s,Fn:i}=e,a=n.randomBytes||Xu,c=n.adjustScalarBytes||(S=>S),d=n.domain||((S,I,P)=>{if(jr(P,"phflag"),I.length||P)throw new Error("Contexts/pre-hash are not supported");return S});function u(S){return i.create(Vs(S))}function f(S){const I=v.secretKey;S=rt("private key",S,I);const P=rt("hashed private key",t(S),2*I),T=c(P.slice(0,I)),A=P.slice(I,2*I),N=u(T);return{head:T,prefix:A,scalar:N}}function h(S){const{head:I,prefix:P,scalar:T}=f(S),A=o.multiply(T),N=A.toBytes();return{head:I,prefix:P,scalar:T,point:A,pointBytes:N}}function p(S){return h(S).pointBytes}function m(S=Uint8Array.of(),...I){const P=mn(...I);return u(t(d(P,rt("context",S),!!r)))}function g(S,I,P={}){S=rt("message",S),r&&(S=r(S));const{prefix:T,scalar:A,pointBytes:N}=h(I),L=m(P.context,T,S),D=o.multiply(L).toBytes(),j=m(P.context,D,N,S),B=i.create(L+j*A);if(!i.isValid(B))throw new Error("sign failed: invalid s");const M=mn(D,i.toBytes(B));return an(M,v.signature,"result")}const b={zip215:!0};function w(S,I,P,T=b){const{context:A,zip215:N}=T,L=v.signature;S=rt("signature",S,L),I=rt("message",I),P=rt("publicKey",P,v.publicKey),N!==void 0&&jr(N,"zip215"),r&&(I=r(I));const D=L/2,j=S.subarray(0,D),B=Vs(S.subarray(D,L));let M,F,$;try{M=e.fromBytes(P,N),F=e.fromBytes(j,N),$=o.multiplyUnsafe(B)}catch{return!1}if(!N&&M.isSmallOrder())return!1;const H=m(A,F.toBytes(),M.toBytes(),I);return F.add(M.multiplyUnsafe(H)).subtract($).clearCofactor().is0()}const E=s.BYTES,v={secretKey:E,publicKey:E,signature:2*E,seed:E};function C(S=a(v.seed)){return an(S,v.seed,"seed")}function _(S){const I=x.randomSecretKey(S);return{secretKey:I,publicKey:p(I)}}function R(S){return mi(S)&&S.length===i.BYTES}function k(S,I){try{return!!e.fromBytes(S,I)}catch{return!1}}const x={getExtendedPublicKey:h,randomSecretKey:C,isValidSecretKey:R,isValidPublicKey:k,toMontgomery(S){const{y:I}=e.fromBytes(S),P=v.publicKey,T=P===32;if(!T&&P!==57)throw new Error("only defined for 25519 and 448");const A=T?s.div(yt+I,yt-I):s.div(I-yt,I+yt);return s.toBytes(A)},toMontgomerySecret(S){const I=v.secretKey;an(S,I);const P=t(S.subarray(0,I));return c(P).subarray(0,I)},randomPrivateKey:C,precompute(S=8,I=e.BASE){return I.precompute(S,!1)}};return Object.freeze({keygen:_,getPublicKey:p,sign:g,verify:w,utils:x,Point:e,lengths:v})}function Yk(e){const t={a:e.a,d:e.d,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp,r=zr(t.n,e.nBitLength,!0),o={Fp:n,Fn:r,uvRatio:e.uvRatio},s={randomBytes:e.randomBytes,adjustScalarBytes:e.adjustScalarBytes,domain:e.domain,prehash:e.prehash,mapToCurve:e.mapToCurve};return{CURVE:t,curveOpts:o,hash:e.hash,eddsaOpts:s}}function Xk(e,t){const n=t.Point;return Object.assign({},t,{ExtendedPoint:n,CURVE:e,nBitLength:n.Fn.BITS,nByteLength:n.Fn.BYTES})}function Jk(e){const{CURVE:t,curveOpts:n,hash:r,eddsaOpts:o}=Yk(e),s=Wk(t,n),i=Vk(s,r,o);return Xk(e,i)}const Zk=BigInt(1),np=BigInt(2);BigInt(3);const Qk=BigInt(5),eI=BigInt(8),ef=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),xb={p:ef,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:eI,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function tI(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=ef,a=e*e%s*e%s,c=nt(a,np,s)*a%s,d=nt(c,Zk,s)*e%s,u=nt(d,Qk,s)*d%s,f=nt(u,t,s)*u%s,h=nt(f,n,s)*f%s,p=nt(h,r,s)*h%s,m=nt(p,o,s)*p%s,g=nt(m,o,s)*p%s,b=nt(g,t,s)*u%s;return{pow_p_5_8:nt(b,np,s)*e%s,b2:a}}function nI(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const rp=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function rI(e,t){const n=ef,r=lt(t*t*t,n),o=lt(r*r*t,n),s=tI(e*o).pow_p_5_8;let i=lt(e*r*s,n);const a=lt(t*i*i,n),c=i,d=lt(i*rp,n),u=a===e,f=a===lt(-e,n),h=a===lt(-e*rp,n);return u&&(i=c),(f||h)&&(i=d),Mk(i,n)&&(i=lt(-i,n)),{isValid:u||f,value:i}}const oI=zr(xb.p,{isLE:!0}),sI={...xb,Fp:oI,hash:Ak,adjustScalarBytes:nI,uvRatio:rI},La=Jk(sI);class op extends Error{constructor(t="An error occurred while signing a message"){super(t),this.name="SigningError"}}class sp extends Error{constructor(t="An error occurred while verifying a message"){super(t),this.name="VerificationError"}}class iI extends Error{constructor(t="Missing Web Crypto API"){super(t),this.name="WebCryptoMissingError"}}const Un={get(e=globalThis){const t=e.crypto;if(t?.subtle==null)throw new iI("Missing Web Crypto API. The most likely cause of this error is that this page is being accessed from an insecure context (i.e. not HTTPS). For more information and possible resolutions see https://github.com/libp2p/js-libp2p/blob/main/packages/crypto/README.md#web-crypto-api");return t}},Da=32,Cn=64,Id=32;let xo;const Sb=(async()=>{try{return await Un.get().subtle.generateKey({name:"Ed25519"},!0,["sign","verify"]),!0}catch{return!1}})();function aI(){const e=La.utils.randomPrivateKey(),t=La.getPublicKey(e);return{privateKey:pI(e,t),publicKey:t}}async function cI(e,t){let n;e.length===Cn?n=e.subarray(0,32):n=e;const r={crv:"Ed25519",kty:"OKP",x:Le(e.subarray(32),"base64url"),d:Le(n,"base64url"),ext:!0,key_ops:["sign"]},o=await Un.get().subtle.importKey("jwk",r,{name:"Ed25519"},!0,["sign"]),s=await Un.get().subtle.sign({name:"Ed25519"},o,t instanceof Uint8Array?t:t.subarray());return new Uint8Array(s,0,s.byteLength)}function lI(e,t){const n=e.subarray(0,Id);return La.sign(t instanceof Uint8Array?t:t.subarray(),n)}async function dI(e,t){return xo==null&&(xo=await Sb),xo?cI(e,t):lI(e,t)}async function uI(e,t,n){if(e.buffer instanceof ArrayBuffer){const r=await Un.get().subtle.importKey("raw",e.buffer,{name:"Ed25519"},!1,["verify"]);return await Un.get().subtle.verify({name:"Ed25519"},r,t,n instanceof Uint8Array?n:n.subarray())}throw new TypeError("WebCrypto does not support SharedArrayBuffer for Ed25519 keys")}function fI(e,t,n){return La.verify(t,n instanceof Uint8Array?n:n.subarray(),e)}async function hI(e,t,n){return xo==null&&(xo=await Sb),xo?uI(e,t,n):fI(e,t,n)}function pI(e,t){const n=new Uint8Array(Cn);for(let r=0;r<Id;r++)n[r]=e[r],n[Id+r]=t[r];return n}function Ic(e){return e==null?!1:typeof e.then=="function"&&typeof e.catch=="function"&&typeof e.finally=="function"}class Eb{type="Ed25519";raw;constructor(t){this.raw=Ys(t,Da)}toMultihash(){return hi.digest(Ac(this))}toCID(){return Ze.createV1(114,this.toMultihash())}toString(){return Dt.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:ln(this.raw,t.raw)}verify(t,n,r){r?.signal?.throwIfAborted();const o=hI(this.raw,n,t);return Ic(o)?o.then(s=>(r?.signal?.throwIfAborted(),s)):o}}class Cd{type="Ed25519";raw;publicKey;constructor(t,n){this.raw=Ys(t,Cn),this.publicKey=new Eb(n)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:ln(this.raw,t.raw)}sign(t,n){n?.signal?.throwIfAborted();const r=dI(this.raw,t);return Ic(r)?r.then(o=>(n?.signal?.throwIfAborted(),o)):(n?.signal?.throwIfAborted(),r)}}function mI(e){if(e.length>Cn){e=Ys(e,Cn+Da);const r=e.subarray(0,Cn),o=e.subarray(Cn,e.length);return new Cd(r,o)}e=Ys(e,Cn);const t=e.subarray(0,Cn),n=e.subarray(Da);return new Cd(t,n)}function kb(e){return e=Ys(e,Da),new Eb(e)}async function gI(){const{privateKey:e,publicKey:t}=aI();return new Cd(e,t)}function Ys(e,t){if(e=Uint8Array.from(e??[]),e.length!==t)throw new cn(`Key must be a Uint8Array of length ${t}, got ${e.length}`);return e}const yI=Math.pow(2,7),wI=Math.pow(2,14),bI=Math.pow(2,21),tf=Math.pow(2,28),nf=Math.pow(2,35),rf=Math.pow(2,42),of=Math.pow(2,49),Ue=128,Ct=127;function qr(e){if(e<yI)return 1;if(e<wI)return 2;if(e<bI)return 3;if(e<tf)return 4;if(e<nf)return 5;if(e<rf)return 6;if(e<of)return 7;if(Number.MAX_SAFE_INTEGER!=null&&e>Number.MAX_SAFE_INTEGER)throw new RangeError("Could not encode varint");return 8}function Ib(e,t,n=0){switch(qr(e)){case 8:t[n++]=e&255|Ue,e/=128;case 7:t[n++]=e&255|Ue,e/=128;case 6:t[n++]=e&255|Ue,e/=128;case 5:t[n++]=e&255|Ue,e/=128;case 4:t[n++]=e&255|Ue,e>>>=7;case 3:t[n++]=e&255|Ue,e>>>=7;case 2:t[n++]=e&255|Ue,e>>>=7;case 1:{t[n++]=e&255,e>>>=7;break}default:throw new Error("unreachable")}return t}function vI(e,t,n=0){switch(qr(e)){case 8:t.set(n++,e&255|Ue),e/=128;case 7:t.set(n++,e&255|Ue),e/=128;case 6:t.set(n++,e&255|Ue),e/=128;case 5:t.set(n++,e&255|Ue),e/=128;case 4:t.set(n++,e&255|Ue),e>>>=7;case 3:t.set(n++,e&255|Ue),e>>>=7;case 2:t.set(n++,e&255|Ue),e>>>=7;case 1:{t.set(n++,e&255),e>>>=7;break}default:throw new Error("unreachable")}return t}function Cb(e,t){let n=e[t],r=0;if(r+=n&Ct,n<Ue||(n=e[t+1],r+=(n&Ct)<<7,n<Ue)||(n=e[t+2],r+=(n&Ct)<<14,n<Ue)||(n=e[t+3],r+=(n&Ct)<<21,n<Ue)||(n=e[t+4],r+=(n&Ct)*tf,n<Ue)||(n=e[t+5],r+=(n&Ct)*nf,n<Ue)||(n=e[t+6],r+=(n&Ct)*rf,n<Ue)||(n=e[t+7],r+=(n&Ct)*of,n<Ue))return r;throw new RangeError("Could not decode varint")}function xI(e,t){let n=e.get(t),r=0;if(r+=n&Ct,n<Ue||(n=e.get(t+1),r+=(n&Ct)<<7,n<Ue)||(n=e.get(t+2),r+=(n&Ct)<<14,n<Ue)||(n=e.get(t+3),r+=(n&Ct)<<21,n<Ue)||(n=e.get(t+4),r+=(n&Ct)*tf,n<Ue)||(n=e.get(t+5),r+=(n&Ct)*nf,n<Ue)||(n=e.get(t+6),r+=(n&Ct)*rf,n<Ue)||(n=e.get(t+7),r+=(n&Ct)*of,n<Ue))return r;throw new RangeError("Could not decode varint")}function SI(e,t,n=0){return t==null&&(t=Fn(qr(e))),t instanceof Uint8Array?Ib(e,t,n):vI(e,t,n)}function Rb(e,t=0){return e instanceof Uint8Array?Cb(e,t):xI(e,t)}const sf=new Float32Array([-0]),ar=new Uint8Array(sf.buffer);function EI(e,t,n){sf[0]=e,t[n]=ar[0],t[n+1]=ar[1],t[n+2]=ar[2],t[n+3]=ar[3]}function kI(e,t){return ar[0]=e[t],ar[1]=e[t+1],ar[2]=e[t+2],ar[3]=e[t+3],sf[0]}const af=new Float64Array([-0]),Rt=new Uint8Array(af.buffer);function II(e,t,n){af[0]=e,t[n]=Rt[0],t[n+1]=Rt[1],t[n+2]=Rt[2],t[n+3]=Rt[3],t[n+4]=Rt[4],t[n+5]=Rt[5],t[n+6]=Rt[6],t[n+7]=Rt[7]}function CI(e,t){return Rt[0]=e[t],Rt[1]=e[t+1],Rt[2]=e[t+2],Rt[3]=e[t+3],Rt[4]=e[t+4],Rt[5]=e[t+5],Rt[6]=e[t+6],Rt[7]=e[t+7],af[0]}const RI=BigInt(Number.MAX_SAFE_INTEGER),TI=BigInt(Number.MIN_SAFE_INTEGER);class Tt{lo;hi;constructor(t,n){this.lo=t|0,this.hi=n|0}toNumber(t=!1){if(!t&&this.hi>>>31>0){const n=~this.lo+1>>>0;let r=~this.hi>>>0;return n===0&&(r=r+1>>>0),-(n+r*4294967296)}return this.lo+this.hi*4294967296}toBigInt(t=!1){if(t)return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n);if(this.hi>>>31){const n=~this.lo+1>>>0;let r=~this.hi>>>0;return n===0&&(r=r+1>>>0),-(BigInt(n)+(BigInt(r)<<32n))}return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n)}toString(t=!1){return this.toBigInt(t).toString()}zzEncode(){const t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this}zzDecode(){const t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this}length(){const t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?n===0?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:r<128?9:10}static fromBigInt(t){if(t===0n)return Ir;if(t<RI&&t>TI)return this.fromNumber(Number(t));const n=t<0n;n&&(t=-t);let r=t>>32n,o=t-(r<<32n);return n&&(r=~r|0n,o=~o|0n,++o>ip&&(o=0n,++r>ip&&(r=0n))),new Tt(Number(o),Number(r))}static fromNumber(t){if(t===0)return Ir;const n=t<0;n&&(t=-t);let r=t>>>0,o=(t-r)/4294967296>>>0;return n&&(o=~o>>>0,r=~r>>>0,++r>4294967295&&(r=0,++o>4294967295&&(o=0))),new Tt(r,o)}static from(t){return typeof t=="number"?Tt.fromNumber(t):typeof t=="bigint"?Tt.fromBigInt(t):typeof t=="string"?Tt.fromBigInt(BigInt(t)):t.low!=null||t.high!=null?new Tt(t.low>>>0,t.high>>>0):Ir}}const Ir=new Tt(0,0);Ir.toBigInt=function(){return 0n};Ir.zzEncode=Ir.zzDecode=function(){return this};Ir.length=function(){return 1};const ip=4294967296n;function AI(e){let t=0,n=0;for(let r=0;r<e.length;++r)n=e.charCodeAt(r),n<128?t+=1:n<2048?t+=2:(n&64512)===55296&&(e.charCodeAt(r+1)&64512)===56320?(++r,t+=4):t+=3;return t}function PI(e,t,n){if(n-t<1)return"";let o;const s=[];let i=0,a;for(;t<n;)a=e[t++],a<128?s[i++]=a:a>191&&a<224?s[i++]=(a&31)<<6|e[t++]&63:a>239&&a<365?(a=((a&7)<<18|(e[t++]&63)<<12|(e[t++]&63)<<6|e[t++]&63)-65536,s[i++]=55296+(a>>10),s[i++]=56320+(a&1023)):s[i++]=(a&15)<<12|(e[t++]&63)<<6|e[t++]&63,i>8191&&((o??(o=[])).push(String.fromCharCode.apply(String,s)),i=0);return o!=null?(i>0&&o.push(String.fromCharCode.apply(String,s.slice(0,i))),o.join("")):String.fromCharCode.apply(String,s.slice(0,i))}function Tb(e,t,n){const r=n;let o,s;for(let i=0;i<e.length;++i)o=e.charCodeAt(i),o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=o&63|128):(o&64512)===55296&&((s=e.charCodeAt(i+1))&64512)===56320?(o=65536+((o&1023)<<10)+(s&1023),++i,t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=o&63|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=o&63|128);return n-r}function nn(e,t){return RangeError(`index out of range: ${e.pos} + ${t??1} > ${e.len}`)}function Bi(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}class NI{buf;pos;len;_slice=Uint8Array.prototype.subarray;constructor(t){this.buf=t,this.pos=0,this.len=t.length}uint32(){let t=4294967295;if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,nn(this,10);return t}int32(){return this.uint32()|0}sint32(){const t=this.uint32();return t>>>1^-(t&1)|0}bool(){return this.uint32()!==0}fixed32(){if(this.pos+4>this.len)throw nn(this,4);return Bi(this.buf,this.pos+=4)}sfixed32(){if(this.pos+4>this.len)throw nn(this,4);return Bi(this.buf,this.pos+=4)|0}float(){if(this.pos+4>this.len)throw nn(this,4);const t=kI(this.buf,this.pos);return this.pos+=4,t}double(){if(this.pos+8>this.len)throw nn(this,4);const t=CI(this.buf,this.pos);return this.pos+=8,t}bytes(){const t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw nn(this,t);return this.pos+=t,n===r?new Uint8Array(0):this.buf.subarray(n,r)}string(){const t=this.bytes();return PI(t,0,t.length)}skip(t){if(typeof t=="number"){if(this.pos+t>this.len)throw nn(this,t);this.pos+=t}else do if(this.pos>=this.len)throw nn(this);while((this.buf[this.pos++]&128)!==0);return this}skipType(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(t=this.uint32()&7)!==4;)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error(`invalid wire type ${t} at offset ${this.pos}`)}return this}readLongVarint(){const t=new Tt(0,0);let n=0;if(this.len-this.pos>4){for(;n<4;++n)if(t.lo=(t.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(this.buf[this.pos]&127)<<28)>>>0,t.hi=(t.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return t;n=0}else{for(;n<3;++n){if(this.pos>=this.len)throw nn(this);if(t.lo=(t.lo|(this.buf[this.pos]&127)<<n*7)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(this.buf[this.pos++]&127)<<n*7)>>>0,t}if(this.len-this.pos>4){for(;n<5;++n)if(t.hi=(t.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return t}else for(;n<5;++n){if(this.pos>=this.len)throw nn(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<<n*7+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}readFixed64(){if(this.pos+8>this.len)throw nn(this,8);const t=Bi(this.buf,this.pos+=4),n=Bi(this.buf,this.pos+=4);return new Tt(t,n)}int64(){return this.readLongVarint().toBigInt()}int64Number(){return this.readLongVarint().toNumber()}int64String(){return this.readLongVarint().toString()}uint64(){return this.readLongVarint().toBigInt(!0)}uint64Number(){const t=Cb(this.buf,this.pos);return this.pos+=qr(t),t}uint64String(){return this.readLongVarint().toString(!0)}sint64(){return this.readLongVarint().zzDecode().toBigInt()}sint64Number(){return this.readLongVarint().zzDecode().toNumber()}sint64String(){return this.readLongVarint().zzDecode().toString()}fixed64(){return this.readFixed64().toBigInt()}fixed64Number(){return this.readFixed64().toNumber()}fixed64String(){return this.readFixed64().toString()}sfixed64(){return this.readFixed64().toBigInt()}sfixed64Number(){return this.readFixed64().toNumber()}sfixed64String(){return this.readFixed64().toString()}}function _I(e){return new NI(e instanceof Uint8Array?e:e.subarray())}function Cc(e,t,n){const r=_I(e);return t.decode(r,void 0,n)}function LI(e){let r,o=8192;return function(i){if(i<1||i>4096)return Fn(i);o+i>8192&&(r=Fn(8192),o=0);const a=r.subarray(o,o+=i);return(o&7)!==0&&(o=(o|7)+1),a}}class Es{fn;len;next;val;constructor(t,n,r){this.fn=t,this.len=n,this.next=void 0,this.val=r}}function pl(){}class DI{head;tail;len;next;constructor(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}}const jI=LI();function OI(e){return globalThis.Buffer!=null?Fn(e):jI(e)}class Rd{len;head;tail;states;constructor(){this.len=0,this.head=new Es(pl,0,0),this.tail=this.head,this.states=null}_push(t,n,r){return this.tail=this.tail.next=new Es(t,n,r),this.len+=n,this}uint32(t){return this.len+=(this.tail=this.tail.next=new BI((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this}int32(t){return t<0?this._push(Fi,10,Tt.fromNumber(t)):this.uint32(t)}sint32(t){return this.uint32((t<<1^t>>31)>>>0)}uint64(t){const n=Tt.fromBigInt(t);return this._push(Fi,n.length(),n)}uint64Number(t){return this._push(Ib,qr(t),t)}uint64String(t){return this.uint64(BigInt(t))}int64(t){return this.uint64(t)}int64Number(t){return this.uint64Number(t)}int64String(t){return this.uint64String(t)}sint64(t){const n=Tt.fromBigInt(t).zzEncode();return this._push(Fi,n.length(),n)}sint64Number(t){const n=Tt.fromNumber(t).zzEncode();return this._push(Fi,n.length(),n)}sint64String(t){return this.sint64(BigInt(t))}bool(t){return this._push(ml,1,t?1:0)}fixed32(t){return this._push(ss,4,t>>>0)}sfixed32(t){return this.fixed32(t)}fixed64(t){const n=Tt.fromBigInt(t);return this._push(ss,4,n.lo)._push(ss,4,n.hi)}fixed64Number(t){const n=Tt.fromNumber(t);return this._push(ss,4,n.lo)._push(ss,4,n.hi)}fixed64String(t){return this.fixed64(BigInt(t))}sfixed64(t){return this.fixed64(t)}sfixed64Number(t){return this.fixed64Number(t)}sfixed64String(t){return this.fixed64String(t)}float(t){return this._push(EI,4,t)}double(t){return this._push(II,8,t)}bytes(t){const n=t.length>>>0;return n===0?this._push(ml,1,0):this.uint32(n)._push(FI,n,t)}string(t){const n=AI(t);return n!==0?this.uint32(n)._push(Tb,n,t):this._push(ml,1,0)}fork(){return this.states=new DI(this),this.head=this.tail=new Es(pl,0,0),this.len=0,this}reset(){return this.states!=null?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Es(pl,0,0),this.len=0),this}ldelim(){const t=this.head,n=this.tail,r=this.len;return this.reset().uint32(r),r!==0&&(this.tail.next=t.next,this.tail=n,this.len+=r),this}finish(){let t=this.head.next;const n=OI(this.len);let r=0;for(;t!=null;)t.fn(t.val,n,r),r+=t.len,t=t.next;return n}}function ml(e,t,n){t[n]=e&255}function MI(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}class BI extends Es{next;constructor(t,n){super(MI,t,n),this.next=void 0}}function Fi(e,t,n){for(;e.hi!==0;)t[n++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=e.lo&127|128,e.lo=e.lo>>>7;t[n++]=e.lo}function ss(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function FI(e,t,n){t.set(e,n)}globalThis.Buffer!=null&&(Rd.prototype.bytes=function(e){const t=e.length>>>0;return this.uint32(t),t>0&&this._push(UI,t,e),this},Rd.prototype.string=function(e){const t=globalThis.Buffer.byteLength(e);return this.uint32(t),t>0&&this._push(HI,t,e),this});function UI(e,t,n){t.set(e,n)}function HI(e,t,n){e.length<40?Tb(e,t,n):t.utf8Write!=null?t.utf8Write(e,n):t.set(ct(e),n)}function $I(){return new Rd}function Rc(e,t){const n=$I();return t.encode(e,n,{lengthDelimited:!1}),n.finish()}var ja;(function(e){e[e.VARINT=0]="VARINT",e[e.BIT64=1]="BIT64",e[e.LENGTH_DELIMITED=2]="LENGTH_DELIMITED",e[e.START_GROUP=3]="START_GROUP",e[e.END_GROUP=4]="END_GROUP",e[e.BIT32=5]="BIT32"})(ja||(ja={}));function Ab(e,t,n,r){return{name:e,type:t,encode:n,decode:r}}function zI(e){function t(o){if(e[o.toString()]==null)throw new Error("Invalid enum value");return e[o]}const n=function(s,i){const a=t(s);i.int32(a)},r=function(s){const i=s.int32();return t(i)};return Ab("enum",ja.VARINT,n,r)}function Tc(e,t){return Ab("message",ja.LENGTH_DELIMITED,e,t)}class ap extends Error{code="ERR_MAX_LENGTH";name="MaxLengthError"}var Qe;(function(e){e.RSA="RSA",e.Ed25519="Ed25519",e.secp256k1="secp256k1",e.ECDSA="ECDSA"})(Qe||(Qe={}));var Td;(function(e){e[e.RSA=0]="RSA",e[e.Ed25519=1]="Ed25519",e[e.secp256k1=2]="secp256k1",e[e.ECDSA=3]="ECDSA"})(Td||(Td={}));(function(e){e.codec=()=>zI(Td)})(Qe||(Qe={}));var Or;(function(e){let t;e.codec=()=>(t==null&&(t=Tc((n,r,o={})=>{o.lengthDelimited!==!1&&r.fork(),n.Type!=null&&(r.uint32(8),Qe.codec().encode(n.Type,r)),n.Data!=null&&(r.uint32(18),r.bytes(n.Data)),o.lengthDelimited!==!1&&r.ldelim()},(n,r,o={})=>{const s={},i=r==null?n.len:n.pos+r;for(;n.pos<i;){const a=n.uint32();switch(a>>>3){case 1:{s.Type=Qe.codec().decode(n);break}case 2:{s.Data=n.bytes();break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>Rc(n,e.codec()),e.decode=(n,r)=>Cc(n,e.codec(),r)})(Or||(Or={}));var Oa;(function(e){let t;e.codec=()=>(t==null&&(t=Tc((n,r,o={})=>{o.lengthDelimited!==!1&&r.fork(),n.Type!=null&&(r.uint32(8),Qe.codec().encode(n.Type,r)),n.Data!=null&&(r.uint32(18),r.bytes(n.Data)),o.lengthDelimited!==!1&&r.ldelim()},(n,r,o={})=>{const s={},i=r==null?n.len:n.pos+r;for(;n.pos<i;){const a=n.uint32();switch(a>>>3){case 1:{s.Type=Qe.codec().decode(n);break}case 2:{s.Data=n.bytes();break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>Rc(n,e.codec()),e.decode=(n,r)=>Cc(n,e.codec(),r)})(Oa||(Oa={}));const Pb=tb;class Nb{type="RSA";jwk;_raw;_multihash;constructor(t,n){this.jwk=t,this._multihash=n}get raw(){return this._raw==null&&(this._raw=Lb(this.jwk)),this._raw}toMultihash(){return this._multihash}toCID(){return Ze.createV1(114,this._multihash)}toString(){return Dt.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:ln(this.raw,t.raw)}verify(t,n,r){return oC(this.jwk,n,t,r)}}class qI{type="RSA";jwk;_raw;publicKey;constructor(t,n){this.jwk=t,this.publicKey=n}get raw(){return this._raw==null&&(this._raw=YI(this.jwk)),this._raw}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:ln(this.raw,t.raw)}sign(t,n){return rC(this.jwk,t,n)}}const KI=8192,_b=18,GI=1062,WI=Uint8Array.from([48,13,6,9,42,134,72,134,247,13,1,1,1,5,0]);function VI(e){return{n:Le(e[1],"base64url"),e:Le(e[2],"base64url"),d:Le(e[3],"base64url"),p:Le(e[4],"base64url"),q:Le(e[5],"base64url"),dp:Le(e[6],"base64url"),dq:Le(e[7],"base64url"),qi:Le(e[8],"base64url"),kty:"RSA"}}function YI(e){if(e.n==null||e.e==null||e.d==null||e.p==null||e.q==null||e.dp==null||e.dq==null||e.qi==null)throw new cn("JWK was missing components");return Dn([Wt(Uint8Array.from([0])),Wt(ct(e.n,"base64url")),Wt(ct(e.e,"base64url")),Wt(ct(e.d,"base64url")),Wt(ct(e.p,"base64url")),Wt(ct(e.q,"base64url")),Wt(ct(e.dp,"base64url")),Wt(ct(e.dq,"base64url")),Wt(ct(e.qi,"base64url"))]).subarray()}function XI(e){const t=Ko(e[1],{offset:0});return{kty:"RSA",n:Le(t[0],"base64url"),e:Le(t[1],"base64url")}}function Lb(e){if(e.n==null||e.e==null)throw new cn("JWK was missing components");return Dn([WI,Vu(Dn([Wt(ct(e.n,"base64url")),Wt(ct(e.e,"base64url"))]))]).subarray()}function JI(e){const t=Ko(e);return ZI(t)}function ZI(e){const t=VI(e);return tC(t)}function QI(e,t){if(e.byteLength>=GI)throw new _w("Key size is too large");const n=Ko(e,{offset:0});return eC(n,e,t)}function eC(e,t,n){const r=XI(e);if(n==null){const o=Pb(Or.encode({Type:Qe.RSA,Data:t}));n=fi(_b,o)}return new Nb(r,n)}function tC(e){if(sC(e)>KI)throw new cn("Key size is too large");const t=nC(e),n=Pb(Or.encode({Type:Qe.RSA,Data:Lb(t.publicKey)})),r=fi(_b,n);return new qI(t.privateKey,new Nb(t.publicKey,r))}function nC(e){if(e==null)throw new cn("Missing key parameter");return{privateKey:e,publicKey:{kty:e.kty,n:e.n,e:e.e}}}async function rC(e,t,n){const r=await Un.get().subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]);n?.signal?.throwIfAborted();const o=await Un.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},r,t instanceof Uint8Array?t:t.subarray());return n?.signal?.throwIfAborted(),new Uint8Array(o,0,o.byteLength)}async function oC(e,t,n,r){const o=await Un.get().subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);r?.signal?.throwIfAborted();const s=await Un.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},o,t,n instanceof Uint8Array?n:n.subarray());return r?.signal?.throwIfAborted(),s}function sC(e){if(e.kty!=="RSA")throw new cn("invalid key type");if(e.n==null)throw new cn("invalid key modulus");return ct(e.n,"base64url").length*8}class Db extends Jw{constructor(t,n){super(),this.finished=!1,this.destroyed=!1,Yw(t);const r=Yu(n);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?t.create().update(r).digest():r);for(let i=0;i<s.length;i++)s[i]^=54;this.iHash.update(s),this.oHash=t.create();for(let i=0;i<s.length;i++)s[i]^=106;this.oHash.update(s),Do(s)}update(t){return Aa(this),this.iHash.update(t),this}digestInto(t){Aa(this),$r(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:a}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=a,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const jb=(e,t,n)=>new Db(e,t).update(n).digest();jb.create=(e,t)=>new Db(e,t);const cp=(e,t)=>(e+(e>=0?t:-t)/Ob)/t;function iC(e,t,n){const[[r,o],[s,i]]=t,a=cp(i*e,n),c=cp(-o*e,n);let d=e-a*r-c*s,u=-a*o-c*i;const f=d<An,h=u<An;f&&(d=-d),h&&(u=-u);const p=gi(Math.ceil(ob(n)/2))+So;if(d<An||d>=p||u<An||u>=p)throw new Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:f,k1:d,k2neg:h,k2:u}}function Ad(e){if(!["compact","recovered","der"].includes(e))throw new Error('Signature format must be "compact", "recovered", or "der"');return e}function gl(e,t){const n={};for(let r of Object.keys(t))n[r]=e[r]===void 0?t[r]:e[r];return jr(n.lowS,"lowS"),jr(n.prehash,"prehash"),n.format!==void 0&&Ad(n.format),n}class aC extends Error{constructor(t=""){super(t)}}const Rn={Err:aC,_tlv:{encode:(e,t)=>{const{Err:n}=Rn;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length&1)throw new n("tlv.encode: unpadded data");const r=t.length/2,o=Mi(r);if(o.length/2&128)throw new n("tlv.encode: long form length too big");const s=r>127?Mi(o.length/2|128):"";return Mi(e)+s+o+t},decode(e,t){const{Err:n}=Rn;let r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");const o=t[r++],s=!!(o&128);let i=0;if(!s)i=o;else{const c=o&127;if(!c)throw new n("tlv.decode(long): indefinite length not supported");if(c>4)throw new n("tlv.decode(long): byte length is too big");const d=t.subarray(r,r+c);if(d.length!==c)throw new n("tlv.decode: length bytes not complete");if(d[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(const u of d)i=i<<8|u;if(r+=c,i<128)throw new n("tlv.decode(long): not minimal encoding")}const a=t.subarray(r,r+i);if(a.length!==i)throw new n("tlv.decode: wrong value length");return{v:a,l:t.subarray(r+i)}}},_int:{encode(e){const{Err:t}=Rn;if(e<An)throw new t("integer: negative integers are not allowed");let n=Mi(e);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new t("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:t}=Rn;if(e[0]&128)throw new t("invalid signature integer: negative");if(e[0]===0&&!(e[1]&128))throw new t("invalid signature integer: unnecessary leading zero");return kc(e)}},toSig(e){const{Err:t,_int:n,_tlv:r}=Rn,o=rt("signature",e),{v:s,l:i}=r.decode(48,o);if(i.length)throw new t("invalid signature: left bytes after parsing");const{v:a,l:c}=r.decode(2,s),{v:d,l:u}=r.decode(2,c);if(u.length)throw new t("invalid signature: left bytes after parsing");return{r:n.decode(a),s:n.decode(d)}},hexFromSig(e){const{_tlv:t,_int:n}=Rn,r=t.encode(2,n.encode(e.r)),o=t.encode(2,n.encode(e.s)),s=r+o;return t.encode(48,s)}},An=BigInt(0),So=BigInt(1),Ob=BigInt(2),Ui=BigInt(3),cC=BigInt(4);function po(e,t){const{BYTES:n}=e;let r;if(typeof t=="bigint")r=t;else{let o=rt("private key",t);try{r=e.fromBytes(o)}catch{throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof t}`)}}if(!e.isValidNot0(r))throw new Error("invalid private key: out of range [1..N-1]");return r}function lC(e,t={}){const n=vb("weierstrass",e,t),{Fp:r,Fn:o}=n;let s=n.CURVE;const{h:i,n:a}=s;yi(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:c}=t;if(c&&(!r.is0(s.a)||typeof c.beta!="bigint"||!Array.isArray(c.basises)))throw new Error('invalid endo: expected "beta": bigint and "basises": array');const d=Bb(r,o);function u(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}function f(T,A,N){const{x:L,y:D}=A.toAffine(),j=r.toBytes(L);if(jr(N,"isCompressed"),N){u();const B=!r.isOdd(D);return mn(Mb(B),j)}else return mn(Uint8Array.of(4),j,r.toBytes(D))}function h(T){an(T,void 0,"Point");const{publicKey:A,publicKeyUncompressed:N}=d,L=T.length,D=T[0],j=T.subarray(1);if(L===A&&(D===2||D===3)){const B=r.fromBytes(j);if(!r.isValid(B))throw new Error("bad point: is not on curve, wrong x");const M=g(B);let F;try{F=r.sqrt(M)}catch(te){const ne=te instanceof Error?": "+te.message:"";throw new Error("bad point: is not on curve, sqrt error"+ne)}u();const $=r.isOdd(F);return(D&1)===1!==$&&(F=r.neg(F)),{x:B,y:F}}else if(L===N&&D===4){const B=r.BYTES,M=r.fromBytes(j.subarray(0,B)),F=r.fromBytes(j.subarray(B,B*2));if(!b(M,F))throw new Error("bad point: is not on curve");return{x:M,y:F}}else throw new Error(`bad point: got length ${L}, expected compressed=${A} or uncompressed=${N}`)}const p=t.toBytes||f,m=t.fromBytes||h;function g(T){const A=r.sqr(T),N=r.mul(A,T);return r.add(r.add(N,r.mul(T,s.a)),s.b)}function b(T,A){const N=r.sqr(A),L=g(T);return r.eql(N,L)}if(!b(s.Gx,s.Gy))throw new Error("bad curve params: generator point");const w=r.mul(r.pow(s.a,Ui),cC),E=r.mul(r.sqr(s.b),BigInt(27));if(r.is0(r.add(w,E)))throw new Error("bad curve params: a or b");function v(T,A,N=!1){if(!r.isValid(A)||N&&r.is0(A))throw new Error(`bad point coordinate ${T}`);return A}function C(T){if(!(T instanceof S))throw new Error("ProjectivePoint expected")}function _(T){if(!c||!c.basises)throw new Error("no endo");return iC(T,c.basises,o.ORDER)}const R=Na((T,A)=>{const{X:N,Y:L,Z:D}=T;if(r.eql(D,r.ONE))return{x:N,y:L};const j=T.is0();A==null&&(A=j?r.ONE:r.inv(D));const B=r.mul(N,A),M=r.mul(L,A),F=r.mul(D,A);if(j)return{x:r.ZERO,y:r.ZERO};if(!r.eql(F,r.ONE))throw new Error("invZ was invalid");return{x:B,y:M}}),k=Na(T=>{if(T.is0()){if(t.allowInfinityPoint&&!r.is0(T.Y))return;throw new Error("bad point: ZERO")}const{x:A,y:N}=T.toAffine();if(!r.isValid(A)||!r.isValid(N))throw new Error("bad point: x or y not field elements");if(!b(A,N))throw new Error("bad point: equation left != right");if(!T.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});function x(T,A,N,L,D){return N=new S(r.mul(N.X,T),N.Y,N.Z),A=_a(L,A),N=_a(D,N),A.add(N)}class S{constructor(A,N,L){this.X=v("x",A),this.Y=v("y",N,!0),this.Z=v("z",L),Object.freeze(this)}static CURVE(){return s}static fromAffine(A){const{x:N,y:L}=A||{};if(!A||!r.isValid(N)||!r.isValid(L))throw new Error("invalid affine point");if(A instanceof S)throw new Error("projective point not allowed");return r.is0(N)&&r.is0(L)?S.ZERO:new S(N,L,r.ONE)}static fromBytes(A){const N=S.fromAffine(m(an(A,void 0,"point")));return N.assertValidity(),N}static fromHex(A){return S.fromBytes(rt("pointHex",A))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(A=8,N=!0){return P.createCache(this,A),N||this.multiply(Ui),this}assertValidity(){k(this)}hasEvenY(){const{y:A}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(A)}equals(A){C(A);const{X:N,Y:L,Z:D}=this,{X:j,Y:B,Z:M}=A,F=r.eql(r.mul(N,M),r.mul(j,D)),$=r.eql(r.mul(L,M),r.mul(B,D));return F&&$}negate(){return new S(this.X,r.neg(this.Y),this.Z)}double(){const{a:A,b:N}=s,L=r.mul(N,Ui),{X:D,Y:j,Z:B}=this;let M=r.ZERO,F=r.ZERO,$=r.ZERO,H=r.mul(D,D),te=r.mul(j,j),ne=r.mul(B,B),re=r.mul(D,j);return re=r.add(re,re),$=r.mul(D,B),$=r.add($,$),M=r.mul(A,$),F=r.mul(L,ne),F=r.add(M,F),M=r.sub(te,F),F=r.add(te,F),F=r.mul(M,F),M=r.mul(re,M),$=r.mul(L,$),ne=r.mul(A,ne),re=r.sub(H,ne),re=r.mul(A,re),re=r.add(re,$),$=r.add(H,H),H=r.add($,H),H=r.add(H,ne),H=r.mul(H,re),F=r.add(F,H),ne=r.mul(j,B),ne=r.add(ne,ne),H=r.mul(ne,re),M=r.sub(M,H),$=r.mul(ne,te),$=r.add($,$),$=r.add($,$),new S(M,F,$)}add(A){C(A);const{X:N,Y:L,Z:D}=this,{X:j,Y:B,Z:M}=A;let F=r.ZERO,$=r.ZERO,H=r.ZERO;const te=s.a,ne=r.mul(s.b,Ui);let re=r.mul(N,j),ae=r.mul(L,B),U=r.mul(D,M),J=r.add(N,L),Q=r.add(j,B);J=r.mul(J,Q),Q=r.add(re,ae),J=r.sub(J,Q),Q=r.add(N,D);let ee=r.add(j,M);return Q=r.mul(Q,ee),ee=r.add(re,U),Q=r.sub(Q,ee),ee=r.add(L,D),F=r.add(B,M),ee=r.mul(ee,F),F=r.add(ae,U),ee=r.sub(ee,F),H=r.mul(te,Q),F=r.mul(ne,U),H=r.add(F,H),F=r.sub(ae,H),H=r.add(ae,H),$=r.mul(F,H),ae=r.add(re,re),ae=r.add(ae,re),U=r.mul(te,U),Q=r.mul(ne,Q),ae=r.add(ae,U),U=r.sub(re,U),U=r.mul(te,U),Q=r.add(Q,U),re=r.mul(ae,Q),$=r.add($,re),re=r.mul(ee,Q),F=r.mul(J,F),F=r.sub(F,re),re=r.mul(J,ae),H=r.mul(ee,H),H=r.add(H,re),new S(F,$,H)}subtract(A){return this.add(A.negate())}is0(){return this.equals(S.ZERO)}multiply(A){const{endo:N}=t;if(!o.isValidNot0(A))throw new Error("invalid scalar: out of range");let L,D;const j=B=>P.cached(this,B,M=>br(S,M));if(N){const{k1neg:B,k1:M,k2neg:F,k2:$}=_(A),{p:H,f:te}=j(M),{p:ne,f:re}=j($);D=te.add(re),L=x(N.beta,H,ne,B,F)}else{const{p:B,f:M}=j(A);L=B,D=M}return br(S,[L,D])[0]}multiplyUnsafe(A){const{endo:N}=t,L=this;if(!o.isValid(A))throw new Error("invalid scalar: out of range");if(A===An||L.is0())return S.ZERO;if(A===So)return L;if(P.hasCache(this))return this.multiply(A);if(N){const{k1neg:D,k1:j,k2neg:B,k2:M}=_(A),{p1:F,p2:$}=qk(S,L,j,M);return x(N.beta,F,$,D,B)}else return P.unsafe(L,A)}multiplyAndAddUnsafe(A,N,L){const D=this.multiplyUnsafe(N).add(A.multiplyUnsafe(L));return D.is0()?void 0:D}toAffine(A){return R(this,A)}isTorsionFree(){const{isTorsionFree:A}=t;return i===So?!0:A?A(S,this):P.unsafe(this,a).is0()}clearCofactor(){const{clearCofactor:A}=t;return i===So?this:A?A(S,this):this.multiplyUnsafe(i)}isSmallOrder(){return this.multiplyUnsafe(i).is0()}toBytes(A=!0){return jr(A,"isCompressed"),this.assertValidity(),p(S,this,A)}toHex(A=!0){return kr(this.toBytes(A))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(A=!0){return this.toBytes(A)}_setWindowSize(A){this.precompute(A)}static normalizeZ(A){return br(S,A)}static msm(A,N){return bb(S,o,A,N)}static fromPrivateKey(A){return S.BASE.multiply(po(o,A))}}S.BASE=new S(s.Gx,s.Gy,r.ONE),S.ZERO=new S(r.ZERO,r.ONE,r.ZERO),S.Fp=r,S.Fn=o;const I=o.BITS,P=new wb(S,t.endo?Math.ceil(I/2):I);return S.BASE.precompute(8),S}function Mb(e){return Uint8Array.of(e?2:3)}function Bb(e,t){return{secretKey:t.BYTES,publicKey:1+e.BYTES,publicKeyUncompressed:1+2*e.BYTES,publicKeyHasPrefix:!0,signature:2*t.BYTES}}function dC(e,t={}){const{Fn:n}=e,r=t.randomBytes||Xu,o=Object.assign(Bb(e.Fp,n),{seed:mb(n.ORDER)});function s(p){try{return!!po(n,p)}catch{return!1}}function i(p,m){const{publicKey:g,publicKeyUncompressed:b}=o;try{const w=p.length;return m===!0&&w!==g||m===!1&&w!==b?!1:!!e.fromBytes(p)}catch{return!1}}function a(p=r(o.seed)){return Hk(an(p,o.seed,"seed"),n.ORDER)}function c(p,m=!0){return e.BASE.multiply(po(n,p)).toBytes(m)}function d(p){const m=a(p);return{secretKey:m,publicKey:c(m)}}function u(p){if(typeof p=="bigint")return!1;if(p instanceof e)return!0;const{secretKey:m,publicKey:g,publicKeyUncompressed:b}=o;if(n.allowedLengths||m===g)return;const w=rt("key",p).length;return w===g||w===b}function f(p,m,g=!0){if(u(p)===!0)throw new Error("first arg must be private key");if(u(m)===!1)throw new Error("second arg must be public key");const b=po(n,p);return e.fromHex(m).multiply(b).toBytes(g)}return Object.freeze({getPublicKey:c,getSharedSecret:f,keygen:d,Point:e,utils:{isValidSecretKey:s,isValidPublicKey:i,randomSecretKey:a,isValidPrivateKey:s,randomPrivateKey:a,normPrivateKeyToScalar:p=>po(n,p),precompute(p=8,m=e.BASE){return m.precompute(p,!1)}},lengths:o})}function uC(e,t,n={}){Yw(t),yi(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const r=n.randomBytes||Xu,o=n.hmac||((N,...L)=>jb(t,N,mn(...L))),{Fp:s,Fn:i}=e,{ORDER:a,BITS:c}=i,{keygen:d,getPublicKey:u,getSharedSecret:f,utils:h,lengths:p}=dC(e,n),m={prehash:!1,lowS:typeof n.lowS=="boolean"?n.lowS:!1,format:void 0,extraEntropy:!1},g="compact";function b(N){const L=a>>So;return N>L}function w(N,L){if(!i.isValidNot0(L))throw new Error(`invalid signature ${N}: out of range 1..Point.Fn.ORDER`);return L}function E(N,L){Ad(L);const D=p.signature,j=L==="compact"?D:L==="recovered"?D+1:void 0;return an(N,j,`${L} signature`)}class v{constructor(L,D,j){this.r=w("r",L),this.s=w("s",D),j!=null&&(this.recovery=j),Object.freeze(this)}static fromBytes(L,D=g){E(L,D);let j;if(D==="der"){const{r:$,s:H}=Rn.toSig(an(L));return new v($,H)}D==="recovered"&&(j=L[0],D="compact",L=L.subarray(1));const B=i.BYTES,M=L.subarray(0,B),F=L.subarray(B,B*2);return new v(i.fromBytes(M),i.fromBytes(F),j)}static fromHex(L,D){return this.fromBytes(Pa(L),D)}addRecoveryBit(L){return new v(this.r,this.s,L)}recoverPublicKey(L){const D=s.ORDER,{r:j,s:B,recovery:M}=this;if(M==null||![0,1,2,3].includes(M))throw new Error("recovery id invalid");if(a*Ob<D&&M>1)throw new Error("recovery id is ambiguous for h>1 curve");const $=M===2||M===3?j+a:j;if(!s.isValid($))throw new Error("recovery id 2 or 3 invalid");const H=s.toBytes($),te=e.fromBytes(mn(Mb((M&1)===0),H)),ne=i.inv($),re=_(rt("msgHash",L)),ae=i.create(-re*ne),U=i.create(B*ne),J=e.BASE.multiplyUnsafe(ae).add(te.multiplyUnsafe(U));if(J.is0())throw new Error("point at infinify");return J.assertValidity(),J}hasHighS(){return b(this.s)}toBytes(L=g){if(Ad(L),L==="der")return Pa(Rn.hexFromSig(this));const D=i.toBytes(this.r),j=i.toBytes(this.s);if(L==="recovered"){if(this.recovery==null)throw new Error("recovery bit must be present");return mn(Uint8Array.of(this.recovery),D,j)}return mn(D,j)}toHex(L){return kr(this.toBytes(L))}assertValidity(){}static fromCompact(L){return v.fromBytes(rt("sig",L),"compact")}static fromDER(L){return v.fromBytes(rt("sig",L),"der")}normalizeS(){return this.hasHighS()?new v(this.r,i.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return kr(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return kr(this.toBytes("compact"))}}const C=n.bits2int||function(L){if(L.length>8192)throw new Error("input is too large");const D=kc(L),j=L.length*8-c;return j>0?D>>BigInt(j):D},_=n.bits2int_modN||function(L){return i.create(C(L))},R=gi(c);function k(N){return kd("num < 2^"+c,N,An,R),i.toBytes(N)}function x(N,L){return an(N,void 0,"message"),L?an(t(N),void 0,"prehashed message"):N}function S(N,L,D){if(["recovered","canonical"].some(ae=>ae in D))throw new Error("sign() legacy options not supported");const{lowS:j,prehash:B,extraEntropy:M}=gl(D,m);N=x(N,B);const F=_(N),$=po(i,L),H=[k($),k(F)];if(M!=null&&M!==!1){const ae=M===!0?r(p.secretKey):M;H.push(rt("extraEntropy",ae))}const te=mn(...H),ne=F;function re(ae){const U=C(ae);if(!i.isValidNot0(U))return;const J=i.inv(U),Q=e.BASE.multiply(U).toAffine(),ee=i.create(Q.x);if(ee===An)return;const Te=i.create(J*i.create(ne+ee*$));if(Te===An)return;let q=(Q.x===ee?0:2)|Number(Q.y&So),z=Te;return j&&b(Te)&&(z=i.neg(Te),q^=1),new v(ee,z,q)}return{seed:te,k2sig:re}}function I(N,L,D={}){N=rt("message",N);const{seed:j,k2sig:B}=S(N,L,D);return Nk(t.outputLen,i.BYTES,o)(j,B)}function P(N){let L;const D=typeof N=="string"||mi(N),j=!D&&N!==null&&typeof N=="object"&&typeof N.r=="bigint"&&typeof N.s=="bigint";if(!D&&!j)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(j)L=new v(N.r,N.s);else if(D){try{L=v.fromBytes(rt("sig",N),"der")}catch(B){if(!(B instanceof Rn.Err))throw B}if(!L)try{L=v.fromBytes(rt("sig",N),"compact")}catch{return!1}}return L||!1}function T(N,L,D,j={}){const{lowS:B,prehash:M,format:F}=gl(j,m);if(D=rt("publicKey",D),L=x(rt("message",L),M),"strict"in j)throw new Error("options.strict was renamed to lowS");const $=F===void 0?P(N):v.fromBytes(rt("sig",N),F);if($===!1)return!1;try{const H=e.fromBytes(D);if(B&&$.hasHighS())return!1;const{r:te,s:ne}=$,re=_(L),ae=i.inv(ne),U=i.create(re*ae),J=i.create(te*ae),Q=e.BASE.multiplyUnsafe(U).add(H.multiplyUnsafe(J));return Q.is0()?!1:i.create(Q.x)===te}catch{return!1}}function A(N,L,D={}){const{prehash:j}=gl(D,m);return L=x(L,j),v.fromBytes(N,"recovered").recoverPublicKey(L).toBytes()}return Object.freeze({keygen:d,getPublicKey:u,getSharedSecret:f,utils:h,lengths:p,Point:e,sign:I,verify:T,recoverPublicKey:A,Signature:v,hash:t})}function fC(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp;let r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(i=>Math.ceil(i/2)))):void 0;const o=zr(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),s={Fp:n,Fn:o,allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:s}}function hC(e){const{CURVE:t,curveOpts:n}=fC(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}function pC(e,t){const n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,hb(n.Fn.ORDER,n.Fn.BITS))})}function mC(e){const{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:o}=hC(e),s=lC(t,n),i=uC(s,r,o);return pC(e,i)}function gC(e,t){const n=r=>mC({...e,hash:r});return{...n(t),create:n}}const cf={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},yC={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},lp=BigInt(2);function wC(e){const t=cf.p,n=BigInt(3),r=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),c=BigInt(88),d=e*e*e%t,u=d*d*e%t,f=nt(u,n,t)*u%t,h=nt(f,n,t)*u%t,p=nt(h,lp,t)*d%t,m=nt(p,o,t)*p%t,g=nt(m,s,t)*m%t,b=nt(g,a,t)*g%t,w=nt(b,c,t)*b%t,E=nt(w,a,t)*g%t,v=nt(E,n,t)*u%t,C=nt(v,i,t)*m%t,_=nt(C,r,t)*d%t,R=nt(_,lp,t);if(!Pd.eql(Pd.sqr(R),e))throw new Error("Cannot find square root");return R}const Pd=zr(cf.p,{sqrt:wC}),lr=gC({...cf,Fp:Pd,lowS:!0,endo:yC},tb);function bC(e,t,n){const r=Wu.digest(t instanceof Uint8Array?t:t.subarray());if(Ic(r))return r.then(({digest:o})=>(n?.signal?.throwIfAborted(),lr.sign(o,e).toDERRawBytes())).catch(o=>{throw o.name==="AbortError"?o:new op(String(o))});try{return lr.sign(r.digest,e).toDERRawBytes()}catch(o){throw new op(String(o))}}function vC(e,t,n,r){const o=Wu.digest(n instanceof Uint8Array?n:n.subarray());if(Ic(o))return o.then(({digest:s})=>(r?.signal?.throwIfAborted(),lr.verify(t,s,e))).catch(s=>{throw s.name==="AbortError"?s:new sp(String(s))});try{return r?.signal?.throwIfAborted(),lr.verify(t,o.digest,e)}catch(s){throw new sp(String(s))}}class Fb{type="secp256k1";raw;_key;constructor(t){this._key=IC(t),this.raw=EC(this._key)}toMultihash(){return hi.digest(Ac(this))}toCID(){return Ze.createV1(114,this.toMultihash())}toString(){return Dt.encode(this.toMultihash().bytes).substring(1)}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:ln(this.raw,t.raw)}verify(t,n,r){return vC(this._key,n,t,r)}}class xC{type="secp256k1";raw;publicKey;constructor(t,n){this.raw=kC(t),this.publicKey=new Fb(n??CC(t))}equals(t){return t==null||!(t.raw instanceof Uint8Array)?!1:ln(this.raw,t.raw)}sign(t,n){return bC(this.raw,t,n)}}function SC(e){return new xC(e)}function Ub(e){return new Fb(e)}function EC(e){return lr.ProjectivePoint.fromHex(e).toRawBytes(!0)}function kC(e){try{return lr.getPublicKey(e,!0),e}catch(t){throw new Lw(String(t))}}function IC(e){try{return lr.ProjectivePoint.fromHex(e),e}catch(t){throw new _w(String(t))}}function CC(e){try{return lr.getPublicKey(e,!0)}catch(t){throw new Lw(String(t))}}async function RC(e,t){return gI()}function Nd(e,t){const{Type:n,Data:r}=Or.decode(e),o=r??new Uint8Array;switch(n){case Qe.RSA:return QI(o,t);case Qe.Ed25519:return kb(o);case Qe.secp256k1:return Ub(o);case Qe.ECDSA:return Ww(o);default:throw new vc}}function TC(e){const{Type:t,Data:n}=Or.decode(e.digest),r=n??new Uint8Array;switch(t){case Qe.Ed25519:return kb(r);case Qe.secp256k1:return Ub(r);case Qe.ECDSA:return Ww(r);default:throw new vc}}function Ac(e){return Or.encode({Type:Qe[e.type],Data:e.raw})}function AC(e){const t=Oa.decode(e),n=t.Data??new Uint8Array;switch(t.Type){case Qe.RSA:return JI(n);case Qe.Ed25519:return mI(n);case Qe.secp256k1:return SC(n);case Qe.ECDSA:return sk(n);default:throw new vc}}function PC(e){return Oa.encode({Type:Qe[e.type],Data:e.raw})}const Hb=Symbol.for("nodejs.util.inspect.custom"),NC=114;class lf{type;multihash;publicKey;string;constructor(t){this.type=t.type,this.multihash=t.multihash,Object.defineProperty(this,"string",{enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return`PeerId(${this.toString()})`}[Dw]=!0;toString(){return this.string==null&&(this.string=Dt.encode(this.multihash.bytes).slice(1)),this.string}toMultihash(){return this.multihash}toCID(){return Ze.createV1(NC,this.multihash)}toJSON(){return this.toString()}equals(t){if(t==null)return!1;if(t instanceof Uint8Array)return ln(this.multihash.bytes,t);if(typeof t=="string")return this.toString()===t;if(t?.toMultihash()?.bytes!=null)return ln(this.multihash.bytes,t.toMultihash().bytes);throw new Error("not valid Id")}[Hb](){return`PeerId(${this.toString()})`}}class $b extends lf{type="RSA";publicKey;constructor(t){super({...t,type:"RSA"}),this.publicKey=t.publicKey}}class zb extends lf{type="Ed25519";publicKey;constructor(t){super({...t,type:"Ed25519"}),this.publicKey=t.publicKey}}class qb extends lf{type="secp256k1";publicKey;constructor(t){super({...t,type:"secp256k1"}),this.publicKey=t.publicKey}}const _C=2336;class Kb{type="url";multihash;publicKey;url;constructor(t){this.url=t.toString(),this.multihash=hi.digest(ct(this.url))}[Hb](){return`PeerId(${this.url})`}[Dw]=!0;toString(){return this.toCID().toString()}toMultihash(){return this.multihash}toCID(){return Ze.createV1(_C,this.toMultihash())}toJSON(){return this.toString()}equals(t){return t==null?!1:(t instanceof Uint8Array&&(t=Le(t)),t.toString()===this.toString())}}const LC=114,dp=2336;function DC(e,t){let n;if(e.charAt(0)==="1"||e.charAt(0)==="Q")n=Mw(Dt.decode(`z${e}`));else{if(e.startsWith("k51qzi5uqu5")||e.startsWith("kzwfwjn5ji4")||e.startsWith("k2k4r8")||e.startsWith("bafz"))return jC(Ze.parse(e));throw new cn('Please pass a multibase decoder for strings that do not start with "1" or "Q"')}return Gb(n)}function Oo(e){if(e.type==="Ed25519")return new zb({multihash:e.toCID().multihash,publicKey:e});if(e.type==="secp256k1")return new qb({multihash:e.toCID().multihash,publicKey:e});if(e.type==="RSA")return new $b({multihash:e.toCID().multihash,publicKey:e});throw new vc}function Gb(e){if(MC(e))return new $b({multihash:e});if(OC(e))try{const t=TC(e);if(t.type==="Ed25519")return new zb({multihash:e,publicKey:t});if(t.type==="secp256k1")return new qb({multihash:e,publicKey:t})}catch{const n=Le(e.digest);return new Kb(new URL(n))}throw new yE("Supplied PeerID Multihash is invalid")}function jC(e){if(e?.multihash==null||e.version==null||e.version===1&&e.code!==LC&&e.code!==dp)throw new gE("Supplied PeerID CID is invalid");if(e.code===dp){const t=Le(e.multihash.digest);return new Kb(new URL(t))}return Gb(e.multihash)}function OC(e){return e.code===hi.code}function MC(e){return e.code===Wu.code}class Wb extends Error{static name="InvalidParametersError";constructor(t="Invalid parameters"){super(t),this.name="InvalidParametersError"}}class BC extends Error{static name="StreamResetError";constructor(t="The stream has been reset"){super(t),this.name="StreamResetError"}}class is extends Error{static name="StreamStateError";constructor(t="The stream is in an invalid state"){super(t),this.name="StreamStateError"}}class up extends Error{static name="StreamBufferError";constructor(t="The stream buffer was full"){super(t),this.name="StreamBufferError"}}class FC extends Event{data;constructor(t,n){super("message",n),this.data=t}}class df extends Event{error;local;constructor(t,n,r){super("close",r),this.error=n,this.local=t}}class UC extends df{constructor(t,n){super(!0,t,n)}}class HC extends df{constructor(t,n){super(!1,t,n)}}const $C=e=>e/2**32|0,zC=e=>e>>>0;function qC(e,t,n,r){const o=$C(n),s=zC(n);e.setUint32(t,r?s:o,r),e.setUint32(t+4,r?o:s,r)}function _d(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const Ld=e=>e?`"${e}" `:"";function Hn(e,t=""){if(typeof e!="number")throw new TypeError(Ld(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(Ld(t)+"expected integer >= 0, got "+e);return e}function $n(e,t,n=""){if(_d(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Hn(t,"length");const r=_d(e),o=t!==void 0?` of length ${t}`:"",s=r?`length=${e.length}`:`type=${typeof e}`,i=Ld(n)+"expected Uint8Array"+o+", got "+s;throw r?new RangeError(i):new TypeError(i)}function uf(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(Hn(e.outputLen),Hn(e.blockLen),e.outputLen<1||e.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}const KC=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},fp=(e,t)=>{KC(e,t);const n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw new TypeError(`"${t}" expected plain object`);if(Object.hasOwn(e,"__proto__"))throw new TypeError(`"${t}.__proto__" is not allowed`)};function Ma(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function Vb(e,t){$n(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function JM(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Cr(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function yl(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function hn(e,t){return e<<32-t|e>>>t}function ZM(e,t){return e<<t|e>>>32-t>>>0}const GC=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function WC(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function VC(e){for(let t=0;t<e.length;t++)e[t]=WC(e[t]);return e}const QM=GC?e=>e:VC,Yb=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",YC=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ff(e){if($n(e),Yb)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=YC[e[n]];return t}function hp(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function Xb(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(Yb)try{return Uint8Array.fromHex(e)}catch(o){throw o instanceof SyntaxError?new RangeError(o.message):o}const t=e.length,n=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let o=0,s=0;o<n;o++,s+=2){const i=hp(e.charCodeAt(s)),a=hp(e.charCodeAt(s+1));if(i===void 0||a===void 0){const c=e[s]+e[s+1];throw new RangeError('hex string expected, got non-hex character "'+c+'" at index '+s)}r[o]=i*16+a}return r}function XC(e){const t=globalThis;if(typeof t.scheduler?.yield=="function"){const n=t.scheduler.yield();return e&&n.catch(e),n}return new Promise(n=>t.setTimeout(n,0))}async function eB(e,t,n,r){if(Hn(e,"iters"),Hn(t,"tick"),typeof n!="function")throw new TypeError("callback must be a function");let o=Date.now();for(let s=0;s<e;s++){n(s);const i=Date.now()-o;i>=0&&i<t||(await XC(r),o=Date.now())}}function JC(e){if(typeof e!="string")throw new TypeError("string expected");const t=new TextEncoder().encode(e);try{return new Uint8Array(t)}finally{Cr(t)}}function tB(e,t=""){return typeof e=="string"?JC(e):$n(e,void 0,t)}function ZC(e,t,n="opts"){return fp(e,"defaults"),t!==void 0&&fp(t,n),Object.assign(Object.create(null),e,t)}function QC(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=ZC({},t,"info");const n=(o,s)=>e(s).update(o).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=o=>e(o),Object.assign(n,t),Object.freeze(n)}function eR(e=32){Hn(e,"bytesLength");const t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof t?.getRandomValues!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const tR=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function nR(e,t,n){return e&t^~e&n}function rR(e,t,n){return e&t^e&n^t&n}class oR{blockLen;outputLen;canXOF=!1;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,r,o){this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(t),this.view=yl(this.buffer)}update(t){Ma(this),$n(t);const{view:n,buffer:r,blockLen:o}=this,s=t.length;let i=!1;for(let a=0;a<s;){const c=Math.min(o-this.pos,s-a);if(c===o){const d=yl(t);for(;o<=s-a;a+=o)this.process(d,a);i=!0;continue}r.set(a===0&&c===s?t:t.subarray(a,a+c),this.pos),this.pos+=c,a+=c,this.pos===o&&(this.process(n,0),this.pos=0,i=!0)}return this.length+=t.length,i&&this.roundClean(),this}digestInto(t){Ma(this),Vb(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:o,isLE:s}=this;let{pos:i}=this;n[i++]=128,n.fill(0,i),this.padOffset>o-i&&(this.process(r,0),n.fill(0)),qC(r,o-8,this.length*8,s),this.process(r,0),this.roundClean();const a=t===n?r:yl(t),c=this.outputLen,d=c/4,u=this.get();if(c%4||d>u.length)throw new Error("invalid outputLen");for(let f=0;f<d;f++)a.setUint32(4*f,u[f],s)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneIntoMeta(t){const{buffer:n,length:r,finished:o,destroyed:s,pos:i}=this;return t.destroyed=s,t.finished=o,t.length=r,t.pos=i,i&&t.buffer.set(n),t}clone(){return this._cloneInto()}}const sR=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),iR=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Zn=new Uint32Array(64);class aR extends oR{A=0;B=0;C=0;D=0;E=0;F=0;G=0;H=0;constructor(t,n){super(64,t,8,!1),this.A=n[0]|0,this.B=n[1]|0,this.C=n[2]|0,this.D=n[3]|0,this.E=n[4]|0,this.F=n[5]|0,this.G=n[6]|0,this.H=n[7]|0}get(){const{A:t,B:n,C:r,D:o,E:s,F:i,G:a,H:c}=this;return[t,n,r,o,s,i,a,c]}set(t,n,r,o,s,i,a,c){this.A=t|0,this.B=n|0,this.C=r|0,this.D=o|0,this.E=s|0,this.F=i|0,this.G=a|0,this.H=c|0}_cloneInto(t){return(t||=new this.constructor).set(...this.get()),this._cloneIntoMeta(t)}process(t,n){for(let f=0;f<16;f++,n+=4)Zn[f]=t.getUint32(n,!1);for(let f=16;f<64;f++){const h=Zn[f-15],p=Zn[f-2],m=hn(h,7)^hn(h,18)^h>>>3,g=hn(p,17)^hn(p,19)^p>>>10;Zn[f]=g+Zn[f-7]+m+Zn[f-16]|0}let{A:r,B:o,C:s,D:i,E:a,F:c,G:d,H:u}=this;for(let f=0;f<64;f++){const h=hn(a,6)^hn(a,11)^hn(a,25),p=u+h+nR(a,c,d)+iR[f]+Zn[f]|0,g=(hn(r,2)^hn(r,13)^hn(r,22))+rR(r,o,s)|0;u=d,d=c,c=a,a=i+p|0,i=s,s=o,o=r,r=p+g|0}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,i=i+this.D|0,a=a+this.E|0,c=c+this.F|0,d=d+this.G|0,u=u+this.H|0,this.set(r,o,s,i,a,c,d,u)}roundClean(){Cr(Zn)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),Cr(this.buffer)}}class cR extends aR{constructor(){super(32,sR)}}const wl=QC(()=>new cR,tR(1));function Jb(e,t,n=()=>{}){if(!Array.isArray(e))throw new TypeError(`"${t}" expected array, got type=${typeof e}`);for(let r=0;r<e.length;r++)n(e[r],`${t}[${r}]`);return e}const Eo=(e,t,n)=>$n(e,t,n),Zb=Hn;function ko(e,t="object"){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`);return e}function js(e,t){if(typeof e!="function")throw new TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}const lR=ff,dR=e=>Xb(e),Qb=_d,ev=e=>eR(e),Ba=BigInt(0),pp=BigInt(1),uR=e=>e?`"${e}" `:"";function Pc(e,t=""){if(typeof e!="boolean")throw new TypeError(uR(t)+"expected boolean, got type="+typeof e);return e}function fR(e){if(typeof e=="bigint"){if(!Rr(e))throw new RangeError("positive bigint expected, got "+e)}else Zb(e);return e}function Dd(e,t=""){if(typeof e!="number"){const n=t&&`"${t}" `;throw new TypeError(n+"expected number, got type="+typeof e)}if(!Number.isSafeInteger(e)){const n=t&&`"${t}" `;throw new RangeError(n+"expected safe integer, got "+e)}}function tv(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?Ba:BigInt("0x"+e)}function nv(e){return tv(ff(e))}function Fa(e){return tv(ff(Xs($n(e)).reverse()))}function rv(e,t){if(Hn(t),t===0)throw new Error("zero output length is invalid");e=fR(e);const n=t*2,r=e.toString(16);if(r.length>n)throw new RangeError("number is too large");return Xb(r.padStart(n,"0"))}function ov(e,t){return rv(e,t).reverse()}function Xs(e){return Uint8Array.from(Eo(e))}function Rr(e){return typeof e=="bigint"&&Ba<=e}function sv(e,t,n){return Rr(e)&&Rr(t)&&Rr(n)&&t<=e&&e<n}function Os(e,t,n,r){if(!sv(t,n,r))throw new RangeError("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function hR(e){if(e<Ba)throw new Error("expected non-negative bigint, got "+e);return e===Ba?0:e.toString(2).length}const pR=e=>(Dd(e,"n"),(pp<<BigInt(e))-pp);function Ua(e,t={},n={},r="object"){ko(e,r),ko(t,"fields"),ko(n,"optFields");function o(i,a,c){const d=r==="object"?`param "${String(i)}"`:`"${r}.${String(i)}"`,u=e[i];if(!Object.hasOwn(e,i)&&(c?u!==void 0:a!=="function"))throw new TypeError(`${d} is invalid: expected own property`);if(c&&u===void 0)return;const f=typeof u;if(f!==a||u===null)throw new TypeError(`${d} is invalid: expected ${a}, got ${f}`)}const s=(i,a)=>Object.entries(i).forEach(([c,d])=>o(c,d,a));s(t,!1),s(n,!0)}const bt=BigInt(0),Ye=BigInt(1),vr=BigInt(2),iv=BigInt(3),hf=BigInt(4),av=BigInt(5),mR=BigInt(7),cv=BigInt(8),gR=BigInt(9),yR=BigInt(15),lv=BigInt(16),wR=BigInt("0x10000000000000000");function Ve(e,t){if(t<=bt)throw new Error("mod: expected positive modulus, got "+t);const n=e%t;return n>=bt?n:t+n}function bR(e,t,n){if(n<=Ye)throw new Error("pow: expected modulus > 1, got "+n);if(typeof t!="bigint")throw new TypeError("invalid exponent: expected bigint, got "+typeof t);if(t<bt)throw new Error("invalid exponent, negatives unsupported");if(t===bt)return Ye;if(t===Ye)return e;let r=e%n;if(r<bt&&(r+=n),t<wR){let a=Ye;for(;t>bt;)t&Ye&&(a=a*r%n),r=r*r%n,t>>=Ye;return a}const o=[];for(;t>bt;)o.push(Number(t&yR)),t>>=hf;const s=new Array(16);s[0]=Ye,s[1]=r;for(let a=2;a<16;a++)s[a]=s[a-1]*r%n;let i=s[o[o.length-1]];for(let a=o.length-2;a>=0;a--){i=i*i%n,i=i*i%n,i=i*i%n,i=i*i%n;const c=o[a];c!==0&&(i=i*s[c]%n)}return i}function on(e,t,n){if(n<=Ye)throw new Error("pow2: expected modulus > 1, got "+n);if(t<bt)throw new Error("pow2: expected non-negative exponent, got "+t);let r=e;for(;t-- >bt;)r*=r,r%=n;return r}function mp(e,t){if(e===bt)throw new Error("invert: expected non-zero number");if(t<=Ye)throw new Error("invert: expected modulus > 1, got "+t);let n=Ve(e,t),r=t,o=bt,s=Ye;for(;n!==bt;){const a=r/n,c=r-n*a,d=o-s*a;r=n,n=c,o=s,s=d}if(r!==Ye)throw new Error("invert: does not exist");return Ve(o,t)}function pf(e,t,n){const r=e;if(!r.eql(r.sqr(t),n))throw new Error("Cannot find square root")}function mf(e,t){if((e&Ye)===bt)throw new Error(t+": expected odd modulus, got "+e)}function dv(e,t){const n=e,r=(n.ORDER+Ye)/hf,o=n.pow(t,r);return pf(n,o,t),o}function vR(e,t){const n=e,r=(n.ORDER-av)/cv,o=n.mul(t,vr),s=n.pow(o,r),i=n.mul(t,s),a=n.mul(n.mul(i,vr),s),c=n.mul(i,n.sub(a,n.ONE));return pf(n,c,t),c}function xR(e){const t=gf(e),n=uv(e),r=n(t,t.neg(t.ONE)),o=n(t,r),s=n(t,t.neg(r)),i=(e+mR)/lv;return((a,c)=>{const d=a;let u=d.pow(c,i),f=d.mul(u,r);const h=d.mul(u,o),p=d.mul(u,s),m=d.eql(d.sqr(f),c),g=d.eql(d.sqr(h),c);u=d.cmov(u,f,m),f=d.cmov(p,h,g);const b=d.eql(d.sqr(f),c),w=d.cmov(u,f,b);return pf(d,w,c),w})}function uv(e){if(e<iv)throw new Error("sqrt is not defined for small field");mf(e,"tonelliShanks");let t=e-Ye,n=0;for(;t%vr===bt;)t/=vr,n++;let r=vr;const o=gf(e);for(;Ha(o,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return dv;let s=o.pow(r,t);const i=(t+Ye)/vr;return function(c,d){const u=c;if(u.is0(d))return d;if(Ha(u,d)!==1)throw new Error("Cannot find square root");let f=n,h=u.mul(u.ONE,s),p=u.pow(d,t),m=u.pow(d,i);for(;!u.eql(p,u.ONE);){if(u.is0(p))throw new Error("Cannot find square root: probably non-prime P");let g=1,b=u.sqr(p);for(;!u.eql(b,u.ONE);)if(g++,b=u.sqr(b),g===f)throw new Error("Cannot find square root");const w=Ye<<BigInt(f-g-1),E=u.pow(h,w);f=g,h=u.sqr(E),p=u.mul(p,h),m=u.mul(m,E)}return m}}function SR(e){return mf(e,"Fp.sqrt"),e%hf===iv?dv:e%cv===av?vR:e%lv===gR?xR(e):uv(e)}const ER=(e,t)=>(Ve(e,t)&Ye)===Ye,kR=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Js(e){if(ko(e,"field"),typeof e.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof e.ORDER);Dd(e.BYTES,"BYTES"),Dd(e.BITS,"BITS");for(const t of kR)js(e[t],"field."+t);if(e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=Ye)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function fv(e,t,n=!1){Js(e),Jb(t,"nums"),Pc(n,"passZero");const r=e,o=new Array(t.length).fill(n?r.ZERO:void 0),s=t.reduce((a,c,d)=>r.is0(c)?a:(o[d]=a,r.mul(a,c)),r.ONE),i=r.inv(s);return t.reduceRight((a,c,d)=>r.is0(c)?a:(o[d]=r.mul(a,o[d]),r.mul(a,c)),i),o}function Ha(e,t){Js(e);const n=e;mf(n.ORDER,"FpLegendre");const r=(n.ORDER-Ye)/vr,o=n.pow(t,r),s=n.eql(o,n.ONE),i=n.eql(o,n.ZERO),a=n.eql(o,n.neg(n.ONE));if(!s&&!i&&!a)throw new Error("invalid Legendre symbol result");return s?1:i?0:-1}function IR(e,t){if(t!==void 0&&Zb(t),e<=bt)throw new Error("invalid n length: expected positive n, got "+e);if(t!==void 0&&t<1)throw new Error("invalid n length: expected positive bit length, got "+t);const n=hR(e);if(t!==void 0&&t<n)throw new Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);const r=t!==void 0?t:n,o=Math.ceil(r/8);return{nBitLength:r,nByteLength:o}}const gp=new WeakMap;class yp{ORDER;BITS;BYTES;isLE;ZERO=bt;ONE=Ye;_lengths;_mod;constructor(t,n={}){if(t<=Ye)throw new Error("invalid field: expected ORDER > 1, got "+t);let r;this.isLE=!1,n!=null&&typeof n=="object"&&(typeof n.BITS=="number"&&(r=n.BITS),typeof n.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:n.sqrt,enumerable:!0}),typeof n.isLE=="boolean"&&(this.isLE=n.isLE),n.allowedLengths&&(this._lengths=Object.freeze(n.allowedLengths.slice())),typeof n.modFromBytes=="boolean"&&(this._mod=n.modFromBytes));const{nBitLength:o,nByteLength:s}=IR(t,r);if(s>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=o,this.BYTES=s,Object.freeze(this)}create(t){return Ve(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return bt<=t&&t<this.ORDER}is0(t){return t===bt}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&Ye)===Ye}neg(t){return Ve(-t,this.ORDER)}eql(t,n){return t===n}sqr(t){return Ve(t*t,this.ORDER)}add(t,n){return Ve(t+n,this.ORDER)}sub(t,n){return Ve(t-n,this.ORDER)}mul(t,n){return Ve(t*n,this.ORDER)}pow(t,n){return bR(t,n,this.ORDER)}div(t,n){return Ve(t*mp(n,this.ORDER),this.ORDER)}sqrN(t){return t*t}addN(t,n){return t+n}subN(t,n){return t-n}mulN(t,n){return t*n}inv(t){return mp(t,this.ORDER)}sqrt(t){let n=gp.get(this);return n||gp.set(this,n=SR(this.ORDER)),n(this,t)}toBytes(t){return this.isLE?ov(t,this.BYTES):rv(t,this.BYTES)}fromBytes(t,n=!1){Eo(t);const{_lengths:r,BYTES:o,isLE:s,ORDER:i,_mod:a}=this;if(r){if(t.length<1||!r.includes(t.length)||t.length>o)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+t.length);const d=new Uint8Array(o);d.set(t,s?0:d.length-t.length),t=d}if(t.length!==o)throw new Error("Field.fromBytes: expected "+o+" bytes, got "+t.length);let c=s?Fa(t):nv(t);if(a&&(c=Ve(c,i)),!n&&!this.isValid(c))throw new Error("invalid field element: outside of range 0..ORDER");return c}invertBatch(t){return fv(this,t,!0)}cmov(t,n,r){return Pc(r,"condition"),r?n:t}}function gf(e,t={}){return Object.freeze(yp.prototype),new yp(e,t)}const yf=BigInt(0),Zs=BigInt(1),CR=BigInt(4),bl=16,wp=128,RR=5,bp=2**31;function wf(e){const t=e;if(typeof t!="function")throw new TypeError('"Point" expected constructor, got type='+typeof e);js(t.fromAffine,"Point.fromAffine"),js(t.fromBytes,"Point.fromBytes"),js(t.fromHex,"Point.fromHex"),ko(t.BASE,"Point.BASE"),ko(t.ZERO,"Point.ZERO"),Js(t.Fp),Js(t.Fn)}function TR(e,t){wf(e),hv(t,e);const n=fv(e.Fp,t.map(r=>r.Z));return t.map((r,o)=>e.fromAffine(r.toAffine(n[o])))}function AR(e,t,n=1){if(!Number.isSafeInteger(e)||e<n||e>t)throw new Error("invalid window size, expected ["+n+".."+t+"], got W="+e)}function PR(e,t){const n=e*(4*t+128);if(n>bp)throw new Error("invalid window size: table would need ~"+Math.ceil(n/2**20)+" MiB, max "+bp/2**20+" MiB")}function NR(e,t){if(e!==void 0){js(e,"randomBytes");try{const n=e(t);if(!Qb(n)||n.length!==t)return}catch{return}return e}}function hv(e,t){Jb(e,"points"),e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function _R(e,t,n){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,o)=>{if(!(n===void 0?t.isValid(r):Rr(r)&&r<n))throw new Error("invalid scalar at index "+o)})}const pv=new WeakMap;function vl(e){return pv.get(e)||1}function LR(e,t){const n=e.double(),r=[e];for(let o=1;o<t;o++)r.push(r[o-1].add(n));return r}function DR(e,t){const n=2**t,r=n/2,o=BigInt(n-1),s=[];for(;e>yf;){let i=0;e&Zs&&(i=Number(e&o),i>=r&&(i-=n),e-=BigInt(i)),s.push(i),e>>=Zs}return s}function jR(e,t,n){const r=2**t,o=r/2,s=BigInt(r-1),i=BigInt(t),a=[];for(let c=0;c<n;c++){let d=Number(e&s);e>>=i,d>o&&(d-=r,e+=Zs),a.push(d)}if(e!==yf)throw new Error("invalid wnaf");return a}function OR(e,t,n){let r=0;for(const s of n)r=Math.max(r,s.length);let o=e;for(let s=r-1;s>=0;s--){s!==r-1&&(o=o.double());for(let i=0;i<n.length;i++){const a=n[i][s];if(a){const c=t[i][Math.abs(a)-1>>1];o=o.add(a<0?c.negate():c)}}}return o}class MR{Point;BASE;ZERO;randomBytes;wnafPrecomputes=new WeakMap;baseCanBeBlinded;bits;constructor(t,n){wf(t),this.randomBytes=NR(n,bl),this.Point=t,this.BASE=t.BASE,this.ZERO=t.ZERO,this.bits=t.Fn.BITS}buildWnafTable(t,n,r){const o=Math.ceil(r/n)+1,s=2**(n-1),i=[];let a=t;for(let c=0;c<o;c++){let d=a;for(let u=0;u<s;u++)i.push(d),d=d.add(a);a=i[i.length-1].double()}return{W:n,bits:r,windows:o,comp:i}}wnafCachedCT(t,n){const{W:r,windows:o,comp:s}=t,i=2**(r-1),a=jR(n,r,o);let c=this.ZERO,d=this.BASE;for(let u=0;u<o;u++){const f=a[u],h=u*i,p=Math.abs(f)-1;let m=s[h];for(let b=1;b<i;b++)m=b===p?s[h+b]:m;const g=m.negate();f===0?d=d.add(s[h]):c=c.add(f<0?g:m)}return{p:c,f:d}}getWnafPrecomputes(t,n,r,o){let s=this.wnafPrecomputes.get(n),i=s?.find(a=>a.W===t&&a.bits===r);return i||(i=this.buildWnafTable(n,t,r),typeof o=="function"&&(i={...i,comp:o(i.comp)}),s||(s=[],this.wnafPrecomputes.set(n,s)),s.push(i)),i}assertPoint(t){if(!(t instanceof this.Point))throw new TypeError('"point" expected Point instance, got type='+typeof t)}validateMulInput(t,n){if(this.assertPoint(t),!sv(n,Zs,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(t,n,r,o){const s=vl(t);return s===1?this.fixedWindowCT(t,n,r):this.wnafCachedCT(this.getWnafPrecomputes(s,t,r,o),n)}mulCT(t,n,r){return this.validateMulInput(t,n),this.runCT(t,n,this.bits,r)}mulCTBlinded(t,n,r){if(this.validateMulInput(t,n),this.randomBytes===void 0)throw new Error("randomBytes is required for scalar blinding");const o=this.Point.Fn.BITS+wp,s=this.randomBytes(bl);if(!Qb(s)||s.length!==bl)throw new Error("randomBytes returned invalid byte array");s[0]=s[0]&63|128;const i=n+nv(s)*this.Point.Fn.ORDER;return this.runCT(t,i,o,r)}fixedWindowCT(t,n,r){const o=RR,s=1<<o,i=pR(o),a=new Array(s);a[0]=this.ZERO;for(let u=1;u<s;u++)a[u]=a[u-1].add(t);const c=Math.ceil(r/o);let d=this.ZERO;for(let u=c-1;u>=0;u--){if(u!==c-1)for(let p=0;p<o;p++)d=d.double();const f=Number(n>>BigInt(u*o)&i);let h=a[0];for(let p=1;p<s;p++)h=p===f?a[p]:h;d=d.add(h)}return{p:d,f:d}}shouldBlind(t,n){return this.randomBytes===void 0?!1:n===Zs?!0:t!==this.BASE?!1:(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded)}mulSecret(t,n,r,o){return this.shouldBlind(t,r)?this.mulCTBlinded(t,n,o):this.mulCT(t,n,o)}mulUnsafe(t,n,r){if(this.assertPoint(t),!Rr(n))throw new Error("invalid scalar");const o=vl(t);if(o===1||n>=this.Point.Fn.ORDER)return BR(this.Point,[t],[n],!0);const s=this.getWnafPrecomputes(o,t,this.bits,r);return this.wnafCachedCT(s,n).p}setWindowSize(t,n){this.assertPoint(t),AR(n,this.bits);const r=Math.ceil((this.bits+wp)/n)+1;PR(r*2**(n-1),this.Point.Fp.BYTES),pv.set(t,n),this.wnafPrecomputes.delete(t)}hasWindowSize(t){return vl(t)!==1}}function BR(e,t,n,r=!1){if(wf(e),hv(t,e),Pc(r,"allowOversized"),_R(n,e.Fn,r?e.Fn.ORDER**CR:void 0),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const o=t.map(i=>LR(i,4)),s=n.map(i=>DR(i,4));return OR(e.ZERO,o,s)}function vp(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Js(t),t}else return gf(e,{isLE:n})}function FR(e,t,n={},r){if(r===void 0&&(r=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);Ua(n);for(const c of["p","n","h"]){const d=t[c];if(!(Rr(d)&&d!==yf))throw new Error(`CURVE.${c} must be positive bigint`)}const o=vp(t.p,n.Fp,r),s=vp(t.n,n.Fn,r),a=["Gx","Gy","a","d"];for(const c of a)if(!o.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:o,Fn:s}}function UR(e,t){return function(r){const o=e(r);return{secretKey:o,publicKey:t(o)}}}const Hi=BigInt(0),$i=BigInt(1),zi=BigInt(2),HR=BigInt(4),xp=BigInt(8);function $R(e,t,n,r){const o=e.sqr(n),s=e.sqr(r),i=e.add(e.mul(t.a,o),s),a=e.add(e.ONE,e.mul(t.d,e.mul(o,s)));return e.eql(i,a)}function zR(e,t={}){Ua(t,{},{},"extraOpts");const n=t,r=FR("edwards",e,n,n.FpFnLE),{Fp:o,Fn:s}=r;let i=r.CURVE;const{h:a}=i;if(Ha(o,i.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(Ha(o,i.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");Ua(n,{},{uvRatio:"function",randomBytes:"function"});const c=n.randomBytes===void 0?ev:n.randomBytes,d=zi<<BigInt(o.BYTES*8)-$i;function u(E){if(!o.isOdd)throw new Error("Field does not have .isOdd()");return o.isOdd(E)}const f=n.uvRatio===void 0?(E,v)=>{try{return{isValid:!0,value:o.sqrt(o.div(E,v))}}catch{return{isValid:!1,value:Hi}}}:n.uvRatio;if(!$R(o,i,i.Gx,i.Gy))throw new Error("bad curve params: generator point");const h=o.eql(i.a,o.neg(o.ONE))?E=>o.neg(E):o.eql(i.a,o.ONE)?E=>E:E=>o.mul(i.a,E);function p(E,v,C=!1){const _=C?$i:Hi;return Os("coordinate "+E,v,_,d),v}function m(E){if(!(E instanceof g))throw new Error("EdwardsPoint expected")}class g{static BASE=new g(i.Gx,i.Gy,o.ONE,o.mul(i.Gx,i.Gy));static ZERO=new g(o.ZERO,o.ONE,o.ONE,o.ZERO);static Fp=o;static Fn=s;X;Y;Z;T;constructor(v,C,_,R){this.X=p("x",v),this.Y=p("y",C),this.Z=p("z",_,!0),this.T=p("t",R),Object.freeze(this)}static CURVE(){return i}static fromAffine(v){if(v instanceof g)throw new Error("extended point not allowed");const{x:C,y:_}=v||{};return p("x",C),p("y",_),new g(C,_,o.ONE,o.mul(C,_))}static fromBytes(v,C=!1){const _=o.BYTES,{a:R,d:k}=i;v=Xs(Eo(v,_,"point")),Pc(C,"zip215");const x=Xs(v),S=v[_-1];x[_-1]=S&-129;const I=Fa(x),P=C?d:o.ORDER;Os("point.y",I,Hi,P);const T=o.sqr(I),A=o.sub(T,o.ONE),N=o.sub(o.mulN(k,T),R);let{isValid:L,value:D}=f(A,N);if(!L)throw new Error("bad point: invalid y coordinate");const j=u(D),B=(S&128)!==0;if(!C&&o.is0(D)&&B)throw new Error("bad point: x=0 and x_0=1");return B!==j&&(D=o.neg(D)),g.fromAffine({x:D,y:I})}static fromHex(v,C=!1){return g.fromBytes(dR(v),C)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(v=6,C=!0){return w.setWindowSize(this,v),C||this.multiply(zi),this}assertValidity(){const v=this,{a:C,d:_}=i;if(v.is0())throw new Error("bad point: ZERO");const{X:R,Y:k,Z:x,T:S}=v,I=o.sqr(R),P=o.sqr(k),T=o.sqr(x),A=o.sqr(T),N=o.mul(I,C),L=o.mul(o.add(N,P),T),D=o.add(A,o.mul(_,o.mul(I,P)));if(!o.eql(L,D))throw new Error("bad point: equation left != right (1)");const j=o.mul(R,k),B=o.mul(x,S);if(!o.eql(j,B))throw new Error("bad point: equation left != right (2)")}equals(v){m(v);const{X:C,Y:_,Z:R}=this,{X:k,Y:x,Z:S}=v,I=o.mul(C,S),P=o.mul(k,R),T=o.mul(_,S),A=o.mul(x,R);return o.eql(I,P)&&o.eql(T,A)}is0(){return this.equals(g.ZERO)}negate(){return new g(o.neg(this.X),this.Y,this.Z,o.neg(this.T))}double(){const{X:v,Y:C,Z:_}=this,R=o.sqr(v),k=o.sqr(C),x=o.mul(o.sqr(_),zi),S=h(R),I=o.addN(v,C),P=o.sub(o.subN(o.sqr(I),R),k),T=o.addN(S,k),A=o.subN(T,x),N=o.subN(S,k),L=o.mul(P,A),D=o.mul(T,N),j=o.mul(P,N),B=o.mul(A,T);return new g(L,D,B,j)}add(v){m(v);const{d:C}=i,{X:_,Y:R,Z:k,T:x}=this,{X:S,Y:I,Z:P,T}=v,A=o.mul(_,S),N=o.mul(R,I),L=o.mul(o.mulN(x,C),T),D=o.mul(k,P),j=o.sub(o.subN(o.mulN(o.addN(_,R),o.addN(S,I)),A),N),B=o.subN(D,L),M=o.addN(D,L),F=o.sub(N,h(A)),$=o.mul(j,B),H=o.mul(M,F),te=o.mul(j,F),ne=o.mul(B,M);return new g($,H,ne,te)}subtract(v){return m(v),this.add(v.negate())}multiply(v){if(!s.isValidNot0(v))throw new RangeError("invalid scalar: expected 1 <= sc < curve.n");const{p:C,f:_}=w.mulSecret(this,v,a,b);return b([C,_])[0]}multiplyUnsafe(v){if(!s.isValid(v))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return v===Hi?g.ZERO:this.is0()||v===$i?this:w.mulUnsafe(this,v,b)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return w.mulUnsafe(this,i.n).is0()}toAffine(v){const C=this;let _=v;if(_!=null&&typeof _!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof _);const{X:R,Y:k,Z:x}=C,S=C.is0();_==null&&(_=S?o.create(xp):o.inv(x));const I=o.mul(R,_),P=o.mul(k,_),T=o.mul(x,_);if(S)return{x:o.ZERO,y:o.ONE};if(!o.eql(T,o.ONE))throw new Error("invZ was invalid");return{x:I,y:P}}clearCofactor(){return a===$i?this:a===zi?this.double():a===HR?this.double().double():a===xp?this.double().double().double():this.multiplyUnsafe(a)}toBytes(){const{x:v,y:C}=this.toAffine(),_=o.toBytes(C);return _[_.length-1]|=u(v)?128:0,_}toHex(){return lR(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}const b=E=>TR(g,E),w=new MR(g,c);return w.bits>=6&&g.BASE.precompute(6),Object.freeze(g.prototype),Object.freeze(g),g}const fr=BigInt(0),Xt=BigInt(1),qi=BigInt(2);function Sp(e,t){return e+t-(t>>Xt<<Xt)}function qR(e){const t=BigInt(6)*e;return(n,r,o)=>{const s=r+o,a=((t+o-r)*n+r)%e;return{x_2:a,x_3:s-a}}}function KR(e){return Ua(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function",scalarMultBase:"function"}),Object.freeze({...e})}function GR(e){const t=KR(e),{P:n,type:r,adjustScalarBytes:o,powPminus2:s,randomBytes:i}=t,a=t.scalarMultBase,c=r==="x25519";if(!c&&r!=="x448")throw new Error("invalid type");const d=i===void 0?ev:i,u=c?255:448,f=qR(n),h=c?32:56,p=BigInt(c?9:5),m=BigInt(c?121665:39081),g=c?qi**BigInt(254):qi**BigInt(447),b=c?BigInt(8)*(qi**BigInt(251)-Xt):BigInt(4)*(qi**BigInt(445)-Xt),w=g+b+Xt,E=D=>Ve(D,n),v=C(p);function C(D){return ov(E(D),h)}function _(D){const j=Xs(Eo(D,h,"uCoordinate"));return c&&(j[31]&=127),E(Fa(j))}function R(D){return Fa(o(Xs(Eo(D,h,"scalar"))))}const k=new Set(c?[fr,Xt,n-Xt,BigInt("325606250916557431795983626356110631294008115727848805560023387167927233504"),BigInt("39382357235489614581723060781553021112529911719440698176882885853963445705823")]:[fr,Xt,n-Xt]);function x(D,j){const B=_(j);if(k.has(B))throw new Error("invalid private or public key received");const M=T(B,R(D));if(M===fr)throw new Error("invalid private or public key received");return C(M)}function S(D){if(a===void 0)return x(D,v);const j=R(D);Os("scalar",j,g,w);const B=E(a(j));if(B===fr)throw new Error("invalid private or public key received");return C(B)}const I=S,P=x;function T(D,j){Os("u",D,fr,n),Os("scalar",j,g,w);const B=j,M=D;let F=Xt,$=fr,H=D,te=Xt;const ne=B^B>>Xt;for(let U=BigInt(u-1);U>=fr;U--){const J=Sp(n,ne>>U);({x_2:F,x_3:H}=f(J,F,H)),{x_2:$,x_3:te}=f(J,$,te);const Q=F+$,ee=E(Q*Q),Te=F-$,q=E(Te*Te),z=ee-q,de=H+te,he=H-te,Ee=E(he*Q),Ae=E(de*Te),Ie=Ee+Ae,G=Ee-Ae;H=E(Ie*Ie),te=E(M*E(G*G)),F=E(ee*q),$=E(z*(ee+E(m*z)))}const re=Sp(n,B);({x_2:F,x_3:H}=f(re,F,H)),{x_2:$,x_3:te}=f(re,$,te);const ae=s($);return E(F*ae)}const A={secretKey:h,publicKey:h,seed:h},N=D=>(D=D===void 0?d(h):D,Eo(D,A.seed,"seed"),D),L={randomSecretKey:N};return Object.freeze(A),Object.freeze(L),Object.freeze({keygen:UR(N,I),getSharedSecret:P,getPublicKey:I,scalarMult:x,scalarMultBase:S,utils:L,GuBytes:v.slice(),lengths:A})}const Ep=BigInt(0),WR=BigInt(1),kp=BigInt(2),VR=BigInt(3),YR=BigInt(5),XR=BigInt(8),Nc=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),JR={p:Nc,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:XR,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function mv(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),o=BigInt(80),s=Nc,a=e*e%s*e%s,c=on(a,kp,s)*a%s,d=on(c,WR,s)*e%s,u=on(d,YR,s)*d%s,f=on(u,t,s)*u%s,h=on(f,n,s)*f%s,p=on(h,r,s)*h%s,m=on(p,o,s)*p%s,g=on(m,o,s)*p%s,b=on(g,t,s)*u%s;return{pow_p_5_8:on(b,kp,s)*e%s,b2:a}}function ZR(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Ip=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function QR(e,t){const n=Nc,r=Ve(t*t*t,n),o=Ve(r*r*t,n),s=mv(e*o).pow_p_5_8;let i=Ve(e*r*s,n);const a=Ve(t*i*i,n),c=i,d=Ve(i*Ip,n),u=a===e,f=a===Ve(-e,n),h=a===Ve(-e*Ip,n);return u&&(i=c),(f||h)&&(i=d),ER(i,n)&&(i=Ve(-i,n)),{isValid:u||f,value:i}}const Cp=zR(JR,{uvRatio:QR}),Ki=(()=>{const e=Nc,t=n=>{const{pow_p_5_8:r,b2:o}=mv(n);return Ve(on(r,VR,e)*o,e)};return GR({P:e,type:"x25519",powPminus2:t,adjustScalarBytes:ZR,scalarMultBase:n=>{const r=Ve(n,Cp.Fn.ORDER);if(r===Ep)return Ep;const o=Cp.BASE.multiply(r);return Ve((o.Z+o.Y)*t(Ve(o.Z-o.Y,e)),e)}})})();class Rp{oHash;iHash;blockLen;outputLen;canXOF=!1;finished=!1;destroyed=!1;constructor(t,n){if(uf(t),$n(n,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("expected Hash instance");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,o=new Uint8Array(r);o.set(n.length>r?t.create().update(n).digest():n);for(let s=0;s<o.length;s++)o[s]^=54;this.iHash.update(o),this.oHash=t.create();for(let s=0;s<o.length;s++)o[s]^=106;this.oHash.update(o),Cr(o)}update(t){return Ma(this),this.iHash.update(t),this}digestInto(t){Ma(this),Vb(t,this),this.finished=!0;const n=t.subarray(0,this.outputLen);this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||=Object.create(Object.getPrototypeOf(this),{});const{oHash:n,iHash:r,finished:o,destroyed:s,blockLen:i,outputLen:a,canXOF:c}=this;return t=t,t.finished=o,t.destroyed=s,t.blockLen=i,t.outputLen=a,t.canXOF=c,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const gv=(()=>{const e=((t,n,r)=>new Rp(t,n).update(r).digest());return e.create=(t,n)=>new Rp(t,n),e})();function Tp(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}class Ap{buffer;mask;top;btm;next;constructor(t){if(!(t>0)||(t-1&t)!==0)throw new Error("Max size for a FixedFIFO should be a power of two");this.buffer=new Array(t),this.mask=t-1,this.top=0,this.btm=0,this.next=null}push(t){return this.buffer[this.top]!==void 0?!1:(this.buffer[this.top]=t,this.top=this.top+1&this.mask,!0)}shift(){const t=this.buffer[this.btm];if(t!==void 0)return this.buffer[this.btm]=void 0,this.btm=this.btm+1&this.mask,t}isEmpty(){return this.buffer[this.btm]===void 0}}class xl{size;hwm;head;tail;constructor(t={}){this.hwm=t.splitLimit??16,this.head=new Ap(this.hwm),this.tail=this.head,this.size=0}calculateSize(t){return t?.byteLength!=null?t.byteLength:1}push(t){if(t?.value!=null&&(this.size+=this.calculateSize(t.value)),!this.head.push(t)){const n=this.head;this.head=n.next=new Ap(2*this.head.buffer.length),this.head.push(t)}}shift(){let t=this.tail.shift();if(t===void 0&&this.tail.next!=null){const n=this.tail.next;this.tail.next=null,this.tail=n,t=this.tail.shift()}return t?.value!=null&&(this.size-=this.calculateSize(t.value)),t}isEmpty(){return this.head.isEmpty()}}class eT extends Error{type;code;constructor(t,n){super(t??"The operation was aborted"),this.type="aborted",this.code=n??"ABORT_ERR"}}function tT(e={}){return nT(n=>{const r=n.shift();if(r==null)return{done:!0};if(r.error!=null)throw r.error;return{done:r.done===!0,value:r.value}},e)}function nT(e,t){t=t??{};let n=t.onEnd,r=new xl,o,s,i,a=Tp();const c=async()=>{try{return r.isEmpty()?i?{done:!0}:await new Promise((b,w)=>{s=E=>{s=null,r.push(E);try{b(e(r))}catch(v){w(v)}return o}}):e(r)}finally{r.isEmpty()&&queueMicrotask(()=>{a.resolve(),a=Tp()})}},d=b=>s!=null?s(b):(r.push(b),o),u=b=>(r=new xl,s!=null?s({error:b}):(r.push({error:b}),o)),f=b=>{if(i)return o;if(t?.objectMode!==!0&&b?.byteLength==null)throw new Error("objectMode was not true but tried to push non-Uint8Array value");return d({done:!1,value:b})},h=b=>i?o:(i=!0,b!=null?u(b):d({done:!0})),p=()=>(r=new xl,h(),{done:!0}),m=b=>(h(b),{done:!0});if(o={[Symbol.asyncIterator](){return this},next:c,return:p,throw:m,push:f,end:h,get readableLength(){return r.size},onEmpty:async b=>{const w=b?.signal;if(w?.throwIfAborted(),r.isEmpty())return;let E,v;w!=null&&(E=new Promise((C,_)=>{v=()=>{_(new eT)},w.addEventListener("abort",v)}));try{await Promise.race([a.promise,E])}finally{v!=null&&w!=null&&w?.removeEventListener("abort",v)}}},n==null)return o;const g=o;return o={[Symbol.asyncIterator](){return this},next(){return g.next()},throw(b){return g.throw(b),n!=null&&(n(b),n=void 0),{done:!0}},return(){return g.return(),n!=null&&(n(),n=void 0),{done:!0}},push:f,end(b){return g.end(b),n!=null&&(n(b),n=void 0),o},get readableLength(){return g.readableLength},onEmpty:b=>g.onEmpty(b)},o}class bf extends Error{name="TimeoutError";constructor(t,n){super(t,n),Error.captureStackTrace?.(this,bf)}}const Pp=e=>e.reason??new DOMException("This operation was aborted.","AbortError");function rT(e,t){const{milliseconds:n,fallback:r,message:o,customTimers:s={setTimeout,clearTimeout},signal:i}=t;let a,c;const u=new Promise((f,h)=>{if(typeof n!="number"||Math.sign(n)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(i?.aborted){h(Pp(i));return}if(i&&(c=()=>{h(Pp(i))},i.addEventListener("abort",c,{once:!0})),e.then(f,h),n===Number.POSITIVE_INFINITY)return;const p=new bf;a=s.setTimeout.call(void 0,()=>{if(r){try{f(r())}catch(m){h(m)}return}typeof e.cancel=="function"&&e.cancel(),o===!1?f():o instanceof Error?h(o):(p.message=o??`Promise timed out after ${n} milliseconds`,h(p))},n)}).finally(()=>{u.clear(),c&&i&&i.removeEventListener("abort",c)});return u.clear=()=>{s.clearTimeout.call(void 0,a),a=void 0},u}const oT=e=>{const t=e.addEventListener||e.on||e.addListener,n=e.removeEventListener||e.off||e.removeListener;if(!t||!n)throw new TypeError("Emitter is not compatible");return{addListener:t.bind(e),removeListener:n.bind(e)}};function sT(e,t,n){let r;const o=new Promise((s,i)=>{if(n={rejectionEvents:["error"],multiArgs:!1,rejectionMultiArgs:!1,resolveImmediately:!1,...n},!(n.count>=0&&(n.count===Number.POSITIVE_INFINITY||Number.isInteger(n.count))))throw new TypeError("The `count` option should be at least 0 or more");n.signal?.throwIfAborted();const a=[t].flat(),c=[],{addListener:d,removeListener:u}=oT(e),f=async(...p)=>{const m=n.multiArgs?p:p[0];if(n.filter)try{if(!await n.filter(m))return}catch(g){r(),i(g);return}c.push(m),n.count===c.length&&(r(),s(c))},h=(...p)=>{r(),i(n.rejectionMultiArgs?p:p[0])};r=()=>{for(const p of a)u(p,f);for(const p of n.rejectionEvents)a.includes(p)||u(p,h)};for(const p of a)d(p,f);for(const p of n.rejectionEvents)a.includes(p)||d(p,h);n.signal&&n.signal.addEventListener("abort",()=>{h(n.signal.reason)},{once:!0}),n.resolveImmediately&&s(c)});if(o.cancel=r,typeof n.timeout=="number"){const s=rT(o,{milliseconds:n.timeout});return s.cancel=()=>{r(),s.clear()},s}return o}function iT(e,t,n){typeof n=="function"&&(n={filter:n}),n={...n,count:1,resolveImmediately:!1};const r=sT(e,t,n),o=r.then(s=>s[0]);return o.cancel=r.cancel,o}class $a extends Error{static name="UnexpectedEOFError";name="UnexpectedEOFError"}class aT extends Error{static name="StreamClosedError";name="StreamClosedError"}function cT(e){return e.reason}function yv(e,t,n){if(t==null||e==null)return e;const r=cT;if(t.aborted)return e.catch(()=>{}),Promise.reject(r(t));let o;return Promise.race([e,new Promise((s,i)=>{o=()=>{i(r(t))},t.addEventListener("abort",o)})]).finally(()=>{o!=null&&t.removeEventListener("abort",o)})}const lT=Math.pow(2,20)*4;class wv extends xE{status;timeline;inactivityTimeout;maxReadBufferLength;maxWriteBufferLength;log;direction;maxMessageSize;readStatus;writeStatus;remoteReadStatus;remoteWriteStatus;writableNeedsDrain;readBuffer;writeBuffer;sendingData;onDrainPromise;constructor(t){super(),this.status="open",this.log=t.log,this.direction=t.direction??"outbound",this.inactivityTimeout=t.inactivityTimeout??12e4,this.maxReadBufferLength=t.maxReadBufferLength??lT,this.maxWriteBufferLength=t.maxWriteBufferLength,this.maxMessageSize=t.maxMessageSize,this.readBuffer=new qe,this.writeBuffer=new qe,this.readStatus="readable",this.remoteReadStatus="readable",this.writeStatus="writable",this.remoteWriteStatus="writable",this.sendingData=!1,this.writableNeedsDrain=!1,this.timeline={open:Date.now()},this.processSendQueue=this.processSendQueue.bind(this);const n=()=>{this.writableNeedsDrain&&(this.log.trace("drain event received, continue sending data"),this.writableNeedsDrain=!1,this.processSendQueue()),this.onDrainPromise?.resolve()};this.addEventListener("drain",n);const r=o=>{this.onDrainPromise?.reject(o.error??new aT)};this.addEventListener("close",r)}get readBufferLength(){return this.readBuffer.byteLength}get writeBufferLength(){return this.writeBuffer.byteLength}async onDrain(t){return this.writableNeedsDrain!==!0?Promise.resolve():(this.onDrainPromise==null&&(this.onDrainPromise=Promise.withResolvers()),yv(this.onDrainPromise.promise,t?.signal))}async*[Symbol.asyncIterator](){if(this.readStatus!=="readable"&&this.readStatus!=="paused")return;const t=tT(),n=s=>{t.push(s.data)};this.addEventListener("message",n);const r=s=>{t.end(s.error)};this.addEventListener("close",r);const o=()=>{t.end()};this.addEventListener("remoteCloseWrite",o);try{yield*t}finally{this.removeEventListener("message",n),this.removeEventListener("close",r),this.removeEventListener("remoteCloseWrite",o)}}isReadable(){return this.status==="open"}send(t){if(this.writeStatus==="closed"||this.writeStatus==="closing")throw new is(`Cannot write to a stream that is ${this.writeStatus}`);return this.log.trace("append %d bytes to write buffer",t.byteLength),this.writeBuffer.append(t),this.processSendQueue()}abort(t){if(!(this.status==="aborted"||this.status==="reset"||this.status==="closed")){this.log.error("abort with error - %e",t),this.status="aborted",this.readBuffer.byteLength>0&&this.readBuffer.consume(this.readBuffer.byteLength),this.writeBuffer.byteLength>0&&(this.writeBuffer.consume(this.writeBuffer.byteLength),this.safeDispatchEvent("idle")),this.writeStatus="closed",this.remoteWriteStatus="closed",this.readStatus="closed",this.remoteReadStatus="closed",this.timeline.close=Date.now();try{this.sendReset(t)}catch(n){this.log("failed to send reset to remote - %e",n)}this.dispatchEvent(new UC(t))}}pause(){if(this.readStatus==="closed"||this.readStatus==="closing")throw new is("Cannot pause a stream that is closing/closed");this.readStatus!=="paused"&&(this.readStatus="paused",this.sendPause())}resume(){if(this.readStatus==="closed"||this.readStatus==="closing")throw new is("Cannot resume a stream that is closing/closed");this.readStatus!=="readable"&&(this.readStatus="readable",this.dispatchReadBuffer(),this.sendResume())}push(t){if(this.readStatus==="closed"||this.readStatus==="closing")throw new is(`Cannot push data onto a stream that is ${this.readStatus}`);if(t.byteLength!==0){if(this.readBuffer.append(t),this.readStatus==="paused"||this.listenerCount("message")===0){this.checkReadBufferLength();return}setTimeout(()=>{this.dispatchReadBuffer()},0)}}unshift(t){if(this.readStatus==="closed"||this.readStatus==="closing")throw new is(`Cannot push data onto a stream that is ${this.readStatus}`);if(t.byteLength!==0){if(this.readBuffer.prepend(t),this.readStatus==="paused"||this.listenerCount("message")===0){this.checkReadBufferLength();return}setTimeout(()=>{this.dispatchReadBuffer()},0)}}onData(t){if(t.byteLength!==0){if(this.readStatus==="closing"||this.readStatus==="closed"){this.log("ignoring data - read status %s",this.readStatus);return}this.readBuffer.append(t),this.dispatchReadBuffer()}}addEventListener(...t){super.addEventListener.apply(this,t),t[0]==="message"&&this.readBuffer.byteLength>0&&queueMicrotask(()=>{this.dispatchReadBuffer()})}onRemoteReset(){this.log("remote reset"),this.status="reset",this.writeStatus="closed",this.remoteWriteStatus="closed",this.remoteReadStatus="closed",this.timeline.close=Date.now(),this.readBuffer.byteLength===0&&(this.readStatus="closed");const t=new BC;this.dispatchEvent(new HC(t))}onTransportClosed(t){this.log("transport closed"),this.readStatus==="readable"&&this.readBuffer.byteLength===0&&(this.log("close readable end after transport closed and read buffer is empty"),this.readStatus="closed"),this.remoteReadStatus!=="closed"&&(this.remoteReadStatus="closed"),this.remoteWriteStatus!=="closed"&&(this.remoteWriteStatus="closed"),this.writeStatus!=="closed"&&(this.writeStatus="closed"),t!=null?this.abort(t):(this.status==="open"||this.status==="closing")&&(this.timeline.close=Date.now(),this.status="closed",this.writeStatus="closed",this.remoteWriteStatus="closed",this.remoteReadStatus="closed",this.dispatchEvent(new df))}onRemoteCloseWrite(){this.remoteWriteStatus!=="closed"&&(this.log.trace("on remote close write"),this.remoteWriteStatus="closed",this.safeDispatchEvent("remoteCloseWrite"),this.writeStatus==="closed"&&this.onTransportClosed())}onRemoteCloseRead(){this.log.trace("on remote close read"),this.remoteReadStatus="closed",this.writeBuffer.byteLength>0&&(this.writeBuffer.consume(this.writeBuffer.byteLength),this.safeDispatchEvent("idle"))}processSendQueue(){if(this.writableNeedsDrain)return this.log.trace("not processing send queue as drain is required"),this.checkWriteBufferLength(),!1;if(this.writeBuffer.byteLength===0)return this.log.trace("not processing send queue as no bytes to send"),!0;if(this.sendingData)return this.log.trace("not processing send queue as already sending data"),!0;this.sendingData=!0,this.log.trace("processing send queue with %d queued bytes",this.writeBuffer.byteLength);try{let t=!0;const n=this.writeBuffer.byteLength;let r=0;for(;this.writeBuffer.byteLength>0;){const o=Math.min(this.maxMessageSize??this.writeBuffer.byteLength,this.writeBuffer.byteLength);if(o===0){t=!1;break}const s=this.writeBuffer.sublist(0,o),i=new qe(s);this.writeBuffer.consume(s.byteLength);const a=this.sendData(s);if(t=a.canSendMore,r+=a.sentBytes,a.sentBytes!==i.byteLength&&(i.consume(a.sentBytes),this.writeBuffer.prepend(i)),!t)break}return t||(this.log.trace("sent %d/%d bytes, pausing sending because underlying stream is full, %d bytes left in the write buffer",r,n,this.writeBuffer.byteLength),this.writableNeedsDrain=!0,this.checkWriteBufferLength()),this.writeBuffer.byteLength===0&&this.safeDispatchEvent("idle"),t}finally{this.sendingData=!1}}dispatchReadBuffer(){try{if(this.listenerCount("message")===0){this.log.trace("not dispatching pause buffer as there are no listeners for the message event");return}if(this.readBuffer.byteLength===0){this.log.trace("not dispatching pause buffer as there is no data to dispatch");return}if(this.readStatus==="paused"){this.log.trace("not dispatching pause buffer we are paused");return}if(this.readStatus==="closing"||this.readStatus==="closed"){this.log("dropping %d bytes because the readable end is %s",this.readBuffer.byteLength,this.readStatus),this.readBuffer.consume(this.readBuffer.byteLength);return}const t=this.readBuffer.sublist();this.readBuffer.consume(t.byteLength),this.dispatchEvent(new FC(t))}finally{this.readBuffer.byteLength===0&&this.remoteWriteStatus==="closed"&&(this.log("close readable end after dispatching read buffer and remote writable end is closed"),this.readStatus="closed"),this.checkReadBufferLength()}}checkReadBufferLength(){this.readBuffer.byteLength>this.maxReadBufferLength&&this.abort(new up(`Read buffer length of ${this.readBuffer.byteLength} exceeded limit of ${this.maxReadBufferLength}, read status is ${this.readStatus}`))}checkWriteBufferLength(){this.maxWriteBufferLength!=null&&this.writeBuffer.byteLength>this.maxWriteBufferLength&&this.abort(new up(`Write buffer length of ${this.writeBuffer.byteLength} exceeded limit of ${this.maxWriteBufferLength}, write status is ${this.writeStatus}`))}onMuxerNeedsDrain(){this.writableNeedsDrain=!0}onMuxerDrain(){this.safeDispatchEvent("drain")}}const dT=4194304;class Np extends Error{static name="UnwrappedError";name="UnwrappedError"}class bv extends Error{name="InvalidMessageLengthError";code="ERR_INVALID_MSG_LENGTH"}class uT extends Error{name="InvalidDataLengthError";code="ERR_MSG_DATA_TOO_LONG"}class fT extends Error{name="InvalidDataLengthLengthError";code="ERR_MSG_LENGTH_TOO_LONG"}function hT(e){return typeof e?.closeRead=="function"}function pT(e){return typeof e?.close=="function"}function Sl(e){return hT(e)?e.remoteWriteStatus!=="writable"&&e.readBufferLength===0:pT(e)?e.status!=="open":!1}function mT(e){return e?.addEventListener!=null&&e?.removeEventListener!=null&&e?.send!=null&&e?.push!=null&&e?.log!=null}function gT(e,t){const n=t?.maxBufferSize??dT,r=new qe;let o,s=!1;if(!mT(e))throw new Wb("Argument should be a Stream or a Multiaddr");const i=u=>{if(r.append(u.data),r.byteLength>n){const f=r.byteLength;r.consume(r.byteLength),o?.reject(new Error(`Read buffer overflow - ${f} > ${n}`))}o?.resolve()};e.addEventListener("message",i);const a=u=>{u.error!=null?o?.reject(u.error):o?.resolve()};e.addEventListener("close",a);const c=()=>{o?.resolve()};e.addEventListener("remoteCloseWrite",c);const d={readBuffer:r,async read(u){if(s===!0)throw new Np("Stream was unwrapped");if(Sl(e)){if(u?.bytes==null)return null;if(r.byteLength<u.bytes)throw e.log.error("closed after reading %d/%d bytes",r.byteLength,u.bytes),new $a(`Unexpected EOF - stream closed after reading ${r.byteLength}/${u.bytes} bytes`)}const f=u?.bytes??1;for(o=Promise.withResolvers();;){if(r.byteLength>=f){o.resolve();break}if(await yv(o.promise,u?.signal),Sl(e)){if(r.byteLength===0&&u?.bytes==null)return null;break}o=Promise.withResolvers()}const h=u?.bytes??r.byteLength;if(r.byteLength<h){if(Sl(e))throw e.log.error("closed while reading %d/%d bytes",r.byteLength,h),new $a(`Unexpected EOF - stream closed while reading ${r.byteLength}/${h} bytes`);return d.read(u)}const p=r.sublist(0,h);return r.consume(h),p},async write(u,f){if(s===!0)throw new Np("Stream was unwrapped");e.send(u)||await iT(e,"drain",{signal:f?.signal,rejectionEvents:["close"]})},unwrap(){return s||(s=!0,e.removeEventListener("message",i),e.removeEventListener("close",a),e.removeEventListener("remoteCloseWrite",c),r.byteLength>0&&(e.log("stream unwrapped with %d unread bytes",r.byteLength),e.push(r))),e}};return d}function _p(e,t={}){const n=gT(e,t);t.maxDataLength!=null&&t.maxLengthLength==null&&(t.maxLengthLength=qr(t.maxDataLength));const r=t?.lengthDecoder??Rb,o=t?.lengthEncoder??SI;return{async read(i){let a=-1;const c=new qe;for(;;){const u=await n.read({...i,bytes:1});if(u==null)break;c.append(u);try{a=r(c)}catch(f){if(f instanceof RangeError)continue;throw f}if(a<0)throw new bv("Invalid message length");if(t?.maxLengthLength!=null&&c.byteLength>t.maxLengthLength)throw new fT(`Message length length too long - ${c.byteLength} > ${t.maxLengthLength}`);if(a>-1)break}if(t?.maxDataLength!=null&&a>t.maxDataLength)throw new uT(`Message length too long - ${a} > ${t.maxDataLength}`);const d=await n.read({...i,bytes:a});if(d==null)throw e.log.error("tried to read %d bytes but the stream closed",a),new $a(`Unexpected EOF - tried to read ${a} bytes but the stream closed`);if(d.byteLength!==a)throw e.log.error("read %d/%d bytes before the stream closed",d.byteLength,a),new $a(`Unexpected EOF - read ${d.byteLength}/${a} bytes before the stream closed`);return d},async write(i,a){await n.write(new qe(o(i.byteLength),i),a)},async writeV(i,a){const c=new qe(...i.flatMap(d=>[o(d.byteLength),d]));await n.write(c,a)},unwrap(){return n.unwrap()}}}const yT=1024*1024*4,wT=1024*1024*4;class bT{buffer;maxBufferSize;lengthDecoder;maxDataLength;encodingLength;constructor(t={}){this.buffer=new qe,this.maxBufferSize=t.maxBufferSize??yT,this.maxDataLength=t.maxDataLength??wT,this.lengthDecoder=t.lengthDecoder??Rb,this.encodingLength=t.encodingLength??qr}*decode(t){if(this.buffer.append(t),this.buffer.byteLength>this.maxBufferSize)throw new Wb(`Buffer length limit exceeded - ${this.buffer.byteLength}/${this.maxBufferSize}`);for(;;){let n;try{n=this.lengthDecoder(this.buffer)}catch(s){if(s instanceof RangeError)break;throw s}if(n<0||n>this.maxDataLength)throw new bv("Invalid message length");const r=this.encodingLength(n),o=r+n;if(this.buffer.byteLength>=o){const s=this.buffer.sublist(r,o);this.buffer.consume(o),s.byteLength>0&&(yield s)}else break}}}var vT={};const Qs=65535,Lp=Qs-16,wi=!!vT?.DUMP_SESSION_KEYS,Dp=16;function jd(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const za=e=>e?`"${e}" `:"";function Od(e,t=""){if(typeof e!="boolean")throw new TypeError(za(t)+"expected boolean, got type="+typeof e);return e}function Io(e,t=""){if(typeof e!="number")throw new TypeError(za(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(za(t)+"expected integer >= 0, got "+e);return e}function wt(e,t,n=""){if(jd(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Io(t,"length");const r=jd(e),o=t!==void 0?` of length ${t}`:"",s=r?`length=${e.length}`:`type=${typeof e}`,i=za(n)+"expected Uint8Array"+o+", got "+s;throw r?new RangeError(i):new TypeError(i)}const jp=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`)};function Op(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function xT(e,t){wt(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Pn(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function cr(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ST(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Co=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function ET(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function kT(e){for(let t=0;t<e.length;t++)e[t]=ET(e[t]);return e}const xr=Co?e=>e:kT;function IT(e,t){return!e.byteLength||!t.byteLength?!1:e.buffer===t.buffer&&e.byteOffset<t.byteOffset+t.byteLength&&t.byteOffset<e.byteOffset+e.byteLength}function CT(e,t){if(IT(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function RT(e,t){return jp(e,"defaults"),jp(t,"opts"),Object.assign(e,t)}function TT(e,t){if(e=wt(e),t=wt(t),e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function AT(e,t,n){const r=t,o=(()=>[]),s=(a,c)=>r(c,...o(a)).update(a).digest(),i=r(new Uint8Array(e),...o(new Uint8Array(0)));return s.outputLen=i.outputLen,s.blockLen=i.blockLen,s.create=(a,...c)=>r(a,...c),s}const PT=(e,t)=>{function n(r,...o){if(wt(r,void 0,"key"),e.nonceLength!==void 0){const f=o[0];wt(f,e.varSizeNonce?void 0:e.nonceLength,"nonce")}const s=e.tagLength,i=e.nonceLength!==void 0?1:0;if(!e.withAAD){for(let f=i;f<o.length;f++)if(jd(o[f]))throw new Error("AAD not supported")}e.withAAD&&o[i]!==void 0&&wt(o[i],void 0,"AAD");const a=t(r,...o),c=(f,h)=>{if(h!==void 0){if(f!==2)throw new Error("cipher output not supported");wt(h,void 0,"output")}};let d=!1;return{encrypt(f,h){if(d)throw new Error("cannot encrypt() twice with same key + nonce");return d=!0,wt(f,void 0,"data"),c(a.encrypt.length,h),a.encrypt(f,h)},decrypt(f,h){if(wt(f,void 0,"data"),s&&f.length<s)throw new Error('"ciphertext" expected length >= tagLength='+s);return c(a.decrypt.length,h),a.decrypt(f,h)}}}return Object.assign(n,e),n};function Md(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(wt(t,e,"output"),n&&!qa(t))throw new Error("invalid output, must be aligned");return t}function NT(e,t,n){Io(e),Io(t),Od(n);const r=new Uint8Array(16),o=ST(r);return o.setBigUint64(0,BigInt(t),n),o.setBigUint64(8,BigInt(e),n),r}function qa(e){return e.byteOffset%4===0}function Ka(e){return Uint8Array.from(wt(e))}const vv=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),_T=xr(Pn(vv("expand 16-byte k"))),LT=xr(Pn(vv("expand 32-byte k")));function Me(e,t){return e<<t|e>>>32-t}const as=64,DT=16,Bd=2**32-1,Mp=Uint32Array.of();function jT(e,t,n,r,o,s,i,a){const c=o.length,d=new Uint8Array(as),u=Pn(d),f=Co&&qa(o)&&qa(s),h=f?Pn(o):Mp,p=f?Pn(s):Mp;if(!Co){for(let m=0;m<c;i++){if(e(t,n,r,u,i,a),xr(u),i>=Bd)throw new Error("arx: counter overflow");const g=Math.min(as,c-m);for(let b=0,w;b<g;b++)w=m+b,s[w]=o[w]^d[b];m+=g}return}for(let m=0;m<c;i++){if(e(t,n,r,u,i,a),i>=Bd)throw new Error("arx: counter overflow");const g=Math.min(as,c-m);if(f&&g===as){const b=m/4;if(m%4!==0)throw new Error("arx: invalid block position");for(let w=0,E;w<DT;w++)E=b+w,p[E]=h[E]^u[w];m+=as;continue}for(let b=0,w;b<g;b++)w=m+b,s[w]=o[w]^d[b];m+=g}}function OT(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:o,counterRight:s,rounds:i}=RT({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Io(o),Io(i),Od(s),Od(n),(a,c,d,u,f=0)=>{wt(a,void 0,"key"),wt(c,void 0,"nonce"),wt(d,void 0,"data");const h=d.length,p=u!==void 0;if(u=Md(h,u,!1),p&&CT(d,u),Io(f),f<0||f>=Bd)throw new Error("arx: counter overflow");const m=[];let g=a.length,b,w;if(g===32)m.push(b=Ka(a)),w=LT;else if(g===16&&n)b=new Uint8Array(32),b.set(a),b.set(a,16),w=_T,m.push(b);else throw wt(a,32,"arx key"),new Error("invalid key size");(!Co||!qa(c))&&m.push(c=Ka(c));let E=Pn(b);if(r){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const _=c.subarray(0,16);if(Co)r(w,E,Pn(_),E);else{const R=xr(Uint32Array.from(w));r(R,E,Pn(_),E),cr(R),xr(E)}c=c.subarray(16)}else Co||xr(E);const v=16-o;if(v!==c.length)throw new Error(`arx: nonce must be ${v} or 16 bytes`);if(v!==12){const _=new Uint8Array(12);_.set(c,s?0:12-c.length),c=_,m.push(c)}const C=xr(Pn(c));try{return jT(e,w,E,C,d,u,f,i),u}finally{cr(...m)}}}function vt(e,t){return e[t++]&255|(e[t++]&255)<<8}class MT{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;destroyed=!1;constructor(t){t=Ka(wt(t,32,"key"));const n=vt(t,0),r=vt(t,2),o=vt(t,4),s=vt(t,6),i=vt(t,8),a=vt(t,10),c=vt(t,12),d=vt(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|o<<6)&7939,this.r[3]=(o>>>7|s<<9)&8191,this.r[4]=(s>>>4|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|a<<2)&8191,this.r[7]=(a>>>11|c<<5)&8065,this.r[8]=(c>>>8|d<<8)&8191,this.r[9]=d>>>5&127;for(let u=0;u<8;u++)this.pad[u]=vt(t,16+2*u)}process(t,n,r=!1){const o=r?0:2048,{h:s,r:i}=this,a=i[0],c=i[1],d=i[2],u=i[3],f=i[4],h=i[5],p=i[6],m=i[7],g=i[8],b=i[9],w=vt(t,n+0),E=vt(t,n+2),v=vt(t,n+4),C=vt(t,n+6),_=vt(t,n+8),R=vt(t,n+10),k=vt(t,n+12),x=vt(t,n+14);let S=s[0]+(w&8191),I=s[1]+((w>>>13|E<<3)&8191),P=s[2]+((E>>>10|v<<6)&8191),T=s[3]+((v>>>7|C<<9)&8191),A=s[4]+((C>>>4|_<<12)&8191),N=s[5]+(_>>>1&8191),L=s[6]+((_>>>14|R<<2)&8191),D=s[7]+((R>>>11|k<<5)&8191),j=s[8]+((k>>>8|x<<8)&8191),B=s[9]+(x>>>5|o),M=0,F=M+S*a+I*(5*b)+P*(5*g)+T*(5*m)+A*(5*p);M=F>>>13,F&=8191,F+=N*(5*h)+L*(5*f)+D*(5*u)+j*(5*d)+B*(5*c),M+=F>>>13,F&=8191;let $=M+S*c+I*a+P*(5*b)+T*(5*g)+A*(5*m);M=$>>>13,$&=8191,$+=N*(5*p)+L*(5*h)+D*(5*f)+j*(5*u)+B*(5*d),M+=$>>>13,$&=8191;let H=M+S*d+I*c+P*a+T*(5*b)+A*(5*g);M=H>>>13,H&=8191,H+=N*(5*m)+L*(5*p)+D*(5*h)+j*(5*f)+B*(5*u),M+=H>>>13,H&=8191;let te=M+S*u+I*d+P*c+T*a+A*(5*b);M=te>>>13,te&=8191,te+=N*(5*g)+L*(5*m)+D*(5*p)+j*(5*h)+B*(5*f),M+=te>>>13,te&=8191;let ne=M+S*f+I*u+P*d+T*c+A*a;M=ne>>>13,ne&=8191,ne+=N*(5*b)+L*(5*g)+D*(5*m)+j*(5*p)+B*(5*h),M+=ne>>>13,ne&=8191;let re=M+S*h+I*f+P*u+T*d+A*c;M=re>>>13,re&=8191,re+=N*a+L*(5*b)+D*(5*g)+j*(5*m)+B*(5*p),M+=re>>>13,re&=8191;let ae=M+S*p+I*h+P*f+T*u+A*d;M=ae>>>13,ae&=8191,ae+=N*c+L*a+D*(5*b)+j*(5*g)+B*(5*m),M+=ae>>>13,ae&=8191;let U=M+S*m+I*p+P*h+T*f+A*u;M=U>>>13,U&=8191,U+=N*d+L*c+D*a+j*(5*b)+B*(5*g),M+=U>>>13,U&=8191;let J=M+S*g+I*m+P*p+T*h+A*f;M=J>>>13,J&=8191,J+=N*u+L*d+D*c+j*a+B*(5*b),M+=J>>>13,J&=8191;let Q=M+S*b+I*g+P*m+T*p+A*h;M=Q>>>13,Q&=8191,Q+=N*f+L*u+D*d+j*c+B*a,M+=Q>>>13,Q&=8191,M=(M<<2)+M|0,M=M+F|0,F=M&8191,M=M>>>13,$+=M,s[0]=F,s[1]=$,s[2]=H,s[3]=te,s[4]=ne,s[5]=re,s[6]=ae,s[7]=U,s[8]=J,s[9]=Q}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let o=t[1]>>>13;t[1]&=8191;for(let a=2;a<10;a++)t[a]+=o,o=t[a]>>>13,t[a]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,r[0]=t[0]+5,o=r[0]>>>13,r[0]&=8191;for(let a=1;a<10;a++)r[a]=t[a]+o,o=r[a]>>>13,r[a]&=8191;r[9]-=8192;let s=(o^1)-1;for(let a=0;a<10;a++)r[a]&=s;s=~s;for(let a=0;a<10;a++)t[a]=t[a]&s|r[a];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let i=t[0]+n[0];t[0]=i&65535;for(let a=1;a<8;a++)i=(t[a]+n[a]|0)+(i>>>16)|0,t[a]=i&65535;cr(r)}update(t){Op(this),wt(t),t=Ka(t);const{buffer:n,blockLen:r}=this,o=t.length;for(let s=0;s<o;){const i=Math.min(r-this.pos,o-s);if(i===r){for(;r<=o-s;s+=r)this.process(t,s);continue}n.set(t.subarray(s,s+i),this.pos),this.pos+=i,s+=i,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){this.destroyed=!0,cr(this.h,this.r,this.buffer,this.pad)}digestInto(t){Op(this),xT(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:o}=this;if(o){for(n[o++]=1;o<16;o++)n[o]=0;this.process(n,0,!0)}this.finalize();let s=0;for(let i=0;i<8;i++)t[s++]=r[i]>>>0,t[s++]=r[i]>>>8}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}const BT=AT(32,e=>new MT(e));function FT(e,t,n,r,o,s=20){let i=e[0],a=e[1],c=e[2],d=e[3],u=t[0],f=t[1],h=t[2],p=t[3],m=t[4],g=t[5],b=t[6],w=t[7],E=o,v=n[0],C=n[1],_=n[2],R=i,k=a,x=c,S=d,I=u,P=f,T=h,A=p,N=m,L=g,D=b,j=w,B=E,M=v,F=C,$=_;for(let te=0;te<s;te+=2)R=R+I|0,B=Me(B^R,16),N=N+B|0,I=Me(I^N,12),R=R+I|0,B=Me(B^R,8),N=N+B|0,I=Me(I^N,7),k=k+P|0,M=Me(M^k,16),L=L+M|0,P=Me(P^L,12),k=k+P|0,M=Me(M^k,8),L=L+M|0,P=Me(P^L,7),x=x+T|0,F=Me(F^x,16),D=D+F|0,T=Me(T^D,12),x=x+T|0,F=Me(F^x,8),D=D+F|0,T=Me(T^D,7),S=S+A|0,$=Me($^S,16),j=j+$|0,A=Me(A^j,12),S=S+A|0,$=Me($^S,8),j=j+$|0,A=Me(A^j,7),R=R+P|0,$=Me($^R,16),D=D+$|0,P=Me(P^D,12),R=R+P|0,$=Me($^R,8),D=D+$|0,P=Me(P^D,7),k=k+T|0,B=Me(B^k,16),j=j+B|0,T=Me(T^j,12),k=k+T|0,B=Me(B^k,8),j=j+B|0,T=Me(T^j,7),x=x+A|0,M=Me(M^x,16),N=N+M|0,A=Me(A^N,12),x=x+A|0,M=Me(M^x,8),N=N+M|0,A=Me(A^N,7),S=S+I|0,F=Me(F^S,16),L=L+F|0,I=Me(I^L,12),S=S+I|0,F=Me(F^S,8),L=L+F|0,I=Me(I^L,7);let H=0;r[H++]=i+R|0,r[H++]=a+k|0,r[H++]=c+x|0,r[H++]=d+S|0,r[H++]=u+I|0,r[H++]=f+P|0,r[H++]=h+T|0,r[H++]=p+A|0,r[H++]=m+N|0,r[H++]=g+L|0,r[H++]=b+D|0,r[H++]=w+j|0,r[H++]=E+B|0,r[H++]=v+M|0,r[H++]=C+F|0,r[H++]=_+$|0}const UT=OT(FT,{counterRight:!1,counterLength:4,allowShortKeys:!1}),HT=new Uint8Array(16),Bp=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(HT.subarray(n))},$T=new Uint8Array(32);function Fp(e,t,n,r,o){o!==void 0&&wt(o,void 0,"AAD");const s=e(t,n,$T),i=NT(r.length,o?o.length:0,!0),a=BT.create(s);o&&Bp(a,o),Bp(a,r),a.update(i);const c=a.digest();return cr(s,i),c}const zT=e=>(t,n,r)=>({encrypt(s,i){const a=s.length;i=Md(a+16,i,!1),i.set(s);const c=i.subarray(0,-16);e(t,n,c,c,1);const d=Fp(e,t,n,c,r);return i.set(d,a),cr(d),i},decrypt(s,i){i=Md(s.length-16,i,!1);const a=s.subarray(0,-16),c=s.subarray(-16),d=Fp(e,t,n,a,r);if(!TT(c,d))throw cr(d),new Error("invalid tag");return i.set(s.subarray(0,-16)),e(t,n,i,i,1),cr(d),i}}),Up=PT({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},zT(UT));function qT(e,t,n){return uf(e),n===void 0&&(n=new Uint8Array(e.outputLen)),gv(e,n,t)}const cs=Uint8Array.of(0),KT=Uint8Array.of();function GT(e,t,n,r=32,o){uf(e),Hn(r,"length"),$n(t,void 0,"prk");const s=e.outputLen;if(t.length<s)throw new Error('"prk" must be at least HashLen octets');if(r>255*s)throw new Error("Length must be <= 255*HashLen");const i=Math.ceil(r/s);if(n===void 0?n=KT:$n(n,void 0,"info"),!i)return new Uint8Array;const a=new Uint8Array(i*s),{iHash:c,oHash:d}=gv.create(e,t),u=new Uint8Array(s),f=i>1?e.create():void 0;for(let p=0;p<i-1;p++){cs[0]=p+1;const m=c._cloneInto(f);p&&m.update(u),m.update(n).update(cs).digestInto(u),d._cloneInto(f).update(u).digestInto(u),a.set(u,s*p)}if(cs[0]=i,i>1&&c.update(u),c.update(n).update(cs).digestInto(u),d.update(u).digestInto(u),a.set(u,s*(i-1)),c.destroy(),d.destroy(),f?.destroy(),u!==a&&Cr(u),Cr(cs),r===a.length)return a;const h=a.slice(0,r);return Cr(a),h}const xv={hashSHA256(e){return wl(e.subarray())},getHKDF(e,t){const n=qT(wl,t,e),o=GT(wl,n,void 0,96),s=o.subarray(0,32),i=o.subarray(32,64),a=o.subarray(64,96);return[s,i,a]},generateX25519KeyPair(){const e=Ki.utils.randomSecretKey();return{publicKey:Ki.getPublicKey(e),privateKey:e}},generateX25519KeyPairFromSeed(e){return{publicKey:Ki.getPublicKey(e),privateKey:e}},generateX25519SharedKey(e,t){return Ki.getSharedSecret(e.subarray(),t.subarray())},chaCha20Poly1305Encrypt(e,t,n,r){return Up(r,t,n).encrypt(e.subarray())},chaCha20Poly1305Decrypt(e,t,n,r,o){return Up(r,t,n).decrypt(e.subarray(),o)}},WT=xv;function VT(e){return{generateKeypair:e.generateX25519KeyPair,dh:(t,n)=>e.generateX25519SharedKey(t.privateKey,n).subarray(0,32),encrypt:e.chaCha20Poly1305Encrypt,decrypt:e.chaCha20Poly1305Decrypt,hash:e.hashSHA256,hkdf:e.getHKDF}}const Ga=e=>{const t=Fn(2);return t[0]=e>>8,t[1]=e,t};Ga.bytes=2;const Wa=e=>{if(e.length<2)throw RangeError("Could not decode int16BE");if(e instanceof Uint8Array){let t=0;return t+=e[0]<<8,t+=e[1],t}return e.getUint16(0)};Wa.bytes=2;function YT(e){return{xxHandshakeSuccesses:e.registerCounter("libp2p_noise_xxhandshake_successes_total",{help:"Total count of noise xxHandshakes successes_"}),xxHandshakeErrors:e.registerCounter("libp2p_noise_xxhandshake_error_total",{help:"Total count of noise xxHandshakes errors"}),encryptedPackets:e.registerCounter("libp2p_noise_encrypted_packets_total",{help:"Total count of noise encrypted packets successfully"}),decryptedPackets:e.registerCounter("libp2p_noise_decrypted_packets_total",{help:"Total count of noise decrypted packets"}),decryptErrors:e.registerCounter("libp2p_noise_decrypt_errors_total",{help:"Total count of noise decrypt errors"})}}function Sv(e,t){!t.enabled||!wi||(e?(t(`LOCAL_STATIC_PUBLIC_KEY ${Le(e.publicKey,"hex")}`),t(`LOCAL_STATIC_PRIVATE_KEY ${Le(e.privateKey,"hex")}`)):t("Missing local static keys."))}function Ev(e,t){!t.enabled||!wi||(e?(t(`LOCAL_PUBLIC_EPHEMERAL_KEY ${Le(e.publicKey,"hex")}`),t(`LOCAL_PRIVATE_EPHEMERAL_KEY ${Le(e.privateKey,"hex")}`)):t("Missing local ephemeral keys."))}function XT(e,t){!t.enabled||!wi||t(e?`REMOTE_STATIC_PUBLIC_KEY ${Le(e.subarray(),"hex")}`:"Missing remote static public key.")}function kv(e,t){!t.enabled||!wi||t(e?`REMOTE_EPHEMERAL_PUBLIC_KEY ${Le(e.subarray(),"hex")}`:"Missing remote ephemeral keys.")}function Iv(e,t,n){!n.enabled||!wi||(n(`CIPHER_STATE_1 ${e.n.getUint64()} ${e.k&&Le(e.k,"hex")}`),n(`CIPHER_STATE_2 ${t.n.getUint64()} ${t.k&&Le(t.k,"hex")}`))}class Ms extends Error{code;constructor(t="Invalid crypto exchange"){super(t),this.code=Ms.code}static code="ERR_INVALID_CRYPTO_EXCHANGE"}const JT=0,ZT=4294967295,QT="Cipherstate has reached maximum n, a new handshake must be performed";class eA{n;bytes;view;constructor(t=JT){this.n=t,this.bytes=Ht(12),this.view=new DataView(this.bytes.buffer,this.bytes.byteOffset,this.bytes.byteLength),this.view.setUint32(4,t,!0)}increment(){this.n++,this.view.setUint32(4,this.n,!0)}getBytes(){return this.bytes}getUint64(){return this.n}assertValue(){if(this.n>ZT)throw new Error(QT)}}const Ro=Ht(0);class Gi{k;n;crypto;constructor(t,n=void 0,r=0){this.crypto=t,this.k=n,this.n=new eA(r)}hasKey(){return!!this.k}encryptWithAd(t,n){if(!this.hasKey())return n;this.n.assertValue();const r=this.crypto.encrypt(n,this.n.getBytes(),t,this.k);return this.n.increment(),r}decryptWithAd(t,n,r){if(!this.hasKey())return n;this.n.assertValue();const o=this.crypto.decrypt(n,this.n.getBytes(),t,this.k,r);return this.n.increment(),o}}class tA{cs;ck;h;crypto;constructor(t,n){this.crypto=t;const r=ct(n,"utf-8");this.h=rA(t,r),this.ck=this.h,this.cs=new Gi(t)}mixKey(t){const[n,r]=this.crypto.hkdf(this.ck,t);this.ck=n,this.cs=new Gi(this.crypto,r)}mixHash(t){this.h=this.crypto.hash(new qe(this.h,t))}encryptAndHash(t){const n=this.cs.encryptWithAd(this.h,t);return this.mixHash(n),n}decryptAndHash(t){const n=this.cs.decryptWithAd(this.h,t);return this.mixHash(t),n}split(){const[t,n]=this.crypto.hkdf(this.ck,Ro);return[new Gi(this.crypto,t),new Gi(this.crypto,n)]}}class nA{ss;s;e;rs;re;initiator;crypto;constructor(t){const{crypto:n,protocolName:r,prologue:o,initiator:s,s:i,e:a,rs:c,re:d}=t;this.crypto=n,this.ss=new tA(n,r),this.ss.mixHash(o),this.initiator=s,this.s=i,this.e=a,this.rs=c,this.re=d}writeE(){if(this.e)throw new Error("ephemeral keypair is already set");const t=this.crypto.generateKeypair();return this.ss.mixHash(t.publicKey),this.e=t,t.publicKey}writeS(){if(!this.s)throw new Error("static keypair is not set");return this.ss.encryptAndHash(this.s.publicKey)}writeEE(){if(!this.e)throw new Error("ephemeral keypair is not set");if(!this.re)throw new Error("remote ephemeral public key is not set");this.ss.mixKey(this.crypto.dh(this.e,this.re))}writeES(){if(this.initiator){if(!this.e)throw new Error("ephemeral keypair is not set");if(!this.rs)throw new Error("remote static public key is not set");this.ss.mixKey(this.crypto.dh(this.e,this.rs))}else{if(!this.s)throw new Error("static keypair is not set");if(!this.re)throw new Error("remote ephemeral public key is not set");this.ss.mixKey(this.crypto.dh(this.s,this.re))}}writeSE(){if(this.initiator){if(!this.s)throw new Error("static keypair is not set");if(!this.re)throw new Error("remote ephemeral public key is not set");this.ss.mixKey(this.crypto.dh(this.s,this.re))}else{if(!this.e)throw new Error("ephemeral keypair is not set");if(!this.rs)throw new Error("remote static public key is not set");this.ss.mixKey(this.crypto.dh(this.e,this.rs))}}readE(t,n=0){if(this.re)throw new Error("remote ephemeral public key is already set");if(t.byteLength<n+32)throw new Error("message is not long enough");this.re=t.sublist(n,n+32),this.ss.mixHash(this.re)}readS(t,n=0){if(this.rs)throw new Error("remote static public key is already set");const r=32+(this.ss.cs.hasKey()?16:0);if(t.byteLength<n+r)throw new Error("message is not long enough");const o=t.sublist(n,n+r);return this.rs=this.ss.decryptAndHash(o),r}readEE(){this.writeEE()}readES(){this.writeES()}readSE(){this.writeSE()}}class Cv extends nA{writeMessageA(t){return new qe(this.writeE(),this.ss.encryptAndHash(t))}writeMessageB(t){const n=this.writeE();this.writeEE();const r=this.writeS();return this.writeES(),new qe(n,r,this.ss.encryptAndHash(t))}writeMessageC(t){const n=this.writeS();return this.writeSE(),new qe(n,this.ss.encryptAndHash(t))}readMessageA(t){try{return this.readE(t),this.ss.decryptAndHash(t.sublist(32))}catch(n){throw new Ms(`handshake stage 0 validation fail: ${n.message}`)}}readMessageB(t){try{this.readE(t),this.readEE();const n=this.readS(t,32);return this.readES(),this.ss.decryptAndHash(t.sublist(32+n))}catch(n){throw new Ms(`handshake stage 1 validation fail: ${n.message}`)}}readMessageC(t){try{const n=this.readS(t);return this.readSE(),this.ss.decryptAndHash(t.sublist(n))}catch(n){throw new Ms(`handshake stage 2 validation fail: ${n.message}`)}}}function rA(e,t){if(t.length<=32){const n=Ht(32);return n.set(t),n}else return e.hash(t)}var Va;(function(e){let t;e.codec=()=>(t==null&&(t=Tc((n,r,o={})=>{if(o.lengthDelimited!==!1&&r.fork(),n.webtransportCerthashes!=null)for(const s of n.webtransportCerthashes)r.uint32(10),r.bytes(s);if(n.streamMuxers!=null)for(const s of n.streamMuxers)r.uint32(18),r.string(s);o.lengthDelimited!==!1&&r.ldelim()},(n,r,o={})=>{const s={webtransportCerthashes:[],streamMuxers:[]},i=r==null?n.len:n.pos+r;for(;n.pos<i;){const a=n.uint32();switch(a>>>3){case 1:{if(o.limits?.webtransportCerthashes!=null&&s.webtransportCerthashes.length===o.limits.webtransportCerthashes)throw new ap('Decode error - map field "webtransportCerthashes" had too many elements');s.webtransportCerthashes.push(n.bytes());break}case 2:{if(o.limits?.streamMuxers!=null&&s.streamMuxers.length===o.limits.streamMuxers)throw new ap('Decode error - map field "streamMuxers" had too many elements');s.streamMuxers.push(n.string());break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>Rc(n,e.codec()),e.decode=(n,r)=>Cc(n,e.codec(),r)})(Va||(Va={}));var Ya;(function(e){let t;e.codec=()=>(t==null&&(t=Tc((n,r,o={})=>{o.lengthDelimited!==!1&&r.fork(),n.identityKey!=null&&n.identityKey.byteLength>0&&(r.uint32(10),r.bytes(n.identityKey)),n.identitySig!=null&&n.identitySig.byteLength>0&&(r.uint32(18),r.bytes(n.identitySig)),n.extensions!=null&&(r.uint32(34),Va.codec().encode(n.extensions,r)),o.lengthDelimited!==!1&&r.ldelim()},(n,r,o={})=>{const s={identityKey:Ht(0),identitySig:Ht(0)},i=r==null?n.len:n.pos+r;for(;n.pos<i;){const a=n.uint32();switch(a>>>3){case 1:{s.identityKey=n.bytes();break}case 2:{s.identitySig=n.bytes();break}case 4:{s.extensions=Va.codec().decode(n,n.uint32(),{limits:o.limits?.extensions});break}default:{n.skipType(a&7);break}}}return s})),t),e.encode=n=>Rc(n,e.codec()),e.decode=(n,r)=>Cc(n,e.codec(),r)})(Ya||(Ya={}));async function Rv(e,t,n){const r=await e.sign(Av(t));return Ya.encode({identityKey:Ac(e.publicKey),identitySig:r,extensions:n})}async function Tv(e,t,n){try{const r=Ya.decode(e),o=Nd(r.identityKey);if(n?.equals(o)===!1)throw new Error(`Payload identity key ${o} does not match expected remote identity key ${n}`);if(!t)throw new Error("Remote static does not exist");const s=Av(t);if(!await o.verify(s,r.identitySig))throw new Error("Invalid payload signature");return r}catch(r){throw new pE(r.message)}}function Av(e){const t=ct("noise-libp2p-static-key:");return e instanceof Uint8Array?vd([t,e],t.length+e.length):(e.prepend(t),e)}class oA extends wv{stream;handshake;metrics;decoder;constructor(t,n,r){super({log:t.log,inactivityTimeout:t.inactivityTimeout,maxReadBufferLength:t.maxReadBufferLength,direction:t.direction}),this.stream=t,this.handshake=n,this.metrics=r,this.decoder=new bT({lengthDecoder:Wa,maxBufferSize:16*1024*1024,encodingLength:()=>2});const o=c=>{try{for(const d of this.decoder.decode(c.data))this.onData(this.decrypt(d))}catch(d){this.abort(d)}};this.stream.addEventListener("message",o);const s=c=>{c.error!=null?c.local===!0?this.abort(c.error):this.onRemoteReset():this.onTransportClosed()};this.stream.addEventListener("close",s);const i=()=>{this.safeDispatchEvent("drain")};this.stream.addEventListener("drain",i);const a=()=>{this.onRemoteCloseWrite()};this.stream.addEventListener("remoteCloseWrite",a)}encrypt(t){const n=new qe;for(let r=0;r<t.byteLength;r+=Lp){let o=r+Lp;o>t.byteLength&&(o=t.byteLength);let s;t instanceof Uint8Array?s=this.handshake.encrypt(t.subarray(r,o)):s=this.handshake.encrypt(t.sublist(r,o)),this.metrics?.encryptedPackets.increment(),n.append(Ga(s.byteLength)),n.append(s)}return n}decrypt(t){const n=new qe;for(let r=0;r<t.byteLength;r+=Qs){let o=r+Qs;if(o>t.byteLength&&(o=t.byteLength),o-Dp<r)throw new Error("Invalid chunk");let s;t instanceof Uint8Array?s=t.subarray(r,o):s=t.sublist(r,o);const i=t.subarray(r,o-Dp);try{const a=this.handshake.decrypt(s,i);this.metrics?.decryptedPackets.increment(),n.append(a)}catch(a){throw this.metrics?.decryptErrors.increment(),a}}return n}close(t){return this.stream.close(t)}sendPause(){this.stream.pause()}sendResume(){this.stream.resume()}sendReset(t){this.stream.abort(t)}sendData(t){return{sentBytes:t.byteLength,canSendMore:this.stream.send(this.encrypt(t))}}}function Hp(e,t,n){return new oA(e,t,n)}async function sA(e,t){const{log:n,connection:r,crypto:o,privateKey:s,prologue:i,s:a,remoteIdentityKey:c,extensions:d}=e,u=await Rv(s,a.publicKey,d),f=new Cv({crypto:o,protocolName:"Noise_XX_25519_ChaChaPoly_SHA256",initiator:!0,prologue:i,s:a});Sv(f.s,n),n.trace("Stage 0 - Initiator starting to send first message."),await r.write(f.writeMessageA(Ro),t),n.trace("Stage 0 - Initiator finished sending first message."),Ev(f.e,n),n.trace("Stage 1 - Initiator waiting to receive first message from responder...");const h=f.readMessageB(await r.read(t));n.trace("Stage 1 - Initiator received the message."),kv(f.re,n),XT(f.rs,n),n.trace("Initiator going to check remote's signature...");const p=await Tv(h,f.rs,c);n.trace("All good with the signature!"),n.trace("Stage 2 - Initiator sending third handshake message."),await r.write(f.writeMessageC(u),t),n.trace("Stage 2 - Initiator sent message with signed payload.");const[m,g]=f.ss.split();return Iv(m,g,n),{payload:p,encrypt:b=>m.encryptWithAd(Ro,b),decrypt:(b,w)=>g.decryptWithAd(Ro,b,w)}}async function iA(e,t){const{log:n,connection:r,crypto:o,privateKey:s,prologue:i,s:a,remoteIdentityKey:c,extensions:d}=e,u=await Rv(s,a.publicKey,d),f=new Cv({crypto:o,protocolName:"Noise_XX_25519_ChaChaPoly_SHA256",initiator:!1,prologue:i,s:a});Sv(f.s,n),n.trace("Stage 0 - Responder waiting to receive first message."),f.readMessageA(await r.read(t)),n.trace("Stage 0 - Responder received first message."),kv(f.re,n),n.trace("Stage 1 - Responder sending out first message with signed payload and static key."),await r.write(f.writeMessageB(u),t),n.trace("Stage 1 - Responder sent the second handshake message with signed payload."),Ev(f.e,n),n.trace("Stage 2 - Responder waiting for third handshake message...");const h=f.readMessageC(await r.read(t));n.trace("Stage 2 - Responder received the message, finished handshake.");const p=await Tv(h,f.rs,c),[m,g]=f.ss.split();return Iv(m,g,n),{payload:p,encrypt:b=>g.encryptWithAd(Ro,b),decrypt:(b,w)=>m.decryptWithAd(Ro,b,w)}}class aA{protocol="/noise";crypto;prologue;staticKey;extensions;metrics;components;log;constructor(t,n={}){const{staticNoiseKey:r,extensions:o,crypto:s,prologueBytes:i}=n,{metrics:a}=t;this.components=t,this.log=t.logger.forComponent("libp2p:noise");const c=s??WT;this.crypto=VT(c),this.extensions={webtransportCerthashes:[],...o},this.metrics=a?YT(a):void 0,r?this.staticKey=c.generateX25519KeyPairFromSeed(r):this.staticKey=c.generateX25519KeyPair(),this.prologue=i??Ht(0)}[Symbol.toStringTag]="@chainsafe/libp2p-noise";[SE]=["@libp2p/connection-encryption","@chainsafe/libp2p-noise"];async secureOutbound(t,n){const r=t.log?.newScope("noise")??this.log,o=_p(t,{lengthEncoder:Ga,lengthDecoder:Wa,maxDataLength:Qs}),s=await this.performHandshakeInitiator(o,this.components.privateKey,r,n?.remotePeer?.publicKey,n),i=Nd(s.payload.identityKey);return{connection:Hp(o.unwrap(),s,this.metrics),remoteExtensions:s.payload.extensions,remotePeer:Oo(i),streamMuxer:n?.skipStreamMuxerNegotiation===!0?void 0:this.getStreamMuxer(s.payload.extensions?.streamMuxers)}}getStreamMuxer(t){if(t==null||t.length===0)return;const n=this.components.upgrader.getStreamMuxers();if(n!=null)for(const r of t){const o=n.get(r);if(o!=null)return o}if(t.length)throw new mE("Early muxer negotiation was requested but the initiator and responder had no common muxers")}async secureInbound(t,n){const r=t.log?.newScope("noise")??this.log,o=_p(t,{lengthEncoder:Ga,lengthDecoder:Wa,maxDataLength:Qs}),s=await this.performHandshakeResponder(o,this.components.privateKey,r,n?.remotePeer?.publicKey,n),i=Nd(s.payload.identityKey);return{connection:Hp(o.unwrap(),s,this.metrics),remoteExtensions:s.payload.extensions,remotePeer:Oo(i),streamMuxer:n?.skipStreamMuxerNegotiation===!0?void 0:this.getStreamMuxer(s.payload.extensions?.streamMuxers)}}async performHandshakeInitiator(t,n,r,o,s){let i;const a=s?.skipStreamMuxerNegotiation===!0?[]:[...this.components.upgrader.getStreamMuxers().keys()];try{i=await sA({connection:t,privateKey:n,remoteIdentityKey:o,log:r.newScope("xxhandshake"),crypto:this.crypto,prologue:this.prologue,s:this.staticKey,extensions:{streamMuxers:a,webtransportCerthashes:[],...this.extensions}},s),this.metrics?.xxHandshakeSuccesses.increment()}catch(c){throw this.metrics?.xxHandshakeErrors.increment(),c}return i}async performHandshakeResponder(t,n,r,o,s){let i;const a=s?.skipStreamMuxerNegotiation===!0?[]:[...this.components.upgrader.getStreamMuxers().keys()];try{i=await iA({connection:t,privateKey:n,remoteIdentityKey:o,log:r.newScope("xxhandshake"),crypto:this.crypto,prologue:this.prologue,s:this.staticKey,extensions:{streamMuxers:a,webtransportCerthashes:[],...this.extensions}},s),this.metrics?.xxHandshakeSuccesses.increment()}catch(c){throw this.metrics?.xxHandshakeErrors.increment(),c}return i}}function cA(e={}){return t=>new aA(t,e)}const lA="termdock-e2ee-v1",Fd=3600*1e3,$p=512*1024*1024,Ud=4*1024*1024,ca=()=>{},_c=Object.assign(ca,{enabled:!1,error:ca,trace:ca,newScope:()=>_c});Object.freeze(_c);async function Pv(){const e=await RC();return{privateKey:e,peerId:Oo(e.publicKey).toString()}}function dA(e){return btoa(String.fromCharCode(...PC(e.privateKey)))}function zp(e){if(e.length>512||!/^[A-Za-z0-9+/]+={0,2}$/.test(e))throw new Error("Invalid identity encoding");const t=AC(Uint8Array.from(atob(e),n=>n.charCodeAt(0)));if(t.type!=="Ed25519")throw new Error("Only Ed25519 device identities are supported");return{privateKey:t,peerId:Oo(t.publicKey).toString()}}class Nv{constructor(t=ca){this.consumed=t}consumed;chunks=[];size=0;ended=!1;error;wake;push(t){if(this.ended)throw this.error??new Error("Byte stream closed");if(this.size+t.byteLength>Ud)throw new Error("Secure stream buffer limit exceeded");this.chunks.push(t.slice()),this.size+=t.byteLength,this.wake?.()}end(t){this.ended=!0,this.error??=t,this.wake?.()}async*[Symbol.asyncIterator](){for(;;){if(this.error)throw this.error;const t=this.chunks.shift();if(t)this.size-=t.byteLength,yield t,this.consumed();else{if(this.ended)return;await new Promise(n=>{this.wake=n})}}}}class uA extends wv{constructor(t,n){super({log:_c,direction:n?"outbound":"inbound",maxReadBufferLength:Ud,maxWriteBufferLength:Ud}),this.duplex=t,this.finished=t.sink(this.outgoing).catch(r=>{this.abort(Mo(r))}),this.readTransport()}duplex;outgoing=new Nv(()=>this.onMuxerDrain());finished;async readTransport(){try{for await(const t of this.duplex.source)this.onData(t.slice());this.onTransportClosed()}catch(t){this.onTransportClosed(Mo(t))}}sendData(t){return this.outgoing.push(t.subarray()),{sentBytes:t.byteLength,canSendMore:!1}}sendReset(t){this.outgoing.end(t),this.duplex.close?.(t)}sendPause(){}sendResume(){}async close(){this.outgoing.end(),this.duplex.close?.(),this.onTransportClosed(),await this.finished}}function Mo(e){return e instanceof Error?e:new Error("Secure transport failed")}class fA extends Error{code="E2EE_REHANDSHAKE_REQUIRED";constructor(){super("Encrypted connection lifetime reached; establish a new handshake without replaying pending input")}}function hA(e){const t=e?.maxAgeMs??Fd,n=e?.maxBytesPerDirection??$p;if(!Number.isSafeInteger(t)||t<=0||t>Fd||!Number.isSafeInteger(n)||n<=0||n>$p)throw new Error("Encrypted connection limits cannot exceed the production maximum");return{maxAgeMs:t,maxBytesPerDirection:n}}async function _v(e){const{identity:t,duplex:n,initiator:r,targetPinnedPeerId:o,signal:s}=e,i=hA(e.limits);if(typeof Reflect.get(Promise,"withResolvers")!="function"||typeof globalThis.crypto?.getRandomValues!="function")throw new Error("End-to-end encryption requires Node.js 22+ or a modern browser with Promise.withResolvers and secure random support");if(r&&!o)throw new Error("A pinned target identity is required");const a=o?DC(o):void 0;if(a&&a.type!=="Ed25519")throw new Error("Only Ed25519 target identities are supported");if(t.peerId!==Oo(t.privateKey.publicKey).toString())throw new Error("Local identity mismatch");if(s?.aborted)throw s.reason??new Error("Connection aborted");const c=new uA(n,r),d=new AbortController,u=setTimeout(()=>{const p=new Error("Encrypted handshake timed out");d.abort(p),c.abort(p)},15e3),f=()=>{d.abort(s?.reason),c.abort(Mo(s?.reason))};s?.addEventListener("abort",f,{once:!0}),c.addEventListener("close",()=>s?.removeEventListener("abort",f),{once:!0});const h=cA({crypto:xv,prologueBytes:new TextEncoder().encode(lA)})({privateKey:t.privateKey,peerId:Oo(t.privateKey.publicKey),logger:{forComponent:()=>_c},upgrader:{getStreamMuxers:()=>new Map}});try{const p=await(r?h.secureOutbound(c,{remotePeer:a,signal:d.signal,skipStreamMuxerNegotiation:!0}):h.secureInbound(c,{remotePeer:a,signal:d.signal,skipStreamMuxerNegotiation:!0}));if(p.remotePeer.type!=="Ed25519")throw new Error("Unsupported remote identity");return{authenticatedPeerId:p.remotePeer.toString(),duplex:pA(p.connection,i)}}catch(p){throw c.abort(Mo(p)),p}finally{clearTimeout(u),s?.removeEventListener("abort",f)}}function pA(e,t){const n=new Nv,r=performance.now(),o=Date.now();let s=0,i=0,a;const c=()=>(a??=new fA,n.end(a),e.abort(a),a),d=setTimeout(c,t.maxAgeMs);typeof d=="object"&&d.unref?.();const u=(h,p)=>{if(a)throw a;if(Math.max(performance.now()-r,Date.now()-o)>=t.maxAgeMs||h+p>=t.maxBytesPerDirection)throw c()};e.addEventListener("message",h=>{try{u(i,h.data.byteLength),i+=h.data.byteLength,n.push(h.data.subarray())}catch(p){e.abort(Mo(p))}}),e.addEventListener("close",h=>{clearTimeout(d),n.end(h.error)},{once:!0});let f=!1;return{source:n,async sink(h){if(f)throw new Error("Secure sink already consumed");f=!0;try{for await(const p of h)u(s,p.byteLength),s+=p.byteLength,e.send(p)||await e.onDrain()}catch(p){throw e.abort(Mo(p)),p}},close(h){h?e.abort(h):e.close()}}}const Hd=1012,$d="Encrypted transport renewed",Lv=2*1024*1024,mA=new TextEncoder,gA=new TextDecoder("utf-8",{fatal:!0});async function Dv(e,t){const r=new Blob([e]).stream().pipeThrough(t).getReader(),o=[];let s=0;try{for(;;){const{done:c,value:d}=await r.read();if(c)break;if(s+=d.byteLength,s>Lv)throw new Error("Expanded record exceeds budget");o.push(d)}}catch(c){throw await r.cancel(c).catch(()=>{}),c}finally{r.releaseLock()}const i=new Uint8Array(s);let a=0;for(const c of o)i.set(c,a),a+=c.byteLength;return i}async function yA(e,t){if(e.byteLength<4096||typeof CompressionStream>"u")return e;const n=await Dv(e.subarray(4),new CompressionStream("gzip"));let r="";for(let i=0;i<n.length;i+=8192)r+=String.fromCharCode(...n.subarray(i,i+8192));const o=mA.encode(JSON.stringify({type:"compressed",id:t,encoding:"gzip",data:btoa(r)}));if(o.byteLength+4>=e.byteLength*.9)return e;const s=new Uint8Array(o.byteLength+4);return new DataView(s.buffer).setUint32(0,o.byteLength),s.set(o,4),s}async function wA(e){if(typeof e!="string"||e.length>Math.ceil(Lv/3)*4)throw new Error("Invalid compressed record");const t=Uint8Array.from(atob(e),r=>r.charCodeAt(0)),n=await Dv(t,new DecompressionStream("gzip"));return JSON.parse(gA.decode(n))}const vf=64*1024,jv=8;function bA(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=1?Math.min(e,jv):1}const vA=2147483648,xA=new TextEncoder,SA=new TextDecoder("utf-8",{fatal:!0});function EA(e){if(!(e.bytes instanceof Uint8Array))return;if(!["upload","chunk"].includes(e.type))throw new Error("Invalid binary record type");const t=xA.encode(e.id);if(!t.length||t.length>128||e.bytes.length>vf)throw new Error("Invalid binary record size");const n=new Uint8Array(2+t.length+e.bytes.length);return n[0]=e.type==="upload"?1:2,n[1]=t.length,n.set(t,2),n.set(e.bytes,2+t.length),n}function kA(e){const t=e[0],n=e[1];if(![1,2].includes(t)||!n||n>128||e.length<2+n||e.length-2-n>vf)throw new Error("Invalid binary record");return{type:t===1?"upload":"chunk",id:SA.decode(e.subarray(2,2+n)),bytes:e.slice(2+n)}}class xf{constructor(t=64){this.limit=t}limit;items=[];wake;ended=!1;error;tryPush(t){if(this.ended)throw new Error("Channel closed");return this.items.length>=this.limit?!1:(this.items.push(t),this.wake?.(),!0)}push(t){if(this.ended)throw new Error("Channel closed");if(this.items.length>=this.limit)throw this.end(new Error("Channel queue exceeded")),this.error;this.items.push(t),this.wake?.()}get size(){return this.items.length}end(t){this.ended=!0,this.error??=t,this.wake?.()}clear(){this.items.length=0}async*[Symbol.asyncIterator](){for(;;){if(this.error)throw this.error;const t=this.items.shift();if(t!==void 0){yield t;continue}if(this.ended)return;await new Promise(n=>{this.wake=n}),this.wake=void 0}}}class Wi extends Error{code="PACKET_QUEUE_BACKPRESSURE";constructor(t="Record queue capacity exceeded"){super(t),this.name="PacketQueueBackpressureError"}}const la=2*1024*1024,IA=la*2+8,qp=64*1024,CA=new TextEncoder,RA=new TextDecoder("utf-8",{fatal:!0});class Ov{constructor(t){this.duplex=t;const n=this;this.done=t.sink((async function*(){for await(const r of n.outgoing)try{yield r.compress?await yA(r.bytes,r.id):r.bytes}finally{n.releaseQueuedPacket(r)}})()),this.done.then(()=>this.discardPending(),r=>this.discardPending(r instanceof Error?r:new Error("Transport failed")))}duplex;outgoing=new xf(256);outgoingBytes=0;queuedBytesById=new Map;writeWaiters=new Set;closed=!1;get hasPendingWrites(){return this.outgoingBytes>0}queuedBytesFor(t){return this.queuedBytesById.get(t)??0}done;send(t,n=!1){if(this.closed)throw new Error("Channel closed");if(this.outgoing.size>=256)throw new Wi("Record queue item limit exceeded");const r=EA(t),o=r??CA.encode(JSON.stringify(t));if(o.length>la)throw new Error("Record too large");const s=new Uint8Array(o.length+4);if(new DataView(s.buffer).setUint32(0,r?o.length+vA:o.length),s.set(o,4),this.outgoingBytes+s.byteLength>4*1024*1024)throw new Wi("Record queue byte budget exceeded");const i={id:t.id,bytes:s,compress:n};if(!this.outgoing.tryPush(i))throw new Wi("Record queue item limit exceeded");this.outgoingBytes+=s.byteLength,this.queuedBytesById.set(t.id,this.queuedBytesFor(t.id)+s.byteLength)}async sendBulk(t,n,r){const o=Date.now();for(;;){if(n.aborted)throw n.reason??new Error("CANCELLED");if(this.closed)throw new Error("Channel closed");if(this.outgoingBytes<512*1024&&this.outgoing.size<128){r?.();try{this.send(t);return}catch(s){if(!(s instanceof Wi))throw s}}if(Date.now()-o>=3e4)throw new Error("Encrypted transport congested");await new Promise((s,i)=>{const a=()=>{clearTimeout(u),n.removeEventListener("abort",c),this.writeWaiters.delete(d)},c=()=>{a(),i(n.reason??new Error("CANCELLED"))},d=()=>{a(),s()},u=setTimeout(()=>{a(),i(new Error("Encrypted transport congested"))},Math.max(1,3e4-(Date.now()-o)));this.writeWaiters.add(d),n.addEventListener("abort",c,{once:!0}),n.aborted&&c()})}}releaseQueuedPacket(t){this.outgoingBytes=Math.max(0,this.outgoingBytes-t.bytes.byteLength);for(const o of this.writeWaiters)o();const n=this.queuedBytesById.get(t.id);if(n===void 0)return;const r=n-t.bytes.byteLength;r>0?this.queuedBytesById.set(t.id,r):this.queuedBytesById.delete(t.id)}close(t){this.discardPending(t)}abort(t){this.discardPending(t)}discardPending(t){if(!this.closed){this.closed=!0,this.outgoing.clear(),this.outgoing.end(t),this.outgoingBytes=0,this.queuedBytesById.clear();for(const n of this.writeWaiters)n();this.duplex.close?.(t)}}async*read(){const t=[];let n=0,r=0,o;const s=u=>{if(u[0]&128)return kA(u.subarray(4));const f=JSON.parse(RA.decode(u.subarray(4)));if(!f||typeof f!="object"||typeof f.id!="string"||typeof f.type!="string")throw new Error("Invalid record");return f},i=u=>{let f=0;for(;f<u.byteLength;){let h=t[t.length-1];(!h||h.end===h.bytes.byteLength)&&(h={bytes:o??new Uint8Array(qp),start:0,end:0},o=void 0,t.push(h));const p=Math.min(u.byteLength-f,h.bytes.byteLength-h.end);h.bytes.set(u.subarray(f,f+p),h.end),h.end+=p,f+=p}r+=u.byteLength},a=u=>{let f=n,h=u;for(;f<t.length;){const p=t[f];if(!p){f++;continue}const m=p.end-p.start;if(h<m)return p.bytes[p.start+h];h-=m,f++}throw new Error("Incomplete record header")},c=u=>{for(r-=u;u>0;){const f=t[n];if(!f){n++;continue}const h=Math.min(u,f.end-f.start);f.start+=h,u-=h,f.start===f.end&&(!o&&f.bytes.byteLength===qp&&(o=f.bytes),t[n]=void 0,n++)}r===0?(t.length=0,n=0,o=void 0):n>=64&&n*2>=t.length&&(t.splice(0,n),n=0)},d=u=>{const f=t[n];if(!f)throw new Error("Incomplete record body");if(f.end-f.start>=u){const b=f.bytes.subarray(f.start,f.start+u);return c(u),b}const p=new Uint8Array(u);let m=n,g=0;for(;g<u;){const b=t[m];if(!b){m++;continue}const w=Math.min(u-g,b.end-b.start);p.set(b.bytes.subarray(b.start,b.start+w),g),g+=w,m++}return c(u),p};for await(const u of this.duplex.source){if(r+u.byteLength>IA)throw new Error("Record buffer exceeded");if(r===0&&u.byteLength>=5){const f=(u[0]&127)*16777216+(u[1]<<16)+(u[2]<<8)+u[3]>>>0;if(f>la||f===0)throw new Error("Invalid record size");if(u.byteLength===f+4){yield s(u);continue}}for(u.byteLength&&i(u);r>=4;){const f=(a(0)&127)*16777216+(a(1)<<16)+(a(2)<<8)+a(3)>>>0;if(f>la||f===0)throw new Error("Invalid record size");if(r<f+4)break;const h=d(f+4);yield s(h)}}if(r)throw new Error("Truncated record")}}function Mv(e){let t="";for(let n=0;n<e.length;n+=8192)t+=String.fromCharCode(...e.subarray(n,n+8192));return btoa(t)}function Bv(e){const t=atob(e);return Uint8Array.from(t,n=>n.charCodeAt(0))}function TA(e){const t=new xf(64);e.binaryType="arraybuffer";const n=r=>{t.end(r),e.close(1e3)};return e.addEventListener("message",r=>{try{if(!(r.data instanceof ArrayBuffer)||r.data.byteLength>1024*1024)throw new Error("Invalid encrypted frame");t.push(new Uint8Array(r.data))}catch{n(new Error("Encrypted transport rejected frame"))}}),e.addEventListener("close",()=>t.end(e.transportFailure)),e.addEventListener("error",()=>t.end(e.transportFailure||new Error("Encrypted transport disconnected"))),{source:t,close:n,async sink(r){try{for await(const o of r)for(let s=0;s<o.length;s+=64*1024){const i=Date.now();for(;e.bufferedAmount>256*1024;){if(e.readyState!==1||Date.now()-i>15e3)throw new Error("Encrypted transport congested");await new Promise(a=>setTimeout(a,10))}if(e.readyState!==1)throw e.transportFailure||new Error("Encrypted transport closed");e.send(o.subarray(s,s+64*1024))}}catch(o){throw n(o instanceof Error?o:new Error("Encrypted transport failed")),o}}}}const Kp="/api/federation/transport",AA=4e3,PA=4e3;function NA(e,t=Date.now()){if(!e||typeof e!="object")return;const n=e;if(!(n.version!==1||n.path!==Kp||!Number.isSafeInteger(n.port)||n.port<1||n.port>65535||typeof n.certificateHash!="string"||!/^[a-f0-9]{64}$/.test(n.certificateHash)||!Number.isSafeInteger(n.expiresAt)||n.expiresAt<=t||n.expiresAt>t+14*864e5))return{version:1,path:Kp,port:n.port,certificateHash:n.certificateHash,expiresAt:n.expiresAt}}async function Gp(e,t,n){return new Promise((r,o)=>{const s=()=>{n(),o(t.reason??new Error("Transport aborted"))};t.addEventListener("abort",s,{once:!0}),e.then(i=>{t.removeEventListener("abort",s),r(i)},i=>{t.removeEventListener("abort",s),o(i)}),t.aborted&&s()})}function Wp(e){const t=e.readable.getReader(),n=e.writable.getWriter();let r=!1,o=0;const s=i=>{r||(r=!0,t.cancel(i).catch(()=>{}),(i?n.abort(i):n.close()).catch(()=>{}))};return{close:s,bufferedBytes:()=>o,source:{async*[Symbol.asyncIterator](){try{for(;!r;){const{done:i,value:a}=await t.read();if(i)return;if(!(a instanceof Uint8Array))throw new Error("Invalid transport stream bytes");yield a}}finally{t.releaseLock()}}},async sink(i){try{for await(const a of i)for(let c=0;c<a.byteLength;c+=64*1024){if(r)throw new Error("Transport stream closed");const d=a.subarray(c,c+64*1024);o=d.byteLength;try{await n.write(d)}finally{o=0}}await n.close()}catch(a){throw s(a instanceof Error?a:new Error("Transport stream failed")),a}finally{n.releaseLock()}}}}function _A(){const e=globalThis.WebTransport;return e?(t,n)=>new e(t,n):void 0}async function LA(e){const t=new URL(e.baseUrl);if(!["wss:","https:"].includes(t.protocol))throw new Error("QUIC requires a secure service origin");t.protocol="https:",t.port=String(e.descriptor.port),t.pathname=e.descriptor.path,t.search="",t.hash="",t.hostname==="localhost"&&(t.hostname="127.0.0.1");const n=Uint8Array.from(e.descriptor.certificateHash.match(/../g),h=>parseInt(h,16)),r=performance.now(),o=e.factory(t.href,{serverCertificateHashes:[{algorithm:"sha-256",value:n.buffer}]});let s=!1,i=!1;const a=new Set,c=new AbortController,d=()=>{if(!i){i=!0,s=!1,c.abort(new Error("QUIC session closed")),e.signal?.removeEventListener("abort",d);for(const h of a)h.close?.(new Error("QUIC session closed"));o.close({closeCode:0,reason:"Secure session closed"})}};o.closed.then(d,d),e.signal?.addEventListener("abort",d,{once:!0});const u=AbortSignal.any([c.signal,AbortSignal.timeout(AA),...e.signal?[e.signal]:[]]);try{await Gp(o.ready,u,d)}catch(h){throw d(),h}s=!0;const f=performance.now()-r;return{get available(){return s&&!i&&e.descriptor.expiresAt>Date.now()},closed:o.closed.then(()=>{},()=>{}),close:d,async open(h,p){if(!s||i)throw new Error("QUIC session unavailable");const m=AbortSignal.any([c.signal,AbortSignal.timeout(PA),...p?[p]:[]]),g=o.createBidirectionalStream({sendOrder:h==="socket"?10:0});g.then(C=>{m.aborted&&Wp(C).close?.(new Error("Stream cancelled"))},()=>{});const b=await Gp(g,m,()=>{}),w=Wp(b),E=w.close;w.close=C=>{a.delete(w),E?.(C)},a.add(w);const v=performance.now();try{const C=await _v({identity:e.identity,initiator:!0,targetPinnedPeerId:e.targetPeerId,duplex:w,signal:m});return{duplex:{...C.duplex,bufferedBytes:w.bufferedBytes},diagnostics:{endpoint:t.host,path:"direct",targetPeerId:C.authenticatedPeerId,transport:"webtransport",transportOpenMs:f,handshakeMs:performance.now()-v,establishedAt:Date.now(),bufferedBytes:0,pendingWrites:!1,activeRequests:0,waitingRequests:0}}}catch(C){throw w.close?.(C instanceof Error?C:new Error("Secure stream failed")),C}}}}class jt extends ut{constructor(){super("TARGET_AUTHORIZATION_REQUIRED")}}const Vi=new WeakMap;function Kr(e,t={}){const n=Vi.get(e);if(!e.closed&&n&&(!n.settled||Date.now()-n.at<(t.maxAgeMs??1e3)))return n.pending;const r={at:Date.now(),settled:!1,pending:void 0},o=DA(e,t.timeoutMs??5e3).then(s=>(r.at=Date.now(),r.settled=!0,s),s=>{throw Vi.get(e)===r&&Vi.delete(e),s});return r.pending=o,Vi.set(e,r),o}async function DA(e,t){const n=await e.request({type:"permissions"},{timeoutMs:t});if(n.type!=="result"||typeof n.fullService!="boolean"||!Array.isArray(n.grants))throw new Error("Invalid permission response");const r=n.grants,o=n.fullService===!0;if(!o&&r.length===0)throw new jt;return{fullService:o,grants:r,canManage:o&&r.length>0||r.some(s=>s.actions.includes("authorization.manage"))}}const jA=Pw+md+8,OA=256,Yi=3e4,Xi=vf;function Kt(e){return e instanceof Error?e:new Error(String(e??"Secure connection closed"))}function El(e){if(!e.startsWith("/")||e.startsWith("//")||e.includes("#"))throw new Error("A local API path is required");return e}class zd extends EventTarget{constructor(t,n,r,o=()=>0){super(),this.url=t,this.transmit=n,this.disconnect=r,this.pendingBytes=o}url;transmit;disconnect;pendingBytes;CONNECTING=0;OPEN=1;CLOSING=2;CLOSED=3;binaryType="arraybuffer";get bufferedAmount(){return this.pendingBytes()}protocol="termdock-e2ee-v1";extensions="";getConnectionDiagnostics;createdAt=performance.now();openedAfterMs;readyState=0;onopen=null;onmessage=null;onerror=null;onclose=null;send(t){if(this.readyState!==1)throw new Error("Secure socket is not open");if(typeof t!="string"||new TextEncoder().encode(t).length>1024*1024)throw new Error("Unsupported socket payload");this.transmit(t)}close(t=1e3,n=""){this.readyState!==3&&(this.disconnect(),this.finish(t,n))}accept(t){if(this.readyState!==3)if(t.type==="ws-ready"){this.openedAfterMs=performance.now()-this.createdAt,this.readyState=1;const n=new Event("open");this.dispatchEvent(n),this.onopen?.(n)}else if(t.type==="ws-data"&&typeof t.data=="string"){const n=new MessageEvent("message",{data:t.data});this.dispatchEvent(n),this.onmessage?.(n)}else t.type==="ws-close"?this.finish(typeof t.code=="number"?t.code:1e3,typeof t.reason=="string"?t.reason:""):t.type==="error"&&this.fail(Kt(t.error))}fail(t){if(this.readyState===3)return;const n=new Event("error");this.dispatchEvent(n),this.onerror?.(n),this.finish(1006,t.message)}finish(t,n){if(this.readyState===3)return;this.readyState=3;const r=new CloseEvent("close",{code:t,reason:n,wasClean:t===1e3});this.dispatchEvent(r),this.onclose?.(r)}}class Sf{constructor(t,n,r){this.channel=t,this.identity=n,this.targetPeerId=r,this.read().catch(o=>this.sharedConnectionFailed(Kt(o))),t.done.catch(o=>this.sharedConnectionFailed(Kt(o)))}channel;identity;targetPeerId;transportDiagnostics;establishedAt=performance.now();establishedWallTime=Date.now();lastInputAt=-1/0;pending=new Map;waiting=[];stopped=!1;closeReason;httpWindow=1;binaryChunks=!1;streamConnector;streamPool;streamDescriptor;streamConnecting=!1;streamRetryAt=0;streamFailure;get webTransportFailure(){return this.streamFailure?.message}streamAbort=new AbortController;streamChildren=new Set;idleHttpStreams=[];operationGeneration=0;quicControl;sharedTransportClosed=!1;socketUpgradeTimer;idleHook;closedHook;get transport(){return this.streamPool?.available?"webtransport":this.transportDiagnostics?.().transport??"websocket"}get canSwitchTransport(){return!this.channel.hasPendingWrites&&performance.now()-this.lastInputAt>=2e3&&![...this.pending.values()].some(t=>t.kind!=="socket")&&!this.waiting.some(t=>t.kind!=="socket")&&[...this.streamChildren].every(t=>t.canSwitchTransport)}get renewalDue(){return!this.stopped&&Math.max(performance.now()-this.establishedAt,Date.now()-this.establishedWallTime)>=Fd-5*6e4}get closed(){return this.stopped}configureWebTransport(t){this.streamConnector=t}sharedConnectionFailed(t){if(!this.stopped){if(this.sharedTransportClosed=!0,!this.streamPool?.available||!this.quicControl||this.quicControl.closed){this.close(t);return}for(const[n,r]of this.pending)r.delegated||(r.queue.end(t),r.cancelUpload?.(),r.socket?.fail(t),this.release(n))}}streamClient(t){const n=new Sf(new Ov(t.duplex),this.identity,this.targetPeerId);return n.httpWindow=this.httpWindow,n.binaryChunks=this.binaryChunks,n.transportDiagnostics=()=>({...t.diagnostics,bufferedBytes:t.duplex.bufferedBytes?.()??0}),this.streamChildren.add(n),n.closedHook=()=>{this.streamChildren.delete(n)},n}recordCapabilities(t){this.httpWindow=bA(t.httpWindow),this.binaryChunks=t.binaryChunks===!0;const n=NA(t.webTransport);n&&(this.streamDescriptor=n,this.startStreams())}startStreams(){if(!this.streamConnector||!this.streamDescriptor||this.stopped||this.streamPool?.available||this.streamConnecting||Date.now()<this.streamRetryAt)return;this.streamConnecting=!0;const t=this.streamDescriptor;(async()=>{let n,r;try{n=await this.streamConnector(t,this.streamAbort.signal),r=this.streamClient(await n.open("socket",this.streamAbort.signal));const o=await r.request({type:"permissions"},{timeoutMs:4e3});if(o.type!=="result"||typeof o.fullService!="boolean"||!Array.isArray(o.grants))throw new Error("Invalid permission response");if(!o.fullService&&!o.grants.length)throw new jt;if(this.stopped)throw new Error("Secure connection closed");this.quicControl=r,this.streamPool=n,this.streamFailure=void 0;const s=n,i=r.closedHook;r.closedHook=()=>{i?.(),!this.stopped&&this.quicControl===r&&s.close()},n.closed.then(()=>{this.streamPool!==s||this.stopped||(this.streamPool=void 0,this.quicControl?.close(),this.quicControl=void 0,this.streamRetryAt=Date.now()+3e4,this.sharedTransportClosed&&this.close(new Error("Secure connection closed")))}),this.renewSharedSockets()}catch(o){this.streamFailure=Kt(o),r?.close(),n?.close(),this.streamRetryAt=Date.now()+3e4,(o instanceof jt||o instanceof Error&&o.name==="UnexpectedPeerError")&&this.close(Kt(o))}finally{this.streamConnecting=!1}})()}renewSharedSockets(){if(!(this.stopped||!this.streamPool?.available)){if(performance.now()-this.lastInputAt<2e3||this.channel.hasPendingWrites){this.socketUpgradeTimer=setTimeout(()=>this.renewSharedSockets(),250);return}for(const[t,n]of this.pending)if(!(!n.socket||n.delegated)){n.socket.accept({type:"ws-close",id:t,code:Hd,reason:$d});try{this.channel.send({type:"ws-close",id:t})}catch{}this.release(t)}}}async operationStream(t,n){if(this.stopped)throw this.closeReason??new Error("Secure connection closed");this.startStreams();const r=this.streamPool;if(!r?.available){if(this.sharedTransportClosed)throw new Error("Secure connection closed");return}const o=await this.reserve(t,n);this.pending.get(o.id).delegated=!0;try{let s;if(t==="http")for(;this.idleHttpStreams.length;){const u=this.idleHttpStreams.pop();if(!u.closed&&!u.renewalDue){s=u;break}u.close()}if(s||(s=this.streamClient(await r.open(t,AbortSignal.any([this.streamAbort.signal,...n?[n]:[]])))),this.stopped||n?.aborted)throw s.close(),n?.reason??new Error("Secure connection closed");const i=s,a=i.operationGeneration+1;let c=!1;const d=()=>{c||(c=!0,this.release(o.id))};return i.closedHook=()=>{this.streamChildren.delete(i),this.idleHttpStreams=this.idleHttpStreams.filter(u=>u!==i),d()},i.idleHook=()=>{queueMicrotask(()=>{c||i.pending.size||i.operationGeneration<a||(d(),t==="http"&&!i.closed&&!i.renewalDue&&r===this.streamPool&&r.available&&this.idleHttpStreams.length<md?this.idleHttpStreams.push(i):i.close())})},s}catch(s){if(this.release(o.id),s instanceof Error&&s.name==="UnexpectedPeerError"&&this.close(s),n?.aborted||this.stopped||s instanceof Error&&s.name==="UnexpectedPeerError"||this.sharedTransportClosed)throw s;return}}hasCapacity(t){if(this.pending.size>=jA)return!1;const n=[...this.pending.values()].filter(r=>r.kind===t).length;return t==="http"?n<md:t==="socket"?n<Pw:!0}allocate(t){if(this.stopped)throw this.closeReason??new Error("Secure connection closed");const n=crypto.randomUUID(),r=new xf(t==="http"?jv+4:4);return this.operationGeneration++,this.pending.set(n,{queue:r,kind:t}),{id:n,queue:r}}reserve(t,n){return n?.aborted?Promise.reject(n.reason):this.stopped?Promise.reject(this.closeReason??new Error("Secure connection closed")):this.hasCapacity(t)?Promise.resolve(this.allocate(t)):this.waiting.length>=OA?Promise.reject(new Error("连接繁忙,请稍后重试。")):new Promise((r,o)=>{const s=d=>{this.waiting=this.waiting.filter(u=>u!==c),c.cleanup(),o(d)},i=()=>s(n?.reason??new Error("Request aborted")),a=setTimeout(()=>s(new Error("连接等待超时,请重试。")),Yi),c={kind:t,resolve:r,reject:o,cleanup:()=>{clearTimeout(a),n?.removeEventListener("abort",i)}};this.waiting.push(c),n?.addEventListener("abort",i,{once:!0})})}dispatchWaiting(){if(!this.stopped)for(let t=0;t<this.waiting.length;){const n=this.waiting[t];if(!this.hasCapacity(n.kind)){t++;continue}this.waiting.splice(t,1),n.cleanup(),n.resolve(this.allocate(n.kind))}}async read(){try{for await(let t of this.channel.read()){if(t.type==="compressed"){if(t.encoding!=="gzip")throw new Error("Invalid record encoding");const r=await wA(t.data);if(!r||r.type!=="ws-data"||r.id!==t.id||typeof r.data!="string")throw new Error("Invalid compressed socket record");t=r}const n=this.pending.get(t.id);n&&(n.socket?(n.socket.accept(t),(t.type==="ws-close"||t.type==="error")&&this.release(t.id)):(n.queue.push(t),(t.type==="end"||t.type==="error")&&(n.cancelUpload?.(),this.release(t.id))))}}catch(t){this.sharedConnectionFailed(Kt(t))}finally{this.sharedConnectionFailed(new Error("Secure connection closed"))}}release(t){this.pending.get(t)?.queue.end(),this.pending.delete(t),this.dispatchWaiting(),this.idleHook?.()}async request(t,n){if(this.quicControl&&!this.quicControl.closed){const i=await this.quicControl.request(t,n);return t.type==="permissions"&&i.type==="result"&&this.recordCapabilities(i),i}const{id:r,queue:o}=await this.reserve("request"),s=setTimeout(()=>this.close(new Error("Secure connection timed out")),Math.max(1e3,Math.min(Yi,n?.timeoutMs??Yi)));try{if(this.stopped)throw this.closeReason;this.channel.send({...t,id:r});const i=(await o[Symbol.asyncIterator]().next()).value;if(!i)throw new Error("Secure request closed");if(i.type==="error")throw i.error==="AUTHORIZATION_DENIED"?new ut("PERMISSION_DENIED",{targetServiceId:this.targetPeerId}):Kt(i.error);return t.type==="permissions"&&i.type==="result"&&this.recordCapabilities(i),i}finally{clearTimeout(s),this.release(r)}}openSocket(t){if(El(t),!this.streamPool?.available)return this.startStreams(),this.openSharedSocket(t);const n=new AbortController;let r;const o=new zd(t,s=>r?.send(s),()=>{n.abort(),r?.close()},()=>r?.bufferedAmount??0);return this.operationStream("socket",n.signal).then(s=>{if(o.readyState===3){s?.close();return}r=(s??this).openSharedSocket(t),o.getConnectionDiagnostics=()=>r?.getConnectionDiagnostics?.(),r.onopen=()=>o.accept({type:"ws-ready",id:""}),r.onmessage=i=>o.accept({type:"ws-data",id:"",data:i.data}),r.onclose=i=>o.accept({type:"ws-close",id:"",code:i.code,reason:i.reason}),r.onerror=()=>o.fail(new Error("Encrypted stream unavailable"))}).catch(s=>o.fail(Kt(s))),o}openSharedSocket(t){El(t);let n;const r=new AbortController,o=new zd(t,i=>{if(n){try{JSON.parse(i)?.type==="input"&&(this.lastInputAt=performance.now())}catch{}this.channel.send({id:n,type:"ws-data",data:i})}},()=>{if(r.abort(),n)try{this.channel.send({id:n,type:"ws-close"})}finally{this.release(n)}},()=>n?this.channel.queuedBytesFor(n):0);let s;return o.getConnectionDiagnostics=()=>{const i=this.transportDiagnostics?.();return i?{...i,socketOpenMs:o.openedAfterMs,socketQueueMs:s,pendingWrites:this.channel.hasPendingWrites,activeRequests:[...this.pending.values()].filter(a=>a.kind!=="socket").length,waitingRequests:this.waiting.length}:void 0},this.reserve("socket",r.signal).then(i=>{if(s=performance.now()-o.createdAt,n=i.id,o.readyState===3){this.release(n);return}const a=this.pending.get(n);if(!a)throw new Error("Secure connection closed");a.socket=o,this.channel.send({id:n,type:"ws-open",path:t,compression:typeof DecompressionStream<"u"?"gzip":void 0})}).catch(i=>{n&&this.release(n),o.fail(Kt(i))}),o}async fetch(t,n){const r=typeof location>"u"?"https://termdock.invalid":location.origin,o=t instanceof Request?t:null,s=new URL(o?.url??String(t),r);if(s.origin!==r)throw new Error("Only current-service API requests are supported");const i=new Request(s,o?new Request(o,n):n),a=i.method.toUpperCase(),c=El(s.pathname+s.search),d=hE(s.pathname);if(i.signal.aborted)throw i.signal.reason;const u=await this.operationStream("http",i.signal);if(u)try{return await u.fetch(i,{onUploadProgress:n?.onUploadProgress})}catch(_){throw u.close(Kt(_)),_}const f={};i.headers.forEach((_,R)=>{["cookie","authorization","host","connection","content-length"].includes(R)||(f[R]=_)});const{id:h,queue:p}=await this.reserve("http",i.signal),m=p[Symbol.asyncIterator]();let g;const b=()=>{g?.cancel().catch(()=>{})},w=this.pending.get(h);if(!w)throw new Error("Secure connection closed");w.cancelUpload=b;const E=()=>{b();try{this.channel.send({id:h,type:"cancel"})}catch{}p.end(Kt(i.signal.reason??"Request aborted")),this.release(h)};i.signal.addEventListener("abort",E,{once:!0});const v=()=>{i.signal.removeEventListener("abort",E),this.release(h)},C=async()=>{let _;try{const R=(await Promise.race([m.next(),new Promise((k,x)=>{_=setTimeout(()=>x(new Error("服务响应超时,请重试。")),Yi)})])).value;if(!R)throw new Error("Secure response ended unexpectedly");if(R.type==="error")throw Kt(R.error);return R}finally{clearTimeout(_)}};try{if(i.signal.aborted)throw i.signal.reason;const _=this.httpWindow,R=this.binaryChunks;if(this.channel.send({id:h,type:"http",method:a,path:c,headers:f,window:_,binaryChunks:R}),i.body){const P=i.body.getReader();g=P;let T=0,A=0;const N=[],L=async()=>{if((await C()).type!=="upload-ack")throw new Error("Invalid upload acknowledgement");A+=N.shift(),n?.onUploadProgress?.(A)};try{for(;;){const{done:D,value:j}=await P.read();if(D)break;if(T+=j.byteLength,T>d)throw new Error("Request body exceeds upload limit");for(let B=0;B<j.byteLength;B+=Xi){N.length>=_&&await L();const M=j.subarray(B,B+Xi);await this.channel.sendBulk({id:h,type:"upload",...R?{bytes:M}:{data:Mv(M)}},i.signal),N.push(M.byteLength)}}for(;N.length;)await L()}catch(D){throw await P.cancel(D).catch(()=>{}),D}finally{g=void 0,P.releaseLock()}}if(i.signal.aborted||this.stopped)throw new Error("Request aborted");this.channel.send({id:h,type:"upload-end"});const k=await C();if(k.type!=="head"||typeof k.status!="number")throw new Error("Invalid response header");const x=new Headers(k.headers);if(a==="HEAD"||[204,205,304].includes(k.status)){if((await C()).type!=="end")throw new Error("Unexpected response body");return v(),new Response(null,{status:k.status,headers:x})}let S=!1;const I=new ReadableStream({pull:async P=>{try{S&&(this.channel.send({id:h,type:"ack"}),S=!1);const T=await C();if(T.type==="end"){P.close(),v();return}if(T.type!=="chunk"||!(R&&T.bytes instanceof Uint8Array)&&typeof T.data!="string")throw new Error("Invalid response chunk");const A=R&&T.bytes instanceof Uint8Array?T.bytes:Bv(T.data);if(A.length>Xi)throw new Error("Response chunk exceeds budget");P.enqueue(A),S=!0}catch(T){P.error(T),E(),v()}},cancel:()=>{E(),v()}},{highWaterMark:Xi,size:P=>P.byteLength});return new Response(I,{status:k.status,headers:x})}catch(_){throw E(),v(),_}}retire(){for(const t of this.streamChildren)t.retire();for(const t of this.pending.values())t.socket?.accept({id:"",type:"ws-close",code:Hd,reason:$d});this.close()}close(t=new Error("Secure connection closed")){if(!this.stopped){this.stopped=!0,this.closeReason=t,clearTimeout(this.socketUpgradeTimer),this.streamAbort.abort(t);for(const n of this.streamChildren)n.close(t);this.streamPool?.close();for(const n of this.waiting.splice(0))n.cleanup(),n.reject(t);for(const n of this.pending.values())n.queue.end(t),n.cancelUpload?.(),n.socket?.fail(t);this.pending.clear(),this.channel.close(t),this.closedHook?.()}}}async function Mr(e){const t=new URL(e.url);if(!["wss:","ws:"].includes(t.protocol))throw new Error("A WebSocket endpoint is required");const n=typeof location<"u"&&location.protocol==="http:"&&location.host===t.host;if(t.protocol==="ws:"&&!["127.0.0.1","localhost","[::1]"].includes(t.hostname)&&!n)throw new Error("Remote WS requires its explicit same-origin HTTP page");const r=e.identity??await Pv(),o=performance.now(),s=(e.socketFactory??(u=>new WebSocket(u)))(t.href),i=TA(s),a=new AbortController,c=setTimeout(()=>a.abort(new Error("Secure handshake timed out")),2e4),d=e.signal?AbortSignal.any([e.signal,a.signal]):a.signal;try{await new Promise((w,E)=>{if(d.aborted){E(d.reason);return}const v=()=>{d.removeEventListener("abort",R),s.removeEventListener("open",C),s.removeEventListener("error",_),s.removeEventListener("close",_)},C=()=>{v(),w()},_=()=>{v(),E(s.transportFailure||new Error("Secure transport unavailable"))},R=()=>{v(),E(d.reason)};d.addEventListener("abort",R,{once:!0}),s.addEventListener("open",C),s.addEventListener("error",_),s.addEventListener("close",_),s.readyState===1&&C()});const u=performance.now(),f=await _v({identity:r,duplex:i,initiator:!0,targetPinnedPeerId:e.targetPeerId,signal:d}),h=new Sf(new Ov(f.duplex),r,f.authenticatedPeerId),p=performance.now(),m=Date.now(),g=s.connectionTimings;h.transportDiagnostics=()=>({endpoint:t.host,path:g?"relay":"direct",targetPeerId:f.authenticatedPeerId,transport:"websocket",transportOpenMs:u-o,handshakeMs:p-u,establishedAt:m,relay:g?{...g}:void 0,bufferedBytes:s.bufferedAmount,pendingWrites:!1,activeRequests:0,waitingRequests:0});const b=e.webTransportFactory??_A();if(e.webTransport!==!1&&!g&&t.protocol==="wss:"&&b&&h.configureWebTransport((w,E)=>LA({baseUrl:t.href,descriptor:w,identity:r,targetPeerId:f.authenticatedPeerId,factory:b,signal:E})),e.pairingCode)try{await h.request({type:"pair",code:e.pairingCode})}catch(w){throw h.close(Kt(w)),w}return h}catch(u){throw s.close(),u}finally{clearTimeout(c)}}const Vp=lE,MA=dE;class BA extends EventTarget{constructor(t,n,r,o={}){if(super(),this.url=t,!/^[a-zA-Z0-9_.:-]{1,160}$/.test(n))throw new Error("Invalid target identity");if(o.entryServiceId===n)throw new ut("RELAY_SELF_TARGET",{...o,targetServiceId:n});const s=performance.now();let i;this.upstream=r(t),this.upstream.addEventListener("open",()=>{this.connectionTimings.entryOpenMs=performance.now()-s}),this.deadline=setTimeout(()=>this.fail("Relay connection timed out"),Ku),this.upstream.addEventListener("message",a=>{if(this.readyState!==3)try{if(typeof a.data!="string"||new TextEncoder().encode(a.data).length>Vp)throw new Error("Invalid relay envelope");const c=JSON.parse(a.data);if(c.type==="ready"){if(this.requested||this.readyState!==0)throw new Error("Repeated relay handshake");i=performance.now(),this.requested=!0,this.transmit({type:"open",streamId:this.streamId,serviceId:n});return}if(c.streamId!==this.streamId)return;if(c.type==="opened"&&this.readyState===0){this.connectionTimings.routeOpenMs=i===void 0?null:performance.now()-i,clearTimeout(this.deadline),this.readyState=1;const h=new Event("open");this.dispatchEvent(h),this.onopen?.(h);return}if(c.type==="close"){(c.code==="RELAY_AUTHORIZATION_REQUIRED"||c.reason==="Authorization revoked")&&(this.transportFailure=new ut("RELAY_AUTHORIZATION_REQUIRED",{...o,targetServiceId:n})),c.code==="RELAY_SELF_TARGET"&&(this.transportFailure=new ut("RELAY_SELF_TARGET",{...o,targetServiceId:n})),(c.code==="TARGET_PASSWORD_REQUIRED"||c.code==="TARGET_SECURITY_UPGRADE_REQUIRED")&&(this.transportFailure=new ut(c.code,{...o,targetServiceId:n})),this.finish(1001,this.transportFailure?.message||"Relay route closed"),this.upstream.close();return}if(c.type!=="data"||this.readyState!==1||c.encoding!=="base64"||typeof c.payload!="string"||!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c.payload))throw new Error("Invalid ciphertext relay frame");const d=Bv(c.payload),u=this.binaryType==="blob"?new Blob([d]):d.buffer,f=new MessageEvent("message",{data:u});this.dispatchEvent(f),this.onmessage?.(f)}catch{this.fail("Relay protocol rejected frame")}}),this.upstream.addEventListener("close",a=>this.finish(a.code||1006,"Relay disconnected")),this.upstream.addEventListener("error",()=>this.fail("Relay transport unavailable"))}url;CONNECTING=0;OPEN=1;CLOSING=2;CLOSED=3;protocol="";extensions="";binaryType="arraybuffer";readyState=0;transportFailure;onopen=null;onmessage=null;onerror=null;onclose=null;connectionTimings={entryOpenMs:null,routeOpenMs:null};upstream;streamId=crypto.randomUUID();requested=!1;deadline;get bufferedAmount(){return this.upstream.bufferedAmount}transmit(t){const n=JSON.stringify(t);if(this.upstream.readyState!==1||this.upstream.bufferedAmount+n.length>MA||n.length>Vp)throw new Error("Relay unavailable or congested");this.upstream.send(n)}send(t){if(this.readyState!==1)throw new Error("Relay socket is not open");let n;if(ArrayBuffer.isView(t))n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);else if(t instanceof ArrayBuffer)n=new Uint8Array(t);else throw new Error("Relay secure transport requires binary bytes");try{this.transmit({type:"data",streamId:this.streamId,encoding:"base64",payload:Mv(n)})}catch(r){throw this.fail("Relay transport congested"),r}}close(t=1e3,n=""){if(this.readyState!==3){try{this.requested&&this.transmit({type:"close",streamId:this.streamId})}catch{}this.finish(t,n),this.upstream.close()}}fail(t){if(this.readyState===3)return;const n=new Event("error");this.dispatchEvent(n),this.onerror?.(n),this.finish(1006,t),this.upstream.close()}finish(t,n){if(this.readyState===3)return;clearTimeout(this.deadline),this.readyState=3;const r=Object.assign(new Event("close"),{code:t,reason:n,wasClean:t===1e3});this.dispatchEvent(r),this.onclose?.(r)}}class FA extends BA{constructor(t,n,r=s=>new WebSocket(s),o={}){super(t,n,r,o)}}function Fv(e,t={}){return n=>new FA(n,e,void 0,t)}function UA(e){if(typeof e!="string"||!e.startsWith("/api/")||/[\\\x00-\x20\x7f#]/.test(e))return null;const t=e.split("?")[0];if(t.includes("//"))return null;try{const r=t.split("/").map((o,s)=>{if(s===0||o===""&&s===t.split("/").length-1)return o;const i=decodeURIComponent(o);if(!i||i==="."||i===".."||/[\\/\x00-\x1f\x7f]/.test(i)||/%[a-f0-9]{2}/i.test(i))throw new Error("Ambiguous API path");return i}).join("/");return r.endsWith("/")&&!r.startsWith("/api/terminal/fs/preview/")?null:r}catch{return null}}function HA(e){if(!("serviceWorker"in navigator))return()=>{};const t=new Set,n=r=>{if(r.source!==navigator.serviceWorker.controller||r.data?.type!=="termdock-secure-fetch"||r.ports.length!==1)return;const o=r.ports[0],{path:s,method:i,headers:a,body:c,expectedTargetPeerId:d,previewPrefix:u}=r.data;let f;try{f=new URL(s,location.origin)}catch{o.close();return}if(f.origin!==location.origin||!f.pathname.startsWith("/api/")||t.size>=32||typeof i!="string"||c!==void 0&&(!(c instanceof ArrayBuffer)||c.byteLength>5*1024*1024)){o.postMessage({type:"error"}),o.close();return}if(u!==void 0&&(typeof u!="string"||!u.endsWith("/")||!/^\/api\/terminal\/fs\/preview\/[a-f0-9]{32}\//.test(u)||!["GET","HEAD"].includes(i)||!UA(f.pathname)?.startsWith(u))){o.postMessage({type:"error"}),o.close();return}const h=new AbortController;let p,m,g=!1,b=!1;const w=()=>{b||(b=!0,t.delete(w),h.abort(),p?.cancel().catch(()=>{}),o.close())};t.add(w),o.onmessage=E=>{if(E.data?.type==="cancel"){w();return}E.data?.type!=="pull"||g||b||(g=!0,(async()=>{if(!p){o.postMessage({type:"end"}),w();return}if(!m?.length){const C=await p.read();if(C.done){o.postMessage({type:"end"}),w();return}m=C.value}const v=m.slice(0,64*1024);m=m.subarray(v.length),o.postMessage({type:"chunk",data:v.buffer},[v.buffer])})().catch(()=>{o.postMessage({type:"error"}),w()}).finally(()=>{g=!1}))},o.onmessageerror=w,o.start(),(async()=>{const E=await e();if(b)return;if(d&&d!==E.targetPeerId)throw new Error("Preview target changed");const v=await E.fetch(f.pathname+f.search,{method:i,headers:a,body:["GET","HEAD"].includes(i)?void 0:c,signal:h.signal});if(b){await v.body?.cancel();return}p=v.body?.getReader();const C={};v.headers.forEach((_,R)=>{C[R]=_}),o.postMessage({type:"head",status:v.status,headers:C,bodyless:!p,targetPeerId:E.targetPeerId})})().catch(()=>{b||(o.postMessage({type:"error"}),w())})};return navigator.serviceWorker.addEventListener("message",n),()=>{navigator.serviceWorker.removeEventListener("message",n);for(const r of[...t])r()}}function Uv(e){const t=e instanceof Error?e.message:"";if(["INVITATION_EXPIRED","ROUTE_INVITATION_EXPIRED"].includes(t))return"expired";if(["INVITATION_USED","ROUTE_INVITATION_USED"].includes(t))return"used";if(["PAIRING_DENIED","ROUTE_PAIRING_DENIED"].includes(t))return"invalid"}function Hv(e){const t=Uv(e);return t==="expired"?{kind:t,title:"邀请已过期",description:"此链接已超过有效期。请联系分享者重新生成邀请,再使用新的链接连接。",retryable:!1}:t==="used"?{kind:t,title:"邀请已被使用",description:"此链接只能用于一台设备。已接受邀请的设备可从服务列表进入;其他设备需要分享者提供新的邀请链接。",retryable:!1}:t==="invalid"?{kind:t,title:"邀请已失效",description:"此链接已不可用,可能已过期、被使用或被撤销。请联系分享者重新生成邀请。",retryable:!1}:_r(e)?.code==="TARGET_IDENTITY_MISMATCH"||e instanceof Error&&e.message==="PEER_IDENTITY_MISMATCH"?{kind:"identity",title:"连接的服务不匹配",description:"实际连接的服务与邀请链接不一致。请核对链接,或联系分享者获取新的邀请。",retryable:!1}:{kind:"connection",title:"暂时无法连接",description:"未能连接到分享服务。请检查网络,并确认分享者的服务正在运行后重试。",retryable:!0}}const $v="termdock-secure-last-path:",$A=10*6e4;function zv(e){try{const t=JSON.parse(sessionStorage.getItem($v+e)||"null");return t&&typeof t.key=="string"&&Date.now()-t.at<$A?t.key:void 0}catch{return}}function qd(e,t){try{sessionStorage.setItem($v+e,JSON.stringify({key:t,at:Date.now()}))}catch{}}function qv(e,t,n=!1,r={}){return new Promise((o,s)=>{let i=0,a=0,c=!1,d,u,f,h;const p=new Set,m=()=>{clearTimeout(h),clearTimeout(w),r.signal?.removeEventListener("abort",b);for(const v of p)v.abort();p.clear()},g=v=>{c||(c=!0,m(),s(v))},b=()=>g(r.signal?.reason),w=setTimeout(()=>g(u||f||new Error("连接路线尝试超时")),r.timeoutMs??uE);if(r.signal?.addEventListener("abort",b,{once:!0}),r.signal?.aborted){b();return}const E=()=>{if(c)return;if(i>=e.length){a||(c=!0,m(),s(u||f||d||new Error("没有可用的连接路线。")));return}if(a>=(n?1:2))return;const v=e[i++],C=performance.now(),_=x=>{try{performance.getEntriesByName("termdock:connection-path").length>64&&performance.clearMeasures("termdock:connection-path"),performance.measure("termdock:connection-path",{start:C,end:performance.now(),detail:{path:v.key.startsWith("relay:")?"relay":"direct",ok:x}})}catch{}},R=new AbortController;p.add(R),a++;let k;try{k=v.run(R.signal)}catch(x){k=Promise.reject(x)}k.then(x=>{if(_(!0),p.delete(R),c){t(x);return}c=!0,m(),o({value:x,key:v.key})},x=>{if(_(!1),p.delete(R),a--,!c){if(d=x,x instanceof Error&&x.name==="UnexpectedPeerError"&&(u=x),x instanceof ut&&["TARGET_IDENTITY_MISMATCH","RELAY_SELF_TARGET"].includes(x.code)&&(u=x),x instanceof ut&&["RELAY_AUTHORIZATION_REQUIRED","TARGET_PASSWORD_REQUIRED","TARGET_SECURITY_UPGRADE_REQUIRED"].includes(x.code)&&(f=x),Uv(x)||x instanceof jt||x instanceof ut&&x.code==="TARGET_AUTHORIZATION_REQUIRED"){c=!0,m(),s(x);return}E()}}),clearTimeout(h),!n&&i<e.length&&(h=setTimeout(E,400))};E()})}const zA=3,qA=1/0,KA=10,Kv="termdock-secure-workspace-limit";function Gv(e){return e===1/0||Number.isInteger(e)&&e>=3&&e<=KA}function GA(){try{const e=localStorage.getItem(Kv),t=e==="unlimited"?1/0:Number(e);if(Gv(t))return t}catch{}return navigator.maxTouchPoints>0?zA:qA}function WA(e,t,n,r){if(e.length<=r)return e;const o=new Set(["root",t,...n?[n]:[]]),s=[...e].reverse().sort((i,a)=>a.touchedAt-i.touchedAt);for(const i of s){if(o.size>=r)break;o.add(i.key)}return e.filter(i=>o.has(i.key))}const Wv="termdock-workspace",Br="termdock:workspace-visibility",Kd="termdock:workspace-activate";function Lc(){return window.parent!==window&&location.pathname==="/workspace.html"&&new URLSearchParams(location.search).get(Wv)||"root"}let Yp,Xp;function yn(){try{if(window.parent===window)return window.__termdockWorkspaceHost;const e=window.parent.__termdockWorkspaceHost;return e&&e!==Yp&&(Yp=e,Xp={...e,subscribe(t){const n=e.subscribe(t,Lc()),r=o=>{o.persisted||n()};return window.addEventListener("pagehide",r),()=>{n(),window.removeEventListener("pagehide",r)}}}),e?Xp:void 0}catch{return}}function Tr(){const e=yn();return!e||e.snapshot().activeKey===Lc()}function Xa(e,t=!0){return yn()?.activate(e,t)??!1}function fo(e){yn()?.report(Lc(),e)}const Gd="termdock-secure-workspace-session:",Vv="termdock-secure-last-workspace";function VA(){for(const e of["sessionStorage","localStorage"])try{const t=window[e].getItem(Vv);if(t)return t}catch{}return null}function YA(e){for(const t of["sessionStorage","localStorage"])try{window[t].setItem(Vv,e)}catch{}}function nB(e){if(e)try{const t=JSON.parse(localStorage.getItem(Gd+e)||"null");return localStorage.removeItem(Gd+e),t&&typeof t.sessionId=="string"&&Date.now()-t.at<6e4?t.sessionId:void 0}catch{return}}function XA(e){if(window.parent!==window||window.termdockDesktop)return;if(window.__termdockWorkspaceHost)return window.__termdockWorkspaceHost;let t={activeKey:"root",items:[{key:"root",service:e,phase:"connecting",runningCount:0,reviewCount:0,touchedAt:Date.now()}]};try{const f=VA(),h=e&&f!==e.targetPeerId?Dr().find(p=>p.targetPeerId===f):void 0;h?.targetPeerId&&(t={activeKey:h.targetPeerId,items:[...t.items,{key:h.targetPeerId,service:h,phase:"connecting",runningCount:0,reviewCount:0,touchedAt:Date.now()}]})}catch{}let n=GA(),r=t.activeKey==="root"?"root":null;const o=new Map,s=new Map([["root",window]]),i=new Set,a=()=>{for(const f of[...o.keys()])f()},c=()=>{const f=WA(t.items,t.activeKey,r,n),h=new Set(f.map(p=>p.key));t={...t,items:f};for(const[p,m]of o)m&&!h.has(m)&&o.delete(p);for(const p of s.keys())h.has(p)||s.delete(p);for(const p of i)h.has(p)||i.delete(p)},d=(f,h)=>{try{const p=h.document.createEvent("CustomEvent");if(p.initCustomEvent(Br,!1,!1,{active:t.activeKey===f}),h.dispatchEvent(p),t.activeKey===f){const m=h.document.createEvent("Event");if(m.initEvent("resize",!1,!1),h.dispatchEvent(m),i.delete(f)){const g=h.document.createEvent("Event");g.initEvent(Kd,!1,!1),h.dispatchEvent(g)}}else h.document.activeElement?.blur?.()}catch{}},u={snapshot:()=>t,subscribe:(f,h)=>(o.set(f,h),()=>{o.delete(f)}),present(f){r=f},retentionLimit:()=>n,setRetentionLimit(f){if(Gv(f)){n=f;try{localStorage.setItem(Kv,f===1/0?"unlimited":String(f))}catch{}c(),a()}},activate(f,h=!0){const p=Mn(f);if(!p?.targetPeerId)return!1;const m=t.items.find(w=>w.service?.targetPeerId===p.targetPeerId),g=m?.key||p.targetPeerId,b=m?{...m,service:p,touchedAt:Date.now()}:{key:g,service:p,phase:"connecting",runningCount:0,reviewCount:0,touchedAt:Date.now()};t={activeKey:g,items:m?t.items.map(w=>w===m?b:w):[...t.items,b]},c(),YA(p.targetPeerId),h&&i.add(g),a();for(const[w,E]of s)d(w,E);return!0},report(f,h){const p=t.items.find(g=>g.key===f);if(!p||h.service&&p.service?.targetPeerId&&h.service.targetPeerId!==p.service.targetPeerId)return;const m={...p,...h};JSON.stringify(m)!==JSON.stringify(p)&&(t={...t,items:t.items.map(g=>g===p?m:g)},a())},attach(f,h){h&&t.items.some(p=>p.key===f)?(s.set(f,h),d(f,h)):s.delete(f)},focusSession(f,h){const p=Dr().find(g=>g.targetPeerId===f);if(!p)return!1;try{localStorage.setItem(Gd+f,JSON.stringify({sessionId:h,at:Date.now()}))}catch{return!1}u.activate(p,!1);const m=s.get(t.activeKey);if(m){const g=m.document.createEvent("CustomEvent");g.initCustomEvent("termdock:workspace-session",!1,!1,null),m.dispatchEvent(g)}return!0}};return window.__termdockWorkspaceHost=u,u}let kl;async function tn(){return kl||(kl=(async()=>{const e=await new Promise((t,n)=>{const r=indexedDB.open("termdock-device-identity",1);r.onupgradeneeded=()=>r.result.createObjectStore("keys"),r.onsuccess=()=>t(r.result),r.onerror=()=>n(r.error)});try{const t=await new Promise((o,s)=>{const i=e.transaction("keys").objectStore("keys").get("identity");i.onsuccess=()=>o(i.result),i.onerror=()=>s(i.error)});if(t)return zp(t);const n=await Pv();let r=n;return await new Promise((o,s)=>{const i=e.transaction("keys","readwrite"),a=i.objectStore("keys"),c=a.get("identity");c.onsuccess=()=>{typeof c.result=="string"?r=zp(c.result):a.put(dA(n),"identity")},i.oncomplete=()=>o(),i.onerror=()=>s(i.error)}),r}finally{e.close()}})()),kl}const Ja={CONNECTION_FAILED:{reason:"connectionFailed",status:503,message:"暂时连不上这台服务,请检查地址和网络后重试。"},INVALID_PASSWORD:{reason:"invalidPassword",status:401,message:"密码不正确,或服务身份无法验证。请检查后重试。"},IDENTITY_MISMATCH:{reason:"identityMismatch",status:409,message:"服务身份与已保存的记录不一致,请确认目标服务。"},RATE_LIMITED:{reason:"rateLimited",status:429,message:"尝试次数较多,请稍后再试。"},LOGIN_UNAVAILABLE:{reason:"unavailable",status:503,message:"暂时无法登录这台服务,请稍后重试。"},PASSWORD_NOT_CONFIGURED:{reason:"passwordNotConfigured",status:403,message:"目标服务未配置访问密码,且此设备尚未获得访问授权。请让目标服务管理员发送邀请或授权此设备后重新连接。"},TARGET_PASSWORD_REQUIRED:{reason:"targetPasswordRequired",status:403,message:"目标服务未配置有效访问密码,已禁用中转。请让目标服务管理员先配置访问密码。"},TARGET_SECURITY_UPGRADE_REQUIRED:{reason:"securityUpgradeRequired",status:403,message:"无法核验中转的密码保护,已禁用中转。请更新目标服务和中继程序。"},DEVICE_AUTHORIZATION_REQUIRED:{reason:"authorizationRequired",status:403,message:"请检查目标服务与入口的设备授权后重试。"}};function Jp(e){return typeof e=="string"&&Object.hasOwn(Ja,e)?Ja[e].reason:void 0}class Ft extends Error{constructor(t,n){super(Ja[t].message),this.code=t,this.retryAfterMs=n,this.status=Ja[t].status}code;retryAfterMs;status}function zn(e){if(e instanceof Ft)return e;if(e instanceof jt)return new Ft("DEVICE_AUTHORIZATION_REQUIRED");if(e instanceof ut)return new Ft(e.code==="TARGET_IDENTITY_MISMATCH"?"IDENTITY_MISMATCH":e.code==="TARGET_PASSWORD_REQUIRED"||e.code==="TARGET_SECURITY_UPGRADE_REQUIRED"?e.code:"DEVICE_AUTHORIZATION_REQUIRED");if(e instanceof Error){if(e.message==="PASSWORD_NOT_CONFIGURED")return new Ft("PASSWORD_NOT_CONFIGURED");if(e.message==="TARGET_PASSWORD_REQUIRED"||e.message==="TARGET_SECURITY_UPGRADE_REQUIRED")return new Ft(e.message);if(e.name==="UnexpectedPeerError"||e.message==="PEER_IDENTITY_MISMATCH")return new Ft("IDENTITY_MISMATCH");if(e.message==="LOGIN_RATE_LIMIT"||e.message==="Too many password login attempts")return new Ft("RATE_LIMITED");if(e.message==="AUTHORIZATION_DENIED")return new Ft("DEVICE_AUTHORIZATION_REQUIRED");if(e instanceof TypeError||["TimeoutError","AbortError"].includes(e.name)||bw(e)||e.message==="Encrypted handshake timed out"||e.message==="Encrypted transport failed")return new Ft("CONNECTION_FAILED");if(e.message==="Password authentication failed"||e.message==="Password login expired"||e.message==="INVALID_LOGIN")return new Ft("INVALID_PASSWORD")}return new Ft("LOGIN_UNAVAILABLE")}const xt="termdock:secure-state";let Re,At,Pt,Fr="direct",da=!1,Zp=0,ua=!1,Qp=-1/0;const zt=new Map,Dc=e=>!!e&&["RELAY_AUTHORIZATION_REQUIRED","TARGET_PASSWORD_REQUIRED","TARGET_SECURITY_UPGRADE_REQUIRED"].includes(e.code),gn=new Map;function Yv(e){const{targetServiceId:t,entryServiceId:n}=e.context;if(!Dc(e)||!t||!n)return;gn.size>32&&gn.clear();const r=gn.get(t)||new Set;r.add(n),gn.set(t,r)}function Ef(e,t){return!gn.get(e)?.has(t)}function ei(e){Yv(e);const t=e.context.targetServiceId||se()?.targetPeerId;t&&(zt.size>32&&zt.clear(),zt.set(t,e))}function JA(){const e=se()?.targetPeerId;e&&(zt.delete(e),gn.delete(e))}const Bo=globalThis.fetch.bind(globalThis);function se(){return dt()}function He(){return Re}function ZA(){return Pt}function Za(){Re?.close(),Pt?.close(),Re=void 0,Pt=void 0}class Il extends Error{constructor(){super("Secure read target changed"),this.name="SecureReadTargetChanged"}}function QA(e){if(bw(e))return!0;if(!e||typeof e!="object")return!1;const t=e;return t.name==="UnexpectedEOFError"&&typeof t.message=="string"&&/^Unexpected EOF - stream closed while reading \d+\/\d+ bytes$/.test(t.message)}async function e2(e,t){const n=se(),r=n?.targetPeerId,o=JSON.stringify(n),s=()=>JSON.stringify(se())===o,i=He(),a=c=>{if(!s())throw new Il;if(t?.aborted)throw new DOMException("The operation was aborted","AbortError");return c};try{return a(await e())}catch(c){if(c instanceof Il||t?.aborted||c instanceof Error&&c.name==="AbortError"||c&&typeof c=="object"&&"status"in c||!r||!s()||!i?.closed&&!QA(c))throw c;if(Ls(navigator.onLine===!1?"offline":"reconnecting"),i&&He()===i&&Za(),window.dispatchEvent(new Event(xt)),await Qv(t),!s())throw new Il;const d=a(await e());return Ls("ready"),d}}async function Xv(){const e=await Bo("/api/auth/status",{signal:AbortSignal.timeout(5e3)});if(!e.ok)throw new Error("Failed to query auth status");return e.json()}async function t2(){if(se()){await Vt();return}if((await Xv()).enabled)return;const e=await Bo("/api/auth/open/parameters",{cache:"no-store"});if(!e.ok)throw new Error("Open service unavailable");const{serviceIdentity:t}=await e.json();if(typeof t!="string"||!t)throw new Error("Invalid service identity");await Yt({url:location.origin,targetPeerId:t,serviceName:location.hostname})}async function n2(e,t){const{startPasswordBootstrap:n,finishPasswordBootstrap:r}=await Zt(async()=>{const{startPasswordBootstrap:f,finishPasswordBootstrap:h}=await import("./passwordBootstrap-BW7oAKGJ.js");return{startPasswordBootstrap:f,finishPasswordBootstrap:h}},__vite__mapDeps([0,1,2])),o=typeof window<"u"?window.termdockDesktop:void 0;let s=location.origin;if(o?.previewCapabilities&&o.passwordBootstrapOrigin){const f=o.passwordBootstrapOrigin(e),h=new URL(f);if(h.origin!==f||e!==location.origin&&h.origin!==e||!["http:","https:"].includes(h.protocol)||h.username||h.password)throw new Ft("LOGIN_UNAVAILABLE");s=f}const i=f=>e===location.origin?f:new URL(f,e).href,a=async(f,h)=>{const p=await Bo(i(f),{credentials:"omit",cache:"no-store",signal:AbortSignal.timeout(15e3),...h?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)}:{}});if(!p.ok){const m=await p.json().catch(()=>null),g=typeof m?.retryAfterMs=="number"&&Number.isFinite(m.retryAfterMs)&&m.retryAfterMs>=0?m.retryAfterMs:void 0;throw new Ft(p.status===429?"RATE_LIMITED":m?.code==="PASSWORD_NOT_CONFIGURED"?"PASSWORD_NOT_CONFIGURED":p.status===401?"INVALID_PASSWORD":"LOGIN_UNAVAILABLE",g)}return p.json()},{saltHex:c}=await a("/api/auth/password/parameters"),d=await tn(),u=await n(t,c);try{const f=await a("/api/auth/password/start",{startLoginRequest:u.startLoginRequest,clientIdentity:d.peerId}),h=await r(u,f,{clientIdentity:d.peerId,origin:s});await a("/api/auth/password/finish",{attemptId:h.attemptId,finishLoginRequest:h.finishLoginRequest});const p=s===location.origin?e:s;return{url:p,targetPeerId:h.serverIdentity,serviceName:new URL(p).host,serviceOrigin:p}}finally{u.passwordKey=""}}async function kf(e,t){const n=se();if(n&&Ot(n).includes(e))return await Qa(n,t),n;try{return await n2(e,t)}catch(r){if(!(r instanceof TypeError)&&!(r instanceof DOMException))throw r;const o=(await mt()).find(i=>i.targetPeerId&&Ot({...i,targetPeerId:i.targetPeerId}).includes(e));if(!o?.targetPeerId)throw zn(r);const s={...o,targetPeerId:o.targetPeerId,serviceName:o.label};return await Qa(s,t),s}}async function Qa(e,t){const n=await bi(e),{startPasswordBootstrap:r,finishPasswordBootstrap:o}=await Zt(async()=>{const{startPasswordBootstrap:i,finishPasswordBootstrap:a}=await import("./passwordBootstrap-BW7oAKGJ.js");return{startPasswordBootstrap:i,finishPasswordBootstrap:a}},__vite__mapDeps([0,1,2]));let s;try{const i=await n.request({type:"password-parameters"},{timeoutMs:5e3});s=await r(t,String(i.saltHex));const a=await n.request({type:"password-start",startLoginRequest:s.startLoginRequest,origin:location.origin}),c=await o(s,a,{clientIdentity:(await tn()).peerId,origin:location.origin});if(c.serverIdentity!==e.targetPeerId)throw new Ft("IDENTITY_MISMATCH");await n.request({type:"password-finish",attemptId:c.attemptId,finishLoginRequest:c.finishLoginRequest})}catch(i){throw zn(i)}finally{s&&(s.passwordKey=""),n.close()}}async function r2(e){try{const t=se();t&&await Qa(t,e);const n=t||await kf(location.origin,e);return await Yt(n),Response.json({ok:!0})}catch(t){const n=zn(t);return Response.json({error:n.message,code:n.code,retryAfterMs:n.retryAfterMs},{status:n.status})}}async function em(e,t){const n=ze(e),r=(await mt()).find(i=>i.targetPeerId&&Ot({...i,targetPeerId:i.targetPeerId}).includes(n));if(t===void 0&&r?.targetPeerId)try{return await Yt({...r,targetPeerId:r.targetPeerId,serviceName:r.label}),{}}catch(i){if(!(i instanceof jt))throw i}if(t!==void 0){const i=await kf(n,t);if(r?.targetPeerId&&r.targetPeerId!==i.targetPeerId)throw new Error("这台服务的身份已改变。请先移除旧记录,再重新添加。");return await Yt({...i,routes:r?.routes,serviceName:r?.label||i.serviceName}),{}}const o=await Bo(new URL("/api/auth/open/parameters",n).href,{credentials:"omit",cache:"no-store",signal:AbortSignal.timeout(1e4)}).catch(()=>{throw new Error("暂时连不上这台服务,请检查地址和网络后重试。")});if(o.status===403)return{passwordRequired:!0};if(!o.ok)throw new Error("这台服务暂时不可用,请稍后重试。");const{serviceIdentity:s}=await o.json();if(typeof s!="string"||!s)throw new Error("这不是可连接的 Termdock 服务。");if(r?.targetPeerId&&r.targetPeerId!==s)throw new Error("这台服务的身份已改变。请先移除旧记录,再重新添加。");return await Yt({url:n,targetPeerId:s,serviceName:r?.label||new URL(n).host,serviceOrigin:n}),{}}function Qt(e){const t=[...e.routes||[]];if(e.entryServiceId&&e.entryServiceId!==e.targetPeerId&&t.unshift({url:e.url,targetPeerId:e.entryServiceId}),!t.length&&e.routes===void 0)try{const n=JSON.parse(localStorage.getItem(Au)||"null");n&&n.targetPeerId!==e.targetPeerId&&new URL(n.url).host===new URL(e.url).host&&t.push(n)}catch{}return Sw({...e,routes:t})}const Bs=e=>`relay:${e.targetPeerId}:${e.url}`;async function Jv(e){const t=Qt(e),n=new Set(t.map(Bs)),r=[],o=await mt(),s=o.some(i=>i.targetPeerId===e.targetPeerId);for(const i of o)if(!(!i.targetPeerId||i.targetPeerId===e.targetPeerId||!s&&!Qt({...i,targetPeerId:i.targetPeerId}).some(a=>a.targetPeerId===e.targetPeerId)))for(const a of Ot({...i,targetPeerId:i.targetPeerId})){const c={url:a,targetPeerId:i.targetPeerId};n.has(Bs(c))||(n.add(Bs(c)),r.push(c))}return r.slice(0,Math.max(0,Lr-Math.max(e.routes?.length??0,t.length)))}function Ot(e){const t=Qt(e);return Ew({...e,routes:[...t,...e.routes||[]]})}function Ur(e){return YS(e).href}async function Zv(e,t){return Mr({url:Ur(e.url),targetPeerId:e.targetPeerId,identity:await tn(),signal:t?AbortSignal.any([t,AbortSignal.timeout(5e3)]):AbortSignal.timeout(5e3)})}async function bi(e,t,n){const r=await tn(),o=Ot(e).map(c=>({key:`direct:${c}`,run:d=>Mr({url:Ur(c),targetPeerId:e.targetPeerId,identity:r,signal:AbortSignal.any([d,AbortSignal.timeout(8e3),...t?[t]:[]])})})),s=n?[]:await Jv(e);for(const c of[...Qt(e),...s].filter(d=>Ef(e.targetPeerId,d.targetPeerId)))o.push({key:Bs(c),run:async d=>{t&&(d=AbortSignal.any([d,t]));const u=[Re,Pt].find(h=>h&&!h.closed&&h.targetPeerId===c.targetPeerId),f=u||await Zv(c,d);try{if(d.aborted)throw d.reason;const h=await f.request({type:"route-ticket",serviceId:e.targetPeerId},{timeoutMs:5e3}).catch(m=>{throw Uu(m,{targetServiceId:e.targetPeerId,entryServiceId:c.targetPeerId,entryUrl:c.url})});if(d.aborted)throw d.reason;if(typeof h.routeToken!="string")throw new Error("入口未允许此设备连接该服务。");const p=new URL(Ur(c.url));return p.pathname="/api/federation/relay",p.searchParams.set("routeToken",h.routeToken),await Mr({url:p.href,targetPeerId:e.targetPeerId,identity:r,socketFactory:Fv(e.targetPeerId,{entryServiceId:c.targetPeerId,entryUrl:c.url}),signal:AbortSignal.any([d,AbortSignal.timeout(Ku)])})}finally{u||f.close()}}});const i=zv(e.targetPeerId);o.sort((c,d)=>+(d.key===i)-+(c.key===i));const a=await qv(o,c=>c.close(),!1,{signal:t});return n?n.connected(a.key):qd(e.targetPeerId,a.key),a.value}async function o2(e,t){const n=await bi(e,t);try{const o=(await n.request({type:"collaboration-descriptor"},{timeoutMs:5e3})).node;if(o?.serviceId!==e.targetPeerId)throw new Error("PEER_IDENTITY_MISMATCH");return{...o,serviceId:e.targetPeerId}}finally{n.close()}}async function s2(e,t){const n=await bi(e,t),r=()=>n.close();t.addEventListener("abort",r,{once:!0});try{if(t.aborted||(await Kr(n,{timeoutMs:3e3}),t.aborted))throw t.reason;return n}catch(o){throw n.close(),o}finally{t.removeEventListener("abort",r)}}async function Wd(e,t){let n=!1;const r=await bi(e,t,{connected(s){n=s.startsWith("relay:")}}),o=()=>r.close();t?.addEventListener("abort",o,{once:!0});try{if(t?.aborted)throw t.reason;let s=!1;try{await Kr(r),s=!0}catch(i){if(!(i instanceof jt))throw i}if(s&&!n)return"authorized";try{return await r.request({type:"password-parameters"},{timeoutMs:5e3}),s?"authorized":"passwordRequired"}catch(i){if(zn(i).code==="PASSWORD_NOT_CONFIGURED"){if(n)throw new ut("TARGET_PASSWORD_REQUIRED",{targetServiceId:e.targetPeerId,entryServiceId:e.entryServiceId});return"invitationRequired"}throw i}}catch(s){throw Uu(s,{targetServiceId:e.targetPeerId,entryServiceId:e.entryServiceId})}finally{t?.removeEventListener("abort",o),r.close()}}async function Yt(e,t={}){e.entryServiceId&&Fo(e.entryServiceId,e.targetPeerId);const n=Re,r=Pt,o=await tn(),s=ze(e.serviceOrigin||e.url),i=(await mt()).find(E=>E.targetPeerId===e.targetPeerId),a={...e,routes:e.routes??i?.routes};e.routeCode&&e.entryServiceId&&gn.get(e.targetPeerId)?.delete(e.entryServiceId);const c=t.directOnly||Dc(zt.get(e.targetPeerId))?[]:await Jv(a),d=t.directOnly?[]:[...Qt(a),...c].filter(E=>Ef(e.targetPeerId,E.targetPeerId)),u=Ot(a);let f,h,p=e.pairingCode,m="direct";const g=new Set,b=new Map,w=async(E,v)=>{if(n&&!n.closed&&n.targetPeerId===E.targetPeerId)return n;if(r&&!r.closed&&r.targetPeerId===E.targetPeerId)return r;const C=JSON.stringify([E.targetPeerId,E.url]),_=b.get(C);if(_&&!_.closed)return _;const R=await Zv(E,v);return g.add(R),b.set(C,R),R};try{if(e.routeCode&&e.entryServiceId){const T=d.find(L=>L.targetPeerId===e.entryServiceId);if(!T)throw new Error("邀请缺少入口信息。");if((await(await w(T)).request({type:"route-pair",code:e.routeCode})).serviceId!==e.targetPeerId)throw new Error("邀请的目标服务不一致。");e.routeOnly&&await Bn({id:e.targetPeerId,url:s,label:e.serviceName||new URL(s).host,targetPeerId:e.targetPeerId,serviceOrigin:s,routes:d})}const E=[],v=async(T,A)=>{const N=()=>T.close();A.addEventListener("abort",N,{once:!0});try{if(A.aborted||(await Kr(T),A.aborted))throw A.reason}catch(L){throw T.close(),L}finally{A.removeEventListener("abort",N)}};for(const T of u)E.push({key:`direct:${T}`,run:async A=>{const N=await Mr({url:Ur(T),targetPeerId:e.targetPeerId,pairingCode:p,identity:o,signal:AbortSignal.any([A,AbortSignal.timeout(8e3)])});return p=void 0,await v(N,A),{client:N,path:"direct"}}});for(const T of d)E.push({key:`relay:${T.targetPeerId}:${T.url}`,run:async A=>{let N,L;try{if(N=await w(T,A),A.aborted)throw A.reason;const D=await N.request({type:"route-ticket",serviceId:e.targetPeerId},{timeoutMs:5e3}).catch(B=>{throw Uu(B,{targetServiceId:e.targetPeerId,entryServiceId:T.targetPeerId,entryUrl:T.url})});if(A.aborted)throw A.reason;if(typeof D.routeToken!="string"||!D.routeToken)throw new Error("入口未允许此设备连接该服务。");const j=new URL(Ur(T.url));return j.pathname="/api/federation/relay",j.searchParams.set("routeToken",D.routeToken),L=await Mr({url:j.href,targetPeerId:e.targetPeerId,pairingCode:p,identity:o,socketFactory:Fv(e.targetPeerId,{entryServiceId:T.targetPeerId,entryUrl:T.url}),signal:AbortSignal.any([A,AbortSignal.timeout(Ku)])}),p=void 0,await v(L,A),{client:L,entry:N,path:"relay"}}catch(D){L?.close(),N&&N!==r&&N!==n&&N.close();const j=_r(D,{targetServiceId:e.targetPeerId,entryServiceId:T.targetPeerId,entryUrl:T.url});throw j&&Yv(j),j||D}}});const C=zv(e.targetPeerId);E.sort((T,A)=>+(A.key===C)-+(T.key===C));const _=await qv(E,T=>{T.client.close(),T.entry&&T.entry!==n&&T.entry!==r&&T.entry.close()},!!p);if(f=_.value.client,h=_.value.entry,m=_.value.path,t.renewIfCurrent){if(Re!==t.renewIfCurrent||n!==t.renewIfCurrent||n.closed||!n.canSwitchTransport||se()?.targetPeerId!==e.targetPeerId){f.close();for(const T of g)T!==Pt&&T!==Re&&T.close();return Re??n}Re=f,Fr=m,Pt=h,qd(e.targetPeerId,_.key),n.retire();for(const T of new Set([r,...g]))T&&T!==n&&T!==f&&T!==h&&T.close();return window.dispatchEvent(new Event(xt)),f}if(qd(e.targetPeerId,_.key),Re!==n&&Re&&!Re.closed&&Re.targetPeerId===e.targetPeerId){f.close();for(const T of g)T!==Pt&&T.close();return Re}m==="direct"&&new URL(s).host===location.host&&xS(e.targetPeerId);const R=(await mt()).find(T=>T.targetPeerId===e.targetPeerId||!T.targetPeerId&&(T.serviceOrigin||T.url)===s),k=R?.label||e.serviceName||new URL(s).host,x=c.find(T=>Bs(T)===_.key),S=a.routes??Qt(a),I=Ot(a)[0],P={url:I||s,targetPeerId:e.targetPeerId,serviceName:k,...e.viewMode?{viewMode:e.viewMode}:{},...e.viewLayout?{viewLayout:e.viewLayout}:{},...I?{serviceOrigin:I}:{entryServiceId:h?.targetPeerId||e.entryServiceId},routes:x?[...S,x]:S};if(await(t.rememberOnly?XS:Bn)({id:R?.id||e.targetPeerId,...P,label:k}),go!=="unpaired"&&go!==e.targetPeerId&&yn()&&Xa({id:R?.id||e.targetPeerId,...P,label:k})){f.close();for(const T of g)T!==n&&T!==r&&T.close();return n||f}Pu(P),zt.delete(e.targetPeerId),Re=f,Fr=m,Pt=h;for(const T of new Set([n,r,...g]))T&&T!==f&&T!==h&&T.close();return go!==e.targetPeerId?(location.reload(),new Promise(()=>{})):(window.dispatchEvent(new Event(xt)),f)}catch(E){f?.close();for(const v of g)v!==r&&v.close();throw E}}async function i2(){const e=Re,t=se();if(!(t&&zt.has(t.targetPeerId))&&!(ua||da||At||!e?.renewalDue||!e.canSwitchTransport||!t||performance.now()-Qp<3e4)){Qp=performance.now(),ua=!0;try{await Yt(t,{renewIfCurrent:e})}catch(n){console.debug("[connection] renewal deferred",{reason:n instanceof Error?n.message:"unknown"})}finally{ua=!1}}}async function a2(){const e=Re,t=se();if(t&&zt.has(t.targetPeerId)||Date.now()-Zp<6e4||ua||da||Fr!=="relay"||!e||e.closed||!e.canSwitchTransport||!t?.serviceOrigin)return;da=!0,Zp=Date.now();let n;try{for(const o of Ot(t))try{n=await Mr({url:Ur(o),targetPeerId:t.targetPeerId,identity:await tn(),signal:AbortSignal.timeout(3e3)}),await Kr(n);break}catch(s){if(n?.close(),n=void 0,s instanceof jt)throw s}if(!n||Re!==e||!e.canSwitchTransport)return;const r=Pt;Re=n,n=void 0,Pt=void 0,Fr="direct",e.close(),r?.close(),window.dispatchEvent(new Event(xt))}catch(r){r instanceof jt&&Re===e&&(Za(),window.dispatchEvent(new Event("auth:unauthorized")))}finally{n?.close(),da=!1}}function c2(){return Fr}async function Qv(e){return e?(e.throwIfAborted(),new Promise((t,n)=>{const r=()=>n(e.reason);e.addEventListener("abort",r,{once:!0}),Vt().then(o=>{e.removeEventListener("abort",r),e.aborted?n(e.reason):t(o)},o=>{e.removeEventListener("abort",r),n(o)})})):Vt()}async function Vt(){const e=zt.get(se()?.targetPeerId||"");if(e)throw e;if(Re&&!Re.closed){const n=Re;return i2(),n}if(Re=void 0,At)return At;const t=se();if(!t)throw new Error("DEVICE_PAIRING_REQUIRED");return At=Yt(t,{rememberOnly:!0}).catch(n=>{if(Re&&!Re.closed&&Re.targetPeerId===t.targetPeerId)return Re;const r=_r(n,{targetServiceId:t.targetPeerId});throw r?(ei(r),r):n}).finally(()=>{At=void 0}),At}async function tm(){const e=se(),t=zt.get(e?.targetPeerId||"");if(!e||!Dc(t)||!Ot(e).length)throw t||new Error("没有可用的直连地址。");return At||(At=Yt(e,{rememberOnly:!0,directOnly:!0}).then(n=>{if(se()?.targetPeerId!==e.targetPeerId||Re!==n||Fr!=="direct")throw t;return zt.delete(e.targetPeerId),n}).catch(n=>{const r=_r(n,{targetServiceId:e.targetPeerId});throw r?(ei(r),r):n}).finally(()=>{At=void 0}),At)}function Vd(e=se(),t=zt.get(e?.targetPeerId||"")){return e&&Dc(t)&&t?.code!=="RELAY_AUTHORIZATION_REQUIRED"?Ot(e).length>0:!!e&&t?.code==="RELAY_AUTHORIZATION_REQUIRED"&&VS(e,t.context.entryServiceId,gn.get(e.targetPeerId))}async function l2(){const e=se(),t=zt.get(e?.targetPeerId||"");if(!e||!Vd(e,t))throw t||new Error("没有独立的已保存连接路线。");return t?.code!=="RELAY_AUTHORIZATION_REQUIRED"||!Qt(e).filter(r=>Ef(e.targetPeerId,r.targetPeerId)).length?tm():At||(At=Yt(e,{rememberOnly:!0}).catch(r=>{const o=_r(r,{targetServiceId:e.targetPeerId});throw o&&ei(o),o||r}).finally(()=>{At=void 0}),At)}function ex(e){const t=new URL(e,location.href);if(Re&&!Re.closed&&!zt.has(Re.targetPeerId))return Re.openSocket(t.pathname+t.search);let n;const r=new zd(e,o=>n?.send(o),()=>n?.close(),()=>n?.bufferedAmount??0);return Vt().then(o=>{r.readyState!==3&&(n=o.openSocket(t.pathname+t.search),r.getConnectionDiagnostics=()=>{const s=n?.getConnectionDiagnostics?.();return s?{...s,socketOpenMs:r.openedAfterMs}:void 0},n.onopen=()=>r.accept({type:"ws-ready",id:""}),n.onmessage=s=>r.accept({type:"ws-data",id:"",data:s.data}),n.onclose=s=>r.accept({type:"ws-close",id:"",code:s.code,reason:s.reason}),n.onerror=()=>r.fail(new Error("Encrypted connection unavailable")))}).catch(o=>r.fail(o)),r}function d2(){HA(Vt),window.fetch=async(e,t)=>{const n=new URL(e instanceof Request?e.url:String(e),location.href);if(!n.pathname.startsWith("/api/"))return Bo(e,t);if(n.origin!==location.origin)throw new Error("Remote business API requires a paired encrypted service");if(n.pathname==="/api/meta")return Bo(e,t);if(n.pathname==="/api/auth/status"){if(!se()){const s=await Xv();return Response.json({enabled:s.enabled,authenticated:!1})}try{const s=await Kr(await Vt());return Response.json({enabled:s.grants.length>0,authenticated:!0})}catch(s){if(s instanceof jt)return Response.json({enabled:!0,authenticated:!1});throw s}}if(n.pathname==="/api/auth/login"){const i=await new Request(e instanceof Request?e:n.href,t).json();return r2(typeof i.password=="string"?i.password:"")}if(n.pathname==="/api/csrf-token")return Response.json({csrfToken:"encrypted-device-channel"});if(n.pathname==="/api/auth/logout")return Re&&!Re.closed&&await Re.request({type:"logout"}),Re?.close(),Pt?.close(),Re=void 0,Pt=void 0,vS(),location.reload(),Response.json({ok:!0});const r=t?.signal!==void 0?t.signal:e instanceof Request?e.signal:void 0,o=await Qv(r);return e instanceof Request?o.fetch(e,t):o.fetch(n.pathname+n.search,t)}}function Fo(e,t){if(e===t)throw new ut("RELAY_SELF_TARGET",{entryServiceId:e,targetServiceId:t})}async function Go(e,t){const n=ze(e.url),r=[Re,Pt].find(c=>c&&!c.closed&&c.targetPeerId===e.targetPeerId);if(r)return{client:r,route:{...e,url:n},release(){}};const o=t??(await mt()).find(c=>c.targetPeerId===e.targetPeerId),s=[...o?.routes??[]];o?.targetPeerId&&ze(o.serviceOrigin||o.url)!==n&&s.push({url:o.serviceOrigin||o.url,targetPeerId:e.targetPeerId});let i={...e,url:n};const a=await bi({url:n,targetPeerId:e.targetPeerId,routes:s},AbortSignal.timeout(15e3),{connected(c){c.startsWith("direct:")&&(i={...e,url:c.slice(7)})}});return{client:a,route:i,release(){a.close()}}}async function u2(e){if(!e.targetPeerId)throw new Error("请先连接这台服务,再查看可中转的服务。");const t=await Go({url:e.serviceOrigin||e.url,targetPeerId:e.targetPeerId},e);try{const n=await t.client.request({type:"route-targets"},{timeoutMs:5e3});if(!Array.isArray(n.items))throw new Error("入口服务需要更新后才能查看中转列表。");const r=new Set,o=n.items.filter(s=>!s||typeof s.serviceId!="string"||!s.serviceId||s.serviceId===t.client.targetPeerId||r.has(s.serviceId)?!1:(r.add(s.serviceId),!0));return{route:t.route,canManage:n.canManage===!0,items:o}}catch(n){throw n instanceof Error&&/UNKNOWN|UNSUPPORTED/i.test(n.message)?new Error("入口服务需要更新后才能查看中转列表。",{cause:n}):n}finally{t.release()}}async function f2(e,t){Fo(e.targetPeerId,t);const n=await Go(e),r=n.client;try{Fo(r.targetPeerId,t);const o=await r.request({type:"route-targets"},{timeoutMs:5e3}),s=(Array.isArray(o.items)?o.items:[]).find(u=>u.serviceId===t);if(!s)throw new Error("该服务已不可见,请刷新列表或请入口管理员授权。");if(!s.available)throw new Error(gr(s));const i=(await mt()).find(u=>u.targetPeerId===s.serviceId),a=[e,...(i?.routes||[]).filter(u=>u.targetPeerId!==e.targetPeerId||ze(u.url)!==ze(e.url))];if(a.length>Lr)throw new Error(`这台服务已保存 ${Lr} 个备用连接,请先移除一个后重试。`);if(!s.authorized){if(!o.canManage)throw new Error("请先让入口管理员授权此设备。");await r.request({type:"route-grant",serviceId:s.serviceId,subjectId:(await tn()).peerId})}gn.get(t)?.delete(e.targetPeerId);const d=(i?Ot({...i,targetPeerId:s.serviceId})[0]:void 0)||(s.url&&ze(s.url)!==ze(e.url)?s.url:void 0);return{url:d||e.url,...d?{serviceOrigin:d}:{entryServiceId:e.targetPeerId},targetPeerId:s.serviceId,serviceName:i?.label||Nw(s),routes:a}}finally{n.release()}}async function Cl(e,t){Fo(e.targetPeerId,t);const n=await Go(e),r=n.client;try{const o=await r.request({type:"route-access"},{timeoutMs:5e3}),s=(await tn()).peerId;return{canManage:o.canManage===!0,grants:(Array.isArray(o.grants)?o.grants:[]).filter(i=>i.subjectId===s&&i.targetServiceId===t)}}finally{n.release()}}async function nm(e,t,n){if(Fo(t.targetPeerId,e.targetPeerId),n!==void 0&&(await kf(ze(t.url),n)).targetPeerId!==t.targetPeerId)throw new Error("入口服务的身份已改变,请重新连接并确认。");const r=await Go(t),o=r.client;try{await o.request({type:"route-grant",serviceId:e.targetPeerId,subjectId:(await tn()).peerId,url:ze(e.serviceOrigin||e.url)}),gn.get(e.targetPeerId)?.delete(t.targetPeerId)}finally{r.release()}}async function h2(e,t){const n=await Go(t),r=n.client;try{const o=await r.request({type:"route-access"},{timeoutMs:5e3}),s=(await tn()).peerId,i=(Array.isArray(o.grants)?o.grants:[]).filter(a=>a.subjectId===s&&a.targetServiceId===e&&a.active);for(const a of i)await r.request({type:"route-revoke",grantId:a.id})}finally{n.release()}}async function tx(e,t){Fo(t.targetPeerId,e.targetPeerId);const n=await Go(t),r=n.client;try{const o=await r.request({type:"route-invite-create",serviceId:e.targetPeerId});if(typeof o.routeCode!="string"||typeof o.expiresAt!="number")throw new Error("暂时无法生成备用连接邀请。");return{routeCode:o.routeCode,expiresAt:o.expiresAt}}finally{n.release()}}async function fa(e,t){const n=(await mt()).find(o=>o.id===e.id||e.targetPeerId&&o.targetPeerId===e.targetPeerId)||e;await Bn({...n,url:n.serviceOrigin||n.url,entryServiceId:void 0,routes:t});const r=se();r&&r.targetPeerId===e.targetPeerId&&Pu({...r,url:r.serviceOrigin||r.url,entryServiceId:void 0,routes:t})}async function p2(e,t){const n=e.targetPeerId;if(!n)throw new Error("请先连接这台服务,再添加备用地址。");let r;try{r=ze(t)}catch{throw new Error("请输入有效的 HTTPS 地址,例如 https://电脑地址:9834。")}const o=new URL(r);if(o.protocol!=="https:"&&!["localhost","127.0.0.1","[::1]"].includes(o.hostname))throw new Error("备用地址需要 HTTPS,请使用服务的 HTTPS 地址。");const s=async()=>(await mt()).find(c=>c.targetPeerId===n)||e,i=c=>{const d=c.routes??Qt({...c,targetPeerId:n});if(ze(c.serviceOrigin||c.url)===r||d.some(u=>ze(u.url)===r))throw new Error("这个地址已经在连接列表中。");if(d.length>=Lr)throw new Error(`最多保存 ${Lr} 个备用地址或入口,请先移除不再使用的连接。`);return[...d,{url:r,targetPeerId:n}]};i(await s());let a;try{try{a=await Mr({url:Ur(r),targetPeerId:n,identity:await tn(),signal:AbortSignal.timeout(5e3)}),await Kr(a)}catch(u){throw u instanceof jt?new Error("这台服务尚未授权当前设备,请先恢复设备授权。"):new Error("无法验证这个地址。请确认能访问该地址、HTTPS 证书受信任,且运行的是同一台 Termdock 服务。")}const c=await s(),d=i(c);if(await fa(c,d),se()?.targetPeerId===n&&go===n&&(!Re||Re.closed)){const u=Re,f=Pt;Re=a,a=void 0,Pt=void 0,Fr="direct",u?.close(),f?.close(),window.dispatchEvent(new Event(xt))}return d}finally{a?.close()}}async function rm(e,t){await Qa(e,t),await Yt({...e,pairingCode:void 0,routeCode:void 0})}const kn=new Map,or=new Map,m2=32*1024*1024,g2=8*1024*1024,y2=48;let ks=0,Yd=0;function If(){Yd+=1,kn.clear(),ks=0;for(const e of or.values())e.controller.abort();or.clear()}typeof window<"u"&&window.addEventListener("auth:unauthorized",If);function w2(e,t){const n=kn.get(e);if(n&&(ks-=n.blob.size,kn.delete(e)),!(t.blob.size>g2))for(kn.set(e,t),ks+=t.blob.size;kn.size>y2||ks>m2;){const r=kn.keys().next().value;ks-=kn.get(r).blob.size,kn.delete(r)}}async function nx(e,t={}){const n=new URL(e,typeof location<"u"?location.origin:"http://localhost");if(!/^\/api\/terminal\/fs\/(read|blob)$/.test(n.pathname))return fetch(e,{signal:t.signal});if(t.signal?.aborted)throw t.signal.reason??new DOMException("Aborted","AbortError");n.searchParams.delete("requestSlotId"),n.searchParams.delete("action"),n.searchParams.sort();const r=n.href;let o=or.get(r);if(!o){const i=new AbortController,a=Yd,c=kn.get(r),d=new Headers,u=c?.headers.get("ETag");u&&d.set("If-None-Match",u);const f=setTimeout(()=>i.abort(new DOMException("File preview timed out. Please retry.","TimeoutError")),t.timeoutMs??15e3),h={controller:i,readers:0,promise:Promise.resolve(null)};h.promise=(async()=>{const p=await fetch(r,{headers:d,signal:i.signal,cache:"no-cache"});let m;return p.status===304&&c?m=c:m={blob:await p.blob(),headers:new Headers(p.headers),status:p.status},Yd===a&&!i.signal.aborted&&m.status===200&&m.headers.has("ETag")&&w2(r,m),p.status===401&&If(),m})().finally(()=>{clearTimeout(f),or.get(r)===h&&or.delete(r)}),o=h,or.set(r,o)}const s=o;return s.readers+=1,new Promise((i,a)=>{let c=!1;const d=()=>c?!1:(c=!0,t.signal?.removeEventListener("abort",u),s.readers-=1,s.readers===0&&or.get(r)===s&&(or.delete(r),s.controller.abort()),!0),u=()=>{d()&&a(t.signal?.reason??new DOMException("Aborted","AbortError"))};if(t.signal?.addEventListener("abort",u,{once:!0}),t.signal?.aborted){u();return}s.promise.then(f=>{d()&&i(new Response(f.blob,{status:f.status,headers:f.headers}))},f=>{d()&&a(f)})})}const Cf="auth:unauthorized";let mo=null;class $e extends Error{constructor(t,n,r){super(t),this.status=n,this.code=r,this.name="TerminalApiError"}status;code}class Hr extends Error{code="TERMINAL_INPUT_REJECTED";constructor(t){super(t),this.name="TerminalInputError"}}async function rx(){const e=await fetch("/api/terminal/update");if(!e.ok)throw new $e("Failed to load update state",e.status);return e.json()}async function b2(){const e=await Se(),t=await fetch("/api/terminal/update/check",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new $e("Failed to check for updates",t.status);return t.json()}async function v2(e,t){if(e&&!e())throw new $e("Update confirmation expired");const n=await Se();if(e&&!e())throw new $e("Update confirmation expired");const r=await fetch("/api/terminal/update/restart",{method:"POST",headers:{"X-XSRF-TOKEN":n,...t===void 0?{}:{"Content-Type":"application/json"}},...t===void 0?{}:{body:JSON.stringify({version:t})}});if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to restart Termdock"}));if(r.status===409){if(e&&!e())throw new $e("Update confirmation expired");if(o.code==="UPDATE_STATE_CHANGED"&&o.state){if(o.state.status==="error")throw new $e(o.state.error||o.error,r.status);return o.state}if(!o.code){const s=await rx().catch(()=>null);if(e&&!e())throw new $e("Update confirmation expired");if(s&&s.status!=="error"&&(s.status!=="ready"||t!==void 0&&s.latestVersion!==t))return s}}throw new $e(o.error||"Failed to restart Termdock",r.status)}return r.json()}async function x2(){const e=await Se(),t=await fetch("/api/terminal/server-health/enable-supervision",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new $e("Failed to enable automatic recovery",t.status)}async function S2(){const e=await fetch("/api/terminal/server-health");if(!e.ok)throw new $e("Failed to load server health",e.status);return e.json()}async function E2(){const e=await Se(),t=await fetch("/api/terminal/server-health/dismiss",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new $e("Failed to dismiss server health",t.status);return t.json()}async function k2(){const e=await fetch("/api/terminal/quota");if(!e.ok)throw new $e("Failed to fetch quota",e.status);return e.json()}async function I2(){const e=await Se(),t=await fetch("/api/terminal/quota/refresh",{method:"POST",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new $e("Failed to refresh quota",t.status);return t.json()}const Gr=8e3,ox=6e4,C2=32e3,sx=125e3,jn=1e4,R2=65e3,To=45e3,T2=18e4,ix=8e3,ax=8e3,cx=15e3,A2=1e4,Uo=5e3;let P2=0;const ha=[];let Rl=!1;function En(e,t={}){if(typeof window>"u")return;const n=JSON.stringify({level:e==="error"||e==="timeout_or_abort"||e==="response_body_timeout"||e==="response_body_parse_error"?"warn":"info",message:`DIFF_API ${e}`,data:{seq:++P2,ts:Date.now(),...t}});ha.push(n),N2()}async function N2(){if(!Rl){Rl=!0;try{for(;ha.length>0;){const e=ha[0];try{await fetch("/api/client-log",{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}),ha.shift()}catch{break}}}finally{Rl=!1}}}function Rf(e,t,n){const r=new AbortController;let o=setTimeout(()=>{r.abort(new DOMException(n,"TimeoutError"))},t);const s=()=>r.abort(e?.reason);return e&&(e.aborted?s():e.addEventListener("abort",s,{once:!0})),{signal:r.signal,cleanup:()=>{o&&(clearTimeout(o),o=null),e?.removeEventListener("abort",s)}}}async function st(e,t,n,r){const{signal:o,cleanup:s}=Rf(t?.signal??void 0,n,r);try{return await fetch(e,{...t,signal:o})}catch(i){throw i instanceof DOMException&&i.name==="TimeoutError"?new Error(r):i}finally{s()}}async function lx(e,t,n){let r=null;const o=new Promise((s,i)=>{r=setTimeout(()=>i(new Error(n)),t)});try{return await Promise.race([e.text(),o])}finally{r&&clearTimeout(r)}}async function Ho(e,t,n){const r=await lx(e,t,n);return JSON.parse(r)}if(typeof window<"u"&&!window.__termdockFetchPatched){window.__termdockFetchPatched=!0;const e=window.fetch.bind(window);window.fetch=async(...t)=>{const n=await e(...t);if(n.status===401){mo=null,xi();try{window.dispatchEvent(new CustomEvent(Cf))}catch{}}return n}}async function Se(){if(mo)return mo;const e=await st("/api/csrf-token",void 0,ix,"CSRF token request timed out");if(!e.ok)throw new Error("Failed to get CSRF token");const t=await Ho(e,Uo,"CSRF token response timed out");if(!t.csrfToken)throw new Error("Invalid CSRF token response");return mo=t.csrfToken,mo}function Tf(){xi(),mo=null}const _2=2e4,om=8e3,dx=1500,ux=dx,ot=new Map,Af=new Map;function L2(e){return KS(ot.get(e)?.ws)}const D2=24,j2=40,O2=40,M2=1024*1024,B2=1024*1024,F2=2*1024*1024,U2=36,fx=50,H2=1e3,$2=20,hx=new TextEncoder;function px(e){return e.items.length-e.head}function sm(e){e.head===e.items.length?(e.items.length=0,e.head=0):e.head>=64&&e.head*2>=e.items.length&&(e.items.splice(0,e.head),e.head=0)}function z2(e){const t=JSON.stringify({id:"0".repeat(U2),type:"ws-data",data:e});return hx.encode(t).byteLength<=F2}function q2(e){return typeof e=="object"&&e!==null&&e.code==="PACKET_QUEUE_BACKPRESSURE"}function Tl(e,t){const n=t instanceof Hr?t:new Hr(t.message),r=e.pendingInputs;r.items.length=0,r.head=0,r.bytes=0,e.inputFlushTimer&&(clearTimeout(e.inputFlushTimer),e.inputFlushTimer=null);try{e.onError?.(n,!0)}finally{e.disconnect()}return n}function K2(e){const t=px(e.pendingInputs);return e.retryState.retryCount>=2||t>=O2?"congested":e.retryState.retryCount>=1||t>=8?"degraded":"good"}function im(e){const t=e.pendingInputs;if(!(px(t)===0||e.ws.readyState!==WebSocket.OPEN))for(;t.head<t.items.length;){const n=t.items[t.head];if(!n){t.head++,sm(t);continue}if(n.requiresCopyModeExit&&e.copyModeInput!==!0)return e.copyModeInput===void 0?void 0:Tl(e,new Hr("The reconnected server cannot safely resume this input; please type it again"));try{e.ws.send(n.message)}catch(r){if(!q2(r))return Tl(e,r instanceof Error?r:new Error(String(r)));if(e.inputRetryAttempts++,e.inputRetryAttempts>=$2)return Tl(e,new Hr("Terminal input was not accepted after repeated encrypted-channel backpressure"));const o=e.inputRetryDelayMs;e.inputRetryDelayMs=Math.min(H2,o*2),!e.inputFlushTimer&&!e.retryState.isClosed&&(e.inputFlushTimer=setTimeout(()=>{e.inputFlushTimer=null,ec(e)},o));return}t.bytes-=n.bytes,t.items[t.head]=void 0,t.head++,sm(t),e.inputRetryDelayMs=fx,e.inputRetryAttempts=0}}function ec(e){if(e.ws.readyState!==WebSocket.OPEN||e.inputFlushTimer)return;const t=K2(e);if(t==="good")return im(e);const n=t==="congested"?j2:D2;e.inputFlushTimer=setTimeout(()=>{e.inputFlushTimer=null,im(e)},n)}const Fs=new Map;function G2(e,t,n,r,o,s){const i=Fs.get(e);!i||i.connection!==s||(Fs.delete(e),t?i.resolve({success:!0,layout:n,selection:o}):i.reject(new Error(r||"Tmux action failed")))}const ho=new Map;function W2(e,t,n,r){const s=`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/api/terminal/${e}/ws`,i=new URLSearchParams({flow:"2",transport:"tmux-client",active:Af.get(e)===!1?"0":"1"});t>0&&i.set("since",String(t)),n&&i.set("epoch",n);const a=r===void 0?ho.get(e):r;return a&&(i.set("cols",String(a.cols)),i.set("rows",String(a.rows))),`${s}?${i}`}const Xd=new Map,Jd=new Map;function V2(e,t,n){Xd.set(e,t),Jd.set(e,n)}function Y2(e){const t=ot.get(e);return t?.streamEpoch&&t.appliedSeq===t.lastSeq&&t.lastSeq>0?{seq:t.lastSeq,epoch:t.streamEpoch}:null}async function X2(e){const t=await Se(),n=await fetch("/api/terminal/create",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify({cols:e.cols||80,rows:e.rows||24,mode:e.mode||"shell",tmuxSessionName:e.tmuxSessionName,cwd:e.cwd,termType:e.termType})});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to create terminal"}));throw new Error(r.error||"Failed to create terminal session")}return n.json()}function J2(e,t,n,r={}){const{maxRetries:o=10,initialRetryDelay:s=1e3,maxRetryDelay:i=2e4,connectionTimeout:a=15e3}=r,c={maxRetries:o,initialDelayMs:s,maxDelayMs:i,connectionTimeoutMs:a,retryCount:0,retryTimeout:null,connectionTimeoutId:null,isClosed:!1,isSuspended:!1};let d=null,u=Xd.get(e)??0,f=Jd.get(e);Jd.delete(e),Xd.delete(e);const h={items:[],head:0,bytes:0};let p=!1,m=null;const g=new WeakSet,b=()=>{c.retryTimeout&&(clearTimeout(c.retryTimeout),c.retryTimeout=null),c.connectionTimeoutId&&(clearTimeout(c.connectionTimeoutId),c.connectionTimeoutId=null),m&&(clearTimeout(m),m=null)},w=R=>{R.wakeProbe&&(clearTimeout(R.wakeProbe.timer),R.wakeProbe=void 0),R.heartbeatTimer&&(clearInterval(R.heartbeatTimer),R.heartbeatTimer=null),R.pongTimer&&(clearTimeout(R.pongTimer),R.pongTimer=null),R.inputFlushTimer&&(clearTimeout(R.inputFlushTimer),R.inputFlushTimer=null)},E=R=>{w(R),R.heartbeatTimer=setInterval(()=>{if(R.ws.readyState===WebSocket.OPEN){try{R.ws.send(JSON.stringify({type:"ping"}))}catch{}R.pongTimer&&clearTimeout(R.pongTimer),R.pongTimer=setTimeout(()=>{if(Date.now()-R.lastInboundAt>=om){p=!0,w(R);try{R.ws.close()}catch{}_(new Error("WebSocket heartbeat timeout"),!1)}},om)}},_2)},v=()=>{if(c.isClosed=!0,b(),h.items.length=0,h.head=0,h.bytes=0,d){w(d),ot.delete(e);try{d.ws.close()}catch{}d=null}},C=()=>{if(c.isClosed)return;if(d){g.add(d.ws),w(d);try{d.ws.close()}catch{}}const R=W2(e,u,f,r.getDimensions?.()),k=ex(R);p=!1,c.connectionTimeoutId=setTimeout(()=>{k.readyState!==WebSocket.OPEN&&(p=!0,k.close(),_(new Error("WebSocket connection timeout"),!1))},a);const x={ws:k,onEvent:t,onError:n,disconnect:v,reconnectNow:S=>{if(!c.isClosed&&(c.isSuspended=!1,!m)){if(b(),d){g.add(d.ws),w(d);try{d.ws.close()}catch{}}S?.silent||t({type:"reconnecting",attempt:Math.min(c.retryCount+1,o),maxAttempts:o}),c.retryCount=Math.min(c.retryCount+1,o),p=!0,m=setTimeout(()=>{m=null,p=!1,C()},0)}},suspendReconnect:()=>{c.isClosed||(c.isSuspended=!0,c.retryTimeout&&(clearTimeout(c.retryTimeout),c.retryTimeout=null))},retryState:c,lastSeq:u,pendingInputs:h,inputRetryDelayMs:fx,inputRetryAttempts:0,inputFlushTimer:null,heartbeatTimer:null,pongTimer:null,lastInboundAt:Date.now(),inboundSequence:0};k.onopen=()=>{c.isClosed||g.has(k)||p||(b(),c.retryCount=0,x.lastInboundAt=Date.now(),x.inboundSequence+=1,E(x),ec(x))},k.onmessage=S=>{if(!(c.isClosed||g.has(k)||p)){x.lastInboundAt=Date.now(),x.inboundSequence+=1;try{const I=JSON.parse(S.data);if(x.wakeProbe&&ot.get(e)===x){const T=x.wakeProbe;x.wakeProbe=void 0,clearTimeout(T.timer);for(const A of T.listeners)A()}if(I.type==="pong"){qS(k,I.qualityProbeId,I.handlerMs),x.pongTimer&&(clearTimeout(x.pongTimer),x.pongTimer=null);return}if(I.type==="tmux-result"&&I.reqId){G2(I.reqId,I.success!==!1,I.layout,I.error,I.selection,k);return}if(I.type==="tmux-layout"&&I.layout){t({type:"tmux-layout",layout:I.layout});return}if(I.type==="tmux-screen-sync"&&Array.isArray(I.chunks)){t({type:"tmux-screen-sync",chunks:I.chunks.filter(T=>typeof T=="string"),cols:typeof I.cols=="number"?I.cols:void 0,rows:typeof I.rows=="number"?I.rows:void 0,generation:typeof I.generation=="number"?I.generation:void 0});return}if(I.type==="active-program"){t({type:"active-program",activeProgram:I.activeProgram,activeProgramRaw:I.activeProgramRaw,activeProgramSource:I.activeProgramSource});return}if(I.type==="cwd"){t({type:"cwd",cwd:I.cwd});return}if(I.type==="agent-status"){t({type:"agent-status",agentStatus:I.agentStatus??null,agentIndicator:I.agentIndicator??null,agentStatusDetail:I.agentStatusDetail??null,agent:I.agent??null,agentMessage:I.agentMessage??null,agentNativeSessionId:I.agentNativeSessionId??null,agentResumeRecovered:I.agentResumeRecovered===!0,agentRich:I.agentRich===!0,agentActivity:typeof I.agentActivity=="number"?I.agentActivity:0,agentCwd:I.agentCwd??null,reviewed:typeof I.reviewed=="boolean"?I.reviewed:null});return}if(I.type==="git-status"){t({type:"git-status",gitStatus:I.gitStatus??null});return}if(I.type==="quota-status"&&Array.isArray(I.providers)){window.dispatchEvent(new CustomEvent("termdock:quota-update",{detail:I.providers}));return}if(I.type==="focus-mode"){t({type:"focus-mode",focusTrackingRequested:I.focusTrackingRequested===!0});return}if(I.type==="resize-ack"){t({type:"resize-ack",seq:typeof I.seq=="number"?I.seq:void 0,cols:typeof I.cols=="number"?I.cols:void 0,rows:typeof I.rows=="number"?I.rows:void 0,ok:I.ok!==!1,error:typeof I.error=="string"?I.error:void 0,screenSyncPending:I.screenSyncPending===!0,screenSyncGeneration:typeof I.screenSyncGeneration=="number"?I.screenSyncGeneration:void 0});return}if(I.type==="pty-size"){t({type:"pty-size",cols:typeof I.cols=="number"?I.cols:void 0,rows:typeof I.rows=="number"?I.rows:void 0,source:typeof I.source=="string"?I.source:void 0});return}if(I.type==="shell-title"){t({type:"shell-title",title:typeof I.title=="string"?I.title:""});return}if(I.type==="prompt-state"){t({type:"prompt-state",state:I.state==="running"?"running":"idle",exitCode:typeof I.exitCode=="number"?I.exitCode:void 0});return}const P=I;if(P.type==="connected"){if(x.appliedSeq=void 0,f=P.streamEpoch,x.streamEpoch=f,x.outputProtocol=P.outputProtocol,x.copyModeInput=P.copyModeInput===!0,ec(x))return;typeof P.replayLastSeq=="number"&&P.replayLastSeq>=0&&(u=P.replayLastSeq,x.lastSeq=u),t(P),gx(e,Af.get(e)??!0);return}if(P.type==="exit"){v(),t(P);return}if(P.type==="data"){if(x.appliedSeq=void 0,typeof P.seq=="number"&&P.seq<=u)return;typeof P.flowSeq=="number"&&(x.flowSeq=P.flowSeq)}t(P),P.type==="data"&&typeof P.seq=="number"&&Number.isFinite(P.seq)&&P.seq>u&&(u=P.seq,x.lastSeq=u)}catch(I){n?.(I,!1)}}},k.onerror=()=>{c.isClosed||g.has(k)||p||(b(),w(x),p||(p=!0,_(new Error("WebSocket connection error"),!1)))},k.onclose=S=>{if(!(c.isClosed||g.has(k)||p)){if(S.code===Hd&&S.reason===$d){x.reconnectNow({silent:!0});return}if(b(),w(x),p=!0,S.code===4001){console.warn("[Terminal] WS 4001: Session not found on server",{code:S.code,reason:S.reason,stack:new Error().stack}),_(new Error("Session not found on server"),!0);return}if(S.code===4003||S.code===4401){try{window.dispatchEvent(new CustomEvent(Cf))}catch{}_(new Error("Authentication required"),!0);return}_(new Error("WebSocket connection closed"),!1)}},d=x,ot.set(e,d)},_=(R,k)=>{if(!c.isClosed)if(k)n?.(R,!0),v();else{c.retryCount=Math.min(c.retryCount+1,Math.max(1,o));const x=Math.min(s*Math.pow(2,c.retryCount-1),i);if(t({type:"reconnecting",attempt:c.retryCount,maxAttempts:o}),c.isSuspended)return;c.retryTimeout=setTimeout(()=>{c.isClosed||C()},x)}};return C(),v}function mx(e,t,n=!1){const r=JSON.stringify({type:"input",data:t,...n?{exitCopyMode:!0}:{}}),o=hx.encode(r).byteLength;if(o>M2||!z2(r))throw new Hr("Terminal input exceeds the encrypted socket frame limit");const s=e.pendingInputs;if(s.bytes+o>B2)throw new Hr("Terminal input queue is full; retry after the connection recovers");if(s.items.push({message:r,bytes:o,...n?{requiresCopyModeExit:!0}:{}}),s.bytes+=o,e.ws.readyState===WebSocket.OPEN){const i=ec(e);if(i)throw i}}function Z2(e,t){const n=ot.get(e);return!n||n.ws.readyState!==WebSocket.OPEN||n.copyModeInput!==!0?!1:(mx(n,t,!0),!0)}async function Q2(e,t,n){const r=await Se(),o=await fetch(`/api/terminal/${encodeURIComponent(e)}/agent-launch`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify({command:t,idempotencyKey:n})});if(!o.ok){const s=await o.json().catch(()=>({}));throw new $e(s.error||"Could not prepare the original conversation for recovery",o.status,s.code)}}async function eP(e,t){const n=ot.get(e);if(n&&(n.ws.readyState===WebSocket.OPEN||n.ws.readyState===WebSocket.CONNECTING)){mx(n,t);return}const r=await Se(),o=await fetch(`/api/terminal/${e}/input`,{method:"POST",headers:{"Content-Type":"text/plain","X-XSRF-TOKEN":r},body:t});if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to send input"}));throw new $e(s.error||"Failed to send terminal input",o.status,s.code)}}function tP(e,t,n={}){const r=ot.get(e);if(!r)return!1;if(r.retryState.isSuspended=!1,r.ws.readyState!==WebSocket.OPEN)return r.reconnectNow(),!0;const o=n.visible?ux:dx,s=Date.now()+o,i=r.wakeProbe,a=i?.listeners??new Set;if(t&&a.add(t),i&&i.deadline<=s)return!0;i&&clearTimeout(i.timer);const c=setTimeout(()=>{ot.get(e)!==r||r.retryState.isClosed||(r.wakeProbe=void 0,r.reconnectNow())},o);if(r.wakeProbe={timer:c,listeners:a,deadline:s},i)return!0;try{r.ws.send(JSON.stringify({type:"ping"}))}catch{clearTimeout(c),r.wakeProbe=void 0,r.reconnectNow()}return!0}function nP(e){const t=ot.get(e);return t?(t.reconnectNow(),!0):!1}function rP(){for(const e of ot.values())e.suspendReconnect()}function oP(e,t,n){const r=ot.get(e);if(!(!r||r.ws.readyState!==WebSocket.OPEN))try{r.ws.send(JSON.stringify({type:"focus",focused:t,reason:n}))}catch{}}function gx(e,t){Af.set(e,t);const n=ot.get(e);!n||n.ws.readyState!==WebSocket.OPEN||n.outputProtocol!==2||n.ws.send(JSON.stringify({type:"output-subscription",active:t,since:n.lastSeq,epoch:n.streamEpoch}))}function sP(e){const t=ot.get(e);!t||t.ws.readyState!==WebSocket.OPEN||t.outputProtocol!==2||(t.appliedSeq=t.lastSeq,!(!t.flowSeq||t.flowSeq===t.acknowledgedFlowSeq)&&(t.acknowledgedFlowSeq=t.flowSeq,t.ws.send(JSON.stringify({type:"output-ack",flowSeq:t.flowSeq,since:t.appliedSeq,epoch:t.streamEpoch}))))}function iP(e,t,n){const r=ot.get(e);if(!(!r||r.ws.readyState!==WebSocket.OPEN))try{r.ws.send(JSON.stringify({type:"viewing",viewing:t,reason:n}))}catch{}}function yx(e){const t=ot.get(e);if(!(!t||t.ws.readyState!==WebSocket.OPEN))try{t.ws.send(JSON.stringify({type:"agent-review-ack"}))}catch{}}function aP(e,t,n){const r=ot.get(e);if(!(!r||r.ws.readyState!==WebSocket.OPEN))try{r.ws.send(JSON.stringify({type:"flow-control",paused:t,reason:n}))}catch{}}async function cP(e,t,n,r){Number.isFinite(t)&&Number.isFinite(n)&&t>=1&&n>=1&&(ho.delete(e),ho.set(e,{cols:Math.floor(t),rows:Math.floor(n)}),ho.size>256&&ho.delete(ho.keys().next().value));const o=ot.get(e);if(o&&o.ws.readyState===WebSocket.OPEN)try{o.ws.send(JSON.stringify({type:"resize",cols:t,rows:n,seq:r}));return}catch{}const s=await Se(),i=await fetch(`/api/terminal/${e}/resize`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":s},body:JSON.stringify({cols:t,rows:n,seq:r})});if(!i.ok){const c=await i.json().catch(()=>({error:"Failed to resize terminal"}));throw new Error(c.error||"Failed to resize terminal")}const a=await i.json().catch(()=>({success:!0}));if(a?.success===!1||a?.ok===!1)throw new Error(a?.error||"Failed to resize terminal")}async function wx(e,t){const n=ot.get(e);if(n&&n.ws.readyState===WebSocket.OPEN)return t.action==="scroll"?(n.ws.send(JSON.stringify({type:"tmux",...t})),{success:!0}):new Promise((s,i)=>{const a=Math.random().toString(36).substring(7);Fs.set(a,{resolve:s,reject:i,connection:n.ws}),n.ws.send(JSON.stringify({type:"tmux",reqId:a,...t})),setTimeout(()=>{Fs.has(a)&&(Fs.delete(a),i(new Error("Tmux action timed out")))},3e4)});const r=await Se(),o=await fetch(`/api/terminal/${e}/tmux`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify(t)});if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to execute tmux action"}));throw new $e(s.error||"Failed to execute tmux action",o.status,s.code)}return o.json()}async function lP(e){const t=await Se(),n=await fetch(`/api/terminal/${e}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":t}});if(!n.ok&&n.status!==404){const o=await n.json().catch(()=>({error:"Failed to close terminal"}));throw new Error(o.error||"Failed to close terminal")}ot.get(e)?.disconnect()}async function dP(e,t){const n=ot.get(e);if(n){n.retryState.isClosed=!0;try{n.ws.close()}catch{}ot.delete(e)}const r=await Se(),o=await fetch(`/api/terminal/${e}/restart`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify({...t.cwd?{cwd:t.cwd}:{},cols:t.cols??80,rows:t.rows??24,mode:t.mode,tmuxSessionName:t.tmuxSessionName})});if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to restart terminal"}));throw new Error(s.error||"Failed to restart terminal session")}return o.json()}async function uP(e){const t=await st(`/api/terminal/${e}/health`,{method:"GET"},ax,"Terminal health check timed out");if(!t.ok){if(t.status===404)return{healthy:!1,sessionId:e};const n=await Ho(t,Uo,"Terminal health error response timed out").catch(()=>({error:"Failed to check terminal health"}));throw new Error(n.error||"Failed to check terminal health")}return Ho(t,Uo,"Terminal health response timed out")}async function fP(e){const t=await Se(),n=await st("/api/terminal/force-kill",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)},A2,"Terminal force-kill request timed out");if(!n.ok){const r=await Ho(n,Uo,"Terminal force-kill error response timed out").catch(()=>({error:"Failed to force kill terminal"}));throw new Error(r.error||"Failed to force kill terminal")}}async function hP(){const e=await fetch("/api/terminal/tmux/sessions",{method:"GET"});if(!e.ok){const n=await e.json().catch(()=>({error:"Failed to list tmux sessions"}));throw new Error(n.error||"Failed to list tmux sessions")}const t=await e.json();return Array.isArray(t.sessions)?t.sessions:[]}async function pP(){const e=await fetch("/api/terminal/tmux/status",{method:"GET"});if(!e.ok){const t=await e.json().catch(()=>({error:"Failed to get tmux status"}));throw new Error(t.error||"Failed to get tmux status")}return e.json()}async function mP(e){const t=e.trim();if(!t)throw new Error("tmux session name is required");const n=await Se(),r=await fetch(`/api/terminal/tmux/sessions/${encodeURIComponent(t)}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":n}});if(!r.ok){const s=await r.json().catch(()=>({error:"Failed to kill tmux session"}));throw new Error(s.error||"Failed to kill tmux session")}const o=await r.json();return{cleanedSessions:Array.isArray(o.cleanedSessions)?o.cleanedSessions:[],alreadyGone:!!o.alreadyGone}}async function gP(e){const t=await Se(),n=`ui-restore:${e??"current"}:${Date.now()}:${Math.random().toString(36).slice(2)}`,r=await fetch("/api/terminal/tmux/recovery/restore-all",{method:"POST",headers:{"X-XSRF-TOKEN":t,"Content-Type":"application/json"},body:JSON.stringify({idempotencyKey:n})}),o=await r.json().catch(()=>({}));if(!r.ok)throw new $e(o.error||"Failed to restore tmux Agent sessions",r.status);return o}async function yP(e,t){const n=await Se(),r=await fetch(`/api/terminal/tmux/recovery/operations/${encodeURIComponent(e)}/${t?"pause":"resume"}`,{method:"POST",headers:{"X-XSRF-TOKEN":n}});if(!r.ok)throw new $e("Failed to update recovery operation",r.status)}async function wP(e){const t=await Se(),n=await fetch("/api/terminal/tmux/recovery",{method:"DELETE",...e?{body:JSON.stringify({incidentId:e})}:{},headers:{"X-XSRF-TOKEN":t,...e?{"Content-Type":"application/json"}:{}}});if(!n.ok)throw new $e("Failed to dismiss tmux recovery",n.status)}const Ji=new Map;function bP(e){return JSON.stringify({preferredFrontendSessionId:e.preferredFrontendSessionId??null,mode:e.mode??null,tmuxSessionName:e.tmuxSessionName??null,cwd:e.cwd??null,termType:e.termType??null,createIfEmpty:e.createIfEmpty===!0,requireExisting:e.requireExisting===!0})}async function vP(){const e=await fetch("/api/terminal/session-inventory",{method:"GET"});if(!e.ok){const t=await e.json().catch(()=>({error:"Failed to load session inventory"}));throw new Error(t.error||"Failed to load session inventory")}return e.json()}async function xP(e){const t=bP(e),n=Ji.get(t);if(n)return n;const r=await Se(),o=st("/api/terminal/session-inventory/open",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify(e)},cx,"Terminal session open request timed out").then(async s=>{if(!s.ok){const i=await Ho(s,Uo,"Terminal session open error response timed out").catch(()=>({error:"Failed to open session"}));throw new $e(i.error||"Failed to open session",s.status,typeof i.code=="string"?i.code:void 0)}return Ho(s,Uo,"Terminal session open response timed out")}).finally(()=>{Ji.get(t)===o&&Ji.delete(t)});return Ji.set(t,o),o}async function SP(e,t){const n=await Se(),r=await fetch(`/api/terminal/session-inventory/sessions/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":n},body:JSON.stringify(t)});if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to update session"}));throw new Error(o.error||"Failed to update session")}return r.json()}async function EP(e){const t=await Se(),n=await fetch("/api/terminal/session-inventory/reorder",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify({sessionIds:e})});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to reorder sessions"}));throw new Error(r.error||"Failed to reorder sessions")}return n.json()}async function kP(e){const t=await Se(),n=await fetch(`/api/terminal/session-inventory/sessions/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":t}});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to remove session"}));throw new Error(r.error||"Failed to remove session")}}async function IP(){const e=await Se(),t=await fetch("/api/terminal/session-inventory/sessions",{method:"DELETE",headers:{"X-XSRF-TOKEN":e}});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to clear sessions"}));throw new Error(n.error||"Failed to clear sessions")}}async function CP(){const e=await fetch("/api/terminal/toolbar-presets",{method:"GET"});if(!e.ok){const t=await e.json().catch(()=>({error:"Failed to load toolbar presets"}));throw new Error(t.error||"Failed to load toolbar presets")}return e.json()}async function RP(e){const t=await Se(),n=await fetch("/api/terminal/toolbar-presets",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to save toolbar presets"})),o=new Error(r.error||"Failed to save toolbar presets");throw o.current=r.current,o.code=r.code,o}return n.json()}let ls=null,Is=null;const bx=1500;function sr(){return Is&&Date.now()-Is.readAt<bx?Promise.resolve(Is.value):ls||(ls=(async()=>{const e=await fetch("/api/terminal/settings",{method:"GET"});if(!e.ok){const n=await e.json().catch(()=>({error:"Failed to load settings"}));throw new Error(n.error||"Failed to load settings")}const t=await e.json();return Is={value:t,readAt:Date.now()},t})().finally(()=>{ls=null}),ls)}async function Gt(e){const t=await Se(),n=await fetch("/api/terminal/settings",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const o=await n.json().catch(()=>({error:"Failed to update settings"}));throw new Error(o.error||"Failed to update settings")}const r=await n.json();return Is={value:r,readAt:Date.now()},r}async function TP(e=!1){const t=await fetch(`/api/terminal/auto-title/catalog${e?"?refresh=1":""}`);if(!t.ok)throw new Error("Failed to discover title models");const n=await t.json();return Array.isArray(n?.namers)?n.namers:[]}let ds=null,Cs=null;function AP(){return Cs&&Date.now()-Cs.readAt<bx?Promise.resolve(Cs.value):ds||(ds=(async()=>{const e=await fetch("/api/terminal/context-draft",{method:"GET"});if(!e.ok){const n=await e.json().catch(()=>({error:"Failed to load context draft"}));throw new Error(n.error||"Failed to load context draft")}const t=await e.json();return Cs={value:t,readAt:Date.now()},t})().finally(()=>{ds=null}),ds)}async function PP(e,t){const n=await Se(),r=await fetch("/api/terminal/context-draft",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":n},body:JSON.stringify({text:e,origin:t})});if(!r.ok){const s=await r.json().catch(()=>({error:"Failed to update context draft"}));throw new Error(s.error||"Failed to update context draft")}const o=await r.json();return Cs={value:o,readAt:Date.now()},o}async function vx(e){let t;try{t=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e})})}catch(r){const o=zn(r);return{ok:!1,reason:Jp(o.code),error:o.message}}if(t.ok)return Tf(),{ok:!0};const n=await t.json().catch(()=>null);return t.status===429?{ok:!1,reason:"rateLimited",rateLimited:!0,retryAfterMs:typeof n?.retryAfterMs=="number"?n.retryAfterMs:void 0,error:n?.error||"Too many failed attempts. Please wait and try again."}:{ok:!1,reason:Jp(n?.code)||(t.status===401?"invalidPassword":"unavailable"),error:n?.error||"Login failed"}}async function NP(){If(),Aw();const e=await Se();await fetch("/api/auth/logout",{method:"POST",headers:{"X-XSRF-TOKEN":e}}),Tf()}async function _P(){const e=await fetch("/api/terminal/agent-launchers");if(!e.ok)throw new Error("Failed to detect agent launchers");const t=await e.json();return Array.isArray(t?.agents)?t.agents:[]}async function LP(){const e=await fetch("/api/terminal/agent-hooks");if(!e.ok)throw new Error("Failed to get agent hooks");const t=await e.json();return Array.isArray(t?.agents)?t.agents:[]}async function DP(e){const t=await Se(),n=await fetch(`/api/terminal/agent-hooks/${encodeURIComponent(e)}/install`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to install agent hooks");return{summary:r.summary??"Installed",devMode:r.devMode===!0}}async function jP(e){const t=await Se(),n=await fetch(`/api/terminal/agent-hooks/${encodeURIComponent(e)}/uninstall`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to uninstall agent hooks");return r.summary??"Removed"}class Pf extends Error{constructor(t,n,r){super(t),this.code=n,this.migration=r,this.name="AgentPluginManifestError"}code;migration}async function OP(){const e=await fetch("/api/terminal/agent-plugins");if(!e.ok)throw new Error("Failed to get agent plugins");return await e.json()}async function MP(e){const t=await Se(),n=await fetch("/api/terminal/agent-plugins",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Pf(r.error||"Failed to create agent plugin",r.code,r.migration);return r}async function BP(e){const t=await Se(),n=await fetch("/api/terminal/agent-plugins/install",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify({source:e})}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Pf(r.error||"Failed to install agent plugin",r.code,r.migration);return r}async function FP(e){const t=await Se(),n=await fetch(`/api/terminal/agent-plugins/${encodeURIComponent(e)}/check-update`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to check plugin updates");return r}async function UP(e){const t=await Se(),n=await fetch(`/api/terminal/agent-plugins/${encodeURIComponent(e)}/update`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to update plugin");return r}async function HP(e){const t=await Se(),n=await fetch(`/api/terminal/agent-plugins/${encodeURIComponent(e)}/doctor`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error||"Failed to diagnose plugin");return r}async function $P(e){const t=await Se(),n=await fetch(`/api/terminal/agent-plugins/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":t}});if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r.error||"Failed to delete agent plugin")}}async function zP(e){const t=await Se(),n=await fetch(`/api/terminal/${encodeURIComponent(e)}/agent-resume`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new $e(r.error||"Failed to resume agent session",n.status,typeof r.code=="string"?r.code:void 0);return{command:r.command??""}}async function qP(){const e=await fetch("/api/terminal/agent-resume-history",{method:"GET"});if(!e.ok)throw new Error("Failed to load Agent resume history");const t=await e.json().catch(()=>({entries:[]}));return Array.isArray(t.entries)?t.entries:[]}async function KP(e){const t=await Se(),n=await fetch(`/api/terminal/agent-resume-history/${encodeURIComponent(e)}/prepare`,{method:"POST",headers:{"X-XSRF-TOKEN":t}}),r=await n.json().catch(()=>({}));if(!n.ok)throw new $e(r.error||"Failed to prepare Agent session resume",n.status,typeof r.code=="string"?r.code:void 0);return r}async function GP(e){const t=await Se(),n=await fetch(`/api/terminal/agent-resume-history/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":t}});if(!n.ok&&n.status!==404)throw new Error("Failed to remove Agent resume history")}async function WP(e){const t=await Se(),n=await fetch("/api/terminal/program-rules",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to update program rules"}));throw new Error(r.error||"Failed to update program rules")}return n.json()}async function VP(){const e=await Se(),t=await fetch("/api/terminal/program-rules",{method:"DELETE",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new Error("Failed to reset program rules");return t.json()}async function YP(){const e=await fetch("/api/terminal/program-detection");if(!e.ok)throw new Error("Failed to get program detection config");return e.json()}async function XP(e){const t=await Se(),n=await fetch("/api/terminal/program-detection",{method:"PUT",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok)throw new Error("Failed to save program detection config");return n.json()}async function JP(){const e=await Se(),t=await fetch("/api/terminal/program-detection",{method:"DELETE",headers:{"X-XSRF-TOKEN":e}});if(!t.ok)throw new Error("Failed to reset program detection config");return t.json()}const ZP={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".bmp":"image/bmp",".ico":"image/x-icon",".svg":"image/svg+xml",".heic":"image/heic",".heif":"image/heif"};function jc(e){const t=e.lastIndexOf(".");return t<0?null:ZP[e.slice(t).toLowerCase()]??null}function QP(e){return jc(e)!==null}function xx(e){const t=jc(e);return t==="image/heic"||t==="image/heif"}const eN={".mp4":"video/mp4",".m4v":"video/x-m4v",".webm":"video/webm",".mov":"video/quicktime",".ogv":"video/ogg",".mpeg":"video/mpeg",".mpg":"video/mpeg"};function Sx(e){const t=e.lastIndexOf(".");return t<0?null:eN[e.slice(t).toLowerCase()]??null}function Ex(e){return Sx(e)!==null}function tN(e){return`/api/terminal/fs/video?path=${encodeURIComponent(e)}&action=view_file`}const kx=[".stl",".glb",".gltf"];function Nf(e){const t=e.lastIndexOf(".");if(t<0)return null;const n=e.slice(t).toLowerCase();return kx.includes(n)?n:null}function Ix(e){return Nf(e)!==null}function _f(e){const t=e.toLowerCase();return t.endsWith(".kicad_sch")?".kicad_sch":t.endsWith(".kicad_pcb")?".kicad_pcb":null}function nN(e){return _f(e)!==null}function rN(e){return _f(e)===".kicad_pcb"?"pcb-front":"schematic"}const Cx=[".html",".htm"];function oN(e){const t=e.lastIndexOf(".");if(t<0)return!1;const n=e.slice(t).toLowerCase();return Cx.includes(n)}function sN(e){return`/api/terminal/fs/preview/${e.split(/[\\/]+/).filter(Boolean).map(n=>encodeURIComponent(n)).join("/")}`}const iN={".stl":"model/stl",".glb":"model/gltf-binary",".gltf":"model/gltf+json"};async function Rx(e,t,n,r="list_directory",o,s="name",i){const a=new URLSearchParams({path:e});n&&a.set("showHidden","true"),s!=="name"&&a.set("sort",s),i&&a.set("gitIgnoreRoot",i),a.set("action",r),o&&a.set("requestSlotId",o);const c=await st(`/api/terminal/fs/list?${a}`,{signal:t},Gr,"Directory listing took too long. The folder may be on slow storage or blocked by another process.");if(!c.ok){const d=await c.json().catch(()=>({error:"Failed to list directory"}));throw new Error(d.error||"Failed to list directory")}return c.json()}async function Tx(e,t,n,r,o,s="name",i,a={}){const c=new URLSearchParams({path:e,query:t,stream:"true"});o&&c.set("showHidden","true"),s==="content"&&c.set("mode","content"),i&&c.set("requestSlotId",i);for(const m of a.excludePatterns??[])c.append("exclude",m);a.caseSensitive&&c.set("caseSensitive","true"),a.wholeWord&&c.set("wholeWord","true"),a.regex&&c.set("regex","true");const d=await fetch(`/api/terminal/fs/search?${c}`,{signal:r});if(!d.ok||!d.body){const m=await d.json().catch(()=>({error:"Failed to search files"}));throw new Error(m.error||"Failed to search files")}const u=d.body.getReader(),f=new TextDecoder;let h="";const p=m=>{if(!m.trim())return;const g=JSON.parse(m);if(g.type==="meta")n({path:g.path,query:g.query,engine:g.engine,mode:g.mode,limited:g.limited});else if(g.type==="batch")n({entries:g.entries??[]});else if(g.type==="content-batch")n({contentEntries:g.contentEntries??[]});else{if(g.type==="error")throw new Error(g.message||"Search failed");g.type==="done"&&n({total:g.total,truncated:g.truncated,limited:g.limited,engine:g.engine,mode:g.mode,done:!0})}};for(;;){const{value:m,done:g}=await u.read();if(g)break;h+=f.decode(m,{stream:!0});let b=h.indexOf(`
3
- `);for(;b>=0;)p(h.slice(0,b)),h=h.slice(b+1),b=h.indexOf(`
4
- `)}h+=f.decode(),p(h)}async function aN(e,t,n){const r=new URLSearchParams;for(const u of e)r.append("root",u);const o=await fetch(`/api/terminal/fs/watch?${r}`,{signal:n});if(!o.ok||!o.body){const u=await o.json().catch(()=>({error:"Failed to watch files"}));throw new Error(u.error||"Failed to watch files")}const s=o.body.getReader(),i=new TextDecoder;let a="",c=null;const d=u=>{if(!u.trim())return;const f=JSON.parse(u);if(f.type==="events"&&f.events?.length){t(f.events);const h=f.events.find(p=>p.type==="rescan-required"&&p.reason!=="event-storm"&&p.reason!=="reconnected"&&p.reason!=="directory-rescan"&&p.reason!=="polling-fallback");h?.reason&&(c=h.reason)}};for(;;){const{value:u,done:f}=await s.read();if(f)break;a+=i.decode(u,{stream:!0});let h=a.indexOf(`
5
- `);for(;h>=0;)d(a.slice(0,h)),a=a.slice(h+1),h=a.indexOf(`
6
- `)}if(a+=i.decode(),d(a),c)throw new Error(c)}function Lf(e){if(!e)return;const t=new URLSearchParams({requestSlotId:e,action:"cancel_io_slot"});fetch(`/api/terminal/fs/cancel-slot?${t}`,{method:"GET",keepalive:!0}).catch(()=>{})}async function cN(e,t,n="view_file",r){const o=new URLSearchParams({path:e,action:n});r&&o.set("requestSlotId",r);const s=await nx(`/api/terminal/fs/read?${o}`,{signal:t,timeoutMs:Gr});if(!s.ok){const i=await s.json().catch(()=>({error:"Failed to read file"}));throw new Error(i.error||"Failed to read file")}return s.json()}async function lN(e,t,n="HEAD",r,o="ref"){const s=new URLSearchParams({path:e,cwd:t,ref:n,action:"git_blob"});o!=="ref"&&s.set("source",o);const i=await st(`/api/terminal/fs/git-blob?${s}`,{signal:r},Gr,"Git blob preview took too long.");if(!i.ok){const a=await i.json().catch(()=>({error:"Failed to read git blob"}));throw new Error(a.error||"Failed to read git blob")}return i.json()}async function dN(e,t,n="view_file",r){const o=new URLSearchParams({path:e,action:n});r&&o.set("requestSlotId",r);const s=await nx(`/api/terminal/fs/blob?${o}`,{signal:t,timeoutMs:xx(e)?C2:Gr});if(!s.ok){const c=await s.json().catch(()=>({error:"Failed to load image preview"}));throw new Error(c.error||"Failed to load image preview")}const i=await s.blob(),a=s.headers.get("Content-Length");return{blob:i,path:e,size:a?Number(a):null,modified:s.headers.get("Last-Modified"),mimeType:s.headers.get("Content-Type")||i.type||jc(e)||"application/octet-stream"}}function Df(e,t){try{const n=decodeURIComponent(e.headers.get("X-Termdock-Source-Path")||"");return n.startsWith("/")&&!/[\r\n\0]/.test(n)?n:t}catch{return t}}async function uN(e,t,n,r="view_file",o){const s=new URLSearchParams({path:e,view:t,action:r});o&&s.set("requestSlotId",o);const i="KiCad preview rendering or transfer timed out.",a=Rf(n,sx,i);try{const c=await fetch(`/api/terminal/fs/eda-preview?${s}`,{signal:a.signal});if(!c.ok){const f=await c.json().catch(()=>({error:"Failed to render KiCad preview"}));throw new Error(f.error||"Failed to render KiCad preview")}const d=await c.blob(),u=c.headers.get("Content-Length");return{blob:d,path:Df(c,e),view:t,size:u?Number(u):null,modified:c.headers.get("Last-Modified"),mimeType:c.headers.get("Content-Type")||d.type||"image/svg+xml"}}catch(c){throw a.signal.aborted&&!n?.aborted?new Error(i):c}finally{a.cleanup()}}async function fN(e,t,n,r,o){const s=new URLSearchParams({path:e,view:t,x:String(n),y:String(r)}),i=await st(`/api/terminal/fs/eda-inspect?${s}`,{signal:o},8e3,"KiCad point inspection timed out.");if(!i.ok){const a=await i.json().catch(()=>({error:"Failed to inspect KiCad point"}));throw new Error(a.error||"Failed to inspect KiCad point")}return i.json()}async function hN(e,t,n="view_file",r){const o=new URLSearchParams({path:e,action:n});r&&o.set("requestSlotId",r);const i=Rf(t,ox,"3D model transfer timed out. Please retry.");try{const a=await fetch(`/api/terminal/fs/download?${o}`,{signal:i.signal});if(!a.ok){const f=await a.json().catch(()=>({error:"Failed to load 3D model preview"}));throw new Error(f.error||"Failed to load 3D model preview")}const c=await a.blob(),d=a.headers.get("Content-Length"),u=Nf(e)??"";return{blob:c,path:Df(a,e),size:d?Number(d):null,modified:a.headers.get("Last-Modified"),ext:u,mimeType:a.headers.get("Content-Type")||c.type||iN[u]||"application/octet-stream"}}finally{i.cleanup()}}function am(){return typeof navigator>"u"?!1:/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}async function Ax(e,t){if(t?.aborted)return"canceled";const n=dt()?.targetPeerId,r=`/api/terminal/fs/download?path=${encodeURIComponent(e)}`;try{const o=t?await fetch(r,{signal:t}):await fetch(r);if(t?.aborted)return"canceled";if(!o.ok){const c=await o.json().catch(()=>({error:"Failed to download file"}));if(t?.aborted)return"canceled";throw new Error(c.error||"Failed to download file")}const s=Lx(o.headers?.get?.("Content-Disposition")||"")??e.split("/").pop()?.split("\\").pop()??"download",i=ft()?.saveDownloadStream;if(i&&o.body){const c=o.headers?.get?.("Content-Length"),d=c!=null&&/^\d+$/.test(c)?Number(c):void 0;if(t?.aborted||dt()?.targetPeerId!==n)return"canceled";const u=await i(o.body,s,{signal:t,expectedBytes:Number.isSafeInteger(d)?d:void 0});return t?.aborted||dt()?.targetPeerId!==n?"canceled":u}const a=await o.blob();return t?.aborted||dt()?.targetPeerId!==n?"canceled":await Px(a,s,t)}catch(o){if(t?.aborted)return"canceled";throw o}}async function Px(e,t,n){if(n?.aborted)return"canceled";const r=ft()?.saveDownloadBlob;if(r)return r(e,t,n);const o=window.showSaveFilePicker;if(typeof o=="function"){let a;try{a=await o({suggestedName:t})}catch(c){if(n?.aborted||c instanceof DOMException&&c.name==="AbortError")return"canceled"}if(n?.aborted)return"canceled";if(a){let c;try{c=await a.createWritable()}catch(u){if(n?.aborted)return"canceled";throw u}const d=()=>{c.abort?.().catch(()=>{})};n?.addEventListener("abort",d,{once:!0});try{return n?.aborted?(d(),"canceled"):(await c.write(e),n?.aborted?"canceled":(await c.close(),"saved"))}catch(u){if(n?.aborted)return"canceled";throw d(),u}finally{n?.removeEventListener("abort",d)}}}if(am()){const a=new File([e],t,{type:e.type||"application/octet-stream"});if(typeof navigator<"u"&&"share"in navigator&&(!navigator.canShare||navigator.canShare({files:[a]})))try{return await navigator.share({files:[a]}),"started"}catch(d){if(n?.aborted||d instanceof DOMException&&d.name==="AbortError")return"canceled"}}if(am()){if(n?.aborted)return"canceled";const a=await sE(e,t);if(n?.aborted)return"canceled";if(a)return window.location.assign(a),"started"}if(n?.aborted)return"canceled";const s=URL.createObjectURL(e),i=document.createElement("a");return i.href=s,i.download=t,i.rel="noopener",i.style.display="none",document.body.appendChild(i),i.click(),setTimeout(()=>{URL.revokeObjectURL(s),i.remove()},4e3),"started"}async function Nx(e,t){if(t&&!t())throw new Error("File deletion context changed");const n=await Se();if(t&&!t())throw new Error("File deletion context changed");const r=new URLSearchParams({path:e,confirm:"true"}),o=await st(`/api/terminal/fs/file?${r}`,{method:"DELETE",headers:{"X-XSRF-TOKEN":n}},Gr,"File deletion took too long.");if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to delete file"}));throw new Error(s.error||"Failed to delete file")}}class Zd extends Error{constructor(t,n,r){super(t),this.result=n,this.code=r,this.name="UploadFilesError"}result;code}const Qd=50;async function vi(e,t,n,r,o,s){if(t.length>Qd)throw new Zd(`Choose up to ${Qd} files per upload. None were uploaded.`,{files:[],results:t.map((g,b)=>({index:b,name:g.name,status:"rejected",code:"UPLOAD_LIMIT"}))},"UPLOAD_LIMIT");const i=dt(),a=()=>{if(n?.aborted)throw n.reason??new DOMException("Upload cancelled","AbortError");if(dt()!==i||o?.()===!1)throw new Error("Upload target changed")};a();const c=new FormData;for(const g of t)c.append("files",g);const d=s?`/api/terminal/${encodeURIComponent(s)}/chat/attachments?fileCount=${t.length}`:`/api/terminal/fs/upload?dir=${encodeURIComponent(e)}&fileCount=${t.length}`,u=await Se();a(),r?.(0);const f={"X-XSRF-TOKEN":u};let h=c;if(r){const g=new Response(c);f["Content-Type"]=g.headers.get("Content-Type"),h=await g.blob()}a();const p=await st(d,{method:"POST",headers:f,body:h,signal:n,onUploadProgress:h instanceof Blob&&r?g=>r(Math.min(99,Math.floor(g/Math.max(1,h.size)*100))):void 0},12e4,"Upload timed out");if(!p.ok){const g=await p.json().catch(()=>({error:"Upload failed"}));throw new Zd(g.error||"Upload failed",g,g.code)}const m=await p.json();return a(),r?.(100),m}function _x(e,t,n,r,o){return vi("",t,n,r,o,e)}async function pN(e){const t=await st("/api/terminal/fs/local-open-availability",{signal:e},Gr,"Local file browser availability check timed out");return t.ok?t.json():{available:!1}}async function mN(e){const t=await Se(),n=await st("/api/terminal/fs/open-in-file-browser",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify({path:e})},Gr,"Opening file browser timed out");if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to open file browser"}));throw new Error(r.error||"Failed to open file browser")}}function Lx(e){if(!e)return null;const t=/(?:^|;)\s*filename\*=\s*(?:UTF-8'')?([^;]+)/i.exec(e);if(t){const r=t[1].trim().replace(/^"|"$/g,"");try{return decodeURIComponent(r)}catch{return r}}const n=/(?:^|;)\s*filename=\s*(?:"([^"]*)"|([^;]+))/i.exec(e);return n?(n[1]??n[2]).trim():null}function gN(e,t){t?.algorithm&&t.algorithm!=="default"&&e.set("algorithm",t.algorithm),t?.whitespace&&t.whitespace!=="default"&&e.set("whitespace",t.whitespace),t?.context==="all"?e.set("context","all"):typeof t?.context=="number"&&e.set("context",String(t.context))}async function yN(e,t,n,r,o=e?"view_diff":"view_all_changes",s,i,a,c){const d=dt()?.targetPeerId;for(let u=0;;u++){r?.throwIfAborted();const f=He();try{return await wN(e,t,n,r,o,s,i,a,c)}catch(h){const p=h instanceof Error?h.message:String(h),m=f?.closed||/^(Secure connection closed|Secure response ended unexpectedly)$/.test(p);if(u>=1||r?.aborted||!m||!d||dt()?.targetPeerId!==d)throw h;En("connection_retry",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,message:p})}}}async function wN(e,t,n,r,o=e?"view_diff":"view_all_changes",s,i,a,c){const d=new URLSearchParams;e&&d.set("path",e),n&&d.set("cwd",n),d.set("action",o),gN(d,c),s&&d.set("traceId",s),i&&d.set("interactionId",i);const u=!!e&&o==="view_diff",f=typeof performance<"u"?performance.now():Date.now();En("request_start",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,cached:!!t,algorithm:c?.algorithm??"default",whitespace:c?.whitespace??"default",context:c?.context===void 0?"default":String(c.context),timeoutMs:u?To:jn});const h=await st(`/api/terminal/fs/diff?${d}`,{signal:r},u?To:jn,u?"Git diff is still running for this file. It may be blocked by repository IO or another Git process.":"Git diff took too long. The repository may be busy, on slow storage, or locked by another Git process.").catch(g=>{throw En("timeout_or_abort",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),message:g instanceof Error?g.message:String(g),signalAborted:!!r?.aborted,signalReason:r?.aborted?String(r.reason??""):void 0}),g});if(En("response_headers",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,status:h.status,ok:h.ok,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f)}),!h.ok){const g=await h.json().catch(()=>({error:"Failed to get diff"}));throw En("error",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,status:h.status,message:g.error||"Failed to get diff"}),new Error(g.error||"Failed to get diff")}En("response_body_start",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),contentLength:h.headers.get("Content-Length")});let p;try{p=await lx(h,u?To:jn,u?"Git diff response body is still loading for this file.":"Git diff response body took too long.")}catch(g){throw En("response_body_timeout",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),message:g instanceof Error?g.message:String(g),signalAborted:!!r?.aborted,signalReason:r?.aborted?String(r.reason??""):void 0}),g}let m;try{m=JSON.parse(p)}catch(g){throw En("response_body_parse_error",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),bytes:p.length,snippet:p.slice(0,160),message:g instanceof Error?g.message:String(g)}),g}return En("response_body",{traceId:s,interactionId:i,requestSlotId:a,filePath:e,cwd:n,action:o,durationMs:Math.round((typeof performance<"u"?performance.now():Date.now())-f),bytes:m.diff?.length??0,error:m.error??null,truncated:!!m.truncated,tooLarge:!!m.tooLarge}),m}async function bN(e,t,n="load_git_details",r){const o=new URLSearchParams;e&&o.set("cwd",e),o.set("action",n),r&&o.set("requestSlotId",r);const s=o.toString(),i=await st(`/api/terminal/fs/git-context${s?`?${s}`:""}`,{signal:t},jn,"Git details took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!i.ok){const a=await i.json().catch(()=>({error:"Failed to get git context"}));throw new Error(a.error||"Failed to get git context")}return i.json()}async function vN(e={},t){const n=new URLSearchParams;e.workspaceRoot&&n.set("workspaceRoot",e.workspaceRoot),e.repoRoot&&n.set("repoRoot",e.repoRoot);const r=n.toString(),o=await st(`/api/terminal/fs/change-audit${r?`?${r}`:""}`,{signal:t},jn,"Change audit explanations took too long to load.");if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to get change audit explanations"}));throw new Error(s.error||"Failed to get change audit explanations")}return o.json()}async function xN(e,t){const n=new URLSearchParams;e.cwd&&n.set("cwd",e.cwd),e.repoRoot&&n.set("repoRoot",e.repoRoot),n.set("base",e.base),e.head&&n.set("head",e.head),e.includeUncommitted===!1&&n.set("includeUncommitted","0"),e.filePath&&n.set("filePath",e.filePath),e.comparisonBase&&n.set("comparisonBase",e.comparisonBase),n.set("action","load_branch_diff"),e.requestSlotId&&n.set("requestSlotId",e.requestSlotId);const r=await st(`/api/terminal/fs/branch-diff?${n}`,{signal:t},e.filePath&&e.comparisonBase?To:T2,"Branch diff took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to get branch diff"}));throw new Error(o.error||"Failed to get branch diff")}return r.json()}async function SN(e,t){const n=new URLSearchParams;e.cwd&&n.set("cwd",e.cwd),e.repoRoot&&n.set("repoRoot",e.repoRoot),n.set("commit",e.commit),n.set("action","load_commit_diff"),e.requestSlotId&&n.set("requestSlotId",e.requestSlotId);const r=await st(`/api/terminal/fs/commit-diff?${n}`,{signal:t},To,"Commit diff took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to get commit diff"}));throw new Error(o.error||"Failed to get commit diff")}return r.json()}async function EN(e,t){const n=new URLSearchParams;e.cwd&&n.set("cwd",e.cwd),e.repoRoot&&n.set("repoRoot",e.repoRoot),n.set("limit",String(e.limit)),typeof e.skip=="number"&&n.set("skip",String(e.skip)),e.query&&n.set("query",e.query),n.set("action","load_recent_commits"),e.requestSlotId&&n.set("requestSlotId",e.requestSlotId);const r=await st(`/api/terminal/fs/git-recent-commits?${n}`,{signal:t},R2,"Recent commits took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!r.ok){const o=await r.json().catch(()=>({error:"Failed to get recent commits"}));throw new Error(o.error||"Failed to get recent commits")}return r.json()}async function kN(e={},t){const n=new URLSearchParams;e.workspaceRoot&&n.set("workspaceRoot",e.workspaceRoot),e.repoRoot&&n.set("repoRoot",e.repoRoot),e.baseRef&&n.set("baseRef",e.baseRef),e.branchName&&n.set("branchName",e.branchName);const r=n.toString(),o=await st(`/api/terminal/fs/branch-audit${r?`?${r}`:""}`,{signal:t},jn,"Branch explanations took too long to load.");if(!o.ok){const s=await o.json().catch(()=>({error:"Failed to get branch explanations"}));throw new Error(s.error||"Failed to get branch explanations")}return o.json()}async function IN(e={}){const t=await Se(),n=await st("/api/terminal/fs/change-audit",{method:"DELETE",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)},jn,"Change audit explanations took too long to clear.");if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to clear change audit explanations"}));throw new Error(r.error||"Failed to clear change audit explanations")}return n.json()}async function CN(e={}){const t=await Se(),n=await st("/api/terminal/fs/branch-audit",{method:"DELETE",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)},jn,"Branch explanations took too long to clear.");if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to clear branch explanations"}));throw new Error(r.error||"Failed to clear branch explanations")}return n.json()}async function RN(e,t,n){const r=new URLSearchParams;e&&r.set("cwd",e),r.set("action","load_untracked_files"),n&&r.set("requestSlotId",n);const o=r.toString();return(await st(`/api/terminal/fs/untracked-files${o?`?${o}`:""}`,{signal:t},To,"Untracked file scan took too long. The repository may be busy, on slow storage, or locked by another Git process.")).json()}async function TN(e,t,n={}){const r=new URLSearchParams;e&&r.set("cwd",e),n.includeNested&&r.set("includeNested","true"),n.refresh&&r.set("refresh","true"),n.cacheOnly&&r.set("cacheOnly","true"),n.discoverOnly&&r.set("discoverOnly","true"),r.set("action",n.action??(n.refresh?"manual_git_refresh":"open_sidebar_git_refresh")),n.requestSlotId&&r.set("requestSlotId",n.requestSlotId);const o=r.toString(),s=`/api/terminal/fs/git-bundle${o?`?${o}`:""}`,i=n.requestTimeoutMs===null?await fetch(s,{signal:t}):await st(s,{signal:t},n.requestTimeoutMs??jn,"Git status refresh took too long. The repository may be busy, on slow storage, or locked by another Git process.");if(!i.ok){const a=await i.json().catch(()=>({error:"Failed to get git bundle"}));throw new Error(a.error||"Failed to get git bundle")}return i.json()}async function AN(e){const t=await Se(),n=await fetch("/api/terminal/fs/git-action",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const r=await n.json().catch(()=>({error:"Git action failed"})),o=r.confirmationPhrase?`${r.error||"Git action failed"} (${r.confirmationPhrase})`:r.error||"Git action failed";throw new Error(o)}return n.json()}async function PN(e){const t=new URLSearchParams;e.cwd&&t.set("cwd",e.cwd),e.action&&t.set("action",e.action),e.jobId&&t.set("jobId",e.jobId);const n=await fetch(`/api/terminal/fs/git-action/status?${t}`);if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to get Git action status"}));throw new Error(r.error||"Failed to get Git action status")}return n.json()}async function NN(e){const t=await Se(),n=await fetch("/api/terminal/fs/apply-hunk",{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":t},body:JSON.stringify(e)});if(!n.ok){const r=await n.json().catch(()=>({error:"Failed to apply diff hunk"}));throw new Error(r.error||"Failed to apply diff hunk")}return n.json()}async function Ke(e,t){const n=t?.method?.toUpperCase()??"GET",r=new Headers(t?.headers);n!=="GET"&&n!=="HEAD"&&r.set("X-XSRF-TOKEN",await Se()),t?.body&&r.set("Content-Type","application/json");const o=async()=>{const s=await fetch(`/api/terminal/operations${e}`,{...t,headers:r});if(!s.ok){const i=await s.json().catch(()=>({error:"操作失败"}));throw new $e(i.error||"操作失败",s.status)}return s.status===204?void 0:await s.json()};return n==="GET"||n==="HEAD"?e2(o,t?.signal):o()}function _N(e,t){return Ke(`/collaboration-tasks${e?`?group=${encodeURIComponent(e)}`:""}`,t?{signal:t}:void 0)}function LN(e){return Ke(`/collaboration-tasks/${encodeURIComponent(e)}`)}function DN(e){return Ke("/collaboration-tasks",{method:"POST",body:JSON.stringify({input:e})})}function jN(e,t){return Ke(`/collaboration-tasks/${encodeURIComponent(e)}`,{method:"POST",body:JSON.stringify({input:t})})}function ON(){return Ke("/automations")}function MN(e){return Ke("/automations",{method:"POST",body:JSON.stringify(e)})}function BN(e){return Ke(`/automations/${encodeURIComponent(e)}/run`,{method:"POST"})}function FN(e,t){return Ke(`/automations/${encodeURIComponent(e)}/enabled`,{method:"POST",body:JSON.stringify({enabled:t})})}function UN(e){return Ke(`/automations/${encodeURIComponent(e)}`,{method:"DELETE"})}let ir=null,cm="";const eu=new Set;typeof window<"u"&&di(()=>ir?.refreshPeers(!0));function jf(){return Ke("/collaboration-groups",{signal:AbortSignal.timeout(1e4)})}function dn(){const e=dt(),t=e?.serviceOrigin??window.location?.origin??"",n=`${e?.targetPeerId??""}:${t}`;return(!ir||n!==cm)&&(ir?.dispose(),cm=n,ir=new ZS({origin:t,readLocal:jf,readPeers:async()=>{const r=await Ke("/collaboration-directory",{signal:AbortSignal.timeout(1e4)});let o;const s=await Promise.race([mt().catch(()=>[]),new Promise(d=>{o=setTimeout(()=>d([]),1e3)})]).finally(()=>clearTimeout(o)),i=d=>{const u=s.find(h=>d.serviceId&&h.targetPeerId===d.serviceId)??s.find(h=>!d.serviceId&&(h.serviceOrigin||h.url)===d.origin),f=WS({serviceLabel:u?.label||d.label,serviceOrigin:d.origin});return{...d,label:f,...u?{accessUrl:u.url}:{}}},a=r.services?.map(i),c=new Map(a?.map(d=>[d.origin,d.label]));return{...r,origin:t,services:a,removedServices:r.removedServices?.map(i),sessions:r.sessions.map(d=>({...d,serviceLabel:c.get(d.serviceOrigin??"")??d.serviceLabel}))}},peerProtocol:"v2"}),ir.subscribe(r=>{for(const o of eu)o(r)})),ir}function xi(){ir?.dispose(),ir=null}function HN(e){return eu.add(e),()=>{eu.delete(e)}}function $N(){window.dispatchEvent(new Event("termdock:collaboration-enroll")),dn().refreshPeers(!0)}async function zN(e){await Ke(`/collaboration-connections/${encodeURIComponent(e)}`,{method:"DELETE"}),xi(),await Of()}async function qN(e){await Ke(`/collaboration-connections/${encodeURIComponent(e)}/restore`,{method:"POST"}),xi(),await Of()}function KN(e,t){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/rules`,{method:"POST",body:JSON.stringify(t)})}function Of(){return dn().load()}async function GN(e,t){const n=await Ke(`/collaboration-groups/${encodeURIComponent(e.id)}/${t?"archive":"unarchive"}`,{method:"POST",body:JSON.stringify({expectedUpdatedAt:e.updatedAt,idempotencyKey:crypto.randomUUID()})});return dn().invalidate(),n.group}async function WN(e){const t=await jf(),n=e.id?t.groups.find(c=>c.id===e.id):void 0;if(e.id&&!n)throw new $e("协作组已删除,请刷新列表",404);if(n&&e.expectedUpdatedAt!==void 0&&e.expectedUpdatedAt!==n.updatedAt)throw new $e("协作组已被修改,请重新打开成员管理后再保存",409);const r=[...new Set(e.sessionIds)];if(!e.name.trim())throw new $e("请填写协作组名称",400);const o=new Set([...t.sessions.map(c=>c.sessionId),...n?.sessionIds??[]]);if(r.filter(c=>!o.has(c)).some(c=>!Ss(c)))throw new $e("所选会话已变化,请刷新后重新选择;尚未保存任何修改",409);const i={...e,sessionIds:r,...n?{expectedUpdatedAt:e.expectedUpdatedAt??n.updatedAt}:{}},a=await Ke("/collaboration-groups",{method:"POST",body:JSON.stringify(i)});return dn().invalidate(),a}async function VN(e){if((await jf()).capabilities?.groupMove!==1)throw new $e("当前服务需要升级后才能在协作组之间移动成员;原成员关系未修改",409);await Ke("/collaboration-groups/move-member",{method:"POST",body:JSON.stringify(e)}),dn().invalidate()}function YN(e,t){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/spawn`,{method:"POST",body:JSON.stringify(t)}).then(n=>(dn().invalidate(),n))}function XN(e,t,n){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/role`,{method:"POST",body:JSON.stringify({sessionId:t,role:n})}).then(r=>(dn().invalidate(),r))}function JN(e,t){const n=t===void 0?"":`?expectedUpdatedAt=${encodeURIComponent(t)}`;return Ke(`/collaboration-groups/${encodeURIComponent(e)}${n}`,{method:"DELETE"}).then(()=>{dn().invalidate()})}function ZN(e){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/messages`)}function QN(e,t){return Ke(`/collaboration-groups/${encodeURIComponent(e)}/messages`,{method:"POST",body:JSON.stringify(t)})}function e_(e,t=50,n){return Ke(`/session-search?q=${encodeURIComponent(e)}&limit=${t}`,{signal:n})}function t_(e,t){return Ke("/session-search/prepare",{method:"POST",body:JSON.stringify({nativeKey:e,terminalSessionId:t})})}let In=null;function n_(){const e=dt()?.targetPeerId??location.origin;if(In?.scope===e&&(In.pending||Date.now()-In.at<5e3))return In.result;const t={scope:e,at:Date.now(),pending:!0,result:Ke("/execution-archives")};return In=t,t.result.then(()=>{t.pending=!1,t.at=Date.now()},()=>{In===t&&(In=null)}),t.result}async function r_(e){const t=await Ke(`/execution-archives/${encodeURIComponent(e)}/archive`,{method:"POST"});return In=null,dn().invalidate(),t}async function o_(e,t){const n=await Ke(`/execution-archives/${encodeURIComponent(e)}/restore`,{method:"POST",body:JSON.stringify({mode:t})});return In=null,dn().invalidate(),n}async function s_(e,t){const n=await Ke(`/collaboration-groups/${encodeURIComponent(e)}/team`,{method:"POST",body:JSON.stringify(t)});return dn().invalidate(),n}const i_=Object.freeze(Object.defineProperty({__proto__:null,AUTH_UNAUTHORIZED_EVENT:Cf,AgentPluginManifestError:Pf,EDA_PREVIEW_REQUEST_TIMEOUT_MS:sx,HTML_EXTENSIONS:Cx,MAX_UPLOAD_FILES:Qd,MODEL_3D_EXTS:kx,MODEL_PREVIEW_REQUEST_TIMEOUT_MS:ox,TERMINAL_CSRF_REQUEST_TIMEOUT_MS:ix,TERMINAL_HEALTH_REQUEST_TIMEOUT_MS:ax,TERMINAL_SESSION_OPEN_REQUEST_TIMEOUT_MS:cx,TerminalApiError:$e,TerminalInputError:Hr,UploadFilesError:Zd,VISIBLE_WAKEUP_PROBE_TIMEOUT_MS:ux,acknowledgeTerminalOutput:sP,applyDiffHunk:NN,archiveExecutionSession:r_,buildHtmlPreviewUrl:sN,buildVideoPreviewUrl:tN,cancelIoSlot:Lf,checkAgentPluginUpdate:FP,checkTermdockUpdate:b2,checkTerminalHealth:uP,clearBranchAuditRecords:CN,clearChangeAuditRecords:IN,clearSessionInventoryEntries:IP,closeTerminal:lP,confirmTermdockUpdateRestart:v2,connectTerminalStream:J2,createAgentPlugin:MP,createCollaborationTask:DN,createTerminalSession:X2,deleteAgentPlugin:$P,deleteFile:Nx,dismissServerHealthIncident:E2,dismissTmuxRecovery:wP,doctorAgentPlugin:HP,downloadFile:Ax,enableServerSupervision:x2,ensureCollaborationTeam:s_,fetchQuota:k2,forceKillTerminal:fP,getAgentHooks:LP,getAgentLaunchers:_P,getAgentPlugins:OP,getAppliedTerminalCursor:Y2,getBranchAuditRecords:kN,getBranchDiff:xN,getChangeAuditRecords:vN,getCollaborationTask:LN,getCommitDiff:SN,getContextDraft:AP,getCsrfToken:Se,getDefaultEdaPreviewView:rN,getEdaExtForPath:_f,getFileDiff:yN,getGitActionStatus:PN,getGitBlobContent:lN,getGitBundle:TN,getGitContext:bN,getImageMimeTypeForPath:jc,getLocalFileBrowserAvailability:pN,getModel3dExtForPath:Nf,getProgramDetection:YP,getRecentCommits:EN,getServerHealth:S2,getSessionInventory:vP,getSettings:sr,getTermdockUpdateState:rx,getTerminalConnectionQuality:L2,getTitleNamerCatalog:TP,getTmuxStatus:pP,getToolbarPresetsDoc:CP,getUntrackedFiles:RN,getVideoMimeTypeForPath:Sx,inspectEdaPoint:fN,installAgentHooks:DP,installAgentPluginSource:BP,isHeicImagePath:xx,isPreviewableEdaPath:nN,isPreviewableHtmlPath:oN,isPreviewableImagePath:QP,isPreviewableModel3dPath:Ix,isPreviewableVideoPath:Ex,killTmuxSession:mP,launchRecoverableTerminalAgent:Q2,listAgentAutomations:ON,listAgentResumeHistory:qP,listCollaborationGroups:Of,listCollaborationMessages:ZN,listCollaborationTasks:_N,listDirectory:Rx,listExecutionArchives:n_,listTmuxSessions:hP,loginWithPassword:vx,logout:NP,moveCollaborationMember:VN,openInFileBrowser:mN,openSessionInventoryEntry:xP,operationsRequest:Ke,parseFilenameFromContentDisposition:Lx,prepareAgentResumeHistory:KP,prepareSearchSession:t_,probeTerminalConnection:tP,readEdaPreviewBlob:uN,readFileContent:cN,readImagePreviewBlob:dN,readModel3dBlob:hN,readPreviewSourcePath:Df,reconnectTerminalConnectionNow:nP,refreshQuota:I2,removeAgentAutomation:UN,removeAgentResumeHistory:GP,removeCollaborationConnection:zN,removeCollaborationGroup:JN,removeSessionInventoryEntry:kP,reorderSessionInventoryEntries:EP,replaceProgramDetection:XP,replaceProgramRules:WP,replaceToolbarPresetsDoc:RP,resetCollaborationDirectory:xi,resetCsrfTokenCache:Tf,resetProgramDetection:JP,resetProgramRules:VP,resizeTerminal:cP,restartTerminalSession:dP,restoreAllTmuxAgentSessions:gP,restoreCollaborationConnection:qN,restoreExecutionSession:o_,resumeAgentSession:zP,retryCollaborationPeers:$N,runAgentAutomation:BN,runGitAction:AN,saveAgentAutomation:MN,saveCollaborationGroup:WN,saveDownloadBlob:Px,searchFilesStream:Tx,searchTerminalSessions:e_,sendAgentReviewAck:yx,sendCollaborationMessage:QN,sendTerminalFlowControlState:aP,sendTerminalFocusState:oP,sendTerminalInput:eP,sendTerminalViewingState:iP,sendTmuxAction:wx,setAgentAutomationEnabled:FN,setCollaborationGroupArchived:GN,setCollaborationGroupRules:KN,setCollaborationMemberRole:XN,setTerminalOutputSubscription:gx,setTerminalSnapshotCursor:V2,setTmuxRecoveryOperationPaused:yP,spawnCollaborationAgent:YN,subscribeCollaborationGroups:HN,suspendTerminalConnectionReconnects:rP,trySendInputExitingCopyMode:Z2,uninstallAgentHooks:jP,updateAgentPlugin:UP,updateCollaborationTask:jN,updateContextDraft:PP,updateSessionInventoryEntry:SP,updateSettings:Gt,uploadFiles:vi,uploadSessionAttachments:_x,watchFileSystem:aN},Symbol.toStringTag,{value:"Module"})),tu="termdock:locale",pa={en:US,zh:HS};function a_(e){return typeof e=="string"&&$S.includes(e)}function c_(){if(typeof window>"u")return Lo;try{const t=window.localStorage.getItem(tu);if(a_(t))return t}catch{}return(window.navigator?.language?.toLowerCase()??"").startsWith("zh")?"zh":Lo}const Dx=y.createContext(null);function nu(e,t){const n=t.split(".");let r=e;for(const o of n)if(r&&typeof r=="object"&&o in r)r=r[o];else return;return r}function ru(e,t){return typeof e=="function"?e(t??{}):typeof e!="string"?String(e):t?e.replace(/\{(\w+)\}/g,(n,r)=>Object.prototype.hasOwnProperty.call(t,r)?String(t[r]):n):e}function l_({children:e}){const[t,n]=y.useState(()=>c_()),r=Ut.useRef(!1);y.useEffect(()=>{typeof window>"u"||sr().then(c=>{if(c?.locale==="zh"||c?.locale==="en"){if(c.locale===t||c.locale==="en"&&t!=="en")return;n(c.locale);try{window.localStorage.setItem(tu,c.locale)}catch{}}}).catch(()=>{})},[]),y.useEffect(()=>{if(!(typeof window>"u")){try{window.localStorage.setItem(tu,t)}catch{}r.current&&(r.current=!1,Gt({locale:t}).catch(()=>{})),document.documentElement.lang=t==="zh"?"zh-CN":"en"}},[t]);const o=y.useCallback(c=>{r.current=!0,n(c)},[]),s=pa[t]??pa[Lo],i=y.useCallback((c,d)=>{const u=nu(s,c);if(u===void 0){const f=nu(pa[Lo],c);return f===void 0?c:ru(f,d)}return ru(u,d)},[s]),a=y.useMemo(()=>({locale:t,setLocale:o,t:i}),[t,o,i]);return l.jsx(Dx.Provider,{value:a,children:e})}function Nt(){const e=y.useContext(Dx);return e||{locale:Lo,setLocale:()=>{},t:(t,n)=>{const r=nu(pa[Lo],t);return r===void 0?t:ru(r,n)}}}const d_=()=>document.getElementById("termdock-startup")?.hidden===!1;function u_(e){const t=document.getElementById("termdock-startup");if(!t)return()=>{};const n=new MutationObserver(e);return n.observe(t,{attributes:!0,attributeFilter:["hidden"]}),()=>n.disconnect()}function f_(){return y.useSyncExternalStore(u_,d_)}const ma=new Map;let Al=0,us;function ga(){const e=++Al;requestAnimationFrame(()=>{if(e!==Al)return;const t=document.getElementById("termdock-startup");if(!t)return;const n=[...ma].find(([r])=>r.isConnected&&!r.closest('[aria-hidden="true"], [hidden]')&&getComputedStyle(r).visibility!=="hidden");if(n){t.hidden=!1;const r=t.querySelector("[data-startup-status]"),o=n[1];r&&r.textContent!==o.status&&(r.textContent=o.status);const s=t.querySelector("[data-startup-detail]");s&&(s.hidden=!o.detail,s.textContent=o.detail??"");const i=t.querySelector("[data-startup-action]");i&&(i.hidden=!o.actionLabel||!o.onAction,i.textContent=o.actionLabel??"",i.onclick=o.onAction??null);return}requestAnimationFrame(()=>{if(e!==Al)return;t.hidden=!0;const r=t.querySelector("[data-startup-action]");r&&(r.onclick=null)})})}function h_(){return y.useLayoutEffect(()=>{ga()},[]),null}function Mf({status:e="Loading Termdock",detail:t,actionLabel:n,onAction:r}){const o=ww(),{locale:s}=Nt();o!=="ready"&&(e=s==="zh"?o==="offline"?"网络已断开,等待恢复…":"正在恢复连接…":o==="offline"?"Offline. Waiting for network…":"Reconnecting…");const i=y.useRef(null);return y.useLayoutEffect(()=>{const a=i.current;if(ma.set(a,{status:e,detail:t,actionLabel:n,onAction:r}),!us){us=new MutationObserver(ga);const c=document.getElementById("root");c&&us.observe(c,{attributes:!0,subtree:!0,attributeFilter:["style","aria-hidden","hidden"]})}return ga(),()=>{ma.delete(a),ma.size||(us?.disconnect(),us=void 0),ga()}},[e,t,n,r]),l.jsx("span",{ref:i,"data-startup-pending":"",style:{position:"absolute",width:0,height:0,pointerEvents:"none"}})}const tc=dr(()=>({items:[]}));function p_(e){const t=y.useId(),n=e?.message,r=e?.tone??"error",o=e?.actionLabel,s=e?.onAction,i=e?.duration??(r==="recovering"?0:r==="success"?4e3:8e3);y.useEffect(()=>{if(!n)return;let a;const c=()=>tc.setState(f=>({items:f.items.filter(h=>h.id!==t)})),d=()=>{tc.setState(f=>({items:[...f.items.filter(h=>h.id!==t),{id:t,message:n,tone:r,actionLabel:o,onAction:s}]})),i&&(a=setTimeout(c,i))},u=r==="recovering"?setTimeout(d,2500):void 0;return r!=="recovering"&&d(),()=>{clearTimeout(u),clearTimeout(a),c()}},[t,n,r,o,s,i])}function m_(){const{locale:e,t}=Nt(),n=ww(),r=f_(),o=e==="zh"?n==="offline"?"网络已断开,恢复后会自动连接":"正在恢复连接…":n==="offline"?"Offline. Reconnecting when the network returns.":"Reconnecting…";p_(n==="ready"?null:{tone:"recovering",message:o});const i=tc(u=>u.items).filter(u=>!u.dismissed),a=n!=="ready"?i.find(u=>u.tone==="recovering"):i.find(u=>u.tone==="error")??i.at(-1);if(!a)return null;const c=a.tone==="recovering";if(c&&r)return null;const d=c?Uy:a.tone==="success"?yy:my;return Kn.createPortal(l.jsx("div",{"data-app-feedback":!0,className:"pointer-events-none fixed inset-x-3 top-[calc(var(--safe-top-inset)+3rem)] z-toast mx-auto w-auto max-w-md",children:l.jsxs("div",{role:c||a.tone==="success"?"status":"alert","aria-live":c?"polite":void 0,"aria-atomic":"true",className:"pointer-events-auto flex items-center gap-2 rounded-xl border border-border bg-surface-elevated px-3 py-1.5 text-xs leading-5 text-foreground shadow-lg",children:[l.jsx(d,{size:15,"aria-hidden":"true",className:`shrink-0 ${c?"animate-spin text-muted-foreground motion-reduce:animate-none":a.tone==="success"?"text-primary":"text-[color:var(--warning)]"}`}),l.jsx("span",{className:"min-w-0 flex-1 break-words",children:n!=="ready"?o:c&&i.filter(u=>u.tone==="recovering").length>1?e==="zh"?"正在恢复服务同步…":"Restoring service updates…":a.message}),a.onAction&&l.jsx("button",{type:"button",className:"min-h-11 shrink-0 rounded-lg px-2 text-primary hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:a.onAction,children:a.actionLabel??t("common.retry")}),l.jsx("button",{type:"button","aria-label":t("common.close"),className:"flex min-h-11 min-w-11 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>tc.setState(u=>({items:u.items.map(f=>f.id===a.id||c&&f.tone==="recovering"||f.message===a.message?{...f,dismissed:!0}:f)})),children:l.jsx(ci,{size:14})})]})}),document.body)}function g_(){let e=!1,t=!1,n=!1,r;const o=new Map,s=new Set,i=new Map,a=new Map,c=async(p,m,g)=>{const b=JSON.stringify(g);if(o.get(m.serviceId)===b)return;const w=AbortSignal.timeout(1e4),E=await p.fetch("/api/csrf-token",{signal:w});if(!E.ok)throw new Error("CONNECTION_AUTHORIZATION_REQUIRED");const v=await E.json();if(typeof v.csrfToken!="string")throw new Error("INVALID_CSRF_TOKEN");const C=await p.fetch("/api/terminal/operations/collaboration-connections",{method:"POST",signal:w,headers:{"Content-Type":"application/json","X-XSRF-TOKEN":v.csrfToken},body:JSON.stringify({origin:m.origin,nodes:g})});if(!C.ok){const _=await C.json().catch(()=>({}));throw new Error(_.error||`HTTP_${C.status}`)}o.set(m.serviceId,b)},d=async()=>{if(e){n=!0;return}const p=se(),m=He();if(!(t||!p||!m||m.closed)){e=!0,n=!1;try{let g;const b=await Promise.race([mt(),new Promise((x,S)=>{g=setTimeout(()=>S(new Error("SERVICE_DIRECTORY_TIMEOUT")),8e3)})]).finally(()=>clearTimeout(g));b.some(x=>x.targetPeerId===p.targetPeerId)||b.push({...p,id:p.targetPeerId,label:p.serviceName||p.url});const w=[...new Map(b.filter(x=>!!x.targetPeerId).map(x=>[x.targetPeerId,x])).values()].slice(0,64),E=window.termdockDesktop,v=await E?.collaborationDescriptors?.().catch(()=>({}))??{},C=[];for(const x of w)try{const S=`${x.targetPeerId}:${x.serviceOrigin||x.url}`;let I=i.get(S);if(!I){const P=x.targetPeerId===p.targetPeerId?(await m.request({type:"collaboration-descriptor"},{timeoutMs:5e3})).node:v[x.targetPeerId]??await o2({...x,targetPeerId:x.targetPeerId},AbortSignal.timeout(8e3));if(P?.serviceId!==x.targetPeerId)throw new Error("PEER_IDENTITY_MISMATCH");const T=P.origin||x.serviceOrigin||x.url,A=new URL(T);if(A.protocol!=="https:"||A.origin!==T)throw new Error("INVALID_SERVICE_ORIGIN");I={serviceId:P.serviceId,origin:T,...P.caFingerprint256?{caFingerprint256:P.caFingerprint256}:{}},i.set(S,I)}if(x.targetPeerId===p.targetPeerId&&E?.rememberCollaborationDescriptor){const P=JSON.stringify(I);a.get(I.serviceId)!==P&&(await E.rememberCollaborationDescriptor(I),a.set(I.serviceId,P))}C.push({service:x,node:I})}catch{}if(t||He()!==m||se()?.targetPeerId!==p.targetPeerId)return;const _=C.find(x=>x.node.serviceId===p.targetPeerId);if(!_||C.length<2){u(3e4);return}const R=C.map(x=>x.node).sort((x,S)=>x.serviceId.localeCompare(S.serviceId));await c(m,_.node,R);let k=C.length<w.length;for(const x of C){if(x===_||o.get(x.node.serviceId)===JSON.stringify(R))continue;let S;try{S=await s2({...x.service,targetPeerId:x.node.serviceId},AbortSignal.timeout(8e3)),await c(S,x.node,R)}catch{let I=s.has(x.node.serviceId);if(!I&&S)try{(await S.request({type:"collaboration-scoped-peer",origin:x.node.origin,node:_.node},{timeoutMs:8e3})).type==="result"&&(s.add(x.node.serviceId),I=!0)}catch{}I||(k=!0)}finally{S?.close()}}window.dispatchEvent(new CustomEvent("termdock:collaboration-enrollment",{detail:{ok:!0}})),k&&u(3e4)}catch(g){window.dispatchEvent(new CustomEvent("termdock:collaboration-enrollment",{detail:{ok:!1,error:g instanceof Error?g.message:"CONNECTION_ENROLLMENT_FAILED"}})),u(3e4)}finally{e=!1,n&&u(100)}}};function u(p=100){t||(clearTimeout(r),r=setTimeout(()=>{d()},p))}const f=()=>{u()},h=di(f);window.addEventListener(xt,f),window.addEventListener("termdock:collaboration-enroll",f),window.addEventListener("online",f),window.addEventListener("pageshow",f),window.addEventListener("pagehide",p=>{p.persisted||(t=!0,clearTimeout(r),h(),window.removeEventListener("termdock:collaboration-enroll",f),window.removeEventListener(xt,f),window.removeEventListener("online",f),window.removeEventListener("pageshow",f))}),u()}var Zi={},lm;function y_(){if(lm)return Zi;lm=1;var e=lS();return Zi.createRoot=e.createRoot,Zi.hydrateRoot=e.hydrateRoot,Zi}var w_=y_();const b_=zg(w_);function Xe({size:e=16,className:t="",...n}){const r=!!(n["aria-label"]||n["aria-labelledby"]);return l.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none","aria-hidden":r?void 0:!0,role:r?"img":void 0,focusable:"false",...n,className:`td-loading-spinner animate-spin ${t.replace(/\b(?:animate-spin|service-spinning)\b/g,"")}`,children:l.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2.5",strokeDasharray:"18 44.8",strokeLinecap:"round"})})}function v_(){return l.jsx("span",{className:"td-loading-dots","aria-hidden":"true",children:[0,1,2].map(e=>l.jsx("span",{style:{animationDelay:`${(e-3)*400}ms`}},e))})}function dm({label:e,className:t="",dots:n=!1}){return l.jsxs("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:`flex items-center justify-center gap-2 text-sm text-muted-foreground ${t}`,children:[n?l.jsx(v_,{}):l.jsx(Xe,{size:18}),l.jsx("span",{children:e})]})}const ou="#termdock-invite=";function Bf(e){const t=new URL(e.entryUrl);t.hash="",t.search="",t.pathname="/";const n=new TextEncoder().encode(JSON.stringify(e));return t.hash=ou.slice(1)+btoa(String.fromCharCode(...n)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),t.href}function x_(e,t){qn(e);const n=new URL(e),r=new URL(t);if(n.protocol!=="https:"||r.protocol!=="http:"||r.username||r.password)throw new Error("证书引导地址无效");return r.hostname=n.hostname,r.pathname="/connect",r.search="",r.hash=n.hash,r.href}function qn(e,t={}){const n=new URL(e);if(!["https:","http:"].includes(n.protocol)||!n.hash.startsWith(ou))throw new Error("这不是有效的 Termdock 邀请链接");const r=n.hash.slice(ou.length);if(r.length>8192)throw new Error("邀请链接过长");let o;try{const d=r.replace(/-/g,"+").replace(/_/g,"/");o=JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(Uint8Array.from(atob(d),u=>u.charCodeAt(0))))}catch{throw new Error("邀请链接不完整,请重新复制")}if(o.v!==1||typeof o.serviceId!="string"||!/^12D3KooW[1-9A-HJ-NP-Za-km-z]{44}$/.test(o.serviceId)||o.routeOnly!==!0&&(typeof o.code!="string"||!/^[A-Za-z0-9_-]{32,128}$/.test(o.code)))throw new Error("邀请信息无效或版本不兼容");if(o.viewLayout!==void 0&&o.viewLayout!=="split")throw new Error("邀请布局无效");if(o.viewMode!==void 0&&!["terminal","chat"].includes(o.viewMode))throw new Error("邀请视图无效");const s=new URL(o.entryUrl),i=n.protocol==="http:"&&n.pathname==="/connect"&&!n.search&&!n.username&&!n.password&&s.protocol==="https:"&&s.hostname===n.hostname;if(!i&&s.origin!==n.origin||s.username||s.password||!["https:","http:"].includes(s.protocol))throw new Error("邀请地址与服务不一致");if(o.entryServiceId!==void 0&&(typeof o.entryServiceId!="string"||!/^12D3KooW[1-9A-HJ-NP-Za-km-z]{44}$/.test(o.entryServiceId)))throw new Error("邀请入口身份无效");if(o.routeCode!==void 0&&(typeof o.routeCode!="string"||!/^[A-Za-z0-9_-]{32,128}$/.test(o.routeCode)||!o.entryServiceId))throw new Error("邀请入口权限无效");if(o.routeOnly===!0&&(!o.entryServiceId||!o.routeCode||o.code!==void 0))throw new Error("备用连接邀请不完整");let a=s.origin;if(o.serviceUrl!==void 0){const d=new URL(o.serviceUrl);if(!["https:","http:"].includes(d.protocol)||d.username||d.password)throw new Error("目标服务地址无效");a=o.entryServiceId&&o.entryServiceId!==o.serviceId?d.origin:s.origin}const c=t.httpTransport&&i&&(!o.entryServiceId||o.entryServiceId===o.serviceId);return{viewMode:o.viewMode,viewLayout:o.viewLayout,url:c?n.origin:s.origin,targetPeerId:o.serviceId,pairingCode:o.code,...o.routeOnly===!0?{routeOnly:!0}:{},serviceOrigin:c?n.origin:a,...c?{certificateUrl:n.origin+"/certificates"+n.hash}:{},serviceName:typeof o.name=="string"?o.name.slice(0,120):void 0,entryServiceId:o.entryServiceId,routeCode:o.routeCode}}function S_(e){const{targetPeerId:t,routes:n}=e,r=!e.pairingCode&&!e.routeCode&&!e.entryServiceId?n?.find(d=>d.targetPeerId!==t):void 0,o=r?.url||e.url,s=r?.targetPeerId||e.entryServiceId,i=e.serviceOrigin||(r&&e.url!==o?e.url:void 0),a={id:t,url:o,targetPeerId:t,serviceOrigin:i,entryServiceId:s,routes:n,label:e.serviceName||new URL(i||o).host},c=e.pairingCode||e.routeCode?Bf({v:1,serviceId:t,entryUrl:o,serviceUrl:i,name:e.serviceName,entryServiceId:s,code:e.pairingCode,routeCode:e.routeCode,routeOnly:e.routeOnly,viewMode:e.viewMode}):void 0;return{connection:a,invitation:c}}function E_(e){if(e.includes("#termdock-invite=")){const n=qn(e),{url:r,targetPeerId:o,serviceOrigin:s,entryServiceId:i}=n;return{connection:{id:o,url:r,targetPeerId:o,serviceOrigin:s,entryServiceId:i,label:n.serviceName||new URL(s||r).host},invitation:e}}const t=ze(e);return{connection:{id:t,url:t,label:new URL(t).host}}}async function k_(e,t){const{connection:n,invitation:r}=E_(t);if(e.reviewServiceConnection){await e.reviewServiceConnection(n,r);return}await su(e,n,r)}async function su(e,t,n){try{const r=await e.openServiceConnection(t,n);if(!r.ok)throw new Error(r.error||"暂时无法打开服务,请检查地址和网络。")}catch(r){if(e.reviewServiceConnection&&["PREVIEW_DISCOVERY_FAILED","PREVIEW_CERTIFICATE_REJECTED"].includes(r?.code||"")){await e.reviewServiceConnection(t,n);return}throw r}}function jx(e=navigator.userAgent,t=navigator.maxTouchPoints){const n=/iPad/.test(e)||/Macintosh/.test(e)&&t>1?"iPad":/iPhone/.test(e)?"iPhone":/Android/.test(e)?"Android":/Windows/.test(e)?"Windows":/Macintosh|Mac OS X/.test(e)?"Mac":/Linux/.test(e)?"Linux":"设备",r=/Electron/.test(e)?"Termdock":/Edg\//.test(e)?"Edge":/Firefox|FxiOS/.test(e)?"Firefox":/Chrome|CriOS/.test(e)?"Chrome":/Safari/.test(e)?"Safari":"浏览器";return`${n} · ${r}`}let I_;function C_(){return I_??=(async()=>{const e=navigator.userAgent,[t,n]=jx().split(" · "),r=/(?:Edg|Firefox|FxiOS|Chrome|CriOS|Version)\/([\d.]+)/g,o=[...e.matchAll(r)],s=/(?:CPU (?:iPhone )?OS |Mac OS X |Android )([\d._]+)/.exec(e)?.[1]?.replaceAll("_","."),i={system:`${t}${s?` ${s}`:""}`,client:`${n}${o.length?` ${o.at(-1)[1]}`:""}`,mode:matchMedia("(display-mode: standalone)").matches||navigator.standalone?"已安装的网页应用":"网页"},a=ft();if(a){i.mode="桌面客户端";const d=/Electron\/([\d.]+)/.exec(e)?.[1];i.client=d?`Termdock(Electron ${d})`:"Termdock";try{Object.assign(i,await a.deviceInfo?.())}catch{}return i}const c=navigator.userAgentData;try{const d=await c?.getHighEntropyValues(["model","architecture","bitness","platformVersion"]);typeof d?.model=="string"&&d.model&&(i.model=d.model),typeof d?.architecture=="string"&&d.architecture&&(i.arch=`${d.architecture}${d.bitness?` ${d.bitness} 位`:""}`)}catch{}return i})()}async function um(e){const t=Promise.resolve(e);t.catch(()=>{});try{return typeof ClipboardItem<"u"&&typeof navigator.clipboard?.write=="function"?await navigator.clipboard.write([new ClipboardItem({"text/plain":t.then(n=>new Blob([n],{type:"text/plain"}))})]):await navigator.clipboard.writeText(await t),!0}catch{return!1}}function nc(e){if(!e?.isConnected||e.matches(':disabled, [aria-disabled="true"]'))return!1;let t=e;for(;t;){if(t.matches('[hidden], [inert], [aria-hidden="true"]'))return!1;const n=t.ownerDocument.defaultView?.getComputedStyle(t);if(n?.display==="none"||n?.visibility==="hidden"||n?.visibility==="collapse")return!1;if(t.parentElement)t=t.parentElement;else try{t=t.ownerDocument.defaultView?.frameElement??null}catch{return!1}}return!0}function rB(e=document){const t=e.activeElement;return!e.hidden&&e.hasFocus()&&(!t||t===e.body||t===e.documentElement)}function R_(e,t){if(!nc(e))return!1;const n=e.ownerDocument;if(n.hidden||!n.hasFocus())return!1;const r=n.activeElement;return!r||r===n.body||r===n.documentElement||r===e||!!t?.contains(r)}function T_(e,t){R_(e,t)&&e.ownerDocument.activeElement!==e&&e.focus({preventScroll:!0})}const hr=[],Rs=new Set,pr=()=>Rs.forEach(e=>e()),fm=new WeakMap;let Sr;function iu(){if(!Sr)return;Sr.disconnect(),Sr.observe(document.body,{childList:!0});const e=new Set;for(const t of hr)for(let n=t.element;n&&!e.has(n);n=n.parentElement)e.add(n),Sr.observe(n,{childList:n===document.body,attributes:!0,attributeFilter:["hidden","inert","aria-hidden","style","class"]})}function A_(e){return Rs.add(e),Rs.size===1&&(Sr=new MutationObserver(pr),iu(),window.addEventListener(Br,pr),document.addEventListener("visibilitychange",pr)),()=>{Rs.delete(e),Rs.size||(Sr?.disconnect(),Sr=void 0,window.removeEventListener(Br,pr),document.removeEventListener("visibilitychange",pr))}}function Ox(e){if(typeof document>"u"||document.hidden||!Tr())return null;const t=document.querySelector('[data-desktop-confirmation="true"]');if(nc(t)){let n=fm.get(t);return n||(n={element:t},fm.set(t,n)),n}return[...hr].reverse().find(n=>n===e||nc(n.element))??null}const Jt=()=>Ox(),P_=()=>Jt()!==null;function Ff(e){if(!Tr()||!nc(e))return!1;const t=Jt(),n=t?rc(t.element):[document.body];return e.isConnected&&!e.closest('[hidden], [inert], [aria-hidden="true"]')&&(!t||n.some(r=>r.contains(e)))&&Mx(e,n)}function oB(){return y.useSyncExternalStore(A_,P_,()=>!1)}function rc(e){const t=Array.from(document.querySelectorAll("[data-sidebar-composer-popover]")).filter(n=>e.id&&n.dataset.sidebarComposerPopover===e.id);return[e,...t]}function Mx(e,t){for(let n=e;n;n=n.parentElement){const r=getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden")return!1;if(t.includes(n))break}return!0}function hm(e){const t=rc(e);return t.flatMap(n=>Array.from(n.querySelectorAll("button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], summary, iframe, [tabindex]"))).filter(n=>{const r=n.closest("details:not([open])"),o=r?.querySelector("summary");return n.tabIndex>=0&&!n.matches(":disabled")&&!n.closest('[hidden], [inert], [aria-hidden="true"]')&&(!r||!!o?.contains(n))&&Mx(n,t)})}function Si(e,t,n,r){const o=y.useRef(n);o.current=n;const s=y.useRef(r);s.current=r,y.useLayoutEffect(()=>{const i=e.current;if(!t||!i)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,c={element:i},d=hr.findIndex(b=>i.contains(b.element));d<0?hr.push(c):hr.splice(d,0,c),iu(),pr();const u=()=>Jt()===c,f=b=>b instanceof Node&&rc(i).some(w=>w.contains(b)),h=()=>(hm(i)[0]??i).focus({preventScroll:!0});u()&&!f(document.activeElement)&&h();const p=b=>{document.hasFocus()&&u()&&!f(b.target)&&h()},m=b=>{if(!u()||b.key!=="Tab"||b.defaultPrevented)return;const w=hm(i),E=w[0],v=w[w.length-1];(!E||!f(document.activeElement)||(b.shiftKey?document.activeElement===E:document.activeElement===v))&&(b.preventDefault(),(b.shiftKey?v:E)?.focus({preventScroll:!0}))},g=b=>{!u()||b.key!=="Escape"||b.defaultPrevented||b.isComposing||(b.preventDefault(),b.stopImmediatePropagation(),o.current())};return document.addEventListener("focusin",p,!0),document.addEventListener("keydown",m,!0),document.addEventListener("keydown",g),()=>{const b=Ox(i.isConnected?void 0:c)===c;if(hr.splice(hr.indexOf(c),1),iu(),pr(),document.removeEventListener("focusin",p,!0),document.removeEventListener("keydown",m,!0),document.removeEventListener("keydown",g),b){const w=Jt();queueMicrotask(()=>{if(Jt()!==w||!Tr())return;const E=a?.isConnected&&a!==document.body?a:s.current?.();E&&w&&!rc(w.element).some(v=>v.contains(E))||T_(E,i)})}}},[t,e])}function N_(e){return!e||e.length>128||!/^(?:[0-9a-zA-Z_.:\-]+|\[[0-9a-fA-F:.]+\]:\d{1,5})$/.test(e)?!1:e.startsWith("[")||/^[^:]+:\d+$/.test(e)?__(e)!==null:!0}function __(e){let t=e.trim();const n=/^[a-z]+:\/\/([^/]+)/i.exec(t);n&&(t=n[1]),t=t.replace(/^\/+|\/+$/g,"");const r=/^\[([^\]]+)\](?::(\d{1,5}))?$/.exec(t);if(r){try{new URL(`http://[${r[1]}]`)}catch{return null}const i=r[2]??"5555";return Number(i)>=1&&Number(i)<=65535?`[${r[1]}]:${i}`:null}if(!/^[0-9a-zA-Z_.\-]+(?::\d{1,5})?$/.test(t))return null;const[o,s="5555"]=t.split(":");return/^\d+\.\d+\.\d+\.\d+$/.test(o)&&o.split(".").some(i=>Number(i)>255)?null:Number(s)>=1&&Number(s)<=65535?`${o}:${s}`:null}function L_(e){return e.physicalId?`physical:${e.physicalId}`:`serial:${e.serial}`}function Bx(e,t=""){const n=new Map,r=o=>(o.state==="device"?0:10)+(o.serial===t?0:o.isNetwork?o.serial.startsWith("[")?3:2:1);for(const o of e){const s=L_(o),i=n.get(s);i?(i.routes.push(o),r(o)<r(i.device)&&(i.device=o)):n.set(s,{key:s,device:o,routes:[o]})}return[...n.values()]}function sB(e,t,n){const r=Bx(e,t),o=e.find(a=>a.serial===t),s=n||o?.physicalId;if(s)return r.find(a=>a.device.physicalId===s)?.device;if(t)return o;const i=r.filter(a=>a.device.state==="device");return i.length===1?i[0].device:void 0}function iB(e,t){const n=e?.filter(r=>r.serial===t)||[];return n.some(r=>r.access==="control")?"control":n.length?"view":void 0}async function Wr(e,t){const n=await fetch(e,{...t,headers:{"Content-Type":"application/json",Accept:"application/json",...t?.headers??{}}}),r=await n.json().catch(()=>null);if(!n.ok||!r){const o=r?.error||r?.code||`ANDROID_REQUEST_FAILED_${n.status}`;throw new Error(o)}return r}async function Fx(){return Wr("/api/android/devices")}async function aB(e){return Wr("/api/android/connect",{method:"POST",body:JSON.stringify({address:e})})}const Ux=[{id:"low",maxSize:720,bitRate:12e5,maxFps:30},{id:"medium",maxSize:1080,bitRate:4e6,maxFps:30},{id:"high",maxSize:1600,bitRate:8e6,maxFps:60}],pm=Ux[1];function cB(e){if(!e||typeof e!="object")return pm;const t=e;if(t.id==="auto")return{id:"auto",maxSize:1600,bitRate:4e6,maxFps:30};const n=Ux.find(i=>i.id===t.id);if(n)return n;if(t.id!=="custom")return pm;const r=typeof t.maxSize=="number"?Math.max(360,Math.min(2160,Math.round(t.maxSize))):1080,o=typeof t.bitRate=="number"?Math.max(3e5,Math.min(3e7,Math.round(t.bitRate))):4e6,s=typeof t.maxFps=="number"?Math.max(0,Math.min(60,Math.round(t.maxFps))):30;return{id:"custom",maxSize:r,bitRate:o,maxFps:s}}function lB(e,t){if(!N_(e))throw new Error("INVALID_SERIAL");const n=new URLSearchParams;t&&(n.set("max_size",String(t.maxSize)),n.set("bit_rate",String(t.bitRate)),t.maxFps>0&&n.set("max_fps",String(t.maxFps)));const r=n.toString();return`/api/android/${e}/ws${r?`?${r}`:""}`}function dB(e){const t={ADB_UNAVAILABLE:"本机没有可用的 adb,请先安装 Android platform-tools。",ADB_NOT_FOUND:"找不到 adb 可执行文件,可用 TERMDOCK_ADB_BIN 指定路径。",SCRCPY_NOT_FOUND:"本机没有 scrcpy,请先安装(含 scrcpy-server)。",SCRCPY_SERVER_NOT_FOUND:"找不到 scrcpy-server,可用 TERMDOCK_SCRCPY_SERVER 指定路径。",SCRCPY_VERSION_UNKNOWN:"无法读取 scrcpy 版本,请确认 scrcpy --version 可执行。",SCRCPY_CONNECT_TIMEOUT:"设备连接超时,请确认已授权 USB 调试并保持解锁。",SCRCPY_UNSUPPORTED_CODEC:"设备返回了不支持的视频编码。",INVALID_ADDRESS:"地址格式不正确,应为 ip:port。",API_NOT_ALLOWED:"当前邀请未授权这台手机或此项操作。"};for(const[n,r]of Object.entries(t))if(e.includes(n))return r;return e}function uB(e){return Wr(`/api/android/recordings?serial=${encodeURIComponent(e)}`)}function fB(e){return Wr("/api/android/recordings",{method:"POST",body:JSON.stringify({serial:e})})}function hB(e){return Wr(`/api/android/recordings/${encodeURIComponent(e)}/stop`,{method:"POST"})}function pB(e,t){return Wr(`/api/android/recordings/${encodeURIComponent(e)}/save`,{method:"POST",body:JSON.stringify({directory:t})})}function mB(e){return Wr(`/api/android/recordings/${encodeURIComponent(e)}`,{method:"DELETE"})}function Hx(e,t=[]){const n=new Map(e.map(o=>[o.serial,o]));for(const o of t)n.has(o.serial)||n.set(o.serial,{serial:o.serial,state:"unknown"});const r=[...n.values()];return Bx(r).map(({device:o,routes:s})=>{const i=s.map(c=>c.serial),a=t.filter(c=>i.includes(c.serial));return{device:o,serials:i,access:a.some(c=>c.access==="control")?"control":a.length?"view":void 0}})}function mm(e=[],t,n){return[...e.filter(r=>!t.includes(r.serial)),...n?t.map(r=>({serial:r,access:n})):[]]}function D_(e){const t=e==="darwin"?"mac":e==="win32"?"windows":"linux",n={host:"127.0.0.1",platform:t,protocol:t==="mac"?"vnc":"rdp",port:"3389",username:"",domain:"",ignoreCert:!1,rememberLogin:!0};return{target:"local",local:n,remote:{...n,host:""},viewOnly:!1,fit:!0,autoConnect:!0}}function j_(e,t){const n=D_(t);if(!e||typeof e!="object")return n;const r=e,o=(s,i)=>{const a=s&&typeof s=="object"?s:{},c=(d,u)=>typeof a[d]=="string"&&a[d].length<=u&&!/[\x00-\x1f]/.test(a[d])?a[d]:i[d];return{host:c("host",253),username:c("username",255),domain:c("domain",255),platform:["mac","linux","windows"].includes(String(a.platform))?a.platform:i.platform,protocol:a.protocol==="rdp"||a.protocol==="vnc"?a.protocol:i.protocol,port:typeof a.port=="string"&&/^\d{0,5}$/.test(a.port)&&Number(a.port)<=65535?a.port:i.port,ignoreCert:a.ignoreCert===!0,rememberLogin:a.rememberLogin!==!1}};return{target:r.target==="remote"?"remote":"local",local:{...o(r.local,n.local),host:"127.0.0.1"},remote:o(r.remote,n.remote),viewOnly:r.viewOnly===!0,fit:r.fit!==!1,autoConnect:r.autoConnect!==!1}}function gB(e){return JSON.stringify([e.host.trim().toLowerCase(),e.protocol,e.protocol==="vnc"?5900:Number(e.port),e.username.trim(),e.domain.trim()])}function $x({status:e,error:t}){const{t:n}=Nt();return e==="error"?`${n("rightSidebar.downloadFailed")}: ${t||""}`:n(e==="saved"?"rightSidebar.downloadSaved":e==="canceled"?"rightSidebar.downloadCanceled":e==="started"?"rightSidebar.downloadStarted":e==="pending"?"common.cancel":"rightSidebar.downloadFile")}function zx({status:e,error:t,cancel:n,className:r="mt-2 text-xs"}){const o=$x({status:e,error:t});return e==="idle"?null:e==="pending"?n?l.jsx("button",{type:"button",className:"min-h-9 rounded-md px-2 text-xs text-muted-foreground hover:bg-surface-2",onClick:s=>{s.stopPropagation(),n()},children:o}):null:l.jsx("div",{role:e==="error"?"alert":"status",className:`${r} ${e==="error"?"text-destructive":"text-muted-foreground"}`,children:o})}const gm={status:"idle",error:null,result:null};function O_(e,t,n=!0){const[r,o]=y.useState(gm),s=y.useRef(null);y.useEffect(()=>bS(c=>{const d=s.current;!d||d.targetPeerId===c?.targetPeerId||(s.current=null,d.controller.abort(new DOMException("Download target changed","AbortError")),o({status:"canceled",error:null,result:"canceled"}))}),[]),y.useLayoutEffect(()=>(o(gm),()=>{const c=s.current;s.current=null,c?.controller.abort()}),[t,n]);const i=y.useCallback(()=>{const c=s.current;c&&(s.current=null,c.controller.abort(),o({status:"canceled",error:null,result:"canceled"}))},[]),a=y.useCallback(async()=>{if(!n||s.current)return;const c=new AbortController,d=dt()?.targetPeerId;s.current={controller:c,targetPeerId:d},o({status:"pending",error:null,result:null});try{const u=await e(c.signal);if(s.current?.controller!==c)return;s.current=null;const f=c.signal.aborted?"canceled":u;o({status:f,error:null,result:f})}catch(u){if(s.current?.controller!==c)return;s.current=null,c.signal.aborted?o({status:"canceled",error:null,result:"canceled"}):o({status:"error",error:u instanceof Error?u.message:String(u),result:null})}},[e,n]);return{...r,start:a,cancel:i}}function Uf(e,t=!0){const n=y.useCallback(r=>Ax(e,r),[e]);return O_(n,e,t&&!!e)}function M_(e){if(!e||typeof e!="object")return!1;const t=e;if(!["file","directory","code"].includes(t.kind)||typeof t.path!="string"||!t.path.startsWith("/")||t.path.length>4096||/[\r\n\0]/.test(t.path)||typeof t.text!="string"||!t.text||t.text.length>32e3||t.id!==void 0&&(typeof t.id!="string"||!/^[a-f\d-]{36}$/i.test(t.id)))return!1;const n=t.lines;return n&&(!Number.isSafeInteger(n.start)||!Number.isSafeInteger(n.end)||n.start<1||n.end<n.start)?!1:t.kind!=="code"||!!n}function yB(e){const t=e.path.replace(/\/$/,"").split("/").pop()||"/";return e.lines?`${t} · L${e.lines.start}${e.lines.end===e.lines.start?"":`–${e.lines.end}`}`:t}const Hf="application/x-termdock-file-reference",qx=()=>se()?.targetPeerId||location.origin;function B_(e,t,n){e.setData("text/plain",t),e.setData(Hf,JSON.stringify({service:qx(),text:t,...n?{reference:{...n,text:t}}:{}}))}function Kx(e){const t=e.getData(Hf);if(!t)return null;try{const n=JSON.parse(t);if(n.service!==qx())throw new Error("请在文件所属的服务中引用");return typeof n.text!="string"||!n.text?null:n.text}catch(n){if(n instanceof SyntaxError)return null;throw n}}function wB(e){const t=Kx(e);if(!t)return null;const n=JSON.parse(e.getData(Hf));return M_(n.reference)&&n.reference.text===t?n.reference:null}function F_(e,t){if(!e||e.startsWith("/"))return e;const n=e.replace(/^\.\//,"");return t?`${t.replace(/\/+$/,"")}/${n}`:n}function Gx(e,t){return F_(e,t).replace(/ /g,"\\ ")}function U_(e,t){return`${Gx(e,t)} `}function ym(e,t){return Gx(e,t)}function bB(e,t,n){if(!n)return ym(e,t);const r=n.start===n.end?`${n.start}`:`${n.start}-${n.end}`;return`${ym(e,t)}:${r}`}const H_=new Set,$_=new Set(["session.view","session.input","session.resize","session.owner-menu","session.share","todo.guidance","resource.android","resource.computer","resource.files","collaboration.mention"]);function Wx(e){const t=[];return e.android?.length&&t.push("android"),e.computers?.length&&t.push("computer"),e.directories?.length&&t.push("files"),t}function z_(e,t={}){const n=new Set;e&&n.add("session.view"),e?.canWrite===!0&&n.add("session.input"),e?.canResize===!0&&n.add("session.resize");for(const r of Wx(t))n.add(`resource.${r}`);return n}const Vx=y.createContext(void 0),$f=()=>y.useContext(Vx),Yx=y.createContext(void 0);function vB(){const e=y.useContext(Yx),t=$f();return e??(t===void 0?$_:H_)}function q_(e){e.stopPropagation();const t=e.target;!((t instanceof HTMLTextAreaElement||t instanceof HTMLInputElement)&&t.selectionStart!==null&&t.selectionStart!==t.selectionEnd)&&!window.getSelection()?.toString()&&e.preventDefault()}async function K_(e){const t=ft();return t?.confirmationUI==="page-v1"&&t.confirm?await t.confirm(e):window.confirm(e.message)}function G_(e){const t=ft();t?.confirmationUI==="page-v1"&&t.alert?t.alert(e):window.alert(e)}async function W_(e,t){if(!e.busy){e.busy=!0,t.pending(!0);try{if(!await t.confirm())return;if(!t.current())throw new Error(t.expiredMessage);const n=await t.submit(t.current);t.current()&&t.apply(n)}catch(n){t.current()&&t.failure(n instanceof Error?n.message:String(n))}finally{e.busy=!1,t.pending(!1)}}}function V_(){const{t:e}=Nt();return l.jsxs("div",{role:"status",className:"td-loading-skeleton overflow-hidden px-3 py-2",children:[l.jsx("span",{className:"sr-only",children:e("common.loading")}),l.jsx("div",{"aria-hidden":"true",children:["w-2/5","w-3/5","w-1/3","w-1/2","w-2/5","w-1/3"].map((t,n)=>l.jsxs("div",{className:"flex h-8 items-center gap-2",style:{paddingLeft:n>1&&n<5?20:0},children:[l.jsx("div",{className:"h-3 w-3 shrink-0 rounded-sm bg-surface-2"}),l.jsx("div",{className:`h-2 rounded bg-surface-2 ${t}`})]},n))})]})}function ya(e,t,n=new Set){for(const r of e.keys()){if(e.size<=t)break;n.has(r)||e.delete(r)}return e}function ti(e){return e.replace(/\/+$/,"")||"/"}function Y_(e){const t=ti(e);return t.slice(0,t.lastIndexOf("/"))||"/"}function Xx(e,t){const n=ti(e),r=ti(t);return n===r||n.startsWith(r==="/"?"/":`${r}/`)}function xB(e,t){if(!Xx(e,t))return null;const n=ti(e),r=ti(t);return n===r?"":n.slice(r==="/"?1:r.length+1)}function Jx(e){return{setDirectoryCache:(t,n)=>e(r=>{const o=new Map(r.directoryCache);return o.delete(t),o.set(t,n),ya(o,128,new Set([...r.expandedPaths,t,r.explorerRoot??r.rootPath??""])),{directoryCache:o}}),invalidateDirectoryCache:(t,n=!1)=>e(r=>{const o=new Map(r.directoryCache);for(const s of o.keys())(s===t||n&&Xx(s,t))&&o.delete(s);return{directoryCache:o}}),toggleExpanded:t=>e(n=>{const r=new Set(n.expandedPaths);return r.has(t)?r.delete(t):r.add(t),{expandedPaths:r}})}}const $o=320,Zx=280,au=5,X_="(min-width: 1024px)";function Qn(){return typeof window>"u"||window.matchMedia?.(X_).matches===!0}function SB(e,t,n){const r=t-Zx-(n?$o+au*2:au);return Math.min(Math.max(200,Math.min(500,r)),Math.max(200,e))}function wn(e,t){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(e);if(n===null||n==="")return null;const r=JSON.parse(n);return t(r)?r:null}catch{return null}}function en(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function oo(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}const Us=new Map,Ao=new Map,wa=new Map;function EB(e,t,n){if(typeof window>"u")return;const r=Date.now(),o=wa.get(e)??0,s=r-o;if(s>=n){wa.set(e,r),en(e,t);return}if(Ao.set(e,t),Us.has(e))return;const i=n-s,a=setTimeout(()=>{Us.delete(e);const c=Ao.get(e);Ao.delete(e),wa.set(e,Date.now()),c!==void 0&&en(e,c)},i);Us.set(e,a)}function J_(e){const t=Us.get(e);t&&(clearTimeout(t),Us.delete(e));const n=Ao.get(e);n!==void 0&&(Ao.delete(e),wa.set(e,Date.now()),en(e,n))}function kB(e,t){if(e===t)return!0;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}if(typeof window<"u"){const e=()=>{for(const t of Ao.keys())J_(t)};window.addEventListener("pagehide",e),window.addEventListener("termdock:before-update",e),document.addEventListener("visibilitychange",()=>{document.hidden&&e()})}const Z_=600;function IB(e,t,n=0){const r=Math.max($o,t-Math.max(0,n)-au*(n>0?2:1)-Zx);return Math.min(r,Math.max($o,e))}const Qx="termdock:right-sidebar:tabs-by-session:v2",e0="termdock:right-sidebar:explorer-roots-by-session:v2",zf="termdock:right-sidebar:pinned-explorer-roots:v1",t0="termdock:right-sidebar:selected-files-by-session:v2",n0="termdock:right-sidebar:show-hidden-files:v1",cu="termdock:right-sidebar:file-sort-modes:v1",lu="termdock:right-sidebar:nested-git-scan-roots:v1",r0="termdock:right-sidebar:active-git-repo:v2",Q_="termdock:right-sidebar:active-git-repo:v1",wm="termdock-sidebar-group-by-folder",o0="termdock-sidebar-collapsed-folder-groups",eL="termdock-left-sidebar-pinned",s0="termdock-left-sidebar-width",tL="termdock-right-sidebar-pinned",i0="termdock:desktop-sidebar-open:v1",a0="termdock-right-sidebar-width",qf="termdock:right-sidebar:widths-by-session:v1",c0="termdock:right-sidebar:split-state-initialized:v1",l0="termdock-right-sidebar-layout-preference";function bm(e){const t=e==="left";if(typeof window>"u")return t;try{const n=window.localStorage.getItem(`${i0}:${e}`);if(n==="1"||n==="0")return n==="1";const r=window.localStorage.getItem(e==="left"?eL:tL);return r==="1"||r==="0"?r==="1":t}catch{return t}}function er(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(`${i0}:${e}`,t?"1":"0")}catch{}}function nL(){if(typeof window>"u")return 300;try{const e=window.localStorage.getItem(s0);if(!e)return 300;const t=parseInt(e,10);return Number.isFinite(t)&&t>=200&&t<=500?t:300}catch{return 300}}function rL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(s0,String(e))}catch{}}function ba(){if(typeof window>"u")return 760;try{const e=window.localStorage.getItem(a0);if(!e)return 760;const t=parseInt(e,10);return Number.isFinite(t)&&t>=$o?t:760}catch{return 760}}function oL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(a0,String(e))}catch{}}function sL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>typeof t=="number"&&Number.isFinite(t)&&t>=$o)}function oc(){return wn(qf,sL)??{}}function Qi(e,t){if(!e){oL(t);return}en(qf,{...oc(),[e]:t})}function iL(){if(typeof window>"u")return"auto";try{const e=window.localStorage.getItem(l0);return e==="narrow"||e==="wide"?e:"auto"}catch{return"auto"}}function aL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(l0,e)}catch{}}function CB(e,t,n){return!t||n==="auto"?e<Z_:n==="narrow"}function cL(){return!0}function vm(e){if(!(typeof window>"u"))try{e?window.localStorage.setItem(wm,"1"):window.localStorage.setItem(wm,"0")}catch{}}function lL(){if(typeof window>"u")return new Set;try{const e=window.localStorage.getItem(o0);if(!e)return new Set;const t=JSON.parse(e);return Array.isArray(t)?new Set(t.filter(n=>typeof n=="string")):new Set}catch{return new Set}}function dL(e){if(!(typeof window>"u"))try{window.localStorage.setItem(o0,JSON.stringify([...e]))}catch{}}function uL(e){return e==="git"||e==="files"||e==="diff"||e==="android"||e==="computer"||e==="architecture"}function fL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(uL)}function du(){return wn(Qx,fL)??{}}function so(e,t){e&&en(Qx,{...du(),[e]:t})}function hL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>typeof t=="string")}function xm(){return wn(e0,hL)??{}}function ea(e){en(e0,e)}function pL(e){return e!==null&&typeof e=="object"&&typeof e.path=="string"&&(e.kind==="file"||e.kind==="directory")}function mL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>Array.isArray(t)&&t.every(n=>typeof n=="string"||pL(n)))}function d0(e){const t=new Set,n=[];for(const r of e){const o=typeof r=="string"?{path:r,kind:"directory"}:r;!o.path||t.has(o.path)||(t.add(o.path),n.push(o))}return n}function gL(){const e=wn(zf,mL)??{},t={};for(const[n,r]of Object.entries(e))t[n]=d0(r);return t}function Sm(e){en(zf,e)}function yL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>typeof t=="string")}function uu(){return wn(t0,yL)??{}}function fs(e,t){if(!e)return;const n={...uu()};t?n[e]=t:delete n[e],en(t0,n)}function Hs(e,t){return t?e?`${e}\0${t}`:t:null}function fu(e,t,n){return n?`split-workspace\0${n}`:Hs(e,t)}function RB(e,t,n){const r=oc(),o=fu(e,t,n);if(o&&r[o]!==void 0)return r[o];if(n){const s=Hs(e,t);if(s&&r[s]!==void 0)return r[s]}return ba()}function u0(){const e=wn(c0,t=>Array.isArray(t)&&t.every(n=>typeof n=="string"));return new Set(e??[])}function wL(e){const t=u0();t.has(e)||(t.add(e),en(c0,[...t]))}function bL(e){return typeof e=="boolean"}function vL(){return wn(n0,bL)??!1}function xL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>t==="modified")}function SL(){return wn(cu,xL)??{}}function EL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.values(e).every(t=>t===!0)}function kL(){return wn(lu,EL)??{}}function IL(e){return!e||typeof e!="object"||Array.isArray(e)?!1:Object.entries(e).every(([t,n])=>t.length>0&&typeof n=="string"&&n.length>0)}function CL(){return wn(r0,IL)??{}}function Em(e){en(r0,e)}let hs=null,ps=null;const Pl=new Map;let ms=null;const ta=new Map;let gs=null;const Nl=new Set;let ys=null;const _l=globalThis.crypto?.randomUUID?.()??`pins-${Math.random().toString(36).slice(2)}`;function io(e,t){const n=e.replace(/\/+$/,"")||"/";return t===n||t.startsWith(`${n}/`)}function km(e,t="name"){return[...e].sort((n,r)=>{if(n.type==="directory"&&r.type!=="directory")return-1;if(n.type!=="directory"&&r.type==="directory")return 1;if(t==="modified"){const o=Date.parse(r.modified??"")-Date.parse(n.modified??"");if(Number.isFinite(o)&&o!==0)return o}return n.name.localeCompare(r.name)})}function RL(e){return e.entry?{name:e.entry.name,path:e.entry.path,type:e.entry.type,isSymlink:e.entry.isSymlink,modified:e.entry.modified,expanded:!1,loaded:!1,children:e.entry.type==="directory"?[]:void 0}:null}const _e=dr(e=>({...Jx(e),leftOpen:!1,rightOpen:!1,desktopLeftOpen:bm("left"),leftSidebarWidth:nL(),desktopRightOpen:bm("right"),rightSidebarWidth:ba(),rightSidebarLayoutPreference:iL(),initialRightSidebarStateBySession:new Map,rightTab:"files",rightSearchOpen:!1,pendingTerminalPath:null,rootPath:null,contextKey:null,rightSidebarWidthContextKey:null,explorerRoot:null,explorerRootCache:xm(),pinnedExplorerRootsCache:gL(),pinnedExplorerRootsHydrated:!1,expandedPaths:new Set,selectedFilePath:null,directoryCache:new Map,fileSortModes:SL(),fileSortModesHydrated:!1,hideGitIgnoredRoots:{},gitIgnoreExceptions:{},hideGitIgnoredRootsHydrated:!1,nestedGitScanRoots:kL(),nestedGitScanRootsHydrated:!1,activeGitRepos:CL(),activeGitReposHydrated:!1,showHiddenFiles:vL(),groupByFolder:cL(),collapsedGroups:lL(),changedFiles:new Map,fileChangeVersions:new Map,fileWatchEpoch:0,gitBundleLoading:!1,gitBundleSlow:!1,gitBundleLoadingOwner:null,gitBundleError:null,gitBundleLastLoadedAt:null,gitBundleCacheInfo:null,projectStateCache:new Map,rootDataCache:new Map,openLeft:()=>e(()=>Qn()?(er("left",!0),{desktopLeftOpen:!0}):{leftOpen:!0,rightOpen:!1}),closeLeft:()=>e(()=>Qn()?(er("left",!1),{desktopLeftOpen:!1}):{leftOpen:!1}),toggleLeft:()=>e(t=>Qn()?(er("left",!t.desktopLeftOpen),{desktopLeftOpen:!t.desktopLeftOpen}):{leftOpen:!t.leftOpen,rightOpen:t.leftOpen?t.rightOpen:!1}),setDesktopSidebarOpen:(t,n)=>e(()=>(er(t,n),t==="left"?{desktopLeftOpen:n}:{desktopRightOpen:n})),setLeftSidebarWidth:t=>e(n=>{const r=Math.min(Math.max(t,200),500);return n.leftSidebarWidth===r?n:(rL(r),{leftSidebarWidth:r})}),setRightSidebarWidth:t=>e(n=>{const r=Math.max(t,$o);return n.rightSidebarWidth===r?n:(Qi(n.rightSidebarWidthContextKey,r),{rightSidebarWidth:r})}),setRightSidebarLayoutPreference:t=>e(n=>n.rightSidebarLayoutPreference===t?n:(aL(t),{rightSidebarLayoutPreference:t})),openTerminalPath:t=>e(n=>(so(n.contextKey,"files"),Qn()&&er("right",!0),{pendingTerminalPath:{...t},rightTab:"files",...Qn()?{desktopRightOpen:!0}:{rightOpen:!0,leftOpen:!1}})),openRight:()=>e(()=>Qn()?(er("right",!0),{desktopRightOpen:!0}):{rightOpen:!0,leftOpen:!1}),closeRight:()=>e(()=>Qn()?(er("right",!1),{desktopRightOpen:!1}):{rightOpen:!1}),toggleRight:()=>e(t=>Qn()?(er("right",!t.desktopRightOpen),{desktopRightOpen:!t.desktopRightOpen}):{rightOpen:!t.rightOpen,leftOpen:t.rightOpen?t.leftOpen:!1}),closeAll:()=>e({leftOpen:!1,rightOpen:!1}),setRightTab:t=>e(n=>(so(n.contextKey,t),{rightTab:t})),openRightSearch:()=>e({rightSearchOpen:!0}),closeRightSearch:()=>e({rightSearchOpen:!1}),setRightSearchOpen:t=>e({rightSearchOpen:t}),initializeRightSidebarForSession:(t,n,r)=>e(o=>{const s=Hs(t,n);s&&(Qi(s,r.rightSidebarWidth),so(s,r.rightTab));const i=new Map(o.initialRightSidebarStateBySession);return i.set(t,{...r}),{initialRightSidebarStateBySession:i}}),setRootPath:(t,n=null,r=null)=>e(o=>{const s=Hs(n,t),i=fu(n,t,r),a=r?i:s,c=n&&!r?o.initialRightSidebarStateBySession.get(n):void 0;if(!c&&o.contextKey===a&&o.rightSidebarWidthContextKey===i)return t===o.rootPath?o:{rootPath:t};const d=new Map(o.initialRightSidebarStateBySession);c&&s&&n&&(Qi(s,c.rightSidebarWidth),so(s,c.rightTab),d.delete(n));const u=new Map(o.rootDataCache);o.rootPath&&u.set(o.rootPath,{directoryCache:o.directoryCache,changedFiles:o.changedFiles,gitBundleError:o.gitBundleError,gitBundleLastLoadedAt:o.gitBundleLastLoadedAt,gitBundleCacheInfo:o.gitBundleCacheInfo}),ya(u,12,new Set(t?[t]:[]));const f=t?u.get(t):void 0,h=t===o.rootPath,p=new Map(o.projectStateCache);o.contextKey&&p.set(o.contextKey,{rightTab:o.rightTab,explorerRoot:o.explorerRoot,expandedPaths:new Set(o.expandedPaths),selectedFilePath:o.selectedFilePath,directoryCache:new Map(o.directoryCache),changedFiles:new Map(o.changedFiles),gitBundleError:o.gitBundleError,gitBundleLastLoadedAt:o.gitBundleLastLoadedAt,gitBundleCacheInfo:o.gitBundleCacheInfo});const m=r?u0().has(r):!1;let g={...xm(),...o.explorerRootCache};const b=!!r&&!m,w=b&&s?o.contextKey===s?{rightTab:o.rightTab,explorerRoot:o.explorerRoot,expandedPaths:new Set(o.expandedPaths),selectedFilePath:o.selectedFilePath,directoryCache:new Map(o.directoryCache),changedFiles:new Map(o.changedFiles),gitBundleError:o.gitBundleError,gitBundleLastLoadedAt:o.gitBundleLastLoadedAt,gitBundleCacheInfo:o.gitBundleCacheInfo}:p.get(s):void 0;if(b&&r){const x=w?.rightTab??(s?du()[s]:void 0)??"files",S=w?.explorerRoot??(s?o.explorerRootCache[s]:void 0)??t,I=w?.selectedFilePath??(s?uu()[s]:void 0)??null,P={rightTab:x,explorerRoot:S,expandedPaths:new Set(w?.expandedPaths??[]),selectedFilePath:I,directoryCache:new Map(w?.directoryCache??[]),changedFiles:new Map(w?.changedFiles??[]),gitBundleError:w?.gitBundleError??null,gitBundleLastLoadedAt:w?.gitBundleLastLoadedAt??null,gitBundleCacheInfo:w?.gitBundleCacheInfo??null};a&&(p.set(a,P),so(a,x),fs(a,I),S&&(g={...g,[a]:S},ea(g))),wL(r)}ya(p,12,new Set(a?[a]:[]));const E=a?p.get(a):void 0,v=a?du()[a]:void 0,C=oc();let _=i?C[i]:void 0;r&&i&&_===void 0&&(_=(s?C[s]:void 0)??ba(),Qi(i,_));const R=a?g[a]:void 0,k=a?uu()[a]:void 0;return{rootPath:t,pendingTerminalPath:null,contextKey:a,rightSidebarWidthContextKey:i,initialRightSidebarStateBySession:d,rightSidebarWidth:c?.rightSidebarWidth??_??ba(),rightOpen:c?.rightOpen??(o.rightSidebarWidthContextKey===i?o.rightOpen:!1),rightTab:c?.rightTab??E?.rightTab??v??"files",explorerRoot:E?.explorerRoot??R??t,expandedPaths:E?new Set(E.expandedPaths):new Set,selectedFilePath:E?.selectedFilePath??k??null,explorerRootCache:g,directoryCache:f?.directoryCache??new Map,changedFiles:f?.changedFiles??new Map,gitBundleLoading:h?o.gitBundleLoading:!1,gitBundleSlow:h?o.gitBundleSlow:!1,gitBundleLoadingOwner:h?o.gitBundleLoadingOwner:null,gitBundleError:f?.gitBundleError??null,gitBundleLastLoadedAt:f?.gitBundleLastLoadedAt??null,gitBundleCacheInfo:f?.gitBundleCacheInfo??null,rootDataCache:u,projectStateCache:p}}),inheritRightSidebarStateFromSplitWorkspace:(t,n)=>e(r=>{if(!t||n.length===0)return r;const o=oc(),s=fu(null,null,t);if(!s)return r;const i=o[s]??(r.rightSidebarWidthContextKey===s?r.rightSidebarWidth:void 0),a=r.contextKey===s?{rightTab:r.rightTab,explorerRoot:r.explorerRoot,expandedPaths:new Set(r.expandedPaths),selectedFilePath:r.selectedFilePath,directoryCache:new Map(r.directoryCache),changedFiles:new Map(r.changedFiles),gitBundleError:r.gitBundleError,gitBundleLastLoadedAt:r.gitBundleLastLoadedAt,gitBundleCacheInfo:r.gitBundleCacheInfo}:r.projectStateCache.get(s);if(i===void 0&&!a)return r;const c={...o},d=new Map(r.projectStateCache),u={...r.explorerRootCache},f=new Map(r.initialRightSidebarStateBySession);for(const h of n){f.delete(h.sessionId);const p=Hs(h.sessionId,h.rootPath);p&&(i!==void 0&&(c[p]=i),a&&(d.set(p,{...a,expandedPaths:new Set(a.expandedPaths),directoryCache:new Map(a.directoryCache),changedFiles:new Map(a.changedFiles)}),so(p,a.rightTab),fs(p,a.selectedFilePath),a.explorerRoot?u[p]=a.explorerRoot:delete u[p]))}return i!==void 0&&en(qf,c),a&&ea(u),ya(d,12,new Set(r.contextKey?[r.contextKey]:[])),{projectStateCache:d,explorerRootCache:u,initialRightSidebarStateBySession:f}}),setExplorerRoot:t=>e(n=>{if(n.explorerRoot===t)return n;const r={...n.explorerRootCache};return n.contextKey&&t&&(r[n.contextKey]=t,ea(r)),{explorerRoot:t,explorerRootCache:r}}),resetExplorerToProject:()=>e(t=>{if(t.explorerRoot===t.rootPath)return t;const n={...t.explorerRootCache};return t.contextKey&&t.rootPath&&(n[t.contextKey]=t.rootPath,ea(n)),{explorerRoot:t.rootPath,explorerRootCache:n}}),pinExplorerRoot:(t,n="directory")=>e(r=>{if(!r.rootPath||!t)return r;const o=r.rootPath,s=r.pinnedExplorerRootsCache[r.rootPath]??[];if(s.some(a=>a.path===t))return r;const i={...r.pinnedExplorerRootsCache,[r.rootPath]:[{path:t,kind:n},...s].slice(0,12)};return Sm(i),(async()=>{try{await _e.getState().hydratePinnedExplorerRoots();const a=await Gt({pinnedExplorerRoot:{rootPath:o,path:t,kind:n,pinned:!0},pinnedExplorerRootsOrigin:_l});_e.getState().syncPinnedExplorerRoots(a.pinnedExplorerRoots??{})}catch{}})(),{pinnedExplorerRootsCache:i}}),unpinExplorerRoot:t=>e(n=>{if(!n.rootPath||!t)return n;const r=n.rootPath,o=n.pinnedExplorerRootsCache[n.rootPath]??[],s=o.find(c=>c.path===t);if(!o.some(c=>c.path===t))return n;const i=o.filter(c=>c.path!==t),a={...n.pinnedExplorerRootsCache};return i.length>0?a[n.rootPath]=i:delete a[n.rootPath],Sm(a),(async()=>{try{await _e.getState().hydratePinnedExplorerRoots();const c=await Gt({pinnedExplorerRoot:{rootPath:r,path:t,kind:s?.kind??"directory",pinned:!1},pinnedExplorerRootsOrigin:_l});_e.getState().syncPinnedExplorerRoots(c.pinnedExplorerRoots??{})}catch{}})(),{pinnedExplorerRootsCache:a}}),hydratePinnedExplorerRoots:async()=>{if(!_e.getState().pinnedExplorerRootsHydrated)return ys||(ys=(async()=>{const t=_e.getState().pinnedExplorerRootsCache;let r=(await sr()).pinnedExplorerRoots??{};Object.keys(r).length===0&&Object.keys(t).length>0&&(r=(await Gt({pinnedExplorerRoots:t,pinnedExplorerRootsOrigin:_l})).pinnedExplorerRoots??t),_e.getState().syncPinnedExplorerRoots(r)})().finally(()=>{ys=null}),ys)},syncPinnedExplorerRoots:t=>e(()=>{const n={};for(const[r,o]of Object.entries(t)){const s=d0(o);s.length>0&&(n[r]=s.slice(0,12))}return oo(zf),{pinnedExplorerRootsCache:n,pinnedExplorerRootsHydrated:!0}}),selectFile:t=>e(n=>(fs(n.contextKey,t),{selectedFilePath:t})),toggleShowHiddenFiles:()=>e(t=>{const n=!t.showHiddenFiles;en(n0,n);const r=new Map(t.projectStateCache);for(const[o,s]of r)r.set(o,{...s,directoryCache:new Map});return{showHiddenFiles:n,directoryCache:new Map,projectStateCache:r}}),toggleGroupByFolder:()=>e(t=>{const n=!t.groupByFolder;return vm(n),{groupByFolder:n}}),setGroupByFolder:t=>e(n=>n.groupByFolder===t?n:(vm(t),{groupByFolder:t})),toggleGroupCollapsed:t=>e(n=>{const r=new Set(n.collapsedGroups);return r.has(t)?r.delete(t):r.add(t),dL(r),{collapsedGroups:r}}),reconcileDirectoryCache:(t,n)=>e(r=>{const o=r.directoryCache.get(t);if(!o)return r;const s=new Map(o.map(u=>[u.path,u])),i=new Set(n.map(u=>u.path)),a=new Map(r.directoryCache),c=n.map(u=>{const f=s.get(u.path);return{name:u.name,path:u.path,type:u.type,isSymlink:u.isSymlink,modified:u.modified,expanded:f?.expanded??!1,loaded:f?.loaded??!1,children:u.type==="directory"?f?.children??[]:void 0}});a.set(t,km(c,r.fileSortModes[t]??"name"));for(const u of o)if(!i.has(u.path))for(const f of a.keys())io(u.path,f)&&a.delete(f);let d=r.selectedFilePath;return d&&o.find(f=>!i.has(f.path)&&io(f.path,d))&&(d=null,fs(r.rootPath,null)),{directoryCache:a,selectedFilePath:d}}),hydrateHideGitIgnoredRoots:async()=>{if(!_e.getState().hideGitIgnoredRootsHydrated)return hs||(hs=(async()=>{const t=await sr();e({hideGitIgnoredRoots:t.hideGitIgnoredRoots??{},gitIgnoreExceptions:t.gitIgnoreExceptions??{},hideGitIgnoredRootsHydrated:!0})})().finally(()=>{hs=null}),hs)},setHideGitIgnoredRoot:async(t,n)=>{const r=await Gt({hideGitIgnoredRoot:{rootPath:t,enabled:n}});e(o=>{const s=new Map(o.projectStateCache);for(const[i,a]of s)s.set(i,{...a,directoryCache:new Map});return{hideGitIgnoredRoots:r.hideGitIgnoredRoots??{},gitIgnoreExceptions:r.gitIgnoreExceptions??{},hideGitIgnoredRootsHydrated:!0,directoryCache:new Map,projectStateCache:s}})},setGitIgnoreExceptions:async(t,n)=>{const r=await Gt({gitIgnoreExceptions:{rootPath:t,paths:n}});e(o=>{const s=new Map(o.projectStateCache);for(const[i,a]of s)s.set(i,{...a,directoryCache:new Map});return{gitIgnoreExceptions:r.gitIgnoreExceptions??{},directoryCache:new Map,projectStateCache:s}})},hydrateFileSortModes:async()=>{if(!_e.getState().fileSortModesHydrated)return ps||(ps=(async()=>{const t=_e.getState().fileSortModes;let r=(await sr()).fileSortModes??{};Object.keys(r).length===0&&Object.keys(t).length>0&&(r=(await Gt({fileSortModes:t})).fileSortModes??t),oo(cu),e({fileSortModes:r,fileSortModesHydrated:!0,directoryCache:new Map})})().finally(()=>{ps=null}),ps)},setDirectorySortMode:async(t,n)=>{try{await _e.getState().hydrateFileSortModes()}catch{}const r=_e.getState().fileSortModes[t]??"name",o=(Pl.get(t)??0)+1;Pl.set(t,o),e(s=>{const i={...s.fileSortModes};n==="modified"?i[t]=n:delete i[t];const a=new Map(s.directoryCache);return a.delete(t),{fileSortModes:i,fileSortModesHydrated:!0,directoryCache:a}});try{await Gt({fileSortMode:{path:t,mode:n}}),oo(cu)}catch{if(Pl.get(t)!==o)return;e(s=>{const i={...s.fileSortModes};r==="modified"?i[t]=r:delete i[t];const a=new Map(s.directoryCache);return a.delete(t),{fileSortModes:i,directoryCache:a}})}},hydrateNestedGitScanRoots:async()=>{if(!_e.getState().nestedGitScanRootsHydrated)return ms||(ms=(async()=>{const n=(await sr()).nestedGitScanRoots??{};oo(lu),e({nestedGitScanRoots:n,nestedGitScanRootsHydrated:!0})})().finally(()=>{ms=null}),ms)},setNestedGitScanRoot:async(t,n)=>{try{await _e.getState().hydrateNestedGitScanRoots()}catch{}const r=!!_e.getState().nestedGitScanRoots[t],o=(ta.get(t)??0)+1;ta.set(t,o),e(s=>{const i={...s.nestedGitScanRoots};return n?i[t]=!0:delete i[t],{nestedGitScanRoots:i,nestedGitScanRootsHydrated:!0}});try{const s=await Gt({nestedGitScanRoot:{rootPath:t,enabled:n}});if(ta.get(t)!==o)return;e({nestedGitScanRoots:s.nestedGitScanRoots??{}}),oo(lu)}catch{if(ta.get(t)!==o)return;e(s=>{const i={...s.nestedGitScanRoots};return r?i[t]=!0:delete i[t],{nestedGitScanRoots:i}})}},hydrateActiveGitRepos:async()=>{if(!_e.getState().activeGitReposHydrated)return gs||(gs=(async()=>{const n=(await sr()).activeGitRepos??{},r={...n};for(const s of Nl){const i=_e.getState().activeGitRepos[s];i?r[s]=i:delete r[s]}const o=Object.entries(r).filter(([s])=>n[s]===void 0);for(const[s]of o)Nl.add(s);o.length>0&&await Promise.all(o.map(([s,i])=>Gt({activeGitRepo:{contextKey:s,repoRoot:i}}).catch(()=>{}))),Em(r),oo(Q_),e({activeGitRepos:r,activeGitReposHydrated:!0})})().finally(()=>{gs=null}),gs)},setActiveGitRepo:t=>{const{contextKey:n,activeGitRepos:r}=_e.getState();if(!n||(r[n]??null)===t)return;Nl.add(n);const o={...r};t?o[n]=t:delete o[n],e({activeGitRepos:o}),Em(o),Gt({activeGitRepo:{contextKey:n,repoRoot:t??null}}).catch(()=>{})},applyFileWatchEvents:t=>e(n=>{if(t.length===0)return n;const r=new Map(n.directoryCache),o=new Map(n.fileChangeVersions);let s=n.selectedFilePath,i=!1,a=!1,c=!1;const d=u=>{o.set(u,(o.get(u)??0)+1),a=!0};for(const u of t){if(u.type==="rescan-required"){c=!0,s&&io(u.path,s)&&d(s);continue}const f=Y_(u.path),h=r.get(f);if(u.type==="deleted"){if(d(u.path),s&&io(u.path,s)&&(s=null,fs(n.rootPath,null)),h){const w=h.filter(E=>E.path!==u.path);w.length!==h.length&&(r.set(f,w),i=!0)}for(const w of r.keys())io(u.path,w)&&(r.delete(w),i=!0);continue}d(u.path);const p=RL(u);if(!p||!h)continue;const m=h.find(w=>w.path===p.path),g=n.explorerRoot??n.rootPath;if(!m&&g&&n.hideGitIgnoredRoots[g]&&io(g,f))continue;const b=km(m?h.map(w=>w.path===p.path?{...w,...p,children:w.children}:w):[...h,p],n.fileSortModes[f]??"name");r.set(f,b),i=!0}return!i&&!a&&!c?n:{directoryCache:i?r:n.directoryCache,selectedFilePath:s,fileChangeVersions:a?o:n.fileChangeVersions,fileWatchEpoch:c?n.fileWatchEpoch+1:n.fileWatchEpoch}}),bumpFileWatchEpoch:()=>e(t=>({fileWatchEpoch:t.fileWatchEpoch+1})),setChangedFiles:t=>e({changedFiles:t}),beginGitBundleLoading:t=>e({gitBundleLoading:!0,gitBundleSlow:!1,gitBundleLoadingOwner:t}),setGitBundleSlowFor:(t,n)=>e(r=>r.gitBundleLoadingOwner===t?{gitBundleSlow:n}:r),finishGitBundleLoading:t=>e(n=>n.gitBundleLoadingOwner===t?{gitBundleLoading:!1,gitBundleSlow:!1,gitBundleLoadingOwner:null}:n),resetGitBundleLoading:()=>e({gitBundleLoading:!1,gitBundleSlow:!1,gitBundleLoadingOwner:null}),setGitBundleError:t=>e({gitBundleError:t}),markGitBundleLoaded:(t=null)=>e({gitBundleLastLoadedAt:Date.now(),gitBundleCacheInfo:t})}));async function Kf(e,t=()=>!0){if(!t())return!1;const n=ft();if(n?.writeClipboardText)try{return await n.writeClipboardText(e),t()}catch{return!1}try{return await navigator.clipboard.writeText(e),t()}catch{if(!t())return!1;const r=document.activeElement,o=document.createElement("textarea");o.value=e,o.readOnly=!0,o.style.position="fixed",o.style.left="-9999px",document.body.append(o);try{return o.select(),t()&&document.execCommand("copy")}catch{return!1}finally{o.remove(),r instanceof HTMLElement&&r.isConnected&&r.focus({preventScroll:!0})}}}const TL=450,AL=10,Im=88,Cm=36,na=10,Rm=14;function Tm(e){if(typeof document>"u")return 0;const t=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue(e)||"0");return Number.isFinite(t)?t:0}function PL(e,t){if(typeof window>"u")return{left:0,top:0};const n=window.visualViewport,r=n?.offsetLeft??0,o=n?.offsetTop??0,s=n?.width??window.innerWidth,i=n?.height??window.innerHeight,a=Tm("--safe-top-inset"),c=Tm("--safe-bottom-inset"),d=r+na,u=r+s-Im-na,f=o+a+na,h=o+i-c-Cm-na,p=Math.max(d,Math.min(e-Im/2,Math.max(d,u))),m=t-Cm-Rm,g=t+Rm,b=m>=f?m:g,w=Math.max(f,Math.min(b,Math.max(f,h)));return{left:Math.round(p),top:Math.round(w)}}function Am(e){return Kf(e)}function Gf(e,t=!1){const n=y.useRef(null),r=y.useRef(null),o=y.useRef(!1),s=y.useRef(!1),i=y.useRef(!1),[a,c]=y.useState(null);y.useEffect(()=>{if(!a)return;const m=g=>{const b=g.target;b instanceof HTMLElement&&b.closest('[data-reference-copy-popover="true"]')||(c(null),o.current=!1,s.current=!1)};return document.addEventListener("pointerdown",m,{capture:!0}),()=>document.removeEventListener("pointerdown",m,!0)},[a]);const d=y.useCallback(()=>{n.current!=null&&(window.clearTimeout(n.current),n.current=null)},[]),u=y.useCallback(()=>{d(),r.current=null,o.current=!1},[d]),f=y.useCallback((m,g)=>({onPointerDown:b=>{b.pointerType==="mouse"&&b.button!==0||(u(),r.current={pointerId:b.pointerId,pointerType:b.pointerType,startX:b.clientX,startY:b.clientY,text:m,key:g},n.current=window.setTimeout(()=>{const w=r.current;if(w){if(o.current=!0,s.current=!0,i.current=!1,w.pointerType==="mouse"){Am(w.text).then(E=>{E&&e?.(w.key)}),n.current=null;return}c({text:w.text,key:w.key,...PL(w.startX,w.startY)}),n.current=null}},TL))},onPointerMove:b=>{const w=r.current;if(!w||w.pointerId!==b.pointerId||o.current)return;const E=b.clientX-w.startX,v=b.clientY-w.startY;Math.hypot(E,v)>AL&&u()},onPointerUp:b=>{const w=r.current;if(!w||w.pointerId!==b.pointerId){u();return}o.current&&(b.preventDefault(),b.stopPropagation(),s.current=!0),u()},onPointerCancel:u,onPointerLeave:b=>{r.current?.pointerId===b.pointerId&&!o.current&&u()},onClickCapture:b=>{s.current&&(s.current=!1,b.preventDefault(),b.stopPropagation())},onContextMenu:b=>{!o.current&&!s.current||(b.preventDefault(),b.stopPropagation())}}),[e,u]),h=y.useCallback(m=>{if(m.preventDefault(),m.stopPropagation(),!a||i.current)return;i.current=!0;const g=a;c(null),o.current=!1,s.current=!1,Am(g.text).then(b=>{b&&e?.(g.key)})},[e,a]),p=a&&typeof document<"u"?Kn.createPortal(y.createElement("button",{type:"button","data-reference-copy-popover":"true","data-sidebar-composer-popover":t?Jt()?.element.id:void 0,className:`fixed ${t?"z-popover":"z-modal-backdrop"} inline-flex h-9 w-[88px] select-none items-center justify-center gap-1.5 rounded-full border border-white/15 bg-[rgb(28_28_30_/_0.92)] px-3 text-[13px] font-semibold text-white shadow-[0_10px_28px_rgb(0_0_0_/_0.32),0_2px_8px_rgb(0_0_0_/_0.18)] backdrop-blur-xl transition-transform duration-100 ease-out active:scale-[0.96]`,style:{left:a.left,top:a.top,WebkitBackdropFilter:"blur(18px)"},onPointerDown:m=>{m.stopPropagation()},onPointerUp:h,onTouchStart:m=>{m.stopPropagation()},onTouchEnd:h,onClick:h},y.createElement(si,{size:14,strokeWidth:2.4}),y.createElement("span",null,"Copy")),document.body):null;return y.useMemo(()=>Object.assign(f,{popoverNode:p}),[f,p])}function f0({path:e,enabled:t=!0,showHidden:n=!1,action:r="list_directory",requestSlotId:o,sortMode:s="name",gitIgnoreRoot:i,onLoad:a}){const c=y.useId(),d=o??`directory-list:${c}`,[u,f]=y.useState(0),h=JSON.stringify([e,n,r,d,s,i,u]),[p,m]=y.useState(),g=y.useRef(a),b=y.useRef(0);g.current=a,y.useEffect(()=>{if(!t||!e)return;const E=new AbortController,v=`${d}:${++b.current}`;return m({key:h,result:null,error:null,loading:!0}),Rx(e,E.signal,n,r,v,s,i).then(C=>{E.signal.aborted||(m({key:h,result:C,error:null,loading:!1}),g.current?.(C))}).catch(C=>{E.signal.aborted||m({key:h,result:null,error:C instanceof Error?C.message:"Failed to load directory",loading:!1})}),()=>{E.abort(),Lf(v)}},[t,e,n,r,d,s,i,h]);const w=p?.key===h?p:void 0;return{result:w?.result??null,error:t?w?.error??null:null,loading:t&&!!e&&(w?.loading??!0),reload:()=>f(E=>E+1)}}const h0=y.createContext(null);function NL({children:e}){const[t]=y.useState(()=>Kg(n=>({directoryCache:new Map,expandedPaths:new Set,...Jx(n)})));return l.jsx(h0.Provider,{value:t,children:e})}function Wf(){return y.useContext(h0)??_e}function Er(e){return Wg(Wf(),e)}const _L=new Set([".ts",".tsx",".js",".jsx",".py",".rs",".go",".java",".c",".cpp",".h",".rb",".php",".swift",".kt",".sh",".css",".scss",".html",".json",".yaml",".yml",".toml",".md"]),Pm=120,Nm=120,LL=new Set,DL=[],jL={added:{label:"A",className:"text-[color:var(--diff-insert-strong)]",title:"Added"},modified:{label:"M",className:"text-[color:var(--diff-hunk-accent)]",title:"Modified"},deleted:{label:"D",className:"text-[color:var(--diff-delete-strong)]",title:"Deleted"},renamed:{label:"R",className:"text-muted-foreground",title:"Renamed"},copied:{label:"C",className:"text-[color:var(--diff-insert-strong)]",title:"Copied"},untracked:{label:"U",className:"text-[color:var(--diff-insert-strong)]",title:"Untracked (new file)"},conflicted:{label:"!",className:"text-destructive",title:"Conflicted"},unknown:{label:"?",className:"text-muted-foreground",title:"Unknown"}};function Vf(e,t){if(t==="directory")return null;if(Ix(e))return l.jsx(iy,{size:14});if(Ex(e))return l.jsx(pw,{size:14});const n=e.lastIndexOf(".")>=0?e.slice(e.lastIndexOf(".")):"";return _L.has(n)?l.jsx(Ry,{size:14}):l.jsx(Lu,{size:14})}function p0({path:e}){const n=_e(o=>o.changedFiles.get(e))?.status;if(!n)return null;const r=jL[n]??{label:"?",className:"text-muted-foreground",title:n};return l.jsx("span",{className:`w-4 shrink-0 text-center text-[10px] font-mono font-bold ${r.className}`,title:r.title,children:r.label})}function zo(e){return e?"ml-1 w-6 opacity-100":"ml-1 w-6 opacity-100 sm:ml-0 sm:w-0 sm:overflow-hidden sm:opacity-0 sm:group-hover:ml-1 sm:group-hover:w-6 sm:group-hover:opacity-100 sm:group-focus-within:ml-1 sm:group-focus-within:w-6 sm:group-focus-within:overflow-visible sm:group-focus-within:opacity-100"}function Yf(e){return zo(e)}const OL=y.memo(function({path:t}){const{t:n}=Nt(),r=Uf(t),o=r.status,s=$x(r),i=y.useCallback(a=>{a.stopPropagation(),r.status==="pending"?r.cancel():r.start()},[r.status,r.cancel,r.start]);return l.jsxs("button",{type:"button","aria-label":n(o==="pending"?"common.cancel":"rightSidebar.downloadFile"),onClick:a=>{i(a)},className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${zo(o==="pending")} ${o==="pending"?"bg-surface-elevated text-foreground":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,title:o==="pending"?n("common.cancel"):s,children:[o==="pending"?l.jsx(Xe,{size:12,className:"animate-spin"}):l.jsx(pc,{size:12}),o!=="idle"&&o!=="pending"&&l.jsx("span",{role:o==="error"?"alert":"status",className:"sr-only",children:s})]})});function ML(e){return e instanceof DOMException&&e.name==="AbortError"}function sc(){if(typeof window>"u")return!1;const e=window.getSelection();return!!(e&&!e.isCollapsed&&e.toString().trim())}function m0(e){return e.button===2||e.ctrlKey}const BL=176,FL=160,ws=8;function _m(e,t,n,r){const o=window.visualViewport,s=o?.offsetLeft??0,i=o?.offsetTop??0,a=s+(o?.width??window.innerWidth),c=i+(o?.height??window.innerHeight),d=s+ws,u=i+ws,f=Math.max(d,a-n-ws),h=Math.max(u,c-r-ws),p=t+r<=c-ws?t:t-r;return{anchorX:e,anchorY:t,left:Math.min(Math.max(e,d),f),top:Math.min(Math.max(p,u),h)}}function g0(e){const[t,n]=y.useState(null),r=y.useRef(null),o=y.useCallback((s,i)=>{n(_m(s,i,BL,FL))},[]);return y.useLayoutEffect(()=>{if(!e||!t||!r.current)return;const s=r.current.getBoundingClientRect();if(s.width<=0||s.height<=0)return;const i=_m(t.anchorX,t.anchorY,s.width,s.height);i.left===t.left&&i.top===t.top||n(i)},[e,t]),{position:t,menuRef:r,openAt:o,clearPosition:()=>n(null)}}function y0(e,t){return t&&typeof document<"u"?Kn.createPortal(e,document.body):e}function UL(e,t){return t?`${e.name} ${e.path}`.toLowerCase().includes(t):!0}function Xf(e,t,n){if(!t||UL(e,t))return!0;const r=n.get(e.path);return r?r.some(o=>Xf(o,t,n)):!1}function hu(e){return e.map(t=>({name:t.name,path:t.path,type:t.type,isSymlink:t.isSymlink,modified:t.modified,expanded:!1,loaded:!1,children:t.type==="directory"?[]:void 0}))}function pu(e,t){return!e||!t.startsWith(e)?t:t.slice(e.length).replace(/^\/+/,"")||t}const HL=y.memo(function e({node:t,depth:n,onFileSelect:r,directoriesOnly:o=!1,onPathReference:s,referenceSelection:i,getReferenceText:a,onReferenceCopied:c,insertedReferenceKey:d,copiedReferenceKey:u,onDirectoryRoot:f,onSearchFromDirectory:h,onDirectoryPinToggle:p,onFilePinToggle:m,onOpenInFileBrowser:g,canOpenInFileBrowser:b,pinnedPaths:w,selectedFilePath:E,queryLower:v,onDirectoryDropFiles:C,onFileDeleteRequest:_,deletingFilePath:R,revealedDirectoryPath:k,gitIgnoreRoot:x}){const S=Wf(),I=$f(),P=!I||I.directories?.some(W=>W.access==="write"&&(t.path===W.path||t.path.startsWith(W.path.replace(/\/+$/,"")+"/"))),{t:T}=Nt(),A=Er(W=>W.expandedPaths.has(t.path)),N=Er(W=>W.directoryCache.get(t.path)),L=_e(W=>W.showHiddenFiles),D=Er(W=>W.toggleExpanded),j=Er(W=>W.setDirectoryCache),B=_e(W=>W.fileSortModes[t.path]??"name"),M=_e(W=>W.setDirectorySortMode),F=y.useRef(B);y.useLayoutEffect(()=>{F.current!==B&&S.getState().invalidateDirectoryCache(t.path),F.current=B},[B,S,t.path]);const[$,H]=y.useState(!1),{position:te,menuRef:ne,openAt:re,clearPosition:ae}=g0($),[U,J]=y.useState(!1),Q=y.useRef(0),ee=`file-tree:${y.useId()}:${t.path}`;Si(ne,$&&!!i,()=>H(!1));const Te=y.useRef(null),q=t.path===E||t.path===k,z=t.type==="directory"&&(A||!!v),de=t.type==="directory",he=w.has(t.path),Ee=!de&&!!m,Ae=!!(b&&g),Ie=`path:${t.path}`,G=d===Ie||!!i?.paths.has(t.path),le=u===Ie,ue=a?.(t.path)??t.path,De=Gf(c,!!i),ge=Uf(t.path),We=ge.start,ye=R===t.path,Ge=de&&!o&&!!(f||h||p||Ae),Oe=y.useMemo(()=>{if(!N)return;if(!v)return N;const W=S.getState().directoryCache;return N.filter(xe=>(!o||xe.type==="directory")&&Xf(xe,v,W))},[N,o,v,S]),{loading:kt}=f0({path:t.path,enabled:t.type==="directory"&&A&&!N&&!o,showHidden:L,action:"expand_directory",requestSlotId:ee,sortMode:B,gitIgnoreRoot:x,onLoad:W=>j(t.path,hu(W.entries))}),_t=y.useCallback(()=>{if(t.type!=="directory"){r(t.path);return}if(o&&f){f(t.path);return}D(t.path)},[o,t.path,t.type,f,D,r]),et=y.useCallback(W=>{W.stopPropagation(),s?.(t.path,Ie,W.currentTarget)},[s,t.path,Ie]),tt=y.useCallback(W=>{W.stopPropagation(),f?.(t.path),H(!1)},[t.path,f]),it=y.useCallback(W=>{W.stopPropagation(),h?.(t.path),H(!1)},[t.path,h]),Lt=y.useCallback(W=>{W.stopPropagation(),p?.(t.path),H(!1)},[t.path,p]),V=y.useCallback(W=>{W.stopPropagation(),M(t.path,B==="modified"?"name":"modified"),H(!1)},[t.path,M,B]),oe=y.useCallback(W=>{W.stopPropagation(),m?.(t.path),H(!1)},[t.path,m]),Y=y.useCallback(W=>{W.stopPropagation(),H(!1),We()},[t.path,We]),Z=y.useCallback(W=>{W.stopPropagation(),H(!1),_(t)},[t,_]),ie=y.useCallback(W=>{W.stopPropagation(),g?.(t.path),H(!1)},[t.path,g]),we=y.useCallback(W=>{!de||!C||!W.dataTransfer.types.includes("Files")||(W.preventDefault(),W.stopPropagation(),Q.current+=1,J(!0))},[de,C]),K=y.useCallback(W=>{!de||!C||!W.dataTransfer.types.includes("Files")||(W.preventDefault(),W.stopPropagation(),W.dataTransfer.dropEffect="copy",J(!0))},[de,C]),ce=y.useCallback(W=>{!de||!C||(W.preventDefault(),W.stopPropagation(),Q.current-=1,Q.current<=0&&(Q.current=0,J(!1)))},[de,C]),pe=y.useCallback(W=>{if(!de||!C)return;W.preventDefault(),W.stopPropagation(),Q.current=0,J(!1);const xe=Array.from(W.dataTransfer.files);xe.length>0&&C(t.path,xe)},[de,t.path,C]),me=y.useCallback(W=>{W.stopPropagation(),i?re(W.clientX,W.clientY):ae(),H(xe=>!xe)},[ae,re,!!i]),je=y.useCallback(W=>{!Ge||!m0(W)||(W.preventDefault(),W.stopPropagation(),re(W.clientX,W.clientY),H(!0))},[Ge,re]);return y.useEffect(()=>{if(!$)return;const W=be=>{const fe=be.target;fe instanceof Node&&(Te.current?.contains(fe)||ne.current?.contains(fe))||H(!1)},xe=be=>{be.key==="Escape"&&H(!1)};return document.addEventListener("pointerdown",W),document.addEventListener("keydown",xe),()=>{document.removeEventListener("pointerdown",W),document.removeEventListener("keydown",xe)}},[$,ne]),l.jsxs("div",{style:!z&&!$?{contentVisibility:"auto",containIntrinsicSize:"auto 32px"}:void 0,children:[l.jsxs("div",{ref:Te,className:"relative",children:[De.popoverNode,l.jsxs("div",{"data-file-tree-path":t.path,"data-file-tree-type":t.type,draggable:!!s&&!o,onDragStart:W=>{if(!s||o||W.target.closest("button")){W.preventDefault();return}W.dataTransfer.effectAllowed="copy";const xe=a?.(t.path)||U_(t.path,null);B_(W.dataTransfer,xe,{kind:t.type==="directory"?"directory":"file",path:t.path,text:xe})},"data-sort-mode":B,role:"button",tabIndex:0,onClick:()=>{sc()||_t()},onContextMenu:je,onKeyDown:W=>{W.target!==W.currentTarget||W.key!=="Enter"&&W.key!==" "||(W.preventDefault(),_t())},onDragEnter:we,onDragOver:K,onDragLeave:ce,onDrop:pe,className:`group relative flex w-full cursor-pointer items-center gap-1 rounded px-2 py-1 text-[13px] transition ${U?"scale-[1.015] bg-primary/15 text-foreground shadow-[0_0_0_1px_rgb(var(--primary-rgb)_/_0.45)]":q?"bg-surface-elevated text-foreground":"text-muted-foreground hover:bg-surface-2 hover:text-foreground"}`,title:t.path,children:[n>0&&l.jsx("span",{"aria-hidden":"true",className:"shrink-0",style:{width:`${n*14-4}px`}}),U&&l.jsx("span",{className:"pointer-events-none absolute right-2 top-1/2 z-10 -translate-y-1/2 rounded-full bg-primary px-2 py-0.5 text-[10px] font-semibold text-primary-foreground shadow-md",children:T("fileTree.dropToUploadHere")}),t.type==="directory"?l.jsxs(l.Fragment,{children:[z?l.jsx(Pr,{size:14,className:"shrink-0 text-muted-foreground/80"}):l.jsx(On,{size:14,className:"shrink-0 text-muted-foreground/80"}),z?l.jsx(_s,{size:14,className:"shrink-0 text-[color:var(--folder)]"}):l.jsx(gc,{size:14,className:"shrink-0 text-[color:var(--folder)]"})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-[14px] shrink-0"}),l.jsx("span",{className:q?"text-primary":"text-muted-foreground/80",children:Vf(t.name,t.type)})]}),l.jsxs("span",{className:`flex-1 select-text whitespace-nowrap text-left leading-snug ${q?"font-medium":""}`,children:[t.name,B==="modified"&&l.jsx("span",{className:"ml-1 inline-flex align-middle text-primary",title:T("fileTree.sortedByModified"),"aria-label":T("fileTree.sortedByModified"),children:l.jsx(xa,{size:11})}),t.isSymlink&&l.jsx("span",{className:"ml-1 inline-flex align-middle text-muted-foreground/70",title:T("fileTree.symbolicLink"),children:l.jsx(_o,{size:11})})]}),l.jsxs("div",{className:`sticky right-0 z-20 flex shrink-0 items-center rounded pl-1 ${q?"bg-surface-elevated":"bg-surface group-hover:bg-surface-2"}`,onClick:W=>W.stopPropagation(),children:[kt&&l.jsx(Xe,{size:12,className:"shrink-0 animate-spin text-muted-foreground"}),l.jsx(p0,{path:t.path}),Ge&&l.jsx("button",{type:"button",onClick:me,className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${zo($)} ${$?"bg-surface-elevated text-foreground":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":T("fileTree.moreDirActions"),"aria-expanded":$,title:T("fileTree.moreDirActions"),children:l.jsx(Nr,{size:13})}),!de&&!i&&l.jsx("button",{type:"button",onClick:me,className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${zo($||ge.status==="pending"||ye||he)} ${$?"bg-surface-elevated text-foreground":he?"bg-primary/15 text-primary":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":T("fileTree.moreFileActions"),"aria-expanded":$,title:ge.status==="error"?ge.error??T("rightSidebar.downloadFailed"):T("fileTree.moreFileActions"),children:ge.status==="pending"||ye?l.jsx(Xe,{size:13,className:"animate-spin"}):l.jsx(Nr,{size:13})}),s&&l.jsx("button",{type:"button",onClick:et,...De(ue,Ie),className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-[11px] font-semibold transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${i?"ml-1 min-h-11 min-w-11":Yf(G||le)} ${G||le?"bg-surface-elevated text-foreground":"bg-primary/10 text-primary"}`,"aria-label":i?`${i.label}: ${t.name}`:T(le?"rightSidebar.copied":G?"rightSidebar.inserted":"fileTree.insertRefTitle"),"aria-pressed":i?G:void 0,disabled:!!i?.disabled&&!G,title:i?`${i.label}: ${t.name}`:T(le?"rightSidebar.copied":G?"rightSidebar.inserted":"fileTree.insertRefTitle"),children:le||G?l.jsx(Ln,{size:12}):l.jsx(_o,{size:12})}),l.jsx(zx,{status:ge.status,error:ge.error,cancel:ge.cancel,className:"ml-1 text-[10px]"}),Ge&&$&&y0(l.jsxs("div",{ref:ne,className:`${te?i?"fixed z-popover":"fixed z-menu-panel":"absolute right-2 top-[calc(100%+2px)] z-30"} w-44 overflow-hidden rounded-xl border border-border/15 bg-surface/98 p-1 text-[12px] shadow-xl shadow-[0_18px_48px_var(--app-shadow-soft)] backdrop-blur animate-fade-in`,style:te?{left:te.left,top:te.top}:void 0,children:[Ae&&l.jsxs("button",{type:"button",onClick:ie,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:T("fileTree.openInFileBrowserTitle"),children:[l.jsx(_s,{size:13,className:"shrink-0 text-[color:var(--folder)]"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("fileTree.openInFileBrowser")})]}),f&&l.jsxs("button",{type:"button",onClick:tt,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:T("fileTree.openDirRootTitle"),children:[l.jsx(_s,{size:13,className:"shrink-0 text-[color:var(--folder)]"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("fileTree.openDirRoot")})]}),h&&l.jsxs("button",{type:"button",onClick:it,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:T("fileTree.searchFromDirTitle"),children:[l.jsx(mc,{size:13,className:"shrink-0 text-primary"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("fileTree.searchFromDir")})]}),p&&l.jsxs("button",{type:"button",onClick:Lt,className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium transition active:scale-[0.99] ${he?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:T(he?"fileTree.unpinDirTitle":"fileTree.pinDirTitle"),children:[he?l.jsx(Ws,{size:13,className:"shrink-0"}):l.jsx(Gs,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T(he?"fileTree.unpinDir":"fileTree.pinDir")})]}),l.jsxs("button",{type:"button",onClick:V,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",children:[B==="modified"?l.jsx(Xg,{size:13,className:"shrink-0"}):l.jsx(xa,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T(B==="modified"?"fileTree.sortByName":"fileTree.sortByModified")})]})]}),!!te),!de&&!i&&$&&l.jsxs("div",{className:"absolute right-2 top-[calc(100%+2px)] z-30 w-44 overflow-hidden rounded-xl border border-border/15 bg-surface/98 p-1 text-[12px] shadow-xl shadow-[0_18px_48px_var(--app-shadow-soft)] backdrop-blur animate-fade-in",children:[Ae&&l.jsxs("button",{type:"button",onClick:ie,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:T("fileTree.openInFileBrowserTitle"),children:[l.jsx(Lu,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("fileTree.openInFileBrowser")})]}),l.jsxs("button",{type:"button",onClick:Y,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:T("rightSidebar.downloadFile"),children:[l.jsx(pc,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("rightSidebar.downloadFile")})]}),Ee&&l.jsxs("button",{type:"button",onClick:oe,className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium transition active:scale-[0.99] ${he?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:T(he?"fileTree.unpinFileTitle":"fileTree.pinFileTitle"),children:[he?l.jsx(Ws,{size:13,className:"shrink-0"}):l.jsx(Gs,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T(he?"fileTree.unpinFile":"fileTree.pinFile")})]}),l.jsxs("button",{type:"button",hidden:!P,onClick:Z,disabled:ye,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-destructive transition hover:bg-destructive/10 active:scale-[0.99] disabled:opacity-50",title:T("fileTree.deleteFile"),children:[ye?l.jsx(Xe,{size:13,className:"shrink-0 animate-spin"}):l.jsx(Bu,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:T("fileTree.deleteFile")})]})]})]})]})]}),z&&Oe&&Oe.length>0&&l.jsx("div",{className:n===0?"mt-0.5":"",children:Oe.map(W=>l.jsx(e,{node:W,depth:n+1,onFileSelect:r,directoriesOnly:o,onPathReference:s,referenceSelection:i,getReferenceText:a,onReferenceCopied:c,onDirectoryRoot:f,onSearchFromDirectory:h,onDirectoryPinToggle:p,onFilePinToggle:m,onOpenInFileBrowser:g,canOpenInFileBrowser:b,pinnedPaths:w,selectedFilePath:E,queryLower:v,insertedReferenceKey:d,copiedReferenceKey:u,onDirectoryDropFiles:C,onFileDeleteRequest:_,deletingFilePath:R,gitIgnoreRoot:x,revealedDirectoryPath:k},W.path))})]})}),$L=y.memo(function({node:t,rootPath:n,onFileSelect:r,onPathReference:o,referenceSelection:s,getReferenceText:i,onReferenceCopied:a,insertedReferenceKey:c,copiedReferenceKey:d,onDirectoryRoot:u,onSearchFromDirectory:f,onDirectoryPinToggle:h,onFilePinToggle:p,pinnedPaths:m,selectedFilePath:g,onFileDeleteRequest:b,deletingFilePath:w}){const E=$f(),v=!E||E.directories?.some(z=>z.access==="write"&&(t.path===z.path||t.path.startsWith(z.path.replace(/\/+$/,"")+"/"))),{t:C}=Nt(),_=t.path===g,R=t.type==="directory",k=m.has(t.path),x=!R&&!!p,S=`path:${t.path}`,I=c===S||!!s?.paths.has(t.path),P=d===S,T=i?.(t.path)??t.path,A=Gf(a,!!s),N=Uf(t.path),L=N.start,[D,j]=y.useState(!1),{position:B,menuRef:M,openAt:F,clearPosition:$}=g0(D);Si(M,D&&!!s,()=>j(!1));const H=y.useRef(null),te=w===t.path,ne=R&&!!(u||f||h),re=y.useCallback(()=>{sc()||(t.type==="directory"?u?.(t.path):r(t.path))},[t.path,t.type,u,r]),ae=y.useCallback(z=>{z.stopPropagation(),o?.(t.path,S,z.currentTarget)},[o,t.path,S]),U=y.useCallback(z=>{z.stopPropagation(),h?.(t.path),j(!1)},[t.path,h]),J=y.useCallback(z=>{z.stopPropagation(),p?.(t.path),j(!1)},[t.path,p]),Q=y.useCallback(z=>{z.stopPropagation(),j(!1),L()},[t.path,L]),ee=y.useCallback(z=>{z.stopPropagation(),j(!1),b(t)},[t,b]),Te=y.useCallback(z=>{z.stopPropagation(),s?F(z.clientX,z.clientY):$(),j(de=>!de)},[$,F,!!s]),q=y.useCallback(z=>{!ne||!m0(z)||(z.preventDefault(),z.stopPropagation(),F(z.clientX,z.clientY),j(!0))},[ne,F]);return y.useEffect(()=>{if(!D)return;const z=he=>{const Ee=he.target;Ee instanceof Node&&(H.current?.contains(Ee)||M.current?.contains(Ee))||j(!1)},de=he=>{he.key==="Escape"&&j(!1)};return document.addEventListener("pointerdown",z),document.addEventListener("keydown",de),()=>{document.removeEventListener("pointerdown",z),document.removeEventListener("keydown",de)}},[D,M]),l.jsxs("div",{ref:H,className:"relative border-b border-border/10 last:border-b-0",children:[A.popoverNode,l.jsxs("div",{"data-file-tree-path":t.path,"data-file-tree-type":t.type,role:"button",tabIndex:0,onClick:re,onContextMenu:q,onKeyDown:z=>{z.target!==z.currentTarget||z.key!=="Enter"&&z.key!==" "||(z.preventDefault(),re())},className:`group flex w-full cursor-pointer items-center gap-2 rounded-lg px-2 py-2 text-left text-[13px] transition ${_?"bg-surface-elevated text-foreground":"text-muted-foreground hover:bg-surface-2 hover:text-foreground"}`,title:t.path,children:[t.type==="directory"?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-[14px] shrink-0"}),l.jsx(gc,{size:14,className:"shrink-0 text-[color:var(--folder)]"})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"w-[14px] shrink-0"}),l.jsx("span",{className:_?"text-primary":"text-muted-foreground/80",children:Vf(t.name,t.type)})]}),l.jsxs("span",{className:"min-w-0 flex-1 select-text",children:[l.jsxs("span",{className:`block whitespace-normal break-all font-medium leading-snug ${_?"text-primary":"text-foreground"}`,children:[t.name,t.isSymlink&&l.jsx("span",{className:"ml-1 inline-flex align-middle text-muted-foreground/70",title:C("fileTree.symbolicLink"),children:l.jsx(_o,{size:11})})]}),l.jsx("span",{className:"mt-0.5 block truncate font-mono text-[10px] text-muted-foreground/80",children:pu(n,t.path)})]}),l.jsx(p0,{path:t.path}),t.type==="directory"&&(h||f)&&l.jsx("button",{type:"button",onClick:Te,className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${zo(D)} ${D?"bg-surface-elevated text-foreground":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":C("fileTree.moreDirActions"),"aria-expanded":D,title:C("fileTree.moreDirActions"),children:l.jsx(Nr,{size:13})}),!R&&!s&&l.jsx("button",{type:"button",onClick:Te,className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-muted-foreground transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${zo(D||N.status==="pending"||te||k)} ${D?"bg-surface-elevated text-foreground":k?"bg-primary/15 text-primary":"bg-surface-2 hover:bg-surface-elevated hover:text-foreground"}`,"aria-label":C("fileTree.moreFileActions"),"aria-expanded":D,title:N.status==="error"?N.error??C("rightSidebar.downloadFailed"):C("fileTree.moreFileActions"),children:N.status==="pending"||te?l.jsx(Xe,{size:13,className:"animate-spin"}):l.jsx(Nr,{size:13})}),o&&l.jsx("button",{type:"button",onClick:ae,...A(T,S),className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-[11px] font-semibold transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${s?"ml-1 min-h-11 min-w-11":Yf(I||P)} ${I||P?"bg-surface-elevated text-foreground":"bg-primary/10 text-primary"}`,"aria-label":s?`${s.label}: ${t.name}`:C(P?"rightSidebar.copied":I?"rightSidebar.inserted":"fileTree.insertRefTitle"),"aria-pressed":s?I:void 0,disabled:!!s?.disabled&&!I,title:s?`${s.label}: ${t.name}`:C(P?"rightSidebar.copied":I?"rightSidebar.inserted":"fileTree.insertRefTitle"),children:P||I?l.jsx(Ln,{size:12}):l.jsx(_o,{size:12})})]}),l.jsx(zx,{status:N.status,error:N.error,cancel:N.cancel,className:"ml-1 text-[10px]"}),ne&&D&&y0(l.jsxs("div",{ref:M,className:`${B?s?"fixed z-popover":"fixed z-menu-panel":"absolute right-2 top-[calc(100%+2px)] z-30"} w-44 overflow-hidden rounded-xl border border-border/15 bg-surface/98 p-1 text-[12px] shadow-xl shadow-[0_18px_48px_var(--app-shadow-soft)] backdrop-blur animate-fade-in`,style:B?{left:B.left,top:B.top}:void 0,children:[u&&l.jsxs("button",{type:"button",onClick:z=>{z.stopPropagation(),u(t.path),j(!1)},className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:C("fileTree.openDirRootTitle"),children:[l.jsx(_s,{size:13,className:"shrink-0 text-[color:var(--folder)]"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.openDirRoot")})]}),f&&l.jsxs("button",{type:"button",onClick:z=>{z.stopPropagation(),f(t.path),j(!1)},className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",children:[l.jsx(mc,{size:13,className:"shrink-0 text-primary"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.searchFromDir")})]}),h&&l.jsxs("button",{type:"button",onClick:U,className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium transition active:scale-[0.99] ${k?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:C(k?"fileTree.unpinDirTitle":"fileTree.pinDirTitle"),children:[k?l.jsx(Ws,{size:13,className:"shrink-0"}):l.jsx(Gs,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C(k?"fileTree.unpinDir":"fileTree.pinDir")})]})]}),!!B),!R&&!s&&D&&l.jsxs("div",{className:"absolute right-2 top-[calc(100%+2px)] z-30 w-44 overflow-hidden rounded-xl border border-border/15 bg-surface/98 p-1 text-[12px] shadow-xl shadow-[0_18px_48px_var(--app-shadow-soft)] backdrop-blur animate-fade-in",children:[l.jsxs("button",{type:"button",onClick:Q,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-foreground transition hover:bg-surface-2 active:scale-[0.99]",title:C("rightSidebar.downloadFile"),children:[l.jsx(pc,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("rightSidebar.downloadFile")})]}),x&&l.jsxs("button",{type:"button",onClick:J,className:`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium transition active:scale-[0.99] ${k?"text-primary hover:bg-primary/10":"text-foreground hover:bg-surface-2"}`,title:C(k?"fileTree.unpinFileTitle":"fileTree.pinFileTitle"),children:[k?l.jsx(Ws,{size:13,className:"shrink-0"}):l.jsx(Gs,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C(k?"fileTree.unpinFile":"fileTree.pinFile")})]}),l.jsxs("button",{type:"button",hidden:!v,onClick:ee,disabled:te,className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left font-medium text-destructive transition hover:bg-destructive/10 active:scale-[0.99] disabled:opacity-50",title:C("fileTree.deleteFile"),children:[te?l.jsx(Xe,{size:13,className:"shrink-0 animate-spin"}):l.jsx(Bu,{size:13,className:"shrink-0"}),l.jsx("span",{className:"min-w-0 flex-1 truncate",children:C("fileTree.deleteFile")})]})]})]})}),zL=60,Lm=60,qL=20;function Dm({count:e,loading:t,engine:n,limited:r,scope:o,content:s}){const{t:i}=Nt();return l.jsxs("div",{className:"sticky top-0 z-10 -mx-2 -mt-2 mb-2 border-b border-border/15 bg-surface/95 px-3 py-2.5 backdrop-blur",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2 text-[12px] font-semibold text-foreground",children:[l.jsx(mc,{size:14,className:"shrink-0 text-primary"}),l.jsx("span",{children:s?i("fileTree.contentMatchesCount",{count:e}):i("fileTree.searchResults",{count:e})})]}),n&&l.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[9px] uppercase tracking-[0.12em] text-muted-foreground",children:[t&&l.jsx(Xe,{size:9,className:"animate-spin"}),n,r?" · limited":""]})]}),l.jsxs("div",{className:"mt-1 flex min-w-0 items-center gap-1.5 text-[10px] text-muted-foreground",children:[l.jsx("span",{className:"shrink-0",children:i("fileTree.searchScope")}),l.jsx("span",{className:"min-w-0 truncate font-mono text-foreground/75",title:o,children:o}),t&&l.jsx("span",{className:"ml-auto shrink-0",children:i("fileTree.searching")})]})]})}function KL(e,t){if(!t)return e;const n=e.toLowerCase(),r=t.toLowerCase(),o=[];let s=0,i=n.indexOf(r,s),a=0;for(;i>=0&&r;)i>s&&o.push(e.slice(s,i)),o.push(l.jsx("mark",{className:"rounded-sm bg-[rgb(var(--warning-rgb)_/_0.30)] px-0.5 text-foreground",children:e.slice(i,i+r.length)},`m-${a++}`)),s=i+r.length,i=n.indexOf(r,s);return s<e.length&&o.push(e.slice(s)),o.length>0?o:e}const GL=y.memo(function({entry:t,rootPath:n,selectedFilePath:r,query:o,onContentMatchSelect:s,onPathReference:i,referenceSelection:a,getReferenceText:c,onReferenceCopied:d,insertedReferenceKey:u,copiedReferenceKey:f}){const{t:h}=Nt(),[p,m]=y.useState(!0),g=t.path===r,b=p?t.matches.slice(0,qL):[],w=t.matches.length-b.length,E=`path:${t.path}`,v=u===E||!!a?.paths.has(t.path),C=f===E,_=c?.(t.path)??t.path,R=Gf(d,!!a);return l.jsxs("div",{className:"border-b border-border/10 last:border-b-0",children:[R.popoverNode,l.jsxs("div",{"data-file-tree-path":t.path,"data-file-tree-type":"file",role:"button",tabIndex:0,onClick:()=>{sc()||m(k=>!k)},onKeyDown:k=>{k.target!==k.currentTarget||k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),m(x=>!x))},className:`group flex w-full cursor-pointer items-center gap-2 rounded-lg px-2 py-2 text-left text-[13px] transition ${g?"bg-surface-elevated text-foreground":"text-muted-foreground hover:bg-surface-2 hover:text-foreground"}`,title:t.path,children:[p?l.jsx(Pr,{size:14,className:"shrink-0 text-muted-foreground/80"}):l.jsx(On,{size:14,className:"shrink-0 text-muted-foreground/80"}),l.jsx("span",{className:g?"text-primary":"text-muted-foreground/80",children:Vf(t.name,"file")}),l.jsxs("span",{className:"min-w-0 flex-1 select-text",children:[l.jsx("span",{className:"block whitespace-normal break-all font-medium leading-snug",children:t.name}),l.jsx("span",{className:"mt-0.5 block truncate font-mono text-[10px] text-muted-foreground/80",children:pu(n,t.path)})]}),l.jsx("span",{className:"shrink-0 select-none rounded-full bg-surface-2 px-1.5 py-0.5 text-[10px] text-muted-foreground",children:t.matches.length}),!a&&l.jsx(OL,{path:t.path}),i&&l.jsx("button",{type:"button",onClick:k=>{k.stopPropagation(),i(t.path,E,k.currentTarget)},...R(_,E),className:`inline-flex h-6 shrink-0 select-none items-center justify-center rounded-md text-[11px] font-semibold transition focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary active:scale-95 ${a?"ml-1 min-h-11 min-w-11":Yf(v||C)} ${v||C?"bg-surface-elevated text-foreground":"bg-primary/10 text-primary"}`,"aria-label":a?`${a.label}: ${t.name}`:h(C?"rightSidebar.copied":v?"rightSidebar.inserted":"fileTree.insertRefTitle"),"aria-pressed":a?v:void 0,disabled:!!a?.disabled&&!v,title:a?`${a.label}: ${t.name}`:h(C?"rightSidebar.copied":v?"rightSidebar.inserted":"fileTree.insertRefTitle"),children:C||v?l.jsx(Ln,{size:12}):l.jsx(_o,{size:12})})]}),p&&l.jsxs("div",{className:"mb-1 ml-3 border-l border-border/20 pl-1",children:[b.map((k,x)=>l.jsxs("div",{role:"button",tabIndex:0,onClick:()=>{sc()||s?.(t.path,k.line)},onKeyDown:S=>{S.target!==S.currentTarget||S.key!=="Enter"&&S.key!==" "||(S.preventDefault(),s?.(t.path,k.line))},className:"flex w-full cursor-pointer items-start gap-2 rounded px-2 py-1 text-left font-mono text-[11px] text-muted-foreground transition hover:bg-surface-2 hover:text-foreground",title:`${pu(n,t.path)}:${k.line}`,children:[l.jsx("span",{className:"shrink-0 select-none tabular-nums text-muted-foreground/60",children:k.line}),l.jsx("span",{className:"min-w-0 flex-1 truncate whitespace-pre select-text",children:KL(k.text,o)})]},`${k.line}-${x}`)),w>0&&l.jsx("div",{className:"px-2 py-1 text-[10px] text-muted-foreground/70",children:h("fileTree.moreMatches",{count:w})})]})]})});function WL(e){const t=l.jsx(VL,{...e});return e.directoriesOnly||e.referenceSelection?l.jsx(NL,{children:t}):t}function VL({rootPath:e,onFileSelect:t,directoriesOnly:n=!1,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,insertedReferenceKey:a,copiedReferenceKey:c,onDirectoryRoot:d,onSearchFromDirectory:u,onDirectoryPinToggle:f,onFilePinToggle:h,onOpenInFileBrowser:p,canOpenInFileBrowser:m=!1,pinnedPaths:g=LL,selectedFilePath:b,query:w="",searchRootPath:E,searchOptions:v={},searchMode:C="name",onContentMatchSelect:_,onDirectoryDropFiles:R,revealDirectory:k}){const{t:x}=Nt(),S=Wf(),I=y.useId(),P=`${o?"file-tree-reference-root":"file-tree-root"}:${I}:${e}`,T=Er(K=>e?K.directoryCache.get(e):void 0),A=Er(K=>K.setDirectoryCache),N=_e(K=>K.showHiddenFiles),L=_e(K=>K.fileSortModesHydrated),D=_e(K=>K.fileSortModes[e]??"name"),j=_e(K=>K.hydrateFileSortModes),B=_e(K=>K.hydrateHideGitIgnoredRoots),M=_e(K=>!!K.hideGitIgnoredRoots[e]),F=_e(K=>K.hideGitIgnoredRootsHydrated),$=_e(K=>JSON.stringify(K.gitIgnoreExceptions[e]??[])),H=Er(K=>K.invalidateDirectoryCache),te=`${e}:${D}:${N}:${M}:${$}`,[ne,re]=y.useState("");y.useLayoutEffect(()=>{e&&H(e,!0),re(te)},[e,M,$,H,te]);const[ae,U]=y.useState(!1),[J,Q]=y.useState(!1),[ee,Te]=y.useState(null),[q,z]=y.useState(L&&F),de=L&&F||q;y.useEffect(()=>{let K=!1;return Promise.all([j(),B()]).catch(()=>{}).finally(()=>{K||z(!0)}),()=>{K=!0}},[j,B]);const[he,Ee]=y.useState([]),[Ae,Ie]=y.useState(null),[G,le]=y.useState(Pm),[ue,De]=y.useState([]),[ge,We]=y.useState(null),ye=y.useRef({busy:!1}),Ge=y.useRef(0),Oe=y.useRef(e);Oe.current=e,y.useEffect(()=>{const K=()=>{Ge.current++};for(const ce of["pagehide","auth:unauthorized",xt])window.addEventListener(ce,K);return()=>{K();for(const ce of["pagehide","auth:unauthorized",xt])window.removeEventListener(ce,K)}},[]);const kt=y.useRef(null),_t=y.useRef(0),et=w.trim().toLowerCase(),tt=C==="content",it=E||e,Lt=v.excludePatterns??DL,V=Lt.join(`
7
- `);y.useEffect(()=>{const K=k?.path;if(!K||!K.startsWith(`${e}/`)&&K!==e)return;const ce=K.slice(e.length).replace(/^\/+/,""),pe=ce?ce.split("/"):[],me=pe.map((Be,Ne)=>`${e}/${pe.slice(0,Ne+1).join("/")}`),je=S.getState(),W=me.filter(Be=>!je.expandedPaths.has(Be));W.length>0&&S.setState(Be=>({expandedPaths:new Set([...Be.expandedPaths,...W])}));let xe=!1,be=0;const fe=()=>{if(xe)return;const Be=Array.from(document.querySelectorAll("[data-file-tree-path]")).find(Ne=>Ne.dataset.fileTreePath===K);if(Be){Be.scrollIntoView({block:"center",behavior:"smooth"});return}be+=1,be<80&&window.setTimeout(fe,50)},ke=window.requestAnimationFrame(fe);return()=>{xe=!0,window.cancelAnimationFrame(ke)}},[k?.nonce,k?.path,e,S]);const oe=y.useCallback(async K=>{if(ye.current.busy||K.type==="directory")return;const ce=Ge.current,pe=se(),me=He(),je=e,W=K.path.slice(0,K.path.lastIndexOf("/"))||"/",xe=()=>S.getState().directoryCache.get(W)?.find(Je=>Je.path===K.path),be=Je=>JSON.stringify([Je.path,Je.name,Je.type,Je.isSymlink,Je.modified]),fe=be(K),ke=xe(),Be=ke?be(ke):null;let Ne=!1;const gt=()=>{const Je=xe();return ce===Ge.current&&je===Oe.current&&pe===se()&&me===He()&&!me?.closed&&be(K)===fe&&(Je?be(Je)===(Be??fe):Be===null||Ne)};await W_(ye.current,{current:gt,confirm:()=>K_({title:x("fileTree.deleteFile"),message:x("fileTree.deleteFileConfirm",{name:K.name}),confirmLabel:x("fileTree.deleteFile"),cancelLabel:x("common.cancel")}),submit:async Je=>{await Nx(K.path,Je),Ne=!0},apply:()=>{_e.getState().applyFileWatchEvents([{type:"deleted",path:K.path}]),Ee(Je=>Je.filter(bn=>bn.path!==K.path)),De(Je=>Je.filter(bn=>bn.path!==K.path)),g.has(K.path)&&h?.(K.path)},pending:Je=>{ce===Ge.current&&We(Je?K.path:null)},failure:Je=>G_(x("fileTree.deleteFileFailed",{message:Je})),expiredMessage:"File deletion context changed"})},[e,h,g,x,S]),{loading:Y,error:Z,reload:ie}=f0({path:e,enabled:de&&ne===te&&!et&&!T,showHidden:N,action:"load_file_tree_root",requestSlotId:P,sortMode:D,gitIgnoreRoot:e,onLoad:K=>{U(!!K.truncated),A(e,hu(K.entries))}});y.useEffect(()=>{if(!it||!et){Q(!1),Te(null),Ee([]),De([]),Ie(null);return}let K=!1;const ce=new AbortController,pe=new Set;Q(!0),Te(null),Ee([]),De([]),le(tt?zL:Pm),Ie({truncated:!1,total:0,engine:"rg",limited:!1,done:!1});const me=`file-search:${I}:${it}:${++_t.current}`;let je=!1;const W=()=>Tx(it,w.trim(),be=>{if(!K){if(be.engine&&Ie(fe=>({truncated:fe?.truncated??!1,total:fe?.total??0,engine:be.engine,limited:be.limited??fe?.limited??!1,done:fe?.done??!1})),be.entries?.length){const fe=be.entries.filter(ke=>pe.has(ke.path)?!1:(pe.add(ke.path),!0));fe.length>0&&(Ee(ke=>[...ke,...hu(fe)]),Ie(ke=>ke?{...ke,total:pe.size}:{truncated:!1,total:pe.size,engine:"rg",limited:!1,done:!1}))}if(be.contentEntries?.length){const fe=be.contentEntries.filter(ke=>pe.has(ke.path)?!1:(pe.add(ke.path),!0));fe.length>0&&(De(ke=>[...ke,...fe]),Ie(ke=>ke?{...ke,total:pe.size}:{truncated:!1,total:pe.size,engine:"rg",limited:!1,done:!1}))}be.done&&Ie(fe=>({truncated:!!be.truncated,total:typeof be.total=="number"?be.total:pe.size,engine:be.engine??fe?.engine??"rg",limited:!!be.limited,done:!0}))}},ce.signal,N,C,me,{excludePatterns:Lt,caseSensitive:v.caseSensitive,wholeWord:v.wholeWord,regex:v.regex}).catch(be=>{K||ML(be)||(Te(be instanceof Error?be.message:"Failed to search files"),Ee([]),De([]),Ie(null))}).finally(()=>{K||Q(!1)}),xe=window.setTimeout(()=>{je=!0,W()},180);return()=>{K=!0,window.clearTimeout(xe),ce.abort(),je&&Lf(me)}},[it,V,tt,w,et,C,v.caseSensitive,v.regex,v.wholeWord,N,!!o,I]),y.useEffect(()=>{if(!et)return;const K=kt.current;if(!K)return;const ce=tt?ue.length:he.length,pe=tt?Lm:Nm,me=new IntersectionObserver(je=>{je.some(W=>W.isIntersecting)&&le(W=>Math.min(W+pe,ce))},{rootMargin:"160px 0px"});return me.observe(K),()=>me.disconnect()},[et,he.length,ue.length,tt]);const we=y.useMemo(()=>{if(!T)return;if(!et)return n?T.filter(ce=>ce.type==="directory"):T;const K=S.getState().directoryCache;return T.filter(ce=>(!n||ce.type==="directory")&&Xf(ce,et,K))},[n,et,T,S]);if(!e)return l.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:x("fileTree.noWorkingDir")});if(Y||!de)return l.jsx(V_,{});if(et&&tt){const K=Ae?.total??ue.length,ce=ue.slice(0,G),pe=G<ue.length;return l.jsxs("div",{className:"termdock-native-select min-h-full space-y-px bg-surface px-2 py-2",children:[l.jsx(Dm,{count:K,loading:J,engine:Ae?.engine,limited:Ae?.limited,scope:it,content:!0}),ee?l.jsxs("div",{className:"mx-1 mt-3 rounded-xl border border-border/15 bg-surface-2 px-4 py-5 text-center text-sm text-muted-foreground",children:[x("fileTree.contentSearchNeedsRipgrep"),l.jsx("div",{className:"mt-1 break-words text-[11px] text-muted-foreground/70",children:ee})]}):J&&ue.length===0?l.jsx(dm,{label:x("fileTree.searching"),className:"py-8"}):ue.length===0?l.jsx("div",{className:"mx-1 mt-3 overflow-hidden rounded-xl border border-border/15 bg-surface-2 px-4 py-8 text-center text-sm text-muted-foreground",children:x("fileTree.noContentMatches")}):l.jsxs(l.Fragment,{children:[Ae?.limited&&l.jsx("div",{className:"mb-2 rounded-xl bg-[rgb(var(--warning-rgb)_/_0.12)] px-3 py-2 text-[11px] text-[color:var(--warning)]",children:x("fileTree.searchTruncatedHint",{count:Ae.total})}),ce.map(me=>l.jsx(GL,{entry:me,rootPath:it,selectedFilePath:b,query:w.trim(),onContentMatchSelect:_,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,insertedReferenceKey:a,copiedReferenceKey:c},me.path)),l.jsx("div",{ref:kt,className:"py-2 text-center text-[11px] text-muted-foreground",children:pe?l.jsx("button",{type:"button",onClick:()=>le(me=>Math.min(me+Lm,ue.length)),className:"rounded-full bg-surface-2 px-3 py-1 hover:bg-surface-elevated hover:text-foreground",children:x("fileTree.loadMoreSearchResults",{shown:ce.length,total:ue.length})}):J?l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(Xe,{size:10,className:"animate-spin"}),x("fileTree.searchStillRunning")]}):ce.length>0?l.jsx("span",{children:x("fileTree.showingSearchResults",{shown:ce.length,total:K})}):null})]})]})}if(et){const K=Ae?.total??he.length,ce=he.slice(0,G),pe=G<he.length;return l.jsxs("div",{className:"termdock-native-select min-h-full space-y-px bg-surface px-2 py-2",children:[l.jsx(Dm,{count:K,loading:J,engine:Ae?.engine,limited:Ae?.limited,scope:it,content:!1}),J&&he.length===0?l.jsx(dm,{label:x("fileTree.searching"),className:"py-8"}):ee?l.jsx("div",{className:"px-4 py-4 text-sm text-destructive",children:ee}):he.length===0?l.jsx("div",{className:"mx-1 mt-3 overflow-hidden rounded-xl border border-border/15 bg-surface-2 px-4 py-8 text-center text-sm text-muted-foreground",children:x("fileTree.noMatchingFiles")}):l.jsxs(l.Fragment,{children:[Ae?.limited&&l.jsx("div",{className:"mb-2 rounded-xl bg-[rgb(var(--warning-rgb)_/_0.12)] px-3 py-2 text-[11px] text-[color:var(--warning)]",children:x("fileTree.searchTruncatedHint",{count:Ae.total})}),ce.map(me=>l.jsx($L,{node:me,rootPath:it,onFileSelect:t,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,onDirectoryRoot:d,onSearchFromDirectory:u,onDirectoryPinToggle:f,onFilePinToggle:h,pinnedPaths:g,selectedFilePath:b,insertedReferenceKey:a,copiedReferenceKey:c,onFileDeleteRequest:oe,deletingFilePath:ge},me.path)),l.jsx("div",{ref:kt,className:"py-2 text-center text-[11px] text-muted-foreground",children:pe?l.jsx("button",{type:"button",onClick:()=>le(me=>Math.min(me+Nm,he.length)),className:"rounded-full bg-surface-2 px-3 py-1 hover:bg-surface-elevated hover:text-foreground",children:x("fileTree.loadMoreSearchResults",{shown:ce.length,total:he.length})}):J?l.jsxs("span",{className:"inline-flex items-center gap-1",children:[l.jsx(Xe,{size:10,className:"animate-spin"}),x("fileTree.searchStillRunning")]}):ce.length>0?l.jsx("span",{children:x("fileTree.showingSearchResults",{shown:ce.length,total:K})}):null})]})]})}return Z?l.jsxs("div",{role:o?"alert":void 0,className:"px-4 py-4 text-sm text-destructive",children:[Z,l.jsx("button",{type:"button",onClick:ie,className:"mt-2 block rounded-md bg-surface-2 px-3 py-2 text-foreground hover:bg-surface-elevated",children:x("common.retry")})]}):!T||T.length===0?l.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:x("fileTree.emptyDir")}):!we||we.length===0?l.jsx("div",{className:"mx-3 mt-3 overflow-hidden rounded-xl border border-border/15 bg-surface-2 px-4 py-8 text-center text-sm text-muted-foreground",children:x("fileTree.noMatchingFiles")}):l.jsxs("div",{className:"termdock-native-select w-max min-w-full space-y-px px-2 py-2",children:[ae&&l.jsx("div",{className:"mb-2 rounded-xl bg-[rgb(var(--warning-rgb)_/_0.12)] px-3 py-2 text-[11px] text-[color:var(--warning)]",children:x("fileTree.truncatedHint")}),we.map(K=>l.jsx(HL,{node:K,gitIgnoreRoot:e,depth:0,onFileSelect:t,directoriesOnly:n,onPathReference:r,referenceSelection:o,getReferenceText:s,onReferenceCopied:i,onDirectoryRoot:d,onSearchFromDirectory:u,onDirectoryPinToggle:f,onFilePinToggle:h,onOpenInFileBrowser:p,canOpenInFileBrowser:m,pinnedPaths:g,selectedFilePath:b,queryLower:et,insertedReferenceKey:a,copiedReferenceKey:c,onDirectoryDropFiles:R,onFileDeleteRequest:oe,deletingFilePath:ge,revealedDirectoryPath:k?.path},K.path))]})}const ra="min-h-11 rounded-lg border border-border bg-background px-2 text-sm",ao="min-h-11 rounded-lg px-3 text-sm hover:bg-surface-2 disabled:opacity-50";function YL({value:e,onChange:t,expanded:n=!1}){const[r,o]=y.useState([]),[s,i]=y.useState([]),[a,c]=y.useState(!0),[d,u]=y.useState(""),[f,h]=y.useState(""),[p,m]=y.useState(!1),g=y.useRef(null);Si(g,p,()=>m(!1));const[b,w]=y.useState(()=>_e.getState().rootPath||"/"),[E,v]=y.useState(0),C=Hx(r,e.android),_=C.filter(k=>k.access).length;y.useEffect(()=>{let k=!0;return c(!0),u(""),Promise.allSettled([Fx(),fetch("/api/computer/preferences").then(async x=>{if(!x.ok)throw new Error;return x.json()})]).then(([x,S])=>{if(k){if(x.status==="fulfilled"&&o(x.value.devices),S.status==="fulfilled"){const I=j_(S.value.preferences);i([I.local,I.remote].filter((P,T,A)=>P.host&&A.findIndex(N=>N.host===P.host&&N.protocol===P.protocol&&N.port===P.port)===T))}(x.status==="rejected"||S.status==="rejected")&&u("部分设备暂时无法读取,可重试;目录分享仍可配置。"),c(!1)}}),()=>{k=!1}},[E]);const R=()=>{const k=f.trim().replace(/\/+$/,"")||(f.trim()==="/"?"/":"");if(!k||!k.startsWith("/")&&!/^[A-Za-z]:[\\/]/.test(k)){u("请填写完整目录路径。");return}e.directories?.some(x=>x.path===k)||t({...e,directories:[...e.directories??[],{path:k,access:"read"}]}),h(""),u("")};return p?Kn.createPortal(l.jsx("div",{className:"fixed inset-0 z-popover flex items-end justify-center bg-[var(--app-backdrop)] p-3 backdrop-blur-sm sm:items-center",onMouseDown:k=>{k.target===k.currentTarget&&m(!1)},children:l.jsxs("div",{ref:g,tabIndex:-1,role:"dialog","aria-modal":"true","aria-label":"选择共享目录",className:"flex max-h-[min(80dvh,640px)] w-full max-w-lg flex-col overflow-hidden rounded-2xl border border-border bg-surface text-foreground shadow-xl outline-none",children:[l.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border px-4 py-2",children:[l.jsx("span",{className:"text-sm font-medium",children:"选择共享目录"}),l.jsx("button",{type:"button",className:ao,onClick:()=>m(!1),children:"取消"})]}),l.jsx("p",{className:"shrink-0 break-all px-4 py-3 text-xs text-muted-foreground",children:b}),l.jsx("div",{className:"min-h-0 flex-1 overflow-auto",children:l.jsx(WL,{rootPath:b,directoriesOnly:!0,selectedFilePath:null,onFileSelect:()=>{},onDirectoryRoot:w})}),l.jsx("div",{className:"shrink-0 border-t border-border p-3 pb-[max(12px,env(safe-area-inset-bottom))]",children:l.jsx("button",{type:"button",className:`${ao} w-full bg-primary text-primary-foreground`,onClick:()=>{e.directories?.some(k=>k.path===b)||t({...e,directories:[...e.directories??[],{path:b,access:"read"}]}),m(!1)},children:"共享此目录及其子目录"})})]})}),document.body):l.jsxs("fieldset",{className:"space-y-2",children:[l.jsxs("legend",{className:"mb-2 text-sm font-medium",children:["附带侧栏功能 ",l.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:"可选"})]}),l.jsxs("details",{open:n||void 0,className:"rounded-xl border border-border px-3",children:[l.jsxs("summary",{className:"min-h-11 cursor-pointer py-3 text-sm",children:[l.jsx(yc,{size:15,className:"mr-2 inline"}),"手机设备 ",l.jsx("span",{className:"text-muted-foreground",children:_?`已选 ${_} 台`:"未分享"})]}),l.jsxs("div",{className:"space-y-2 pb-3",children:[C.map(({device:k,serials:x,access:S})=>{const I=!!S;return l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("label",{className:"flex min-h-11 min-w-0 flex-1 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:I,onChange:P=>t({...e,android:mm(e.android,x,P.target.checked?"view":void 0)})}),l.jsxs("span",{className:"min-w-0 break-all",children:[k.model||k.serial,l.jsxs("span",{className:"block text-xs text-muted-foreground",children:[k.state==="device"?"已连接":"离线或尚未授权",x.length>1?` · ${x.length} 个连接地址`:""]})]})]}),I&&l.jsxs("select",{className:ra,"aria-label":`${k.model||k.serial}权限`,value:S,onChange:P=>t({...e,android:mm(e.android,x,P.target.value)}),children:[l.jsx("option",{value:"view",children:"仅查看"}),l.jsx("option",{value:"control",children:"查看并操作"})]})]},k.serial)}),!C.length&&l.jsx("p",{className:"py-2 text-xs text-muted-foreground",children:a?"正在查找设备…":"暂无手机设备,请先在手机侧栏连接设备。"})]})]}),l.jsxs("details",{open:n||void 0,className:"rounded-xl border border-border px-3",children:[l.jsxs("summary",{className:"min-h-11 cursor-pointer py-3 text-sm",children:[l.jsx(Du,{size:15,className:"mr-2 inline"}),"电脑 ",l.jsx("span",{className:"text-muted-foreground",children:e.computers?.length?`已选 ${e.computers.length} 台`:"未分享"})]}),l.jsxs("div",{className:"space-y-2 pb-3",children:[s.map(k=>{const x=k.protocol==="vnc"?5900:Number(k.port||3389),S=`${k.host}:${x}`,I=e.computers?.find(P=>P.host===k.host&&P.protocol===k.protocol&&P.port===x);return l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsxs("label",{className:"flex min-h-11 min-w-0 flex-1 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:!!I,onChange:P=>t({...e,computers:P.target.checked?[...e.computers??[],{host:k.host,protocol:k.protocol,port:x,access:"view"}]:e.computers?.filter(T=>T!==I)})}),l.jsxs("span",{className:"break-all",children:[k.host==="127.0.0.1"?"服务所在电脑":k.host,l.jsxs("span",{className:"block text-xs text-muted-foreground",children:[k.protocol.toUpperCase()," · ",x]})]})]}),I&&l.jsxs("select",{className:ra,"aria-label":`${k.host}权限`,value:I.access,onChange:P=>t({...e,computers:e.computers?.map(T=>T===I?{...T,access:P.target.value}:T)}),children:[l.jsx("option",{value:"view",children:"仅查看"}),l.jsx("option",{value:"control",children:"查看并操作"})]})]},S)}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"接收者需使用自己的系统登录凭据。仅查看会在服务端阻止键盘、鼠标和剪贴板输入。"})]})]}),l.jsxs("details",{open:n||void 0,className:"rounded-xl border border-border px-3",children:[l.jsxs("summary",{className:"min-h-11 cursor-pointer py-3 text-sm",children:[l.jsx(gc,{size:15,className:"mr-2 inline"}),"文件目录 ",l.jsx("span",{className:"text-muted-foreground",children:e.directories?.length?`已选 ${e.directories.length} 个`:"未分享"})]}),l.jsxs("div",{className:"space-y-2 pb-3",children:[e.directories?.map(k=>l.jsxs("div",{className:"rounded-lg bg-surface-2 p-2",children:[l.jsx("p",{className:"break-all text-xs",children:k.path}),l.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2",children:[l.jsxs("select",{className:ra,"aria-label":`${k.path}权限`,value:k.access,onChange:x=>t({...e,directories:e.directories?.map(S=>S.path===k.path?{...S,access:x.target.value}:S)}),children:[l.jsx("option",{value:"read",children:"仅查看与下载"}),l.jsx("option",{value:"write",children:"可修改、上传与删除"})]}),l.jsx("button",{type:"button",className:ao,"aria-label":`移除${k.path}`,onClick:()=>t({...e,directories:e.directories?.filter(x=>x.path!==k.path)}),children:l.jsx(ci,{size:16})})]})]},k.path)),l.jsx("label",{className:"block text-xs text-muted-foreground",htmlFor:"share-directory",children:"目录及其所有子目录"}),l.jsx("input",{id:"share-directory",className:`${ra} w-full`,placeholder:"例如 /home/user/project",value:f,onChange:k=>h(k.target.value),onKeyDown:k=>{k.key==="Enter"&&(k.preventDefault(),R())}}),l.jsxs("div",{className:"flex justify-end gap-2",children:[l.jsx("button",{type:"button",className:ao,onClick:()=>m(!0),children:"浏览目录"}),l.jsx("button",{type:"button",className:ao,disabled:!f.trim(),onClick:R,children:"添加目录"})]}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"仅开放所选目录及其子目录。跳转到目录外的符号链接不可访问。"})]})]}),d&&l.jsxs("div",{role:"status",className:"flex items-center gap-2 text-xs text-muted-foreground",children:[l.jsx("span",{children:d}),l.jsx("button",{type:"button",className:ao,"aria-label":"重新读取设备",onClick:()=>v(k=>k+1),children:l.jsx(Ou,{size:14})})]})]})}function Ll({resources:e}){const[t,n]=y.useState([]),r=!!e?.android?.length;if(y.useEffect(()=>{if(!r)return;let s=!0;return Fx().then(i=>{s&&n(i.devices)}).catch(()=>{}),()=>{s=!1}},[r]),!e)return null;const o=Hx(t,e.android).filter(s=>s.access);return l.jsxs("ul",{className:"space-y-1 text-xs leading-5 text-muted-foreground",children:[o.map(({device:s,serials:i,access:a})=>l.jsxs("li",{title:i.join(`
8
- `),children:["手机 · ",s.model||s.serial," · ",a==="control"?"可操作":"仅查看"]},`a${s.serial}`)),e.computers?.map((s,i)=>l.jsxs("li",{children:["电脑 · ",s.host,":",s.port," · ",s.access==="control"?"可操作":"仅查看"]},`c${i}`)),e.directories?.map((s,i)=>l.jsxs("li",{className:"break-all",children:["文件 · ",s.path," · ",s.access==="write"?"可修改":"仅查看"]},`f${i}`))]})}const mu=["message","sparkles","bot","code","file","briefcase","lightbulb","rocket"],Dl=e=>!!e&&typeof e=="object"&&!Array.isArray(e);function Jf(e){return typeof e=="string"&&e.length<=32&&(mu.includes(e)||new RegExp("^(?:\\p{Regional_Indicator}{2}|[#*0-9]\\uFE0F?\\u20E3|\\p{Extended_Pictographic}[\\uFE0F\\p{Emoji_Modifier}]*(?:\\u200D\\p{Extended_Pictographic}[\\uFE0F\\p{Emoji_Modifier}]*)*)$","u").test(e))}function XL(e,t){if(!Dl(t)||t.kind!=="sessions"||!Array.isArray(t.sessionIds))return!1;const n=t.sessionIds;return Dl(e)&&Object.keys(e).length<=256&&Object.entries(e).every(([r,o])=>n.includes(r)&&Dl(o)&&Object.keys(o).length>0&&Object.keys(o).every(s=>["name","icon"].includes(s))&&(o.name===void 0||typeof o.name=="string"&&o.name.trim().length>0&&o.name.length<=80&&!/[\x00-\x1f\x7f\u202a-\u202e\u2066-\u2069]/.test(o.name))&&(o.icon===void 0||Jf(o.icon)))}const JL={message:ii,sparkles:cw,bot:oy,code:vy,file:Ay,briefcase:cy,lightbulb:jy,rocket:nw},jm={message:"对话",sparkles:"灵感",bot:"智能体",code:"代码",file:"文档",briefcase:"工作",lightbulb:"想法",rocket:"项目"};function ni({icon:e,size:t=20}){const n=JL[e];return n?l.jsx(n,{size:t,"aria-hidden":"true"}):e&&Jf(e)?l.jsx("span",{"aria-hidden":"true",className:"leading-none",style:{fontSize:t},children:e}):l.jsx(ii,{size:t,"aria-hidden":"true"})}function ZL({sessions:e,value:t,onChange:n}){const[r,o]=y.useState();return l.jsxs("div",{className:"space-y-3",children:[e.map(s=>{const i=t[s.sessionId]||{},a=i.icon||"message",c=d=>n({...t,[s.sessionId]:d});return l.jsxs("div",{className:"rounded-xl border border-border bg-background/40 p-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsxs("button",{type:"button","aria-label":`更改${s.name}的分享图标`,"aria-expanded":r===s.sessionId,className:"flex h-12 w-12 shrink-0 items-center justify-center gap-0.5 rounded-xl bg-surface-2 text-primary hover:bg-surface-elevated focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",onClick:()=>o(d=>d===s.sessionId?void 0:s.sessionId),children:[l.jsx(ni,{icon:a,size:23}),l.jsx(Pr,{size:11})]}),l.jsxs("label",{className:"min-w-0 flex-1",children:[l.jsx("span",{className:"mb-1 block text-xs text-muted-foreground",children:"分享显示名称"}),l.jsx("input",{"aria-label":e.length===1?"分享显示名称":`${s.name}的分享显示名称`,maxLength:80,className:"min-h-9 w-full min-w-0 border-b border-transparent bg-transparent text-base font-medium outline-none placeholder:text-muted-foreground focus:border-primary",placeholder:s.name,value:i.name??s.name,onChange:d=>c({...i,name:d.target.value})})]}),(i.name!==void 0||i.icon!==void 0)&&l.jsx("button",{type:"button","aria-label":`重置${s.name}的分享外观`,title:"恢复会话默认名称与图标",className:"inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:bg-surface-2",onClick:()=>n(Object.fromEntries(Object.entries(t).filter(([d])=>d!==s.sessionId))),children:l.jsx(ow,{size:14})})]}),r===s.sessionId&&l.jsxs("fieldset",{className:"mt-3 space-y-3 border-t border-border pt-3",children:[l.jsx("legend",{className:"sr-only",children:"分享图标"}),l.jsx("div",{className:"grid grid-cols-8 gap-1",children:mu.map(d=>l.jsx("button",{type:"button",title:jm[d],"aria-label":`使用${jm[d]}图标`,"aria-pressed":a===d,className:`flex min-h-11 items-center justify-center rounded-lg border ${a===d?"border-primary bg-primary/10 text-primary":"border-transparent text-muted-foreground hover:bg-surface-2"}`,onClick:()=>{c({...i,icon:d}),o(void 0)},children:l.jsx(ni,{icon:d,size:20})},d))}),l.jsxs("label",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[l.jsx("span",{children:"自定义 Emoji"}),l.jsx("input",{"aria-label":`${s.name}的自定义Emoji`,className:"min-h-11 w-24 rounded-lg border border-border bg-background px-3 text-center text-xl text-foreground outline-none focus:ring-2 focus:ring-ring",placeholder:"例如 🚀",maxLength:32,value:mu.includes(a)?"":a,onChange:d=>c({...i,icon:d.target.value||void 0})})]}),i.icon&&!Jf(i.icon)&&l.jsx("p",{role:"alert",className:"text-xs text-destructive",children:"请输入一个 Emoji,或选择上方图标。"})]})]},s.sessionId)}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"接收者看到的会话名称与图标,可单独设置。"})]})}function QL(e,t){const n=e.url||t?.serviceOrigin||(t?.entryServiceId?void 0:t?.url);if(n)try{const r=new URL(n);if(["https:","http:"].includes(r.protocol)&&!r.username&&!r.password&&!r.search&&!r.hash)return r.origin}catch{}}function eD({target:e,saved:t,entry:n,access:r,busy:o,choose:s}){const i=t?.label||Nw(e),a=QL(e,t),c=e.available?r?.error:gr(e),d=!e.authorized||!e.available?"未核验":r?.status==="authorized"?"已授权":r?.status==="passwordRequired"?"待登录":r?.error?"未确认":"核验中",u=!e.available||r?.blocked?"暂不可连接":e.authorized?r?.status==="passwordRequired"?"登录目标服务":r?.status==="authorized"?"连接":r?.error?"重试连接":"正在核验…":"授权并连接",f=e.platform&&{darwin:"macOS",linux:"Linux",win32:"Windows",freebsd:"FreeBSD",openbsd:"OpenBSD",aix:"AIX",sunos:"SunOS",android:"Android"}[e.platform];return l.jsxs("article",{className:"service-relay-item","aria-label":i,children:[l.jsxs("button",{type:"button",className:"service-row-open service-full-width service-relay-open",disabled:o||!e.available||r?.blocked||e.authorized&&!r,onClick:s,children:[l.jsx("span",{className:"service-icon",children:l.jsx(ai,{size:19})}),l.jsxs("span",{className:"service-row-copy",children:[l.jsxs("span",{className:"service-relay-heading",children:[l.jsx("span",{className:"service-name",children:i}),l.jsx("span",{className:"service-relay-status",children:e.available?"中转可用":"中转不可用"})]}),l.jsx("span",{className:"service-relay-copy",children:a||"仅中转连接 · 未提供直连地址"}),l.jsxs("span",{className:"service-relay-copy",children:["中转:",e.authorized?"已授权":"待授权"," · 目标访问:",d]}),c&&l.jsx("span",{className:"service-relay-failure",children:c}),l.jsxs("span",{className:"service-relay-action",children:[u,l.jsx(On,{size:14})]})]})]}),l.jsxs("details",{className:"service-relay-details",children:[l.jsx("summary",{"aria-label":`${i}的服务详情`,children:"服务详情"}),l.jsxs("dl",{children:[l.jsx("dt",{children:"连接路径"}),l.jsxs("dd",{children:["此设备 → ",n.label," → ",i]}),l.jsx("dt",{children:"入口地址"}),l.jsx("dd",{children:n.serviceOrigin||n.url}),l.jsx("dt",{children:"目标地址"}),l.jsx("dd",{children:a||"目标未提供直连地址,通过入口中转连接"}),l.jsx("dt",{children:"机器名称"}),l.jsx("dd",{children:e.hostname||"目标服务尚未提供"}),l.jsx("dt",{children:"系统 / 版本"}),l.jsx("dd",{children:[f,e.version&&`Termdock ${e.version}`].filter(Boolean).join(" · ")||"目标服务尚未提供"}),l.jsx("dt",{children:"服务标识"}),l.jsx("dd",{children:l.jsx("code",{children:e.serviceId})}),e.error&&l.jsxs(l.Fragment,{children:[l.jsx("dt",{children:"诊断代码"}),l.jsx("dd",{children:l.jsx("code",{children:e.error})})]})]})]})]})}function Om(e){const t=e&&typeof e=="object"&&"code"in e?e.code:void 0;return t==="TARGET_PASSWORD_REQUIRED"||t==="TARGET_SECURITY_UPGRADE_REQUIRED"||t==="TARGET_IDENTITY_MISMATCH"?{error:gr({error:t}),blocked:!0}:{error:zn(e).message}}function tD({service:e,onBusyChange:t,onConnect:n,onConnectWithPassword:r}){const[o,s]=y.useState(),[i,a]=y.useState(!0),[c,d]=y.useState(!1),[u,f]=y.useState(""),[h,p]=y.useState(0),[m,g]=y.useState(),[b,w]=y.useState(""),[E,v]=y.useState({}),[C,_]=y.useState([]);y.useEffect(()=>{let x=!1,S=0;const I=async()=>{const T=++S;try{const A=await mt();!x&&T===S&&_(A)}catch{}};I();const P=di(()=>{I()});return()=>{x=!0,P()}},[]),y.useEffect(()=>{let x=!1,S=!1,I;const P=new AbortController,T=new Map;a(!0),f(""),s(void 0),v({}),g(void 0),w("");const A=async N=>{try{const L=await u2(e);if(x)return;S=!0,s(L),f(""),a(!1);const D=L.items.filter(B=>B.available&&B.authorized);let j=0;await Promise.all(Array.from({length:Math.min(3,D.length)},async()=>{for(;!x&&j<D.length;){const B=D[j++],M=T.get(B.serviceId);if(M&&Date.now()-M.at<1e4)continue;let F;try{const $=await Wd({url:L.route.url,entryServiceId:L.route.targetPeerId,targetPeerId:B.serviceId,routes:[L.route]},P.signal);F=$==="invitationRequired"?{error:gr({error:"TARGET_PASSWORD_REQUIRED"}),blocked:!0}:{status:$}}catch($){F=Om($)}if(x)return;T.set(B.serviceId,{at:Date.now(),value:F}),v($=>({...$,[B.serviceId]:F}))}}))}catch(L){!x&&(!S||N)&&f(L instanceof Error?L.message:"暂时无法读取中转列表,请重试。")}finally{x||(a(!1),I=setTimeout(()=>{A(!1)},2e3))}};return A(!0),()=>{x=!0,P.abort(),clearTimeout(I)}},[e.id,e.url,h]),y.useEffect(()=>{const x=m&&o?.items.find(S=>S.serviceId===m.targetPeerId);m&&o&&(!x||!x.available)&&(g(void 0),w(""),f(x?gr(x):"该服务已不可见,请刷新列表或联系入口管理员。"))},[o,m]);const R=async x=>{if(!c){d(!0),t(!0),f("");try{await x()}catch(S){f(S instanceof Error?S.message:"暂时无法连接,请重试。")}finally{d(!1),t(!1)}}},k=async x=>{const S=await f2(o.route,x.serviceId);try{const I=await Wd({...S,url:o.route.url,serviceOrigin:void 0,entryServiceId:o.route.targetPeerId,routes:[o.route]});if(I==="invitationRequired"){v(P=>({...P,[x.serviceId]:{error:gr({error:"TARGET_PASSWORD_REQUIRED"}),blocked:!0}}));return}if(I==="passwordRequired"){g(S);return}await n(S)}catch(I){if(!(I instanceof jt)){const P=Om(I);throw v(T=>({...T,[x.serviceId]:P})),new Error(P.error)}g(S)}};return l.jsxs("div",{className:"service-form",children:[m?l.jsxs("form",{className:"service-form",onSubmit:x=>{x.preventDefault(),R(async()=>{try{await r?.(m,b)}catch(S){const I=zn(S).code;throw(I==="PASSWORD_NOT_CONFIGURED"||I==="TARGET_PASSWORD_REQUIRED"||I==="TARGET_SECURITY_UPGRADE_REQUIRED")&&(v(P=>({...P,[m.targetPeerId]:{error:gr({error:I==="TARGET_SECURITY_UPGRADE_REQUIRED"?I:"TARGET_PASSWORD_REQUIRED"}),blocked:!0}})),g(void 0)),S}finally{w("")}})},children:[l.jsxs("p",{className:"service-help",children:["已通过“",e.label,"”连接到“",m.serviceName,"”。请登录目标服务,完成此设备的访问授权。"]}),r?l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"目标服务密码"}),l.jsx("input",{type:"password",autoFocus:!0,required:!0,autoComplete:"current-password",value:b,disabled:c,onChange:x=>w(x.target.value)})]}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:c||!b,children:c?"正在登录…":"登录并连接"})]}):l.jsx("p",{className:"service-help",children:"请让目标服务管理员邀请此设备后再连接。"}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:c,onClick:()=>{g(void 0),w(""),f(""),p(x=>x+1)},children:"返回中转列表"})]}):l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"service-help",children:["通过“",e.label,"”连接其他电脑。",o?.canManage?"首次连接会授权此设备使用中转;目标服务仍需单独登录。":"仅显示此设备可用的中转;目标服务仍需单独登录。"]}),i?l.jsxs("p",{className:"service-feedback",role:"status",children:[l.jsx(Xe,{size:16,className:"service-spinning"}),"正在读取可中转的服务…"]}):o&&l.jsxs("div",{className:"service-list",children:[o.items.map(x=>l.jsx(eD,{target:x,saved:C.find(S=>S.targetPeerId===x.serviceId),entry:e,access:E[x.serviceId],busy:c,choose:()=>{R(()=>k(x))}},x.serviceId)),o.items.length===0&&l.jsx("p",{className:"service-empty",children:o.canManage?"暂无可中转的服务。可在本机 Mac 客户端连接目标服务,或在目标服务的“备用连接”中启用本入口。":"暂无已授权的中转服务,请让入口管理员分享备用连接邀请。"})]}),c&&l.jsxs("p",{className:"service-feedback",role:"status",children:[l.jsx(Xe,{size:16,className:"service-spinning"}),"正在授权并连接目标服务…"]}),!i&&l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:c,onClick:()=>p(x=>x+1),children:"刷新列表"})]}),u&&l.jsx("p",{className:"service-error",role:"alert",children:u})]})}function w0({service:e,onBusyChange:t,recoverEntry:n,onRecovered:r,onCancelRecovery:o}){const s={...e,targetPeerId:e.targetPeerId,serviceName:e.label},[i,a]=y.useState(()=>e.routes??Qt(s)),[c,d]=y.useState([]),[u,f]=y.useState(!0),[h,p]=y.useState(!1),[m,g]=y.useState(""),b=U=>{p(U),t(U)},[w,E]=y.useState(),[v,C]=y.useState(""),[_,R]=y.useState(""),[k,x]=y.useState(""),[S,I]=y.useState(!1),[P,T]=y.useState(),A=async()=>{const U=await Cl(n,s.targetPeerId),J={canManage:U.canManage,active:U.grants.some(Q=>Q.active)};return T(J),J};y.useEffect(()=>{if(!n)return;let U=!1;return Cl(n,s.targetPeerId).then(J=>{U||T({canManage:J.canManage,active:J.grants.some(Q=>Q.active)})}).catch(()=>{U||g("无法核对入口授权,请检查连接或联系入口管理员。")}),()=>{U=!0}},[n?.targetPeerId,n?.url,s.targetPeerId]);const[N,L]=y.useState(),[D,j]=y.useState(),[B,M]=y.useState(!1);y.useEffect(()=>{let U=!1;return mt().then(J=>{U||d(J.filter(Q=>Q.targetPeerId&&Q.targetPeerId!==e.targetPeerId))}).catch(()=>{U||g("暂时无法读取可用服务。")}).finally(()=>{U||f(!1)}),()=>{U=!0}},[e.targetPeerId]);const F=U=>c.find(J=>J.targetPeerId===U.targetPeerId)?.label||new URL(U.url).host,$=async U=>{b(!0),g(""),x("");try{await U()}catch(J){const Q=J instanceof Error?J.message:"";g(/AUTHORIZATION|DENIED/.test(Q)?"当前设备没有入口管理权限。请让管理员分享备用连接邀请,或使用入口密码授权。":"暂时无法完成。请确认入口能连接目标服务,且目标地址、证书和授权有效。")}finally{b(!1)}},H=async(U,J)=>{const Q={url:U.serviceOrigin||U.url,targetPeerId:U.targetPeerId};await $(async()=>{const ee=await Cl(Q,s.targetPeerId);if(!ee.grants.some(q=>q.active)){if(!ee.canManage&&J===void 0){E(U);return}await nm(s,Q,J)}const Te=[...i.filter(q=>q.targetPeerId!==Q.targetPeerId||q.url!==Q.url),Q];await fa(e,Te),a(Te),E(void 0),C("")})};if(n)return l.jsxs("div",{className:"service-form",children:[l.jsxs("p",{className:"service-help",children:["仅恢复此设备通过“",F(n),"”连接“",e.label,"”的中转权限。目标服务会单独验证访问权限。"]}),!P&&!m&&l.jsx("p",{role:"status",children:"正在核对入口授权…"}),P&&!P.active&&!P.canManage&&l.jsxs("p",{role:"status",className:"service-help",children:["当前设备没有此入口的授权管理权限。请让入口管理员授予此设备到“",e.label,"”的中转权限或分享对应的备用连接邀请。"]}),P&&(P.active||P.canManage)&&l.jsx("button",{className:"service-button service-primary",disabled:h,onClick:()=>{$(async()=>{const U=await A();if(!U.active){if(!U.canManage)throw new Error("AUTHORIZATION_DENIED");await nm(s,n)}if(!(await A()).active)throw new Error("AUTHORIZATION_DENIED");await r?.()})},children:h?"正在核对并连接…":P.active?"核对授权并重新连接":"授权此设备并重新连接"}),m&&l.jsx("p",{role:"alert",className:"service-error",children:m}),l.jsx("button",{className:"service-button service-secondary",disabled:h,onClick:o,children:"取消"})]});if(D)return l.jsxs("div",{className:"service-form",children:[l.jsxs("p",{className:"service-help",children:["把链接发给需要使用此备用连接的人。它只允许通过入口连接“",e.label,"”,对方仍需获得目标服务的访问权限。"]}),l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"备用连接邀请"}),l.jsx("input",{readOnly:!0,value:D,onFocus:U=>U.target.select()})]}),l.jsxs("button",{type:"button",className:"service-button service-primary",onClick:()=>{Kf(D).then(U=>{M(U),U||g("无法自动复制,请长按链接复制。")})},children:[l.jsx(si,{size:16}),B?"已复制":"复制邀请链接"]}),l.jsx("button",{type:"button",className:"service-button service-secondary",onClick:()=>{j(void 0),M(!1)},children:"返回备用连接"}),m&&l.jsx("p",{role:"alert",className:"service-error",children:m})]});if(w)return l.jsxs("form",{className:"service-form",onSubmit:U=>{U.preventDefault(),H(w,v).finally(()=>C(""))},children:[l.jsxs("p",{className:"service-help",children:["需要“",w.label,"”的管理员授权。若这是你的服务,可以使用它的密码;否则请管理员分享备用连接邀请。"]}),l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"入口服务密码"}),l.jsx("input",{type:"password",required:!0,value:v,onChange:U=>C(U.target.value),autoComplete:"current-password",disabled:h,autoFocus:!0})]}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:h||!v,children:h?"正在授权…":"授权并启用"}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>{E(void 0),C("")},children:"取消"}),m&&l.jsx("p",{role:"alert",className:"service-error",children:m})]});const te=i.filter(U=>U.targetPeerId===s.targetPeerId),ne=i.filter(U=>U.targetPeerId!==s.targetPeerId),re=c.flatMap(U=>Ot({...U,targetPeerId:U.targetPeerId}).map(J=>({...U,id:JSON.stringify([U.id,J]),url:J,serviceOrigin:J}))),ae=async()=>{if(!h){b(!0),I(!0),g(""),x("");try{a(await p2({...e,routes:i},_)),R(""),x("备用地址已验证并保存。")}catch(U){g(U instanceof Error?U.message:"暂时无法添加地址,请重试。")}finally{b(!1),I(!1)}}};return l.jsxs("div",{className:"service-form",children:[l.jsx("p",{className:"service-help",children:"电脑换了网络?添加它在新网络下的地址,原地址连不上时会自动尝试。只接受同一台服务。"}),l.jsxs("form",{className:"service-form",onSubmit:U=>{U.preventDefault(),ae()},children:[l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"备用地址"}),l.jsx("input",{value:_,onChange:U=>{R(U.target.value),g(""),x("")},required:!0,disabled:h||i.length>=4,inputMode:"url",autoComplete:"off",autoCapitalize:"none",spellCheck:!1,placeholder:"例如:192.168.10.20:9834"})]}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:h||i.length>=4||!_.trim(),children:S?l.jsxs(l.Fragment,{children:[l.jsx(Xe,{size:16,className:"service-spinning"}),"正在验证…"]}):"验证并添加"})]}),m&&l.jsx("p",{role:"alert",className:"service-error",children:m}),k&&l.jsx("p",{role:"status",className:"service-help",children:k}),i.length>=4&&l.jsx("p",{className:"service-help",children:"已保存 4 个备用连接。移除不再使用的地址或入口后,可以继续添加。"}),l.jsxs("div",{children:[l.jsx("p",{className:"service-help",children:"首选地址"}),l.jsx("p",{className:"service-address",children:e.serviceOrigin||e.url})]}),te.length>0&&l.jsx("div",{className:"service-list",children:te.map(U=>l.jsxs("div",{className:"service-route-item",children:[l.jsxs("div",{className:"service-route-line",children:[l.jsx("span",{className:"service-address service-route-address",children:U.url}),l.jsx("button",{type:"button",className:"service-icon-button","aria-label":`移除地址 ${U.url}`,disabled:h,onClick:()=>L(U),children:"移除"})]}),N?.targetPeerId===U.targetPeerId&&N.url===U.url&&l.jsxs("div",{className:"service-form",children:[l.jsx("p",{className:"service-help",children:"从备用连接中移除此地址?不会停止正在运行的终端。"}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>L(void 0),children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:h,onClick:()=>{$(async()=>{const J=i.filter(Q=>Q.targetPeerId!==U.targetPeerId||Q.url!==U.url);await fa(e,J),a(J),L(void 0)})},children:"确认移除"})]})]})]},U.url))}),l.jsxs("details",{className:"service-relay-options",children:[l.jsxs("summary",{children:["通过其他服务中转",ne.length?`(${ne.length})`:""]}),l.jsxs("div",{className:"service-form",children:[l.jsx("p",{className:"service-help",children:"所有直连地址都不可用时,尝试下方已授权入口;直连恢复后自动切回。"}),ne.length>0&&l.jsx("div",{className:"service-list",children:ne.map(U=>l.jsxs("div",{className:"service-route-item",children:[l.jsxs("div",{className:"service-route-line",children:[l.jsx("span",{className:"service-icon",children:l.jsx(ai,{size:18})}),l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:F(U)}),l.jsx("span",{className:"service-description",children:U.url})]}),l.jsx(Ln,{size:16,className:"service-selected"})]}),N?.targetPeerId===U.targetPeerId&&N.url===U.url?l.jsxs("div",{className:"service-form",children:[l.jsxs("p",{className:"service-help",children:["撤销此设备经“",F(U),"”所有地址连接目标的权限?如当前无法直连,目标服务将断开。"]}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>L(void 0),children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:h,onClick:()=>{$(async()=>{await h2(s.targetPeerId,U);const J=i.filter(Q=>Q.targetPeerId!==U.targetPeerId);await fa(e,J),a(J),L(void 0)})},children:"确认撤销"})]})]}):l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:h,onClick:()=>{$(async()=>{const J=await tx(s,U);j(Bf({v:1,routeOnly:!0,serviceId:s.targetPeerId,name:e.label,serviceUrl:e.serviceOrigin||e.url,entryUrl:U.url,entryServiceId:U.targetPeerId,routeCode:J.routeCode}))})},children:"分享备用连接"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:h,onClick:()=>L(U),children:"撤销授权"})]})]},JSON.stringify([U.targetPeerId,U.url])))}),u?l.jsxs("p",{role:"status",className:"service-feedback",children:[l.jsx(Xe,{size:16,className:"service-spinning"}),"正在读取服务…"]}):l.jsxs("div",{children:[l.jsx("p",{className:"service-help",children:"添加中转入口"}),re.filter(U=>!i.some(J=>J.targetPeerId===U.targetPeerId&&J.url===U.url)).map(U=>l.jsxs("button",{type:"button",className:"service-row-open service-full-width",disabled:h||i.length>=4,onClick:()=>{H(U)},children:[l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:U.label}),l.jsx("span",{className:"service-description",children:U.url})]}),l.jsx(On,{size:16})]},U.id)),c.length===0&&l.jsx("p",{className:"service-empty",children:"添加并登录另一台服务后,可以将它设为中转入口。"})]})]})]}),h&&!S&&l.jsxs("p",{role:"status",className:"service-feedback",children:[l.jsx(Xe,{size:16,className:"service-spinning"}),"正在验证连接与授权…"]})]})}function Mm(e){if(e instanceof Error){if(e.name==="TimeoutError"||/^(The operation timed out\.?|The operation was aborted due to timeout\.?|signal timed out|Secure handshake timed out|Secure connection timed out)$/i.test(e.message))return"连接超时。请确认分享电脑已唤醒、Termdock 正在运行,且当前设备能访问这个地址。";if(["Secure transport unavailable","Failed to fetch","Load failed","NetworkError when attempting to fetch resource."].includes(e.message))return"未能建立安全连接。请先检查服务地址和网络;如果浏览器提示证书错误,再完成证书信任设置。"}}function nD({current:e,renderRoutes:t,renderRelayServices:n,onOpen:r,onAdd:o,onInvite:s,hideHeader:i,onNavigation:a,onBusyChange:c,initiallyAdding:d=!1,initialInput:u,autoConnect:f=!1,initialServicePage:h,certificateTrust:p}){const{t:m}=Nt(),g=G=>{try{G.includes("#termdock-invite=")?qn(G):ze(G)}catch{throw new Error(m(G.includes("#termdock-invite=")?"login.invalidInvitation":"login.invalidAddress"))}},b=G=>{try{return g(G),!0}catch(le){return P(le.message),!1}},[w,E]=y.useState([]),[v,C]=y.useState(!0),[_,R]=y.useState(h||(d?{kind:"add",input:u}:{kind:"list"})),[k,x]=y.useState(!1),S=y.useCallback(G=>{x(G),c?.(G)},[c]),[I,P]=y.useState(""),[T,A]=y.useState(),[N,L]=y.useState(),[D,j]=y.useState({}),B=y.useRef(0),M=y.useRef(),F=y.useRef(!0),$=y.useRef(!1),H=G=>F.current&&B.current===G,te=G=>{(!G||M.current===G)&&(M.current=void 0)},ne=()=>{const G=M.current;G&&p?.discard(G).catch(()=>{}).finally(()=>te(G))},re=()=>{B.current++,ne(),L(void 0)},ae=y.useRef(re);ae.current=re;const U=y.useCallback(()=>{ae.current(),R(G=>G.kind==="routes"||G.kind==="relay-services"?{kind:"edit",service:G.service}:{kind:"list"}),P(""),A(void 0)},[]),J=_.kind==="add"?"添加服务":_.kind==="edit"?"服务设置":_.kind==="routes"?"备用连接":_.kind==="relay-services"?"可中转的服务":void 0;y.useEffect(()=>{a?.({title:J,...J?{back:U}:{}})},[J,U,a]),y.useEffect(()=>{let G=!1,le=0;const ue=async()=>{const ge=++le;try{const We=await mt();!G&&le===ge&&(E(We),P(""))}catch{!G&&le===ge&&P("暂时无法读取服务列表,请重试。")}finally{!G&&le===ge&&C(!1)}};ue();const De=di(()=>{ue()});return()=>{G=!0,De()}},[]),y.useEffect(()=>(F.current=!0,()=>{F.current=!1,B.current++,ne()}),[]),y.useEffect(()=>{re()},[e?.id,e?.url,e?.targetPeerId]),y.useEffect(()=>{const G=B.current;p&&p.listPins().then(le=>{H(G)&&j(le)}).catch(()=>{})},[p]);const Q=async(G,le,ue=G)=>{re();const De=B.current,ge={certificateReviewRequired:!0};try{const We=await le();return H(De)?We:ge}catch(We){if(!H(De))return ge;if(!p||!["PREVIEW_DISCOVERY_FAILED","PREVIEW_CERTIFICATE_REJECTED"].includes(We?.code||""))throw We;try{const ye=await p.inspect(G);if(ye.origin!==G||!/^[a-f0-9]{64}$/i.test(ye.fingerprint)||!ye.receipt)throw new Error("Invalid certificate inspection result");H(De)?(M.current=ye.receipt,L({origin:G,fingerprint:ye.fingerprint,trustedFingerprint:ye.trustedFingerprint,receipt:ye.receipt,retry:le,retryInput:ue,changed:!!ye.trustedFingerprint&&ye.trustedFingerprint.toLowerCase()!==ye.fingerprint.toLowerCase(),confirmed:!1,generation:De})):p.discard(ye.receipt).catch(()=>{})}catch{H(De)&&P("无法读取此地址的 HTTPS 证书。请检查地址和网络后重试。")}return{certificateReviewRequired:!0}}},ee=async()=>{const G=N;!G||!G.confirmed||!p||await Te(async()=>{try{if(!H(G.generation)||(await p.trust(G.origin,G.fingerprint,G.receipt),te(G.receipt),!H(G.generation)))return;const le=await p.listPins();if(!H(G.generation)||(j(le),L(void 0),!H(G.generation)))return;const ue=await G.retry();if(!H(G.generation))return;ue?.passwordRequired?R({kind:"add",input:G.retryInput,passwordRequired:!0}):R({kind:"list"})}catch(le){if(te(G.receipt),le?.code==="PREVIEW_CERTIFICATE_CHANGED"&&H(G.generation)){L(void 0);try{const ue=await p.inspect(G.origin);if(ue.origin!==G.origin||!/^[a-f0-9]{64}$/i.test(ue.fingerprint)||!ue.receipt)throw new Error("Invalid certificate inspection result");H(G.generation)?(M.current=ue.receipt,L({...G,fingerprint:ue.fingerprint,trustedFingerprint:ue.trustedFingerprint,receipt:ue.receipt,changed:!0,confirmed:!1})):p.discard(ue.receipt).catch(()=>{}),H(G.generation)&&P("证书在确认期间发生变化。请重新核对新指纹后再决定是否信任。")}catch{H(G.generation)&&P("证书在确认期间发生变化,且无法重新读取。请稍后重试。")}return}if(H(G.generation))throw L(void 0),le}})},Te=async G=>{if($.current||!F.current)return;$.current=!0,S(!0),P("");let le=B.current;try{const ue=G();le=B.current,await ue}catch(ue){H(le)&&P(Mm(ue)||(ue instanceof Error?ue.message:"暂时无法完成,请重试。"))}finally{$.current=!1,F.current&&S(!1)}},q=async(G,le)=>{let ue;return await Te(async()=>{A(void 0);const De=G.includes("#termdock-invite=")?qn(G):void 0,ge=De?.url||ze(G);try{ue=await Q(ge,()=>o(G,le),G)}catch(We){const ye=Mm(We),Ge=De?Hv(We):void 0;if(ye||Ge?.kind==="connection"){const Oe=De?new URL(G):void 0;Oe&&(Oe.hash="",Oe.search=""),A({origin:ge,...Oe?.protocol==="http:"&&Oe.pathname==="/connect"?{setupUrl:Oe.href}:{}})}throw Ge?new Error(ye||`${Ge.title}。${Ge.description}`):We}ue?.passwordRequired?R({kind:"add",input:G,passwordRequired:!0}):ue?.certificateReviewRequired||U()}),ue},z=y.useRef(!1);y.useEffect(()=>{!f||!u||z.current||(z.current=!0,q(u))},[f,u]);const de=_.kind==="edit"||_.kind==="routes"||_.kind==="relay-services"?w.find(G=>sn(G,_.service))||_.service:void 0,he=e?w.find(G=>sn(G,e))||e:void 0,Ee=w.filter(G=>!e||!sn(G,e)),Ae=he?[he,...Ee]:Ee,Ie=l.jsxs(l.Fragment,{children:[v?l.jsxs("p",{className:"service-feedback",role:"status",children:[l.jsx(Xe,{size:16,className:"service-spinning"}),"正在读取服务…"]}):l.jsxs("div",{className:"service-list",children:[Ae.map(G=>{const le=!!e&&sn(G,e);return l.jsxs("div",{className:"service-row",children:[l.jsxs("button",{type:"button",className:"service-row-open",disabled:k||le,onClick:()=>{Te(async()=>{(await Q(G.url,()=>r(G)))?.passwordRequired&&R({kind:"add",input:G.serviceOrigin||G.url,passwordRequired:!0})})},"aria-label":le?`当前服务 ${G.label}`:`打开 ${G.label}`,children:[l.jsx("span",{className:"service-icon",children:l.jsx(ai,{size:20})}),l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:G.label}),l.jsx("span",{className:"service-description",children:le?"当前服务":new URL(G.serviceOrigin||G.url).host})]}),le?l.jsx(Ln,{size:17,className:"service-selected"}):l.jsx(On,{size:16,className:"service-muted"})]}),l.jsx("button",{type:"button",className:"service-icon-button","aria-label":`管理 ${G.label}`,disabled:k,onClick:()=>{re(),R({kind:"edit",service:G}),P("")},children:l.jsx(Nr,{size:19})})]},G.id)}),Ae.length===0&&l.jsx("p",{className:"service-empty",children:"还没有添加服务。连接你的电脑,或粘贴收到的邀请链接。"})]}),l.jsxs("div",{className:`service-actions${s?" service-actions-pair":""}`,children:[l.jsxs("button",{type:"button",className:"service-button service-secondary",disabled:k,onClick:()=>{re(),R({kind:"add"}),P("")},children:[l.jsx(ju,{size:16}),"添加服务"]}),s&&l.jsxs("button",{type:"button",className:"service-button service-secondary",disabled:k,onClick:s,children:[l.jsx(yc,{size:16}),"邀请设备"]})]})]});return l.jsxs("div",{className:"service-manager",children:[!i&&l.jsxs("div",{className:"service-heading",children:[J&&l.jsx("button",{type:"button",className:"service-icon-button","aria-label":"返回服务",disabled:k,onClick:U,children:l.jsx(Nu,{size:20})}),l.jsx("h2",{children:J||"服务"})]}),l.jsx("div",{hidden:!!N,children:_.kind==="relay-services"?n?.(de,S):_.kind==="routes"?t?.(de,S):_.kind==="list"?Ie:_.kind==="add"?l.jsx(rD,{onValidate:b,onSave:G=>Te(async()=>{re();const le=ze(G);E(await Bn({id:le,url:le,label:new URL(le).host})),U()}),onTargetChange:()=>{re(),A(void 0),P("")},initialInput:_.input,passwordRequired:_.passwordRequired,busy:k,onSubmit:q}):l.jsx(oD,{onRelayServices:n&&_.service.targetPeerId?()=>R({kind:"relay-services",service:_.service}):void 0,onRoutes:t&&_.service.targetPeerId?()=>R({kind:"routes",service:_.service}):void 0,service:de,busy:k,canRemove:!e||!sn(_.service,e),onSave:G=>{Te(async()=>{E(await Bn({...de,label:G})),U()})},onRemove:()=>{Te(async()=>{E(await JS(_.service.id)),U()})}})}),N&&l.jsxs("section",{className:"service-certificate-review","aria-label":"HTTPS 证书确认",children:[l.jsx("h3",{children:"检查 HTTPS 证书"}),l.jsx("p",{children:N.origin}),N.changed&&l.jsx("p",{role:"alert",children:"当前证书与已保存的信任指纹不同。请通过独立可信渠道重新核对,再决定是否更新信任。"}),l.jsx("p",{children:"请通过独立可信渠道向服务管理员核对以下 SHA-256 指纹。仅查看指纹不会信任证书。"}),l.jsx("code",{children:N.fingerprint.match(/.{1,2}/g)?.join(":").toUpperCase()}),N.trustedFingerprint&&l.jsxs("p",{children:["已保存的指纹:",l.jsx("code",{children:N.trustedFingerprint.match(/.{1,2}/g)?.join(":").toUpperCase()})]}),l.jsxs("label",{children:[l.jsx("input",{type:"checkbox",checked:N.confirmed,disabled:k,onChange:G=>L(le=>le&&{...le,confirmed:G.target.checked})}),"我已通过独立可信渠道核对该指纹,并明确同意仅对此精确 HTTPS 地址信任。"]}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",onClick:re,children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-primary",disabled:k||!N.confirmed,onClick:()=>{ee()},children:"信任此指纹并重试一次"})]})]}),!N&&p&&Object.keys(D).length>0&&l.jsxs("details",{className:"service-certificate-pins",children:[l.jsxs("summary",{children:["已信任的 HTTPS 证书(",Object.keys(D).length,")"]}),Object.entries(D).map(([G,le])=>l.jsxs("div",{children:[l.jsxs("p",{children:[G,l.jsx("br",{}),l.jsx("code",{children:le.match(/.{1,2}/g)?.join(":").toUpperCase()})]}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:k,onClick:()=>{Te(async()=>{const ue=B.current;if(await p.revoke(G),!H(ue))return;const De=await p.listPins();H(ue)&&j(De)})},children:"撤销信任"})]},G))]}),I&&l.jsx("p",{className:"service-error",role:"alert",children:I}),I&&T&&l.jsxs("section",{className:"service-connection-help","aria-label":"连接帮助",children:[l.jsxs("p",{className:"service-address",children:["连接地址:",T.origin]}),l.jsx("p",{className:"service-help",children:"局域网地址通常需要在同一网络内访问。请先确认分享电脑上的服务可以打开。"}),T.setupUrl&&l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"service-help",children:"若浏览器提示证书错误,可先打开引导完成信任设置,再回到这里点“继续”。打开引导不会接受邀请。"}),l.jsx("a",{className:"service-button service-secondary",href:T.setupUrl,target:"_blank",rel:"noopener noreferrer",children:"打开证书连接引导"})]})]})]})}function rD({onValidate:e,busy:t,onSubmit:n,onSave:r,onTargetChange:o,initialInput:s="",passwordRequired:i=!1}){const a=y.useRef(null),c=()=>e(d.trim())?!0:(a.current?.focus(),!1),[d,u]=y.useState(s),[f,h]=y.useState(""),[p,m]=y.useState(i);return y.useEffect(()=>{m(i)},[i]),l.jsxs("form",{className:"service-form",onSubmit:async g=>{if(g.preventDefault(),t||!c())return;(await n(d.trim(),p?f:void 0))?.passwordRequired&&m(!0),h("")},children:[l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"服务地址或邀请链接"}),l.jsx("input",{ref:a,value:d,onChange:g=>{o(),u(g.target.value),m(!1),h("")},disabled:t,required:!0,autoComplete:"off",autoCapitalize:"none",spellCheck:!1,placeholder:"例如:电脑地址:9834 或 https://…"})]}),p?l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"服务密码"}),l.jsx("input",{type:"password",value:f,onChange:g=>h(g.target.value),disabled:t,required:!0,autoFocus:!0,autoComplete:"current-password",placeholder:"输入这台服务的密码"})]}):l.jsx("p",{className:"service-help",children:"连接自己的服务,输入地址即可;收到邀请时,粘贴完整链接。"}),l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:t||!d.trim()||d.includes("#termdock-invite="),onClick:()=>{c()&&r(d.trim())},children:"仅保存,不连接"}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:t||!d.trim()||p&&!f,children:t?l.jsxs(l.Fragment,{children:[l.jsx(Xe,{size:16,className:"service-spinning"}),"正在连接…"]}):p?"登录并连接":"继续"})]})}function oD({service:e,busy:t,canRemove:n,onSave:r,onRemove:o,onRoutes:s,onRelayServices:i}){const[a,c]=y.useState(e.label),[d,u]=y.useState(!1);return l.jsxs("form",{className:"service-form",onSubmit:f=>{f.preventDefault(),r(a.trim())},children:[l.jsxs("label",{className:"service-field",children:[l.jsx("span",{children:"服务名称"}),l.jsx("input",{value:a,onChange:f=>c(f.target.value),disabled:t,required:!0,maxLength:120,placeholder:"例如:办公室电脑"})]}),l.jsx("p",{className:"service-address",children:e.serviceOrigin||e.url}),l.jsx("button",{type:"submit",className:"service-button service-primary",disabled:t||!a.trim(),children:"保存名称"}),i&&l.jsxs("button",{type:"button",className:"service-row-open",disabled:t,onClick:i,children:[l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:"可中转的服务"}),l.jsx("span",{className:"service-description",children:"通过这台服务连接其他电脑"})]}),l.jsx(On,{size:16})]}),s&&l.jsxs("button",{type:"button",className:"service-row-open",disabled:t,onClick:s,children:[l.jsxs("span",{className:"service-row-copy",children:[l.jsx("span",{className:"service-name",children:"备用连接"}),l.jsx("span",{className:"service-description",children:"添加其他网络地址或授权入口"})]}),l.jsx(On,{size:16})]}),n&&l.jsx("div",{className:"service-remove",children:d?l.jsxs(l.Fragment,{children:[l.jsxs("p",{className:"service-help",children:["从列表移除“",e.label,"”?不会停止服务或删除终端。"]}),l.jsxs("div",{className:"service-actions service-actions-pair",children:[l.jsx("button",{type:"button",className:"service-button service-secondary",disabled:t,onClick:()=>u(!1),children:"取消"}),l.jsx("button",{type:"button",className:"service-button service-danger",disabled:t,onClick:o,children:"确认移除"})]})]}):l.jsx("button",{type:"button",className:"service-button service-danger",disabled:t,onClick:()=>u(!0),children:"移除服务"})})]})}var co={},jl,Bm;function sD(){return Bm||(Bm=1,jl=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),jl}var Ol={},tr={},Fm;function Vr(){if(Fm)return tr;Fm=1;let e;const t=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return tr.getSymbolSize=function(r){if(!r)throw new Error('"version" cannot be null or undefined');if(r<1||r>40)throw new Error('"version" should be in range from 1 to 40');return r*4+17},tr.getSymbolTotalCodewords=function(r){return t[r]},tr.getBCHDigit=function(n){let r=0;for(;n!==0;)r++,n>>>=1;return r},tr.setToSJISFunction=function(r){if(typeof r!="function")throw new Error('"toSJISFunc" is not a valid function.');e=r},tr.isKanjiModeEnabled=function(){return typeof e<"u"},tr.toSJIS=function(r){return e(r)},tr}var Ml={},Um;function Zf(){return Um||(Um=1,(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+n)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,o){if(e.isValid(r))return r;try{return t(r)}catch{return o}}})(Ml)),Ml}var Bl,Hm;function iD(){if(Hm)return Bl;Hm=1;function e(){this.buffer=[],this.length=0}return e.prototype={get:function(t){const n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)===1},put:function(t,n){for(let r=0;r<n;r++)this.putBit((t>>>n-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(t){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Bl=e,Bl}var Fl,$m;function aD(){if($m)return Fl;$m=1;function e(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}return e.prototype.set=function(t,n,r,o){const s=t*this.size+n;this.data[s]=r,o&&(this.reservedBit[s]=!0)},e.prototype.get=function(t,n){return this.data[t*this.size+n]},e.prototype.xor=function(t,n,r){this.data[t*this.size+n]^=r},e.prototype.isReserved=function(t,n){return this.reservedBit[t*this.size+n]},Fl=e,Fl}var Ul={},zm;function cD(){return zm||(zm=1,(function(e){const t=Vr().getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const o=Math.floor(r/7)+2,s=t(r),i=s===145?26:Math.ceil((s-13)/(2*o-2))*2,a=[s-7];for(let c=1;c<o-1;c++)a[c]=a[c-1]-i;return a.push(6),a.reverse()},e.getPositions=function(r){const o=[],s=e.getRowColCoords(r),i=s.length;for(let a=0;a<i;a++)for(let c=0;c<i;c++)a===0&&c===0||a===0&&c===i-1||a===i-1&&c===0||o.push([s[a],s[c]]);return o}})(Ul)),Ul}var Hl={},qm;function lD(){if(qm)return Hl;qm=1;const e=Vr().getSymbolSize,t=7;return Hl.getPositions=function(r){const o=e(r);return[[0,0],[o-t,0],[0,o-t]]},Hl}var $l={},Km;function dD(){return Km||(Km=1,(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},e.from=function(o){return e.isValid(o)?parseInt(o,10):void 0},e.getPenaltyN1=function(o){const s=o.size;let i=0,a=0,c=0,d=null,u=null;for(let f=0;f<s;f++){a=c=0,d=u=null;for(let h=0;h<s;h++){let p=o.get(f,h);p===d?a++:(a>=5&&(i+=t.N1+(a-5)),d=p,a=1),p=o.get(h,f),p===u?c++:(c>=5&&(i+=t.N1+(c-5)),u=p,c=1)}a>=5&&(i+=t.N1+(a-5)),c>=5&&(i+=t.N1+(c-5))}return i},e.getPenaltyN2=function(o){const s=o.size;let i=0;for(let a=0;a<s-1;a++)for(let c=0;c<s-1;c++){const d=o.get(a,c)+o.get(a,c+1)+o.get(a+1,c)+o.get(a+1,c+1);(d===4||d===0)&&i++}return i*t.N2},e.getPenaltyN3=function(o){const s=o.size;let i=0,a=0,c=0;for(let d=0;d<s;d++){a=c=0;for(let u=0;u<s;u++)a=a<<1&2047|o.get(d,u),u>=10&&(a===1488||a===93)&&i++,c=c<<1&2047|o.get(u,d),u>=10&&(c===1488||c===93)&&i++}return i*t.N3},e.getPenaltyN4=function(o){let s=0;const i=o.data.length;for(let c=0;c<i;c++)s+=o.data[c];return Math.abs(Math.ceil(s*100/i/5)-10)*t.N4};function n(r,o,s){switch(r){case e.Patterns.PATTERN000:return(o+s)%2===0;case e.Patterns.PATTERN001:return o%2===0;case e.Patterns.PATTERN010:return s%3===0;case e.Patterns.PATTERN011:return(o+s)%3===0;case e.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(s/3))%2===0;case e.Patterns.PATTERN101:return o*s%2+o*s%3===0;case e.Patterns.PATTERN110:return(o*s%2+o*s%3)%2===0;case e.Patterns.PATTERN111:return(o*s%3+(o+s)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(o,s){const i=s.size;for(let a=0;a<i;a++)for(let c=0;c<i;c++)s.isReserved(c,a)||s.xor(c,a,n(o,c,a))},e.getBestMask=function(o,s){const i=Object.keys(e.Patterns).length;let a=0,c=1/0;for(let d=0;d<i;d++){s(d),e.applyMask(d,o);const u=e.getPenaltyN1(o)+e.getPenaltyN2(o)+e.getPenaltyN3(o)+e.getPenaltyN4(o);e.applyMask(d,o),u<c&&(c=u,a=d)}return a}})($l)),$l}var oa={},Gm;function b0(){if(Gm)return oa;Gm=1;const e=Zf(),t=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return oa.getBlocksCount=function(o,s){switch(s){case e.L:return t[(o-1)*4+0];case e.M:return t[(o-1)*4+1];case e.Q:return t[(o-1)*4+2];case e.H:return t[(o-1)*4+3];default:return}},oa.getTotalCodewordsCount=function(o,s){switch(s){case e.L:return n[(o-1)*4+0];case e.M:return n[(o-1)*4+1];case e.Q:return n[(o-1)*4+2];case e.H:return n[(o-1)*4+3];default:return}},oa}var zl={},bs={},Wm;function uD(){if(Wm)return bs;Wm=1;const e=new Uint8Array(512),t=new Uint8Array(256);return(function(){let r=1;for(let o=0;o<255;o++)e[o]=r,t[r]=o,r<<=1,r&256&&(r^=285);for(let o=255;o<512;o++)e[o]=e[o-255]})(),bs.log=function(r){if(r<1)throw new Error("log("+r+")");return t[r]},bs.exp=function(r){return e[r]},bs.mul=function(r,o){return r===0||o===0?0:e[t[r]+t[o]]},bs}var Vm;function fD(){return Vm||(Vm=1,(function(e){const t=uD();e.mul=function(r,o){const s=new Uint8Array(r.length+o.length-1);for(let i=0;i<r.length;i++)for(let a=0;a<o.length;a++)s[i+a]^=t.mul(r[i],o[a]);return s},e.mod=function(r,o){let s=new Uint8Array(r);for(;s.length-o.length>=0;){const i=s[0];for(let c=0;c<o.length;c++)s[c]^=t.mul(o[c],i);let a=0;for(;a<s.length&&s[a]===0;)a++;s=s.slice(a)}return s},e.generateECPolynomial=function(r){let o=new Uint8Array([1]);for(let s=0;s<r;s++)o=e.mul(o,new Uint8Array([1,t.exp(s)]));return o}})(zl)),zl}var ql,Ym;function hD(){if(Ym)return ql;Ym=1;const e=fD();function t(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return t.prototype.initialize=function(r){this.degree=r,this.genPoly=e.generateECPolynomial(this.degree)},t.prototype.encode=function(r){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(r.length+this.degree);o.set(r);const s=e.mod(o,this.genPoly),i=this.degree-s.length;if(i>0){const a=new Uint8Array(this.degree);return a.set(s,i),a}return s},ql=t,ql}var Kl={},Gl={},Wl={},Xm;function v0(){return Xm||(Xm=1,Wl.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40}),Wl}var pn={},Jm;function x0(){if(Jm)return pn;Jm=1;const e="[0-9]+",t="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const r="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
9
- ]))+`;pn.KANJI=new RegExp(n,"g"),pn.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),pn.BYTE=new RegExp(r,"g"),pn.NUMERIC=new RegExp(e,"g"),pn.ALPHANUMERIC=new RegExp(t,"g");const o=new RegExp("^"+n+"$"),s=new RegExp("^"+e+"$"),i=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return pn.testKanji=function(c){return o.test(c)},pn.testNumeric=function(c){return s.test(c)},pn.testAlphanumeric=function(c){return i.test(c)},pn}var Zm;function Yr(){return Zm||(Zm=1,(function(e){const t=v0(),n=x0();e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(s,i){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!t.isValid(i))throw new Error("Invalid version: "+i);return i>=1&&i<10?s.ccBits[0]:i<27?s.ccBits[1]:s.ccBits[2]},e.getBestModeForData=function(s){return n.testNumeric(s)?e.NUMERIC:n.testAlphanumeric(s)?e.ALPHANUMERIC:n.testKanji(s)?e.KANJI:e.BYTE},e.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},e.isValid=function(s){return s&&s.bit&&s.ccBits};function r(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+o)}}e.from=function(s,i){if(e.isValid(s))return s;try{return r(s)}catch{return i}}})(Gl)),Gl}var Qm;function pD(){return Qm||(Qm=1,(function(e){const t=Vr(),n=b0(),r=Zf(),o=Yr(),s=v0(),i=7973,a=t.getBCHDigit(i);function c(h,p,m){for(let g=1;g<=40;g++)if(p<=e.getCapacity(g,m,h))return g}function d(h,p){return o.getCharCountIndicator(h,p)+4}function u(h,p){let m=0;return h.forEach(function(g){const b=d(g.mode,p);m+=b+g.getBitsLength()}),m}function f(h,p){for(let m=1;m<=40;m++)if(u(h,m)<=e.getCapacity(m,p,o.MIXED))return m}e.from=function(p,m){return s.isValid(p)?parseInt(p,10):m},e.getCapacity=function(p,m,g){if(!s.isValid(p))throw new Error("Invalid QR Code version");typeof g>"u"&&(g=o.BYTE);const b=t.getSymbolTotalCodewords(p),w=n.getTotalCodewordsCount(p,m),E=(b-w)*8;if(g===o.MIXED)return E;const v=E-d(g,p);switch(g){case o.NUMERIC:return Math.floor(v/10*3);case o.ALPHANUMERIC:return Math.floor(v/11*2);case o.KANJI:return Math.floor(v/13);case o.BYTE:default:return Math.floor(v/8)}},e.getBestVersionForData=function(p,m){let g;const b=r.from(m,r.M);if(Array.isArray(p)){if(p.length>1)return f(p,b);if(p.length===0)return 1;g=p[0]}else g=p;return c(g.mode,g.getLength(),b)},e.getEncodedBits=function(p){if(!s.isValid(p)||p<7)throw new Error("Invalid QR Code version");let m=p<<12;for(;t.getBCHDigit(m)-a>=0;)m^=i<<t.getBCHDigit(m)-a;return p<<12|m}})(Kl)),Kl}var Vl={},eg;function mD(){if(eg)return Vl;eg=1;const e=Vr(),t=1335,n=21522,r=e.getBCHDigit(t);return Vl.getEncodedBits=function(s,i){const a=s.bit<<3|i;let c=a<<10;for(;e.getBCHDigit(c)-r>=0;)c^=t<<e.getBCHDigit(c)-r;return(a<<10|c)^n},Vl}var Yl={},Xl,tg;function gD(){if(tg)return Xl;tg=1;const e=Yr();function t(n){this.mode=e.NUMERIC,this.data=n.toString()}return t.getBitsLength=function(r){return 10*Math.floor(r/3)+(r%3?r%3*3+1:0)},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(r){let o,s,i;for(o=0;o+3<=this.data.length;o+=3)s=this.data.substr(o,3),i=parseInt(s,10),r.put(i,10);const a=this.data.length-o;a>0&&(s=this.data.substr(o),i=parseInt(s,10),r.put(i,a*3+1))},Xl=t,Xl}var Jl,ng;function yD(){if(ng)return Jl;ng=1;const e=Yr(),t=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(r){this.mode=e.ALPHANUMERIC,this.data=r}return n.getBitsLength=function(o){return 11*Math.floor(o/2)+6*(o%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(o){let s;for(s=0;s+2<=this.data.length;s+=2){let i=t.indexOf(this.data[s])*45;i+=t.indexOf(this.data[s+1]),o.put(i,11)}this.data.length%2&&o.put(t.indexOf(this.data[s]),6)},Jl=n,Jl}var Zl,rg;function wD(){if(rg)return Zl;rg=1;const e=Yr();function t(n){this.mode=e.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return t.getBitsLength=function(r){return r*8},t.prototype.getLength=function(){return this.data.length},t.prototype.getBitsLength=function(){return t.getBitsLength(this.data.length)},t.prototype.write=function(n){for(let r=0,o=this.data.length;r<o;r++)n.put(this.data[r],8)},Zl=t,Zl}var Ql,og;function bD(){if(og)return Ql;og=1;const e=Yr(),t=Vr();function n(r){this.mode=e.KANJI,this.data=r}return n.getBitsLength=function(o){return o*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o<this.data.length;o++){let s=t.toSJIS(this.data[o]);if(s>=33088&&s<=40956)s-=33088;else if(s>=57408&&s<=60351)s-=49472;else throw new Error("Invalid SJIS character: "+this.data[o]+`
10
- Make sure your charset is UTF-8`);s=(s>>>8&255)*192+(s&255),r.put(s,13)}},Ql=n,Ql}var ed={exports:{}},sg;function vD(){return sg||(sg=1,(function(e){var t={single_source_shortest_paths:function(n,r,o){var s={},i={};i[r]=0;var a=t.PriorityQueue.make();a.push(r,0);for(var c,d,u,f,h,p,m,g,b;!a.empty();){c=a.pop(),d=c.value,f=c.cost,h=n[d]||{};for(u in h)h.hasOwnProperty(u)&&(p=h[u],m=f+p,g=i[u],b=typeof i[u]>"u",(b||g>m)&&(i[u]=m,a.push(u,m),s[u]=d))}if(typeof o<"u"&&typeof i[o]>"u"){var w=["Could not find a path from ",r," to ",o,"."].join("");throw new Error(w)}return s},extract_shortest_path_from_predecessor_list:function(n,r){for(var o=[],s=r;s;)o.push(s),n[s],s=n[s];return o.reverse(),o},find_path:function(n,r,o){var s=t.single_source_shortest_paths(n,r,o);return t.extract_shortest_path_from_predecessor_list(s,o)},PriorityQueue:{make:function(n){var r=t.PriorityQueue,o={},s;n=n||{};for(s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);return o.queue=[],o.sorter=n.sorter||r.default_sorter,o},default_sorter:function(n,r){return n.cost-r.cost},push:function(n,r){var o={value:n,cost:r};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(ed)),ed.exports}var ig;function xD(){return ig||(ig=1,(function(e){const t=Yr(),n=gD(),r=yD(),o=wD(),s=bD(),i=x0(),a=Vr(),c=vD();function d(w){return unescape(encodeURIComponent(w)).length}function u(w,E,v){const C=[];let _;for(;(_=w.exec(v))!==null;)C.push({data:_[0],index:_.index,mode:E,length:_[0].length});return C}function f(w){const E=u(i.NUMERIC,t.NUMERIC,w),v=u(i.ALPHANUMERIC,t.ALPHANUMERIC,w);let C,_;return a.isKanjiModeEnabled()?(C=u(i.BYTE,t.BYTE,w),_=u(i.KANJI,t.KANJI,w)):(C=u(i.BYTE_KANJI,t.BYTE,w),_=[]),E.concat(v,C,_).sort(function(k,x){return k.index-x.index}).map(function(k){return{data:k.data,mode:k.mode,length:k.length}})}function h(w,E){switch(E){case t.NUMERIC:return n.getBitsLength(w);case t.ALPHANUMERIC:return r.getBitsLength(w);case t.KANJI:return s.getBitsLength(w);case t.BYTE:return o.getBitsLength(w)}}function p(w){return w.reduce(function(E,v){const C=E.length-1>=0?E[E.length-1]:null;return C&&C.mode===v.mode?(E[E.length-1].data+=v.data,E):(E.push(v),E)},[])}function m(w){const E=[];for(let v=0;v<w.length;v++){const C=w[v];switch(C.mode){case t.NUMERIC:E.push([C,{data:C.data,mode:t.ALPHANUMERIC,length:C.length},{data:C.data,mode:t.BYTE,length:C.length}]);break;case t.ALPHANUMERIC:E.push([C,{data:C.data,mode:t.BYTE,length:C.length}]);break;case t.KANJI:E.push([C,{data:C.data,mode:t.BYTE,length:d(C.data)}]);break;case t.BYTE:E.push([{data:C.data,mode:t.BYTE,length:d(C.data)}])}}return E}function g(w,E){const v={},C={start:{}};let _=["start"];for(let R=0;R<w.length;R++){const k=w[R],x=[];for(let S=0;S<k.length;S++){const I=k[S],P=""+R+S;x.push(P),v[P]={node:I,lastCount:0},C[P]={};for(let T=0;T<_.length;T++){const A=_[T];v[A]&&v[A].node.mode===I.mode?(C[A][P]=h(v[A].lastCount+I.length,I.mode)-h(v[A].lastCount,I.mode),v[A].lastCount+=I.length):(v[A]&&(v[A].lastCount=I.length),C[A][P]=h(I.length,I.mode)+4+t.getCharCountIndicator(I.mode,E))}}_=x}for(let R=0;R<_.length;R++)C[_[R]].end=0;return{map:C,table:v}}function b(w,E){let v;const C=t.getBestModeForData(w);if(v=t.from(E,C),v!==t.BYTE&&v.bit<C.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString(v)+`.
11
- Suggested mode is: `+t.toString(C));switch(v===t.KANJI&&!a.isKanjiModeEnabled()&&(v=t.BYTE),v){case t.NUMERIC:return new n(w);case t.ALPHANUMERIC:return new r(w);case t.KANJI:return new s(w);case t.BYTE:return new o(w)}}e.fromArray=function(E){return E.reduce(function(v,C){return typeof C=="string"?v.push(b(C,null)):C.data&&v.push(b(C.data,C.mode)),v},[])},e.fromString=function(E,v){const C=f(E,a.isKanjiModeEnabled()),_=m(C),R=g(_,v),k=c.find_path(R.map,"start","end"),x=[];for(let S=1;S<k.length-1;S++)x.push(R.table[k[S]].node);return e.fromArray(p(x))},e.rawSplit=function(E){return e.fromArray(f(E,a.isKanjiModeEnabled()))}})(Yl)),Yl}var ag;function SD(){if(ag)return Ol;ag=1;const e=Vr(),t=Zf(),n=iD(),r=aD(),o=cD(),s=lD(),i=dD(),a=b0(),c=hD(),d=pD(),u=mD(),f=Yr(),h=xD();function p(R,k){const x=R.size,S=s.getPositions(k);for(let I=0;I<S.length;I++){const P=S[I][0],T=S[I][1];for(let A=-1;A<=7;A++)if(!(P+A<=-1||x<=P+A))for(let N=-1;N<=7;N++)T+N<=-1||x<=T+N||(A>=0&&A<=6&&(N===0||N===6)||N>=0&&N<=6&&(A===0||A===6)||A>=2&&A<=4&&N>=2&&N<=4?R.set(P+A,T+N,!0,!0):R.set(P+A,T+N,!1,!0))}}function m(R){const k=R.size;for(let x=8;x<k-8;x++){const S=x%2===0;R.set(x,6,S,!0),R.set(6,x,S,!0)}}function g(R,k){const x=o.getPositions(k);for(let S=0;S<x.length;S++){const I=x[S][0],P=x[S][1];for(let T=-2;T<=2;T++)for(let A=-2;A<=2;A++)T===-2||T===2||A===-2||A===2||T===0&&A===0?R.set(I+T,P+A,!0,!0):R.set(I+T,P+A,!1,!0)}}function b(R,k){const x=R.size,S=d.getEncodedBits(k);let I,P,T;for(let A=0;A<18;A++)I=Math.floor(A/3),P=A%3+x-8-3,T=(S>>A&1)===1,R.set(I,P,T,!0),R.set(P,I,T,!0)}function w(R,k,x){const S=R.size,I=u.getEncodedBits(k,x);let P,T;for(P=0;P<15;P++)T=(I>>P&1)===1,P<6?R.set(P,8,T,!0):P<8?R.set(P+1,8,T,!0):R.set(S-15+P,8,T,!0),P<8?R.set(8,S-P-1,T,!0):P<9?R.set(8,15-P-1+1,T,!0):R.set(8,15-P-1,T,!0);R.set(S-8,8,1,!0)}function E(R,k){const x=R.size;let S=-1,I=x-1,P=7,T=0;for(let A=x-1;A>0;A-=2)for(A===6&&A--;;){for(let N=0;N<2;N++)if(!R.isReserved(I,A-N)){let L=!1;T<k.length&&(L=(k[T]>>>P&1)===1),R.set(I,A-N,L),P--,P===-1&&(T++,P=7)}if(I+=S,I<0||x<=I){I-=S,S=-S;break}}}function v(R,k,x){const S=new n;x.forEach(function(N){S.put(N.mode.bit,4),S.put(N.getLength(),f.getCharCountIndicator(N.mode,R)),N.write(S)});const I=e.getSymbolTotalCodewords(R),P=a.getTotalCodewordsCount(R,k),T=(I-P)*8;for(S.getLengthInBits()+4<=T&&S.put(0,4);S.getLengthInBits()%8!==0;)S.putBit(0);const A=(T-S.getLengthInBits())/8;for(let N=0;N<A;N++)S.put(N%2?17:236,8);return C(S,R,k)}function C(R,k,x){const S=e.getSymbolTotalCodewords(k),I=a.getTotalCodewordsCount(k,x),P=S-I,T=a.getBlocksCount(k,x),A=S%T,N=T-A,L=Math.floor(S/T),D=Math.floor(P/T),j=D+1,B=L-D,M=new c(B);let F=0;const $=new Array(T),H=new Array(T);let te=0;const ne=new Uint8Array(R.buffer);for(let Q=0;Q<T;Q++){const ee=Q<N?D:j;$[Q]=ne.slice(F,F+ee),H[Q]=M.encode($[Q]),F+=ee,te=Math.max(te,ee)}const re=new Uint8Array(S);let ae=0,U,J;for(U=0;U<te;U++)for(J=0;J<T;J++)U<$[J].length&&(re[ae++]=$[J][U]);for(U=0;U<B;U++)for(J=0;J<T;J++)re[ae++]=H[J][U];return re}function _(R,k,x,S){let I;if(Array.isArray(R))I=h.fromArray(R);else if(typeof R=="string"){let L=k;if(!L){const D=h.rawSplit(R);L=d.getBestVersionForData(D,x)}I=h.fromString(R,L||40)}else throw new Error("Invalid data");const P=d.getBestVersionForData(I,x);if(!P)throw new Error("The amount of data is too big to be stored in a QR Code");if(!k)k=P;else if(k<P)throw new Error(`
12
- The chosen QR Code version cannot contain this amount of data.
13
- Minimum version required to store current data is: `+P+`.
14
- `);const T=v(k,x,I),A=e.getSymbolSize(k),N=new r(A);return p(N,k),m(N),g(N,k),w(N,x,0),k>=7&&b(N,k),E(N,T),isNaN(S)&&(S=i.getBestMask(N,w.bind(null,N,x))),i.applyMask(S,N),w(N,x,S),{modules:N,version:k,errorCorrectionLevel:x,maskPattern:S,segments:I}}return Ol.create=function(k,x){if(typeof k>"u"||k==="")throw new Error("No input text");let S=t.M,I,P;return typeof x<"u"&&(S=t.from(x.errorCorrectionLevel,t.M),I=d.from(x.version),P=i.from(x.maskPattern),x.toSJISFunc&&e.setToSJISFunction(x.toSJISFunc)),_(k,I,S,P)},Ol}var td={},nd={},cg;function S0(){return cg||(cg=1,(function(e){function t(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let r=n.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+n);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(s){return[s,s]}))),r.length===6&&r.push("F","F");const o=parseInt(r.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const o=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,s=r.width&&r.width>=21?r.width:void 0,i=r.scale||4;return{width:s,scale:s?4:i,margin:o,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,o){return o.width&&o.width>=r+o.margin*2?o.width/(r+o.margin*2):o.scale},e.getImageWidth=function(r,o){const s=e.getScale(r,o);return Math.floor((r+o.margin*2)*s)},e.qrToImageData=function(r,o,s){const i=o.modules.size,a=o.modules.data,c=e.getScale(i,s),d=Math.floor((i+s.margin*2)*c),u=s.margin*c,f=[s.color.light,s.color.dark];for(let h=0;h<d;h++)for(let p=0;p<d;p++){let m=(h*d+p)*4,g=s.color.light;if(h>=u&&p>=u&&h<d-u&&p<d-u){const b=Math.floor((h-u)/c),w=Math.floor((p-u)/c);g=f[a[b*i+w]?1:0]}r[m++]=g.r,r[m++]=g.g,r[m++]=g.b,r[m]=g.a}}})(nd)),nd}var lg;function ED(){return lg||(lg=1,(function(e){const t=S0();function n(o,s,i){o.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=i,s.width=i,s.style.height=i+"px",s.style.width=i+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(s,i,a){let c=a,d=i;typeof c>"u"&&(!i||!i.getContext)&&(c=i,i=void 0),i||(d=r()),c=t.getOptions(c);const u=t.getImageWidth(s.modules.size,c),f=d.getContext("2d"),h=f.createImageData(u,u);return t.qrToImageData(h.data,s,c),n(f,d,u),f.putImageData(h,0,0),d},e.renderToDataURL=function(s,i,a){let c=a;typeof c>"u"&&(!i||!i.getContext)&&(c=i,i=void 0),c||(c={});const d=e.render(s,i,c),u=c.type||"image/png",f=c.rendererOpts||{};return d.toDataURL(u,f.quality)}})(td)),td}var rd={},dg;function kD(){if(dg)return rd;dg=1;const e=S0();function t(o,s){const i=o.a/255,a=s+'="'+o.hex+'"';return i<1?a+" "+s+'-opacity="'+i.toFixed(2).slice(1)+'"':a}function n(o,s,i){let a=o+s;return typeof i<"u"&&(a+=" "+i),a}function r(o,s,i){let a="",c=0,d=!1,u=0;for(let f=0;f<o.length;f++){const h=Math.floor(f%s),p=Math.floor(f/s);!h&&!d&&(d=!0),o[f]?(u++,f>0&&h>0&&o[f-1]||(a+=d?n("M",h+i,.5+p+i):n("m",c,0),c=0,d=!1),h+1<s&&o[f+1]||(a+=n("h",u),u=0)):c++}return a}return rd.render=function(s,i,a){const c=e.getOptions(i),d=s.modules.size,u=s.modules.data,f=d+c.margin*2,h=c.color.light.a?"<path "+t(c.color.light,"fill")+' d="M0 0h'+f+"v"+f+'H0z"/>':"",p="<path "+t(c.color.dark,"stroke")+' d="'+r(u,d,c.margin)+'"/>',m='viewBox="0 0 '+f+" "+f+'"',b='<svg xmlns="http://www.w3.org/2000/svg" '+(c.width?'width="'+c.width+'" height="'+c.width+'" ':"")+m+' shape-rendering="crispEdges">'+h+p+`</svg>
15
- `;return typeof a=="function"&&a(null,b),b},rd}var ug;function ID(){if(ug)return co;ug=1;const e=sD(),t=SD(),n=ED(),r=kD();function o(s,i,a,c,d){const u=[].slice.call(arguments,1),f=u.length,h=typeof u[f-1]=="function";if(!h&&!e())throw new Error("Callback required as last argument");if(h){if(f<2)throw new Error("Too few arguments provided");f===2?(d=a,a=i,i=c=void 0):f===3&&(i.getContext&&typeof d>"u"?(d=c,c=void 0):(d=c,c=a,a=i,i=void 0))}else{if(f<1)throw new Error("Too few arguments provided");return f===1?(a=i,i=c=void 0):f===2&&!i.getContext&&(c=a,a=i,i=void 0),new Promise(function(p,m){try{const g=t.create(a,c);p(s(g,i,c))}catch(g){m(g)}})}try{const p=t.create(a,c);d(null,s(p,i,c))}catch(p){d(p)}}return co.create=t.create,co.toCanvas=o.bind(null,n.render),co.toDataURL=o.bind(null,n.renderToDataURL),co.toString=o.bind(null,function(s,i,a){return r.render(s,a)}),co}var CD=ID();const rn="w-full rounded-lg border border-border bg-background px-3 py-2.5 text-base text-foreground focus:outline-none focus:ring-2 focus:ring-ring sm:text-sm",pt="appearance-none min-h-11 rounded-lg px-3 py-2 text-sm hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",nr=`${pt.replace("hover:bg-surface-2","")} bg-primary text-primary-foreground hover:opacity-90`;function RD(e){return e.serviceName||new URL(e.url).hostname}function vs(e){return e.includes("service:*")?"完整权限":e.includes("session.input")?"可操作":e.includes("session.view")?"只读":e.includes("route.use")?"仅中转":"自定义权限"}function TD({profile:e,subjectId:t}){return l.jsxs("details",{className:"mt-2 text-xs text-muted-foreground",children:[l.jsx("summary",{className:"cursor-pointer leading-relaxed",children:[e?.model||e?.hostname||e?.system,e?.route,`ID ${t.slice(-8)}`].filter(Boolean).join(" · ")}),l.jsxs("dl",{className:"mt-2 space-y-2 rounded-lg bg-surface-2 p-3",children:[[["设备型号",e?.model],["主机名称",e?.hostname],["操作系统",e?.system],["客户端",e?.client],["打开方式",e?.mode],["处理器",e?.cpu],["架构",e?.arch],["最近连接路径",e?.route],["首次记录",e?.firstSeenAt?new Date(e.firstSeenAt).toLocaleString():void 0],["最近连接",e?.lastSeenAt?new Date(e.lastSeenAt).toLocaleString():void 0],["设备标识",t]].filter(([,n])=>n).map(([n,r])=>l.jsxs("div",{children:[l.jsx("dt",{children:n}),l.jsx("dd",{className:"mt-0.5 select-text break-all text-foreground",children:r})]},n)),l.jsx("p",{className:"leading-relaxed",children:e?"系统、硬件与路径由设备报告;连接时间由服务记录。":"此设备尚未报告详情,更新客户端并重新连接后可补齐。"})]})]})}function AD(){const e=getComputedStyle(document.documentElement),t=e.getPropertyValue("--background").trim(),n=e.getPropertyValue("--foreground").trim(),r=o=>{const s=o.replace("#","");return parseInt(s.slice(0,2),16)*.299+parseInt(s.slice(2,4),16)*.587+parseInt(s.slice(4,6),16)*.114};if(!t||!n)throw new Error("Theme unavailable");return r(t)<r(n)?{dark:t,light:n}:{dark:n,light:t}}function PD({onConnect:e,onClose:t,onConnectWithPassword:n,onAddService:r,onOpenService:o,currentIdentity:s,currentServiceName:i,currentServiceId:a,currentServiceOrigin:c,hasBackup:d=!1,inviteAddresses:u=[],paired:f=!1,initialInvite:h,initialServicePage:p,initialShareSessionId:m,initialShareSessionIds:g,initialViewLayout:b,initialViewMode:w,sessions:E=[],grants:v=[],invitations:C=[],onCreateInvite:_,onRevokeInvitation:R,onRevoke:k,onRename:x,loading:S=!1,loadError:I,onRetry:P}){const[T,A]=y.useState(!1),[N,L]=y.useState(""),[D,j]=y.useState(!1),[B,M]=y.useState(),[F,$]=y.useState(),[H,te]=y.useState(!1),[ne,re]=y.useState(""),ae=B||(D?void 0:h);y.useEffect(()=>{j(!1),M(void 0),$(void 0),A(!1),L(""),te(!1),re("")},[h?.url,h?.targetPeerId,h?.pairingCode,h?.routeCode]);const[U,J]=y.useState({}),[Q,ee]=y.useState(""),[Te,q]=y.useState(""),[z,de]=y.useState(!1),[he,Ee]=y.useState(!!m||!!g?.length),[Ae,Ie]=y.useState(!f),[G,le]=y.useState(!0),[ue,De]=y.useState(),[ge,We]=y.useState(""),[ye,Ge]=y.useState("read"),[Oe,kt]=y.useState("selected"),[_t,et]=y.useState(()=>{const O=E.find(X=>X.sessionId===m||X.sourceSessionId===m);return O?[O.sessionId]:E.length===1?[E[0].sessionId]:[]}),[tt,it]=y.useState(w||"chat"),[Lt,V]=y.useState({}),[oe,Y]=y.useState({}),[Z,ie]=y.useState(),[we,K]=y.useState(Date.now);y.useEffect(()=>{const O=setInterval(()=>K(Date.now()),1e3);return()=>clearInterval(O)},[]);const[ce,pe]=y.useState(!1),[me,je]=y.useState(!1),[W,xe]=y.useState(!1),[be,fe]=y.useState("idle"),[ke,Be]=y.useState("never"),Ne=y.useRef(0);y.useEffect(()=>()=>{Ne.current++},[]);const[gt,Je]=y.useState(""),[bn,ki]=y.useState(""),[ht,Wo]=y.useState(),[ah,ch]=y.useState(""),[Y0,Ii]=y.useState(),[X0,Ci]=y.useState(),[Gn,J0]=y.useState("services"),[Xr,Hc]=y.useState(),[$c,lh]=y.useState(""),[Vo,dh]=y.useState(!1),[uh,Yo]=y.useState(),[un,Ri]=y.useState(!1),[Jr,zc]=y.useState([]),fh=y.useRef(new Map);y.useEffect(()=>{for(const Ce of E)fh.current.set(Ce.sessionId,Ce.sourceSessionId||Ce.sessionId);const O=Ce=>{const at=fh.current.get(Ce);return E.find(Mt=>Mt.sessionId===Ce||at&&Mt.sourceSessionId===at)?.sessionId||Ce},X=Ce=>{const at=[...new Set(Ce.map(O))];return at.every((Mt,Qr)=>Mt===Ce[Qr])&&at.length===Ce.length?Ce:at};et(X),zc(X),Y(Ce=>Object.keys(Ce).some(at=>O(at)!==at)?Object.fromEntries(Object.entries(Ce).map(([at,Mt])=>[O(at),Mt])):Ce)},[E]);const Ti=g?.length?g:m?[m]:[],qc=JSON.stringify(Ti),hh=y.useRef(),Xo=Ti.filter(O=>!E.some(X=>X.sessionId===O||X.sourceSessionId===O));y.useEffect(()=>{!Ti.length||hh.current===qc||Xo.length||(hh.current=qc,et([...new Set(Ti.map(O=>E.find(X=>X.sessionId===O||X.sourceSessionId===O).sessionId))]),kt("selected"),Ee(!0),Ie(!1))},[qc,E]);const Kc=c||location.origin,ph=O=>{try{return["localhost","127.0.0.1","[::1]"].includes(new URL(O).hostname)}catch{return!1}},mh=u.filter(O=>!ph(O.url)),Z0=ph(Kc)&&(mh.find(O=>!new URL(O.url).hostname.endsWith(".local"))||mh[0])?.url||"",ur=ue??Z0;let Gc;try{Gc=new URL(ur==="custom"?ze(ge):ur||Kc).hostname}catch{}const Q0=!!Gc&&["localhost","127.0.0.1","[::1]"].includes(Gc),Jo=E.filter(O=>_t.includes(O.sessionId)),eS=Oe==="all"||ye==="full"?"全部终端":Jo.map(O=>oe[O.sessionId]?.name||O.name).join("、"),tS=O=>{if(Be(O),O==="never")ki("");else if(O!=="custom"){const X=new Date(Date.now()+Number(O));ki(new Date(X.getTime()-X.getTimezoneOffset()*6e4).toISOString().slice(0,16))}},Wc=v.filter(O=>O.revokedAt===void 0&&(!O.expiresAt||O.expiresAt>Date.now())),Vc=v.filter(O=>!Wc.includes(O)),Zo=[...new Set(Wc.map(O=>O.subjectId))].map(O=>{const X=Wc.filter(Ce=>Ce.subjectId===O);return{subjectId:O,grants:X,name:O===s?"此设备":X.find(Ce=>Ce.label)?.label||"未命名设备"}}).sort((O,X)=>+(X.subjectId===s)-+(O.subjectId===s)),Zr=!Xr&&!Vo&&f&&!Ae&&!he&&!ae,nS=()=>{Hc(void 0),dh(!1),Ie(!1),Ee(!1),Wo(void 0),pe(!1),ee(""),q(""),Yo(void 0),Ii(void 0),Ci(void 0),De(void 0),We(""),je(!1),xe(!1),fe("idle"),Ne.current++},gh=()=>{je(!1),xe(!1),fe("idle"),Ne.current++,Wo(void 0),ie(void 0),Ee(!0),Ie(!1),pe(!1),ee(""),q("")},rS=O=>O.subjectId===s?"此设备":O.label||"未命名设备",Yc=()=>{un?Ri(!1):H?(te(!1),re(""),ee("")):t()},Xc=y.useRef(null);Si(Xc,!0,()=>{z||Yc()}),y.useLayoutEffect(()=>{Xc.current?.focus({preventScroll:!0})},[]),y.useEffect(()=>{let O=!1;if(ch(""),ht&&W)try{CD.toDataURL(ht.url,{width:220,margin:3,errorCorrectionLevel:"M",color:AD()}).then(X=>{O||ch(X)}).catch(()=>{})}catch{}return()=>{O=!0}},[ht,W]);async function Ai(O){de(!0),ee(""),q(""),$(void 0);try{await e(O);const{url:X,targetPeerId:Ce,serviceName:at,serviceOrigin:Mt}=O;await Bn({id:Ce,url:X,targetPeerId:Ce,label:at||new URL(X).host,serviceOrigin:Mt,entryServiceId:O.entryServiceId}),M(void 0),j(!0),Ie(!1),q("已连接。")}catch(X){O.routeOnly&&X instanceof jt?(M(O),A(!0)):O.pairingCode||O.routeCode?(M(O),$(Hv(X))):ee("暂时无法连接,请检查网络后重试。")}finally{de(!1)}}async function yh(O){if(O?.preventDefault(),!_||Xo.length)return;ee(""),q("");const X=_t.filter(Bt=>E.some(vn=>vn.sessionId===Bt));if(ye!=="full"&&Oe==="selected"&&!X.length){ee("请选择至少一个 Session。");return}const Ce=X.map(Bt=>E.find(vn=>vn.sessionId===Bt)?.sourceSessionId||Bt),at=Object.fromEntries(X.flatMap(Bt=>{const vn=oe[Bt],Qo=E.find(cS=>cS.sessionId===Bt),es=vn?.name?.trim(),Pi=vn?.icon,eo={...es&&es!==Qo.name?{name:es}:{},...Pi?{icon:Pi}:{}};return Object.keys(eo).length?[[Qo.sourceSessionId||Bt,eo]]:[]}));if(ye!=="full"&&Oe==="selected"&&!XL(at,{kind:"sessions",sessionIds:Ce})){ee("请检查分享名称和图标。");return}const Mt=bn?new Date(bn).getTime():void 0;if(Mt!==void 0&&(!Number.isFinite(Mt)||Mt<=Date.now())){ee("授权到期时间必须晚于现在。");return}let Qr;if(ur==="custom")try{Qr=ze(ge)}catch{ee("请输入有效的接入地址,例如 https://192.168.1.23:9834。");return}else ur&&(Qr=ur);de(!0);try{const Bt={viewMode:tt,...b==="split"&&Ce.length>1?{viewLayout:"split"}:{},...ye!=="full"&&Oe==="selected"&&Object.keys(at).length?{sessionAppearance:at}:{},...ye!=="full"&&(Lt.android?.length||Lt.computers?.length||Lt.directories?.length)?{resources:Lt}:{},...d?{includeBackup:G}:{},...Qr?{entryAddress:Qr}:{},scope:ye==="full"||Oe==="all"?{kind:"service"}:{kind:"sessions",sessionIds:Ce},actions:ye==="full"?["service:*"]:ye==="write"?["session.view","session.input","session.resize"]:["session.view"],...gt.trim()?{label:gt.trim()}:{},...Mt===void 0?{}:{expiresAt:Mt}},vn=++Ne.current,Qo=_(Bt),es=um(Qo.then(eo=>eo.url)),Pi=await Qo;if(vn!==Ne.current)return;ie(Bt),Wo(Pi),xe(!1),fe("idle"),es.then(eo=>{vn===Ne.current&&fe(eo?"copied":"failed")})}catch(Bt){ee(Bt instanceof Error&&Bt.message.startsWith("无法分享备用连接:")?"无法分享备用连接:需要入口管理员授权。你也可以关闭“包含备用连接”,生成直连邀请。":"暂时无法生成邀请,请确认当前设备有授权管理权限。")}finally{de(!1)}}async function oS(){if(!ht||ht.expiresAt<=Date.now())return;const O=Ne.current,X=await um(ht.url);O===Ne.current&&fe(X?"copied":"failed")}const Jc=(O,X)=>O.kind==="service"?"全部终端":O.sessionIds.map(Ce=>X?.[Ce]?.name||E.find(at=>at.sessionId===Ce||at.sourceSessionId===Ce)?.name||Ce).join("、"),wh=O=>R?Y0===O?l.jsxs("div",{className:"mt-2 rounded-lg border border-border bg-background p-3 text-left",children:[l.jsx("p",{className:"text-xs leading-relaxed",children:"撤销后,原邀请链接和二维码将立即失效。"}),l.jsxs("div",{className:"mt-2 flex justify-end gap-2",children:[l.jsx("button",{type:"button",className:`${pt} text-xs text-muted-foreground`,disabled:z,onClick:()=>Ii(void 0),children:"取消"}),l.jsx("button",{type:"button",className:`${pt} text-xs text-destructive`,disabled:z,onClick:async()=>{de(!0),ee(""),q("");try{await R(O),ht?.id===O&&(Ne.current++,Wo(void 0),fe("idle"),xe(!1)),Ii(void 0),q("邀请已撤销,原链接和二维码已失效。")}catch{ee("暂时无法撤销。如果邀请已被接受,请在设备列表撤销访问权限。")}finally{de(!1)}},children:"确认撤销邀请"})]})]}):l.jsx("button",{type:"button",className:`${pt} text-xs text-destructive`,disabled:z,onClick:()=>{Ii(O),q("")},children:"撤销邀请"}):null,sS=H?"输入新的邀请链接":U.title||(Xr?"设备名称":Vo?Gn==="devices"?"授权详情":"连接详情":un?"选择终端":he?"分享":Ae&&f?"添加服务":f?"服务与设备":"连接 Termdock"),iS=H||!!U.back||!!Xr||Vo||un||f&&(Ae||he),aS=()=>{if(H){te(!1),re(""),ee("");return}if(U.back){U.back();return}un?Ri(!1):nS()},bh=O=>O.every(X=>X.routeTargetServiceId)?`${new Set(O.map(X=>X.routeTargetServiceId)).size} 台服务`:O.some(X=>X.scope.kind==="service")?"全部终端":`${new Set(O.flatMap(X=>X.scope.kind==="sessions"?X.scope.sessionIds:[])).size} 个终端`;return Kn.createPortal(l.jsx("div",{className:"fixed inset-0 z-modal-backdrop flex items-end justify-center bg-[var(--app-backdrop)] backdrop-blur-sm sm:items-center sm:p-6","data-sidebar-gesture-ignore":!0,onMouseDown:O=>{O.target===O.currentTarget&&!z&&Yc()},children:l.jsxs("div",{ref:Xc,tabIndex:-1,role:"dialog","aria-modal":"true","aria-labelledby":"federation-title",className:"z-modal-panel flex max-h-[calc(100dvh-env(safe-area-inset-top)-12px)] w-full max-w-lg flex-col overflow-hidden rounded-t-2xl border border-border bg-surface font-sans text-foreground shadow-xl outline-none sm:max-h-[min(800px,92dvh)] sm:rounded-2xl",children:[l.jsxs("header",{className:"shrink-0 border-b border-border px-5 pt-3",children:[l.jsxs("div",{className:"flex min-h-12 items-center gap-2 pb-2",children:[iS&&l.jsx("button",{type:"button",className:`${pt} -ml-3 inline-flex w-11 items-center justify-center text-muted-foreground`,disabled:z,onClick:aS,"aria-label":H?"返回邀请":un?"取消选择终端":Gn==="devices"?"返回设备":"返回服务",children:l.jsx(Nu,{size:20})}),l.jsx("h2",{id:"federation-title",className:"min-w-0 flex-1 text-base font-semibold",children:sS}),l.jsx("button",{type:"button",className:`${pt} -mr-3 inline-flex w-11 items-center justify-center text-muted-foreground`,disabled:z,onClick:Yc,"aria-label":"关闭",children:l.jsx(ci,{size:20})})]}),Zr&&!U.title&&l.jsx("div",{className:"flex gap-6",role:"tablist","aria-label":"管理内容",children:[["services","服务"],["devices","设备"]].map(([O,X])=>l.jsxs("button",{type:"button",role:"tab","aria-selected":Gn===O,"aria-controls":`federation-${O}`,id:`federation-tab-${O}`,className:`min-h-11 border-b-2 px-1 text-sm transition ${Gn===O?"border-primary font-medium text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,onClick:()=>{J0(O),pe(!1),Yo(void 0),ee(""),q("")},children:[X,O==="devices"&&Zo.length>0&&l.jsx("span",{className:"ml-1.5 text-xs text-muted-foreground",children:Zo.length})]},O))})]}),l.jsxs("div",{className:"min-h-0 overflow-y-auto overscroll-contain px-5 py-4 pb-[max(20px,env(safe-area-inset-bottom))]",children:[(Zr&&Gn==="services"||Ae&&!he&&!ae)&&l.jsx(nD,{initialServicePage:p,renderRelayServices:(O,X)=>l.jsx(tD,{service:O,onBusyChange:X,onConnect:e,onConnectWithPassword:n}),renderRoutes:(O,X)=>l.jsx(w0,{service:O,onBusyChange:X}),hideHeader:!0,initiallyAdding:Ae,current:a?{id:a,targetPeerId:a,url:c||location.origin,label:i||"当前服务"}:void 0,onNavigation:J,onBusyChange:de,onInvite:_?gh:void 0,onOpen:async O=>{if(o)return o(O);O.targetPeerId?await Ai({...O,targetPeerId:O.targetPeerId,serviceName:O.label}):r&&await r(O.url)},onAdd:async(O,X)=>{if(r)return r(O,X);await Ai(qn(O))}}),Zr&&Gn==="devices"&&l.jsxs("section",{role:"tabpanel",id:"federation-devices","aria-labelledby":"federation-tab-devices",children:[l.jsx("p",{className:"mb-2 text-xs leading-relaxed text-muted-foreground",children:"可访问此服务的设备"}),S?l.jsxs("p",{role:"status",className:"flex items-center gap-2 py-5 text-sm text-muted-foreground",children:[l.jsx(Xe,{size:16,className:"animate-spin"}),"正在读取设备…"]}):l.jsxs("div",{className:"divide-y divide-border",children:[Zo.map(O=>l.jsxs("div",{className:"py-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-surface-2 text-muted-foreground",children:/iPhone|iPad|Android|手机|平板/i.test(O.grants.find(X=>X.label)?.label||(O.subjectId===s?navigator.userAgent:""))?l.jsx(yc,{size:19}):l.jsx(Du,{size:19})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[l.jsx("p",{className:"truncate text-sm font-medium",children:O.name}),x&&(k||O.subjectId===s)&&l.jsx("button",{type:"button","aria-label":`重命名 ${O.name}`,className:"inline-flex h-9 w-9 shrink-0 appearance-none items-center justify-center rounded-lg bg-transparent text-muted-foreground hover:bg-surface-2",onClick:()=>{Hc(O.subjectId),lh(O.grants.find(X=>X.label)?.label||"")},children:l.jsx(Vy,{size:14})})]}),O.subjectId===s&&O.grants.find(X=>X.label)?.label&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:O.grants.find(X=>X.label)?.label}),l.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[vs(O.grants.flatMap(X=>X.actions))," · ",bh(O.grants)]})]}),k&&O.subjectId!==s&&uh!==O.subjectId&&l.jsx("button",{type:"button",className:`${pt} -mr-2 text-xs text-muted-foreground hover:text-destructive`,disabled:z,"aria-label":`撤销 ${O.name} 的访问权限`,onClick:()=>Yo(O.subjectId),children:"撤销"})]}),l.jsx(TD,{profile:O.grants.find(X=>X.deviceProfile)?.deviceProfile,subjectId:O.subjectId}),uh===O.subjectId&&l.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-background p-3",children:[l.jsx("p",{className:"text-xs leading-relaxed",children:"撤销后,这台设备将断开连接,需重新邀请才能访问。"}),l.jsxs("div",{className:"mt-2 flex justify-end gap-2",children:[l.jsx("button",{type:"button",className:`${pt} text-xs text-muted-foreground`,disabled:z,onClick:()=>Yo(void 0),children:"取消"}),l.jsx("button",{type:"button",className:`${pt} text-xs text-destructive`,disabled:z,onClick:async()=>{de(!0),ee("");try{for(const X of O.grants)await k?.(X.id);Yo(void 0),q("设备访问权限已撤销。")}catch{ee("暂时无法撤销,请重试。")}finally{de(!1)}},children:"确认撤销"})]})]})]},O.subjectId)),Zo.length===0&&!I&&l.jsxs("p",{className:"py-5 text-sm text-muted-foreground",children:["暂无设备授权。",_?"可通过邀请添加设备。":""]})]}),_&&l.jsxs("button",{type:"button",className:`${pt} mt-4 inline-flex w-full items-center justify-center gap-2 border border-border text-sm`,disabled:z,onClick:gh,children:[l.jsx(ju,{size:16}),"邀请设备"]}),C.length>0&&l.jsxs("section",{className:"mt-5 border-t border-border pt-4","aria-label":"待接受的邀请",children:[l.jsx("h3",{className:"text-sm font-medium",children:"待接受的邀请"}),l.jsx("div",{className:"divide-y divide-border",children:C.map(O=>l.jsxs("div",{className:"py-3",children:[l.jsx("p",{className:"text-sm",children:O.label||"设备邀请"}),l.jsxs("p",{className:"mt-1 break-words text-xs text-muted-foreground",children:[vs(O.actions)," · ",Jc(O.scope,O.sessionAppearance)]}),l.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[new Date(O.invitationExpiresAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})," 前有效"]}),l.jsx(Ll,{resources:O.resources}),wh(O.id)]},O.id))})]}),Vc.length>0&&l.jsxs("details",{className:"mt-4 text-xs text-muted-foreground",children:[l.jsxs("summary",{className:"cursor-pointer py-2",children:["已失效的授权(",Vc.length,")"]}),l.jsx("div",{className:"mt-1 space-y-2 border-l border-border pl-3",children:Vc.map(O=>l.jsxs("p",{className:"flex gap-3",children:[l.jsx("span",{className:"min-w-0 flex-1 truncate",children:rS(O)}),l.jsx("span",{className:"shrink-0",children:O.revokedAt!==void 0?"已撤销":"已到期"})]},O.id))})]})]}),Xr&&l.jsxs("form",{className:"space-y-4",onSubmit:async O=>{O.preventDefault(),de(!0),ee("");try{await x?.(Xr,$c.trim()),Hc(void 0)}catch{ee("暂时无法保存设备名称,请重试。")}finally{de(!1)}},children:[l.jsxs("label",{className:"block space-y-2 text-sm",children:[l.jsx("span",{children:"设备名称"}),l.jsx("input",{autoFocus:!0,className:rn,maxLength:80,required:!0,value:$c,onChange:O=>lh(O.target.value),placeholder:"例如:我的 iPhone、办公室电脑"})]}),l.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"为设备起一个容易辨认的名字,会同步显示在此服务的设备列表中。"}),l.jsx("button",{type:"submit",className:`${nr} w-full`,disabled:z||!$c.trim(),children:z?"正在保存…":"保存名称"})]}),Vo&&l.jsx("section",{className:"space-y-5",children:Gn==="devices"?Zo.map(O=>l.jsxs("div",{className:"space-y-3",children:[l.jsx("h3",{className:"text-sm font-medium",children:O.name}),l.jsxs("dl",{className:"space-y-3 rounded-xl bg-surface-2 p-3 text-xs",children:[l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"访问权限"}),l.jsxs("dd",{className:"mt-1",children:[vs(O.grants.flatMap(X=>X.actions))," · ",bh(O.grants)]})]}),O.grants.map(X=>l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:X.routeTargetServiceId?"允许经此入口访问":vs(X.actions)}),l.jsxs("dd",{className:"mt-1 leading-relaxed",children:[X.routeTargetServiceId?X.routeTargetName||"指定服务":Jc(X.scope,X.sessionAppearance),!X.routeTargetServiceId&&l.jsx("span",{className:"mt-1 block text-muted-foreground",children:X.expiresAt?new Date(X.expiresAt).toLocaleString():"保留至撤销"}),l.jsx(Ll,{resources:X.resources})]}),k&&(X.routeTargetServiceId||O.subjectId!==s)&&(X0===X.id?l.jsxs("div",{className:"mt-2",children:[l.jsx("p",{className:"leading-relaxed",children:"确认撤销此项授权?此设备的其他授权将保留。"}),l.jsxs("div",{className:"mt-1 flex justify-end gap-2",children:[l.jsx("button",{type:"button",className:`${pt} text-xs text-muted-foreground`,disabled:z,onClick:()=>Ci(void 0),children:"取消"}),l.jsx("button",{type:"button",className:`${pt} text-xs text-destructive`,disabled:z,onClick:async()=>{de(!0),ee("");try{await k(X.id),Ci(void 0),q("此项授权已撤销。")}catch{ee("暂时无法撤销,请重试。")}finally{de(!1)}},children:"确认撤销此项授权"})]})]}):l.jsx("button",{type:"button",className:`${pt} mt-1 -ml-3 text-xs text-destructive`,disabled:z,onClick:()=>Ci(X.id),children:X.routeTargetServiceId?"撤销此中转权限":"撤销此项授权"}))]},X.id)),l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"设备标识"}),l.jsx("dd",{className:"mt-1 break-all font-mono leading-relaxed text-muted-foreground select-text",children:O.subjectId})]})]})]},O.subjectId)):l.jsxs("dl",{className:"space-y-4 text-xs",children:[l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"当前服务"}),l.jsx("dd",{className:"mt-1 text-sm",children:i||"当前服务"})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"服务标识"}),l.jsx("dd",{className:"mt-1 break-all font-mono leading-relaxed select-text",children:a})]}),l.jsxs("div",{children:[l.jsx("dt",{className:"text-muted-foreground",children:"本设备标识"}),l.jsx("dd",{className:"mt-1 break-all font-mono leading-relaxed select-text",children:s})]})]})}),H&&l.jsxs("form",{className:"space-y-4 py-1",onSubmit:async O=>{O.preventDefault(),ee("");let X;try{X=qn(ne.trim())}catch{ee("请输入完整的 Termdock 邀请链接。");return}te(!1),re(""),await Ai(X)},children:[l.jsx("p",{className:"text-sm leading-6 text-muted-foreground",children:"请粘贴分享者重新生成的邀请链接。"}),l.jsxs("label",{className:"block space-y-2 text-sm",children:[l.jsx("span",{children:"新的邀请链接"}),l.jsx("input",{className:rn,type:"text",required:!0,autoFocus:!0,autoComplete:"off",spellCheck:!1,placeholder:"粘贴完整链接",value:ne,onChange:O=>{re(O.target.value),ee("")}})]}),l.jsx("button",{type:"submit",className:`${nr} w-full text-sm`,disabled:z||!ne.trim(),children:"接受新邀请"})]}),ae&&!he&&!H&&l.jsxs("section",{className:"space-y-5 py-1",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-11 w-11 items-center justify-center rounded-xl bg-surface-2 text-muted-foreground",children:l.jsx(ai,{size:22})}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"text-xs text-muted-foreground",children:"受邀连接的服务"}),l.jsx("p",{className:"mt-1 break-words text-base font-medium",children:RD(ae)})]})]}),F&&l.jsxs("div",{role:"alert",className:"flex gap-3 rounded-xl border border-border bg-surface-2 p-4",children:[F.kind==="connection"?l.jsx(gw,{size:20,className:"mt-0.5 shrink-0 text-muted-foreground"}):F.kind==="expired"?l.jsx(xa,{size:20,className:"mt-0.5 shrink-0 text-warning"}):l.jsx(My,{size:20,className:"mt-0.5 shrink-0 text-warning"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("h3",{className:"text-sm font-medium",children:F.title}),l.jsx("p",{className:"mt-1.5 text-sm leading-6 text-muted-foreground",children:F.description})]})]}),ae.routeOnly&&!F&&l.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"此邀请提供备用连接,目标服务仍会验证你的访问权限。"}),T?l.jsxs("form",{className:"space-y-3",onSubmit:async O=>{O.preventDefault(),de(!0),ee("");try{await n?.(ae,N)}catch(X){ee(X instanceof Error?X.message:"暂时无法登录,请重试。")}finally{L(""),de(!1)}},children:[l.jsxs("label",{className:"block space-y-2 text-sm",children:[l.jsx("span",{children:"目标服务密码"}),l.jsx("input",{className:rn,type:"password",required:!0,autoFocus:!0,autoComplete:"current-password",value:N,onChange:O=>L(O.target.value)})]}),l.jsx("button",{className:`${nr} w-full`,disabled:z||!N,children:z?"正在登录…":"登录并连接"})]}):F&&!F.retryable?l.jsx("button",{type:"button",className:`${nr} w-full text-sm`,onClick:()=>{te(!0),ee("")},children:"输入新的邀请链接"}):l.jsx("button",{type:"button",className:`${nr} w-full text-sm`,disabled:z,onClick:()=>{Ai(ae)},children:z?"正在连接…":F?"重试连接":"接受邀请"}),ae.certificateUrl&&l.jsxs("p",{className:"text-xs leading-6 text-muted-foreground",children:["直接接受邀请将通过 HTTP 打开,内容经应用加密通道传输。也可",l.jsx("a",{className:"ml-1 text-primary underline underline-offset-2",href:ae.certificateUrl,target:"_blank",rel:"noopener noreferrer",children:"安装本地 CA 证书,使用 HTTPS"}),"。"]})]}),he&&!un&&l.jsxs("section",{children:[!S&&Xo.length>0&&l.jsxs("p",{role:"alert",className:"mb-3 text-xs text-destructive",children:["有 ",Xo.length," 个会话尚未加载或不属于此服务,暂不能生成完整分享。跨服务协作组请分别在所属服务创建邀请。"]}),ht?l.jsxs("div",{className:"space-y-4",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10 text-primary",children:l.jsx(Ln,{size:20})}),l.jsxs("div",{children:[l.jsx("p",{role:"status",className:"text-base font-medium",children:ht.expiresAt<=we?"邀请链接已过期":be==="copied"?"链接已复制":"链接已生成"}),l.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:ht.expiresAt<=we?"重新生成即可获得新链接":"单次使用 · 请在 10 分钟内接受"})]})]}),Z&&l.jsxs("div",{className:"rounded-xl border border-border p-3",children:[l.jsx("p",{className:"break-words text-sm font-medium",children:Jc(Z.scope,Z.sessionAppearance)}),l.jsxs("p",{className:"mt-2 text-xs text-muted-foreground",children:[vs(Z.actions)," · ",Z.viewMode==="chat"?"普通对话":"终端"," · 访问",Z.expiresAt?`至 ${new Date(Z.expiresAt).toLocaleString()}`:"保留至撤销"]}),l.jsx(Ll,{resources:Z.resources})]}),l.jsxs("label",{className:"block space-y-2 text-xs text-muted-foreground",children:[l.jsx("span",{children:"分享链接"}),l.jsx("input",{"aria-label":"分享链接",readOnly:!0,value:ht.url,onFocus:O=>O.currentTarget.select(),className:`${rn} text-sm`})]}),ht.certificateFingerprint&&l.jsxs("div",{className:"text-xs leading-relaxed text-muted-foreground",children:[l.jsx("p",{children:"接收方可直接接受邀请,通过 HTTP 进入;安装 CA 证书是可选的 HTTPS 方式。"}),l.jsxs("details",{className:"mt-2",children:[l.jsx("summary",{className:"min-h-9 cursor-pointer",children:"向接收方核对证书指纹"}),l.jsx("p",{className:"mt-1",children:"通过你们已信任的对话渠道发送此 SHA-256 指纹,确认引导页证书属于你的设备。"}),l.jsx("code",{className:"mt-2 block select-all break-all rounded-lg bg-background p-2 text-foreground",children:ht.certificateFingerprint})]})]}),be==="failed"&&l.jsx("p",{role:"status",className:"text-xs text-muted-foreground",children:"未能自动复制,请点击下方按钮或选中链接复制。"}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"HTTP 入口无需安装证书;选择 HTTPS 时需信任服务证书。"}),l.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-1",children:[l.jsxs("button",{type:"button","aria-expanded":W,className:`${pt} inline-flex items-center gap-2 text-xs text-muted-foreground`,onClick:()=>xe(O=>!O),children:[l.jsx(Qy,{size:15}),W?"隐藏二维码":"显示二维码"]}),l.jsx("button",{type:"button",className:`${pt} text-xs text-muted-foreground`,onClick:()=>{Ne.current++,Wo(void 0),xe(!1),fe("idle"),q(""),ee("")},children:"调整分享内容 / 重新生成"})]}),W&&(ah?l.jsx("img",{src:ah,width:220,height:220,className:"mx-auto max-w-full rounded-xl",alt:"设备邀请二维码"}):l.jsx("div",{className:"mx-auto flex h-48 w-48 items-center justify-center",children:l.jsx(Xe,{size:22,className:"animate-spin text-muted-foreground"})})),ht.id&&wh(ht.id)]}):l.jsxs("form",{id:"federation-invite-form",className:"space-y-3",onSubmit:yh,children:[l.jsxs("fieldset",{disabled:S||z||ye==="full",children:[l.jsx("legend",{className:"mb-2 text-xs text-muted-foreground",children:"分享范围"}),l.jsx("div",{className:"grid grid-cols-2 gap-2",children:[["selected","指定会话"],["all","全部终端"]].map(([O,X])=>{const Ce=(ye==="full"?"all":Oe)===O;return l.jsxs("label",{className:`flex min-h-11 cursor-pointer items-center justify-center gap-2 rounded-xl border px-3 py-2 text-sm transition focus-within:ring-2 focus-within:ring-ring ${Ce?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground hover:bg-surface-2"}`,children:[l.jsx("input",{type:"radio",name:"federation-scope",value:O,checked:Ce,onChange:()=>kt(O),className:"sr-only"}),l.jsx("span",{"aria-hidden":"true",className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${Ce?"border-primary bg-primary text-primary-foreground":"border-border"}`,children:Ce&&l.jsx(Ln,{size:11})}),X]},O)})})]}),Oe==="selected"&&ye!=="full"?l.jsxs("section",{"aria-label":"分享会话",className:"flex min-h-14 items-center gap-3 rounded-xl bg-surface-2 px-3 py-2",children:[l.jsx("span",{className:"shrink-0 text-primary",children:l.jsx(ni,{icon:Jo.length===1?oe[Jo[0].sessionId]?.icon:void 0,size:22})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"text-[11px] text-muted-foreground",children:"已选会话"}),l.jsx("p",{className:"line-clamp-2 break-words text-sm font-medium",children:eS||(S?"正在准备当前会话…":"选择要分享的会话")})]}),l.jsx("button",{type:"button","aria-label":_t.length?`已选 ${_t.length} 个`:"选择终端",className:`${pt} shrink-0 text-xs text-primary`,disabled:S||z,onClick:()=>{zc(_t),Ri(!0)},children:_t.length?"更改":"选择"})]}):l.jsx("p",{className:"text-xs text-muted-foreground",children:"包含以后新建的终端"}),l.jsxs("fieldset",{children:[l.jsx("legend",{className:"sr-only",children:"访问权限"}),l.jsx("div",{className:"grid grid-cols-2 gap-2",children:[["read","仅查看","不能输入或发送消息"],["write","可操作","允许对话和终端输入"]].map(([O,X,Ce])=>l.jsxs("label",{className:`flex min-h-14 cursor-pointer items-center gap-2 rounded-xl border px-3 py-2 transition focus-within:ring-2 focus-within:ring-ring ${ye===O?"border-primary bg-primary/10":"border-border hover:bg-surface-2"}`,children:[l.jsx("input",{type:"radio",name:"federation-permission",value:O,checked:ye===O,onChange:()=>Ge(O),className:"sr-only"}),l.jsx("span",{"aria-hidden":"true",className:`flex h-4 w-4 shrink-0 items-center justify-center rounded-full border ${ye===O?"border-primary bg-primary text-primary-foreground":"border-border"}`,children:ye===O&&l.jsx(Ln,{size:11})}),l.jsxs("span",{children:[l.jsx("span",{className:"block text-sm font-medium",children:X}),l.jsx("span",{className:"mt-0.5 block text-[11px] leading-4 text-muted-foreground",children:Ce})]})]},O))})]}),l.jsxs("fieldset",{className:"flex items-center gap-3",children:[l.jsx("legend",{className:"sr-only",children:"打开后的默认视图"}),l.jsx("span",{className:"w-[72px] shrink-0 text-xs text-muted-foreground",children:"打开方式"}),l.jsx("div",{className:"grid flex-1 grid-cols-2 gap-2",children:[["chat","普通对话",ii],["terminal","终端",Mu]].map(([O,X,Ce])=>l.jsxs("button",{type:"button","aria-pressed":tt===O,className:`${pt} inline-flex items-center justify-center gap-2 border ${tt===O?"border-primary bg-primary/10 text-primary":"border-border text-muted-foreground"}`,onClick:()=>it(O),children:[l.jsx(Ce,{size:15}),X]},O))})]}),l.jsxs("label",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[l.jsx("span",{className:"w-[72px] shrink-0",children:"访问有效期"}),l.jsxs("select",{"aria-label":"访问有效期",className:`${rn} min-w-0 flex-1 text-sm`,value:ke,onChange:O=>tS(O.target.value),children:[l.jsx("option",{value:"never",children:"直到撤销"}),l.jsx("option",{value:"3600000",children:"1 小时"}),l.jsx("option",{value:"86400000",children:"1 天"}),l.jsx("option",{value:"604800000",children:"7 天"}),l.jsx("option",{value:"custom",children:"自定义时间"})]})]}),ke==="custom"&&l.jsxs("label",{className:"block space-y-1 text-xs text-muted-foreground",children:[l.jsx("span",{children:"授权到期时间"}),l.jsx("input",{type:"datetime-local",className:rn,value:bn,onChange:O=>ki(O.target.value)})]}),l.jsxs("label",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[l.jsx("span",{className:"w-[72px] shrink-0",children:"链接地址"}),l.jsxs("select",{"aria-label":"接入地址",className:`${rn} min-w-0 flex-1 text-sm`,value:ur,onChange:O=>De(O.target.value),children:[l.jsxs("option",{value:"",children:["当前地址 · ",new URL(Kc).host]}),u.map(O=>l.jsxs("option",{value:O.url,children:[O.label," · ",new URL(O.url).host]},O.url)),l.jsx("option",{value:"custom",children:"自定义地址"})]})]}),ur==="custom"&&l.jsx("input",{"aria-label":"自定义接入地址",type:"text",className:rn,inputMode:"url",placeholder:"例如:https://192.168.1.23:9834",value:ge,onChange:O=>We(O.target.value)}),Q0&&l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"当前地址仅供这台电脑使用。其他设备需选择能访问的域名或 IP 地址。"}),ye==="write"&&l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"终端命令可读写该系统用户有权访问的文件。"}),ye==="full"&&l.jsx("p",{className:"text-xs leading-5 text-destructive",children:"当前为完整服务权限,包含设置和权限管理。"}),l.jsxs("button",{type:"button","aria-expanded":me,className:"flex min-h-9 w-full items-center justify-between text-xs text-muted-foreground",onClick:()=>je(O=>!O),children:["更多选项",l.jsxs("span",{className:"flex items-center gap-1",children:["名称、图标与附带资源",l.jsx(Pr,{size:13,className:me?"rotate-180":""})]})]}),me&&l.jsxs("div",{className:"space-y-4 border-t border-border pt-3",children:[ye!=="full"&&Oe==="selected"&&Jo.length>0&&l.jsx(ZL,{sessions:Jo,value:oe,onChange:Y}),l.jsxs("label",{className:"block space-y-1 text-xs text-muted-foreground",children:[l.jsx("span",{children:"设备备注(可选)"}),l.jsx("input",{className:rn,value:gt,onChange:O=>Je(O.target.value),placeholder:"例如:项目协作"})]}),d&&l.jsxs("label",{className:"flex min-h-11 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:G,onChange:O=>le(O.target.checked)}),"让新设备也能使用备用连接"]}),l.jsxs("fieldset",{className:"space-y-2",children:[l.jsx("legend",{className:"text-xs text-muted-foreground",children:"管理权限"}),l.jsxs("label",{className:"flex min-h-11 items-center gap-2 text-sm",children:[l.jsx("input",{type:"checkbox",checked:ye==="full",onChange:O=>Ge(O.target.checked?"full":"read")}),"授予完整服务权限"]}),l.jsx("p",{className:"text-xs leading-5 text-muted-foreground",children:"完整权限包含所有终端、文件、设备、设置和权限管理。"})]}),ye!=="full"&&l.jsx(YL,{value:Lt,onChange:V,expanded:!0})]})]})]}),un&&l.jsxs("section",{children:[l.jsx("p",{className:"mb-3 text-xs text-muted-foreground",children:"仅允许访问勾选的终端。"}),l.jsxs("div",{className:"space-y-1",children:[E.map(O=>l.jsxs("label",{className:"flex min-h-12 cursor-pointer items-center gap-3 rounded-lg px-2 py-2 text-sm hover:bg-surface-2",children:[l.jsx("input",{type:"checkbox",className:"h-4 w-4 accent-primary",checked:Jr.includes(O.sessionId),onChange:X=>zc(X.target.checked?[...Jr,O.sessionId]:Jr.filter(Ce=>Ce!==O.sessionId))}),l.jsx("span",{className:"min-w-0 break-words",children:O.name})]},O.sessionId)),!E.length&&l.jsx("p",{className:"py-4 text-sm text-muted-foreground",children:"当前没有可共享的终端。"})]})]}),I&&l.jsxs("p",{role:"alert",className:"mt-4 text-sm text-destructive",children:[I,P&&l.jsx("button",{type:"button",className:`${pt} ml-1 text-sm underline`,onClick:P,children:"重试"})]}),!ae&&!U.title&&!Ae&&!Xr&&!Vo&&!un&&!ht&&!he&&l.jsxs("div",{className:"mt-4 border-t border-border pt-2",children:[l.jsxs("button",{type:"button",className:`${pt} -ml-3 inline-flex items-center gap-1 bg-transparent text-xs text-muted-foreground`,"aria-expanded":Zr?void 0:ce,onClick:()=>Zr?dh(!0):pe(O=>!O),children:[he?"有效期与备注":Ae?"手动连接":Gn==="devices"?"授权详情":"连接详情",Zr?l.jsx(On,{size:14}):l.jsx(Pr,{size:13,className:ce?"rotate-180":""})]}),ce&&l.jsxs("section",{className:"space-y-3 pb-1 pt-2",children:[he&&l.jsxs(l.Fragment,{children:[l.jsxs("label",{className:"block space-y-1 text-sm",children:[l.jsx("span",{children:"设备备注(可选)"}),l.jsx("input",{className:rn,value:gt,onChange:O=>Je(O.target.value),placeholder:"例如:工作电脑"})]}),l.jsxs("label",{className:"block space-y-1 text-sm",children:[l.jsx("span",{children:"授权到期时间"}),l.jsx("input",{type:"datetime-local",className:rn,value:bn,onChange:O=>ki(O.target.value)})]})]}),!he&&s&&l.jsxs("p",{className:"break-all text-xs leading-relaxed text-muted-foreground",children:["本设备身份:",s]})]})]}),Q&&l.jsx("p",{role:"alert",className:"mt-3 text-sm text-destructive",children:Q}),Te&&l.jsx("p",{role:"status",className:"mt-3 text-sm text-muted-foreground",children:Te})]}),he&&!un&&l.jsx("footer",{className:"shrink-0 border-t border-border bg-surface px-5 pt-3 pb-[max(12px,env(safe-area-inset-bottom))]",children:ht?l.jsxs("button",{type:"button",className:`${nr} inline-flex w-full items-center justify-center gap-2`,disabled:z,onClick:()=>{ht.expiresAt<=we?yh():oS()},children:[l.jsx(si,{size:16}),z?"正在生成…":ht.expiresAt<=we?"重新生成链接":"复制邀请链接"]}):l.jsxs(l.Fragment,{children:[l.jsxs("button",{type:"submit",form:"federation-invite-form",className:`${nr} inline-flex w-full items-center justify-center gap-2`,disabled:z||S||Xo.length>0,children:[z&&l.jsx(Xe,{size:16,className:"animate-spin"}),z?"正在生成…":S?"正在准备分享…":"生成并复制链接"]}),l.jsxs("p",{className:"mt-2 text-center text-[11px] leading-4 text-muted-foreground",children:["链接 10 分钟内单次接受 · 接收后",bn?"按所选时间到期":"可访问至撤销"]})]})}),un&&l.jsx("footer",{className:"shrink-0 border-t border-border px-5 pt-3 pb-[max(16px,env(safe-area-inset-bottom))]",children:l.jsxs("button",{type:"button",className:`${nr} w-full text-sm`,disabled:!Jr.length,onClick:()=>{et(Jr),kt("selected"),Ri(!1)},children:["使用所选终端(",Jr.length,")"]})})]})}),document.body)}const qo=dr(()=>({modes:{},errors:{}})),fg=e=>qo.setState(t=>({errors:{...t.errors,[e]:void 0}})),Tn=new Map,ic=e=>e==="terminal"||e==="chat";function Po(e,t){qo.setState(n=>({modes:{...n.modes,[e]:t}}));try{localStorage.setItem(e,t)}catch{}}const gu=()=>se()?.targetPeerId||location.origin,E0=e=>`termdock:session-view:${gu()}:${e}`;function TB(e){const t=E0(e),n=qo.getState().modes[t];if(n)return n;try{const r=localStorage.getItem(t);if(ic(r))return r}catch{}return"terminal"}function AB(e,t){const n=gu(),r=E0(e);Po(r,t);let o=Tn.get(r);o||(o={key:r,url:`/api/terminal/${encodeURIComponent(e)}/view-mode`,refs:0,epoch:0,writing:!1,reading:!1,current:()=>gu()===n&&!He()?.closed},Tn.set(r,o)),ac(o,t)}async function ac(e,t){if(e.queued=t,e.epoch++,e.writing)return;e.writing=!0;let n=He();try{for(;e.queued&&e.current();){const r=e.queued;e.queued=void 0,n=He();const o=await fetch(e.url,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:r})});if(!o.ok)throw new Error("模式保存失败");const s=await o.json();if(!ic(s.mode))throw new Error("模式保存失败");He()===n&&e.current()&&(e.confirmed=s.mode,e.queued||Po(e.key,s.mode))}}catch{!e.queued&&e.current()&&He()===n&&(e.confirmed&&Po(e.key,e.confirmed),qo.setState(r=>({errors:{...r.errors,[e.key]:"显示模式未保存,请检查连接后重新切换"}})))}finally{e.writing=!1,e.queued&&e.current()?ac(e,e.queued):!e.refs&&Tn.get(e.key)===e&&Tn.delete(e.key)}}function ND(e,t=!0,n="terminal",r=!1){const o=se()?.targetPeerId||location.origin,s=`termdock:session-view:${o}:${e}`,i=qo(u=>u.modes[s]),a=qo(u=>u.errors[s]);let c,d=n;try{const u=localStorage.getItem(s);ic(u)&&(c=u),sessionStorage.getItem(`termdock:shared-view:${o}`)==="chat"&&(d="chat")}catch{}return y.useEffect(()=>{if(!e||!t)return;let u=Tn.get(s);u||(u={key:s,url:`/api/terminal/${encodeURIComponent(e)}/view-mode`,refs:0,epoch:0,writing:!1,reading:!1,current:()=>(se()?.targetPeerId||location.origin)===o&&!He()?.closed},Tn.set(s,u)),u.refs++;const f=u,h=async()=>{if(f.writing||f.reading||!f.current()||document.visibilityState==="hidden")return;const m=f.epoch,g=He();f.reading=!0;try{const b=await fetch(f.url);if(!b.ok)return;const w=await b.json();if(f.epoch!==m||f.writing||!f.current()||He()!==g||Tn.get(s)!==f)return;if(ic(w.mode))f.confirmed=w.mode,Po(s,w.mode);else if(w.mode===null&&(r||c)){const E=r?n:c;Po(s,E),ac(f,E)}}catch{}finally{f.reading=!1}};u.timer||(h(),u.timer=setInterval(()=>{h()},2500));const p=()=>{document.visibilityState==="visible"&&h()};return window.addEventListener("online",p),document.addEventListener("visibilitychange",p),()=>{window.removeEventListener("online",p),document.removeEventListener("visibilitychange",p),--f.refs===0&&(clearInterval(f.timer),f.timer=void 0,f.writing||Tn.delete(s))}},[e,t,s,o,n,r]),[i||(r?d:c||d),u=>{if(!e)return;fg(s),Po(s,u);const f=Tn.get(s);f&&ac(f,u)},a,()=>fg(s)]}function Fe(){try{if(window.parent!==window&&location.pathname==="/workspace.html"&&window.parent.location.origin===location.origin&&window.parent.__termdockWorkspaceHost)return window.parent}catch{}return window}const _D="debug",LD="termdock:debug";function hg(e){return e?new Set(e.split(",").map(t=>t.trim().toLowerCase()).filter(Boolean)):new Set}function DD(){if(typeof window>"u")return new Set;const e=hg(new URLSearchParams(window.location.search).get(_D));let t=new Set;try{t=hg(window.localStorage.getItem(LD))}catch{t=new Set}const n=new Set([...e,...t]);return n.has("1")||n.has("true")||n.has("*")||n.has("all")?new Set(["*"]):n}function jD(e){const t=DD();return t.has("*")||t.has(e)}function OD(e){const t=jD(e);return(...n)=>{t&&console.log(`[debug:${e}]`,...n)}}function Oc(){return typeof navigator>"u"?!1:/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function PB(){if(typeof window>"u")return!1;const e=Fe().navigator;return/iPhone|iPod/.test(e.userAgent)||/Android.*Mobile/.test(e.userAgent)||e.userAgentData?.mobile===!0}function k0(){if(typeof window>"u")return!1;const e=Fe(),t=e.navigator.maxTouchPoints>0||"ontouchstart"in e;return Oc()||t&&Math.min(e.innerWidth,e.innerHeight)<768}function $s(){return Oc()}function NB(e){$s()?e?.focus():e?.focus({preventScroll:!0})}function pg(){const e=document.getElementById("root");if(!e)return 0;let t=e.getBoundingClientRect().top,n=window;const r=Fe();try{for(;n!==r&&n.frameElement;)t+=n.frameElement.getBoundingClientRect().top,n=n.parent}catch{}return Math.round(-t*100)/100||0}const mg=80,MD=60,BD="termdock:viewport-keyboard-change",FD="termdock:viewport-layout-change",Nn=240,gg=640,yg=360,UD=1500;function HD({measuredHeight:e,documentVisible:t,editableFocused:n}){return t&&n&&e>0}function wg(){if(typeof document>"u")return!1;const e=document.activeElement;return e instanceof HTMLElement&&e.matches('input:not([type="hidden"]), textarea, select, [contenteditable]:not([contenteditable="false"])')}const cc=e=>{const t=typeof e=="number"?e:Number.parseFloat(typeof e=="string"?e:"0");return Number.isFinite(t)&&t>0?Math.round(t):0},I0=(e,t)=>{const n=e.map(cc).filter(r=>r>0);return n.find(r=>r>=Nn)??n[0]??t},zs=()=>typeof window>"u"?gg:I0([Fe().innerHeight,document.documentElement?.clientHeight,document.body?.clientHeight,Fe().visualViewport?.height,window.screen?.availHeight,window.screen?.height],gg),C0=()=>typeof window>"u"?yg:I0([Fe().innerWidth,document.documentElement?.clientWidth,document.body?.clientWidth,Fe().visualViewport?.width,window.screen?.availWidth,window.screen?.width],yg),rr=e=>{const t=Number.parseFloat(e||"0");return Number.isFinite(t)?Math.max(0,Math.round(t)):0},R0=Oc,T0=()=>typeof window>"u"?!1:Fe().navigator.standalone===!0||Fe().matchMedia?.("(display-mode: standalone)").matches===!0,A0=()=>{if(typeof window>"u"||!R0()||!T0())return{top:0,right:0,bottom:0,left:0};const e=zs()>=C0(),t=window.screen?.width||window.innerWidth,n=window.screen?.height||window.innerHeight,r=Math.min(t,n),o=Math.max(t,n);return r>=700?{top:Fe().document.documentElement.dataset.termdockPwaStatusBar==="default"?0:20,right:0,bottom:20,left:0}:e?o<780?{top:20,right:0,bottom:0,left:0}:{top:o>=852?59:o>=844?47:44,right:0,bottom:34,left:0}:{top:0,right:0,bottom:0,left:0}};function $D(e="--app-vh"){if(typeof window>"u"||typeof document>"u")return;document.documentElement.dataset.termdockTouchViewport=String(k0()||Fe().innerWidth<=768),document.documentElement.dataset.termdockNativeKeyboard=String($s()),document.documentElement.dataset.termdockNativePan="false",document.documentElement.dataset.termdockIpadPwa=String(document.documentElement.dataset.termdockPwaStatusBar==="default"&&T0());const t=cc(Fe().visualViewport?.height),n=Math.max(0,Math.round(Fe().visualViewport?.offsetTop??0)),r=zs(),o=t>=Nn,s=o?Math.min(r,t+n):r,i=Math.max(r,o?t:r),a=document.documentElement.style;a.setProperty(e,`${Math.max(s,Nn)}px`),a.setProperty("--app-base-vh",`${Math.max(i,Nn)}px`),a.setProperty("--app-visible-vh",`${Math.max(s,Nn)}px`),a.setProperty("--app-visual-vh",`${o?Math.min(r,t):r}px`),a.setProperty("--app-vv-offset-top",`${n}px`),a.setProperty("--kb-translate-y","0px"),a.setProperty("--kb-margin-top","0px"),a.setProperty("--kb-height","0px"),a.setProperty("--app-native-pan","0px");const c=A0();c.top>0&&a.setProperty("--safe-top-inset",`${c.top}px`),c.right>0&&a.setProperty("--safe-right-inset",`${c.right}px`),c.bottom>0&&a.setProperty("--safe-bottom-inset",`${c.bottom}px`),c.left>0&&a.setProperty("--safe-left-inset",`${c.left}px`)}function zD(e={}){const{cssVarName:t="--app-vh"}=e,n=Ut.useMemo(()=>OD("viewport"),[]),r=Ut.useCallback(()=>{if(typeof window>"u")return 0;const u=Fe().visualViewport,f=zs();if(!u)return f;const h=cc(u.height);if(h<Nn&&f>=Nn)return f;const p=u.offsetTop,g=h<f-1&&p>0&&p<=96?h+p:h,b=Math.max(0,Math.min(f,g));return b>0?Math.round(b):f},[]),[o,s]=Ut.useState(r),i=Ut.useRef(0),a=Ut.useRef(0),c=Ut.useRef(0),d=Ut.useRef(!1);return Ut.useEffect(()=>{if(typeof window>"u")return;let u=null,f=0,h=null,p="",m=null;const g=()=>{if(m?.isConnected)return m;try{return m=document.createElement("div"),m.setAttribute("aria-hidden","true"),m.style.cssText=["position:fixed","top:0","left:0","width:0","height:0","visibility:hidden","pointer-events:none","padding-top:constant(safe-area-inset-top)","padding-top:env(safe-area-inset-top,0px)","padding-right:constant(safe-area-inset-right)","padding-right:env(safe-area-inset-right,0px)","padding-bottom:constant(safe-area-inset-bottom)","padding-bottom:env(safe-area-inset-bottom,0px)","padding-left:constant(safe-area-inset-left)","padding-left:env(safe-area-inset-left,0px)"].join(";"),(document.body||document.documentElement).appendChild(m),m}catch{}return null},b=()=>{let j={top:0,right:0,bottom:0,left:0};try{const $=g();if($){const H=getComputedStyle($);j={top:rr(H.paddingTop),right:rr(H.paddingRight),bottom:rr(H.paddingBottom),left:rr(H.paddingLeft)}}}catch{}const B=Fe();if(B!==window){const $=B.getComputedStyle(B.document.documentElement);j={top:Math.max(j.top,rr($.getPropertyValue("--safe-top-inset"))),right:Math.max(j.right,rr($.getPropertyValue("--safe-right-inset"))),bottom:Math.max(j.bottom,rr($.getPropertyValue("--safe-bottom-inset"))),left:Math.max(j.left,rr($.getPropertyValue("--safe-left-inset")))}}const M=A0(),F={top:Math.max(j.top,M.top),right:Math.max(j.right,M.right),bottom:Math.max(j.bottom,M.bottom),left:Math.max(j.left,M.left)};return document.documentElement.style.setProperty("--safe-top-inset",`${F.top}px`),document.documentElement.style.setProperty("--safe-right-inset",`${F.right}px`),document.documentElement.style.setProperty("--safe-bottom-inset",`${F.bottom}px`),document.documentElement.style.setProperty("--safe-left-inset",`${F.left}px`),F},w=(j,B,M,F)=>{const $=Math.max(B,M);if(i.current===0){i.current=$,a.current=j,document.documentElement.style.setProperty("--app-base-vh",`${$}px`);return}const H=Math.abs(j-a.current),te=F<=mg;(H>MD||te)&&(i.current=$,a.current=j,document.documentElement.style.setProperty("--app-base-vh",`${$}px`))},E=(j="event")=>{u=null,document.documentElement.dataset.termdockNativeKeyboard=String($s());const B=$s()?pg():0;document.documentElement.style.setProperty("--app-native-pan",`${B}px`),document.documentElement.dataset.termdockNativePan=String(B>0),document.documentElement.dataset.termdockTouchViewport=String(k0()||Fe().innerWidth<=768);const M=r(),F=Math.round(Fe().visualViewport?.offsetTop??0),$=cc(Fe().visualViewport?.height),H=$>=Nn?$:M,te=zs(),ne=C0(),re=Math.max(0,H+F),ae=b(),U=ae.bottom,J=Math.max(0,i.current-H-U);w(ne,te,H,J),s(ge=>ge===M?ge:M);const Q=Number.parseInt(document.documentElement.style.getPropertyValue(t)||"0",10);document.documentElement.style.setProperty(t,`${M}px`),document.documentElement.style.setProperty("--app-vv-offset-top",`${F}px`),document.documentElement.style.setProperty("--app-visual-vh",`${H}px`);const ee=i.current,Te=Math.min(M,H),q=Math.max(0,Math.min(ee,re)),z=Math.max(0,Math.round(ee-Te-U)),de=wg(),he=HD({measuredHeight:z,documentVisible:document.visibilityState==="visible",editableFocused:de}),Ee=he?z:0,Ae=Ee>=mg,Ie=-Ee,G=Ee;document.documentElement.style.setProperty("--kb-translate-y",`${Ie}px`),document.documentElement.style.setProperty("--kb-margin-top",`${G}px`),document.documentElement.style.setProperty("--kb-height",`${Ee}px`),document.documentElement.style.setProperty("--app-visible-vh",`${q}px`);const le=Math.abs(Ee-c.current)>1,ue=Ae!==d.current;(le||ue)&&(c.current=Ee,d.current=Ae,document.dispatchEvent(new CustomEvent(BD,{detail:{baseHeight:ee,visibleHeight:q,visualViewportHeight:H,offsetTop:F,keyboardHeight:Ee,isOpen:Ae,source:j}}))),(Q!==M||F>0||le||ue)&&n("sync",{cssVarName:t,innerHeight:te,baseHeight:ee,rawViewportHeight:H,offsetTop:F,visibleHeight:q,rawHeight:M,appliedHeight:M,keyboardViewportHeight:Te,measuredKeyboardHeight:z,editableFocused:de,applyKeyboardInset:he,keyboardHeight:Ee,isKeyboardOpen:Ae,safeAreaInsets:ae,source:j}),document.dispatchEvent(new CustomEvent(FD,{detail:{height:M,baseHeight:ee,visibleHeight:q,offsetTop:F,source:j}}))},v=()=>{u===null&&(u=window.requestAnimationFrame(()=>{u=null;const j=Fe(),B=j.visualViewport,M=[j.innerWidth,j.innerHeight,B?.width,B?.height,B?.offsetTop,B?.offsetLeft,document.visibilityState,wg(),$s()?pg():0].join(":"),F=h;h=null,(F||M!==p)&&(p=M,E(F||"viewport.settle")),performance.now()<f&&v()}))},C=(j="event")=>{(j.includes("visibilitychange")||j.includes("pageshow"))&&n("schedule",{source:j}),h=j,R0()&&document.visibilityState==="visible"&&(f=performance.now()+UD),v()};C("mount");const _=()=>C("resize"),R=()=>C("native.scroll"),k=()=>C("orientationchange"),x=()=>C("visualViewport.resize"),S=()=>C("visualViewport.scroll"),I=()=>C("focusin"),P=()=>C("focusout"),T=j=>{f=0,c.current=0,d.current=!1;const B=Math.max(i.current,zs(),Nn),M=document.documentElement.style;M.setProperty(t,`${B}px`),M.setProperty("--app-visible-vh",`${B}px`),M.setProperty("--app-vv-offset-top","0px"),M.setProperty("--kb-translate-y","0px"),M.setProperty("--kb-margin-top","0px"),M.setProperty("--kb-height","0px"),s(F=>F===B?F:B),n("keyboard session reset",{source:j,baseHeight:B})};window.addEventListener("resize",_),window.addEventListener("scroll",R,{passive:!0}),Fe()!==window&&Fe().addEventListener("scroll",R,{passive:!0}),window.addEventListener("orientationchange",k),Fe().visualViewport?.addEventListener("resize",x),Fe().visualViewport?.addEventListener("scroll",S),document.addEventListener("focusin",I),document.addEventListener("focusout",P);const A=j=>{n("resume",{source:j,innerHeight:Math.round(window.innerHeight),visualViewport:Fe().visualViewport?{width:Math.round(Fe().visualViewport.width),height:Math.round(Fe().visualViewport.height),offsetTop:Math.round(Fe().visualViewport.offsetTop)}:null,hidden:document.hidden}),C(j)},N=()=>{document.hidden?T("visibilitychange:hidden"):A("visibilitychange")},L=()=>A("pageshow"),D=()=>T("pagehide");return document.addEventListener("visibilitychange",N),window.addEventListener("pageshow",L),window.addEventListener("pagehide",D),()=>{window.removeEventListener("resize",_),window.removeEventListener("scroll",R),Fe()!==window&&Fe().removeEventListener("scroll",R),window.removeEventListener("orientationchange",k),Fe().visualViewport?.removeEventListener("resize",x),Fe().visualViewport?.removeEventListener("scroll",S),document.removeEventListener("focusin",I),document.removeEventListener("focusout",P),document.removeEventListener("visibilitychange",N),window.removeEventListener("pageshow",L),window.removeEventListener("pagehide",D),u!==null&&window.cancelAnimationFrame(u),m?.remove()}},[t,n,r]),o}function qD(e){const t=new Map,n=new Map,r=new Map;for(const o of e){for(const s of o?.android??[])t.get(s.serial)?.access!=="control"&&t.set(s.serial,s);for(const s of o?.computers??[]){const i=JSON.stringify([s.host.toLowerCase(),s.protocol,s.port]);n.get(i)?.access!=="control"&&n.set(i,s)}for(const s of o?.directories??[])r.get(s.path)?.access!=="write"&&r.set(s.path,s)}return{android:[...t.values()],computers:[...n.values()],directories:[...r.values()]}}const bg=2,KD=new Set(["mount","init-fit","resize","layout-visible","dpr-change","session-key-change","session-reset","tmux-layout"]);function GD(e){const t=e.reason.replace(/^refresh:/,""),n=KD.has(t),r=Math.abs(e.proposedCols-e.currentCols),o=Math.abs(e.proposedRows-e.currentRows);return{accept:n?r>0||o>0:r>=bg||o>=bg,isRealResize:n,colsDelta:r,rowsDelta:o}}function _B(e){return e.before.cols!==e.after.cols||e.before.rows!==e.after.rows||e.lastServerSize===null||e.reconcileServerSize===!0&&(e.lastServerSize.cols!==e.after.cols||e.lastServerSize.rows!==e.after.rows)}function LB(e,t){return!e||t}function WD(e,t,n){return e!=="alternate"&&n>=t}function DB(e,t,n){return!n&&(e||t)}function vg(e,t){if(!e||e.lines.length===0||!Number.isFinite(t)||t<=0)return 0;const n=Math.floor(t),r=Number.isFinite(e.lines.maxLength)&&e.lines.maxLength>0?Math.floor(e.lines.maxLength):null;let o=0;if(r!==null){const c=Math.max(0,r-n);e.ybase>c&&(e.ybase=c,Number.isFinite(e.ydisp)&&(e.ydisp=Math.min(e.ydisp,c)),o++)}let s=Math.max(0,Math.floor(e.ybase)+n),i=r===null?s:Math.min(s,r),a=Math.max(0,i-e.lines.length);if(a>n){const c=Math.max(0,e.lines.length-n);e.ybase>c&&(e.ybase=c,Number.isFinite(e.ydisp)&&(e.ydisp=Math.min(e.ydisp,c)),o++),s=Math.max(0,Math.floor(e.ybase)+n),i=r===null?s:Math.min(s,r),a=Math.max(0,i-e.lines.length)}for(let c=0;c<a;c++){const d=e.lines.length;if(e.lines.push(e.getBlankLine(void 0)),e.lines.length<=d)break;o++}return o}function xg(e,t=e.rows){const r=e._core?._bufferService?.buffers;return r?vg(r.normal,t)+vg(r.alt,t):0}let lo=null;const VD=[{font:'400 14px "Termdock Maple"',text:"Termdock 0123456789 ~!@#$%^&*()[]{}"},{font:'700 14px "Termdock Maple"',text:"Termdock 0123456789 ~!@#$%^&*()[]{}"},{font:'400 14px "Termdock Prompt Icons"',text:""},{font:'700 14px "Termdock Prompt Icons"',text:""},{font:'400 13px "Noto Sans Mono CJK SC"',text:"终端中文路径"},{font:'700 13px "Noto Sans Mono CJK SC"',text:"终端中文路径"},{font:'400 13px "Termdock Star Symbol"',text:"✦✧"},{font:'400 13px "Noto Sans Symbols 2"',text:"⏺⏸⏹✓✗"}],YD=()=>{if(lo)return lo;if(typeof document>"u"||!("fonts"in document))return lo=Promise.resolve(),lo;const e=document.fonts;return lo=Promise.allSettled(VD.map(({font:n,text:r})=>e.load(n,r))).then(()=>e.ready).then(()=>{}).catch(()=>{}),lo};async function XD(e,t=()=>!0){return await YD(),t()?new dS(typeof e=="function"?e():e):null}class JD{constructor(t,n,r,o){this.terminal=t,this.fitAddon=n,this.container=r,this.options=o}terminal;fitAddon;container;options;measured=null;layout=null;get dimensions(){return this.measured&&this.measured.cols===this.terminal.cols&&this.measured.rows===this.terminal.rows?{...this.measured}:null}fit(t,n,r=t){if(this.options.authority==="server"||!n&&t!=="initialize")return null;const o=this.container.getBoundingClientRect();if(o.width<24||o.height<24)return null;const s=this.fitAddon.proposeDimensions();if(!Sg(s))return null;const i=this.terminal,a={cols:i.cols,rows:i.rows},c=this.measured?t:"initialize",d=i.dimensions?.device.cell,u=d?JSON.stringify([o.width,o.height,d.width,d.height,window.devicePixelRatio]):null,f=u!==null&&u===this.layout,h=GD({reason:f?"stable-layout":c==="initialize"?"init-fit":c==="reveal"?"layout-visible":r,currentCols:a.cols,currentRows:a.rows,proposedCols:s.cols,proposedRows:s.rows}),p=xg(i,a.rows);let m=0;if(h.accept){c==="update"&&this.options.beforeLiveResize?.();const b=i.buffer.active,w=WD(b.type,b.baseY,b.viewportY),E=i.options.smoothScrollDuration;try{i.options.smoothScrollDuration=0,i.resize(s.cols,s.rows),m=xg(i,s.rows),w&&i.scrollToBottom()}finally{i.options.smoothScrollDuration=E}}(p||m)&&i.refresh(0,i.rows-1);const g={cols:i.cols,rows:i.rows};return this.measured=g,this.layout=u,{reason:r,backend:"xterm",width:Math.round(o.width),height:Math.round(o.height),before:a,proposed:s,next:g,hysteresis:h,repairedBeforeResize:p,repairedAfterResize:m,changed:a.cols!==g.cols||a.rows!==g.rows}}applyRemoteSize(t){return this.options.authority!=="server"||!Sg(t)?!1:(this.terminal.resize(t.cols,t.rows),this.measured=null,!0)}}function Sg(e){const t=e;return!!t&&Number.isSafeInteger(t.cols)&&Number.isSafeInteger(t.rows)&&t.cols>0&&t.rows>0}function Eg(){return{confirmed:null,pending:null,nextSeq:1}}function kg(e,t){return e?.cols===t.cols&&e.rows===t.rows}function P0(e,t,n){const r={...t,seq:e.nextSeq,attempt:n};return{state:{...e,pending:r,nextSeq:e.nextSeq+1},request:r}}function ZD(e,t){return kg(e.pending,t)||!e.pending&&kg(e.confirmed,t)?{state:e,request:null}:P0(e,t,0)}function QD(e,t){const n=e.pending;if(!n||t.seq!==n.seq)return{state:e,accepted:!1};const r=t.ok&&Number.isFinite(t.cols)&&Number.isFinite(t.rows)&&(t.cols??0)>0&&(t.rows??0)>0?{cols:Math.floor(t.cols),rows:Math.floor(t.rows)}:null;return{state:{...e,confirmed:r,pending:null},accepted:!0}}function jB(e,t,n=1){const r=e.pending;return!r||r.seq!==t?{state:e,request:null,exhausted:!1}:r.attempt>=n?{state:{...e,confirmed:null,pending:null},request:null,exhausted:!0}:{...P0(e,r,r.attempt+1),exhausted:!1}}function Ig(e,t){return!Number.isFinite(t.cols)||!Number.isFinite(t.rows)||t.cols<=0||t.rows<=0?e:{...e,confirmed:{cols:Math.floor(t.cols),rows:Math.floor(t.rows)}}}function OB(e){return{...e,pending:null}}const ej=150;function MB(e=0){return{lastPushAt:e}}function BB(e,t,n=ej){return t-e.lastPushAt>=n?(e.lastPushAt=t,{action:"send"}):{action:"hold",readyAt:e.lastPushAt+n}}function FB(e){return{lastPushAt:e}}const tj={background:"#1C1B1A",foreground:"#CECDC3",cursor:"#CECDC3",cursorAccent:"#1C1B1A",selectionBackground:"#403E3C",selectionForeground:"#CECDC3",selectionInactiveBackground:"#403E3C50",black:"#6F6E69",red:"#AF3029",green:"#66800B",yellow:"#AD8301",blue:"#205EA6",magenta:"#A02F6F",cyan:"#24837B",white:"#CECDC3",brightBlack:"#6F6E69",brightRed:"#D14D41",brightGreen:"#879A39",brightYellow:"#D0A215",brightBlue:"#4385BE",brightMagenta:"#CE5D97",brightCyan:"#3AA99F",brightWhite:"#FFFCF0"},nj={background:"#FFFCF0",foreground:"#100F0F",cursor:"#100F0F",cursorAccent:"#FFFCF0",selectionBackground:"#CECDC3",selectionForeground:"#100F0F",selectionInactiveBackground:"#CECDC350",black:"#100F0F",red:"#AF3029",green:"#66800B",yellow:"#AD8301",blue:"#205EA6",magenta:"#A02F6F",cyan:"#24837B",white:"#575653",brightBlack:"#6F6E69",brightRed:"#D14D41",brightGreen:"#879A39",brightYellow:"#D0A215",brightBlue:"#4385BE",brightMagenta:"#CE5D97",brightCyan:"#3AA99F",brightWhite:"#100F0F"};function rj(e){return e==="light"?nj:tj}const yu=new Map;function oj(){for(const e of["mousemove","pointermove","mouseup","pointerup","pointercancel","blur","pagehide","keydown","visibilitychange"]){if(yu.has(e))continue;const t=new Set;yu.set(e,t),(e==="visibilitychange"?document:window).addEventListener(e,r=>{for(const o of[...t])o(r)},!0)}}function sj(e){oj();let t=!1,n;const r=[],o=(d,u,f)=>{const h=yu.get(u);h&&(d===window||d===document)?(h.add(f),r.push(()=>{h.delete(f)})):(d.addEventListener(u,f,!0),r.push(()=>d.removeEventListener(u,f,!0)))},s=(d,u)=>{if(!t){t=!0,clearTimeout(n),r.forEach(f=>f());try{e.onFinish(d,u)}finally{const{captureTarget:f,pointerId:h}=e;if(f&&h!==void 0)try{f.hasPointerCapture?.(h)&&f.releasePointerCapture(h)}catch{}}}},i=d=>d.pointerId===e.pointerId,a=d=>{(d.buttons&1)===0&&s("buttons-lost",d)},c=d=>{e.deferRelease?n??=setTimeout(()=>s("release",d),0):s("release",d)};return e.pointerId===void 0?(o(window,"mousemove",d=>a(d)),o(window,"pointermove",d=>{d.pointerType==="mouse"&&a(d)}),o(window,"mouseup",d=>{const u=d;u.button===0&&c(u)}),o(window,"pointercancel",d=>{d.pointerType==="mouse"&&s("cancel",d)})):(o(window,"pointermove",d=>{const u=d;i(u)&&(e.pointerType==="mouse"||e.pointerType==="pen")&&a(u)}),o(window,"pointerup",d=>{i(d)&&c(d)}),o(window,"pointercancel",d=>{i(d)&&s("cancel",d)}),e.captureTarget&&o(e.captureTarget,"lostpointercapture",d=>{d.target===e.captureTarget&&i(d)&&s("capture-lost",d)})),o(window,"blur",d=>{d.target===d.currentTarget&&s("blur")}),o(window,"pagehide",()=>s("hidden")),o(document,"visibilitychange",()=>{document.hidden&&s("hidden")}),o(window,"keydown",d=>{d.key==="Escape"&&s("escape")}),()=>s("dispose")}function ij(e,t,n,r,o,s=1){let i=t,a=null,c=!1;const d=e.style.width,u=document.body.style.cursor,f=document.body.style.userSelect,h=()=>r(n+(i-t)*s),p=()=>{a=null,e.style.width=`${h()}px`},m=w=>{i=w.clientX,a===null&&(a=requestAnimationFrame(p))},g=w=>{c||(c=!0,window.removeEventListener("mousemove",m),b(),a!==null&&cancelAnimationFrame(a),a=null,document.body.style.cursor=u,document.body.style.userSelect=f,w?(p(),h()!==n&&o(h())):e.style.width=d)},b=sj({onFinish:(w,E)=>{w==="release"&&E&&(i=E.clientX),g(w!=="dispose"&&w!=="escape")}});return document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",m),()=>g(!1)}function Ts(e,t){const n=e.replace(/\r?\n/g,"\r");return`\x1B[200~${(t&&n.endsWith("\r")?n.slice(0,-1):n).replace(/\x1b/g,"␛")}\x1B[201~${t?"\r":""}`}function UB(e,t,n){let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];)r+=1;let o=0;const s=e.length-r,i=t.length-r;for(;o<s&&o<i&&e[e.length-1-o]===t[t.length-1-o];)o+=1;const a=t.slice(r,t.length-o);return a&&(n==="insertFromPaste"||n==="insertFromPasteAsQuotation"||/[\r\n]/.test(a))?a:null}const Ei=new Map;function aj(e,t,n,r=!1){if(!n||!t||!Ff(e))return null;const o=`owned-paste-${crypto.randomUUID()}`;return Ei.set(o,{source:e,layer:Jt(),sessionId:t,text:n,token:{nonce:o,submitAfterPaste:r}}),{nonce:o,text:n,sessionId:t,paste:!0,submitAfterPaste:r,focus:!1,ownedPaste:!0}}function cj(e){Ei.delete(e)}function Qf(e){return e.layer===Jt()&&Ff(e.source)}function HB(e,t){const n=e.nonce?Ei.get(e.nonce):void 0;return n&&Qf(n)&&e.ownedPaste===!0&&e.paste===!0&&e.submitAfterPaste===n.token.submitAfterPaste&&n.sessionId===t&&e.sessionId===t&&e.text===n.text?n.token:null}function $B(e,t,n){const r=Ei.get(e.nonce);return!r||r.token!==e||r.consumed?!1:(r.consumed=!0,Qf(r)&&r.sessionId===t&&n===Ts(r.text,r.token.submitAfterPaste===!0))}function zB(e,t){const n=Ei.get(e.nonce);return!!n&&n.token===e&&n.sessionId===t&&Qf(n)}function qB(e){const t=Jt(),n=se(),r=He();return()=>{const o=se();return Jt()===t&&(!e||Ff(e))&&o?.url===n?.url&&o?.targetPeerId===n?.targetPeerId&&He()===r&&!r?.closed}}function lj(e,t,n,r,o){if(!e||!t||!n())return Promise.resolve(!1);const s=r?aj(r,t,e,o?.submitAfterPaste===!0):null;if(r&&!s)return Promise.resolve(!1);const i=s?.nonce??`reference-${crypto.randomUUID()}`;return new Promise(a=>{let c=!1;const d=h=>{c||(c=!0,window.clearTimeout(f),window.removeEventListener("termdock-insert-reference-ack",u),s&&cj(i),a(h&&n()))},u=h=>{const p=h.detail;p?.nonce===i&&d(p.ok===!0)},f=window.setTimeout(()=>d(!1),1500);window.addEventListener("termdock-insert-reference-ack",u),window.dispatchEvent(new CustomEvent("termdock-insert-reference",{detail:s?{...s,...o?.reference?{reference:{...o.reference,text:e}}:{},focus:o?.focus??s.focus}:{text:e,sessionId:t,nonce:i,focus:!1,paste:!0,submitAfterPaste:!1,...o,...o?.reference?{reference:{...o.reference,text:e}}:{}}}))})}class va extends Error{}function N0(e){if(!e.type.startsWith("image/")||e.size===0)throw new Error("Clipboard image is empty");const t=e.type==="image/jpeg"?"jpg":e.type.split("/")[1].replace(/[^a-z0-9]/gi,"")||"png";return new File([e],`termdock-clipboard-${Date.now()}-${crypto.randomUUID()}.${t}`,{type:e.type})}async function KB(e,t){const{files:n}=await vi("/tmp",[N0(e)],t);if(!n[0]?.path)throw new Error("Upload did not return an image path");return n[0].path}async function Cg(e){const t=ft();if(t?.readClipboardImage){const n=await t.readClipboardImage();return n?.byteLength?new File([n],"clipboard.png",{type:"image/png"}):null}if(typeof e?.read!="function")return null;for(const n of await e.read()){const r=n.types.find(i=>i.startsWith("image/"));if(!r)continue;const o=await n.getType(r),s=r==="image/jpeg"?"jpg":r.split("/")[1].replace(/[^a-z0-9]/gi,"")||"png";return new File([o],`termdock-clipboard-${Date.now()}.${s}`,{type:r})}return null}async function dj(e){if(typeof e?.read!="function")return[];const t=[],n={"video/mp4":"mp4","video/quicktime":"mov","video/x-m4v":"m4v","video/webm":"webm","video/ogg":"ogv","video/mpeg":"mpeg","video/x-msvideo":"avi","video/x-matroska":"mkv","video/3gpp":"3gp","video/3gpp2":"3g2"};for(const r of await e.read()){const o=r.types.find(c=>c.startsWith("video/"));if(!o)continue;const s=await r.getType(o);if(!s.size)throw new Error("Clipboard video is empty");const i=o.split(";")[0].toLowerCase(),a=n[i]||i.slice(6).replace(/[^a-z0-9]/g,"")||"mp4";t.push(new File([s],`termdock-clipboard-${Date.now()}-${crypto.randomUUID()}.${a}`,{type:o}))}return t}async function uj(){const e=dt()?.targetPeerId;let t;try{t=await ft()?.readClipboardFiles?.({localServiceId:e})}catch(o){const s=o instanceof Error?o.message:String(o),i="TERMDOCK_CLIPBOARD_VIDEO_ERROR:",a=s.indexOf(i);if(a!==-1)throw new va(s.slice(a+i.length).trim());const c=s.match(/execution error: Error: (复制来源未提供可读取的视频数据[^\r\n]*|无法读取剪贴板视频)(?:\s*\(-\d+\))?\s*$/);throw c?new va(c[1]):o}if(dt()?.targetPeerId!==e)throw new Error("目标服务已切换,请重新粘贴");const n=[],r=[];for(const o of t??[])if(o.path&&e)r.push(o.path);else if(o.bytes){if(o.type?.startsWith("video/")&&o.bytes.byteLength===0)throw new va("复制来源未提供可读取的视频数据,请重新复制视频或选择文件上传");n.push(new File([o.bytes],o.name,{type:o.type||"application/octet-stream"}))}else throw new Error("剪贴板未提供可读取的文件");return{files:n,paths:r}}async function GB(e,t){if(!e.length)return[];const{files:n}=await vi("/tmp",e,t);if(n.length!==e.length||n.some(r=>!r.path))throw new Error("Upload did not return every file path");return n.map(r=>r.path)}function fj(e){return{files:e.files.length?Array.from(e.files):Array.from(e.items||[]).filter(n=>n.kind==="file").map(n=>n.getAsFile()).filter(n=>!!n),text:e.getData("text/plain")}}async function hj(e,t=()=>!0){const n=s=>{if(!t())throw new DOMException("目标服务已切换或粘贴操作已取消,请重新粘贴","AbortError");return s};n(null);const r=ft();let o;if(r?.readClipboardFiles)try{const s=n(await uj());if(s.files.length||s.paths.length)return{kind:"files",...s}}catch(s){if(n(null),s instanceof va)throw s;o=s}if(e?.files.length)return n({kind:"files",files:e.files,paths:[]});if(e?.text)return n({kind:"text",text:e.text});if(!r?.readClipboardImage&&typeof navigator.clipboard?.read=="function"){const s=n(await navigator.clipboard.read()),i={read:async()=>s},a=n(await dj(i));if(a.length)return{kind:"files",files:a,paths:[]};const c=n(await Cg(i));if(c)return{kind:"files",files:[c],paths:[]};for(const d of s)if(d.types.includes("text/plain"))return{kind:"text",text:n(await n(await d.getType("text/plain")).text())}}else if(r?.readClipboardImage){const s=n(await Cg());if(s)return{kind:"files",files:[s],paths:[]}}if(navigator.clipboard?.readText){const s=n(await navigator.clipboard.readText());if(s)return{kind:"text",text:s}}if(o)throw o;return{kind:"empty"}}const pj=[640,960,1280,1600,2048,2560,3072,4096],mj=[240,360,480,540,720,1080,1440,2160],Rg={min:.1,max:1,step:.01},Tg={min:25e4,max:2e7,step:25e4},eh="termdock:mobile-media-compression-v1",uo={showResultToast:!0,imageEnabled:!1,imageMaxDimension:2048,imageQuality:.8,videoEnabled:!1,videoMaxHeight:720,videoBitrate:25e5};function _0(){try{const e=JSON.parse(localStorage.getItem(eh)||"null");return!e||typeof e!="object"?uo:{showResultToast:e.showResultToast!==!1,imageEnabled:e.imageEnabled===!0,imageMaxDimension:pj.includes(e.imageMaxDimension)?e.imageMaxDimension:uo.imageMaxDimension,imageQuality:typeof e.imageQuality=="number"&&e.imageQuality>=Rg.min&&e.imageQuality<=Rg.max?e.imageQuality:uo.imageQuality,videoEnabled:e.videoEnabled===!0,videoMaxHeight:mj.includes(e.videoMaxHeight)?e.videoMaxHeight:uo.videoMaxHeight,videoBitrate:typeof e.videoBitrate=="number"&&e.videoBitrate>=Tg.min&&e.videoBitrate<=Tg.max?e.videoBitrate:uo.videoBitrate}}catch{return uo}}const L0=dr((e,t)=>({preferences:_0(),saveFailed:!1,update:n=>{const r={...t().preferences,...n};let o=!1;try{localStorage.setItem(eh,JSON.stringify(r))}catch{o=!0}e({preferences:r,saveFailed:o})}}));typeof window<"u"&&window.addEventListener("storage",e=>{(e.key===eh||e.key===null)&&L0.setState({preferences:_0(),saveFailed:!1})});function D0(e,t){return t.videoEnabled&&e.type.startsWith("video/")?"video":t.imageEnabled&&(/\.(?:jpe?g|png|heic|heif)$/i.test(e.name)||/^(?:image\/jpeg|image\/png|image\/heic|image\/heif)$/i.test(e.type))?"image":null}async function gj(e,t,n,r){const o=D0(e,t);if(!o)throw new Error("此文件不需要媒体压缩");const s=()=>{if(!n())throw new DOMException("Cancelled","AbortError")};s();const i=o==="video"?await(await Zt(async()=>{const{compressVideoLocally:a}=await import("./videoCompression-FazlZ86q.js");return{compressVideoLocally:a}},__vite__mapDeps([3,1,2]))).compressVideoLocally(e,{maxHeight:t.videoMaxHeight,videoBitrate:t.videoBitrate,onProgress:a=>{n()&&r(a)}}):await(await Zt(async()=>{const{compressImageLocally:a}=await import("./imageCompression-DaUBNTq-.js");return{compressImageLocally:a}},[])).compressImageLocally(e,{maxDimension:t.imageMaxDimension,quality:t.imageQuality});return s(),{file:i,kind:o,originalSize:e.size,uploadedSize:i.size,originalRetained:i===e}}function yj(e){const t=y.useRef(e);t.current=e;const[n,r]=y.useState(null),[o,s]=y.useState(null);y.useEffect(()=>s(null),[e.sessionId,e.active]);const i=y.useRef(null),a=y.useRef(!0),c=y.useCallback(()=>{i.current?.controller.abort();const g=t.current,b=dt(),w=He(),E=Jt(),v=document.activeElement,C=new AbortController,_=g.input.current,R={controller:C,at:t.current.selection?.()??{value:_?.textContent??"",start:(_?.textContent??"").length,end:(_?.textContent??"").length},current:()=>a.current&&!C.signal.aborted&&i.current===R&&t.current.active&&t.current.canWrite&&t.current.sessionId===g.sessionId&&dt()===b&&He()===w&&!w?.closed&&Jt()===E,focus:()=>document.activeElement===v||document.activeElement===g.input.current||document.activeElement===document.body};return i.current=R,R},[]);y.useEffect(()=>{const g=()=>{i.current&&!i.current.current()&&(i.current.controller.abort(),i.current=null,r(null))};g();const b=()=>{i.current?.controller.abort(),i.current=null,r(null),s(null)};return window.addEventListener("termdock:secure-state",g),window.addEventListener("auth:unauthorized",b),document.addEventListener("focusin",g),()=>{window.removeEventListener("termdock:secure-state",g),window.removeEventListener("auth:unauthorized",b),document.removeEventListener("focusin",g)}},[e.active,e.canWrite,e.sessionId]),y.useEffect(()=>(a.current=!0,()=>{a.current=!1,i.current?.controller.abort()}),[]);const d=y.useCallback(async(g,b,w=[],E)=>{if(!g.current())return;const v=L0.getState().preferences,C=E&&JSON.stringify(E.preferences)===JSON.stringify(v),_=C?[...E.prepared]:[],R=C?[...E.results]:[],k=(x,S={})=>{g.current()&&r({stage:x,files:b,paths:w,preferences:v,prepared:[..._],results:[...R],...S})};t.current.error(""),s(null);try{if(b.length&&!t.current.directory&&!t.current.sessionAttachments)throw new Error("附件上传暂不可用,请重试");for(let P=_.length;P<b.length;P++){const T=b[P];if(t.current.mediaCompression&&D0(T,v)){k("compressing",{fileName:T.name,fileIndex:P+1});const A=await gj(T,v,g.current,N=>k("compressing",{percent:Math.round(N),fileName:T.name,fileIndex:P+1}));if(!g.current())return;_.push(A.file),R.push(A)}else _.push(T)}if(!g.current())return;k("uploading",{percent:b.length?0:void 0});const x=P=>k("uploading",{percent:Math.round(P)}),S=b.length?t.current.sessionAttachments?await _x(t.current.sessionId,_,g.controller.signal,x,g.current):await vi(t.current.directory,_,g.controller.signal,x,g.current):{files:[]};if(!g.current())return;if(S.files.length!==b.length||S.files.some(P=>!P.path))throw new Error("部分文件未上传成功,请重试");const I=[...w,...S.files.map(P=>P.path)];if(!I.length)throw new Error("没有可添加的文件");t.current.attach?t.current.attach([...w.map(P=>({path:P,name:P.split("/").pop()||P})),...S.files.map((P,T)=>({path:P.path,name:_[T].name,type:_[T].type,size:_[T].size}))],g.focus(),g.at):t.current.insert(`${I.map(Tw).join(" ")} `,g.focus()),s(R.at(-1)??null),r(null),i.current=null}catch(x){if(!g.current())return;k("failed"),t.current.error(x instanceof Error?x.message:"文件处理或上传失败,请重试")}},[]),u=y.useCallback(g=>{!t.current.active||!t.current.canWrite||!g.length||d(c(),g)},[c,d]),f=y.useCallback(async g=>{if(!t.current.active||!t.current.canWrite)return;const b=c();r({stage:"reading"}),t.current.error("");const w=E=>{b.current()&&(t.current.insert(E,b.focus()),r(null),i.current=null)};try{const E=await hj(g,b.current);if(E.kind==="text"){w(E.text);return}if(E.kind==="files"){const v=E.files.length===1&&E.files[0].type.startsWith("image/")?[N0(E.files[0])]:E.files;return await d(b,v,E.paths)}throw new Error("剪贴板没有可读取的内容,请使用系统粘贴或选择文件")}catch(E){b.current()&&(r(null),t.current.error(E instanceof Error?E.message:"粘贴失败,请重试"))}},[c,d]),h=()=>{i.current?.controller.abort(),i.current=null,r(g=>g?{...g,stage:"cancelled"}:null)},p=()=>{(n?.files?.length||n?.paths?.length)&&d(c(),n.files||[],n.paths,n.prepared&&n.results&&n.preferences?{prepared:n.prepared,results:n.results,preferences:n.preferences}:void 0)},m=y.useCallback(()=>s(null),[]);return{transfer:n,addFiles:u,paste:f,cancel:h,retry:p,dismiss:()=>r(null),mediaResult:o,dismissMediaResult:m,busy:n?.stage==="reading"||n?.stage==="compressing"||n?.stage==="uploading"}}function th(e,t=()=>!0){return e?Kf(e,t):Promise.resolve(!1)}async function wj(e,t,n=()=>wx(e,{action:"copy-selection"})){if(!t())return!1;const r=await n();if(!t())return!1;const o=r.selection;if(!r.success||!o||!["copied","empty"].includes(o.status)||typeof o.text!="string"||typeof o.paneId!="string"||!/^%[0-9]+$/.test(o.paneId)||new TextEncoder().encode(o.text).length!==o.bytes||o.bytes>262144)throw new Error("服务未返回有效的终端选区,请更新服务后重试。");if(o.status==="empty")return!1;if(!o.bytes)throw new Error("终端选区为空。");return th(o.text,t)}const Ag=262144;function bj(e,t){return n=>{if(!e())return!0;const r=n.indexOf(";");if(r<0)return!0;const o=n.slice(r+1);if(!o||o==="?"||o.length>4*Math.ceil(Ag/3))return!0;let s;try{const i=atob(o);if(i.length>Ag)return!0;s=new TextDecoder("utf-8",{fatal:!0}).decode(Uint8Array.from(i,a=>a.charCodeAt(0)))}catch{return!0}return s&&th(s,e).then(i=>{!i&&e()&&t()}),!0}}function od(e){return e.replace(/\r\n|\r|\n/g,"\r").replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g," ").replace(/[\u200B-\u200D\uFEFF]/g,"")}const vj=y.lazy(()=>Zt(()=>import("./SessionResourceSidebar-CM9Vxbf2.js"),__vite__mapDeps([4,1,5,6,7,8,2,9,10])).then(e=>({default:e.SessionResourceSidebar}))),xj=y.lazy(()=>Zt(()=>import("./SessionChatView-kTD9PR6z.js").then(e=>e.S),__vite__mapDeps([11,12,1,13,14,15,16,6,17,18,2,19,20,21,22])).then(e=>({default:e.SessionChatView})));function Pg({client:e,initialSessionId:t,initialViewMode:n,sessions:r,resources:o,directoryError:s}){const[i,a]=y.useState(),c=y.useRef(null),d=y.useRef(null),u=y.useRef(null),f=_e(q=>q.rightSidebarWidth),[h,p]=y.useState(()=>window.innerWidth>=1024),[m,g]=y.useState(()=>window.innerWidth>=1024),[b]=y.useState(()=>{try{return sessionStorage.getItem(`termdock:shared-view:${e.targetPeerId}`)}catch{return null}}),w=n||(b==="chat"?"chat":b==="terminal"?"terminal":se()?.viewMode)||"terminal",[E,v,C]=ND(i?.sourceSessionId||i?.sessionId||"",!0,w,!!(n||b||se()?.viewMode));y.useLayoutEffect(()=>{let q=window.innerWidth>=1024;const z=()=>{const Ee=(c.current?.getBoundingClientRect().width||window.innerWidth)>=1024;g(Ee),q&&!Ee&&p(!1),q=Ee};z();const de=typeof ResizeObserver>"u"?void 0:new ResizeObserver(z);return c.current&&de?.observe(c.current),window.addEventListener("resize",z),()=>{de?.disconnect(),window.removeEventListener("resize",z)}},[]);const[_,R]=y.useState(w==="terminal");y.useEffect(()=>{E==="terminal"&&R(!0)},[E]);const k=y.useRef(E);k.current=E;const x=y.useRef(()=>{});y.useLayoutEffect(()=>{E==="terminal"&&x.current("reveal")},[E]),y.useEffect(()=>()=>u.current?.(),[]);const S=y.useRef(()=>!1),I=i?.attachmentRoot?{...o,directories:[...o.directories??[],{path:i.attachmentRoot,access:"read"}]}:o,P=z_(i,I),T=P.has("session.view"),A=P.has("session.input"),N=P.has("session.resize"),L=Wx(o).length>0,D=async(q,z)=>{if(!i||!A)return!1;const de=E==="chat"?await lj(q,i.sourceSessionId||i.sessionId,()=>!e.closed,z):S.current(Ts(q,!1));return de&&!m&&p(!1),de},j=y.useRef();y.useEffect(()=>{if(!t||j.current===t)return;const q=r.find(z=>z.sessionId===t||z.sourceSessionId===t);q&&(j.current=t,a(q))},[r,t]);const[B,M]=y.useState(0),[F,$]=y.useState("正在读取会话…"),[H,te]=y.useState(()=>document.documentElement.dataset.theme==="light"?"light":"dark");y.useEffect(()=>{const q=new MutationObserver(()=>te(document.documentElement.dataset.theme==="light"?"light":"dark"));return q.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>q.disconnect()},[]);const ne=y.useRef(null),re=y.useRef(null),ae=y.useRef(()=>""),U=y.useRef(async()=>!1),[J,Q]=y.useState(""),ee=yj({sessionId:i?.sourceSessionId||i?.sessionId||"",active:E==="terminal",canWrite:A,input:ne,sessionAttachments:!0,error:Q,insert:q=>{if(!S.current(Ts(od(q),!1)))throw new Error("终端未连接,内容尚未插入,请重连后重试")}}),Te=async()=>{const q=U.current;try{const z=await q();q===U.current&&Q(z?"":"请先选择需要复制的终端内容")}catch(z){q===U.current&&Q(z instanceof Error?z.message:"复制失败,请重试")}};return y.useEffect(()=>{a(q=>{if(!q)return r.length===1?r[0]:($(s||(r.length?"请选择会话":"暂无可用会话")),q);const z=r.find(de=>de.sessionId===q.sessionId);if(!z){$(s||"会话已不可用,请联系分享者");return}return z.name===q.name&&z.icon===q.icon&&z.attachmentRoot===q.attachmentRoot&&z.canWrite===q.canWrite&&z.canResize===q.canResize?q:z})},[r,s]),y.useEffect(()=>{if(!i||!T||!ne.current||!_)return;let q=!1;const z=[],de=()=>{x.current=()=>{},S.current=()=>!1,ae.current=()=>"",U.current=async()=>!1;for(const Ee of z.splice(0).reverse())Ee()};return(async()=>{let Ee=0,Ae;const Ie=await XD({theme:rj(H),cursorBlink:A,disableStdin:!A,mouseEventsRequireAlt:!A,convertEol:!1},()=>!q&&!!ne.current);if(!Ie||!ne.current)return;z.push(()=>Ie.dispose()),ae.current=()=>Ie.getSelection(),Ie.attachCustomKeyEventHandler(Y=>{if(Y.type==="keydown"&&(Y.ctrlKey||Y.metaKey)&&!Y.altKey){if(Y.key.toLowerCase()==="v")return Y.preventDefault(),A&&ee.paste(),!1;if(Y.key.toLowerCase()==="c"&&(Ie.hasSelection()||Y.metaKey||Y.shiftKey))return Y.preventDefault(),Te(),!1}return!0});const G=new uS;Ie.loadAddon(G),Ie.open(ne.current);const le=new JD(Ie,G,ne.current,{authority:N?"viewport":"server"});N&&le.fit("initialize",k.current==="terminal");const ue=le.dimensions;$("正在连接…");const De=new URLSearchParams({flow:"2",...N?{transport:"tmux-client",...ue?{cols:String(ue.cols),rows:String(ue.rows)}:{}}:{}}),ge=e.openSocket(`/api/terminal/${encodeURIComponent(i.sessionId)}/ws?${De}`);let We=!1,ye=0;const Ge=()=>!q&&!e.closed&&k.current==="terminal",Oe=new Map,kt=()=>{for(const Y of Oe.values())clearTimeout(Y.timer),Y.reject(new Error("连接已断开,请重连后复制"));Oe.clear()};z.push(kt);const _t=()=>new Promise((Y,Z)=>{if(!Ge()||ge.readyState!==1){Z(new Error("终端未连接,请重连后复制"));return}const ie=crypto.randomUUID(),we=setTimeout(()=>{Oe.delete(ie),Z(new Error("复制超时,请重试"))},1e4);Oe.set(ie,{resolve:Y,reject:Z,timer:we});try{ge.send(JSON.stringify({type:"tmux",action:"copy-selection",reqId:ie}))}catch(K){clearTimeout(we),Oe.delete(ie),Z(K)}});U.current=async()=>{const Y=Ie.getSelection();return Y?th(Y,Ge):A?wj(i.sessionId,Ge,_t):!1};const et=Ie.parser.registerOscHandler(52,bj(()=>Ge()&&ye===0,()=>{Ge()&&Q("复制失败,请重试")}));z.push(()=>et.dispose());let tt=Eg();z.push(()=>{ge.onclose=null,ge.onerror=null,ge.close()});const it=(Y="update")=>{if(q||k.current!=="terminal"||!ne.current?.clientWidth||!ne.current?.clientHeight)return;if(!N){const ie=ne.current.querySelector(".xterm-screen"),we=ne.current.querySelector(".xterm");if(ie&&we&&ie.offsetWidth&&ie.offsetHeight){const K=Math.min(1,(ne.current.clientWidth-16)/ie.offsetWidth,(ne.current.clientHeight-16)/ie.offsetHeight);we.style.transformOrigin="top left",we.style.transform=`scale(${Math.max(.1,K)})`}return}le.fit(Y,!0,"resize");const Z=le.dimensions;if(Z&&We&&ge.readyState===1){const ie=ZD(tt,Z);tt=ie.state,ie.request&&ge.send(JSON.stringify({type:"resize",...Z,seq:ie.request.seq}))}};x.current=it,ge.onopen=()=>{$(A?"":"只读"),it()},ge.onmessage=Y=>{try{const Z=JSON.parse(Y.data);if(q)return;if(Z.type==="connected"){We=!0,tt=Ig(Eg(),Z),Ae=typeof Z.streamEpoch=="string"?Z.streamEpoch:void 0,Ee=Number.isSafeInteger(Z.replayLastSeq)?Z.replayLastSeq:0,N||le.applyRemoteSize(Z);const ie=Array.isArray(Z.replayChunks)?Z.replayChunks.filter(we=>typeof we=="string").join(""):"";ye++,Ie.write((Z.replayOutOfWindow?"\x1Bc":"")+ie,()=>{ye--,it()})}else if(Z.type==="tmux-result"){const ie=Oe.get(Z.reqId);ie&&(Oe.delete(Z.reqId),clearTimeout(ie.timer),Z.success===!0?ie.resolve(Z):ie.reject(new Error(Z.error||"复制失败,请重试")))}else Z.type==="resize-ack"?tt=QD(tt,{...Z,ok:Z.ok!==!1}).state:Z.type==="data"&&typeof Z.data=="string"?Ie.write(Z.data,()=>{q||(Number.isSafeInteger(Z.seq)&&(Ee=Math.max(Ee,Z.seq)),ge.readyState===1&&Number.isSafeInteger(Z.flowSeq)&&ge.send(JSON.stringify({type:"output-ack",flowSeq:Z.flowSeq,since:Ee,epoch:Ae})))}):Z.type==="pty-size"&&Number.isSafeInteger(Z.cols)&&Number.isSafeInteger(Z.rows)&&Z.cols>0&&Z.rows>0?(tt=Ig(tt,Z),N||(le.applyRemoteSize(Z),requestAnimationFrame(()=>it()))):Z.type==="error"&&$("无法连接,请联系分享者")}catch{$("终端数据无效"),ge.close()}},ge.onclose=()=>{kt(),$("连接已断开,请重连")},ge.onerror=()=>$("连接失败,请重试"),S.current=Y=>!A||ge.readyState!==1?!1:(ge.send(JSON.stringify({type:"input",data:Y})),!0);const Lt=Ie.onData(Y=>{A&&ge.readyState===1&&ge.send(JSON.stringify({type:"input",data:Y}))});z.push(()=>Lt.dispose());const V=setInterval(()=>{ge.readyState===1&&ge.send(JSON.stringify({type:"ping"}))},2e4);z.push(()=>clearInterval(V));const oe=new ResizeObserver(()=>it());z.push(()=>oe.disconnect()),oe.observe(ne.current)})().catch(()=>{q||(de(),$("终端初始化失败,请重试"))}),()=>{q=!0,de()}},[e,i?.sessionId,T,A,N,H,_,B]),l.jsx(Vx.Provider,{value:I,children:l.jsx(Yx.Provider,{value:P,children:l.jsxs("div",{ref:c,className:"flex h-full min-h-0 flex-col bg-[var(--chrome-bg)] text-foreground",children:[l.jsxs("header",{className:"flex min-h-14 shrink-0 flex-wrap items-center gap-2 border-b border-border/40 px-3 pt-[env(safe-area-inset-top)] text-sm",children:[l.jsx("span",{"data-session-icon":!0,className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-surface-2 text-primary",children:l.jsx(ni,{icon:i?.icon})}),l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsx("p",{className:"truncate font-medium",children:i?.name||"共享工作空间"}),l.jsx("p",{className:"truncate text-[10px] text-muted-foreground",role:"status",children:i&&!A?"只读":E==="terminal"?F:""})]}),l.jsxs("button",{type:"button",onClick:()=>v(E==="chat"?"terminal":"chat"),className:"inline-flex min-h-11 items-center gap-1.5 rounded-lg px-3 text-xs hover:bg-surface-2",children:[E==="chat"?l.jsx(Mu,{size:15}):l.jsx(ii,{size:15}),E==="chat"?"终端":"对话"]}),l.jsx("button",{type:"button","aria-label":"重新连接会话",onClick:()=>M(q=>q+1),className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-lg text-muted-foreground hover:bg-surface-2",children:l.jsx(Ou,{size:15})}),E==="terminal"&&i&&l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button","aria-label":"复制终端选区",title:"选择终端内容后复制",onClick:()=>{Te()},className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-lg hover:bg-surface-2",children:l.jsx(si,{size:15})}),A&&l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button","aria-label":"粘贴到终端",onClick:()=>{ee.paste()},className:"min-h-11 rounded-lg px-3 text-xs hover:bg-surface-2",children:"粘贴"}),l.jsx("button",{type:"button","aria-label":"上传文件到终端",onClick:()=>re.current?.click(),className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-lg hover:bg-surface-2",children:l.jsx(Gy,{size:15})}),l.jsx("input",{ref:re,type:"file",multiple:!0,className:"hidden","aria-label":"选择终端附件",onChange:q=>{ee.addFiles(Array.from(q.target.files||[])),q.target.value=""}})]})]}),L&&l.jsxs("button",{type:"button","aria-expanded":h,onClick:()=>p(q=>!q),className:"inline-flex min-h-11 items-center gap-2 rounded-lg px-3 text-xs hover:bg-surface-2",children:[l.jsx(qy,{size:15}),"侧栏"]})]}),J&&l.jsx("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:J}),ee.transfer&&l.jsxs("div",{role:"status",className:"flex shrink-0 items-center gap-2 px-3 py-2 text-xs text-muted-foreground",children:[l.jsx("span",{className:"min-w-0 flex-1",children:ee.transfer.stage==="reading"?"正在读取剪贴板…":ee.transfer.stage==="uploading"?`正在上传文件 · ${ee.transfer.percent??0}%`:ee.transfer.stage==="cancelled"?"已取消上传":"上传未完成,内容尚未插入"}),ee.busy?l.jsx("button",{type:"button",className:"min-h-9 px-2",onClick:ee.cancel,children:"取消"}):l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",className:"min-h-9 px-2",onClick:ee.retry,children:"重试上传"}),l.jsx("button",{type:"button",className:"min-h-9 px-2",onClick:ee.dismiss,children:"关闭上传提示"})]})]}),C&&l.jsx("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:C}),r.length>1&&l.jsx("div",{className:"flex shrink-0 gap-2 overflow-x-auto border-b border-border/30 p-2",children:r.map(q=>l.jsxs("button",{"aria-pressed":i?.sessionId===q.sessionId,className:`inline-flex min-h-11 shrink-0 items-center gap-2 rounded-lg px-3 text-xs ${i?.sessionId===q.sessionId?"bg-surface-2":"text-muted-foreground hover:bg-surface-2"}`,onClick:()=>a({...q}),children:[l.jsx(ni,{icon:q.icon,size:15}),q.name,q.canWrite?"":" · 只读"]},`${e.targetPeerId}:${q.sessionId}`))}),l.jsxs("div",{className:"flex min-h-0 flex-1",children:[l.jsxs("main",{className:"flex min-h-0 min-w-0 flex-1 flex-col",onContextMenuCapture:q=>{E==="terminal"&&ae.current()?q.stopPropagation():q_(q)},children:[l.jsx("div",{ref:ne,"aria-label":"共享终端",onCopyCapture:q=>{const z=ae.current();q.preventDefault(),q.stopPropagation(),z?q.clipboardData.setData("text/plain",z):Te()},onPasteCapture:q=>{E==="terminal"&&(q.preventDefault(),q.stopPropagation(),A&&ee.paste(fj(q.clipboardData)))},onDragOver:q=>{q.preventDefault(),q.dataTransfer.dropEffect=A?"copy":"none"},onDrop:q=>{if(q.preventDefault(),q.stopPropagation(),!!A)try{const z=Kx(q.dataTransfer);if(z){S.current(Ts(od(z),!1));return}const de=Array.from(q.dataTransfer.files);if(de.length)ee.addFiles(de);else{const he=q.dataTransfer.getData("text/plain");he&&S.current(Ts(od(he),!1))}}catch(z){Q(z instanceof Error?z.message:"文件引用无效")}},className:`min-h-0 flex-1 overflow-auto p-2 ${E!=="terminal"?"hidden":""}`}),i&&T&&E==="chat"&&l.jsx("div",{className:"min-h-0 flex-1",children:l.jsx(y.Suspense,{fallback:l.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:"正在打开对话…"}),children:l.jsx(xj,{sessionId:i.sourceSessionId||i.sessionId,name:i.name,terminalLink:!1,canWrite:A,onTerminal:()=>v("terminal")},i.sourceSessionId||i.sessionId)})}),!i&&l.jsx("p",{className:"p-6 text-sm text-muted-foreground",children:F})]}),L&&l.jsxs("div",{ref:d,className:m?h?"relative shrink-0 border-l border-border":"hidden":"",style:m&&h?{width:Math.max(280,Math.min(f,window.innerWidth-360))}:void 0,children:[m&&h&&l.jsx("button",{type:"button",role:"separator","aria-label":"调整侧栏宽度","aria-orientation":"vertical",className:"absolute inset-y-0 -left-0.5 z-20 w-[5px] cursor-col-resize bg-transparent transition hover:bg-primary/30 focus-visible:bg-primary/30",onMouseDown:q=>{d.current&&(q.preventDefault(),u.current?.(),u.current=ij(d.current,q.clientX,d.current.getBoundingClientRect().width,z=>Math.max(280,Math.min(z,window.innerWidth-360)),z=>_e.getState().setRightSidebarWidth(z),-1))},onKeyDown:q=>{(q.key==="ArrowLeft"||q.key==="ArrowRight")&&(q.preventDefault(),_e.getState().setRightSidebarWidth(Math.max(280,Math.min(f+(q.key==="ArrowLeft"?24:-24),window.innerWidth-360))))}}),l.jsx(y.Suspense,{fallback:l.jsx("p",{className:"p-4 text-xs text-muted-foreground",children:"正在打开侧栏…"}),children:l.jsx(vj,{resources:o,canWrite:A,sessionId:i?.sourceSessionId||i?.sessionId,pinned:m,open:h,onClose:()=>p(!1),onInsert:D})})]})]})]})})})}function Sj({client:e,initialSessionId:t,initialViewMode:n,initialViewLayout:r}){zD();const[o,s]=y.useState([]),[i,a]=y.useState({}),[c,d]=y.useState(""),[u,f]=y.useState(()=>{try{const g=sessionStorage.getItem(`termdock:shared-layout:${e.targetPeerId}`);if(g)return g==="split"}catch{}return r==="split"});y.useEffect(()=>{if(r==="split"){try{if(sessionStorage.getItem(`termdock:shared-layout:${e.targetPeerId}`))return}catch{}f(!0)}},[r,e.targetPeerId]),y.useEffect(()=>{let g=!0,b=!1;const w=async()=>{if(!b){b=!0;try{const v=await e.request({type:"session-list"});g&&(s(v.items),d(""))}catch{g&&(s([]),d("连接暂时中断,请重试"))}try{const v=await e.request({type:"permissions"});g&&a(Array.isArray(v.grants)?qD(v.grants.map(C=>C.resources)):{})}catch{g&&a({})}finally{b=!1}}};w();const E=setInterval(()=>{w()},15e3);return()=>{g=!1,clearInterval(E)}},[e]);const h=o.find(g=>g.sessionId===t||g.sourceSessionId===t)||o[0],p=o.find(g=>g.sessionId!==h?.sessionId),m=u&&!!p;return l.jsxs("div",{className:"flex h-full min-h-0 flex-col bg-[var(--chrome-bg)] text-foreground",children:[o.length>1&&l.jsx("div",{className:"flex shrink-0 justify-end border-b border-border/30 px-2",children:l.jsxs("button",{type:"button","aria-pressed":m,className:"inline-flex min-h-11 items-center gap-2 rounded-lg px-3 text-xs hover:bg-surface-2",onClick:()=>{f(!m);try{sessionStorage.setItem(`termdock:shared-layout:${e.targetPeerId}`,m?"single":"split")}catch{}},children:[l.jsx(Sy,{size:15}),m?"单会话":"分屏查看"]})}),l.jsxs("div",{className:`flex min-h-0 flex-1 ${m?"flex-col lg:flex-row":""}`,children:[l.jsx("section",{className:"min-h-0 min-w-0 flex-1","aria-label":m?"第一个共享会话":"共享会话",children:l.jsx(Pg,{client:e,initialSessionId:m?h?.sessionId:t,initialViewMode:n,sessions:m?o.filter(g=>g.sessionId!==p?.sessionId):o,resources:i,directoryError:c})}),m&&l.jsx("section",{className:"min-h-0 min-w-0 flex-1 border-t border-border lg:border-l lg:border-t-0","aria-label":"第二个共享会话",children:l.jsx(Pg,{client:e,initialSessionId:p.sessionId,initialViewMode:n,sessions:o.filter(g=>g.sessionId!==h?.sessionId),resources:i,directoryError:c})})]})]})}const Ej=String.raw`
16
- ████████ ███████ ██████ ███ ███ ██████ ██████ ██████ ██ ██
17
- ██ ██ ██ ██ ████ ████ ██ ██ ██ ██ ██ ██ ██
18
- ██ █████ ██████ ██ ████ ██ ██ ██ ██ ██ ██ █████
19
- ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
20
- ██ ███████ ██ ██ ██ ██ ██████ ██████ ██████ ██ ██
21
- `;function j0({onLoginSuccess:e,focusEnabled:t=!0,serviceOrigin:n,serviceName:r,entryOrigin:o,entryName:s,onManageServices:i}){const{t:a}=Nt(),[c,d]=y.useState(""),[u,f]=y.useState(!1),[h,p]=y.useState(null),[m,g]=y.useState(0),b=y.useRef(null);y.useEffect(()=>{t&&!u&&m===0&&b.current?.focus()},[t,u,m]),y.useEffect(()=>{if(m<=0)return;const R=setInterval(()=>{g(k=>k>1?k-1:0)},1e3);return()=>clearInterval(R)},[m]);const w=m>0,E=h==="login.passwordNotConfigured"||h==="login.targetPasswordRequired"||h==="login.securityUpgradeRequired",v=t&&!u&&!w&&!E&&c.length>0,C=async R=>{if(R.preventDefault(),!!v){f(!0),p(null);try{const k=await vx(c);if(k.ok){d(""),e();return}p(k.rateLimited||k.reason==="rateLimited"?"login.rateLimited":k.reason==="connectionFailed"?"login.failed":k.reason==="identityMismatch"?"login.identityMismatch":k.reason==="unavailable"?"login.unavailable":k.reason==="authorizationRequired"?"login.authorizationRequired":k.reason==="passwordNotConfigured"?"login.passwordNotConfigured":k.reason==="targetPasswordRequired"?"login.targetPasswordRequired":k.reason==="securityUpgradeRequired"?"login.securityUpgradeRequired":"login.invalidPassword"),k.reason==="passwordNotConfigured"&&d(""),k.rateLimited&&typeof k.retryAfterMs=="number"&&g(Math.max(1,Math.ceil(k.retryAfterMs/1e3)))}catch{p("login.failed")}finally{f(!1)}}},_=w?a("login.placeholderBlocked",{s:m}):a("login.placeholder");return l.jsxs("div",{className:"flex w-screen flex-col items-center justify-center bg-background px-4 text-foreground",style:{height:"var(--app-vh, 100vh)",paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"20vh",gap:"clamp(20px, 4vh, 40px)"},children:[l.jsx("pre",{"aria-hidden":!0,className:"max-w-full select-none overflow-hidden whitespace-pre leading-[1.05] text-primary/80 font-mono",style:{fontSize:"clamp(5px, 2vw, 14px)"},children:Ej}),l.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground font-mono",children:[l.jsx("span",{className:"text-primary",children:"$"}),l.jsx("span",{children:a("login.prompt")}),l.jsx("span",{className:"terminal-cursor","aria-hidden":!0,children:"▍"})]}),l.jsxs("form",{onSubmit:C,className:"w-full max-w-xs",children:[!E&&l.jsxs("div",{className:`flex items-center gap-1 rounded-full border bg-surface-2 p-1 pl-4 transition ${h?"border-destructive/60":"border-border"}`,children:[l.jsx("input",{ref:b,type:"password",autoComplete:"current-password",value:c,placeholder:_,"aria-label":a("login.placeholder"),onChange:R=>{d(R.target.value),h&&p(null)},disabled:!t||u||w,className:"flex-1 bg-transparent text-foreground placeholder:text-muted-foreground/70 focus:outline-none disabled:opacity-60",style:{minWidth:0,fontSize:"16px"}}),l.jsx("button",{type:"submit",disabled:!v,"aria-label":a("login.submit"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground transition hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-40",children:u?l.jsx(Xe,{size:16,className:"animate-spin"}):l.jsx(Qg,{size:16})})]}),h&&!w?l.jsx("div",{role:"alert",className:"mt-3 text-center text-xs text-destructive",children:a(h)}):null]}),(r||n)&&l.jsxs("div",{className:"w-full max-w-xs text-center text-xs leading-5 text-muted-foreground",children:[l.jsx("p",{className:"break-all",title:n,children:a("login.currentTarget",{address:r||new URL(n).host})}),r&&n&&l.jsx("p",{className:"break-all",children:new URL(n).host}),o&&l.jsx("p",{className:"break-all",children:a("login.viaEntry",{entry:s||new URL(o).host,address:new URL(o).host})}),i&&l.jsx("button",{type:"button",disabled:!t||u,className:"mt-1 min-h-11 rounded-lg px-3 text-xs underline underline-offset-4 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary disabled:opacity-50",onClick:i,children:a("login.manageServices")})]}),l.jsx("style",{children:`
22
- @keyframes terminal-blink {
23
- 0%, 49% { opacity: 1; }
24
- 50%, 100% { opacity: 0; }
25
- }
26
- .terminal-cursor {
27
- display: inline-block;
28
- animation: terminal-blink 1.05s steps(1, end) infinite;
29
- color: var(--primary);
30
- }
31
- `})]})}const lc="termdock:open-services";function kj(){window.dispatchEvent(new Event(lc))}function WB(e){window.dispatchEvent(new CustomEvent(lc,{detail:e}))}const Ij={activeKey:"root",items:[]},Cj=()=>()=>{},Rj=()=>Ij,wu="termdock:open-saved-service";function Tj(e,t){try{const n=new URL(e.serviceOrigin||e.url);return e.label!==n.host&&e.label!==n.origin?e.label:!t.some(o=>{const s=new URL(o.serviceOrigin||o.url);return s.hostname===n.hostname&&s.port!==n.port})&&n.port==="9834"?n.hostname:n.host}catch{return e.label}}function VB(e,t,n){y.useEffect(()=>{window.termdockDesktop?.reportServiceActivity?.({runningCount:e,reviewCount:t})},[e,t]),y.useEffect(()=>{fo({runningCount:e,reviewCount:t,attentionSessions:n})},[e,t,n])}function Aj({onReselect:e}){return window.termdockDesktop?null:l.jsx(Pj,{onReselect:e})}function Pj({onReselect:e}){const[t,n]=y.useState([]),[r,o]=y.useState([]),[s,i]=y.useState(se()?.targetPeerId),[a,c]=y.useState(""),[d,u]=y.useState(!1),[f,h]=y.useState(!1),p=y.useRef(0),m=y.useRef(!1);y.useEffect(()=>{let R=!1;const k=()=>{const x=p.current;sr().then(S=>{!R&&!m.current&&x===p.current&&u(S.serviceSwitcherExpanded===!0)}).catch(()=>{})};return k(),window.addEventListener(xt,k),()=>{R=!0,window.removeEventListener(xt,k)}},[]);const g=async()=>{if(m.current)return;const R=d;p.current+=1,m.current=!0,h(!0),u(!R),c("");try{const k=await Gt({serviceSwitcherExpanded:!R});u(k.serviceSwitcherExpanded===!0)}catch{u(R),c("展开状态保存失败,请重试")}finally{m.current=!1,h(!1)}},b=y.useRef(null),w=yn(),E=y.useSyncExternalStore(w?.subscribe||Cj,w?.snapshot||Rj);y.useEffect(()=>{let R=!1,k=0;const x=()=>{const P=++k;i(se()?.targetPeerId),mt().then(T=>{if(!(R||P!==k)){try{const A="termdock-secure-service-order",N=JSON.parse(localStorage.getItem(A)||"[]"),L=Array.isArray(N)?N.filter(M=>typeof M=="string"):[],D=M=>M.targetPeerId||M.id,j=[...L.filter(M=>T.some(F=>D(F)===M)),...T.map(D).filter(M=>!L.includes(M))];T.sort((M,F)=>j.indexOf(D(M))-j.indexOf(D(F)));const B=JSON.stringify(j);B!==localStorage.getItem(A)&&localStorage.setItem(A,B)}catch{}n(T)}}).catch(()=>{})};x();const S=di(x),I=window.termdockDesktop?.onServiceActivity?.(o);return window.addEventListener(xt,x),()=>{R=!0,S(),I?.(),window.removeEventListener(xt,x)}},[]),y.useEffect(()=>{const R=b.current,k=R?.querySelector('[aria-current="page"]');if(!R||!k)return;const x=k.offsetLeft,S=x+k.offsetWidth;x<R.scrollLeft?R.scrollLeft=x:S>R.scrollLeft+R.clientWidth&&(R.scrollLeft=S-R.clientWidth)},[s,t,d]);const v=async R=>{if(c(""),R.targetPeerId&&R.targetPeerId===s){e?.();return}try{const k=window.termdockDesktop;if(k?.openServiceConnection){const x=await k.openServiceConnection(R);if(!x.ok)throw new Error(x.error||"暂时无法打开服务")}else Xa(R)||window.dispatchEvent(new CustomEvent(wu,{detail:R}))}catch(k){c(k instanceof Error?k.message:"暂时无法切换服务")}},C=R=>{const k=E.items.find(S=>S.service?.targetPeerId===R.targetPeerId),x=r.find(S=>S.targetPeerId&&S.targetPeerId===R.targetPeerId||S.origin===(R.serviceOrigin||R.url));return{phase:k?.phase,running:k?.runningCount??x?.runningCount??0,review:k?.reviewCount??x?.reviewCount??0}},_=R=>{const k=C(R);return k.review?l.jsxs("span",{className:"inline-flex shrink-0 items-center gap-0.5 text-[color:var(--warning)]",title:"等待处理",children:[l.jsx(_u,{size:11}),k.review]}):k.phase==="connecting"||k.phase==="reconnecting"?l.jsx(Xe,{size:12,className:"shrink-0 animate-spin","aria-label":"正在连接"}):k.phase==="offline"||k.phase==="login"?l.jsx("span",{className:"shrink-0 text-[color:var(--warning)]",title:k.phase==="login"?"需要登录":"连接已断开",children:"!"}):k.running?l.jsx("span",{className:"shrink-0 text-[color:var(--success)]",title:"运行中",children:k.running}):null};return t.length<=1?null:l.jsxs("div",{className:"min-w-0 shrink-0 bg-[var(--chrome-bg)] px-3 pb-1 md:order-first md:bg-transparent md:pb-0 md:pt-1","data-sidebar-gesture-ignore":!0,children:[l.jsx("button",{type:"button",onClick:()=>{g()},disabled:f,"aria-expanded":d,"aria-label":d?"收起服务切换":"展开服务切换",title:d?"收起服务切换":"展开服务切换",className:"flex h-6 w-full items-center justify-center rounded-lg text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary disabled:opacity-60",children:d?l.jsx(Pr,{size:16}):l.jsx(hy,{size:16})}),d&&l.jsxs("div",{className:"flex w-full items-center gap-1 md:gap-0 md:rounded-xl md:bg-surface md:p-1",children:[l.jsx("nav",{ref:b,"aria-label":"切换服务",className:"relative flex min-w-0 flex-1 gap-0.5 overflow-x-auto overscroll-x-contain md:gap-1 md:rounded-lg [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:t.map(R=>l.jsx("button",{type:"button",onClick:()=>{v(R)},"aria-current":R.targetPeerId===s?"page":void 0,"aria-label":R.label,title:R.label,className:`inline-flex min-h-11 min-w-0 flex-[1_0_auto] items-center justify-center rounded-lg text-[11px] leading-4 transition-colors motion-reduce:transition-none md:min-h-8 ${t.length>3?"md:flex-[0_0_30%]":"md:flex-[1_1_0%]"} focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ${R.targetPeerId===s?"font-medium text-foreground md:bg-surface-elevated":"text-muted-foreground hover:bg-surface hover:text-foreground md:hover:bg-surface-2"}`,children:l.jsxs("span",{className:`inline-flex min-w-0 items-center justify-center gap-1 rounded-lg px-2 py-1.5 ${R.targetPeerId===s?"bg-surface-elevated md:bg-transparent":""}`,children:[l.jsx("span",{className:"max-w-[11rem] truncate md:hidden",children:Tj(R,t)}),l.jsx("span",{className:"hidden truncate md:inline",children:R.label}),_(R)]})},R.id))}),l.jsx("button",{type:"button",onClick:kj,"aria-label":"管理服务",title:"管理服务",className:"inline-flex h-11 w-8 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-surface hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary md:hidden",children:l.jsx(Nr,{size:18})})]}),a&&l.jsx("p",{role:"alert",className:"mt-1 text-[11px] text-[color:var(--warning)]",children:a})]})}function Nj({failure:e,target:t,onSettings:n,onRecovered:r,settingsOpen:o=!1}){const[s,i]=y.useState("notice"),[a,c]=y.useState([]),[d,u]=y.useState(""),[f,h]=y.useState(!1),[p,m]=y.useState("checking"),[g,b]=y.useState(""),[w,E]=y.useState(0),v=y.useRef(null),C=y.useRef(s);C.current=s,y.useLayoutEffect(()=>{v.current?.toggleAttribute("inert",o)},[o]),y.useEffect(()=>()=>{C.current="cancelled"},[]),Si(v,!o,()=>{f||i(s==="notice"?"cancelled":"notice")}),y.useEffect(()=>{let j=!1;return mt().then(B=>{j||c(B)}).catch(()=>{}),()=>{j=!0}},[]);const _=t?.serviceName||a.find(j=>j.targetPeerId===e.context.targetServiceId)?.label||"目标服务",R=e.context.entryServiceId||t?.entryServiceId,k=e.context.entryUrl||(t?.entryServiceId?t.url:void 0),S=a.find(j=>j.targetPeerId===R)?.label||"已保存的入口",I=e.code==="RELAY_AUTHORIZATION_REQUIRED",P=e.code==="TARGET_AUTHORIZATION_REQUIRED",T=e.code==="TARGET_PASSWORD_REQUIRED"||e.code==="TARGET_SECURITY_UPGRADE_REQUIRED",A=JSON.stringify(t);y.useEffect(()=>{if(!P||!A||A==="null")return;const j=new AbortController;return m("checking"),b(""),Wd(JSON.parse(A),j.signal).then(B=>{j.signal.aborted||m(B)}).catch(B=>{j.signal.aborted||b(zn(B).message)}),()=>j.abort()},[P,A,w]);const N=I?`通过“${S}”连接“${_}”需要中转授权`:T?`“${_}”已禁用中转`:P?`“${_}”需要设备访问授权`:e.code==="TARGET_IDENTITY_MISMATCH"?`“${_}”的服务身份不一致`:e.code==="RELAY_SELF_TARGET"?`“${_}”的中转配置指向自身`:`当前权限无法访问“${_}”`,L=async()=>{if(C.current!=="route"&&C.current!=="login")throw new Error("RECOVERY_CANCELLED");await r()},D=async()=>{if(C.current==="login"){u("");try{await L()}catch{u("授权尚未核验通过,请检查连接设置或联系对应服务管理员。")}}};return l.jsx("div",{ref:v,style:o?{visibility:"hidden"}:void 0,"aria-hidden":o?!0:void 0,className:`fixed inset-0 z-modal-panel flex items-center justify-center overflow-auto bg-[var(--chrome-bg)] ${s==="login"?"":"px-6 py-[max(24px,env(safe-area-inset-top))]"}`,children:s==="login"?l.jsxs("div",{className:"h-full w-full",children:[l.jsx(j0,{serviceOrigin:t?Ot(t)[0]:void 0,serviceName:_,entryOrigin:k,entryName:S,focusEnabled:!o,onLoginSuccess:()=>{D()},onManageServices:n}),l.jsx("button",{className:"absolute bottom-[max(24px,env(safe-area-inset-bottom))] left-1/2 min-h-11 -translate-x-1/2 px-4 text-sm text-muted-foreground",onClick:()=>i("notice"),children:"取消"}),d&&l.jsx("p",{role:"alert",className:"absolute bottom-20 left-0 right-0 px-6 text-center text-sm text-destructive",children:d})]}):l.jsxs("section",{className:"w-full max-w-sm","aria-label":"恢复服务访问",children:[l.jsx("h1",{className:"text-base font-medium",role:"alert",children:N}),l.jsx("p",{className:"mt-3 text-sm leading-6 text-muted-foreground",children:s==="cancelled"?I?"已取消中转授权操作。直连恢复后会自动连接;保存的服务、终端和草稿保持不变。":"连接已暂停。保存的服务、终端和草稿保持不变。":I?"此中转路线没有有效授权,已暂停中转重试。直连恢复后会自动连接,不会自动重新授权。":T?e.message:P?g||(p==="checking"?"正在核验目标服务的设备授权与登录方式…":p==="invitationRequired"?"目标服务未配置访问密码,且此设备尚未获得访问授权。请让目标服务管理员发送邀请或授权此设备后重新连接。":p==="authorized"?"已核验目标服务的设备访问授权,可以重新连接。":"此设备尚未获得目标服务的访问授权。请使用目标服务的密码登录,或让目标服务管理员发送邀请。"):"连接已暂停。请核对保存的身份或联系管理员确认具体权限;不会替换身份或扩大授权。"}),(P||T)&&k&&l.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["目标:“",_,"”;经入口“",S,"”(",new URL(k).host,")中转。入口的中转授权不能代替目标服务的访问授权。"]}),s==="route"&&t&&e.context.entryServiceId&&e.context.entryUrl?l.jsx("div",{className:"mt-5",children:l.jsx(w0,{service:{...t,id:t.targetPeerId,label:_},onBusyChange:h,recoverEntry:{targetPeerId:e.context.entryServiceId,url:e.context.entryUrl},onRecovered:L,onCancelRecovery:()=>i("notice")})}):l.jsxs("div",{className:"mt-5 flex flex-col gap-2",children:[s!=="cancelled"&&I&&e.context.entryServiceId&&e.context.entryUrl&&l.jsx("button",{className:"service-button service-primary",onClick:()=>i("route"),children:"重新授权"}),s!=="cancelled"&&P&&p==="passwordRequired"&&!g&&l.jsx("button",{className:"service-button service-primary",onClick:()=>i("login"),children:"登录目标服务"}),s!=="cancelled"&&(T||P&&p==="authorized"&&!g)&&l.jsx("button",{className:"service-button service-primary",disabled:f,onClick:()=>{h(!0),u(""),r().catch(j=>{u(T?zn(j).message:"授权尚未核验通过,请重新检查或联系目标服务管理员。"),E(B=>B+1)}).finally(()=>h(!1))},children:T?"重新检查中转":"重新连接"}),s!=="cancelled"&&P&&(g||p==="invitationRequired")&&l.jsx("button",{className:"service-button service-secondary",disabled:f,onClick:()=>E(j=>j+1),children:"重新检查授权"}),d&&l.jsx("p",{role:"alert",className:"text-sm text-destructive",children:d}),l.jsx("button",{className:"service-button service-secondary",onClick:n,children:"查看连接设置"}),s==="cancelled"&&l.jsx("button",{className:"service-button service-secondary",onClick:()=>i("notice"),children:"返回恢复选项"}),s!=="cancelled"&&l.jsx("button",{className:"service-button service-secondary",onClick:()=>i("cancelled"),children:"取消"})]})]})})}const xs=(()=>{if(location.hash.startsWith("#termdock-invite="))try{return qn(location.href,{httpTransport:location.protocol==="http:"&&!window.termdockDesktop?.openServiceConnection})}catch{return}finally{history.replaceState(null,"",location.pathname+location.search)}})(),bu="termdock-secure-open-session";let sd;function _j(){try{const e=JSON.parse(sessionStorage.getItem(bu)??"null");return e?.serviceId===se()?.targetPeerId?e.sessionId:void 0}catch{return}}function Lj({children:e}){const{t}=Nt(),n=y.useRef(),r=y.useRef(0),o=y.useRef(!1);y.useEffect(()=>{const V=()=>{r.current++};return window.addEventListener("pagehide",V),()=>{V(),window.removeEventListener("pagehide",V)}},[]);const[s,i]=y.useState(),[a,c]=y.useState(xs),[d,u]=y.useState(!1),[f,h]=y.useState(),[p,m]=y.useState(!!xs),g=y.useRef(!!xs),b=y.useRef(0);g.current=!!a&&p;const[w,E]=y.useState(!xs),[v,C]=y.useState(!1),[_,R]=y.useState(),k=y.useRef(),[x,S]=y.useState("正在连接服务…"),[I,P]=y.useState([]),[T,A]=y.useState([]),[N,L]=y.useState([]),[D,j]=y.useState(),[B,M]=y.useState(xs?.viewLayout),[F,$]=y.useState(!1),[H,te]=y.useState(!1),[ne,re]=y.useState(""),[ae,U]=y.useState(!1),[J,Q]=y.useState(""),[ee,Te]=y.useState(se()?.serviceName??location.hostname),q=se(),z=q?.serviceOrigin||q?.url||s?.serviceOrigin||s?.url||location.origin,de=!q||q.targetPeerId===s?.targetPeerId&&(q.serviceOrigin||q.url)===(s?.serviceOrigin||s?.url),he=q?.serviceName||(de?s?.label:void 0)||ee,[Ee,Ae]=y.useState(_j),[Ie,G]=y.useState(!1),le=V=>{if(o.current)return!0;const oe=se(),Y=Mn(V);return!window.termdockDesktop||!Y?.targetPeerId||!oe||oe.targetPeerId===Y.targetPeerId?!1:(o.current=!0,r.current++,u(!1),E(!0),C(!1),m(!1),S("正在恢复此窗口的服务…"),Za(),Pu({...Y,targetPeerId:Y.targetPeerId,serviceName:Y.label}),location.reload(),!0)};y.useEffect(()=>{const V=window.termdockDesktop;if(!V?.getServiceConnection)return;let oe=!1;const Y=async()=>{const ie=JSON.stringify(se()),we=r.current;n.current??=V.getServiceConnection();const K=await n.current;oe||we!==r.current||ie!==JSON.stringify(se())||le(K)},Z=()=>{Y().catch(()=>{})};return Z(),window.addEventListener("focus",Z),window.addEventListener("pageshow",Z),window.addEventListener(xt,Z),()=>{oe=!0,window.removeEventListener("focus",Z),window.removeEventListener("pageshow",Z),window.removeEventListener(xt,Z)}},[]),y.useEffect(()=>{if(!w||v)return;const V=window.setTimeout(()=>G(!0),8e3);return()=>window.clearTimeout(V)},[w,v]),y.useEffect(()=>{(!d&&!w||d&&(!F||Ee))&&fo({rendered:!0})},[d,w,F,Ee]),y.useEffect(()=>{tn().then(V=>re(V.peerId)).catch(()=>C(!0))},[]),y.useEffect(()=>{let V=!1,oe=0;const Y=Z=>{const{origin:ie,sessionId:we}=Z.detail,K=++oe;(async()=>{const ce=(await mt()).filter(xe=>!!xe.targetPeerId);let pe=ce.find(xe=>Ot(xe).some(be=>new URL(be).origin===new URL(ie).origin));if(!pe){const xe=await(await Vt()).fetch("/api/terminal/operations/collaboration-directory",{signal:AbortSignal.timeout(5e3)});if(!xe.ok)throw new Error("暂时无法读取协作服务目录,请重试。");const fe=(await xe.json()).services?.find(ke=>ke.origin===ie&&ke.serviceId);pe=ce.find(ke=>ke.targetPeerId===fe?.serviceId)}if(V||K!==oe)return;if(!pe){m(!0);return}const me=window.termdockDesktop;if(me?.collaborationFocus){const xe=`remote:${encodeURIComponent(ie)}:${encodeURIComponent(we)}`;if(await me.collaborationFocus(xe,pe.targetPeerId))return;if(me.openServiceConnection){const be=await me.openServiceConnection(pe);if(V||K!==oe||be?.ok&&await me.collaborationFocus(xe,pe.targetPeerId))return;throw new Error("目标服务窗口尚未就绪,请重试切换会话。")}}if(yn()?.focusSession(pe.targetPeerId,we))return;const je={...pe,serviceName:pe.label};sessionStorage.setItem(bu,JSON.stringify({serviceId:je.targetPeerId,sessionId:we}));const W=await Yt(je);!V&&K===oe&&(h(W),Ae(we),u(!0))})().catch(ce=>{V||K!==oe||(Q(ce instanceof Error?ce.message:"暂时无法打开远程会话"),m(!0))})};return window.addEventListener("termdock:open-remote-session",Y),()=>{V=!0,window.removeEventListener("termdock:open-remote-session",Y)}},[]);const ue=async(V=5e3)=>{const oe=r.current,Y=se(),Z=fe=>fe?JSON.stringify([fe.targetPeerId,fe.serviceOrigin||fe.url]):"",ie=Z(Y),we=He(),K=await Vt().catch(fe=>{throw oe!==r.current||ie!==Z(se())||we!==He()?new Error("SERVICE_SELECTION_CHANGED"):fe}),ce=()=>oe===r.current&&ie===Z(se())&&K===He();let pe;try{pe=await Kr(K,{timeoutMs:V})}catch(fe){throw ce()?fe:new Error("SERVICE_SELECTION_CHANGED")}if(!ce())throw new Error("SERVICE_SELECTION_CHANGED");const me=window.termdockDesktop?.acknowledgeServiceInvitation,je=n.current;if(me&&je){const fe=await je,ke=()=>oe===r.current&&je===n.current&&K===He()&&!K.closed&&Y===se()&&Y?.targetPeerId===K.targetPeerId&&fe?.targetPeerId===K.targetPeerId;if(fe?.invitation&&ke())try{const Be=await crypto.subtle.digest("SHA-256",new TextEncoder().encode(fe.invitation)),Ne=Array.from(new Uint8Array(Be),gt=>gt.toString(16).padStart(2,"0")).join("");ke()&&await me({targetPeerId:K.targetPeerId,fingerprint:Ne},ke)&&ke()&&(n.current=Promise.resolve({...fe,invitation:void 0}),c(void 0))}catch{}}const W=c2(),xe=ZA()?.targetPeerId;Promise.all([C_(),mt()]).then(([fe,ke])=>{const Be=ke.find(gt=>gt.targetPeerId===xe),Ne=W==="relay"?`经 ${Be?.label||xe?.slice(-12)||"入口服务"} 中转`:"直连";return K.request({type:"device-name",name:jx(),onlyIfMissing:!0,profile:{...fe,route:Ne}})}).catch(()=>{}),h(K),$(pe.fullService),te(pe.canManage),u(!0),E(!1),C(!1),Ls("ready");const be=se();fo({phase:"ready",...be?{service:{...be,id:be.targetPeerId,label:be.serviceName||location.host}}:{}}),Tr()&&a2()};y.useEffect(()=>{let V=!1,oe=!1,Y=0,Z,ie;const we=async()=>{if(V||o.current||oe||g.current||b.current)return;const xe=se();if(Z&&!Vd(xe,Z)||Y&&(document.hidden||!Tr()))return;if(!navigator.onLine){Ls("offline"),E(!0),C(!0),S("网络已断开,恢复后会自动连接"),fo({phase:"offline"});return}oe=!0,clearTimeout(ie);const be=performance.now(),fe=He();try{if(hc&&!se())throw new Error("工作区的服务记录已移除,请重新添加服务。");const ke=()=>{const gt=se();return gt?JSON.stringify([gt.targetPeerId,gt.url,gt.serviceOrigin]):void 0},Be=ke();n.current??=window.termdockDesktop?.getServiceConnection?.();const Ne=await n.current;if(V||o.current)return;if(Ne&&Be===ke()&&(!se()||se()?.targetPeerId===Ne.targetPeerId))try{const gt=ze(Ne.serviceOrigin||Ne.url);i({url:gt,serviceOrigin:gt,label:Ne.label,targetPeerId:Ne.targetPeerId})}catch{}if(Ne?.invitation){c(qn(Ne.invitation)),m(!0),E(!1);return}if(!se()){if(a){E(!1);return}if(sd??=(async()=>{if(Ne?.targetPeerId){await Yt({...Ne,targetPeerId:Ne.targetPeerId,serviceName:Ne.label});return}await t2()})(),await sd,!se()){V||(u(!1),E(!1),C(!1));return}}if(Z&&await l2(),V)return;await ue(fe?.canSwitchTransport?2500:5e3),Z&&(Z=void 0,R(void 0)),Y=0,performance.measure("termdock:connection-ready",{start:be,end:performance.now()})}catch(ke){if(V||g.current||b.current||ke instanceof Error&&ke.message==="SERVICE_SELECTION_CHANGED")return;const Be=_r(ke,{targetServiceId:se()?.targetPeerId});if(Be?.context.targetServiceId&&Be.context.targetServiceId!==se()?.targetPeerId)return;Be?(Z=Be,clearTimeout(ie),ei(Be),R(Be),E(!1),m(!1),C(!1),fo({phase:"login",rendered:!0}),Vd(se(),Be)&&(ie=setTimeout(()=>{we()},300))):(fe&&He()===fe&&Za(),C(!0),E(!0),sd=void 0,S("连接暂未恢复,正在重试…"),Ls(navigator.onLine?"reconnecting":"offline"),fo({phase:"reconnecting"}),Y++,ie=setTimeout(()=>{we()},Math.min(5e3,300*2**Math.min(Y-1,5))),console.debug("[connection] retry",{elapsedMs:Math.round(performance.now()-be),attempt:Y,reason:ke instanceof Error?ke.message:"unknown"}))}finally{oe=!1}};k.current=()=>{Z=void 0,Y=0};const K=()=>{document.visibilityState==="visible"&&Tr()&&we()},ce=K,pe=()=>{Y=0,K()},me=()=>{_e.getState().openLeft(),K()};window.addEventListener(Br,K),window.addEventListener(Kd,me),yn()?.attach(Lc(),window),we(),document.addEventListener("visibilitychange",ce),window.addEventListener("focus",K),window.addEventListener("online",pe),window.addEventListener("offline",K),window.addEventListener("pageshow",K);const je=navigator.connection;je?.addEventListener("change",pe),window.addEventListener("auth:unauthorized",K),window.addEventListener(xt,K);const W=setInterval(K,3e4);return()=>{V=!0,clearTimeout(ie),clearInterval(W),k.current=void 0,window.removeEventListener(Br,K),window.removeEventListener(Kd,me),document.removeEventListener("visibilitychange",ce),window.removeEventListener("focus",K),window.removeEventListener("online",pe),window.removeEventListener("offline",K),window.removeEventListener("pageshow",K),je?.removeEventListener("change",pe),window.removeEventListener("auth:unauthorized",K),window.removeEventListener(xt,K)}},[]);const De=async(V=[])=>{const oe=He();if(oe){U(!0),Q("");try{let Y=await oe.request({type:"session-list"});if(H&&V.length){const Z=Y.items,ie=[...new Set(V)].filter(we=>!Z.some(K=>K.sessionId===we||K.sourceSessionId===we));for(const we of ie)if(!(await oe.fetch("/api/terminal/session-inventory/open",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferredFrontendSessionId:we,requireExisting:!0})})).ok)throw new Error("SHARE_SESSION_UNAVAILABLE");ie.length&&(Y=await oe.request({type:"session-list"}))}L(Y.items)}catch(Y){Q(Y instanceof Error&&Y.message==="SHARE_SESSION_UNAVAILABLE"?"此会话暂时无法分享,请确认终端仍在运行后重试。":"暂时无法读取终端列表,请重试。")}try{if(H){const Y=await oe.request({type:"grants-list"});A(Y.invitations??[]);const Z=Y.subjectLabels??{},ie=await oe.request({type:"route-access"}),we=await mt(),K=(Array.isArray(ie.grants)?ie.grants:[]).map(ce=>({id:`route:${ce.id}`,subjectId:ce.subjectId,scope:{kind:"service"},actions:["route.use"],routeTargetServiceId:ce.targetServiceId,routeTargetName:we.find(pe=>pe.targetPeerId===ce.targetServiceId)?.label||"指定服务",...ce.active?{}:{revokedAt:ce.revokedAt??0}}));P([...Y.grants,...K].map(ce=>({...ce,label:Z[ce.subjectId],deviceProfile:Y.deviceProfiles?.[ce.subjectId]})))}else{A([]);const Y=await oe.request({type:"permissions"});P(Y.grants??[])}}catch{Q("暂时无法读取设备权限,请重试。")}finally{U(!1)}}};y.useEffect(()=>{const V=oe=>{const Y=oe.detail;j(Y),m(!0),d&&De(Y?.inviteSessionIds||(Y?.inviteSessionId?[Y.inviteSessionId]:[]))};return window.addEventListener(lc,V),()=>window.removeEventListener(lc,V)},[d,H]);const[ge,We]=y.useState([]),ye=y.useRef(),Ge=y.useRef();y.useEffect(()=>{if(!p||!H)return;let V=!1;return ye.current=void 0,We([]),Ge.current=(async()=>{const oe=await Vt(),Z=await(await oe.fetch("/api/terminal/settings")).json();if(V)return;const ie=Z.localAccess??{},we=[],K=[],ce=(pe,me)=>{try{const je=new URL(pe);if(je.protocol==="http:"&&!["localhost","127.0.0.1","[::1]"].includes(je.hostname))return;const W=je.origin;if(K.push(W),W===location.origin||we.some(xe=>xe.url===W))return;we.push({url:W,label:me})}catch{}};if(ie.status==="active"&&typeof ie.url=="string"&&ce(ie.url,"服务域名"),Array.isArray(ie.interfaces))for(const pe of ie.interfaces){const me=pe;typeof me.url=="string"&&ce(me.url,typeof me.label=="string"&&me.label||typeof me.name=="string"&&me.name||"IP 地址")}We(we),ye.current=typeof ie.onboardingUrl=="string"&&typeof ie.caFingerprint=="string"&&ie.status!=="loopback-only"?{serviceId:oe.targetPeerId,url:ie.onboardingUrl,fingerprint:ie.caFingerprint,origins:K}:void 0})().catch(()=>{}),()=>{V=!0}},[p,H,z]);const Oe=async V=>{const oe=window.termdockDesktop;if(!oe?.openServiceConnection||!V.targetPeerId)return!1;const Y=r.current;n.current??=oe.getServiceConnection?.();const Z=await n.current;if(Y!==r.current)throw new Error("SERVICE_SELECTION_CHANGED");if(le(Z))return!0;const ie=S_(V),we=se(),K=Z||(we?{...we,id:we.targetPeerId,label:we.serviceName||""}:void 0);return!K||sn(K,ie.connection)?!1:(await su(oe,ie.connection,ie.invitation),m(!1),!0)},kt=async V=>{b.current++;try{if(await Oe(V))return;if(!V.pairingCode&&!V.routeCode&&se()?.targetPeerId!==V.targetPeerId&&yn()){const oe={...V,id:V.targetPeerId,label:V.serviceName||new URL(V.serviceOrigin||V.url).host};if(await Bn(oe),Xa(oe)){m(!1);return}}await Yt(V),M(V.viewLayout);try{sessionStorage.setItem(`termdock:shared-layout:${V.targetPeerId}`,V.viewLayout||"single")}catch{}if(V.viewMode)try{sessionStorage.setItem(`termdock:shared-view:${V.targetPeerId}`,V.viewMode)}catch{}Ae(void 0),sessionStorage.removeItem(bu),Te(V.serviceName??new URL(V.url).hostname),await ue(),R(void 0),k.current?.(),n.current&&(n.current=n.current.then(oe=>oe?{...oe,invitation:void 0}:null)),c(void 0),m(!1),C(!1)}finally{b.current--}},_t=async(V,oe)=>{await Oe(V)||(await rm(V,oe),_?await Lt():await ue(),m(!1))},et=async V=>{const oe=window.termdockDesktop;if(oe?.openServiceConnection){n.current??=oe.getServiceConnection?.();const Y=await n.current;if(Y&&sn(Y,V)&&le(Y))return;await su(oe,V),m(!1);return}if(Xa(V)){m(!1);return}if(V.targetPeerId)try{await kt({...V,targetPeerId:V.targetPeerId,serviceName:V.label});return}catch(Y){if(!(Y instanceof jt))throw Y}return em(V.serviceOrigin||V.url)};y.useEffect(()=>{const V=oe=>{et(oe.detail).catch(Y=>{m(!0),Q(Y instanceof Error?Y.message:"暂时无法打开服务")})};return window.addEventListener(wu,V),()=>window.removeEventListener(wu,V)});const tt=async(V,oe)=>{if(window.termdockDesktop?.openServiceConnection){await k_(window.termdockDesktop,V),m(!1);return}if(V.includes("#termdock-invite=")){if(new URL(V).protocol==="http:"&&new URL(V).origin!==location.origin){location.assign(V);return}const Y=qn(V,{httpTransport:location.protocol==="http:"});if(oe!==void 0&&Y.routeOnly){await rm(Y,oe),await ue(),m(!1);return}try{await kt(Y)}catch(Z){if(Y.routeOnly&&Z instanceof jt)return{passwordRequired:!0};throw Z}return}return em(ze(V),oe)},it=async V=>{const oe=await Vt();await Ge.current;const{includeBackup:Y=!0,entryAddress:Z,viewMode:ie,viewLayout:we,...K}=V,ce=se(),pe=ce?Qt(ce):[];let me;if(Y&&pe.length){for(const Be of pe)try{const Ne=await tx({...ce,targetPeerId:oe.targetPeerId},Be);me={...Be,routeCode:Ne.routeCode};break}catch{}if(!me)throw new Error("无法分享备用连接:需要入口管理员授权。也可以关闭此选项,生成直接连接邀请。")}let je=ce?.serviceOrigin||ce?.url||location.origin;if(Z)try{je=new URL(Z).origin}catch{throw new Error("邀请接入地址无效。")}if(ie&&K.scope.kind==="sessions"){for(const Be of K.scope.sessionIds)if(!(await oe.fetch(`/api/terminal/${encodeURIComponent(Be)}/view-mode`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:ie})})).ok)throw new Error("无法保存邀请的默认显示方式,请重试")}const W=await oe.request({type:"invite-create",...K});if(typeof W.code!="string"||typeof W.expiresAt!="number")throw new Error("暂时无法生成邀请。");window.dispatchEvent(new Event("termdock:sharing-changed")),await De();let xe=Bf({viewMode:ie,viewLayout:we,v:1,serviceId:oe.targetPeerId,code:W.code,entryUrl:me?.url||je,serviceUrl:je,name:ee,entryServiceId:me?.targetPeerId,routeCode:me?.routeCode});const be=ye.current,fe=new URL(je).hostname,ke=fe.endsWith(".local")||/^(?:192\.168\.|10\.|172\.(?:1[6-9]|2\d|3[01])\.)/.test(fe)||fe.startsWith("[fd")||fe.startsWith("[fc");if(!me&&ke&&be?.serviceId===oe.targetPeerId&&be.origins.includes(new URL(je).origin))try{xe=x_(xe,be.url)}catch{throw new Error("证书引导地址暂不可用,请重新打开分享后重试。")}return{id:typeof W.invitationId=="string"?W.invitationId:void 0,url:xe,...xe.startsWith("http:")&&be?{certificateFingerprint:be.fingerprint}:{},expiresAt:W.expiresAt}},Lt=async(V=se()?.targetPeerId)=>{if(V!==se()?.targetPeerId)throw new Error("SERVICE_SELECTION_CHANGED");JA();try{await ue(),k.current?.(),R(void 0)}catch(oe){const Y=_r(oe,{targetServiceId:se()?.targetPeerId});throw Y&&(ei(Y),R(Y)),oe}};return l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"h-full min-h-0",style:_?{visibility:"hidden"}:void 0,ref:V=>V?.toggleAttribute("inert",!!_),"aria-hidden":_?!0:void 0,children:d?F&&!Ee?e:l.jsx(Sj,{client:f,initialSessionId:Ee,initialViewLayout:B||se()?.viewLayout,initialViewMode:se()?.viewMode}):_?null:w&&!v&&!p?l.jsx(Mf,{status:Ie?"连接时间较长,仍在等待服务…":x,detail:Ie?he:void 0,actionLabel:Ie?"管理服务":void 0,onAction:()=>m(!0)}):w?l.jsx("div",{className:"flex h-full min-h-0 flex-col items-center justify-center bg-[var(--chrome-bg)] px-6 text-foreground",children:l.jsxs("div",{className:"flex w-full max-w-xs flex-col items-center text-center",children:[l.jsx("div",{className:"mb-5 flex h-12 w-12 items-center justify-center rounded-2xl bg-surface-2 text-muted-foreground","aria-hidden":"true",children:l.jsx(uw,{size:24,strokeWidth:1.5})}),l.jsx("h1",{className:"max-w-full truncate text-base font-medium tracking-tight",title:he,children:he}),l.jsxs("div",{role:"status",className:"mt-2 flex max-w-full items-center justify-center gap-2 text-xs leading-5 text-muted-foreground",children:[!v&&l.jsx(Xe,{size:13,className:"shrink-0 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),l.jsx("span",{children:x})]}),v&&l.jsx("p",{className:"mt-2 text-xs leading-5 text-muted-foreground",children:t(se()?"login.savedConnectionRetained":"login.continueAfterReconnect")}),l.jsx("button",{type:"button",className:"mt-6 min-h-11 rounded-lg px-4 text-xs text-muted-foreground transition-colors hover:bg-surface-2 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",onClick:()=>m(!0),children:"管理服务"})]})}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"fixed left-0 right-0 top-[var(--safe-top-inset)] z-chrome sm:right-auto sm:w-72",children:l.jsx(Aj,{})}),l.jsx(j0,{serviceOrigin:z,onManageServices:()=>m(!0),focusEnabled:!p,onLoginSuccess:()=>{ue().catch(()=>C(!0))}})]})}),_&&l.jsx(Nj,{failure:_,target:se(),settingsOpen:p,onRecovered:()=>Lt(_.context.targetServiceId),onSettings:()=>m(!0)},JSON.stringify([_.code,_.context])),p&&l.jsx(PD,{initialShareSessionId:D?.inviteSessionId,initialShareSessionIds:D?.inviteSessionIds,initialViewLayout:D?.viewLayout,initialViewMode:D?.viewMode,onConnect:kt,onClose:()=>{m(!1),j(void 0)},onAddService:tt,onOpenService:et,onConnectWithPassword:_t,paired:d||!!se(),initialInvite:a,initialServicePage:_&&se()?{kind:_.code==="RELAY_AUTHORIZATION_REQUIRED"?"routes":"edit",service:{...se(),id:se().targetPeerId,label:he}}:void 0,currentServiceName:he,currentServiceId:He()?.targetPeerId||se()?.targetPeerId,currentServiceOrigin:z,currentIdentity:ne,grants:I,sessions:N,loading:ae,loadError:J,onRetry:()=>{De()},onRename:async(V,oe)=>{await(await Vt()).request({type:"device-name",subjectId:V,name:oe}),await De()},hasBackup:!!se()&&Qt(se()).length>0,inviteAddresses:ge,onCreateInvite:H?it:void 0,invitations:H?T:[],onRevokeInvitation:H?async V=>{try{if((await(await Vt()).request({type:"invite-revoke",invitationId:V})).revoked!==!0)throw new Error("INVITATION_NOT_PENDING")}finally{await De()}}:void 0,onRevoke:H?async V=>{await(await Vt()).request(V.startsWith("route:")?{type:"route-revoke",grantId:V.slice(6)}:{type:"revoke",grantId:V}),await De()}:void 0})]})}function Dj(e,t,n){const r=e?.name||"Error",o=e?.message||"Unexpected error";return["Termdock error report",`Time: ${n.capturedAt}`,`URL: ${n.url}`,`User agent: ${n.userAgent}`,"",`${r}: ${o}`,e?.stack?`
32
- Stack:
33
- ${e.stack}`:"",t?`
34
- React component stack:
35
- ${t.trim()}`:""].filter(Boolean).join(`
36
- `)}async function jj(e){try{if(navigator.clipboard?.writeText)return await navigator.clipboard.writeText(e),!0}catch{}const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select();try{return document.execCommand("copy")}catch{return!1}finally{t.remove()}}function Oj({error:e,componentStack:t}){const{t:n}=Nt(),[r,o]=Ut.useState("idle"),s=async()=>{const i=Dj(e,t,{url:window.location.href,userAgent:navigator.userAgent,capturedAt:new Date().toISOString()});o(await jj(i)?"copied":"failed")};return l.jsx("div",{className:"flex h-full items-center justify-center p-4",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 text-center max-w-md",children:[l.jsx("div",{className:"w-12 h-12 rounded-full bg-destructive/10 flex items-center justify-center",children:l.jsx("svg",{className:"w-6 h-6 text-destructive",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:l.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),l.jsxs("div",{className:"space-y-1",children:[l.jsx("h3",{className:"font-medium text-foreground",children:n("errorBoundary.title")}),l.jsx("p",{className:"text-sm text-muted-foreground",children:e?.message||n("errorBoundary.unexpected")})]}),l.jsxs("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:[l.jsx("button",{type:"button",onClick:()=>{s()},className:"rounded-full bg-surface-2 px-5 py-2.5 text-sm font-medium text-foreground ring-1 ring-border/15 transition hover:bg-surface-elevated active:scale-[0.97]",children:n(r==="copied"?"errorBoundary.copied":r==="failed"?"errorBoundary.copyFailed":"errorBoundary.copyDetails")}),l.jsx("button",{type:"button",onClick:()=>window.location.reload(),className:"rounded-full bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground shadow-sm transition-all hover:bg-primary/90 active:scale-[0.97]",children:n("errorBoundary.retry")})]})]})})}class Mj extends Ut.Component{state={hasError:!1,error:null,componentStack:""};static getDerivedStateFromError(t){return{hasError:!0,error:t,componentStack:""}}componentDidCatch(t,n){console.error("Terminal error caught by boundary:",t,n),this.setState({componentStack:n.componentStack??""})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:l.jsx(Oj,{error:this.state.error,componentStack:this.state.componentStack}):this.props.children}}const Bj=1e3,Fj=2e4,Uj=9e4,Hj=5e3,Pe={ws:null,listeners:new Set,reconnectAttempt:0,reconnectTimer:null,idleCloseTimer:null,closing:!1};let sa=0,No=null;function $j(){return typeof window>"u"?null:`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/api/control/ws`}function O0(){Pe.idleCloseTimer&&(clearTimeout(Pe.idleCloseTimer),Pe.idleCloseTimer=null)}function zj(){O0(),!(Pe.ws&&Pe.ws.readyState===WebSocket.OPEN)&&(Pe.idleCloseTimer=setTimeout(()=>{Pe.idleCloseTimer=null,Pe.listeners.size===0&&qj()},Hj))}function qj(){if(Pe.ws){try{Pe.ws.close()}catch{}Pe.ws=null}No&&(clearInterval(No),No=null)}function Ng(){if(Pe.reconnectTimer)return;const e=Math.min(Bj*Math.pow(2,Pe.reconnectAttempt),Fj);Pe.reconnectAttempt+=1,Pe.reconnectTimer=setTimeout(()=>{Pe.reconnectTimer=null,M0()},e)}function M0(){const e=$j();if(!e||Pe.ws&&Pe.ws.readyState===WebSocket.OPEN)return;let t;try{t=ex(e)}catch{Ng();return}Pe.ws=t,t.onopen=()=>{Pe.reconnectAttempt=0,sa=Date.now(),No||(No=setInterval(()=>{if(!(!Pe.ws||Pe.ws.readyState!==WebSocket.OPEN)&&sa>0&&Date.now()-sa>Uj)try{Pe.ws.close()}catch{}},3e4),No.unref?.())},t.onmessage=n=>{sa=Date.now();let r=null;try{r=JSON.parse(n.data)}catch{return}if(!r)return;if(r.type==="session-notice"){if(typeof r.id!="string"||typeof r.sessionId!="string"||typeof r.sessionName!="string"||typeof r.message!="string"||!r.message.trim()||r.message.length>4e3||r.title!==void 0&&(typeof r.title!="string"||r.title.length>120)||typeof r.createdAt!="number")return;const i=r;for(const a of Pe.listeners)try{a(i)}catch(c){console.error("[clientStateSync] listener threw:",c)}return}if(r.type==="chat-attention"&&Array.isArray(r.sessions)){const i={type:"chat-attention",sessions:r.sessions};for(const a of Pe.listeners)try{a(i)}catch{}return}if(r.type==="update-state"){const i=r.state;if(!i||typeof i.status!="string"||typeof i.currentVersion!="string")return;const a={type:"update-state",state:i};for(const c of Pe.listeners)try{c(a)}catch(d){console.error("[clientStateSync] listener threw:",d)}return}if(r.type==="server-health"){const i=r.state;if(!i||typeof i.attention!="boolean"||typeof i.supervised!="boolean")return;const a={type:"server-health",state:i};for(const c of Pe.listeners)try{c(a)}catch(d){console.error("[clientStateSync] listener threw:",d)}return}if(r.type==="context-draft"){if(typeof r.text!="string")return;const i={type:"context-draft",text:r.text,updatedAt:typeof r.updatedAt=="number"?r.updatedAt:Date.now(),origin:typeof r.origin=="string"?r.origin:null};for(const a of Pe.listeners)try{a(i)}catch(c){console.error("[clientStateSync] listener threw:",c)}return}if(r.type==="pinned-explorer-roots"){if(!r.pinnedExplorerRoots||typeof r.pinnedExplorerRoots!="object"||Array.isArray(r.pinnedExplorerRoots))return;const i={type:"pinned-explorer-roots",pinnedExplorerRoots:r.pinnedExplorerRoots,updatedAt:typeof r.updatedAt=="number"?r.updatedAt:Date.now(),origin:typeof r.origin=="string"?r.origin:null};for(const a of Pe.listeners)try{a(i)}catch(c){console.error("[clientStateSync] listener threw:",c)}return}if(r.type==="config-updated"){if(r.key!=="toolbar-presets"&&r.key!=="agent-rules"&&r.key!=="program-detection")return;const i={type:"config-updated",key:r.key,updatedAt:typeof r.updatedAt=="number"?r.updatedAt:void 0};for(const a of Pe.listeners)try{a(i)}catch(c){console.error("[clientStateSync] listener threw:",c)}return}if(r.type!=="client-state"||!r.state)return;const o=r.state,s={type:"client-state",clientState:{sessions:Array.isArray(o.sessions)?o.sessions:[],updatedAt:typeof o.updatedAt=="number"?o.updatedAt:Date.now()},inventory:r.inventory,seq:typeof r.seq=="number"?r.seq:void 0};for(const i of Pe.listeners)try{i(s)}catch(a){console.error("[clientStateSync] listener threw:",a)}},t.onclose=()=>{Pe.ws===t&&(Pe.ws=null),Pe.listeners.size>0&&Ng()},t.onerror=()=>{}}function Kj(e){return Pe.listeners.add(e),O0(),Pe.ws||M0(),()=>{Pe.listeners.delete(e),Pe.listeners.size===0&&zj()}}const id=dr(e=>({unread:{},viewing:null,receive:(t,n)=>e(r=>{const o=r.unread[t]??[];return r.viewing===t||o.includes(n)?r:{unread:{...r.unread,[t]:[...o,n]}}}),view:t=>e(n=>{if(!t||!n.unread[t])return n.viewing===t?n:{viewing:t};const r={...n.unread};return delete r[t],{viewing:t,unread:r}})}));function Gj(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const{useRef:Wj}=Ut;function Vj(e){const t=Wj();return n=>{const r=e(n);return Gj(t.current,r)?t.current:t.current=r}}function B0(e,t){return`termdock:chat-viewed:${se()?.targetPeerId||location.origin}:${e}:${t}`}function _g(e,t){try{const n=JSON.parse(localStorage.getItem(B0(e,t.conversationId))||"[]");return new Set(Array.isArray(n)?n.filter(r=>typeof r=="string"):[])}catch{return new Set}}function Lg(e,t,n){try{localStorage.setItem(B0(e,t.conversationId),JSON.stringify(t.messageIds.filter(r=>n.has(r))))}catch{}}const _n=new Map,qs=()=>se()?.targetPeerId||location.origin;async function nh(e,t){if(t.running||!t.ids.size||qs()!==t.scope)return;clearTimeout(t.timer),t.timer=void 0,t.running=!0;const n=[...t.ids].slice(0,100),r=He();try{const o=await fetch(`/api/terminal/${encodeURIComponent(t.sessionId)}/chat/viewed`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({conversationId:t.conversationId,messageIds:n}),signal:AbortSignal.timeout(15e3)});if(!o.ok){if([400,401,403,404,409].includes(o.status)){_n.delete(e);return}throw new Error("Viewing acknowledgement unavailable")}const s=await o.json();if(_n.get(e)!==t)return;if(qs()!==t.scope||He()!==r)throw new Error("Viewing context changed");if(!s.chatIndex||s.chatIndex.conversationId!==t.conversationId||!Array.isArray(s.chatIndex.viewedMessageIds))throw new Error("Invalid viewing acknowledgement");const i=new Set(s.chatIndex.viewedMessageIds),a=new Set(s.chatIndex.messageIds);let c=!1;for(const d of n)i.has(d)||!a.has(d)?t.ids.delete(d):c=!0;t.failures=c?t.failures+1:0,qs()===t.scope&&t.apply(s.chatIndex)}catch{t.failures++}finally{t.running=!1,_n.get(e)===t&&(t.ids.size?t.timer=setTimeout(()=>{t.timer=void 0,nh(e,t)},t.failures?Math.min(3e4,1e3*2**Math.min(5,t.failures-1)):0):_n.delete(e))}}function Dg(e,t,n,r){if(!n.length||t.viewedMessageIds===void 0)return;const o=qs(),s=`${o}:${e}:${t.conversationId}`;let i=_n.get(s);i||(i={sessionId:e,conversationId:t.conversationId,scope:o,ids:new Set,apply:r,running:!1,failures:0},_n.set(s,i)),i.apply=r;for(const a of n)i.ids.add(a);if(!i.running&&!i.timer){const a=i;i.timer=setTimeout(()=>{a.timer=void 0,nh(s,a)},0)}}function Yj(){for(const e of _n.values())clearTimeout(e.timer);_n.clear()}if(typeof window<"u"){const e=()=>{for(const[t,n]of _n)qs()===n.scope&&nh(t,n)};window.addEventListener("online",e),window.addEventListener("termdock:secure-ready",e),window.addEventListener("auth:unauthorized",Yj)}const Xj=256*1024,Jj=256*1024,Zj=128;function jg(e,t=Xj){if(!e)return[];if(e.length<=t)return[e];const n=[];let r=0;for(;r<e.length;){let o=Math.min(r+t,e.length);if(o<e.length){const s=e.lastIndexOf(`
37
- `,o);s>r&&(o=s+1)}n.push(e.slice(r,o)),r=o}return n}function Qj(e,t=Jj,n=Zj){const r=new Map;let o=0,s=0;for(const i of[...e.keys()]){const a=e.get(i);if(!a||a.length===0){e.delete(i);continue}const c=[];for(;a.length>0;){const d=a[0];if(s>0&&(s>=n||o+d.length>t))break;a.shift(),c.push(d),o+=d.length,s+=1}if(c.length>0&&r.set(i,c),e.delete(i),a.length>0&&e.set(i,a),s>=n||o>=t)break}return r}async function F0(e,t=!1,n="termdock-encrypted-background"){const r=await new Promise((o,s)=>{const i=indexedDB.open(n,1);i.onupgradeneeded=()=>i.result.createObjectStore("state"),i.onsuccess=()=>o(i.result),i.onerror=()=>s(i.error)});try{return await new Promise((o,s)=>{const i=r.transaction("state",t?"readwrite":"readonly"),a=e(i.objectStore("state"));i.oncomplete=()=>o(a.result),i.onabort=i.onerror=()=>s(i.error)})}finally{r.close()}}const eO=e=>F0(t=>t.put(e,e.targetPeerId),!0),tO=e=>F0(t=>t.delete(e),!0),U0="termdock-pwa-notifications-enabled",H0="termdock-pwa-ai-notifications-enabled",$0="termdock-pwa-exit-notifications-enabled",z0="termdock-pwa-notification-alert-style",nO="termdock-notification-claim:",vu=5e3,rO=1500,xu="termdock-push-last-sync",Og=360*60*1e3,oO=10080*60*1e3,Ks=new Map;function rh(){return ft()?!0:typeof window<"u"&&typeof Notification<"u"&&"serviceWorker"in navigator&&window.isSecureContext}function sO(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function iO(){return typeof window>"u"?!1:!!(window.matchMedia("(display-mode: standalone)").matches||"standalone"in navigator&&navigator.standalone===!0)}function aO(){return ft()?!0:!(!rh()||sO()&&!iO())}function YB(){return ft()?"granted":typeof Notification>"u"?"unsupported":Notification.permission}function oh(){if(typeof window>"u")return!1;try{return window.localStorage.getItem(U0)==="true"}catch{return!1}}function XB(e){if(!(typeof window>"u"))try{window.localStorage.setItem(U0,String(e))}catch{}}function dc(){if(typeof window>"u")return!0;try{const e=window.localStorage.getItem(H0);return e===null?!0:e==="true"}catch{return!0}}function JB(e){if(!(typeof window>"u"))try{window.localStorage.setItem(H0,String(e))}catch{}}function Su(){if(typeof window>"u")return!1;try{return window.localStorage.getItem($0)==="true"}catch{return!1}}function ZB(e){if(!(typeof window>"u"))try{window.localStorage.setItem($0,String(e))}catch{}}function ri(){if(typeof window>"u")return"normal";try{const e=window.localStorage.getItem(z0);if(e==="quiet"||e==="persistent")return e}catch{}return"normal"}function QB(e){if(!(typeof window>"u"))try{window.localStorage.setItem(z0,e)}catch{}}async function e3(){return ft()?"granted":rh()?Notification.permission==="default"?Notification.requestPermission():Notification.permission:"unsupported"}function cO(){return typeof document>"u"?!0:document.visibilityState==="visible"&&document.hasFocus()}function lO(e){for(const[t,n]of Ks)e-n>vu&&Ks.delete(t)}function dO(e){return e.dedupKey?.trim()?e.dedupKey.trim():e.tag?.trim()?e.tag.trim():[e.data?.sessionId,e.title,e.body].filter(t=>typeof t=="string"&&t.trim().length>0).map(t=>t.trim()).join("|")}function uO(e){const t=dO(e);if(!t)return!0;const n=Date.now();lO(n);const r=Ks.get(t)??0;if(n-r<vu)return!1;try{if(typeof window<"u"&&window.localStorage){const o=`${nO}${t}`,s=Number(window.localStorage.getItem(o)??"0");if(Number.isFinite(s)&&n-s<vu)return Ks.set(t,s),!1;Number.isFinite(s)&&s>0&&window.localStorage.removeItem(o),window.localStorage.setItem(o,String(n))}}catch{}return Ks.set(t,n),!0}async function Mc(){if(typeof navigator>"u"||!("serviceWorker"in navigator))return null;try{const e=await navigator.serviceWorker.getRegistration()??null;return e?.active?e:await Promise.race([navigator.serviceWorker.ready,new Promise(n=>{window.setTimeout(()=>n(null),rO)})])??e}catch{return null}}function fO(e){const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),r=window.atob(n),o=new Uint8Array(new ArrayBuffer(r.length));for(let s=0;s<r.length;s+=1)o[s]=r.charCodeAt(s);return o}async function sh(e,t){const n=await fetch("/api/csrf-token");if(!n.ok)throw new Error("Unable to get notification security token");const{csrfToken:r}=await n.json();return fetch(`/api/notifications/${e}`,{method:"POST",headers:{"Content-Type":"application/json","X-XSRF-TOKEN":r},body:JSON.stringify(t)})}async function hO(e=!1,t=!1){if(ft())return!0;if(!oh()||!aO()||Notification.permission!=="granted")return!1;const n=await Mc();if(!n?.pushManager)return!1;try{const r=await fetch("/api/notifications/status");if(!r.ok)return!1;const o=await r.json();let s=await n.pushManager.getSubscription();const i=!!(s?.expirationTime&&s.expirationTime-Date.now()<oO);if(!s)try{s=await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:fO(o.publicKey)})}catch(u){return console.warn(`[PWA notifications] Push subscription missing; re-subscribe failed${t?" (user gesture)":""}:`,u),!1}const a=Number(window.localStorage.getItem(xu)??"0"),c=!o.subscription||o.subscription.endpoint!==s.endpoint||Date.now()-(o.subscription.updatedAt??0)>=Og;if(e||c||Date.now()-a>=Og||i){if(!(await sh("subscribe",{subscription:s.toJSON(),aiEnabled:dc(),exitEnabled:Su(),alertStyle:ri(),locale:navigator.language})).ok)return!1;window.localStorage.setItem(xu,String(Date.now()))}const d=se();return d&&await eO({targetPeerId:d.targetPeerId,addresses:Ot(d),routes:Qt(d),publicKey:o.publicKey,preferences:{aiEnabled:dc(),exitEnabled:Su(),alertStyle:ri(),locale:navigator.language}}),!0}catch(r){return console.warn("[PWA notifications] Push subscription sync failed:",r),!1}}async function t3(){if(ft())return;const t=await(await Mc())?.pushManager?.getSubscription();try{await sh("unsubscribe",{endpoint:t?.endpoint})}finally{const n=se();n&&await tO(n.targetPeerId),await t?.unsubscribe();try{window.localStorage.removeItem(xu)}catch{}}}async function n3(){if(ft()||!oh())return;(await sh("preferences",{aiEnabled:dc(),exitEnabled:Su(),alertStyle:ri(),locale:navigator.language})).status===404&&await hO(!0)}async function r3(){if(!ft())try{const e=navigator;typeof e.clearAppBadge=="function"&&await e.clearAppBadge()}catch{}}async function o3(e){if(!ft())try{const t=await Mc();if(!t||typeof t.getNotifications!="function")return;const n=await Promise.all(["agent","exit"].map(o=>t.getNotifications({tag:`${o}:${e}`})));for(const o of n.flat())o.close();const r=navigator;if(typeof r.setAppBadge=="function"){const o=await t.getNotifications();await r.setAppBadge(o.length)}}catch{}}async function ad(e){if(!oh()||!rh())return!1;if(e.requireHidden!==!1&&cO())return!0;const t=ft();if(t){const s=e.alertStyle??ri(),i=await t.showNotification({title:e.title,body:e.body,tag:e.tag,sessionId:e.data?.sessionId,silent:s==="quiet",persistent:s==="persistent"});return t.notificationDeliveryConfirmation===!0&&i}if(Notification.permission!=="granted")return!1;const n=await Mc();if(e.deferToPush&&await n?.pushManager?.getSubscription())return!0;if(e.requireHidden!==!1){if(await n?.pushManager?.getSubscription())return!0}if(!uO(e))return!0;const r=e.alertStyle??ri(),o={body:e.body,tag:e.tag,icon:"/pwa-192x192.png",badge:"/maskable-icon-512x512.png",requireInteraction:r==="persistent",renotify:r==="persistent"?!!e.tag:!1,silent:r==="quiet",vibrate:r==="quiet"?[]:[80,40,80],data:{url:e.data?.url??"/",sessionId:e.data?.sessionId}};try{if(n&&typeof n.showNotification=="function")return await n.showNotification(e.title,o),!0;const s=new Notification(e.title,o);return s.onclick=()=>{window.focus(),e.data?.url&&window.location.href!==e.data.url&&window.location.assign(e.data.url),s.close()},!0}catch(s){if(s instanceof DOMException&&s.name==="NotSupportedError"&&o.renotify)try{const i={...o,renotify:!1};return n&&typeof n.showNotification=="function"?await n.showNotification(e.title,i):new Notification(e.title,i),!0}catch(i){return console.warn("[PWA notifications] Failed to show notification (renotify fallback):",i),!1}return console.warn("[PWA notifications] Failed to show notification:",s),!1}}function pO(){try{return localStorage.getItem("termdock:locale")||"en"}catch{return"en"}}function mO(e,t){return e==="zh"?{waitingTitle:`${t} 需要你的处理`,waitingBody:`${t} 需要你的处理。`,doneTitle:`${t} 已完成`,doneBody:`${t} 已完成,点按查看结果。`,exitedTitle:`${t} 已退出`,exitedBody:`${t} 已退出,点按查看结果。`}:{waitingTitle:`${t} needs your input`,waitingBody:`${t} is waiting for your input.`,doneTitle:`${t} finished`,doneBody:"Tap to see the result.",exitedTitle:`${t} exited`,exitedBody:"Tap to see the result."}}const Mg=1e6;function qt(e){return{sessionId:e,directory:"",terminalSessionId:null,mode:"shell",tmuxSessionName:null,activeProgram:null,activeProgramRaw:null,activeProgramSource:null,cwd:null,inCopyMode:!1,isConnecting:!1,agentStatus:null,agentIndicator:null,agentStatusDetail:null,agent:null,agentMessage:null,agentNativeSessionId:null,agentResumeRecovered:!1,agentRich:!1,agentActivity:0,agentCwd:null,agentNeedsReview:!1,shellTitle:null,promptState:null,shellExitCode:null,tuiProgress:null,gitStatus:null,bufferChunks:[],bufferLength:0,lastOutputAt:null,terminalOutputActive:!1,updatedAt:Date.now()}}const Bc="termdock-shell-titles-v1";function Fc(){if(typeof window>"u")return{};try{const e=localStorage.getItem(Bc);if(!e)return{};const t=JSON.parse(e);return typeof t=="object"&&t!==null?t:{}}catch{return{}}}function Bg(e){return Fc()[e]??null}function gO(e,t){if(!(typeof window>"u"))try{const n=Fc();t?n[e]=t:delete n[e],localStorage.setItem(Bc,JSON.stringify(n))}catch{}}function yO(e){if(!(typeof window>"u"))try{const t=Fc();delete t[e],localStorage.setItem(Bc,JSON.stringify(t))}catch{}}const Uc="termdock-agent-cache-v1";function ih(){if(typeof window>"u")return{};try{const e=localStorage.getItem(Uc);if(!e)return{};const t=JSON.parse(e);return typeof t=="object"&&t!==null?t:{}}catch{return{}}}function Fg(e,t){if(!(typeof window>"u"))try{const n=ih();t?n[e]=t:delete n[e],localStorage.setItem(Uc,JSON.stringify(n))}catch{}}function wO(e){if(!(typeof window>"u"))try{const t=ih();delete t[e],localStorage.setItem(Uc,JSON.stringify(t))}catch{}}function bO(){if(!(typeof window>"u"))try{localStorage.removeItem(Uc)}catch{}}function Eu(e){return ih()[e]??null}function vO(){if(!(typeof window>"u"))try{localStorage.removeItem(Bc)}catch{}}const uc=dr((e,t)=>{const n={pendingChunksBySession:new Map,outputAtBySession:new Map,batchFlushRafRef:null},r=(i,a)=>{const c=new Map;return e(d=>{const u=new Map(d.sessions);let f=d.nextChunkId;const h=Date.now();for(const p of new Set([...i.keys(),...a.keys()])){const m=i.get(p)??[],g=u.get(p)??qt(p),b=m.length>0?[...g.bufferChunks]:g.bufferChunks;let w=g.bufferLength;for(const E of m){const v=f++;b.push({id:v,data:E}),c.set(p,v),w+=E.length}for(;m.length>0&&g.mode!=="tmux"&&w>Mg&&b.length>1;){const E=b.shift();if(!E)break;w-=E.data.length}u.set(p,{...g,bufferChunks:b,bufferLength:w,lastOutputAt:a.get(p)??g.lastOutputAt,updatedAt:h})}return{sessions:u,nextChunkId:f}}),c},o=()=>{if(n.batchFlushRafRef===null){if(typeof window>"u"){s();return}n.batchFlushRafRef=window.requestAnimationFrame(()=>{n.batchFlushRafRef=null,s()})}},s=()=>{if(n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0)return;const i=Qj(n.pendingChunksBySession),a=new Map(n.outputAtBySession);n.outputAtBySession.clear(),r(i,a),n.pendingChunksBySession.size>0&&o()};return{sessions:new Map,nextChunkId:1,activeSessionId:null,getTerminalSession:i=>t().sessions.get(i),setActiveSessionId:i=>{e({activeSessionId:i}),i&&t().clearAgentNeedsReview(i)},setTerminalSession:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i),f=!u||u.terminalSessionId!==a.sessionId;f&&n.outputAtBySession.delete(i);const h=f?qt(i):u??qt(i),p=(a.mode??h.mode)==="tmux"?[]:a.history??u?.history??[];return d.set(i,{...h,terminalSessionId:a.sessionId,mode:a.mode??h.mode,tmuxSessionName:a.tmuxSessionName??h.tmuxSessionName,activeProgram:a.activeProgram??u?.activeProgram??h.activeProgram,activeProgramRaw:a.activeProgramRaw??u?.activeProgramRaw??h.activeProgramRaw,activeProgramSource:a.activeProgramSource??u?.activeProgramSource??h.activeProgramSource,cwd:a.cwd??u?.cwd??h.cwd,agent:u?.agent??Eu(i)??h.agent,agentResumeRecovered:u?.agentResumeRecovered??h.agentResumeRecovered,chatAttention:u?.chatAttention,shellTitle:u?.shellTitle??Fc()[i]??h.shellTitle,sessionId:i,isConnecting:!1,history:p,updatedAt:Date.now()}),{sessions:d}})},setSessionHistory:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i)??qt(i);return d.set(i,{...u,history:a,updatedAt:Date.now()}),{sessions:d}})},setSessionActiveProgram:(i,a,c=null,d=null)=>{e(u=>{const f=new Map(u.sessions),h=f.get(i)??qt(i);return f.set(i,{...h,activeProgram:a,activeProgramRaw:d,activeProgramSource:c,updatedAt:Date.now()}),{sessions:f}})},setSessionCwd:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i)??qt(i);return d.set(i,{...u,cwd:a,updatedAt:Date.now()}),{sessions:d}})},setSessionShellTitle:(i,a)=>{e(c=>{const d=c.sessions.get(i)??qt(i);if(d.shellTitle===a)return c;const u=new Map(c.sessions);return u.set(i,{...d,shellTitle:a,updatedAt:Date.now()}),{sessions:u}}),gO(i,a)},setSessionPromptState:(i,a,c)=>{e(d=>{const u=d.sessions.get(i);if(!u||u.promptState===a)return d;const f=new Map(d.sessions);return f.set(i,{...u,promptState:a,shellExitCode:c??u.shellExitCode,updatedAt:Date.now()}),{sessions:f}})},setSessionTuiProgress:(i,a)=>{e(c=>{const d=c.sessions.get(i);if(!d)return c;const u=a?.state==="remove"?null:a;if(d.tuiProgress?.state===u?.state&&d.tuiProgress?.progress===u?.progress&&d.tuiProgress?.source===u?.source&&d.tuiProgress?.app===u?.app&&d.tuiProgress?.message===u?.message&&d.tuiProgress?.kind===u?.kind&&d.tuiProgress?.reviewed===u?.reviewed)return c;const f=new Map(c.sessions);return f.set(i,{...d,tuiProgress:u,updatedAt:Date.now()}),{sessions:f}})},setSessionGitStatus:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i);return!u||JSON.stringify(u.gitStatus)===JSON.stringify(a)?c:(d.set(i,{...u,gitStatus:a,updatedAt:Date.now()}),{sessions:d})})},setSessionCopyMode:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i);return!u||u.inCopyMode===a?c:(d.set(i,{...u,inCopyMode:a,updatedAt:Date.now()}),{sessions:d})})},setSessionAgentIdentity:(i,a)=>{Fg(i,a),e(c=>{const d=c.sessions.get(i)??qt(i);if(JSON.stringify(d.agent)===JSON.stringify(a))return c;const u=new Map(c.sessions);return u.set(i,{...d,agent:a,updatedAt:Date.now()}),{sessions:u}})},setSessionAgentStatus:(i,a)=>{const c=t(),d=c.sessions.get(i);if(!d)return;const u=a.agentStatus??null,f=u&&u!=="idle"?a.agentIndicator??d.agentIndicator??null:null,h=u&&u!=="idle"?a.agentStatusDetail??null:null,p=a.agent!==void 0?a.agent:d.agent,m=a.agentMessage!==void 0?a.agentMessage:u?d.agentMessage:null,g=a.agentNativeSessionId!==void 0?a.agentNativeSessionId:d.agentNativeSessionId,b=a.agentResumeRecovered!==void 0?a.agentResumeRecovered:d.agentResumeRecovered,w=a.agentRich??d.agentRich,E=a.agentActivity??d.agentActivity,v=a.agentCwd!==void 0?a.agentCwd:d.agentCwd,C=c.activeSessionId!==i,_=d.agentStatus==="working"||d.agentStatus==="waiting"||d.agentStatus==="done",R=a.reviewed===!1||a.reviewed===null&&u===null&&_&&C;if(d.agentStatus===u&&d.agentIndicator===f&&d.agentStatusDetail===h&&d.agent===p&&d.agentMessage===m&&d.agentNativeSessionId===g&&d.agentResumeRecovered===b&&d.agentRich===w&&d.agentActivity===E&&d.agentCwd===v&&d.agentNeedsReview===R)return;const k=new Map(c.sessions);if(k.set(i,{...d,agentStatus:u,agentIndicator:f,agentStatusDetail:h,agent:p,agentMessage:m,agentNativeSessionId:g,agentResumeRecovered:b,agentRich:w,agentActivity:E,agentCwd:v,agentNeedsReview:R,updatedAt:Date.now()}),e({sessions:k}),p&&Fg(i,p),!dc())return;const x=p?.displayName??d.agent?.displayName??"Agent",S=pO(),I=mO(S,x);if(u==="waiting"&&d.agentStatus!=="waiting"&&C){ad({title:I.waitingTitle,body:m??I.waitingBody,tag:`agent:${i}`,dedupKey:`agent:${i}:waiting:${E}`,data:{url:"/",sessionId:i},deferToPush:!0});return}if(u==="done"&&d.agentStatus!=="done"&&C){ad({title:I.doneTitle,body:I.doneBody,tag:`agent:${i}`,dedupKey:`agent:${i}:done:${E}`,data:{url:"/",sessionId:i},deferToPush:!0});return}u===null&&(d.agentStatus==="working"||d.agentStatus==="waiting")&&C&&ad({title:I.exitedTitle,body:I.exitedBody,tag:`agent:${i}`,dedupKey:`agent:${i}:exited:${E}`,data:{url:"/",sessionId:i},deferToPush:!0})},setAgentResumeRecovered:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i)??qt(i);return u.agentResumeRecovered===a?c:(d.set(i,{...u,agentResumeRecovered:a,updatedAt:Date.now()}),{sessions:d})})},clearAgentNeedsReview:i=>{const a=t().sessions.get(i),c=a?.tuiProgress?.source==="osc7501"&&a.tuiProgress.state==="done"&&!a.tuiProgress.reviewed;!a||!a.agentNeedsReview&&!c||(e(d=>{const u=new Map(d.sessions),f=u.get(i);return f?(u.set(i,{...f,agentNeedsReview:!1,tuiProgress:c&&f.tuiProgress?{...f.tuiProgress,reviewed:!0}:f.tuiProgress,updatedAt:Date.now()}),{sessions:u}):d}),a.terminalSessionId&&yx(a.terminalSessionId))},setSessionChatIndex:(i,a)=>{if(!a||typeof a.conversationId!="string"||!Array.isArray(a.messageIds)||a.messageIds.some(f=>typeof f!="string")||a.viewedMessageIds!==void 0&&(!Array.isArray(a.viewedMessageIds)||a.viewedMessageIds.some(f=>typeof f!="string")))return;const c=t().sessions.get(i)?.chatAttention?.index;a.viewedMessageIds&&c?.conversationId===a.conversationId&&c.viewedMessageIds&&(a={...a,viewedMessageIds:[...new Set([...a.viewedMessageIds,...c.viewedMessageIds])]});const d=_g(i,a),u=a.viewedMessageIds!==void 0;if(e(f=>{const h=f.sessions.get(i)??{...qt(i),isConnecting:!1},p=h.chatAttention,m=u?new Set(a.viewedMessageIds):d,g=new Set(p?.unreadIds);if(!u&&p?.index?.conversationId===a.conversationId)for(const E of p.index.messageIds)g.has(E)||m.add(E);const b=a.messageIds.filter(E=>!m.has(E));if(JSON.stringify(p?.index)===JSON.stringify(a)&&JSON.stringify(p?.unreadIds)===JSON.stringify(b))return f;const w=new Map(f.sessions);return w.set(i,{...h,chatAttention:{...p,mode:p?.mode??!1,index:a,unreadIds:b}}),{sessions:w}}),u){const f=new Set(a.viewedMessageIds);for(const p of f)d.add(p);Lg(i,a,d);const h=a.messageIds.filter(p=>d.has(p)&&!f.has(p));Dg(i,a,h,p=>{const m=t().sessions.get(i)?.chatAttention?.index;m?.conversationId===p.conversationId&&t().setSessionChatIndex(i,{...m,viewedMessageIds:[...new Set([...m.viewedMessageIds??[],...p.viewedMessageIds??[]])]})})}},setSessionChatMode:(i,a)=>e(c=>{const d=c.sessions.get(i)??{...qt(i),isConnecting:!1};if(d.chatAttention?.mode===a)return c;const u=new Map(c.sessions);return u.set(i,{...d,chatAttention:{...d.chatAttention,mode:a,unreadIds:d.chatAttention?.unreadIds??[]}}),{sessions:u}}),setSessionChatHasMessages:(i,a)=>e(c=>{const d=c.sessions.get(i)??{...qt(i),isConnecting:!1};if(d.chatAttention?.hasMessages===a)return c;const u=new Map(c.sessions);return u.set(i,{...d,chatAttention:{...d.chatAttention,mode:d.chatAttention?.mode??!1,unreadIds:d.chatAttention?.unreadIds??[],hasMessages:a}}),{sessions:u}}),markChatMessagesViewed:(i,a)=>{const c=t().sessions.get(i),d=c?.chatAttention;if(!c||!d?.index)return;const u=new Set(a),f=d.unreadIds.filter(g=>!u.has(g));if(f.length===d.unreadIds.length)return;const h=new Set(f),p=_g(i,d.index);for(const g of d.index.messageIds)h.has(g)||p.add(g);if(Lg(i,d.index,p),d.index.viewedMessageIds!==void 0){Dg(i,d.index,a.filter(g=>d.unreadIds.includes(g)),g=>{const b=t().sessions.get(i)?.chatAttention?.index;b?.conversationId===g.conversationId&&t().setSessionChatIndex(i,{...b,viewedMessageIds:[...new Set([...b.viewedMessageIds??[],...g.viewedMessageIds??[]])]})});return}const m=new Map(t().sessions);m.set(i,{...c,chatAttention:{...d,unreadIds:f}}),e({sessions:m})},setConnecting:(i,a)=>{e(c=>{const d=new Map(c.sessions),u=d.get(i)??qt(i);return d.set(i,{...u,isConnecting:a,updatedAt:Date.now()}),{sessions:d}})},recordTerminalOutput:i=>{t().sessions.get(i)?.terminalSessionId&&(n.outputAtBySession.set(i,Date.now()),o())},setTerminalOutputActivity:(i,a)=>{e(c=>{const d=c.sessions.get(i);if(!d?.terminalSessionId||d.terminalOutputActive===a)return c;const u=new Map(c.sessions);return u.set(i,{...d,terminalOutputActive:a}),{sessions:u}})},clearTerminalOutputActivity:i=>{n.outputAtBySession.delete(i),e(a=>{const c=a.sessions.get(i);if(!c||c.lastOutputAt===null&&!c.terminalOutputActive)return a;const d=new Map(a.sessions);return d.set(i,{...c,lastOutputAt:null,terminalOutputActive:!1}),{sessions:d}})},appendToBuffer:(i,a,c)=>{if(!a)return;let d=n.pendingChunksBySession.get(i);d||(d=[],n.pendingChunksBySession.set(i,d)),d.push(...jg(a)),c?.markActivity!==!1&&n.outputAtBySession.set(i,Date.now()),o()},hasPendingBufferWrites:i=>(n.pendingChunksBySession.get(i)?.length??0)>0,flushPendingBufferWrites:i=>{const a=n.pendingChunksBySession.get(i)??[],c=n.outputAtBySession.get(i);return!a.length&&c===void 0?t().sessions.get(i)?.bufferChunks.at(-1)?.id??null:(n.pendingChunksBySession.delete(i),n.outputAtBySession.delete(i),n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0&&n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null),r(new Map([[i,a]]),c===void 0?new Map:new Map([[i,c]])).get(i)??null)},releaseWrittenTmuxOutput:(i,a)=>{e(c=>{const d=c.sessions.get(i);if(d?.mode!=="tmux"||!d.bufferChunks.some(h=>h.id<=a))return c;const u=d.bufferChunks.filter(h=>h.id>a),f=new Map(c.sessions);return f.set(i,{...d,bufferChunks:u,bufferLength:u.reduce((h,p)=>h+p.data.length,0)}),{sessions:f}})},replaceBuffer:(i,a)=>{n.pendingChunksBySession.delete(i),n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0&&n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null);let c=null;return e(d=>{const u=new Map(d.sessions),f=u.get(i);if(!f)return d;if(!a||a.length===0)return u.set(i,{...f,bufferChunks:[],bufferLength:0,updatedAt:Date.now()}),{sessions:u};let h=d.nextChunkId;const p=[];let m=0;for(const g of a)if(g)for(const b of jg(g)){const w=h++;p.push({id:w,data:b}),c=w,m+=b.length}for(;f.mode!=="tmux"&&m>Mg&&p.length>1;){const g=p.shift();if(!g)break;m-=g.data.length}return u.set(i,{...f,bufferChunks:p,bufferLength:m,updatedAt:Date.now()}),{sessions:u,nextChunkId:h}}),c},clearTerminalSession:i=>{n.pendingChunksBySession.delete(i),n.outputAtBySession.delete(i),n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0&&n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null),e(a=>{const c=new Map(a.sessions),d=c.get(i);return d&&c.set(i,{...d,terminalSessionId:null,lastOutputAt:null,terminalOutputActive:!1,isConnecting:!1,agentStatus:null,agentIndicator:null,agentStatusDetail:null,agent:null,agentMessage:null,agentNeedsReview:!1,updatedAt:Date.now()}),{sessions:c}})},clearBuffer:i=>{n.pendingChunksBySession.delete(i),n.outputAtBySession.delete(i),n.pendingChunksBySession.size===0&&n.outputAtBySession.size===0&&n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null),e(a=>{const c=new Map(a.sessions),d=c.get(i);return d?(c.set(i,{...d,bufferChunks:[],bufferLength:0,updatedAt:Date.now()}),{sessions:c}):a})},removeTerminalSession:i=>{n.pendingChunksBySession.delete(i),n.outputAtBySession.delete(i),e(a=>{const c=new Map(a.sessions);return c.delete(i),{sessions:c}}),yO(i),wO(i)},clearAllTerminalSessions:()=>{n.pendingChunksBySession.clear(),n.outputAtBySession.clear(),n.batchFlushRafRef!==null&&(window.cancelAnimationFrame(n.batchFlushRafRef),n.batchFlushRafRef=null),e({sessions:new Map,nextChunkId:1}),vO(),bO()}}}),fc=dr(e=>({records:[],shellNames:wc,setShellNames:t=>e({shellNames:new Set(t)}),replace:t=>e({records:t})})),s3=e=>fc.getState().setShellNames(e);function xO(e,t,n=wc){const r=t&&(!e.backendSessionId||!t.terminalSessionId||e.backendSessionId===t.terminalSessionId),o={...e,shellTitle:e.shellTitle??(!t||r?Bg(e.sessionId):null),agent:e.agent??(!t||r?Eu(e.sessionId):null),...r?{activeProgram:t.activeProgram??e.activeProgram,cwd:t.cwd??e.cwd,shellTitle:t.shellTitle??e.shellTitle??Bg(e.sessionId),promptState:t.promptState??e.promptState,agent:t.agent??e.agent??Eu(e.sessionId)}:{}};return{sessionId:e.sessionId,mode:e.mode??null,collectionRunId:e.collectionRunId??null,...vw(o,n),cwd:o.cwd??null,agent:o.agent??null,lastActivity:e.lastActivity}}function q0(){const e=uc.getState().sessions,{records:t,shellNames:n}=fc.getState();return t.map(r=>xO(r,e.get(r.sessionId),n))}function SO(){const e=fc(r=>r.records),t=fc(r=>r.shellNames),n=uc(Vj(r=>e.flatMap(o=>{const s=r.sessions.get(o.sessionId);return[s?.terminalSessionId,s?.activeProgram,s?.cwd,s?.shellTitle,s?.promptState,s?.agent]})));return y.useMemo(()=>q0(),[e,n,t])}function i3(e){const t=SO();return y.useMemo(()=>{const n=new Map(t.map(r=>[r.sessionId,r]));return e.map(r=>{const o=r.sessionId?n.get(r.sessionId):void 0,{displayName:s,displaySubtitle:i}=o??Fu(r);return{...r,displayName:s,displaySubtitle:i}})},[e,t])}const ku="termdock:session-notice";function EO(){return y.useEffect(()=>{const e=()=>id.getState().view(!document.hidden&&Tr()?uc.getState().activeSessionId:null);e();const t=uc.subscribe((n,r)=>{n.activeSessionId!==r.activeSessionId&&e()});return document.addEventListener("visibilitychange",e),window.addEventListener(Br,e),()=>{t(),document.removeEventListener("visibilitychange",e),window.removeEventListener(Br,e),id.getState().view(null)}},[]),y.useEffect(()=>Kj(e=>{if(e.type!=="session-notice")return;id.getState().receive(e.sessionId,e.id);const t=se()?.targetPeerId,n=yn(),r=window.parent,o=q0().find(a=>a.sessionId===e.sessionId)?.displayName??Fu({sessionId:e.sessionId,name:e.sessionName}).displayName,s={...e,sessionName:o,key:`${t??"local"}:${e.id}`,open:()=>t&&n?n.focusSession(t,e.sessionId):(window.dispatchEvent(new CustomEvent("termdock:focus-session",{detail:e.sessionId})),!0)},i=r.document.createEvent("CustomEvent");i.initCustomEvent(ku,!1,!1,s),r.dispatchEvent(i)}),[]),null}function kO(){const{locale:e}=Nt(),t=e==="zh",[n,r]=y.useState([]);y.useEffect(()=>{const i=a=>{const c=a.detail;r(d=>d.some(u=>u.key===c.key)?d:[...d,c])};return window.addEventListener(ku,i),()=>window.removeEventListener(ku,i)},[]);const o=y.useCallback(i=>{r(a=>a.filter(c=>c.key!==i))},[]),s=n[0];return s?Kn.createPortal(l.jsx(IO,{notice:s,remaining:n.length-1,chinese:t,onDismiss:o},s.key),document.body):null}function IO({notice:e,remaining:t,chinese:n,onDismiss:r}){const[o,s]=y.useState(!1);return l.jsxs("section",{"aria-label":n?"关键进展提醒":"Progress reminder",className:"fixed left-3 right-3 top-[calc(var(--safe-top-inset,0px)+0.75rem)] z-toast overflow-hidden rounded-xl bg-surface text-foreground shadow-lg ring-1 ring-inset ring-border/15 animate-fade-in md:left-auto md:right-4 md:w-[360px]",children:[l.jsxs("button",{type:"button","aria-label":n?"查看 Session":"Open session",className:"group flex w-full items-start gap-2.5 p-3.5 pr-11 text-left transition-colors hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary",onClick:()=>{e.open()?r(e.key):s(!0)},children:[l.jsx(_u,{size:16,className:"mt-0.5 shrink-0 text-primary","aria-hidden":"true"}),l.jsxs("span",{className:"min-w-0 flex-1",role:"status","aria-live":"polite","aria-atomic":"true",children:[l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] font-medium",title:e.sessionName,children:e.sessionName}),l.jsx(ty,{size:13,className:"shrink-0 text-muted-foreground/60 transition-colors group-hover:text-primary","aria-hidden":"true"})]}),e.title&&l.jsx("span",{className:"mt-1 block truncate text-[11px] text-muted-foreground",children:e.title}),l.jsx("span",{className:"mt-1.5 line-clamp-3 whitespace-pre-wrap break-words text-[13px] leading-relaxed text-foreground/85",title:e.message,children:e.message}),t>0&&l.jsx("span",{className:"mt-2 block text-[10px] text-muted-foreground",children:n?`还有 ${t} 条`:`${t} more`}),o&&l.jsx("span",{role:"alert",className:"mt-2 block text-xs text-warning",children:n?"暂时无法打开该服务,请重试。":"Unable to open the service. Please retry."})]})]}),l.jsx("button",{type:"button","aria-label":n?"关闭提醒":"Dismiss reminder",className:"absolute right-0 top-0 flex h-11 w-11 items-center justify-center rounded-tr-xl text-muted-foreground/60 transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary",onClick:()=>r(e.key),children:l.jsx(ci,{size:14})})]})}const Ug=5*6e4;let Iu,K0=!1,G0=!1,Hg=!1;const Cu=new Set;function Ru(e=window){const t=e.document.createEvent("Event");t.initEvent("termdock:before-update",!1,!1),e.dispatchEvent(t);for(const n of e.document.querySelectorAll("iframe[data-workspace-key]")){const r=n.contentWindow;r&&Ru(r)}}async function a3(){const e=window.top&&window.top.location.origin===location.origin?window.top:window;Ru(e);const t=e.navigator.serviceWorker,n=await t?.getRegistration("/");if(n){await n.update();const r=n.installing;r&&r.state!=="installed"&&r.state!=="activated"&&await new Promise((s,i)=>{const a=()=>{clearTimeout(d),r.removeEventListener("statechange",c)},c=()=>{r.state==="installed"||r.state==="activated"?(a(),s()):r.state==="redundant"&&(a(),i(new Error("Interface update installation failed")))},d=setTimeout(()=>{a(),i(new Error("Interface update installation timed out"))},6e4);r.addEventListener("statechange",c),c()});const o=n.waiting;o&&await new Promise((s,i)=>{const a=()=>{clearTimeout(d),t.removeEventListener("controllerchange",c)},c=()=>{a(),s()},d=setTimeout(()=>{a(),i(new Error("Interface update activation timed out"))},3e4);t.addEventListener("controllerchange",c),o.postMessage({type:"SKIP_WAITING"})})}Ru(e),e.location.reload()}function $g(){K0=!0,Cu.forEach(e=>e())}function CO(){return y.useSyncExternalStore(e=>(Cu.add(e),()=>{Cu.delete(e)}),()=>K0,()=>!1)}function RO(){window.dispatchEvent(new Event("termdock:before-update")),G0=!0,Iu?.waiting?Iu.waiting.postMessage({type:"SKIP_WAITING"}):window.location.reload()}function TO(e,t){let n=e;return()=>{if(!n){n=!0;return}t()}}function AO(){if(Hg||typeof window>"u"||!("serviceWorker"in navigator))return;Hg=!0,navigator.serviceWorker.addEventListener("controllerchange",TO(!!navigator.serviceWorker.controller,()=>{G0?window.location.reload():$g()}));const e=()=>{navigator.serviceWorker.register("/sw.js",{scope:"/",updateViaCache:"none"}).then(t=>{Iu=t;const n=()=>{t.waiting&&$g()},r=()=>{const i=t.installing;i?.addEventListener("statechange",()=>{i.state==="installed"&&navigator.serviceWorker.controller&&n()})};t.addEventListener("updatefound",r),r(),n();let o=0;const s=()=>{document.visibilityState!=="visible"||Date.now()-o<Ug||(o=Date.now(),t.update().then(n).catch(()=>{}))};s(),window.setInterval(s,Ug),document.addEventListener("visibilitychange",s)}).catch(()=>{})};document.readyState==="complete"?e():window.addEventListener("load",e,{once:!0})}function PO(){const e=CO(),[t,n]=y.useState(!1),{locale:r}=Nt();if(!e||t)return null;const o=r==="zh";return l.jsxs("div",{role:"status",className:"fixed bottom-16 left-1/2 z-toast flex max-w-[calc(100%-2rem)] -translate-x-1/2 items-center gap-3 rounded-lg border border-border bg-background px-4 py-3 text-sm text-foreground shadow-lg",children:[l.jsx("span",{children:o?"新版本已就绪":"An update is ready"}),l.jsx("button",{type:"button",className:"whitespace-nowrap text-primary",onClick:RO,children:o?"重新加载":"Reload"}),l.jsx("button",{type:"button",className:"whitespace-nowrap text-muted-foreground",onClick:()=>n(!0),children:o?"稍后":"Later"})]})}let As=[],cd=!1;function NO(e,t,n={}){typeof window>"u"||(As.push(JSON.stringify({level:e,message:t,data:{ts:Date.now(),...n}})),_O())}async function _O(){if(!cd){cd=!0;try{for(;As.length>0;){const e=As[0];try{await fetch("/api/client-log",{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}),As.shift()}catch{As=[];break}}}finally{cd=!1}}}function LO(){const e=y.useRef(null),t=navigator.standalone===!0||window.matchMedia?.("(display-mode: standalone)").matches===!0,n=window.parent===window&&Oc()&&t;return y.useEffect(()=>{if(!n)return;const r=()=>{const o=e.current;if(!o)return;const s=o.getBoundingClientRect(),i=getComputedStyle(o);NO("info","PWA_STATUS_BAR_SURFACE",{revision:"ipad-default-status-bar",statusBarStyle:document.querySelector('meta[name="apple-mobile-web-app-status-bar-style"]')?.getAttribute("content"),entry:document.querySelector('script[type="module"][src]')?.getAttribute("src"),parent:o.parentElement?.tagName,rect:{x:s.x,y:s.y,width:s.width,height:s.height},background:i.backgroundColor,clip:i.backgroundClip,zIndex:i.zIndex,safeTop:getComputedStyle(document.documentElement).getPropertyValue("--safe-top-inset"),viewport:{width:window.innerWidth,height:window.innerHeight,offsetTop:window.visualViewport?.offsetTop},screen:{width:window.screen.width,height:window.screen.height}})};return window.addEventListener("termdock:initial-viewport-presented",r,{once:!0}),()=>window.removeEventListener("termdock:initial-viewport-presented",r)},[n]),n?Kn.createPortal(l.jsx("div",{ref:e,"data-pwa-status-bar-surface":!0,"aria-hidden":"true",className:"pwa-status-bar-surface pointer-events-none fixed inset-x-0 top-0 z-popover app-chrome-bg"}),document.body):null}function W0(e){const t=document.querySelector('meta[name="theme-color"]');t&&t.setAttribute("content",e==="light"?"#FFFCF0":"#1C1B1A")}const V0=y.createContext(void 0);function c3({children:e}){const t=y.useContext(V0),n=t===void 0?typeof document>"u"?null:document.body:t;return n?Kn.createPortal(e,n):null}const DO={activeKey:"root",items:[]},jO=()=>()=>{},OO=()=>DO;function MO({host:e,item:t,visible:n,active:r}){const o=y.useRef(null);return y.useEffect(()=>{o.current?.toggleAttribute("inert",!r)},[r]),y.useLayoutEffect(()=>{const s=o.current;return()=>{try{const i=s?.contentWindow,a=i?.document.createEvent("Event");a&&(a.initEvent("termdock:before-update",!1,!1),i?.dispatchEvent(a))}catch{}e.attach(t.key,null)}},[e,t.key]),Kn.createPortal(l.jsx("iframe",{ref:o,title:t.service?.label||"服务工作区","data-workspace-key":t.key,src:`/workspace.html?${Wv}=${encodeURIComponent(t.key)}`,className:"fixed inset-0 w-full border-0 bg-[var(--chrome-bg)]",style:{height:"var(--app-native-frame-height, var(--app-base-vh, 100%))",visibility:n?"visible":"hidden",pointerEvents:r?"auto":"none"},"aria-hidden":!r,tabIndex:r?0:-1,allow:"clipboard-read; clipboard-write; fullscreen"}),document.body)}function BO({children:e}){const t=window.parent===window?yn():void 0,n=y.useSyncExternalStore(t?.subscribe||jO,t?.snapshot||OO),[r,o]=y.useState(null),[s,i]=y.useState(()=>n.activeKey==="root"?"root":null),[a,c]=y.useState(),[d,u]=y.useState(!1),[f,h]=y.useState(),p=n.items.find(v=>v.key===n.activeKey),m=p?.rendered||a===n.activeKey?n.activeKey:s,g=m!==n.activeKey,b=g&&s===null;y.useLayoutEffect(()=>{if(!g||b){h(void 0);return}const v=()=>{const C=Array.from(document.querySelectorAll("iframe[data-workspace-key]")).find(P=>P.dataset.workspaceKey===s),x=(s==="root"?r:C?.contentDocument)?.querySelector('nav[aria-label="切换服务"]')?.closest("[data-sidebar-gesture-ignore]")?.getBoundingClientRect();if(!x||x.width===0||x.right<=0){h(void 0);return}const S=C?.getBoundingClientRect(),I=x.top+(S?.top??0)>=160;h({left:x.left+(S?.left??0)+12,top:(I?x.top-8:x.bottom+8)+(S?.top??0),width:Math.max(0,x.width-24),transform:I?"translateY(-100%)":"none"})};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[g,b,s,r]),y.useLayoutEffect(()=>{t?.present(m),g||i(m),r?.toggleAttribute("inert",m!=="root"||g)},[t,r,m,g]),y.useEffect(()=>{if(u(!1),!g)return;const v=setTimeout(()=>u(!0),8e3);return()=>clearTimeout(v)},[n.activeKey,g]),y.useEffect(()=>{c(void 0)},[n.activeKey]);const w=n.items.find(v=>v.key===s),E=p?.phase==="offline"?"网络已断开,等待恢复…":p?.phase==="reconnecting"?"连接暂未恢复,正在重试…":d?"连接时间较长,仍在等待服务…":b?"正在恢复服务…":"正在切换服务…";return y.useEffect(()=>{if(!t)return;const v=()=>{try{const C=JSON.parse(localStorage.getItem("termdock-color-theme")||"null");(C==="dark"||C==="light")&&(document.documentElement.dataset.theme=C,W0(C))}catch{}};return window.addEventListener("storage",v),()=>window.removeEventListener("storage",v)},[t]),y.useEffect(()=>{if(!t||!("serviceWorker"in navigator))return;const v=R=>{if(R.source!==navigator.serviceWorker.controller)return;const k=R.data;k?.type==="termdock:focus-session"&&typeof k.targetPeerId=="string"&&typeof k.sessionId=="string"&&t.focusSession(k.targetPeerId,k.sessionId)&&(R.ports[0]?.postMessage({type:"termdock:focus-session-ack"}),R.stopImmediatePropagation())},C=async()=>{if("caches"in window)try{const R=await caches.open("termdock-notification-target-v1"),k=await R.match("/__termdock-notification-target");if(!k)return;const x=await k.json();typeof x.targetPeerId=="string"&&typeof x.sessionId=="string"&&Date.now()-x.clickedAt<3e4&&t.focusSession(x.targetPeerId,x.sessionId)&&await R.delete("/__termdock-notification-target")}catch{}},_=()=>{document.hidden||C()};return navigator.serviceWorker.addEventListener("message",v),document.addEventListener("visibilitychange",_),C(),()=>{navigator.serviceWorker.removeEventListener("message",v),document.removeEventListener("visibilitychange",_)}},[t]),t?l.jsxs("div",{className:"relative h-full w-full overflow-hidden bg-[var(--chrome-bg)]",children:[l.jsx("div",{ref:o,className:"isolate h-full w-full","aria-hidden":m!=="root"||g,style:{visibility:m==="root"?"visible":"hidden"},children:l.jsx(V0.Provider,{value:r,children:e})}),n.items.filter(v=>v.key!=="root").map(v=>l.jsx(MO,{host:t,item:v,visible:m===v.key,active:!g&&m===v.key},v.key)),b&&l.jsx(Mf,{className:"z-modal-panel",status:E,detail:d||p?.phase==="offline"||p?.phase==="reconnecting"?p?.service?.label:void 0,actionLabel:d||p?.phase==="offline"||p?.phase==="reconnecting"?"查看连接页面":void 0,onAction:()=>c(n.activeKey)}),g&&!b&&l.jsx("div",{className:"fixed inset-0 z-modal-panel flex items-end justify-center px-3 pb-[calc(env(safe-area-inset-bottom)+96px)]",role:"dialog","aria-modal":"true","aria-label":"切换服务",onKeyDown:v=>{if(v.key==="Escape"&&w?.service&&(v.preventDefault(),t.activate(w.service)),v.key==="Tab"){const C=Array.from(v.currentTarget.querySelectorAll("button")),_=C[0],R=C[C.length-1];v.shiftKey&&document.activeElement===_?(v.preventDefault(),R?.focus()):!v.shiftKey&&document.activeElement===R&&(v.preventDefault(),_?.focus())}},children:l.jsxs("div",{style:f?{position:"absolute",...f}:void 0,className:"flex w-full max-w-sm flex-wrap items-center gap-x-2 gap-y-1 rounded-xl border border-border bg-surface-elevated px-3 py-1.5 text-foreground shadow-lg",children:[l.jsxs("div",{role:"status","aria-live":"polite",className:"flex min-w-0 flex-1 items-center gap-2",children:[l.jsx(Xe,{size:16,className:"shrink-0 animate-spin text-primary motion-reduce:animate-none","aria-hidden":"true"}),l.jsxs("div",{className:"min-w-0",children:[l.jsx("div",{className:"truncate text-sm font-medium",children:p?.service?.label||"服务工作区"}),l.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:E})]})]}),l.jsxs("div",{className:"flex items-center justify-end gap-1",children:[d&&l.jsx("button",{type:"button",className:"min-h-11 rounded-lg px-3 text-xs text-muted-foreground hover:bg-surface-2",onClick:()=>c(n.activeKey),children:"查看连接页面"}),w?.service&&l.jsx("button",{type:"button",autoFocus:!0,"aria-label":"取消切换",className:"min-h-11 shrink-0 rounded-lg px-3 text-xs text-muted-foreground hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",onClick:()=>t.activate(w.service),children:"取消"})]})]})})]}):e}const FO=y.lazy(()=>Zt(()=>import("./App-Bd9XpX-B.js").then(e=>e.b),__vite__mapDeps([23,12,1,13,24,25,2,26,27,15,16,28,10,29,30,31,32,33,34,35,36,37,38,39,40,41,5,6,7,8,9,42,43,44,45,46,47,48,49,50,51,52,21,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97]))),UO=y.lazy(()=>Zt(()=>import("./DagPlayground-6i1MrDv4.js"),__vite__mapDeps([98,99,1,100,2,101,55,64,27])).then(e=>({default:e.DagPlayground}))),HO=y.lazy(()=>Zt(()=>import("./DiffLab-CnzqYaW7.js"),__vite__mapDeps([102,1,103,17,65,2,104,105])).then(e=>({default:e.DiffLab}))),$O=y.lazy(()=>Zt(()=>import("./DiffReviewLab-D5u7sipT.js"),__vite__mapDeps([106,1,107,7,15,16,108,2,18,103,17,65,104,105])).then(e=>({default:e.DiffReviewLab})));$D();d2();g_();window.parent===window&&AO();const Ps=se();Ps&&Zt(()=>import("./App-Bd9XpX-B.js").then(e=>e.b),__vite__mapDeps([23,12,1,13,24,25,2,26,27,15,16,28,10,29,30,31,32,33,34,35,36,37,38,39,40,41,5,6,7,8,9,42,43,44,45,46,47,48,49,50,51,52,21,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97])).catch(()=>{});!new URLSearchParams(location.search).has("dag-playground")&&!new URLSearchParams(location.search).has("diff-lab")&&!new URLSearchParams(location.search).has("diff-review-lab")&&XA(Ps?{...Ps,id:Ps.targetPeerId,label:Ps.serviceName||location.host}:void 0);try{const e=JSON.parse(window.localStorage.getItem("termdock-color-theme")||"null");(e==="dark"||e==="light")&&(document.documentElement.dataset.theme=e,W0(e))}catch{}b_.createRoot(document.getElementById("root")).render(l.jsxs(Ut.StrictMode,{children:[l.jsx(LO,{}),l.jsx(h_,{}),l.jsxs(l_,{children:[window.parent===window&&l.jsxs(l.Fragment,{children:[l.jsx(PO,{}),l.jsx(kO,{})]}),l.jsx(Mj,{children:l.jsx(y.Suspense,{fallback:l.jsx(Mf,{}),children:(()=>{const e=new URLSearchParams(window.location.search);return e.get("dag-playground")==="1"?l.jsx(UO,{}):e.get("diff-review-lab")==="1"?l.jsx($O,{}):e.get("diff-lab")==="1"?l.jsx(HO,{}):l.jsx(BO,{children:l.jsxs(Lj,{children:[l.jsx(EO,{}),l.jsx(FO,{}),l.jsx(m_,{})]})})})()})})]})]}));export{ai as $,Ux as A,_u as B,Ln as C,pm as D,sx as E,Lu as F,Rg as G,Uy as H,pj as I,Xe as J,dm as K,_o as L,KA as M,ox as N,ii as O,Du as P,au as Q,Gy as R,Vy as S,Gs as T,Ws as U,ju as V,Ou as W,ow as X,FS as Y,xt as Z,hd as _,Pf as a,SB as a$,Aj as a0,Vx as a1,yc as a2,cw as a3,Mu as a4,Mf as a5,uw as a6,$e as a7,JD as a8,Bu as a9,YO as aA,XO as aB,JO as aC,ZO as aD,CD as aE,Ts as aF,Gx as aG,sN as aH,bB as aI,ym as aJ,U_ as aK,tN as aL,ff as aM,R_ as aN,Lf as aO,UA as aP,qB as aQ,QO as aR,FP as aS,ZC as aT,b2 as aU,uP as aV,eM as aW,tM as aX,nM as aY,rM as aZ,oM as a_,Zd as aa,Tg as ab,mj as ac,FD as ad,pw as ae,Br as af,c3 as ag,ci as ah,Zt as ai,QD as aj,sP as ak,Xa as al,uf as am,dB as an,iB as ao,lB as ap,Hn as aq,NN as ar,r_ as as,KO as at,GO as au,WO as av,VO as aw,eB as ax,HB as ay,ij as az,Xg as b,Ru as b$,IB as b0,Cr as b1,CN as b2,IN as b3,OB as b4,r3 as b5,IP as b6,NO as b7,fj as b8,sM as b9,bj as bA,MB as bB,Eg as bC,X2 as bD,yl as bE,c2 as bF,ZA as bG,He as bH,D_ as bI,$P as bJ,UB as bK,mB as bL,o3 as bM,E2 as bN,wP as bO,HP as bP,lM as bQ,Ax as bR,dM as bS,x2 as bT,s_ as bU,Tw as bV,nx as bW,k2 as bX,hM as bY,uM as bZ,fM as b_,lP as ba,iM as bb,$M as bc,ka as bd,zM as be,WS as bf,aM as bg,gB as bh,j_ as bi,K_ as bj,v2 as bk,aB as bl,J2 as bm,Ot as bn,Qt as bo,$B as bp,nB as bq,yB as br,cM as bs,wj as bt,dr as bu,MP as bv,XD as bw,DN as bx,OD as by,ve as bz,Nu as c,bw as c$,J_ as c0,QS as c1,NB as c2,gM as c3,pM as c4,mM as c5,fP as c6,Vt as c7,Jt as c8,LP as c9,vP as cA,vw as cB,Fu as cC,sr as cD,dc as cE,Su as cF,ri as cG,oh as cH,ft as cI,rx as cJ,L2 as cK,rj as cL,TP as cM,pP as cN,CP as cO,RN as cP,Sx as cQ,yn as cR,Bx as cS,wg as cT,rB as cU,Xb as cV,gv as cW,AB as cX,fN as cY,DP as cZ,BP as c_,_P as ca,OP as cb,Y2 as cc,kN as cd,xN as ce,Eu as cf,vN as cg,LN as ch,SN as ci,AP as cj,Se as ck,_i as cl,rN as cm,yN as cn,PN as co,lN as cp,TN as cq,bN as cr,pN as cs,YP as ct,YB as cu,EN as cv,fu as cw,S2 as cx,q0 as cy,GS as cz,Qg as d,t_ as d$,M_ as d0,nc as d1,xx as d2,Oc as d3,P_ as d4,Ff as d5,zB as d6,PB as d7,nN as d8,oN as d9,vM as dA,NP as dB,FB as dC,pg as dD,xM as dE,SM as dF,VN as dG,cB as dH,ti as dI,sj as dJ,Ig as dK,s2 as dL,mN as dM,kj as dN,xP as dO,WB as dP,Ke as dQ,EM as dR,kM as dS,Y_ as dT,IM as dU,CM as dV,RM as dW,BB as dX,TM as dY,KP as dZ,oj as d_,QP as da,Ix as db,Ex as dc,aO as dd,rh as de,Xx as df,Tr as dg,l as dh,tB as di,mP as dj,Q2 as dk,yM as dl,bM as dm,wM as dn,ON as dp,qP as dq,Fx as dr,uB as ds,Of as dt,ZN as du,_N as dv,Rx as dw,n_ as dx,mt as dy,hP as dz,ty as e,ex as e$,tP as e0,AM as e1,Dr as e2,wn as e3,hj as e4,wB as e5,Kr as e6,uN as e7,cN as e8,Kx as e9,VP as eA,cP as eB,F_ as eC,sB as eD,CB as eE,dP as eF,gP as eG,qN as eH,o_ as eI,T_ as eJ,zP as eK,$N as eL,jB as eM,NM as eN,_M as eO,ZM as eP,eE as eQ,BN as eR,W_ as eS,AN as eT,od as eU,MN as eV,pB as eW,WN as eX,Px as eY,se as eZ,e_,dN as ea,hN as eb,RB as ec,TB as ed,GM as ee,nP as ef,PM as eg,I2 as eh,qM as ei,xB as ej,a3 as ek,Ss as el,UN as em,GP as en,zN as eo,JN as ep,kP as eq,EP as er,XP as es,WP as et,RP as eu,fo as ev,e3 as ew,lj as ex,ZD as ey,JP as ez,oy as f,f0 as f$,dt as f0,QN as f1,aP as f2,oP as f3,eP as f4,iP as f5,wx as f6,LM as f7,xO as f8,FN as f9,Kj as fA,HN as fB,KM as fC,rP as fD,QM as fE,n3 as fF,hO as fG,W0 as fH,MM as fI,BM as fJ,Z2 as fK,JM as fL,jP as fM,t3 as fN,UP as fO,jN as fP,PP as fQ,SP as fR,Gt as fS,vi as fT,_x as fU,GB as fV,KB as fW,p_ as fX,yj as fY,Cw as fZ,ww as f_,GN as fa,KN as fb,XN as fc,s3 as fd,JB as fe,ZB as ff,QB as fg,XB as fh,gx as fi,V2 as fj,yP as fk,wl as fl,kB as fm,Wx as fn,q_ as fo,LB as fp,_B as fq,DB as fr,G_ as fs,ad as ft,DM as fu,jM as fv,YN as fw,OM as fx,fB as fy,hB as fz,Pr as g,O_ as g0,Uf as g1,Nt as g2,Si as g3,oB as g4,L0 as g5,Gf as g6,VB as g7,vB as g8,SO as g9,fc as ga,id as gb,i3 as gc,ND as gd,Vj as ge,$f as gf,_e as gg,uc as gh,zD as gi,$s as gj,k0 as gk,FM as gl,Fe as gm,aN as gn,UM as go,Lc as gp,en as gq,EB as gr,Kf as gs,th as gt,WM as gu,HM as gv,On as h,hy as i,my as j,yy as k,xa as l,Sy as m,ut as n,si as o,X_ as p,pc as q,zx as r,Nr as s,Mj as t,Ry as u,Ay as v,WL as w,gc as x,_s as y,mc as z};