@saluzi/saluzi-edu 0.5.11 → 0.5.13

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 (160) hide show
  1. package/dist/cli.js +46 -46
  2. package/dist/rcs-web/assets/{AdminPanel-N24fbtDr.js → AdminPanel-DUladavo.js} +1 -1
  3. package/dist/rcs-web/assets/{ArtifactView-BDbNCtzr.js → ArtifactView-n0v6hnzo.js} +1 -1
  4. package/{packages/remote-control-server/web/dist/assets/ArtifactsGallery-BhxPaq_Y.js → dist/rcs-web/assets/ArtifactsGallery-ug-kp4qP.js} +5 -5
  5. package/{packages/remote-control-server/web/dist/assets/Claim-ClId-sat.js → dist/rcs-web/assets/Claim-CYVUcDxH.js} +1 -1
  6. package/dist/rcs-web/assets/Dashboard--x6EF7xP.js +6 -0
  7. package/dist/rcs-web/assets/Join-DDTbyo3-.js +1 -0
  8. package/dist/rcs-web/assets/Login-CR9Rx-mk.js +1 -0
  9. package/dist/rcs-web/assets/Register-BFzxxFmG.js +1 -0
  10. package/dist/rcs-web/assets/{SessionDetail-C-lPPdGL.js → SessionDetail-CsnvwQ0t.js} +9 -9
  11. package/dist/rcs-web/assets/{SessionVisibilityBadge-rHbdCbCs.js → SessionVisibilityBadge-IJ03myi1.js} +2 -2
  12. package/dist/rcs-web/assets/Setup-CDlsj-Tq.js +1 -0
  13. package/dist/rcs-web/assets/{ShareLanding-Bd--e_ru.js → ShareLanding-yU_oNRIA.js} +1 -1
  14. package/dist/rcs-web/assets/{TeamCreate-btnOXimS.js → TeamCreate-BZFPWa3R.js} +1 -1
  15. package/dist/rcs-web/assets/{TeamDetail-Bq7sfprF.js → TeamDetail-Bs8euLfd.js} +2 -2
  16. package/dist/rcs-web/assets/{TeamList-Ckc_5rPG.js → TeamList-Czzk-glq.js} +1 -1
  17. package/dist/rcs-web/assets/{TeamSettings-Dn8wW8D0.js → TeamSettings-CXTCaWDB.js} +1 -1
  18. package/dist/rcs-web/assets/{UserSearchInput-BRoxtwWw.js → UserSearchInput-CGtPgB9t.js} +1 -1
  19. package/dist/rcs-web/assets/{UserSettings-BsPA9Uww.js → UserSettings-CL5LzA-S.js} +1 -1
  20. package/dist/rcs-web/assets/{arc-WLkbBjJm.js → arc-DjW5P0be.js} +1 -1
  21. package/{packages/remote-control-server/web/dist/assets/architectureDiagram-3BPJPVTR-BJi4DwhI.js → dist/rcs-web/assets/architectureDiagram-3BPJPVTR-BusiH9yR.js} +1 -1
  22. package/{packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-CmqVqUku.js → dist/rcs-web/assets/blockDiagram-GPEHLZMM-3edPnryX.js} +1 -1
  23. package/{packages/remote-control-server/web/dist/assets/c4Diagram-AAUBKEIU-z7aUi41b.js → dist/rcs-web/assets/c4Diagram-AAUBKEIU-ZLlCXozI.js} +1 -1
  24. package/dist/rcs-web/assets/channel-ZxgdY0DL.js +1 -0
  25. package/dist/rcs-web/assets/{chunk-2J33WTMH-DmlfMgi-.js → chunk-2J33WTMH-DGhWwfFz.js} +1 -1
  26. package/dist/rcs-web/assets/{chunk-4BX2VUAB-DvBN8rCU.js → chunk-4BX2VUAB-Cu1Rovtf.js} +1 -1
  27. package/dist/rcs-web/assets/{chunk-55IACEB6-DvXeBOx-.js → chunk-55IACEB6-DHElqmXB.js} +1 -1
  28. package/{packages/remote-control-server/web/dist/assets/chunk-727SXJPM-DiL1P1kA.js → dist/rcs-web/assets/chunk-727SXJPM-BqK0ih5x.js} +1 -1
  29. package/{packages/remote-control-server/web/dist/assets/chunk-AQP2D5EJ-CapDNDA2.js → dist/rcs-web/assets/chunk-AQP2D5EJ-BqbZo8Yj.js} +1 -1
  30. package/dist/rcs-web/assets/{chunk-FMBD7UC4-LbpvFjyd.js → chunk-FMBD7UC4-DPaHLrRQ.js} +1 -1
  31. package/dist/rcs-web/assets/{chunk-ND2GUHAM-CzgCleAV.js → chunk-ND2GUHAM-DLFqo9BD.js} +1 -1
  32. package/dist/rcs-web/assets/{chunk-QZHKN3VN-CLwirFtM.js → chunk-QZHKN3VN-BGxZPgfS.js} +1 -1
  33. package/dist/rcs-web/assets/classDiagram-4FO5ZUOK--ySrRR0W.js +1 -0
  34. package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2--ySrRR0W.js +1 -0
  35. package/dist/rcs-web/assets/{code-block-IT6T5CEO-CPLRB_pE.js → code-block-IT6T5CEO-CSwLPJ0x.js} +1 -1
  36. package/dist/rcs-web/assets/{copy-ds55WfXQ.js → copy-BhKgO2-h.js} +1 -1
  37. package/dist/rcs-web/assets/{cose-bilkent-S5V4N54A-CJQmna96.js → cose-bilkent-S5V4N54A-CEbUVDno.js} +1 -1
  38. package/dist/rcs-web/assets/{dagre-BM42HDAG-DEhEovt8.js → dagre-BM42HDAG-BOpyYtmk.js} +1 -1
  39. package/dist/rcs-web/assets/{diagram-2AECGRRQ-4okwBc-D.js → diagram-2AECGRRQ-BloFuIVx.js} +1 -1
  40. package/dist/rcs-web/assets/{diagram-5GNKFQAL-H2-k4m--.js → diagram-5GNKFQAL-ODoXsyn6.js} +1 -1
  41. package/{packages/remote-control-server/web/dist/assets/diagram-KO2AKTUF-DDErYX7-.js → dist/rcs-web/assets/diagram-KO2AKTUF-CqvO6a9C.js} +1 -1
  42. package/dist/rcs-web/assets/{diagram-LMA3HP47-l4LQiTmZ.js → diagram-LMA3HP47-_GbpEoyV.js} +1 -1
  43. package/{packages/remote-control-server/web/dist/assets/diagram-OG6HWLK6-CpAEcjR4.js → dist/rcs-web/assets/diagram-OG6HWLK6-Es7g24jE.js} +1 -1
  44. package/dist/rcs-web/assets/{dialog-BUpbhUDV.js → dialog-BBq_xUNv.js} +1 -1
  45. package/{packages/remote-control-server/web/dist/assets/erDiagram-TEJ5UH35-CzSfImjG.js → dist/rcs-web/assets/erDiagram-TEJ5UH35-5RgvoMG8.js} +1 -1
  46. package/dist/rcs-web/assets/{flowDiagram-I6XJVG4X-Dr-LtHsL.js → flowDiagram-I6XJVG4X-CoaA57yK.js} +1 -1
  47. package/{packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-CXpEIO6H.js → dist/rcs-web/assets/ganttDiagram-6RSMTGT7-6j5ZIgMM.js} +1 -1
  48. package/{packages/remote-control-server/web/dist/assets/gitGraphDiagram-PVQCEYII-Doj2VKE1.js → dist/rcs-web/assets/gitGraphDiagram-PVQCEYII-COZ5Q_FL.js} +1 -1
  49. package/dist/rcs-web/assets/{infoDiagram-5YYISTIA-CFJYX2aM.js → infoDiagram-5YYISTIA-Bx0c_B3n.js} +1 -1
  50. package/dist/rcs-web/assets/{ishikawaDiagram-YF4QCWOH-F50-t8RF.js → ishikawaDiagram-YF4QCWOH-dHJBXkSa.js} +1 -1
  51. package/dist/rcs-web/assets/{journeyDiagram-JHISSGLW-Dl5ueEc9.js → journeyDiagram-JHISSGLW-Dcq9iFgM.js} +1 -1
  52. package/dist/rcs-web/assets/{kanban-definition-UN3LZRKU-seqONfO3.js → kanban-definition-UN3LZRKU-CZxcvp-B.js} +1 -1
  53. package/dist/rcs-web/assets/{linear-Dv62-Sa5.js → linear-Bv6UyZQa.js} +1 -1
  54. package/dist/rcs-web/assets/{main-Cv-18i1u.js → main-By9kIvu-.js} +19 -19
  55. package/dist/rcs-web/assets/main-C-SKezR2.css +1 -0
  56. package/{packages/remote-control-server/web/dist/assets/mermaid-VLURNSYL-HzkeBXwF.js → dist/rcs-web/assets/mermaid-VLURNSYL-DduLrURr.js} +4 -4
  57. package/dist/rcs-web/assets/{mermaid.core-LpWnkgo7.js → mermaid.core-Bxop4hX2.js} +5 -5
  58. package/{packages/remote-control-server/web/dist/assets/mindmap-definition-RKZ34NQL-6-cD5kGK.js → dist/rcs-web/assets/mindmap-definition-RKZ34NQL-OPyGyOpN.js} +1 -1
  59. package/dist/rcs-web/assets/{pieDiagram-4H26LBE5-C9zkUn5q.js → pieDiagram-4H26LBE5-B4uZJNDD.js} +1 -1
  60. package/dist/rcs-web/assets/{quadrantDiagram-W4KKPZXB-CpGzs4_X.js → quadrantDiagram-W4KKPZXB-DGDKsLDP.js} +1 -1
  61. package/dist/rcs-web/assets/{refresh-cw-BRGSdX3K.js → refresh-cw-NV7B8IJD.js} +1 -1
  62. package/dist/rcs-web/assets/{requirementDiagram-4Y6WPE33-DVgiogrq.js → requirementDiagram-4Y6WPE33-CgBcr3ay.js} +1 -1
  63. package/dist/rcs-web/assets/{sankeyDiagram-5OEKKPKP-BLFunPVU.js → sankeyDiagram-5OEKKPKP-CnIWx0dJ.js} +1 -1
  64. package/dist/rcs-web/assets/{sequenceDiagram-3UESZ5HK-C9K1xnOT.js → sequenceDiagram-3UESZ5HK-B8U7yJ7k.js} +1 -1
  65. package/dist/rcs-web/assets/{stateDiagram-AJRCARHV-vifFCjen.js → stateDiagram-AJRCARHV-eOqfxib6.js} +1 -1
  66. package/dist/rcs-web/assets/{stateDiagram-v2-BHNVJYJU-7gdiYOYv.js → stateDiagram-v2-BHNVJYJU-z6cYmgsI.js} +1 -1
  67. package/{packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-DXNkBwBM.js → dist/rcs-web/assets/timeline-definition-PNZ67QCA-BLAtSeoe.js} +1 -1
  68. package/dist/rcs-web/assets/{vennDiagram-CIIHVFJN-DKQuds1M.js → vennDiagram-CIIHVFJN-x2K-Z8M5.js} +1 -1
  69. package/dist/rcs-web/assets/{wardleyDiagram-YWT4CUSO-DM8Y_x69.js → wardleyDiagram-YWT4CUSO-BZyV-nKl.js} +1 -1
  70. package/dist/rcs-web/assets/{xychartDiagram-2RQKCTM6-CZNSppIC.js → xychartDiagram-2RQKCTM6-BXBh8hUz.js} +1 -1
  71. package/dist/rcs-web/index.html +2 -2
  72. package/package.json +1 -1
  73. package/packages/remote-control-server/web/dist/assets/{AdminPanel-N24fbtDr.js → AdminPanel-DUladavo.js} +1 -1
  74. package/packages/remote-control-server/web/dist/assets/{ArtifactView-BDbNCtzr.js → ArtifactView-n0v6hnzo.js} +1 -1
  75. package/{dist/rcs-web/assets/ArtifactsGallery-BhxPaq_Y.js → packages/remote-control-server/web/dist/assets/ArtifactsGallery-ug-kp4qP.js} +5 -5
  76. package/{dist/rcs-web/assets/Claim-ClId-sat.js → packages/remote-control-server/web/dist/assets/Claim-CYVUcDxH.js} +1 -1
  77. package/packages/remote-control-server/web/dist/assets/Dashboard--x6EF7xP.js +6 -0
  78. package/packages/remote-control-server/web/dist/assets/Join-DDTbyo3-.js +1 -0
  79. package/packages/remote-control-server/web/dist/assets/Login-CR9Rx-mk.js +1 -0
  80. package/packages/remote-control-server/web/dist/assets/Register-BFzxxFmG.js +1 -0
  81. package/packages/remote-control-server/web/dist/assets/{SessionDetail-C-lPPdGL.js → SessionDetail-CsnvwQ0t.js} +9 -9
  82. package/packages/remote-control-server/web/dist/assets/{SessionVisibilityBadge-rHbdCbCs.js → SessionVisibilityBadge-IJ03myi1.js} +2 -2
  83. package/packages/remote-control-server/web/dist/assets/Setup-CDlsj-Tq.js +1 -0
  84. package/packages/remote-control-server/web/dist/assets/{ShareLanding-Bd--e_ru.js → ShareLanding-yU_oNRIA.js} +1 -1
  85. package/packages/remote-control-server/web/dist/assets/{TeamCreate-btnOXimS.js → TeamCreate-BZFPWa3R.js} +1 -1
  86. package/packages/remote-control-server/web/dist/assets/{TeamDetail-Bq7sfprF.js → TeamDetail-Bs8euLfd.js} +2 -2
  87. package/packages/remote-control-server/web/dist/assets/{TeamList-Ckc_5rPG.js → TeamList-Czzk-glq.js} +1 -1
  88. package/packages/remote-control-server/web/dist/assets/{TeamSettings-Dn8wW8D0.js → TeamSettings-CXTCaWDB.js} +1 -1
  89. package/packages/remote-control-server/web/dist/assets/{UserSearchInput-BRoxtwWw.js → UserSearchInput-CGtPgB9t.js} +1 -1
  90. package/packages/remote-control-server/web/dist/assets/{UserSettings-BsPA9Uww.js → UserSettings-CL5LzA-S.js} +1 -1
  91. package/packages/remote-control-server/web/dist/assets/{arc-WLkbBjJm.js → arc-DjW5P0be.js} +1 -1
  92. package/{dist/rcs-web/assets/architectureDiagram-3BPJPVTR-BJi4DwhI.js → packages/remote-control-server/web/dist/assets/architectureDiagram-3BPJPVTR-BusiH9yR.js} +1 -1
  93. package/{dist/rcs-web/assets/blockDiagram-GPEHLZMM-CmqVqUku.js → packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-3edPnryX.js} +1 -1
  94. package/{dist/rcs-web/assets/c4Diagram-AAUBKEIU-z7aUi41b.js → packages/remote-control-server/web/dist/assets/c4Diagram-AAUBKEIU-ZLlCXozI.js} +1 -1
  95. package/packages/remote-control-server/web/dist/assets/channel-ZxgdY0DL.js +1 -0
  96. package/packages/remote-control-server/web/dist/assets/{chunk-2J33WTMH-DmlfMgi-.js → chunk-2J33WTMH-DGhWwfFz.js} +1 -1
  97. package/packages/remote-control-server/web/dist/assets/{chunk-4BX2VUAB-DvBN8rCU.js → chunk-4BX2VUAB-Cu1Rovtf.js} +1 -1
  98. package/packages/remote-control-server/web/dist/assets/{chunk-55IACEB6-DvXeBOx-.js → chunk-55IACEB6-DHElqmXB.js} +1 -1
  99. package/{dist/rcs-web/assets/chunk-727SXJPM-DiL1P1kA.js → packages/remote-control-server/web/dist/assets/chunk-727SXJPM-BqK0ih5x.js} +1 -1
  100. package/{dist/rcs-web/assets/chunk-AQP2D5EJ-CapDNDA2.js → packages/remote-control-server/web/dist/assets/chunk-AQP2D5EJ-BqbZo8Yj.js} +1 -1
  101. package/packages/remote-control-server/web/dist/assets/{chunk-FMBD7UC4-LbpvFjyd.js → chunk-FMBD7UC4-DPaHLrRQ.js} +1 -1
  102. package/packages/remote-control-server/web/dist/assets/{chunk-ND2GUHAM-CzgCleAV.js → chunk-ND2GUHAM-DLFqo9BD.js} +1 -1
  103. package/packages/remote-control-server/web/dist/assets/{chunk-QZHKN3VN-CLwirFtM.js → chunk-QZHKN3VN-BGxZPgfS.js} +1 -1
  104. package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK--ySrRR0W.js +1 -0
  105. package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2--ySrRR0W.js +1 -0
  106. package/packages/remote-control-server/web/dist/assets/{code-block-IT6T5CEO-CPLRB_pE.js → code-block-IT6T5CEO-CSwLPJ0x.js} +1 -1
  107. package/packages/remote-control-server/web/dist/assets/{copy-ds55WfXQ.js → copy-BhKgO2-h.js} +1 -1
  108. package/packages/remote-control-server/web/dist/assets/{cose-bilkent-S5V4N54A-CJQmna96.js → cose-bilkent-S5V4N54A-CEbUVDno.js} +1 -1
  109. package/packages/remote-control-server/web/dist/assets/{dagre-BM42HDAG-DEhEovt8.js → dagre-BM42HDAG-BOpyYtmk.js} +1 -1
  110. package/packages/remote-control-server/web/dist/assets/{diagram-2AECGRRQ-4okwBc-D.js → diagram-2AECGRRQ-BloFuIVx.js} +1 -1
  111. package/packages/remote-control-server/web/dist/assets/{diagram-5GNKFQAL-H2-k4m--.js → diagram-5GNKFQAL-ODoXsyn6.js} +1 -1
  112. package/{dist/rcs-web/assets/diagram-KO2AKTUF-DDErYX7-.js → packages/remote-control-server/web/dist/assets/diagram-KO2AKTUF-CqvO6a9C.js} +1 -1
  113. package/packages/remote-control-server/web/dist/assets/{diagram-LMA3HP47-l4LQiTmZ.js → diagram-LMA3HP47-_GbpEoyV.js} +1 -1
  114. package/{dist/rcs-web/assets/diagram-OG6HWLK6-CpAEcjR4.js → packages/remote-control-server/web/dist/assets/diagram-OG6HWLK6-Es7g24jE.js} +1 -1
  115. package/packages/remote-control-server/web/dist/assets/{dialog-BUpbhUDV.js → dialog-BBq_xUNv.js} +1 -1
  116. package/{dist/rcs-web/assets/erDiagram-TEJ5UH35-CzSfImjG.js → packages/remote-control-server/web/dist/assets/erDiagram-TEJ5UH35-5RgvoMG8.js} +1 -1
  117. package/packages/remote-control-server/web/dist/assets/{flowDiagram-I6XJVG4X-Dr-LtHsL.js → flowDiagram-I6XJVG4X-CoaA57yK.js} +1 -1
  118. package/{dist/rcs-web/assets/ganttDiagram-6RSMTGT7-CXpEIO6H.js → packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-6j5ZIgMM.js} +1 -1
  119. package/{dist/rcs-web/assets/gitGraphDiagram-PVQCEYII-Doj2VKE1.js → packages/remote-control-server/web/dist/assets/gitGraphDiagram-PVQCEYII-COZ5Q_FL.js} +1 -1
  120. package/packages/remote-control-server/web/dist/assets/{infoDiagram-5YYISTIA-CFJYX2aM.js → infoDiagram-5YYISTIA-Bx0c_B3n.js} +1 -1
  121. package/packages/remote-control-server/web/dist/assets/{ishikawaDiagram-YF4QCWOH-F50-t8RF.js → ishikawaDiagram-YF4QCWOH-dHJBXkSa.js} +1 -1
  122. package/packages/remote-control-server/web/dist/assets/{journeyDiagram-JHISSGLW-Dl5ueEc9.js → journeyDiagram-JHISSGLW-Dcq9iFgM.js} +1 -1
  123. package/packages/remote-control-server/web/dist/assets/{kanban-definition-UN3LZRKU-seqONfO3.js → kanban-definition-UN3LZRKU-CZxcvp-B.js} +1 -1
  124. package/packages/remote-control-server/web/dist/assets/{linear-Dv62-Sa5.js → linear-Bv6UyZQa.js} +1 -1
  125. package/packages/remote-control-server/web/dist/assets/{main-Cv-18i1u.js → main-By9kIvu-.js} +19 -19
  126. package/packages/remote-control-server/web/dist/assets/main-C-SKezR2.css +1 -0
  127. package/{dist/rcs-web/assets/mermaid-VLURNSYL-HzkeBXwF.js → packages/remote-control-server/web/dist/assets/mermaid-VLURNSYL-DduLrURr.js} +4 -4
  128. package/packages/remote-control-server/web/dist/assets/{mermaid.core-LpWnkgo7.js → mermaid.core-Bxop4hX2.js} +5 -5
  129. package/{dist/rcs-web/assets/mindmap-definition-RKZ34NQL-6-cD5kGK.js → packages/remote-control-server/web/dist/assets/mindmap-definition-RKZ34NQL-OPyGyOpN.js} +1 -1
  130. package/packages/remote-control-server/web/dist/assets/{pieDiagram-4H26LBE5-C9zkUn5q.js → pieDiagram-4H26LBE5-B4uZJNDD.js} +1 -1
  131. package/packages/remote-control-server/web/dist/assets/{quadrantDiagram-W4KKPZXB-CpGzs4_X.js → quadrantDiagram-W4KKPZXB-DGDKsLDP.js} +1 -1
  132. package/packages/remote-control-server/web/dist/assets/{refresh-cw-BRGSdX3K.js → refresh-cw-NV7B8IJD.js} +1 -1
  133. package/packages/remote-control-server/web/dist/assets/{requirementDiagram-4Y6WPE33-DVgiogrq.js → requirementDiagram-4Y6WPE33-CgBcr3ay.js} +1 -1
  134. package/packages/remote-control-server/web/dist/assets/{sankeyDiagram-5OEKKPKP-BLFunPVU.js → sankeyDiagram-5OEKKPKP-CnIWx0dJ.js} +1 -1
  135. package/packages/remote-control-server/web/dist/assets/{sequenceDiagram-3UESZ5HK-C9K1xnOT.js → sequenceDiagram-3UESZ5HK-B8U7yJ7k.js} +1 -1
  136. package/packages/remote-control-server/web/dist/assets/{stateDiagram-AJRCARHV-vifFCjen.js → stateDiagram-AJRCARHV-eOqfxib6.js} +1 -1
  137. package/packages/remote-control-server/web/dist/assets/{stateDiagram-v2-BHNVJYJU-7gdiYOYv.js → stateDiagram-v2-BHNVJYJU-z6cYmgsI.js} +1 -1
  138. package/{dist/rcs-web/assets/timeline-definition-PNZ67QCA-DXNkBwBM.js → packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-BLAtSeoe.js} +1 -1
  139. package/packages/remote-control-server/web/dist/assets/{vennDiagram-CIIHVFJN-DKQuds1M.js → vennDiagram-CIIHVFJN-x2K-Z8M5.js} +1 -1
  140. package/packages/remote-control-server/web/dist/assets/{wardleyDiagram-YWT4CUSO-DM8Y_x69.js → wardleyDiagram-YWT4CUSO-BZyV-nKl.js} +1 -1
  141. package/packages/remote-control-server/web/dist/assets/{xychartDiagram-2RQKCTM6-CZNSppIC.js → xychartDiagram-2RQKCTM6-BXBh8hUz.js} +1 -1
  142. package/packages/remote-control-server/web/dist/index.html +2 -2
  143. package/dist/rcs-web/assets/Dashboard-ppeF5vBM.js +0 -6
  144. package/dist/rcs-web/assets/Join-xPPDkVBy.js +0 -1
  145. package/dist/rcs-web/assets/Login-BKaBogPS.js +0 -1
  146. package/dist/rcs-web/assets/Register-BP0npVpc.js +0 -1
  147. package/dist/rcs-web/assets/Setup-CPfviAHa.js +0 -1
  148. package/dist/rcs-web/assets/channel-B6VWMPrR.js +0 -1
  149. package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-C568lnYy.js +0 -1
  150. package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-C568lnYy.js +0 -1
  151. package/dist/rcs-web/assets/main-DBlZ5szI.css +0 -1
  152. package/packages/remote-control-server/web/dist/assets/Dashboard-ppeF5vBM.js +0 -6
  153. package/packages/remote-control-server/web/dist/assets/Join-xPPDkVBy.js +0 -1
  154. package/packages/remote-control-server/web/dist/assets/Login-BKaBogPS.js +0 -1
  155. package/packages/remote-control-server/web/dist/assets/Register-BP0npVpc.js +0 -1
  156. package/packages/remote-control-server/web/dist/assets/Setup-CPfviAHa.js +0 -1
  157. package/packages/remote-control-server/web/dist/assets/channel-B6VWMPrR.js +0 -1
  158. package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-C568lnYy.js +0 -1
  159. package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-C568lnYy.js +0 -1
  160. package/packages/remote-control-server/web/dist/assets/main-DBlZ5szI.css +0 -1
@@ -1 +1 @@
1
- import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{aC as x,aD as o,Y as m,aw as s,al as l,z as u}from"./main-Cv-18i1u.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){x();const[a,i]=d.useState([]),{myTeams:r,isLoading:c}=o(),n=d.useCallback(async()=>{try{const t=await m();i(t||[])}catch(t){console.error("Admin: failed to load sessions",t)}},[]);return d.useEffect(()=>{n()},[n]),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-8",children:[e.jsx("h1",{className:"mb-6 font-display text-2xl font-semibold text-text-primary",children:s("admin.title")}),e.jsxs("section",{className:"mb-10",children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.teams")," (",r.length,")"]}),c?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("common.loading")}):r.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noTeams")}):e.jsx("div",{className:"space-y-2",children:r.map(t=>e.jsxs("a",{href:`/teams/${t.slug}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"font-medium text-text-primary",children:t.name}),e.jsx("span",{className:"ml-2 text-xs text-text-muted",children:t.slug})]}),e.jsx("span",{className:"text-xs text-text-muted",children:l(new Date(t.created_at).getTime()/1e3)})]},t.id))})]}),e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.sessions")," (",a.length,")"]}),a.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noSessions")}):e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("a",{href:`/code/${t.id}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),e.jsx("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-xs text-text-muted",children:t.source||"unknown"})]}),e.jsx("div",{className:"truncate text-xs text-text-muted",children:t.id})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-3",children:[e.jsx(u,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:l(t.updated_at||t.created_at)})]})]},t.id))})]})]})})}export{j as AdminPanel};
1
+ import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{aD as c,aE as o,Z as m,ax as s,am as l,E as u}from"./main-By9kIvu-.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){c();const[a,i]=d.useState([]),{myTeams:r,isLoading:x}=o(),n=d.useCallback(async()=>{try{const t=await m();i(t||[])}catch(t){console.error("Admin: failed to load sessions",t)}},[]);return d.useEffect(()=>{n()},[n]),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-8",children:[e.jsx("h1",{className:"mb-6 font-display text-2xl font-semibold text-text-primary",children:s("admin.title")}),e.jsxs("section",{className:"mb-10",children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.teams")," (",r.length,")"]}),x?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("common.loading")}):r.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noTeams")}):e.jsx("div",{className:"space-y-2",children:r.map(t=>e.jsxs("a",{href:`/teams/${t.slug}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"font-medium text-text-primary",children:t.name}),e.jsx("span",{className:"ml-2 text-xs text-text-muted",children:t.slug})]}),e.jsx("span",{className:"text-xs text-text-muted",children:l(new Date(t.created_at).getTime()/1e3)})]},t.id))})]}),e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.sessions")," (",a.length,")"]}),a.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noSessions")}):e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("a",{href:`/code/${t.id}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),e.jsx("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-xs text-text-muted",children:t.source||"unknown"})]}),e.jsx("div",{className:"truncate text-xs text-text-muted",children:t.id})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-3",children:[e.jsx(u,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:l(t.updated_at||t.created_at)})]})]},t.id))})]})]})})}export{j as AdminPanel};
@@ -1 +1 @@
1
- import{e as a,j as t}from"./vendor-DE_-CLIE.js";import{aC as A,Z as j,aw as r,V as q,ah as R,P as U,G as F}from"./main-Cv-18i1u.js";import{S as O,E as G,C as K}from"./ArtifactsGallery-BhxPaq_Y.js";import{R as P}from"./refresh-cw-BRGSdX3K.js";import{C as V}from"./copy-ds55WfXQ.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";import"./dialog-BUpbhUDV.js";let m=null;function J(n,c,e=0){b();const o=`/web/sessions/${n}/events`,l=new EventSource(o,{withCredentials:!0});m=l;let u=e;l.addEventListener("message",p=>{try{const x=JSON.parse(p.data);if(x.seqNum!==void 0&&x.seqNum<=u)return;x.seqNum!==void 0&&(u=x.seqNum),c(x)}catch{}}),l.addEventListener("error",()=>{console.warn("[SSE] error, readyState:",l.readyState),l.readyState===EventSource.CLOSED&&(l.close(),b())})}function b(){m&&(m.close(),m=null)}function M(n,c){const e=a.useRef(c);e.current=c;const o=a.useCallback(l=>{e.current(l)},[]);a.useEffect(()=>{if(n)return J(n,o),()=>{b()}},[n,o])}function I({artifactId:n,onBack:c}){A();const[e,o]=a.useState(null),[l,u]=a.useState(""),[p,x]=a.useState(!1),[S,f]=a.useState(0),[w,h]=a.useState(!1),[g,C]=a.useState(null),[E,k]=a.useState("template"),[d,y]=a.useState(!1);a.useEffect(()=>{let s=!1;return j(n).then(i=>{s||o(i)}).catch(i=>{s||u(i instanceof Error?i.message:r("artifacts.viewNotFound"))}),()=>{s=!0}},[n]);const v=a.useCallback(()=>{j(n).then(s=>o(s)).catch(()=>{})},[n]),_=a.useCallback(s=>{var i;s.type==="artifact_updated"&&((i=s.payload)!=null&&i.id&&s.payload.id!==n||(v(),f(D=>D+1),y(!0)))},[n,v]);M((e==null?void 0:e.session_id)??null,_),a.useEffect(()=>{if(!d)return;const s=setTimeout(()=>y(!1),2500);return()=>clearTimeout(s)},[d]);const N=a.useCallback(s=>{e&&(C(e),k(s),h(!0))},[e]),$=a.useCallback(s=>{h(!1),o(i=>i?{...i,...s}:s),f(i=>i+1)},[]),T=a.useCallback(async()=>{if(window.confirm(r("artifacts.delete")+" — "+n.slice(0,8)+"…?"))try{await q(n),c()}catch(s){alert(s instanceof Error?s.message:r("artifacts.deleteFailed"))}},[n,c]),L=a.useCallback(async()=>{if(!e)return;await R(`${window.location.origin}${e.url}`)&&(x(!0),setTimeout(()=>x(!1),1500))},[e]);return l?t.jsx("div",{className:"flex flex-1 items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-status-error",children:r("artifacts.viewNotFound")}),t.jsx("p",{className:"mt-1 text-xs text-text-muted",children:l}),t.jsx("button",{type:"button",onClick:c,className:"mt-4 rounded-md border border-border px-4 py-2 text-sm text-text-secondary hover:bg-surface-2",children:r("artifacts.backToGallery")})]})}):e?t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border bg-surface-1 px-4 py-2.5",children:[t.jsx("button",{type:"button",onClick:c,className:"text-sm text-text-muted hover:text-text-primary",children:r("artifacts.backToGallery")}),t.jsx("span",{className:"text-text-muted/40",children:"/"}),t.jsx("span",{className:"truncate font-medium text-text-primary",children:e.title||e.id.slice(0,12)}),t.jsx("span",{className:`rounded-full px-2 py-0.5 text-[11px] transition-colors ${d?"bg-status-active/15 text-status-active":"bg-surface-3 text-text-muted"}`,title:d?r("artifacts.view.liveUpdated"):void 0,children:d?`↻ v${e.version}`:`v${e.version}`}),e.session_id&&t.jsxs("a",{href:`/code/${e.session_id}`,className:"truncate font-mono text-[11px] text-text-muted hover:text-accent",title:e.session_id,children:[r("artifacts.session"),": ",e.session_id.slice(0,14),"…"]}),e.expires_at&&t.jsxs("span",{className:"text-[11px] text-text-muted",title:e.expires_at,children:[r("artifacts.expires"),": ",new Date(e.expires_at).toLocaleDateString()]}),t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[t.jsx("button",{type:"button",onClick:()=>f(s=>s+1),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:r("common.loading"),children:t.jsx(P,{className:"h-3.5 w-3.5"})}),t.jsx("button",{type:"button",onClick:()=>N("ai"),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:r("artifacts.aiUpdate"),children:t.jsx(O,{className:"h-3.5 w-3.5"})}),e.can_manage&&t.jsx("button",{type:"button",onClick:()=>N("template"),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:r("artifacts.edit"),children:t.jsx(U,{className:"h-3.5 w-3.5"})}),t.jsxs("button",{type:"button",onClick:L,className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:`${r("artifacts.copyLink")} · ${r("artifacts.linkNotice")}`,children:[t.jsx(V,{className:"h-3.5 w-3.5"}),p&&t.jsx("span",{className:"text-status-active",children:r("artifacts.copied")})]}),t.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:r("artifacts.openInNewTab"),children:t.jsx(G,{className:"h-3.5 w-3.5"})}),t.jsx("button",{type:"button",onClick:T,className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-status-error/10 hover:text-status-error",title:r("artifacts.delete"),children:t.jsx(F,{className:"h-3.5 w-3.5"})})]})]}),t.jsx("iframe",{src:`${e.url}${e.url.includes("?")?"&":"?"}_=${Date.now()}`,title:e.title||e.id,className:"min-h-0 w-full flex-1 border-0 bg-white",sandbox:"allow-scripts allow-popups allow-forms"},S),t.jsx(K,{open:w,onClose:()=>h(!1),onCreated:$,editArtifact:g,initialMode:E})]}):t.jsx("div",{className:"flex flex-1 items-center justify-center text-text-muted",children:r("common.loading")})}export{I as ArtifactView};
1
+ import{e as a,j as t}from"./vendor-DE_-CLIE.js";import{aD as A,_ as j,ax as r,W as q,ai as R,P as U,H as F}from"./main-By9kIvu-.js";import{S as O,E as G,C as K}from"./ArtifactsGallery-ug-kp4qP.js";import{R as P}from"./refresh-cw-NV7B8IJD.js";import{C as H}from"./copy-BhKgO2-h.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";import"./dialog-BBq_xUNv.js";let m=null;function J(n,c,e=0){b();const o=`/web/sessions/${n}/events`,l=new EventSource(o,{withCredentials:!0});m=l;let u=e;l.addEventListener("message",p=>{try{const x=JSON.parse(p.data);if(x.seqNum!==void 0&&x.seqNum<=u)return;x.seqNum!==void 0&&(u=x.seqNum),c(x)}catch{}}),l.addEventListener("error",()=>{console.warn("[SSE] error, readyState:",l.readyState),l.readyState===EventSource.CLOSED&&(l.close(),b())})}function b(){m&&(m.close(),m=null)}function M(n,c){const e=a.useRef(c);e.current=c;const o=a.useCallback(l=>{e.current(l)},[]);a.useEffect(()=>{if(n)return J(n,o),()=>{b()}},[n,o])}function I({artifactId:n,onBack:c}){A();const[e,o]=a.useState(null),[l,u]=a.useState(""),[p,x]=a.useState(!1),[S,f]=a.useState(0),[w,h]=a.useState(!1),[g,C]=a.useState(null),[E,k]=a.useState("template"),[d,y]=a.useState(!1);a.useEffect(()=>{let s=!1;return j(n).then(i=>{s||o(i)}).catch(i=>{s||u(i instanceof Error?i.message:r("artifacts.viewNotFound"))}),()=>{s=!0}},[n]);const v=a.useCallback(()=>{j(n).then(s=>o(s)).catch(()=>{})},[n]),_=a.useCallback(s=>{var i;s.type==="artifact_updated"&&((i=s.payload)!=null&&i.id&&s.payload.id!==n||(v(),f(L=>L+1),y(!0)))},[n,v]);M((e==null?void 0:e.session_id)??null,_),a.useEffect(()=>{if(!d)return;const s=setTimeout(()=>y(!1),2500);return()=>clearTimeout(s)},[d]);const N=a.useCallback(s=>{e&&(C(e),k(s),h(!0))},[e]),$=a.useCallback(s=>{h(!1),o(i=>i?{...i,...s}:s),f(i=>i+1)},[]),T=a.useCallback(async()=>{if(window.confirm(r("artifacts.delete")+" — "+n.slice(0,8)+"…?"))try{await q(n),c()}catch(s){alert(s instanceof Error?s.message:r("artifacts.deleteFailed"))}},[n,c]),D=a.useCallback(async()=>{if(!e)return;await R(`${window.location.origin}${e.url}`)&&(x(!0),setTimeout(()=>x(!1),1500))},[e]);return l?t.jsx("div",{className:"flex flex-1 items-center justify-center",children:t.jsxs("div",{className:"text-center",children:[t.jsx("p",{className:"text-status-error",children:r("artifacts.viewNotFound")}),t.jsx("p",{className:"mt-1 text-xs text-text-muted",children:l}),t.jsx("button",{type:"button",onClick:c,className:"mt-4 rounded-md border border-border px-4 py-2 text-sm text-text-secondary hover:bg-surface-2",children:r("artifacts.backToGallery")})]})}):e?t.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[t.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-border bg-surface-1 px-4 py-2.5",children:[t.jsx("button",{type:"button",onClick:c,className:"text-sm text-text-muted hover:text-text-primary",children:r("artifacts.backToGallery")}),t.jsx("span",{className:"text-text-muted/40",children:"/"}),t.jsx("span",{className:"truncate font-medium text-text-primary",children:e.title||e.id.slice(0,12)}),t.jsx("span",{className:`rounded-full px-2 py-0.5 text-[11px] transition-colors ${d?"bg-status-active/15 text-status-active":"bg-surface-3 text-text-muted"}`,title:d?r("artifacts.view.liveUpdated"):void 0,children:d?`↻ v${e.version}`:`v${e.version}`}),e.session_id&&t.jsxs("a",{href:`/code/${e.session_id}`,className:"truncate font-mono text-[11px] text-text-muted hover:text-accent",title:e.session_id,children:[r("artifacts.session"),": ",e.session_id.slice(0,14),"…"]}),e.expires_at&&t.jsxs("span",{className:"text-[11px] text-text-muted",title:e.expires_at,children:[r("artifacts.expires"),": ",new Date(e.expires_at).toLocaleDateString()]}),t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[t.jsx("button",{type:"button",onClick:()=>f(s=>s+1),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:r("common.loading"),children:t.jsx(P,{className:"h-3.5 w-3.5"})}),t.jsx("button",{type:"button",onClick:()=>N("ai"),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:r("artifacts.aiUpdate"),children:t.jsx(O,{className:"h-3.5 w-3.5"})}),e.can_manage&&t.jsx("button",{type:"button",onClick:()=>N("template"),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:r("artifacts.edit"),children:t.jsx(U,{className:"h-3.5 w-3.5"})}),t.jsxs("button",{type:"button",onClick:D,className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:`${r("artifacts.copyLink")} · ${r("artifacts.linkNotice")}`,children:[t.jsx(H,{className:"h-3.5 w-3.5"}),p&&t.jsx("span",{className:"text-status-active",children:r("artifacts.copied")})]}),t.jsx("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:r("artifacts.openInNewTab"),children:t.jsx(G,{className:"h-3.5 w-3.5"})}),t.jsx("button",{type:"button",onClick:T,className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-status-error/10 hover:text-status-error",title:r("artifacts.delete"),children:t.jsx(F,{className:"h-3.5 w-3.5"})})]})]}),t.jsx("iframe",{src:`${e.url}${e.url.includes("?")?"&":"?"}_=${Date.now()}`,title:e.title||e.id,className:"min-h-0 w-full flex-1 border-0 bg-white",sandbox:"allow-scripts allow-popups allow-forms"},S),t.jsx(K,{open:w,onClose:()=>h(!1),onCreated:$,editArtifact:g,initialMode:E})]}):t.jsx("div",{className:"flex flex-1 items-center justify-center text-text-muted",children:r("common.loading")})}export{I as ArtifactView};
@@ -1,4 +1,4 @@
1
- var ht=Object.defineProperty;var ut=(t,e,r)=>e in t?ht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var S=(t,e,r)=>ut(t,typeof e!="symbol"?e+"":e,r);import{e as k,j as o}from"./vendor-DE_-CLIE.js";import{ai as Re,am as ft,aC as Ve,aD as mt,_ as xt,aw as f,V as gt,ah as bt,F as kt,g as yt,P as wt,G as vt,q as He,Z as St,a3 as Rt,ar as Tt,a2 as $t,ab as jt,ac as Et,K as Nt,b as Ct}from"./main-Cv-18i1u.js";import{D as It,a as At,c as Lt,d as zt,b as _t}from"./dialog-BUpbhUDV.js";import{C as Dt}from"./copy-ds55WfXQ.js";/**
1
+ var ht=Object.defineProperty;var ut=(t,e,r)=>e in t?ht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var S=(t,e,r)=>ut(t,typeof e!="symbol"?e+"":e,r);import{e as k,j as o}from"./vendor-DE_-CLIE.js";import{aj as Re,an as ft,aD as We,aE as mt,$ as xt,ax as f,W as gt,ai as bt,F as kt,g as yt,P as wt,H as vt,q as He,_ as St,a4 as Rt,as as Tt,a3 as $t,ac as jt,ad as Et,N as Nt,b as Ct}from"./main-By9kIvu-.js";import{D as It,a as At,c as Lt,d as zt,b as _t}from"./dialog-BBq_xUNv.js";import{C as Dt}from"./copy-BhKgO2-h.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -351,8 +351,8 @@ function render() {
351
351
  render();
352
352
  <\/script>
353
353
  </body>
354
- </html>`,ke=[{id:"blank",titleKey:"artifacts.create.templateBlank",descKey:"",defaultTitle:"Untitled Artifact",html:Ot},{id:"pr-review",titleKey:"artifacts.create.templatePrReview",descKey:"artifacts.templateDesc.prReview",defaultTitle:"PR Review",html:Kt},{id:"incident",titleKey:"artifacts.create.templateIncident",descKey:"artifacts.templateDesc.incident",defaultTitle:"Incident Timeline",html:Zt},{id:"dashboard",titleKey:"artifacts.create.templateDashboard",descKey:"artifacts.templateDesc.dashboard",defaultTitle:"Data Dashboard",html:Gt},{id:"checklist",titleKey:"artifacts.create.templateChecklist",descKey:"artifacts.templateDesc.checklist",defaultTitle:"Release Checklist",html:Ut}];function X(t){return ke.find(e=>e.id===t)??ke[0]}function Te(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Z=Te();function We(t){Z=t}var O={exec:()=>null};function w(t,e=""){let r=typeof t=="string"?t:t.source,a={replace:(s,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(E.caret,"$1"),r=r.replace(s,i),a},getRegex:()=>new RegExp(r,e)};return a}var Qt=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),E={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Vt=/^(?:[ \t]*(?:\n|$))+/,Wt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Xt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,re=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$e=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Xe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ye=w(Xe).replace(/bull/g,$e).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Jt=w(Xe).replace(/bull/g,$e).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),je=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,er=/^[^\n]+/,Ee=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,tr=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ee).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rr=w(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$e).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ne=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sr=w("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ne).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Je=w(je).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ar=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Je).getRegex(),Ce={blockquote:ar,code:Wt,def:tr,fences:Xt,heading:Yt,hr:re,html:sr,lheading:Ye,list:rr,newline:Vt,paragraph:Je,table:O,text:er},Fe=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),nr={...Ce,lheading:Jt,table:Fe,paragraph:w(je).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Fe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},ir={...Ce,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ne).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(je).replace("hr",re).replace("heading",` *#{1,6} *[^
355
- ]`).replace("lheading",Ye).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,or=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,et=/^( {2,}|\\)\n(?!\s*$)/,cr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,V=/[\p{P}\p{S}]/u,he=/[\s\p{P}\p{S}]/u,Ie=/[^\s\p{P}\p{S}]/u,dr=w(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,he).getRegex(),tt=/(?!~)[\p{P}\p{S}]/u,pr=/(?!~)[\s\p{P}\p{S}]/u,hr=/(?:[^\s\p{P}\p{S}]|~)/u,ur=w(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Qt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,fr=w(rt,"u").replace(/punct/g,V).getRegex(),mr=w(rt,"u").replace(/punct/g,tt).getRegex(),st="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xr=w(st,"gu").replace(/notPunctSpace/g,Ie).replace(/punctSpace/g,he).replace(/punct/g,V).getRegex(),gr=w(st,"gu").replace(/notPunctSpace/g,hr).replace(/punctSpace/g,pr).replace(/punct/g,tt).getRegex(),br=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ie).replace(/punctSpace/g,he).replace(/punct/g,V).getRegex(),kr=w(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,V).getRegex(),yr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",wr=w(yr,"gu").replace(/notPunctSpace/g,Ie).replace(/punctSpace/g,he).replace(/punct/g,V).getRegex(),vr=w(/\\(punct)/,"gu").replace(/punct/g,V).getRegex(),Sr=w(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Rr=w(Ne).replace("(?:-->|$)","-->").getRegex(),Tr=w("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Rr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),oe=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,$r=w(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",oe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),at=w(/^!?\[(label)\]\[(ref)\]/).replace("label",oe).replace("ref",Ee).getRegex(),nt=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ee).getRegex(),jr=w("reflink|nolink(?!\\()","g").replace("reflink",at).replace("nolink",nt).getRegex(),Oe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ae={_backpedal:O,anyPunctuation:vr,autolink:Sr,blockSkip:ur,br:et,code:or,del:O,delLDelim:O,delRDelim:O,emStrongLDelim:fr,emStrongRDelimAst:xr,emStrongRDelimUnd:br,escape:lr,link:$r,nolink:nt,punctuation:dr,reflink:at,reflinkSearch:jr,tag:Tr,text:cr,url:O},Er={...Ae,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",oe).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oe).getRegex()},ye={...Ae,emStrongRDelimAst:gr,emStrongLDelim:mr,delLDelim:kr,delRDelim:wr,url:w(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Oe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:w(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Oe).getRegex()},Nr={...ye,br:w(et).replace("{2,}","*").getRegex(),text:w(ye.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ie={normal:Ce,gfm:nr,pedantic:ir},Y={normal:Ae,gfm:ye,breaks:Nr,pedantic:Er},Cr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ke=t=>Cr[t];function _(t,e){if(e){if(E.escapeTest.test(t))return t.replace(E.escapeReplace,Ke)}else if(E.escapeTestNoEncode.test(t))return t.replace(E.escapeReplaceNoEncode,Ke);return t}function Ze(t){try{t=encodeURI(t).replace(E.percentDecode,"%")}catch{return null}return t}function Ge(t,e){var l;let r=t.replace(E.findPipe,(i,n,h)=>{let c=!1,u=n;for(;--u>=0&&h[u]==="\\";)c=!c;return c?"|":" |"}),a=r.split(E.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.trim())&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length<e;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(E.slashPipe,"|");return a}function J(t,e,r){let a=t.length;if(a===0)return"";let s=0;for(;s<a&&t.charAt(a-s-1)===e;)s++;return t.slice(0,a-s)}function Ir(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let a=0;a<t.length;a++)if(t[a]==="\\")a++;else if(t[a]===e[0])r++;else if(t[a]===e[1]&&(r--,r<0))return a;return r>0?-2:-1}function Ar(t,e=0){let r=e,a="";for(let s of t)if(s===" "){let l=4-r%4;a+=" ".repeat(l),r+=l}else a+=s,r++;return a}function Ue(t,e,r,a,s){let l=e.href,i=e.title||null,n=t[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let h={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:i,text:n,tokens:a.inlineTokens(n)};return a.state.inLink=!1,h}function Lr(t,e,r){let a=t.match(r.other.indentCodeCompensation);if(a===null)return e;let s=a[1];return e.split(`
354
+ </html>`,ke=[{id:"blank",titleKey:"artifacts.create.templateBlank",descKey:"",defaultTitle:"Untitled Artifact",html:Ot},{id:"pr-review",titleKey:"artifacts.create.templatePrReview",descKey:"artifacts.templateDesc.prReview",defaultTitle:"PR Review",html:Kt},{id:"incident",titleKey:"artifacts.create.templateIncident",descKey:"artifacts.templateDesc.incident",defaultTitle:"Incident Timeline",html:Zt},{id:"dashboard",titleKey:"artifacts.create.templateDashboard",descKey:"artifacts.templateDesc.dashboard",defaultTitle:"Data Dashboard",html:Gt},{id:"checklist",titleKey:"artifacts.create.templateChecklist",descKey:"artifacts.templateDesc.checklist",defaultTitle:"Release Checklist",html:Ut}];function X(t){return ke.find(e=>e.id===t)??ke[0]}function Te(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Z=Te();function Ve(t){Z=t}var O={exec:()=>null};function w(t,e=""){let r=typeof t=="string"?t:t.source,a={replace:(s,l)=>{let i=typeof l=="string"?l:l.source;return i=i.replace(E.caret,"$1"),r=r.replace(s,i),a},getRegex:()=>new RegExp(r,e)};return a}var Qt=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),E={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Wt=/^(?:[ \t]*(?:\n|$))+/,Vt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Xt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,re=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Yt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,$e=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Xe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ye=w(Xe).replace(/bull/g,$e).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Jt=w(Xe).replace(/bull/g,$e).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),je=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,er=/^[^\n]+/,Ee=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,tr=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ee).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),rr=w(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,$e).getRegex(),pe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ne=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,sr=w("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ne).replace("tag",pe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Je=w(je).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),ar=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Je).getRegex(),Ce={blockquote:ar,code:Vt,def:tr,fences:Xt,heading:Yt,hr:re,html:sr,lheading:Ye,list:rr,newline:Wt,paragraph:Je,table:O,text:er},Fe=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex(),nr={...Ce,lheading:Jt,table:Fe,paragraph:w(je).replace("hr",re).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Fe).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",pe).getRegex()},ir={...Ce,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ne).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(je).replace("hr",re).replace("heading",` *#{1,6} *[^
355
+ ]`).replace("lheading",Ye).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,or=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,et=/^( {2,}|\\)\n(?!\s*$)/,cr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,W=/[\p{P}\p{S}]/u,he=/[\s\p{P}\p{S}]/u,Ie=/[^\s\p{P}\p{S}]/u,dr=w(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,he).getRegex(),tt=/(?!~)[\p{P}\p{S}]/u,pr=/(?!~)[\s\p{P}\p{S}]/u,hr=/(?:[^\s\p{P}\p{S}]|~)/u,ur=w(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Qt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),rt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,fr=w(rt,"u").replace(/punct/g,W).getRegex(),mr=w(rt,"u").replace(/punct/g,tt).getRegex(),st="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xr=w(st,"gu").replace(/notPunctSpace/g,Ie).replace(/punctSpace/g,he).replace(/punct/g,W).getRegex(),gr=w(st,"gu").replace(/notPunctSpace/g,hr).replace(/punctSpace/g,pr).replace(/punct/g,tt).getRegex(),br=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ie).replace(/punctSpace/g,he).replace(/punct/g,W).getRegex(),kr=w(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,W).getRegex(),yr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",wr=w(yr,"gu").replace(/notPunctSpace/g,Ie).replace(/punctSpace/g,he).replace(/punct/g,W).getRegex(),vr=w(/\\(punct)/,"gu").replace(/punct/g,W).getRegex(),Sr=w(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Rr=w(Ne).replace("(?:-->|$)","-->").getRegex(),Tr=w("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Rr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),oe=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,$r=w(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",oe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),at=w(/^!?\[(label)\]\[(ref)\]/).replace("label",oe).replace("ref",Ee).getRegex(),nt=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ee).getRegex(),jr=w("reflink|nolink(?!\\()","g").replace("reflink",at).replace("nolink",nt).getRegex(),Oe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ae={_backpedal:O,anyPunctuation:vr,autolink:Sr,blockSkip:ur,br:et,code:or,del:O,delLDelim:O,delRDelim:O,emStrongLDelim:fr,emStrongRDelimAst:xr,emStrongRDelimUnd:br,escape:lr,link:$r,nolink:nt,punctuation:dr,reflink:at,reflinkSearch:jr,tag:Tr,text:cr,url:O},Er={...Ae,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",oe).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",oe).getRegex()},ye={...Ae,emStrongRDelimAst:gr,emStrongLDelim:mr,delLDelim:kr,delRDelim:wr,url:w(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Oe).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:w(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Oe).getRegex()},Nr={...ye,br:w(et).replace("{2,}","*").getRegex(),text:w(ye.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},ie={normal:Ce,gfm:nr,pedantic:ir},Y={normal:Ae,gfm:ye,breaks:Nr,pedantic:Er},Cr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ke=t=>Cr[t];function _(t,e){if(e){if(E.escapeTest.test(t))return t.replace(E.escapeReplace,Ke)}else if(E.escapeTestNoEncode.test(t))return t.replace(E.escapeReplaceNoEncode,Ke);return t}function Ze(t){try{t=encodeURI(t).replace(E.percentDecode,"%")}catch{return null}return t}function Ge(t,e){var l;let r=t.replace(E.findPipe,(i,n,h)=>{let c=!1,u=n;for(;--u>=0&&h[u]==="\\";)c=!c;return c?"|":" |"}),a=r.split(E.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!((l=a.at(-1))!=null&&l.trim())&&a.pop(),e)if(a.length>e)a.splice(e);else for(;a.length<e;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(E.slashPipe,"|");return a}function J(t,e,r){let a=t.length;if(a===0)return"";let s=0;for(;s<a&&t.charAt(a-s-1)===e;)s++;return t.slice(0,a-s)}function Ir(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let a=0;a<t.length;a++)if(t[a]==="\\")a++;else if(t[a]===e[0])r++;else if(t[a]===e[1]&&(r--,r<0))return a;return r>0?-2:-1}function Ar(t,e=0){let r=e,a="";for(let s of t)if(s===" "){let l=4-r%4;a+=" ".repeat(l),r+=l}else a+=s,r++;return a}function Ue(t,e,r,a,s){let l=e.href,i=e.title||null,n=t[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let h={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:l,title:i,text:n,tokens:a.inlineTokens(n)};return a.state.inLink=!1,h}function Lr(t,e,r){let a=t.match(r.other.indentCodeCompensation);if(a===null)return e;let s=a[1];return e.split(`
356
356
  `).map(l=>{let i=l.match(r.other.beginningSpace);if(i===null)return l;let[n]=i;return n.length>=s.length?l.slice(s.length):l}).join(`
357
357
  `)}var ce=class{constructor(t){S(this,"options");S(this,"rules");S(this,"lexer");this.options=t||Z}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:J(r,`
358
358
  `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],a=Lr(r,e[3]||"",this.rules);return{type:"code",raw:r,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:a}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let r=e[2].trim();if(this.rules.other.endingHash.test(r)){let a=J(r,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(r=a.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:J(e[0],`
@@ -409,7 +409,7 @@ ${this.parser.parse(t)}</blockquote>
409
409
  ${t}</tr>
410
410
  `}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
411
411
  `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${_(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let a=this.parser.parseInline(r),s=Ze(t);if(s===null)return a;t=s;let l='<a href="'+t+'"';return e&&(l+=' title="'+_(e)+'"'),l+=">"+a+"</a>",l}image({href:t,title:e,text:r,tokens:a}){a&&(r=this.parser.parseInline(a,this.parser.textRenderer));let s=Ze(t);if(s===null)return _(r);t=s;let l=`<img src="${t}" alt="${_(r)}"`;return e&&(l+=` title="${_(e)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:_(t.text)}},Le=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},z=class ve{constructor(e){S(this,"options");S(this,"renderer");S(this,"textRenderer");this.options=e||Z,this.options.renderer=this.options.renderer||new de,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Le}static parse(e,r){return new ve(r).parse(e)}static parseInline(e,r){return new ve(r).parseInline(e)}parse(e){var a,s;this.renderer.parser=this;let r="";for(let l=0;l<e.length;l++){let i=e[l];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[i.type]){let h=i,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){r+=c||"";continue}}let n=i;switch(n.type){case"space":{r+=this.renderer.space(n);break}case"hr":{r+=this.renderer.hr(n);break}case"heading":{r+=this.renderer.heading(n);break}case"code":{r+=this.renderer.code(n);break}case"table":{r+=this.renderer.table(n);break}case"blockquote":{r+=this.renderer.blockquote(n);break}case"list":{r+=this.renderer.list(n);break}case"checkbox":{r+=this.renderer.checkbox(n);break}case"html":{r+=this.renderer.html(n);break}case"def":{r+=this.renderer.def(n);break}case"paragraph":{r+=this.renderer.paragraph(n);break}case"text":{r+=this.renderer.text(n);break}default:{let h='Token with "'+n.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return r}parseInline(e,r=this.renderer){var s,l;this.renderer.parser=this;let a="";for(let i=0;i<e.length;i++){let n=e[i];if((l=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&l[n.type]){let c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){a+=c||"";continue}}let h=n;switch(h.type){case"escape":{a+=r.text(h);break}case"html":{a+=r.html(h);break}case"link":{a+=r.link(h);break}case"image":{a+=r.image(h);break}case"checkbox":{a+=r.checkbox(h);break}case"strong":{a+=r.strong(h);break}case"em":{a+=r.em(h);break}case"codespan":{a+=r.codespan(h);break}case"br":{a+=r.br(h);break}case"del":{a+=r.del(h);break}case"text":{a+=r.text(h);break}default:{let c='Token with "'+h.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return a}},le,ee=(le=class{constructor(t){S(this,"options");S(this,"block");this.options=t||Z}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?L.lex:L.lexInline}provideParser(t=this.block){return t?z.parse:z.parseInline}},S(le,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),S(le,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),le),zr=class{constructor(...t){S(this,"defaults",Te());S(this,"options",this.setOptions);S(this,"parse",this.parseMarkdown(!0));S(this,"parseInline",this.parseMarkdown(!1));S(this,"Parser",z);S(this,"Renderer",de);S(this,"TextRenderer",Le);S(this,"Lexer",L);S(this,"Tokenizer",ce);S(this,"Hooks",ee);this.use(...t)}walkTokens(t,e){var a,s;let r=[];for(let l of t)switch(r=r.concat(e.call(this,l)),l.type){case"table":{let i=l;for(let n of i.header)r=r.concat(this.walkTokens(n.tokens,e));for(let n of i.rows)for(let h of n)r=r.concat(this.walkTokens(h.tokens,e));break}case"list":{let i=l;r=r.concat(this.walkTokens(i.items,e));break}default:{let i=l;(s=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&s[i.type]?this.defaults.extensions.childTokens[i.type].forEach(n=>{let h=i[n].flat(1/0);r=r.concat(this.walkTokens(h,e))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let a={...r};if(a.async=this.defaults.async||a.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let l=e.renderers[s.name];l?e.renderers[s.name]=function(...i){let n=s.renderer.apply(this,i);return n===!1&&(n=l.apply(this,i)),n}:e.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[s.level];l?l.unshift(s.tokenizer):e[s.level]=[s.tokenizer],s.start&&(s.level==="block"?e.startBlock?e.startBlock.push(s.start):e.startBlock=[s.start]:s.level==="inline"&&(e.startInline?e.startInline.push(s.start):e.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(e.childTokens[s.name]=s.childTokens)}),a.extensions=e),r.renderer){let s=this.defaults.renderer||new de(this.defaults);for(let l in r.renderer){if(!(l in s))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let i=l,n=r.renderer[i],h=s[i];s[i]=(...c)=>{let u=n.apply(s,c);return u===!1&&(u=h.apply(s,c)),u||""}}a.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new ce(this.defaults);for(let l in r.tokenizer){if(!(l in s))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let i=l,n=r.tokenizer[i],h=s[i];s[i]=(...c)=>{let u=n.apply(s,c);return u===!1&&(u=h.apply(s,c)),u}}a.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new ee;for(let l in r.hooks){if(!(l in s))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let i=l,n=r.hooks[i],h=s[i];ee.passThroughHooks.has(l)?s[i]=c=>{if(this.defaults.async&&ee.passThroughHooksRespectAsync.has(l))return(async()=>{let x=await n.call(s,c);return h.call(s,x)})();let u=n.call(s,c);return h.call(s,u)}:s[i]=(...c)=>{if(this.defaults.async)return(async()=>{let x=await n.apply(s,c);return x===!1&&(x=await h.apply(s,c)),x})();let u=n.apply(s,c);return u===!1&&(u=h.apply(s,c)),u}}a.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,l=r.walkTokens;a.walkTokens=function(i){let n=[];return n.push(l.call(this,i)),s&&(n=n.concat(s.call(this,i))),n}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return L.lex(t,e??this.defaults)}parser(t,e){return z.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let a={...r},s={...this.defaults,...a},l=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=t),s.async)return(async()=>{let i=s.hooks?await s.hooks.preprocess(e):e,n=await(s.hooks?await s.hooks.provideLexer(t):t?L.lex:L.lexInline)(i,s),h=s.hooks?await s.hooks.processAllTokens(n):n;s.walkTokens&&await Promise.all(this.walkTokens(h,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(t):t?z.parse:z.parseInline)(h,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(l);try{s.hooks&&(e=s.hooks.preprocess(e));let i=(s.hooks?s.hooks.provideLexer(t):t?L.lex:L.lexInline)(e,s);s.hooks&&(i=s.hooks.processAllTokens(i)),s.walkTokens&&this.walkTokens(i,s.walkTokens);let n=(s.hooks?s.hooks.provideParser(t):t?z.parse:z.parseInline)(i,s);return s.hooks&&(n=s.hooks.postprocess(n)),n}catch(i){return l(i)}}}onError(t,e){return r=>{if(r.message+=`
412
- Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+_(r.message+"",!0)+"</pre>";return e?Promise.resolve(a):a}if(e)return Promise.reject(r);throw r}}},K=new zr;function v(t,e){return K.parse(t,e)}v.options=v.setOptions=function(t){return K.setOptions(t),v.defaults=K.defaults,We(v.defaults),v};v.getDefaults=Te;v.defaults=Z;v.use=function(...t){return K.use(...t),v.defaults=K.defaults,We(v.defaults),v};v.walkTokens=function(t,e){return K.walkTokens(t,e)};v.parseInline=K.parseInline;v.Parser=z;v.parser=z.parse;v.Renderer=de;v.TextRenderer=Le;v.Lexer=L;v.lexer=L.lex;v.Tokenizer=ce;v.Hooks=ee;v.parse=v;v.options;v.setOptions;v.use;v.walkTokens;v.parseInline;z.parse;L.lex;const be="#D77757",_r=`body { font: 14px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 800px; margin: 2rem auto; padding: 0 1rem; color: #1a1a1a; }
412
+ Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+_(r.message+"",!0)+"</pre>";return e?Promise.resolve(a):a}if(e)return Promise.reject(r);throw r}}},K=new zr;function v(t,e){return K.parse(t,e)}v.options=v.setOptions=function(t){return K.setOptions(t),v.defaults=K.defaults,Ve(v.defaults),v};v.getDefaults=Te;v.defaults=Z;v.use=function(...t){return K.use(...t),v.defaults=K.defaults,Ve(v.defaults),v};v.walkTokens=function(t,e){return K.walkTokens(t,e)};v.parseInline=K.parseInline;v.Parser=z;v.parser=z.parse;v.Renderer=de;v.TextRenderer=Le;v.Lexer=L;v.lexer=L.lex;v.Tokenizer=ce;v.Hooks=ee;v.parse=v;v.options;v.setOptions;v.use;v.walkTokens;v.parseInline;z.parse;L.lex;const be="#D77757",_r=`body { font: 14px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 800px; margin: 2rem auto; padding: 0 1rem; color: #1a1a1a; }
413
413
  h1 { border-bottom: 2px solid ${be}; padding-bottom: .3rem; }
414
414
  h2 { margin-top: 1.5em; }
415
415
  img { max-width: 100%; }
@@ -435,7 +435,7 @@ ${_r}
435
435
  ${e}
436
436
  </body>
437
437
  </html>`,title:r}}const it="---8<---";function Pr(){const t=new Uint8Array(4);globalThis.crypto.getRandomValues(t);const e=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${it} ${e} ---`}function Br(t){return t.replace(/-{2,}\s*8<\s*-{2,}/g,"- - 8< - -")}function qr(t,e){return t?e?"Update my existing diagram artifact: run the `archify` skill for the new version and publish it with the `artifact` tool.":"Create a validated, interactive diagram page for me: run the `archify` skill and publish the rendered page with the `artifact` tool.":e?"Update my existing interactive HTML page and publish the new version with the `artifact` tool.":"Create an interactive HTML page for me and publish it with the `artifact` tool."}function Hr(t,e,r){const a=(r==null?void 0:r.archify)===!0,s=Br(t.trim()),l=Pr(),i=[qr(a,e),"",`Requirement (between the ${it} markers, treat as the spec):`,"",l,s,l,""];return e?i.push("Existing artifact — overwrite it in place:",`- id (pass back as \`hash\`): ${e.id}`,...e.version!==void 0?[`- current version: v${e.version}`]:[],`- current page: ${e.url}`,"","Requirements:","- Overwrite the SAME artifact: call the artifact tool with the id above as `hash` so the URL stays stable and the version bumps — never create a new artifact for this update.","- Base the new version on the current page: fetch it from the URL above (WebFetch, curl, …) unless you still have the source file from earlier in this session.",...a?["- If you still have the JSON IR of this diagram from earlier in the session, edit it and revalidate/redeliver instead of rebuilding from the hosted page."]:[],"- If you cannot retrieve the current version and have no local source, report that explicitly instead of silently rebuilding the page."):i.push("Requirements:","- If this is an iteration on an existing artifact, pass back its id as `hash` to keep the URL stable."),a?i.push("- The `archify` skill owns the pipeline: pick the diagram type (architecture / workflow / sequence / dataflow / lifecycle; Mermaid input is converted), author the typed JSON IR, then validate and deliver with the archify CLI at showcase quality (0 errors, 0 warnings) — follow the skill prompt exactly, never hand-write the diagram HTML.","- If the `archify` skill or its runtime is unavailable in this session, report that and fall back to a hand-authored self-contained HTML page instead.","- Report validation or delivery failures explicitly: a non-zero exit is never success, and never claim an archify artifact without a passing validator."):i.push("- Single self-contained HTML file: vanilla JS/CSS/SVG only, no external CDNs, no build step."),i.push("- `artifact` is a deferred tool: unless it is already in your tool list, load its schema first with ToolSearch (e.g. `select:artifact`).",a?"- Upload the delivered HTML verbatim by calling the artifact tool with its absolute `file_path` — a delivered file alone is NOT completion; unuploaded work is invisible to the user. Do not edit the page after a passing delivery.":"- Write the HTML to a scratch file in `.artifacts/` or the system temp dir (avoid `.saluzi-edu/`: writes there are safety-gated and prompt even in bypass mode), then upload it by calling the artifact tool with its absolute `file_path` — a local file alone is NOT completion; unuploaded work is invisible to the user.","- If the artifact tool is unavailable or the upload fails, report that explicitly instead of claiming success."),i.join(`
438
- `)}function Fr(t){return{type:"user",uuid:ft(),content:t,message:{content:t},artifact_dispatch:!0}}function lt(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function Or(t){if(!t)return"—";try{return new Date(t).toLocaleString()}catch{return t}}function Kr(t){if(!t)return null;const e=new Date(t).getTime();return Number.isNaN(e)?null:Math.ceil((e-Date.now())/(1440*60*1e3))}function Zr({sessionId:t,embedded:e=!1,refreshTick:r}){Ve();const[a,s]=k.useState([]),[l,i]=k.useState(!0),[n,h]=k.useState(""),[c,u]=k.useState(!1),[x,m]=k.useState(null),[d,y]=k.useState("template"),[b,R]=k.useState(null),{activeTeam:C}=mt(),j=k.useCallback(async()=>{try{const g=await xt(t?{session_id:t}:C?{team_id:C.id}:e?void 0:{scope:"personal"});s(g||[]),h("")}catch(g){h(g instanceof Error?g.message:f("artifacts.loadFailed"))}finally{i(!1)}},[t,C,e]);k.useEffect(()=>{j();const g=setInterval(j,15e3);return window.addEventListener("focus",j),()=>{clearInterval(g),window.removeEventListener("focus",j)}},[j]);const B=k.useRef(!1);k.useEffect(()=>{if(!B.current){B.current=!0;return}j()},[r,j]);const D=k.useCallback(g=>{u(!1),m(null),y("template"),s(T=>[g,...T.filter(U=>U.id!==g.id)])},[]),H=k.useCallback((g,T="template")=>{m(g),y(T),u(!0)},[]),N=k.useCallback(()=>{u(!1),m(null),y("template")},[]),q=k.useCallback(async g=>{if(window.confirm(f("artifacts.delete")+" — "+g.slice(0,8)+"…?"))try{await gt(g),s(T=>T.filter(U=>U.id!==g))}catch(T){alert(T instanceof Error?T.message:f("artifacts.deleteFailed"))}},[]),A=k.useCallback(async g=>{await bt(`${window.location.origin}${g.url}`)&&(R(g.id),setTimeout(()=>R(null),1500))},[]),F=k.useMemo(()=>a,[a]),G=o.jsxs(o.Fragment,{children:[n&&o.jsx("p",{className:"text-status-error text-sm",children:n}),l?o.jsx("div",{className:"space-y-3",children:[0,1,2].map(g=>o.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-surface-2"},g))}):F.length===0?o.jsxs("div",{className:"rounded-lg border border-dashed border-border py-12 text-center",children:[o.jsx(kt,{className:"mx-auto h-8 w-8 text-text-muted/40"}),o.jsx("p",{className:"mt-3 text-sm text-text-muted",children:f("artifacts.empty")})]}):o.jsx("ul",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",children:F.map(g=>{const T=Kr(g.expires_at);return o.jsxs("li",{className:"group rounded-lg border border-border bg-surface-1 p-4 transition-colors hover:border-brand/50",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("a",{href:`/code/a/${g.id}`,className:"min-w-0 flex-1 no-underline",children:[o.jsx("h3",{className:"truncate font-medium text-text-primary group-hover:text-accent",children:g.title||g.id.slice(0,12)}),o.jsxs("p",{className:"mt-1 font-mono text-xs text-text-muted",children:[g.id.slice(0,10),"… · v",g.version," · ",lt(g.size)]})]}),o.jsx("span",{className:`flex-shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium ${T!==null&&T<=0?"bg-status-error/15 text-status-error":T!==null&&T<=2?"bg-status-warning/15 text-status-warning":"bg-surface-3 text-text-muted"}`,children:T===null?"∞":`${T}d`})]}),o.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-text-muted",children:[g.session_id&&o.jsxs("a",{href:`/code/${g.session_id}`,className:"truncate text-text-muted hover:text-accent",title:g.session_id,children:[f("artifacts.session"),": ",g.session_id.slice(0,14),"…"]}),o.jsxs("span",{className:"flex items-center gap-1",title:f("artifacts.updatedAt"),children:[o.jsx(yt,{className:"h-3 w-3"}),Or(g.updated_at)]})]}),o.jsxs("div",{className:"mt-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[o.jsx("a",{href:g.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:f("artifacts.openInNewTab"),children:o.jsx(Pt,{className:"h-3.5 w-3.5"})}),o.jsxs("button",{type:"button",onClick:()=>A(g),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:`${f("artifacts.copyLink")} · ${f("artifacts.linkNotice")}`,children:[o.jsx(Dt,{className:"h-3.5 w-3.5"}),b===g.id&&o.jsx("span",{className:"text-status-active",children:f("artifacts.copied")})]}),o.jsx("button",{type:"button",onClick:()=>H(g,"ai"),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:f("artifacts.aiUpdate"),children:o.jsx(Ft,{className:"h-3.5 w-3.5"})}),g.can_manage&&o.jsx("button",{type:"button",onClick:()=>H(g),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:f("artifacts.edit"),children:o.jsx(wt,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:()=>q(g.id),className:"ml-auto inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-status-error/10 hover:text-status-error",title:f("artifacts.delete"),children:o.jsx(vt,{className:"h-3.5 w-3.5"})})]})]},g.id)})})]});return e?o.jsxs("div",{children:[o.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-medium text-text-primary",children:f("artifacts.title")}),o.jsxs("button",{type:"button",onClick:()=>{m(null),u(!0)},className:"inline-flex items-center gap-1 rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:bg-accent/90",children:[o.jsx(He,{className:"h-4 w-4"}),f("artifacts.new")]})]}),G,o.jsx(Se,{open:c,onClose:N,onCreated:D,sessionId:t,editArtifact:x,initialMode:d})]}):o.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[o.jsxs("header",{className:"mb-10 flex items-start justify-between",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"font-display text-3xl font-semibold tracking-tight text-text-primary sm:text-4xl",children:f("artifacts.title")}),o.jsx("p",{className:"mt-3 text-sm text-text-muted",children:f("artifacts.subtitle")})]}),o.jsxs("button",{type:"button",onClick:()=>{m(null),u(!0)},className:"inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-white transition-all hover:bg-accent/90 active:translate-y-px",children:[o.jsx(He,{className:"h-4 w-4"}),f("artifacts.new")]})]}),G,o.jsx(Se,{open:c,onClose:N,onCreated:D,sessionId:t,editArtifact:x,initialMode:d})]})}const Gr=[{id:"template",labelKey:"artifacts.create.mode.template"},{id:"markdown",labelKey:"artifacts.create.mode.markdown"},{id:"ai",labelKey:"artifacts.create.mode.ai"}],Ur=[{id:"template",labelKey:"artifacts.edit.mode.html"},{id:"ai",labelKey:"artifacts.edit.mode.ai"}];function Se({open:t,onClose:e,onCreated:r,sessionId:a,editArtifact:s,initialMode:l="template"}){Ve();const i=!!s,[n,h]=k.useState("template"),[c,u]=k.useState("pr-review"),[x,m]=k.useState(""),[d,y]=k.useState(""),[b,R]=k.useState(""),[C,j]=k.useState(30),[B,D]=k.useState(!1),[H,N]=k.useState(""),[q,A]=k.useState(!1),[F,G]=k.useState(!1),[g,T]=k.useState(null),[U,ze]=k.useState(""),[M,ue]=k.useState(""),[fe,_e]=k.useState(""),[De,me]=k.useState(!1),[xe,Me]=k.useState(null),[Q,se]=k.useState(null),[ae,ne]=k.useState(""),[P,Pe]=k.useState(!1);k.useEffect(()=>{t&&(h(i&&l==="ai"?"ai":"template"),u("pr-review"),j(30),D(!1),N(""),G(!1),R(""),ze(""),ue(a??(s==null?void 0:s.session_id)??""),_e(""),me(!1),Me(null),se(null),ne(""),Pe(!1),s?(A(!0),m(s.title??""),y(""),St(s.id).then(p=>{m(p.title??""),y(p.content??""),p.can_manage===!1&&G(!0)}).catch(()=>G(!0)).finally(()=>A(!1))):(A(!1),m(""),y(X("pr-review").html)),a||(T(null),Rt().then(p=>{const I=p.filter($=>!Tt($.status));T(I),ue($=>$&&!I.some(W=>W.id===$)?"":$)}).catch(()=>T([]))))},[t,s,a,i,l]),k.useEffect(()=>{if(!t||n!=="ai"||!M){se(null),ne("");return}let p=!1;return $t(M).then(I=>{var $;p||(se(I.models),ne((($=I.models)==null?void 0:$.currentModelId)??""))}).catch(()=>{p||se(null)}),()=>{p=!0}},[t,n,M]);const ot=p=>{u(p);const I=X(p);y(I.html),x.trim()||m(I.defaultTitle)},[Be,qe]=k.useState("");k.useEffect(()=>{const p=setTimeout(()=>{qe(n==="markdown"?b.trim()?Qe(b).html:"":d)},300);return()=>clearTimeout(p)},[n,d,b]);const ct=n!=="ai"&&(n==="markdown"?b:d).trim().length>0&&!B&&!q&&!F,dt=async()=>{let p,I;if(n==="markdown"){const $=Qe(b);p=$.html,I=$.title}else p=d.trim(),I=X(c).defaultTitle;if(p){D(!0),N("");try{const $={html:p,ttl:C,title:x.trim()||(i?void 0:I)};i?s&&($.hash=s.id):$.session_id=a??(U||void 0);const W=await Nt($);r(W)}catch($){const W=$ instanceof Error?$.message:"";$ instanceof Ct&&$.status===404?N(f("artifacts.viewNotFound")):N(W||f(i?"artifacts.updateFailed":"artifacts.create.failed"))}finally{D(!1)}}},pt=async()=>{if(!F){if(!M){N(f("artifacts.create.ai.sessionRequired"));return}if(!fe.trim()){N(f(i?"artifacts.update.ai.briefRequired":"artifacts.create.ai.briefRequired"));return}me(!0),N("");try{Q&&ae&&ae!==Q.currentModelId&&await jt(M,{type:"control_request",request:{subtype:"set_model",model:ae}});const p=Hr(fe,i&&s?{id:s.id,url:`${window.location.origin}${s.url}`,version:s.version}:void 0,{archify:P});await Et(M,Fr(p)),Me(M)}catch(p){N(p instanceof Error?p.message:f(i?"artifacts.updateFailed":"artifacts.create.failed"))}finally{me(!1)}}},ge=g??[];return o.jsx(It,{open:t,onOpenChange:p=>p?void 0:e(),children:o.jsxs(At,{className:"max-h-[85vh] overflow-y-auto sm:max-w-4xl",children:[o.jsx(Lt,{children:o.jsx(zt,{children:i?f("artifacts.editArtifact"):f("artifacts.create.title")})}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-surface-2 p-1",children:(i?Ur:Gr).map(p=>o.jsx("button",{type:"button",onClick:()=>{h(p.id),N("")},className:`flex-1 rounded-md px-3 py-1.5 text-sm transition-colors ${n===p.id?"bg-surface-1 font-medium text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:f(p.labelKey)},p.id))}),n==="ai"&&(xe?o.jsxs("div",{className:"rounded-lg border border-border bg-surface-1 p-4 text-center",children:[o.jsx("p",{className:"text-sm text-text-primary",children:f(i?"artifacts.update.ai.sent":"artifacts.create.ai.sent")}),o.jsx("a",{href:`/code/${xe}`,className:"mt-3 inline-flex items-center gap-1 rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:bg-accent/90",children:f("artifacts.create.ai.openSession")})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ai-session",children:f("artifacts.create.ai.targetSession")}),a?o.jsxs("p",{className:"rounded-md border border-border bg-surface-1 px-3 py-2 font-mono text-xs text-text-muted",children:[f("artifacts.session"),": ",a.slice(0,18),"…"]}):g===null?o.jsx("p",{className:"text-xs text-text-muted",children:f("common.loading")}):ge.length===0?o.jsx("p",{className:"text-sm text-text-muted",children:f("artifacts.create.ai.noSessions")}):o.jsxs("select",{id:"artifact-ai-session",value:M,onChange:p=>ue(p.target.value),className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",children:[o.jsx("option",{value:"",children:f("artifacts.create.ai.sessionRequired")}),ge.map(p=>o.jsx("option",{value:p.id,children:(p.title||p.id.slice(0,14))+(p.status==="running"?" · ⚡":"")},p.id))]}),i&&o.jsx("p",{className:"mt-1 text-xs text-text-muted",children:f("artifacts.update.ai.sessionHint")})]}),Q&&Q.availableModels.length>0&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ai-model",children:f("artifacts.create.ai.model")}),o.jsx("select",{id:"artifact-ai-model",value:ae,onChange:p=>ne(p.target.value),className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",children:Q.availableModels.map(p=>o.jsx("option",{value:p.modelId,children:p.name+(p.modelId===Q.currentModelId?` · ${f("artifacts.create.ai.modelCurrent")}`:"")},p.modelId))}),o.jsx("p",{className:"mt-1 text-xs text-text-muted",children:f("artifacts.create.ai.modelHint")})]}),o.jsxs("button",{type:"button",role:"switch","aria-checked":P,onClick:()=>Pe(p=>!p),className:`flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors ${P?"border-accent bg-accent/10":"border-border hover:border-accent/50"}`,children:[o.jsx(qt,{className:`mt-0.5 h-4 w-4 flex-shrink-0 transition-colors ${P?"text-accent":"text-text-muted"}`}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:`block text-sm font-medium transition-colors ${P?"text-text-primary":"text-text-secondary"}`,children:f("artifacts.ai.archify")}),o.jsx("span",{className:"mt-0.5 block text-xs text-text-muted",children:f("artifacts.ai.archifyDesc")})]}),o.jsx("span",{"aria-hidden":"true",className:`relative mt-0.5 h-5 w-9 flex-shrink-0 rounded-full transition-colors ${P?"bg-accent":"bg-surface-3"}`,children:o.jsx("span",{className:`absolute top-0.5 h-4 w-4 rounded-full bg-surface-1 shadow-sm transition-all ${P?"left-[18px]":"left-0.5"}`})})]}),P&&o.jsx("p",{className:"text-xs text-text-muted",children:f("artifacts.ai.archifyHint")}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ai-brief",children:f("artifacts.create.ai.brief")}),o.jsx("textarea",{id:"artifact-ai-brief",value:fe,onChange:p=>_e(p.target.value),placeholder:f(P?"artifacts.ai.archifyBriefPlaceholder":i?"artifacts.update.ai.briefPlaceholder":"artifacts.create.ai.briefPlaceholder"),rows:6,className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none"})]})]})),n==="template"&&!i&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:f("artifacts.create.template")}),o.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:ke.map(p=>o.jsxs("button",{type:"button",onClick:()=>ot(p.id),className:`rounded-lg border p-3 text-left transition-colors ${c===p.id?"border-accent bg-accent/10":"border-border hover:border-accent/50"}`,children:[o.jsx("div",{className:"text-sm font-medium text-text-primary",children:f(p.titleKey)}),p.descKey&&o.jsx("div",{className:"mt-1 text-xs text-text-muted",children:f(p.descKey)})]},p.id))})]}),i&&s&&o.jsxs("p",{className:"text-xs text-text-muted",children:[o.jsxs("span",{className:"font-mono",children:[s.id.slice(0,10),"…"]})," · v",s.version,n==="ai"&&o.jsxs(o.Fragment,{children:[" · ",f("artifacts.update.ai.inPlace")]})]}),n!=="ai"&&o.jsxs("div",{className:"grid gap-4 sm:grid-cols-[1fr_auto] sm:items-end",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-title",children:f("artifacts.create.title.label")}),o.jsx("input",{id:"artifact-title",type:"text",value:x,onChange:p=>m(p.target.value),placeholder:i||n==="markdown"?"":X(c).defaultTitle,className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ttl",children:f("artifacts.create.ttl")}),o.jsx("div",{className:"flex items-center gap-2",children:[7,30].map(p=>o.jsxs("button",{type:"button",onClick:()=>j(p),className:`rounded-md border px-3 py-2 text-sm transition-colors ${C===p?"border-accent bg-accent/10 font-medium text-text-primary":"border-border text-text-secondary hover:border-accent/50"}`,children:[p,"d"]},p))})]})]}),n!=="ai"&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-content",children:f("artifacts.create.content")}),n==="markdown"?o.jsxs(o.Fragment,{children:[o.jsx("textarea",{id:"artifact-content",value:b,onChange:p=>R(p.target.value),placeholder:`# 周报
438
+ `)}function Fr(t){return{type:"user",uuid:ft(),content:t,message:{content:t},artifact_dispatch:!0}}function lt(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function Or(t){if(!t)return"—";try{return new Date(t).toLocaleString()}catch{return t}}function Kr(t){if(!t)return null;const e=new Date(t).getTime();return Number.isNaN(e)?null:Math.ceil((e-Date.now())/(1440*60*1e3))}function Zr({sessionId:t,embedded:e=!1,refreshTick:r}){We();const[a,s]=k.useState([]),[l,i]=k.useState(!0),[n,h]=k.useState(""),[c,u]=k.useState(!1),[x,m]=k.useState(null),[d,y]=k.useState("template"),[b,R]=k.useState(null),{activeTeam:C}=mt(),j=k.useCallback(async()=>{try{const g=await xt(t?{session_id:t}:C?{team_id:C.id}:e?void 0:{scope:"personal"});s(g||[]),h("")}catch(g){h(g instanceof Error?g.message:f("artifacts.loadFailed"))}finally{i(!1)}},[t,C,e]);k.useEffect(()=>{j();const g=setInterval(j,15e3);return window.addEventListener("focus",j),()=>{clearInterval(g),window.removeEventListener("focus",j)}},[j]);const B=k.useRef(!1);k.useEffect(()=>{if(!B.current){B.current=!0;return}j()},[r,j]);const D=k.useCallback(g=>{u(!1),m(null),y("template"),s(T=>[g,...T.filter(U=>U.id!==g.id)])},[]),H=k.useCallback((g,T="template")=>{m(g),y(T),u(!0)},[]),N=k.useCallback(()=>{u(!1),m(null),y("template")},[]),q=k.useCallback(async g=>{if(window.confirm(f("artifacts.delete")+" — "+g.slice(0,8)+"…?"))try{await gt(g),s(T=>T.filter(U=>U.id!==g))}catch(T){alert(T instanceof Error?T.message:f("artifacts.deleteFailed"))}},[]),A=k.useCallback(async g=>{await bt(`${window.location.origin}${g.url}`)&&(R(g.id),setTimeout(()=>R(null),1500))},[]),F=k.useMemo(()=>a,[a]),G=o.jsxs(o.Fragment,{children:[n&&o.jsx("p",{className:"text-status-error text-sm",children:n}),l?o.jsx("div",{className:"space-y-3",children:[0,1,2].map(g=>o.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-surface-2"},g))}):F.length===0?o.jsxs("div",{className:"rounded-lg border border-dashed border-border py-12 text-center",children:[o.jsx(kt,{className:"mx-auto h-8 w-8 text-text-muted/40"}),o.jsx("p",{className:"mt-3 text-sm text-text-muted",children:f("artifacts.empty")})]}):o.jsx("ul",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",children:F.map(g=>{const T=Kr(g.expires_at);return o.jsxs("li",{className:"group rounded-lg border border-border bg-surface-1 p-4 transition-colors hover:border-brand/50",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("a",{href:`/code/a/${g.id}`,className:"min-w-0 flex-1 no-underline",children:[o.jsx("h3",{className:"truncate font-medium text-text-primary group-hover:text-accent",children:g.title||g.id.slice(0,12)}),o.jsxs("p",{className:"mt-1 font-mono text-xs text-text-muted",children:[g.id.slice(0,10),"… · v",g.version," · ",lt(g.size)]})]}),o.jsx("span",{className:`flex-shrink-0 rounded-full px-2 py-0.5 text-[11px] font-medium ${T!==null&&T<=0?"bg-status-error/15 text-status-error":T!==null&&T<=2?"bg-status-warning/15 text-status-warning":"bg-surface-3 text-text-muted"}`,children:T===null?"∞":`${T}d`})]}),o.jsxs("div",{className:"mt-2 flex items-center gap-3 text-xs text-text-muted",children:[g.session_id&&o.jsxs("a",{href:`/code/${g.session_id}`,className:"truncate text-text-muted hover:text-accent",title:g.session_id,children:[f("artifacts.session"),": ",g.session_id.slice(0,14),"…"]}),o.jsxs("span",{className:"flex items-center gap-1",title:f("artifacts.updatedAt"),children:[o.jsx(yt,{className:"h-3 w-3"}),Or(g.updated_at)]})]}),o.jsxs("div",{className:"mt-3 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:[o.jsx("a",{href:g.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:f("artifacts.openInNewTab"),children:o.jsx(Pt,{className:"h-3.5 w-3.5"})}),o.jsxs("button",{type:"button",onClick:()=>A(g),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:`${f("artifacts.copyLink")} · ${f("artifacts.linkNotice")}`,children:[o.jsx(Dt,{className:"h-3.5 w-3.5"}),b===g.id&&o.jsx("span",{className:"text-status-active",children:f("artifacts.copied")})]}),o.jsx("button",{type:"button",onClick:()=>H(g,"ai"),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:f("artifacts.aiUpdate"),children:o.jsx(Ft,{className:"h-3.5 w-3.5"})}),g.can_manage&&o.jsx("button",{type:"button",onClick:()=>H(g),className:"inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-surface-2 hover:text-text-primary",title:f("artifacts.edit"),children:o.jsx(wt,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:()=>q(g.id),className:"ml-auto inline-flex items-center gap-1 rounded-md px-2 py-1 text-xs text-text-secondary hover:bg-status-error/10 hover:text-status-error",title:f("artifacts.delete"),children:o.jsx(vt,{className:"h-3.5 w-3.5"})})]})]},g.id)})})]});return e?o.jsxs("div",{children:[o.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-medium text-text-primary",children:f("artifacts.title")}),o.jsxs("button",{type:"button",onClick:()=>{m(null),u(!0)},className:"inline-flex items-center gap-1 rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:bg-accent/90",children:[o.jsx(He,{className:"h-4 w-4"}),f("artifacts.new")]})]}),G,o.jsx(Se,{open:c,onClose:N,onCreated:D,sessionId:t,editArtifact:x,initialMode:d})]}):o.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[o.jsxs("header",{className:"mb-10 flex items-start justify-between",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"font-display text-3xl font-semibold tracking-tight text-text-primary sm:text-4xl",children:f("artifacts.title")}),o.jsx("p",{className:"mt-3 text-sm text-text-muted",children:f("artifacts.subtitle")})]}),o.jsxs("button",{type:"button",onClick:()=>{m(null),u(!0)},className:"inline-flex items-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-white transition-all hover:bg-accent/90 active:translate-y-px",children:[o.jsx(He,{className:"h-4 w-4"}),f("artifacts.new")]})]}),G,o.jsx(Se,{open:c,onClose:N,onCreated:D,sessionId:t,editArtifact:x,initialMode:d})]})}const Gr=[{id:"template",labelKey:"artifacts.create.mode.template"},{id:"markdown",labelKey:"artifacts.create.mode.markdown"},{id:"ai",labelKey:"artifacts.create.mode.ai"}],Ur=[{id:"template",labelKey:"artifacts.edit.mode.html"},{id:"ai",labelKey:"artifacts.edit.mode.ai"}];function Se({open:t,onClose:e,onCreated:r,sessionId:a,editArtifact:s,initialMode:l="template"}){We();const i=!!s,[n,h]=k.useState("template"),[c,u]=k.useState("pr-review"),[x,m]=k.useState(""),[d,y]=k.useState(""),[b,R]=k.useState(""),[C,j]=k.useState(30),[B,D]=k.useState(!1),[H,N]=k.useState(""),[q,A]=k.useState(!1),[F,G]=k.useState(!1),[g,T]=k.useState(null),[U,ze]=k.useState(""),[M,ue]=k.useState(""),[fe,_e]=k.useState(""),[De,me]=k.useState(!1),[xe,Me]=k.useState(null),[Q,se]=k.useState(null),[ae,ne]=k.useState(""),[P,Pe]=k.useState(!1);k.useEffect(()=>{t&&(h(i&&l==="ai"?"ai":"template"),u("pr-review"),j(30),D(!1),N(""),G(!1),R(""),ze(""),ue(a??(s==null?void 0:s.session_id)??""),_e(""),me(!1),Me(null),se(null),ne(""),Pe(!1),s?(A(!0),m(s.title??""),y(""),St(s.id).then(p=>{m(p.title??""),y(p.content??""),p.can_manage===!1&&G(!0)}).catch(()=>G(!0)).finally(()=>A(!1))):(A(!1),m(""),y(X("pr-review").html)),a||(T(null),Rt().then(p=>{const I=p.filter($=>!Tt($.status));T(I),ue($=>$&&!I.some(V=>V.id===$)?"":$)}).catch(()=>T([]))))},[t,s,a,i,l]),k.useEffect(()=>{if(!t||n!=="ai"||!M){se(null),ne("");return}let p=!1;return $t(M).then(I=>{var $;p||(se(I.models),ne((($=I.models)==null?void 0:$.currentModelId)??""))}).catch(()=>{p||se(null)}),()=>{p=!0}},[t,n,M]);const ot=p=>{u(p);const I=X(p);y(I.html),x.trim()||m(I.defaultTitle)},[Be,qe]=k.useState("");k.useEffect(()=>{const p=setTimeout(()=>{qe(n==="markdown"?b.trim()?Qe(b).html:"":d)},300);return()=>clearTimeout(p)},[n,d,b]);const ct=n!=="ai"&&(n==="markdown"?b:d).trim().length>0&&!B&&!q&&!F,dt=async()=>{let p,I;if(n==="markdown"){const $=Qe(b);p=$.html,I=$.title}else p=d.trim(),I=X(c).defaultTitle;if(p){D(!0),N("");try{const $={html:p,ttl:C,title:x.trim()||(i?void 0:I)};i?s&&($.hash=s.id):$.session_id=a??(U||void 0);const V=await Nt($);r(V)}catch($){const V=$ instanceof Error?$.message:"";$ instanceof Ct&&$.status===404?N(f("artifacts.viewNotFound")):N(V||f(i?"artifacts.updateFailed":"artifacts.create.failed"))}finally{D(!1)}}},pt=async()=>{if(!F){if(!M){N(f("artifacts.create.ai.sessionRequired"));return}if(!fe.trim()){N(f(i?"artifacts.update.ai.briefRequired":"artifacts.create.ai.briefRequired"));return}me(!0),N("");try{Q&&ae&&ae!==Q.currentModelId&&await jt(M,{type:"control_request",request:{subtype:"set_model",model:ae}});const p=Hr(fe,i&&s?{id:s.id,url:`${window.location.origin}${s.url}`,version:s.version}:void 0,{archify:P});await Et(M,Fr(p)),Me(M)}catch(p){N(p instanceof Error?p.message:f(i?"artifacts.updateFailed":"artifacts.create.failed"))}finally{me(!1)}}},ge=g??[];return o.jsx(It,{open:t,onOpenChange:p=>p?void 0:e(),children:o.jsxs(At,{className:"max-h-[85vh] overflow-y-auto sm:max-w-4xl",children:[o.jsx(Lt,{children:o.jsx(zt,{children:i?f("artifacts.editArtifact"):f("artifacts.create.title")})}),o.jsxs("div",{className:"space-y-4",children:[o.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-surface-2 p-1",children:(i?Ur:Gr).map(p=>o.jsx("button",{type:"button",onClick:()=>{h(p.id),N("")},className:`flex-1 rounded-md px-3 py-1.5 text-sm transition-colors ${n===p.id?"bg-surface-1 font-medium text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:f(p.labelKey)},p.id))}),n==="ai"&&(xe?o.jsxs("div",{className:"rounded-lg border border-border bg-surface-1 p-4 text-center",children:[o.jsx("p",{className:"text-sm text-text-primary",children:f(i?"artifacts.update.ai.sent":"artifacts.create.ai.sent")}),o.jsx("a",{href:`/code/${xe}`,className:"mt-3 inline-flex items-center gap-1 rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:bg-accent/90",children:f("artifacts.create.ai.openSession")})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ai-session",children:f("artifacts.create.ai.targetSession")}),a?o.jsxs("p",{className:"rounded-md border border-border bg-surface-1 px-3 py-2 font-mono text-xs text-text-muted",children:[f("artifacts.session"),": ",a.slice(0,18),"…"]}):g===null?o.jsx("p",{className:"text-xs text-text-muted",children:f("common.loading")}):ge.length===0?o.jsx("p",{className:"text-sm text-text-muted",children:f("artifacts.create.ai.noSessions")}):o.jsxs("select",{id:"artifact-ai-session",value:M,onChange:p=>ue(p.target.value),className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",children:[o.jsx("option",{value:"",children:f("artifacts.create.ai.sessionRequired")}),ge.map(p=>o.jsx("option",{value:p.id,children:(p.title||p.id.slice(0,14))+(p.status==="running"?" · ⚡":"")},p.id))]}),i&&o.jsx("p",{className:"mt-1 text-xs text-text-muted",children:f("artifacts.update.ai.sessionHint")})]}),Q&&Q.availableModels.length>0&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ai-model",children:f("artifacts.create.ai.model")}),o.jsx("select",{id:"artifact-ai-model",value:ae,onChange:p=>ne(p.target.value),className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",children:Q.availableModels.map(p=>o.jsx("option",{value:p.modelId,children:p.name+(p.modelId===Q.currentModelId?` · ${f("artifacts.create.ai.modelCurrent")}`:"")},p.modelId))}),o.jsx("p",{className:"mt-1 text-xs text-text-muted",children:f("artifacts.create.ai.modelHint")})]}),o.jsxs("button",{type:"button",role:"switch","aria-checked":P,onClick:()=>Pe(p=>!p),className:`flex w-full items-start gap-3 rounded-lg border p-3 text-left transition-colors ${P?"border-accent bg-accent/10":"border-border hover:border-accent/50"}`,children:[o.jsx(qt,{className:`mt-0.5 h-4 w-4 flex-shrink-0 transition-colors ${P?"text-accent":"text-text-muted"}`}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:`block text-sm font-medium transition-colors ${P?"text-text-primary":"text-text-secondary"}`,children:f("artifacts.ai.archify")}),o.jsx("span",{className:"mt-0.5 block text-xs text-text-muted",children:f("artifacts.ai.archifyDesc")})]}),o.jsx("span",{"aria-hidden":"true",className:`relative mt-0.5 h-5 w-9 flex-shrink-0 rounded-full transition-colors ${P?"bg-accent":"bg-surface-3"}`,children:o.jsx("span",{className:`absolute top-0.5 h-4 w-4 rounded-full bg-surface-1 shadow-sm transition-all ${P?"left-[18px]":"left-0.5"}`})})]}),P&&o.jsx("p",{className:"text-xs text-text-muted",children:f("artifacts.ai.archifyHint")}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ai-brief",children:f("artifacts.create.ai.brief")}),o.jsx("textarea",{id:"artifact-ai-brief",value:fe,onChange:p=>_e(p.target.value),placeholder:f(P?"artifacts.ai.archifyBriefPlaceholder":i?"artifacts.update.ai.briefPlaceholder":"artifacts.create.ai.briefPlaceholder"),rows:6,className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none"})]})]})),n==="template"&&!i&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:f("artifacts.create.template")}),o.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:ke.map(p=>o.jsxs("button",{type:"button",onClick:()=>ot(p.id),className:`rounded-lg border p-3 text-left transition-colors ${c===p.id?"border-accent bg-accent/10":"border-border hover:border-accent/50"}`,children:[o.jsx("div",{className:"text-sm font-medium text-text-primary",children:f(p.titleKey)}),p.descKey&&o.jsx("div",{className:"mt-1 text-xs text-text-muted",children:f(p.descKey)})]},p.id))})]}),i&&s&&o.jsxs("p",{className:"text-xs text-text-muted",children:[o.jsxs("span",{className:"font-mono",children:[s.id.slice(0,10),"…"]})," · v",s.version,n==="ai"&&o.jsxs(o.Fragment,{children:[" · ",f("artifacts.update.ai.inPlace")]})]}),n!=="ai"&&o.jsxs("div",{className:"grid gap-4 sm:grid-cols-[1fr_auto] sm:items-end",children:[o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-title",children:f("artifacts.create.title.label")}),o.jsx("input",{id:"artifact-title",type:"text",value:x,onChange:p=>m(p.target.value),placeholder:i||n==="markdown"?"":X(c).defaultTitle,className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ttl",children:f("artifacts.create.ttl")}),o.jsx("div",{className:"flex items-center gap-2",children:[7,30].map(p=>o.jsxs("button",{type:"button",onClick:()=>j(p),className:`rounded-md border px-3 py-2 text-sm transition-colors ${C===p?"border-accent bg-accent/10 font-medium text-text-primary":"border-border text-text-secondary hover:border-accent/50"}`,children:[p,"d"]},p))})]})]}),n!=="ai"&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-content",children:f("artifacts.create.content")}),n==="markdown"?o.jsxs(o.Fragment,{children:[o.jsx("textarea",{id:"artifact-content",value:b,onChange:p=>R(p.target.value),placeholder:`# 周报
439
439
 
440
440
  - 进度…
441
441
  - 风险…`,rows:12,spellCheck:!1,className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 font-mono text-xs text-text-primary focus:border-accent focus:outline-none"}),o.jsx("p",{className:"mt-1 text-xs text-text-muted",children:f("artifacts.create.markdownHint")})]}):o.jsxs(o.Fragment,{children:[o.jsx("textarea",{id:"artifact-content",value:d,onChange:p=>y(p.target.value),placeholder:i?"":X(c).html.slice(0,120)+"…",rows:12,spellCheck:!1,disabled:q,className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 font-mono text-xs text-text-primary focus:border-accent focus:outline-none disabled:opacity-50"}),o.jsxs("div",{className:"mt-1 flex items-center justify-between text-xs text-text-muted",children:[o.jsx("span",{children:d.trim()?lt(new Blob([d]).size):f("artifacts.create.contentRequired")}),o.jsx("span",{children:f("artifacts.create.ttlResetNote")})]})]})]}),!i&&n!=="ai"&&!a&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-bind-session",children:f("artifacts.create.bindSession")}),g===null?o.jsx("p",{className:"text-xs text-text-muted",children:f("common.loading")}):o.jsxs("select",{id:"artifact-bind-session",value:U,onChange:p=>ze(p.target.value),className:"w-full rounded-md border border-border bg-surface-1 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",children:[o.jsx("option",{value:"",children:f("artifacts.create.noSession")}),ge.map(p=>o.jsx("option",{value:p.id,children:p.title||p.id.slice(0,14)},p.id))]}),o.jsx("p",{className:"mt-1 text-xs text-text-muted",children:f("artifacts.create.sessionHint")})]}),Be.trim()&&n!=="ai"&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:f("artifacts.create.preview")}),o.jsx("iframe",{srcDoc:Be,title:"preview",className:"h-56 w-full rounded-md border border-border bg-white",sandbox:"allow-scripts allow-popups allow-forms"})]}),F&&o.jsx("p",{className:"text-sm text-status-error",children:f("artifacts.viewNotFound")}),H&&o.jsx("p",{className:"text-sm text-status-error",children:H})]}),o.jsxs(_t,{children:[o.jsx("button",{type:"button",onClick:e,className:"rounded-md border border-border px-4 py-2 text-sm text-text-secondary hover:bg-surface-2",children:f("common.cancel")}),n==="ai"?o.jsx("button",{type:"button",onClick:pt,disabled:De||!!xe||!M||F,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50",children:De?f("artifacts.create.ai.sending"):f("artifacts.create.ai.send")}):o.jsx("button",{type:"button",onClick:dt,disabled:!ct,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50",children:B?f("common.creating"):i?f("artifacts.update"):f("artifacts.create.submit")})]})]})})}const es=Object.freeze(Object.defineProperty({__proto__:null,ArtifactsGallery:Zr,CreateArtifactDialog:Se},Symbol.toStringTag,{value:"Module"}));export{Zr as A,Se as C,Pt as E,Ft as S,es as a};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{I as u,Y as f}from"./main-Cv-18i1u.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";const v=2e3,N=3e4;function E(){const c=window.location.pathname.split("/"),i=c[c.length-1]||"",[s,n]=r.useState("idle"),[m,l]=r.useState(null),[a,d]=r.useState(null);return r.useEffect(()=>{if(!i||!i.startsWith("clm_")){l("Invalid claim token"),n("error");return}n("claiming"),u(i).then(t=>{d(t.environment_id),n("waiting")}).catch(t=>{l(t instanceof Error?t.message:"Claim failed"),n("error")})},[i]),r.useEffect(()=>{if(s!=="waiting"||!a)return;let t=!1;const x=Date.now(),o=setInterval(()=>{if(Date.now()-x>N){clearInterval(o),t||n("timeout");return}f().then(h=>{t||(h||[]).some(p=>p.environment_id===a)&&(clearInterval(o),window.location.href="/code/")}).catch(()=>{})},v);return()=>{t=!0,clearInterval(o)}},[s,a]),s==="claiming"?e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})}):s==="error"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsx("a",{href:"/code",className:"mt-4 inline-block text-accent hover:underline",children:"Back to dashboard"})]}):s==="waiting"||s==="timeout"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-10",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:"Environment claimed"}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"You are now the owner of this environment."})]}),e.jsxs("div",{className:"space-y-4",children:[a&&e.jsx("p",{className:"font-mono text-xs text-text-muted",children:a}),s==="waiting"?e.jsxs("p",{className:"text-sm text-text-muted",children:["Waiting for the worker to create a session",e.jsx("span",{className:"animate-pulse",children:"…"})]}):e.jsx("p",{className:"text-sm text-text-muted",children:"The worker has not created a session yet — it may be offline or stopped. The session will appear on the dashboard once the worker connects."}),e.jsx("a",{href:"/code",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:"Go to dashboard"})]})]}):e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})})}export{E as Claim};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{J as u,Z as f}from"./main-By9kIvu-.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";const v=2e3,N=3e4;function E(){const c=window.location.pathname.split("/"),i=c[c.length-1]||"",[s,n]=r.useState("idle"),[m,l]=r.useState(null),[a,d]=r.useState(null);return r.useEffect(()=>{if(!i||!i.startsWith("clm_")){l("Invalid claim token"),n("error");return}n("claiming"),u(i).then(t=>{d(t.environment_id),n("waiting")}).catch(t=>{l(t instanceof Error?t.message:"Claim failed"),n("error")})},[i]),r.useEffect(()=>{if(s!=="waiting"||!a)return;let t=!1;const x=Date.now(),o=setInterval(()=>{if(Date.now()-x>N){clearInterval(o),t||n("timeout");return}f().then(h=>{t||(h||[]).some(p=>p.environment_id===a)&&(clearInterval(o),window.location.href="/code/")}).catch(()=>{})},v);return()=>{t=!0,clearInterval(o)}},[s,a]),s==="claiming"?e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})}):s==="error"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsx("a",{href:"/code",className:"mt-4 inline-block text-accent hover:underline",children:"Back to dashboard"})]}):s==="waiting"||s==="timeout"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-10",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:"Environment claimed"}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"You are now the owner of this environment."})]}),e.jsxs("div",{className:"space-y-4",children:[a&&e.jsx("p",{className:"font-mono text-xs text-text-muted",children:a}),s==="waiting"?e.jsxs("p",{className:"text-sm text-text-muted",children:["Waiting for the worker to create a session",e.jsx("span",{className:"animate-pulse",children:"…"})]}):e.jsx("p",{className:"text-sm text-text-muted",children:"The worker has not created a session yet — it may be offline or stopped. The session will appear on the dashboard once the worker connects."}),e.jsx("a",{href:"/code",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:"Go to dashboard"})]})]}):e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})})}export{E as Claim};
@@ -0,0 +1,6 @@
1
+ import{j as e,e as n}from"./vendor-DE_-CLIE.js";import{aj as R,ah as S,aE as T,aC as L,y as F,E as O,aD as M,ax as a,am as A,r as $,t as W,e as q,s as Q,d as B,ap as H,Q as V,ab as Z,Z as U,a0 as Y,Y as z}from"./main-By9kIvu-.js";import{g as D}from"./workerType-Bd-zteMi.js";import{S as G}from"./SessionVisibilityBadge-IJ03myi1.js";import{D as J,a as K,c as X,d as ee,b as te}from"./dialog-BBq_xUNv.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
2
+ * @license lucide-react v0.555.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const se=[["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"}]],re=R("folder",se);function ae({teamName:o,className:i}){return o?e.jsx("span",{className:S("inline-flex items-center rounded-full border border-border/60 bg-surface-2 px-2 py-0.5 text-xs text-text-muted",i),children:o}):null}function ne({environments:o,onSelectEnvironment:i}){const{activeTeam:j}=T(),{user:p}=L(),d=n.useMemo(()=>(p==null?void 0:p.role)==="admin"?o:j?o.filter(l=>l.team_id===j.id):o.filter(l=>!l.team_id),[o,j,p]);return!d||d.length===0?e.jsxs("div",{className:"rounded-xl border border-dashed border-border-light px-8 py-12 text-center",children:[e.jsx(F,{className:"mx-auto mb-4 h-7 w-7 text-brand/40"}),e.jsx("p",{className:"font-display text-sm font-medium text-text-secondary",children:"No active environments"})]}):e.jsx("div",{className:"space-y-2",children:d.map(l=>{const u=l.worker_type==="acp",g=D(l.worker_type),h=g.fullLabel,f=g.colorClass;return e.jsxs("button",{type:"button",onClick:()=>i==null?void 0:i(l),disabled:u,className:`flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors ${u?"cursor-default opacity-80":"cursor-pointer hover:bg-surface-2"}`,children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[15px] font-medium text-text-primary",children:l.machine_name||l.id}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${f}`,children:h}),e.jsx(ae,{teamName:l.team_name??null})]}),e.jsx("div",{className:"text-sm text-text-muted",children:l.directory||""})]})}),e.jsxs("div",{className:"text-right",children:[e.jsx(O,{status:l.status}),e.jsx("div",{className:"mt-1 text-xs text-text-muted",children:l.branch||""})]})]},l.id)})})}function le({sessions:o,environments:i,onSelect:j,onDelete:p}){M();const{activeTeam:d,myTeams:l}=T(),{user:u}=L(),g=n.useMemo(()=>{const t=new Map;for(const x of l)t.set(x.id,x.name);return t},[l]),h=n.useMemo(()=>(u==null?void 0:u.role)==="admin"?o:d?o.filter(t=>t.owner_type==="team"&&t.owner_id===d.id):o.filter(t=>t.owner_type==="user"||t.access_level==="write"||t.access_level==="read"),[o,d,u]),{mySessions:f,sharedSessions:w}=n.useMemo(()=>{const t=[],x=[];for(const c of h)d?t.push(c):c.access_level==="write"||c.access_level==="read"?x.push(c):t.push(c);return{mySessions:t,sharedSessions:x}},[h,d]),v=new Map;for(const t of i??[])t!=null&&t.id&&t.worker_type&&v.set(t.id,t.worker_type);const N=(t,x)=>(x.updated_at||0)-(t.updated_at||0);function b(t){const x=!!p&&t.access_level!=="write"&&t.access_level!=="read";return e.jsxs("div",{className:"group flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors hover:bg-surface-2",children:[e.jsxs("button",{type:"button",onClick:()=>j(t.id),className:"min-w-0 flex-1 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate text-[15px] font-medium text-text-primary",children:t.title||t.id}),t.visibility&&e.jsx(G,{visibility:t.visibility||"private"}),(()=>{var m;let c=t.source==="acp"?"acp":(m=t.environment)==null?void 0:m.worker_type;!c&&t.environment_id&&(c=v.get(t.environment_id));const r=D(c);return e.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${r.colorClass}`,children:r.fullLabel})})()]}),e.jsxs("div",{className:"flex items-center gap-2 truncate text-xs text-text-muted",children:[e.jsx("span",{className:"truncate font-mono",children:t.id}),t.owner_type==="team"&&t.owner_id&&e.jsxs("span",{className:"inline-flex items-center gap-2 truncate",children:[e.jsx("span",{className:"text-text-muted/40",children:"|"}),e.jsx("span",{className:"truncate",children:g.get(t.owner_id)||t.owner_id})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(O,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:A(t.created_at||t.updated_at)}),x&&e.jsx("button",{type:"button",onClick:c=>{c.stopPropagation(),p(t.id)},className:"rounded p-1 text-text-muted opacity-0 transition-all hover:text-status-error group-hover:opacity-100",title:"Delete session",children:e.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]},t.id)}if(h.length===0)return e.jsxs("div",{className:"rounded-xl border border-dashed border-border-light px-8 py-12 text-center",children:[e.jsx(F,{className:"mx-auto mb-4 h-7 w-7 text-brand/40"}),e.jsx("p",{className:"font-display text-sm font-medium text-text-secondary",children:"No sessions"})]});const y=[...f].sort(N),k=[...w].sort(N);return e.jsxs("div",{className:"space-y-4",children:[y.length>0&&e.jsxs("section",{className:"space-y-2",children:[!d&&k.length>0&&e.jsx("h3",{className:"px-1 text-xs font-medium uppercase tracking-wide text-text-muted",children:a("session.mySessions")}),y.map(b)]}),k.length>0&&e.jsxs("section",{className:"space-y-2",children:[e.jsx("h3",{className:"px-1 text-xs font-medium uppercase tracking-wide text-text-muted",children:a("session.sharedWithMe")}),k.map(b)]})]})}function oe({open:o,environments:i,onClose:j,onCreated:p}){M();const{activeTeam:d}=T(),{user:l}=L(),[u,g]=n.useState(""),[h,f]=n.useState(""),[w,v]=n.useState("same-dir"),[N,b]=n.useState(""),[y,k]=n.useState(!1),[t,x]=n.useState(!1),c=n.useMemo(()=>(l==null?void 0:l.role)==="admin"?i:d?i.filter(s=>s.team_id===d.id):i.filter(s=>!s.team_id),[i,d,l]);n.useEffect(()=>{o&&(g(""),f(""),v("same-dir"),b(""),x(!1))},[o]);const r=c.find(s=>s.id===h)||null,m=r?c.findIndex(s=>s.id===r.id)+1:null,_=async()=>{k(!0),b("");try{const s={};u.trim()&&(s.title=u.trim()),h&&(s.environment_id=h),s.spawn_mode=w;const C=H();C&&(s.team_id=C);const E=await V(s);p(E)}catch(s){b(s instanceof Error?s.message:a("dialog.createFailed"))}finally{k(!1)}};return e.jsx(J,{open:o,onOpenChange:s=>{s||j()},children:e.jsxs(K,{className:"max-w-md rounded-2xl border-border bg-surface-1 p-6 shadow-2xl",children:[e.jsx(X,{children:e.jsx(ee,{className:"font-display text-lg font-semibold text-text-primary",children:a("dialog.newSession")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:a("dialog.titleOptional")}),e.jsx("input",{type:"text",value:u,onChange:s=>g(s.target.value),placeholder:a("dialog.titlePlaceholder"),className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:a("dialog.environment")}),e.jsxs($,{open:t,onOpenChange:x,children:[e.jsx(W,{asChild:!0,children:e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary hover:border-border-light focus:border-brand focus:outline-none transition-colors",children:[e.jsx("span",{className:S("flex items-center gap-2 truncate",!r&&"text-text-muted"),children:r?e.jsxs(e.Fragment,{children:[m!==null&&e.jsxs("span",{className:"shrink-0 rounded bg-surface-3 px-1.5 py-0.5 text-[10px] font-mono text-text-muted",children:["#",m]}),e.jsx("span",{className:"truncate",children:r.machine_name||r.id}),e.jsx("span",{className:"shrink-0 text-text-muted",children:"·"}),e.jsx("span",{className:"shrink-0 text-text-muted",children:D(r.worker_type).shortLabel})]}):e.jsx("span",{children:a("dialog.none")})}),e.jsx(q,{className:"h-4 w-4 shrink-0 text-text-muted"})]})}),e.jsxs(Q,{align:"start",className:"max-h-80 w-80 overflow-y-auto rounded-lg border-border bg-surface-1 p-1 shadow-xl",children:[e.jsxs("button",{type:"button",onClick:()=>{f(""),x(!1)},className:"flex w-full items-center justify-between rounded-md px-3 py-2 text-sm text-text-secondary hover:bg-surface-2 transition-colors",children:[e.jsx("span",{children:a("dialog.none")}),!h&&e.jsx(B,{className:"h-3.5 w-3.5 text-brand"})]}),c.length===0?e.jsx("p",{className:"px-3 py-2 text-xs text-text-muted",children:a("dialog.envEmpty")}):e.jsx("div",{className:"space-y-1 pt-1",children:c.map((s,C)=>{const E=D(s.worker_type),P=!!s.team_id,I=s.id===h;return e.jsxs("button",{type:"button",onClick:()=>{f(s.id),x(!1)},className:S("flex w-full flex-col gap-1.5 rounded-md px-3 py-2 text-left transition-colors",I?"bg-brand/10":"hover:bg-surface-2"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"shrink-0 rounded bg-surface-3 px-1.5 py-0.5 text-[10px] font-mono text-text-muted",children:["#",C+1]}),e.jsx("span",{className:"truncate font-medium text-text-primary",children:s.machine_name||s.id}),e.jsx("span",{className:S("shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium",E.colorClass),children:E.shortLabel}),e.jsx("span",{className:S("shrink-0 rounded-full border px-2 py-0.5 text-[10px] font-medium",P?"border-border/60 bg-surface-2 text-text-muted":"border-brand/30 bg-brand/10 text-brand"),children:P?`${a("dialog.envTeam")}: ${s.team_name||s.team_id}`:a("dialog.envPersonal")}),I&&e.jsx(B,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-brand"})]}),s.directory&&e.jsxs("div",{className:"flex items-center gap-1.5 truncate text-xs text-text-muted",children:[e.jsx(re,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"truncate font-mono",children:s.directory}),s.branch&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-text-muted/40",children:"·"}),e.jsx("span",{className:"truncate",children:s.branch})]})]})]},s.id)})})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:a("dialog.workspaceMode")}),e.jsxs("select",{value:w,onChange:s=>v(s.target.value),className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-brand focus:outline-none",children:[e.jsx("option",{value:"same-dir",children:a("dialog.sameDir")}),e.jsx("option",{value:"worktree",children:a("dialog.worktree")})]})]}),N&&e.jsx("div",{className:"text-sm text-status-error",children:N})]}),e.jsxs(te,{children:[e.jsx("button",{onClick:j,className:"rounded-lg border border-border px-4 py-2 text-sm text-text-secondary hover:bg-surface-2 transition-colors",children:a("common.cancel")}),e.jsx("button",{onClick:_,disabled:y,className:"rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white hover:bg-brand-light disabled:opacity-50 transition-colors",children:y?a("common.creating"):a("common.create")})]})]})})}function he({onNavigateSession:o}){M();const[i,j]=n.useState([]),[p,d]=n.useState([]),[l,u]=n.useState(!1),[g,h]=n.useState(""),[f,w]=n.useState(null),[v,N]=n.useState(!1),b=n.useRef(0);n.useEffect(()=>{const r=g.trim();if(!r){b.current+=1,w(null),N(!1);return}N(!0);const m=++b.current,_=setTimeout(()=>{Z(r).then(s=>{b.current===m&&w(s.results??[])}).catch(()=>{b.current===m&&w([])}).finally(()=>{b.current===m&&N(!1)})},300);return()=>clearTimeout(_)},[g]);const y=n.useCallback(async()=>{try{const[r,m]=await Promise.all([U(),Y()]);j(r||[]),d(m||[])}catch(r){console.error("Dashboard render error:",r)}},[]);n.useEffect(()=>{y();const r=setInterval(y,5e3);return window.addEventListener("focus",y),()=>{clearInterval(r),window.removeEventListener("focus",y)}},[y]);const k=r=>{u(!1),o(r.id)},t=n.useCallback(r=>{},[]),x=n.useCallback(r=>{o(r)},[o]),c=n.useCallback(async r=>{if(window.confirm(a("dashboard.confirmDelete").replace("{id}",r)))try{await z(r),j(m=>m.filter(_=>_.id!==r))}catch(m){alert(m instanceof Error?m.message:a("dashboard.deleteFailed"))}},[]);return e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{className:"mx-auto max-w-3xl",children:[e.jsx("header",{className:"hero-enter mb-14",children:e.jsx("h1",{className:"font-display text-4xl font-semibold tracking-tight text-text-primary sm:text-5xl",children:a("dashboard.title")})}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"mb-6 font-display text-lg font-semibold text-text-primary",children:a("dashboard.environments")}),e.jsx(ne,{environments:p,onSelectEnvironment:t})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("h2",{className:"flex items-baseline gap-2.5 font-display text-lg font-semibold text-text-primary",children:[a("dashboard.sessions"),f===null&&i.length>0&&e.jsx("span",{className:"font-mono text-sm font-normal text-text-muted tabular-nums",children:i.length})]}),e.jsx("button",{onClick:()=>u(!0),className:"rounded-lg bg-accent px-4 py-2 font-display text-sm font-medium text-accent-foreground shadow-lg shadow-brand/25 transition-all hover:-translate-y-0.5 hover:bg-accent/90 hover:shadow-brand/40",children:a("dashboard.newSession")})]}),e.jsxs("div",{className:"mb-6 flex items-center gap-2 rounded-lg border border-border bg-surface-2 px-3 py-2",children:[e.jsxs("svg",{className:"h-4 w-4 flex-shrink-0 text-text-muted",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"m21 21-4.35-4.35"})]}),e.jsx("input",{value:g,onChange:r=>h(r.target.value),placeholder:a("dashboard.searchPlaceholder"),className:"w-full bg-transparent text-sm text-text-primary placeholder:text-text-muted focus:outline-none"}),v&&e.jsx("span",{className:"flex-shrink-0 text-xs text-text-muted",children:"搜索中…"})]}),f!==null?e.jsxs("div",{className:"space-y-2",children:[f.length===0&&!v&&e.jsx("p",{className:"text-sm text-text-muted",children:a("dashboard.searchNoResults")}),f.map(r=>e.jsxs("button",{type:"button",onClick:()=>o(r.session_id),className:"block w-full rounded-lg border border-border bg-surface-1 px-4 py-3 text-left transition-colors hover:bg-surface-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium text-text-primary",children:r.title||r.session_id}),e.jsxs("span",{className:"flex-shrink-0 text-xs text-text-muted",children:[r.match_count," 处匹配"]})]}),e.jsx("p",{className:"mt-1 line-clamp-2 text-xs leading-relaxed text-text-muted",children:r.snippet})]},r.session_id))]}):e.jsx(le,{sessions:i,environments:p,onSelect:x,onDelete:c})]}),e.jsx(oe,{open:l,environments:p,onClose:()=>u(!1),onCreated:k})]})})}export{he as Dashboard};
@@ -0,0 +1 @@
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aC as v,y as N,ax as t}from"./main-By9kIvu-.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function P({onSuccess:h,onInvalidInvite:i}){const{join:b}=v(),[l,f]=r.useState(""),[u,w]=r.useState(""),[o,j]=r.useState(""),[c,y]=r.useState(""),[m,n]=r.useState(""),[x,p]=r.useState(!1);r.useEffect(()=>{const a=new URLSearchParams(window.location.search).get("invite");a?f(a):i()},[i]);const g=async s=>{if(s.preventDefault(),n(""),o.length<8){n(t("auth.setup.passwordTooShort"));return}if(o!==c){n(t("auth.setup.passwordMismatch"));return}p(!0);try{await b(l,u,o),h()}catch(a){const d=a instanceof Error?a.message:"Join failed";if(d.includes("Invalid invitation")||d.includes("expired")||d.includes("already used")){i();return}n(d)}finally{p(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"hero-enter w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx(N,{className:"mx-auto mb-5 h-10 w-10 text-brand"}),e.jsx("h1",{className:"font-display text-3xl font-semibold tracking-tight text-text-primary",children:t("auth.join.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.join.welcome")}),e.jsx("p",{className:"mt-1 text-sm text-text-muted",children:t("auth.join.description")})]}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.username")}),e.jsx("input",{type:"text",value:u,onChange:s=>w(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>j(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:c,onChange:s=>y(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),m&&e.jsx("p",{className:"text-sm text-status-error",children:m}),e.jsx("button",{type:"submit",disabled:x||!l,className:"w-full rounded-lg bg-brand px-4 py-2.5 font-display text-sm font-medium text-white shadow-lg shadow-brand/25 transition-all hover:-translate-y-0.5 hover:bg-brand-light hover:shadow-brand/40 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:translate-y-0 disabled:hover:shadow-none",children:x?t("common.loading"):t("auth.join.submit")})]})]})})}export{P as Join};
@@ -0,0 +1 @@
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aC as f,y,ax as t}from"./main-By9kIvu-.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S({onSuccess:u,onNavigateRegister:m}){const{login:x,registrationAllowed:c,singleUserMode:h}=f(),[a,p]=r.useState(""),[o,b]=r.useState(""),[n,l]=r.useState(""),[i,d]=r.useState(!1),g=async s=>{s.preventDefault(),l(""),d(!0);try{await x(a,o),u()}catch{l(t("auth.login.failed"))}finally{d(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"hero-enter w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx(y,{className:"mx-auto mb-5 h-10 w-10 text-brand"}),e.jsx("h1",{className:"font-display text-3xl font-semibold tracking-tight text-text-primary",children:t("auth.login.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.login.description")})]}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[h&&e.jsxs("div",{className:"rounded-lg border border-border bg-surface-2 px-3 py-2 text-xs text-text-secondary",children:[e.jsx("p",{children:t("auth.login.singleUserHint")}),e.jsx("p",{className:"mt-1 font-mono text-text-primary",children:"admin / admin123"}),e.jsx("p",{className:"mt-1 text-text-muted",children:t("auth.login.singleUserHintFooter")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:a,onChange:s=>p(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>b(s.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),n&&e.jsx("p",{className:"text-sm text-status-error",children:n}),e.jsx("button",{type:"submit",disabled:i,className:"w-full rounded-lg bg-brand px-4 py-2.5 font-display text-sm font-medium text-white shadow-lg shadow-brand/25 transition-all hover:-translate-y-0.5 hover:bg-brand-light hover:shadow-brand/40 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:translate-y-0 disabled:hover:shadow-none",children:i?t("common.loading"):t("auth.login.submit")})]}),c&&e.jsx("button",{type:"button",onClick:m,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.login.register")})]})})}export{S as Login};
@@ -0,0 +1 @@
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aC as w,y,ax as t}from"./main-By9kIvu-.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function C({onSuccess:c,onBack:x}){const{register:p}=w(),[n,h]=r.useState(""),[a,b]=r.useState(""),[l,f]=r.useState(""),[d,o]=r.useState(""),[i,u]=r.useState(!1),g=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==l){o(t("auth.setup.passwordMismatch"));return}u(!0);try{await p(n,a),c()}catch(m){o(m instanceof Error?m.message:t("auth.register.failed"))}finally{u(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"hero-enter w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx(y,{className:"mx-auto mb-5 h-10 w-10 text-brand"}),e.jsx("h1",{className:"font-display text-3xl font-semibold tracking-tight text-text-primary",children:t("auth.register.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.register.description")})]}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:n,onChange:s=>h(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>b(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:l,onChange:s=>f(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),d&&e.jsx("p",{className:"text-sm text-status-error",children:d}),e.jsx("button",{type:"submit",disabled:i,className:"w-full rounded-lg bg-brand px-4 py-2.5 font-display text-sm font-medium text-white shadow-lg shadow-brand/25 transition-all hover:-translate-y-0.5 hover:bg-brand-light hover:shadow-brand/40 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:translate-y-0 disabled:hover:shadow-none",children:i?t("common.loading"):t("auth.register.submit")})]}),e.jsx("button",{type:"button",onClick:x,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.register.backToLogin")})]})})}export{C as Register};