@saluzi/saluzi-edu 0.2.76 → 0.2.78

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 (144) hide show
  1. package/dist/cli.js +532 -532
  2. package/dist/rcs-web/assets/{AdminPanel-omPQCGJ3.js → AdminPanel-CeJbvp1y.js} +1 -1
  3. package/{packages/remote-control-server/web/dist/assets/ArtifactView-gpttL9Bm.js → dist/rcs-web/assets/ArtifactView-DG4NEABr.js} +1 -1
  4. package/{packages/remote-control-server/web/dist/assets/ArtifactsGallery-EA1PTLFb.js → dist/rcs-web/assets/ArtifactsGallery-yaOX7eyz.js} +12 -12
  5. package/{packages/remote-control-server/web/dist/assets/Claim-CcQDX4V4.js → dist/rcs-web/assets/Claim-DcVDtUJW.js} +1 -1
  6. package/dist/rcs-web/assets/{Dashboard-jAe3pVfO.js → Dashboard--liQacnK.js} +1 -1
  7. package/dist/rcs-web/assets/{Join-z-lybdiB.js → Join-CTPWU5Mr.js} +1 -1
  8. package/dist/rcs-web/assets/{Login-1UQ7Tsno.js → Login-CAo4xQR6.js} +1 -1
  9. package/dist/rcs-web/assets/{Register-PLzfxLKv.js → Register-D1K9V2Cc.js} +1 -1
  10. package/dist/rcs-web/assets/{SessionDetail-DLqYCAa1.js → SessionDetail-Dlhtkeg9.js} +1 -1
  11. package/dist/rcs-web/assets/{SessionVisibilityBadge-YYJU7rsU.js → SessionVisibilityBadge-DSBB4hQt.js} +1 -1
  12. package/dist/rcs-web/assets/{Setup-eKrRj_Cj.js → Setup-BVVR5jB-.js} +1 -1
  13. package/dist/rcs-web/assets/{ShareLanding-ChhDZDz-.js → ShareLanding-0IFIhCg-.js} +1 -1
  14. package/dist/rcs-web/assets/{TeamCreate-yh6hBIjW.js → TeamCreate-B9t2hKQE.js} +1 -1
  15. package/dist/rcs-web/assets/{TeamDetail-V_nG-5yy.js → TeamDetail-CKsvDnnZ.js} +1 -1
  16. package/dist/rcs-web/assets/{TeamList-8zi79KWI.js → TeamList-Db3o2sd5.js} +1 -1
  17. package/dist/rcs-web/assets/{TeamSettings-D7NuRKfx.js → TeamSettings-DmElPUhc.js} +1 -1
  18. package/dist/rcs-web/assets/{UserSearchInput-CH6mJNkv.js → UserSearchInput-Dclznuqh.js} +1 -1
  19. package/dist/rcs-web/assets/{UserSettings--GHQVpb4.js → UserSettings-CAYmVaEN.js} +1 -1
  20. package/dist/rcs-web/assets/{arc-CUQyGoJx.js → arc-CdhVjXrk.js} +1 -1
  21. package/dist/rcs-web/assets/{architectureDiagram-3BPJPVTR-BnfpiA35.js → architectureDiagram-3BPJPVTR-CdUftizr.js} +1 -1
  22. package/{packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-C7EIx897.js → dist/rcs-web/assets/blockDiagram-GPEHLZMM-B3EHysEn.js} +1 -1
  23. package/{packages/remote-control-server/web/dist/assets/c4Diagram-AAUBKEIU-Bh0NqvyH.js → dist/rcs-web/assets/c4Diagram-AAUBKEIU-DHfYdMEZ.js} +1 -1
  24. package/dist/rcs-web/assets/channel-CI-PMv7a.js +1 -0
  25. package/dist/rcs-web/assets/{chunk-2J33WTMH-vhUevvwB.js → chunk-2J33WTMH-EhksSUIa.js} +1 -1
  26. package/dist/rcs-web/assets/{chunk-4BX2VUAB-a8pkgzR3.js → chunk-4BX2VUAB-CSwxuVKu.js} +1 -1
  27. package/dist/rcs-web/assets/{chunk-55IACEB6-BmhX93YQ.js → chunk-55IACEB6-DlOkG9fU.js} +1 -1
  28. package/dist/rcs-web/assets/{chunk-727SXJPM-rp7DpY1W.js → chunk-727SXJPM-1CxczIsf.js} +1 -1
  29. package/dist/rcs-web/assets/{chunk-AQP2D5EJ-BrDELb0G.js → chunk-AQP2D5EJ-DfYiA4nH.js} +1 -1
  30. package/dist/rcs-web/assets/{chunk-FMBD7UC4-BPZWn7Kb.js → chunk-FMBD7UC4-Bw5pfdve.js} +1 -1
  31. package/dist/rcs-web/assets/{chunk-ND2GUHAM-CoV8irx0.js → chunk-ND2GUHAM-DdcvT253.js} +1 -1
  32. package/dist/rcs-web/assets/{chunk-QZHKN3VN-BpciLCM_.js → chunk-QZHKN3VN-HMrF81oZ.js} +1 -1
  33. package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-B3XAB9kf.js +1 -0
  34. package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-B3XAB9kf.js +1 -0
  35. package/dist/rcs-web/assets/{code-block-IT6T5CEO-Dh84ckFz.js → code-block-IT6T5CEO-D_icBEKo.js} +1 -1
  36. package/dist/rcs-web/assets/{copy-igOaIr5S.js → copy-C6MF0GiS.js} +1 -1
  37. package/{packages/remote-control-server/web/dist/assets/cose-bilkent-S5V4N54A-Bw_9kvTI.js → dist/rcs-web/assets/cose-bilkent-S5V4N54A-BbpIuAyZ.js} +1 -1
  38. package/dist/rcs-web/assets/{dagre-BM42HDAG-oVTffvvP.js → dagre-BM42HDAG-BBlOWeV0.js} +1 -1
  39. package/dist/rcs-web/assets/{diagram-2AECGRRQ-DxxksyrF.js → diagram-2AECGRRQ-DMwCFj3q.js} +1 -1
  40. package/dist/rcs-web/assets/{diagram-5GNKFQAL-CZEaxtlq.js → diagram-5GNKFQAL-CHRU_l-Z.js} +1 -1
  41. package/dist/rcs-web/assets/{diagram-KO2AKTUF-CtIuIGuB.js → diagram-KO2AKTUF-RqWISfzc.js} +1 -1
  42. package/dist/rcs-web/assets/{diagram-LMA3HP47-COKmFGX6.js → diagram-LMA3HP47-DcIfgVzs.js} +1 -1
  43. package/{packages/remote-control-server/web/dist/assets/diagram-OG6HWLK6-DYC75Fm_.js → dist/rcs-web/assets/diagram-OG6HWLK6-Cpnv-7XF.js} +1 -1
  44. package/{packages/remote-control-server/web/dist/assets/dialog-B6hfoHoV.js → dist/rcs-web/assets/dialog-y9t3OG8S.js} +1 -1
  45. package/dist/rcs-web/assets/{erDiagram-TEJ5UH35-DEWI8GgR.js → erDiagram-TEJ5UH35-yRmna5lr.js} +1 -1
  46. package/dist/rcs-web/assets/{flowDiagram-I6XJVG4X-By2_StrC.js → flowDiagram-I6XJVG4X-_7eLAsX0.js} +1 -1
  47. package/{packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-CcPteQpG.js → dist/rcs-web/assets/ganttDiagram-6RSMTGT7-CFxlByao.js} +1 -1
  48. package/{packages/remote-control-server/web/dist/assets/gitGraphDiagram-PVQCEYII-Cp2tMBlS.js → dist/rcs-web/assets/gitGraphDiagram-PVQCEYII-CIJGDuu2.js} +1 -1
  49. package/dist/rcs-web/assets/{infoDiagram-5YYISTIA-BaWOi6s4.js → infoDiagram-5YYISTIA-DL26mYqN.js} +1 -1
  50. package/dist/rcs-web/assets/{ishikawaDiagram-YF4QCWOH-Br83XOr_.js → ishikawaDiagram-YF4QCWOH-ClTbQIgQ.js} +1 -1
  51. package/{packages/remote-control-server/web/dist/assets/journeyDiagram-JHISSGLW-DKrA-8Jk.js → dist/rcs-web/assets/journeyDiagram-JHISSGLW-BDSHXfMK.js} +1 -1
  52. package/dist/rcs-web/assets/{kanban-definition-UN3LZRKU-CbeuuPnx.js → kanban-definition-UN3LZRKU-bjaNmDdS.js} +1 -1
  53. package/dist/rcs-web/assets/{linear-CL-QXo7Y.js → linear-HZJSCbjO.js} +1 -1
  54. package/dist/rcs-web/assets/{main-UQZcxx36.js → main-BtriBTyr.js} +3 -3
  55. package/{packages/remote-control-server/web/dist/assets/mermaid-VLURNSYL-B7QjpmY_.js → dist/rcs-web/assets/mermaid-VLURNSYL-CrXtMOXy.js} +4 -4
  56. package/dist/rcs-web/assets/{mermaid.core-BkSyhnnE.js → mermaid.core-DTbrYqLV.js} +5 -5
  57. package/{packages/remote-control-server/web/dist/assets/mindmap-definition-RKZ34NQL-DxjIAXqd.js → dist/rcs-web/assets/mindmap-definition-RKZ34NQL-9ifL4_5N.js} +1 -1
  58. package/dist/rcs-web/assets/{pieDiagram-4H26LBE5-pDbW_3Yv.js → pieDiagram-4H26LBE5-BSN1xh9l.js} +1 -1
  59. package/dist/rcs-web/assets/{quadrantDiagram-W4KKPZXB-awYUqDtP.js → quadrantDiagram-W4KKPZXB-BOGclSnl.js} +1 -1
  60. package/dist/rcs-web/assets/{requirementDiagram-4Y6WPE33-Ec01jxw-.js → requirementDiagram-4Y6WPE33-BQiBrIyS.js} +1 -1
  61. package/{packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-Bqv5meJU.js → dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-Cmmlv8nQ.js} +1 -1
  62. package/{packages/remote-control-server/web/dist/assets/sequenceDiagram-3UESZ5HK-4IX2ixGT.js → dist/rcs-web/assets/sequenceDiagram-3UESZ5HK-CGqCUPei.js} +1 -1
  63. package/dist/rcs-web/assets/{stateDiagram-AJRCARHV-DZKpy9jY.js → stateDiagram-AJRCARHV-Crly1oy6.js} +1 -1
  64. package/dist/rcs-web/assets/{stateDiagram-v2-BHNVJYJU-CO21iBgQ.js → stateDiagram-v2-BHNVJYJU-DgXehnSh.js} +1 -1
  65. package/{packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-CrjfBCmq.js → dist/rcs-web/assets/timeline-definition-PNZ67QCA-BCjEDIqH.js} +1 -1
  66. package/{packages/remote-control-server/web/dist/assets/vennDiagram-CIIHVFJN-BgS-fFrR.js → dist/rcs-web/assets/vennDiagram-CIIHVFJN-BdyNi3pq.js} +1 -1
  67. package/dist/rcs-web/assets/{wardleyDiagram-YWT4CUSO-CKwkA8N2.js → wardleyDiagram-YWT4CUSO-DG3vTRnZ.js} +1 -1
  68. package/dist/rcs-web/assets/{xychartDiagram-2RQKCTM6-DOQU-oX2.js → xychartDiagram-2RQKCTM6-ZIOBxK1C.js} +1 -1
  69. package/dist/rcs-web/index.html +1 -1
  70. package/package.json +1 -1
  71. package/packages/remote-control-server/web/dist/assets/{AdminPanel-omPQCGJ3.js → AdminPanel-CeJbvp1y.js} +1 -1
  72. package/{dist/rcs-web/assets/ArtifactView-gpttL9Bm.js → packages/remote-control-server/web/dist/assets/ArtifactView-DG4NEABr.js} +1 -1
  73. package/{dist/rcs-web/assets/ArtifactsGallery-EA1PTLFb.js → packages/remote-control-server/web/dist/assets/ArtifactsGallery-yaOX7eyz.js} +12 -12
  74. package/{dist/rcs-web/assets/Claim-CcQDX4V4.js → packages/remote-control-server/web/dist/assets/Claim-DcVDtUJW.js} +1 -1
  75. package/packages/remote-control-server/web/dist/assets/{Dashboard-jAe3pVfO.js → Dashboard--liQacnK.js} +1 -1
  76. package/packages/remote-control-server/web/dist/assets/{Join-z-lybdiB.js → Join-CTPWU5Mr.js} +1 -1
  77. package/packages/remote-control-server/web/dist/assets/{Login-1UQ7Tsno.js → Login-CAo4xQR6.js} +1 -1
  78. package/packages/remote-control-server/web/dist/assets/{Register-PLzfxLKv.js → Register-D1K9V2Cc.js} +1 -1
  79. package/packages/remote-control-server/web/dist/assets/{SessionDetail-DLqYCAa1.js → SessionDetail-Dlhtkeg9.js} +1 -1
  80. package/packages/remote-control-server/web/dist/assets/{SessionVisibilityBadge-YYJU7rsU.js → SessionVisibilityBadge-DSBB4hQt.js} +1 -1
  81. package/packages/remote-control-server/web/dist/assets/{Setup-eKrRj_Cj.js → Setup-BVVR5jB-.js} +1 -1
  82. package/packages/remote-control-server/web/dist/assets/{ShareLanding-ChhDZDz-.js → ShareLanding-0IFIhCg-.js} +1 -1
  83. package/packages/remote-control-server/web/dist/assets/{TeamCreate-yh6hBIjW.js → TeamCreate-B9t2hKQE.js} +1 -1
  84. package/packages/remote-control-server/web/dist/assets/{TeamDetail-V_nG-5yy.js → TeamDetail-CKsvDnnZ.js} +1 -1
  85. package/packages/remote-control-server/web/dist/assets/{TeamList-8zi79KWI.js → TeamList-Db3o2sd5.js} +1 -1
  86. package/packages/remote-control-server/web/dist/assets/{TeamSettings-D7NuRKfx.js → TeamSettings-DmElPUhc.js} +1 -1
  87. package/packages/remote-control-server/web/dist/assets/{UserSearchInput-CH6mJNkv.js → UserSearchInput-Dclznuqh.js} +1 -1
  88. package/packages/remote-control-server/web/dist/assets/{UserSettings--GHQVpb4.js → UserSettings-CAYmVaEN.js} +1 -1
  89. package/packages/remote-control-server/web/dist/assets/{arc-CUQyGoJx.js → arc-CdhVjXrk.js} +1 -1
  90. package/packages/remote-control-server/web/dist/assets/{architectureDiagram-3BPJPVTR-BnfpiA35.js → architectureDiagram-3BPJPVTR-CdUftizr.js} +1 -1
  91. package/{dist/rcs-web/assets/blockDiagram-GPEHLZMM-C7EIx897.js → packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-B3EHysEn.js} +1 -1
  92. package/{dist/rcs-web/assets/c4Diagram-AAUBKEIU-Bh0NqvyH.js → packages/remote-control-server/web/dist/assets/c4Diagram-AAUBKEIU-DHfYdMEZ.js} +1 -1
  93. package/packages/remote-control-server/web/dist/assets/channel-CI-PMv7a.js +1 -0
  94. package/packages/remote-control-server/web/dist/assets/{chunk-2J33WTMH-vhUevvwB.js → chunk-2J33WTMH-EhksSUIa.js} +1 -1
  95. package/packages/remote-control-server/web/dist/assets/{chunk-4BX2VUAB-a8pkgzR3.js → chunk-4BX2VUAB-CSwxuVKu.js} +1 -1
  96. package/packages/remote-control-server/web/dist/assets/{chunk-55IACEB6-BmhX93YQ.js → chunk-55IACEB6-DlOkG9fU.js} +1 -1
  97. package/packages/remote-control-server/web/dist/assets/{chunk-727SXJPM-rp7DpY1W.js → chunk-727SXJPM-1CxczIsf.js} +1 -1
  98. package/packages/remote-control-server/web/dist/assets/{chunk-AQP2D5EJ-BrDELb0G.js → chunk-AQP2D5EJ-DfYiA4nH.js} +1 -1
  99. package/packages/remote-control-server/web/dist/assets/{chunk-FMBD7UC4-BPZWn7Kb.js → chunk-FMBD7UC4-Bw5pfdve.js} +1 -1
  100. package/packages/remote-control-server/web/dist/assets/{chunk-ND2GUHAM-CoV8irx0.js → chunk-ND2GUHAM-DdcvT253.js} +1 -1
  101. package/packages/remote-control-server/web/dist/assets/{chunk-QZHKN3VN-BpciLCM_.js → chunk-QZHKN3VN-HMrF81oZ.js} +1 -1
  102. package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-B3XAB9kf.js +1 -0
  103. package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-B3XAB9kf.js +1 -0
  104. package/packages/remote-control-server/web/dist/assets/{code-block-IT6T5CEO-Dh84ckFz.js → code-block-IT6T5CEO-D_icBEKo.js} +1 -1
  105. package/packages/remote-control-server/web/dist/assets/{copy-igOaIr5S.js → copy-C6MF0GiS.js} +1 -1
  106. package/{dist/rcs-web/assets/cose-bilkent-S5V4N54A-Bw_9kvTI.js → packages/remote-control-server/web/dist/assets/cose-bilkent-S5V4N54A-BbpIuAyZ.js} +1 -1
  107. package/packages/remote-control-server/web/dist/assets/{dagre-BM42HDAG-oVTffvvP.js → dagre-BM42HDAG-BBlOWeV0.js} +1 -1
  108. package/packages/remote-control-server/web/dist/assets/{diagram-2AECGRRQ-DxxksyrF.js → diagram-2AECGRRQ-DMwCFj3q.js} +1 -1
  109. package/packages/remote-control-server/web/dist/assets/{diagram-5GNKFQAL-CZEaxtlq.js → diagram-5GNKFQAL-CHRU_l-Z.js} +1 -1
  110. package/packages/remote-control-server/web/dist/assets/{diagram-KO2AKTUF-CtIuIGuB.js → diagram-KO2AKTUF-RqWISfzc.js} +1 -1
  111. package/packages/remote-control-server/web/dist/assets/{diagram-LMA3HP47-COKmFGX6.js → diagram-LMA3HP47-DcIfgVzs.js} +1 -1
  112. package/{dist/rcs-web/assets/diagram-OG6HWLK6-DYC75Fm_.js → packages/remote-control-server/web/dist/assets/diagram-OG6HWLK6-Cpnv-7XF.js} +1 -1
  113. package/{dist/rcs-web/assets/dialog-B6hfoHoV.js → packages/remote-control-server/web/dist/assets/dialog-y9t3OG8S.js} +1 -1
  114. package/packages/remote-control-server/web/dist/assets/{erDiagram-TEJ5UH35-DEWI8GgR.js → erDiagram-TEJ5UH35-yRmna5lr.js} +1 -1
  115. package/packages/remote-control-server/web/dist/assets/{flowDiagram-I6XJVG4X-By2_StrC.js → flowDiagram-I6XJVG4X-_7eLAsX0.js} +1 -1
  116. package/{dist/rcs-web/assets/ganttDiagram-6RSMTGT7-CcPteQpG.js → packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-CFxlByao.js} +1 -1
  117. package/{dist/rcs-web/assets/gitGraphDiagram-PVQCEYII-Cp2tMBlS.js → packages/remote-control-server/web/dist/assets/gitGraphDiagram-PVQCEYII-CIJGDuu2.js} +1 -1
  118. package/packages/remote-control-server/web/dist/assets/{infoDiagram-5YYISTIA-BaWOi6s4.js → infoDiagram-5YYISTIA-DL26mYqN.js} +1 -1
  119. package/packages/remote-control-server/web/dist/assets/{ishikawaDiagram-YF4QCWOH-Br83XOr_.js → ishikawaDiagram-YF4QCWOH-ClTbQIgQ.js} +1 -1
  120. package/{dist/rcs-web/assets/journeyDiagram-JHISSGLW-DKrA-8Jk.js → packages/remote-control-server/web/dist/assets/journeyDiagram-JHISSGLW-BDSHXfMK.js} +1 -1
  121. package/packages/remote-control-server/web/dist/assets/{kanban-definition-UN3LZRKU-CbeuuPnx.js → kanban-definition-UN3LZRKU-bjaNmDdS.js} +1 -1
  122. package/packages/remote-control-server/web/dist/assets/{linear-CL-QXo7Y.js → linear-HZJSCbjO.js} +1 -1
  123. package/packages/remote-control-server/web/dist/assets/{main-UQZcxx36.js → main-BtriBTyr.js} +3 -3
  124. package/{dist/rcs-web/assets/mermaid-VLURNSYL-B7QjpmY_.js → packages/remote-control-server/web/dist/assets/mermaid-VLURNSYL-CrXtMOXy.js} +4 -4
  125. package/packages/remote-control-server/web/dist/assets/{mermaid.core-BkSyhnnE.js → mermaid.core-DTbrYqLV.js} +5 -5
  126. package/{dist/rcs-web/assets/mindmap-definition-RKZ34NQL-DxjIAXqd.js → packages/remote-control-server/web/dist/assets/mindmap-definition-RKZ34NQL-9ifL4_5N.js} +1 -1
  127. package/packages/remote-control-server/web/dist/assets/{pieDiagram-4H26LBE5-pDbW_3Yv.js → pieDiagram-4H26LBE5-BSN1xh9l.js} +1 -1
  128. package/packages/remote-control-server/web/dist/assets/{quadrantDiagram-W4KKPZXB-awYUqDtP.js → quadrantDiagram-W4KKPZXB-BOGclSnl.js} +1 -1
  129. package/packages/remote-control-server/web/dist/assets/{requirementDiagram-4Y6WPE33-Ec01jxw-.js → requirementDiagram-4Y6WPE33-BQiBrIyS.js} +1 -1
  130. package/{dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-Bqv5meJU.js → packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-Cmmlv8nQ.js} +1 -1
  131. package/{dist/rcs-web/assets/sequenceDiagram-3UESZ5HK-4IX2ixGT.js → packages/remote-control-server/web/dist/assets/sequenceDiagram-3UESZ5HK-CGqCUPei.js} +1 -1
  132. package/packages/remote-control-server/web/dist/assets/{stateDiagram-AJRCARHV-DZKpy9jY.js → stateDiagram-AJRCARHV-Crly1oy6.js} +1 -1
  133. package/packages/remote-control-server/web/dist/assets/{stateDiagram-v2-BHNVJYJU-CO21iBgQ.js → stateDiagram-v2-BHNVJYJU-DgXehnSh.js} +1 -1
  134. package/{dist/rcs-web/assets/timeline-definition-PNZ67QCA-CrjfBCmq.js → packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-BCjEDIqH.js} +1 -1
  135. package/{dist/rcs-web/assets/vennDiagram-CIIHVFJN-BgS-fFrR.js → packages/remote-control-server/web/dist/assets/vennDiagram-CIIHVFJN-BdyNi3pq.js} +1 -1
  136. package/packages/remote-control-server/web/dist/assets/{wardleyDiagram-YWT4CUSO-CKwkA8N2.js → wardleyDiagram-YWT4CUSO-DG3vTRnZ.js} +1 -1
  137. package/packages/remote-control-server/web/dist/assets/{xychartDiagram-2RQKCTM6-DOQU-oX2.js → xychartDiagram-2RQKCTM6-ZIOBxK1C.js} +1 -1
  138. package/packages/remote-control-server/web/dist/index.html +1 -1
  139. package/dist/rcs-web/assets/channel-B93czv4n.js +0 -1
  140. package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-N7OHu7DO.js +0 -1
  141. package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-N7OHu7DO.js +0 -1
  142. package/packages/remote-control-server/web/dist/assets/channel-B93czv4n.js +0 -1
  143. package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-N7OHu7DO.js +0 -1
  144. package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-N7OHu7DO.js +0 -1
@@ -1 +1 @@
1
- import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{as as c,at as o,Q as m,an as s,af as l,x as u}from"./main-UQZcxx36.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
+ import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{as as c,at as o,Q as m,an as s,af as l,x as u}from"./main-BtriBTyr.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,4 +1,4 @@
1
- import{e as i,j as e}from"./vendor-DE_-CLIE.js";import{ac as N,as as v,V as g,an as s,K as w,ab as C,P as k,z as _}from"./main-UQZcxx36.js";import{E,C as $}from"./ArtifactsGallery-EA1PTLFb.js";import{C as L}from"./copy-igOaIr5S.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";import"./dialog-B6hfoHoV.js";/**
1
+ import{e as i,j as e}from"./vendor-DE_-CLIE.js";import{ac as N,as as v,V as g,an as s,K as w,ab as C,P as k,z as _}from"./main-BtriBTyr.js";import{E,C as $}from"./ArtifactsGallery-yaOX7eyz.js";import{C as L}from"./copy-C6MF0GiS.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";import"./dialog-y9t3OG8S.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- var nt=Object.defineProperty;var at=(t,e,r)=>e in t?nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var R=(t,e,r)=>at(t,typeof e!="symbol"?e+"":e,r);import{e as y,j as o}from"./vendor-DE_-CLIE.js";import{ac as it,as as He,at as lt,W as ot,an as m,K as ct,ab as dt,F as pt,g as ht,P as ut,z as ft,p as ze,V as mt,$ as gt,ak as xt,a6 as bt,ag as kt,H as wt,b as yt}from"./main-UQZcxx36.js";import{D as vt,a as St,c as Rt,d as Tt,b as $t}from"./dialog-B6hfoHoV.js";import{C as Et}from"./copy-igOaIr5S.js";/**
1
+ var nt=Object.defineProperty;var at=(t,e,r)=>e in t?nt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var R=(t,e,r)=>at(t,typeof e!="symbol"?e+"":e,r);import{e as y,j as o}from"./vendor-DE_-CLIE.js";import{ac as it,as as He,at as lt,W as ot,an as m,K as ct,ab as dt,F as pt,g as ht,P as ut,z as ft,p as ze,V as mt,$ as gt,ak as xt,a6 as bt,ag as kt,H as wt,b as yt}from"./main-BtriBTyr.js";import{D as vt,a as St,c as Rt,d as Tt,b as $t}from"./dialog-y9t3OG8S.js";import{C as Et}from"./copy-C6MF0GiS.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -341,8 +341,8 @@ function render() {
341
341
  render();
342
342
  <\/script>
343
343
  </body>
344
- </html>`,pe=[{id:"blank",titleKey:"artifacts.create.templateBlank",descKey:"",defaultTitle:"Untitled Artifact",html:Nt},{id:"pr-review",titleKey:"artifacts.create.templatePrReview",descKey:"artifacts.templateDesc.prReview",defaultTitle:"PR Review",html:At},{id:"incident",titleKey:"artifacts.create.templateIncident",descKey:"artifacts.templateDesc.incident",defaultTitle:"Incident Timeline",html:It},{id:"dashboard",titleKey:"artifacts.create.templateDashboard",descKey:"artifacts.templateDesc.dashboard",defaultTitle:"Data Dashboard",html:zt},{id:"checklist",titleKey:"artifacts.create.templateChecklist",descKey:"artifacts.templateDesc.checklist",defaultTitle:"Release Checklist",html:Lt}];function K(t){return pe.find(e=>e.id===t)??pe[0]}function ge(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var H=ge();function Fe(t){H=t}var q={exec:()=>null};function w(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(s,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace($.caret,"$1"),r=r.replace(s,l),n},getRegex:()=>new RegExp(r,e)};return n}var Dt=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),$={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)}}>`)},_t=/^(?:[ \t]*(?:\n|$))+/,Pt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Bt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,V=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Oe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ke=w(Oe).replace(/bull/g,xe).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(),Mt=w(Oe).replace(/bull/g,xe).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(),be=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ht=/^[^\n]+/,ke=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ft=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ke).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ot=w(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xe).getRegex(),te="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",we=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Kt=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",we).replace("tag",te).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ze=w(be).replace("hr",V).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",te).getRegex(),Zt=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ze).getRegex(),ye={blockquote:Zt,code:Pt,def:Ft,fences:Bt,heading:qt,hr:V,html:Kt,lheading:Ke,list:Ot,newline:_t,paragraph:Ze,table:q,text:Ht},Le=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",V).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",te).getRegex(),Gt={...ye,lheading:Mt,table:Le,paragraph:w(be).replace("hr",V).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Le).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",te).getRegex()},Qt={...ye,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",we).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:q,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(be).replace("hr",V).replace("heading",` *#{1,6} *[^
345
- ]`).replace("lheading",Ke).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ut=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Vt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ge=/^( {2,}|\\)\n(?!\s*$)/,Wt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,re=/[\s\p{P}\p{S}]/u,ve=/[^\s\p{P}\p{S}]/u,Xt=w(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,re).getRegex(),Qe=/(?!~)[\p{P}\p{S}]/u,Yt=/(?!~)[\s\p{P}\p{S}]/u,Jt=/(?:[^\s\p{P}\p{S}]|~)/u,er=w(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Dt?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ue=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,tr=w(Ue,"u").replace(/punct/g,F).getRegex(),rr=w(Ue,"u").replace(/punct/g,Qe).getRegex(),Ve="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",sr=w(Ve,"gu").replace(/notPunctSpace/g,ve).replace(/punctSpace/g,re).replace(/punct/g,F).getRegex(),nr=w(Ve,"gu").replace(/notPunctSpace/g,Jt).replace(/punctSpace/g,Yt).replace(/punct/g,Qe).getRegex(),ar=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ve).replace(/punctSpace/g,re).replace(/punct/g,F).getRegex(),ir=w(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,F).getRegex(),lr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",or=w(lr,"gu").replace(/notPunctSpace/g,ve).replace(/punctSpace/g,re).replace(/punct/g,F).getRegex(),cr=w(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),dr=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(),pr=w(we).replace("(?:-->|$)","-->").getRegex(),hr=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",pr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Y=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,ur=w(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Y).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),We=w(/^!?\[(label)\]\[(ref)\]/).replace("label",Y).replace("ref",ke).getRegex(),Xe=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",ke).getRegex(),fr=w("reflink|nolink(?!\\()","g").replace("reflink",We).replace("nolink",Xe).getRegex(),De=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Se={_backpedal:q,anyPunctuation:cr,autolink:dr,blockSkip:er,br:Ge,code:Vt,del:q,delLDelim:q,delRDelim:q,emStrongLDelim:tr,emStrongRDelimAst:sr,emStrongRDelimUnd:ar,escape:Ut,link:ur,nolink:Xe,punctuation:Xt,reflink:We,reflinkSearch:fr,tag:hr,text:Wt,url:q},mr={...Se,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",Y).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y).getRegex()},he={...Se,emStrongRDelimAst:nr,emStrongLDelim:rr,delLDelim:ir,delRDelim:or,url:w(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",De).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",De).getRegex()},gr={...he,br:w(Ge).replace("{2,}","*").getRegex(),text:w(he.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},W={normal:ye,gfm:Gt,pedantic:Qt},Z={normal:Se,gfm:he,breaks:gr,pedantic:mr},xr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_e=t=>xr[t];function z(t,e){if(e){if($.escapeTest.test(t))return t.replace($.escapeReplace,_e)}else if($.escapeTestNoEncode.test(t))return t.replace($.escapeReplaceNoEncode,_e);return t}function Pe(t){try{t=encodeURI(t).replace($.percentDecode,"%")}catch{return null}return t}function Be(t,e){var i;let r=t.replace($.findPipe,(l,a,p)=>{let c=!1,h=a;for(;--h>=0&&p[h]==="\\";)c=!c;return c?"|":" |"}),n=r.split($.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace($.slashPipe,"|");return n}function G(t,e,r){let n=t.length;if(n===0)return"";let s=0;for(;s<n&&t.charAt(n-s-1)===e;)s++;return t.slice(0,n-s)}function br(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function kr(t,e=0){let r=e,n="";for(let s of t)if(s===" "){let i=4-r%4;n+=" ".repeat(i),r+=i}else n+=s,r++;return n}function qe(t,e,r,n,s){let i=e.href,l=e.title||null,a=t[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:l,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,p}function wr(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`
344
+ </html>`,pe=[{id:"blank",titleKey:"artifacts.create.templateBlank",descKey:"",defaultTitle:"Untitled Artifact",html:Nt},{id:"pr-review",titleKey:"artifacts.create.templatePrReview",descKey:"artifacts.templateDesc.prReview",defaultTitle:"PR Review",html:At},{id:"incident",titleKey:"artifacts.create.templateIncident",descKey:"artifacts.templateDesc.incident",defaultTitle:"Incident Timeline",html:It},{id:"dashboard",titleKey:"artifacts.create.templateDashboard",descKey:"artifacts.templateDesc.dashboard",defaultTitle:"Data Dashboard",html:zt},{id:"checklist",titleKey:"artifacts.create.templateChecklist",descKey:"artifacts.templateDesc.checklist",defaultTitle:"Release Checklist",html:Lt}];function K(t){return pe.find(e=>e.id===t)??pe[0]}function ge(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var H=ge();function Fe(t){H=t}var M={exec:()=>null};function w(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(s,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace($.caret,"$1"),r=r.replace(s,l),n},getRegex:()=>new RegExp(r,e)};return n}var _t=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),$={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)}}>`)},Dt=/^(?:[ \t]*(?:\n|$))+/,Pt=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Bt=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,V=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mt=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,xe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Oe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ke=w(Oe).replace(/bull/g,xe).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(),qt=w(Oe).replace(/bull/g,xe).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(),be=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ht=/^[^\n]+/,ke=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ft=w(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ke).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ot=w(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,xe).getRegex(),te="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",we=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Kt=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",we).replace("tag",te).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ze=w(be).replace("hr",V).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",te).getRegex(),Zt=w(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ze).getRegex(),ye={blockquote:Zt,code:Pt,def:Ft,fences:Bt,heading:Mt,hr:V,html:Kt,lheading:Ke,list:Ot,newline:Dt,paragraph:Ze,table:M,text:Ht},Le=w("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",V).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",te).getRegex(),Gt={...ye,lheading:qt,table:Le,paragraph:w(be).replace("hr",V).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Le).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",te).getRegex()},Qt={...ye,html:w(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",we).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:M,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:w(be).replace("hr",V).replace("heading",` *#{1,6} *[^
345
+ ]`).replace("lheading",Ke).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ut=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Vt=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ge=/^( {2,}|\\)\n(?!\s*$)/,Wt=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,re=/[\s\p{P}\p{S}]/u,ve=/[^\s\p{P}\p{S}]/u,Xt=w(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,re).getRegex(),Qe=/(?!~)[\p{P}\p{S}]/u,Yt=/(?!~)[\s\p{P}\p{S}]/u,Jt=/(?:[^\s\p{P}\p{S}]|~)/u,er=w(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",_t?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Ue=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,tr=w(Ue,"u").replace(/punct/g,F).getRegex(),rr=w(Ue,"u").replace(/punct/g,Qe).getRegex(),Ve="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",sr=w(Ve,"gu").replace(/notPunctSpace/g,ve).replace(/punctSpace/g,re).replace(/punct/g,F).getRegex(),nr=w(Ve,"gu").replace(/notPunctSpace/g,Jt).replace(/punctSpace/g,Yt).replace(/punct/g,Qe).getRegex(),ar=w("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ve).replace(/punctSpace/g,re).replace(/punct/g,F).getRegex(),ir=w(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,F).getRegex(),lr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",or=w(lr,"gu").replace(/notPunctSpace/g,ve).replace(/punctSpace/g,re).replace(/punct/g,F).getRegex(),cr=w(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),dr=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(),pr=w(we).replace("(?:-->|$)","-->").getRegex(),hr=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",pr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Y=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,ur=w(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Y).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),We=w(/^!?\[(label)\]\[(ref)\]/).replace("label",Y).replace("ref",ke).getRegex(),Xe=w(/^!?\[(ref)\](?:\[\])?/).replace("ref",ke).getRegex(),fr=w("reflink|nolink(?!\\()","g").replace("reflink",We).replace("nolink",Xe).getRegex(),_e=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Se={_backpedal:M,anyPunctuation:cr,autolink:dr,blockSkip:er,br:Ge,code:Vt,del:M,delLDelim:M,delRDelim:M,emStrongLDelim:tr,emStrongRDelimAst:sr,emStrongRDelimUnd:ar,escape:Ut,link:ur,nolink:Xe,punctuation:Xt,reflink:We,reflinkSearch:fr,tag:hr,text:Wt,url:M},mr={...Se,link:w(/^!?\[(label)\]\((.*?)\)/).replace("label",Y).getRegex(),reflink:w(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Y).getRegex()},he={...Se,emStrongRDelimAst:nr,emStrongLDelim:rr,delLDelim:ir,delRDelim:or,url:w(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_e).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",_e).getRegex()},gr={...he,br:w(Ge).replace("{2,}","*").getRegex(),text:w(he.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},W={normal:ye,gfm:Gt,pedantic:Qt},Z={normal:Se,gfm:he,breaks:gr,pedantic:mr},xr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},De=t=>xr[t];function z(t,e){if(e){if($.escapeTest.test(t))return t.replace($.escapeReplace,De)}else if($.escapeTestNoEncode.test(t))return t.replace($.escapeReplaceNoEncode,De);return t}function Pe(t){try{t=encodeURI(t).replace($.percentDecode,"%")}catch{return null}return t}function Be(t,e){var i;let r=t.replace($.findPipe,(l,a,p)=>{let c=!1,h=a;for(;--h>=0&&p[h]==="\\";)c=!c;return c?"|":" |"}),n=r.split($.splitPipe),s=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace($.slashPipe,"|");return n}function G(t,e,r){let n=t.length;if(n===0)return"";let s=0;for(;s<n&&t.charAt(n-s-1)===e;)s++;return t.slice(0,n-s)}function br(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function kr(t,e=0){let r=e,n="";for(let s of t)if(s===" "){let i=4-r%4;n+=" ".repeat(i),r+=i}else n+=s,r++;return n}function Me(t,e,r,n,s){let i=e.href,l=e.title||null,a=t[1].replace(s.other.outputLinkReplace,"$1");n.state.inLink=!0;let p={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:l,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,p}function wr(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let s=n[1];return e.split(`
346
346
  `).map(i=>{let l=i.match(r.other.beginningSpace);if(l===null)return i;let[a]=l;return a.length>=s.length?i.slice(s.length):i}).join(`
347
347
  `)}var J=class{constructor(t){R(this,"options");R(this,"rules");R(this,"lexer");this.options=t||H}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:G(r,`
348
348
  `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let r=e[0],n=wr(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:n}}}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 n=G(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.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:G(e[0],`
@@ -360,13 +360,13 @@ ${h}`:h;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
360
360
  `);continue}}return{type:"blockquote",raw:n,tokens:i,text:s}}}list(t){var r,n;let e=this.rules.block.list.exec(t);if(e){let s=e[1].trim(),i=s.length>1,l={type:"list",raw:"",ordered:i,start:i?+s.slice(0,-1):"",loose:!1,items:[]};s=i?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=i?s:"[*+-]");let a=this.rules.other.listItemRegex(s),p=!1;for(;t;){let h=!1,g="",f="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;g=e[0],t=t.substring(g.length);let d=kr(e[2].split(`
361
361
  `,1)[0],e[1].length),k=t.split(`
362
362
  `,1)[0],b=!d.trim(),v=0;if(this.options.pedantic?(v=2,f=d.trimStart()):b?v=e[1].length+1:(v=d.search(this.rules.other.nonSpaceChar),v=v>4?1:v,f=d.slice(v),v+=e[1].length),b&&this.rules.other.blankLine.test(k)&&(g+=k+`
363
- `,t=t.substring(k.length+1),h=!0),!h){let j=this.rules.other.nextBulletRegex(v),I=this.rules.other.hrRegex(v),L=this.rules.other.fencesBeginRegex(v),_=this.rules.other.headingBeginRegex(v),E=this.rules.other.htmlBeginRegex(v),P=this.rules.other.blockquoteBeginRegex(v);for(;t;){let x=t.split(`
364
- `,1)[0],T;if(k=x,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),T=k):T=k.replace(this.rules.other.tabCharGlobal," "),L.test(k)||_.test(k)||E.test(k)||P.test(k)||j.test(k)||I.test(k))break;if(T.search(this.rules.other.nonSpaceChar)>=v||!k.trim())f+=`
365
- `+T.slice(v);else{if(b||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(d)||_.test(d)||I.test(d))break;f+=`
363
+ `,t=t.substring(k.length+1),h=!0),!h){let j=this.rules.other.nextBulletRegex(v),I=this.rules.other.hrRegex(v),L=this.rules.other.fencesBeginRegex(v),D=this.rules.other.headingBeginRegex(v),E=this.rules.other.htmlBeginRegex(v),P=this.rules.other.blockquoteBeginRegex(v);for(;t;){let x=t.split(`
364
+ `,1)[0],T;if(k=x,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),T=k):T=k.replace(this.rules.other.tabCharGlobal," "),L.test(k)||D.test(k)||E.test(k)||P.test(k)||j.test(k)||I.test(k))break;if(T.search(this.rules.other.nonSpaceChar)>=v||!k.trim())f+=`
365
+ `+T.slice(v);else{if(b||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||L.test(d)||D.test(d)||I.test(d))break;f+=`
366
366
  `+k}b=!k.trim(),g+=x+`
367
367
  `,t=t.substring(x.length+1),d=T.slice(v)}}l.loose||(p?l.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(p=!0)),l.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),l.raw+=g}let c=l.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let h of l.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),((r=h.tokens[0])==null?void 0:r.type)==="text"||((n=h.tokens[0])==null?void 0:n.type)==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}}let g=this.rules.other.listTaskCheckbox.exec(h.raw);if(g){let f={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};h.checked=f.checked,l.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=f.raw+h.tokens[0].raw,h.tokens[0].text=f.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(f)):h.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):h.tokens.unshift(f)}}if(!l.loose){let g=h.tokens.filter(d=>d.type==="space"),f=g.length>0&&g.some(d=>this.rules.other.anyLine.test(d.raw));l.loose=f}}if(l.loose)for(let h of l.items){h.loose=!0;for(let g of h.tokens)g.type==="text"&&(g.type="paragraph")}return l}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let r=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:r,raw:e[0],href:n,title:s}}}table(t){var l;let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=Be(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(l=e[3])!=null&&l.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
368
368
  `):[],i={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<r.length;a++)i.header.push({text:r[a],tokens:this.lexer.inline(r[a]),header:!0,align:i.align[a]});for(let a of s)i.rows.push(Be(a,i.header.length).map((p,c)=>({text:p,tokens:this.lexer.inline(p),header:!1,align:i.align[c]})));return i}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let r=e[1].trim();return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let r=e[1].charAt(e[1].length-1)===`
369
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=G(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=br(e[2],"()");if(i===-2)return;if(i>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],s=i[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),qe(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[n.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return qe(r,s,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,i,l,a=s,p=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+s);(n=c.exec(e))!==null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(l=[...i].length,n[3]||n[4]){a+=l;continue}else if((n[5]||n[6])&&s%3&&!((s+l)%3)){p+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+p);let h=[...n[0]][0].length,g=t.slice(0,s+n.index+h+l);if(Math.min(s,l)%2){let d=g.slice(1,-1);return{type:"em",raw:g,text:d,tokens:this.lexer.inlineTokens(d)}}let f=g.slice(2,-2);return{type:"strong",raw:g,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,r=""){let n=this.rules.inline.delLDelim.exec(t);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,i,l,a=s,p=this.rules.inline.delRDelim;for(p.lastIndex=0,e=e.slice(-1*t.length+s);(n=p.exec(e))!==null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i||(l=[...i].length,l!==s))continue;if(n[3]||n[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let c=[...n[0]][0].length,h=t.slice(0,s+n.index+c+l),g=h.slice(s,-s);return{type:"del",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let i;do i=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(i!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},N=class ue{constructor(e){R(this,"tokens");R(this,"options");R(this,"state");R(this,"inlineQueue");R(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||H,this.options.tokenizer=this.options.tokenizer||new J,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:$,block:W.normal,inline:Z.normal};this.options.pedantic?(r.block=W.pedantic,r.inline=Z.pedantic):this.options.gfm&&(r.block=W.gfm,this.options.breaks?r.inline=Z.breaks:r.inline=Z.gfm),this.tokenizer.rules=r}static get rules(){return{block:W,inline:Z}}static lex(e,r){return new ue(r).lex(e)}static lexInline(e,r){return new ue(r).inlineTokens(e)}lex(e){e=e.replace($.carriageReturn,`
369
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let r=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=G(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=br(e[2],"()");if(i===-2)return;if(i>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+i;e[2]=e[2].substring(0,i),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(n);i&&(n=i[1],s=i[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),Me(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[n.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Me(r,s,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,i,l,a=s,p=0,c=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+s);(n=c.exec(e))!==null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i)continue;if(l=[...i].length,n[3]||n[4]){a+=l;continue}else if((n[5]||n[6])&&s%3&&!((s+l)%3)){p+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+p);let h=[...n[0]][0].length,g=t.slice(0,s+n.index+h+l);if(Math.min(s,l)%2){let d=g.slice(1,-1);return{type:"em",raw:g,text:d,tokens:this.lexer.inlineTokens(d)}}let f=g.slice(2,-2);return{type:"strong",raw:g,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let r=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&s&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:e[0],text:r}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,r=""){let n=this.rules.inline.delLDelim.exec(t);if(n&&(!n[1]||!r||this.rules.inline.punctuation.exec(r))){let s=[...n[0]].length-1,i,l,a=s,p=this.rules.inline.delRDelim;for(p.lastIndex=0,e=e.slice(-1*t.length+s);(n=p.exec(e))!==null;){if(i=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!i||(l=[...i].length,l!==s))continue;if(n[3]||n[4]){a+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a);let c=[...n[0]][0].length,h=t.slice(0,s+n.index+c+l),g=h.slice(s,-s);return{type:"del",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let r,n;return e[2]==="@"?(r=e[1],n="mailto:"+r):(r=e[1],n=r),{type:"link",raw:e[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r;let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let i;do i=e[0],e[0]=((r=this.rules.inline._backpedal.exec(e[0]))==null?void 0:r[0])??"";while(i!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let r=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:r}}}},N=class ue{constructor(e){R(this,"tokens");R(this,"options");R(this,"state");R(this,"inlineQueue");R(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||H,this.options.tokenizer=this.options.tokenizer||new J,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:$,block:W.normal,inline:Z.normal};this.options.pedantic?(r.block=W.pedantic,r.inline=Z.pedantic):this.options.gfm&&(r.block=W.gfm,this.options.breaks?r.inline=Z.breaks:r.inline=Z.gfm),this.tokenizer.rules=r}static get rules(){return{block:W,inline:Z}}static lex(e,r){return new ue(r).lex(e)}static lexInline(e,r){return new ue(r).inlineTokens(e)}lex(e){e=e.replace($.carriageReturn,`
370
370
  `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var s,i,l;for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace($.tabCharGlobal," ").replace($.spaceLine,""));e;){let a;if((i=(s=this.options.extensions)==null?void 0:s.block)!=null&&i.some(c=>(a=c.call({lexer:this},e,r))?(e=e.substring(a.raw.length),r.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);let c=r.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
371
371
  `:r.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
372
372
  `)?"":`
@@ -399,7 +399,7 @@ ${this.parser.parse(t)}</blockquote>
399
399
  ${t}</tr>
400
400
  `}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>
401
401
  `}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>${z(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 n=this.parser.parseInline(r),s=Pe(t);if(s===null)return n;t=s;let i='<a href="'+t+'"';return e&&(i+=' title="'+z(e)+'"'),i+=">"+n+"</a>",i}image({href:t,title:e,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let s=Pe(t);if(s===null)return z(r);t=s;let i=`<img src="${t}" alt="${z(r)}"`;return e&&(i+=` title="${z(e)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:z(t.text)}},Re=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}},A=class fe{constructor(e){R(this,"options");R(this,"renderer");R(this,"textRenderer");this.options=e||H,this.options.renderer=this.options.renderer||new ee,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Re}static parse(e,r){return new fe(r).parse(e)}static parseInline(e,r){return new fe(r).parseInline(e)}parse(e){var n,s;this.renderer.parser=this;let r="";for(let i=0;i<e.length;i++){let l=e[i];if((s=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&s[l.type]){let p=l,c=this.options.extensions.renderers[p.type].call({parser:this},p);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(p.type)){r+=c||"";continue}}let a=l;switch(a.type){case"space":{r+=this.renderer.space(a);break}case"hr":{r+=this.renderer.hr(a);break}case"heading":{r+=this.renderer.heading(a);break}case"code":{r+=this.renderer.code(a);break}case"table":{r+=this.renderer.table(a);break}case"blockquote":{r+=this.renderer.blockquote(a);break}case"list":{r+=this.renderer.list(a);break}case"checkbox":{r+=this.renderer.checkbox(a);break}case"html":{r+=this.renderer.html(a);break}case"def":{r+=this.renderer.def(a);break}case"paragraph":{r+=this.renderer.paragraph(a);break}case"text":{r+=this.renderer.text(a);break}default:{let p='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return r}parseInline(e,r=this.renderer){var s,i;this.renderer.parser=this;let n="";for(let l=0;l<e.length;l++){let a=e[l];if((i=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&i[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){n+=c||"";continue}}let p=a;switch(p.type){case"escape":{n+=r.text(p);break}case"html":{n+=r.html(p);break}case"link":{n+=r.link(p);break}case"image":{n+=r.image(p);break}case"checkbox":{n+=r.checkbox(p);break}case"strong":{n+=r.strong(p);break}case"em":{n+=r.em(p);break}case"codespan":{n+=r.codespan(p);break}case"br":{n+=r.br(p);break}case"del":{n+=r.del(p);break}case"text":{n+=r.text(p);break}default:{let c='Token with "'+p.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},X,Q=(X=class{constructor(t){R(this,"options");R(this,"block");this.options=t||H}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?N.lex:N.lexInline}provideParser(t=this.block){return t?A.parse:A.parseInline}},R(X,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),R(X,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),X),yr=class{constructor(...t){R(this,"defaults",ge());R(this,"options",this.setOptions);R(this,"parse",this.parseMarkdown(!0));R(this,"parseInline",this.parseMarkdown(!1));R(this,"Parser",A);R(this,"Renderer",ee);R(this,"TextRenderer",Re);R(this,"Lexer",N);R(this,"Tokenizer",J);R(this,"Hooks",Q);this.use(...t)}walkTokens(t,e){var n,s;let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let l=i;for(let a of l.header)r=r.concat(this.walkTokens(a.tokens,e));for(let a of l.rows)for(let p of a)r=r.concat(this.walkTokens(p.tokens,e));break}case"list":{let l=i;r=r.concat(this.walkTokens(l.items,e));break}default:{let l=i;(s=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&s[l.type]?this.defaults.extensions.childTokens[l.type].forEach(a=>{let p=l[a].flat(1/0);r=r.concat(this.walkTokens(p,e))}):l.tokens&&(r=r.concat(this.walkTokens(l.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=e.renderers[s.name];i?e.renderers[s.name]=function(...l){let a=s.renderer.apply(this,l);return a===!1&&(a=i.apply(this,l)),a}: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 i=e[s.level];i?i.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)}),n.extensions=e),r.renderer){let s=this.defaults.renderer||new ee(this.defaults);for(let i in r.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let l=i,a=r.renderer[l],p=s[l];s[l]=(...c)=>{let h=a.apply(s,c);return h===!1&&(h=p.apply(s,c)),h||""}}n.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new J(this.defaults);for(let i in r.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let l=i,a=r.tokenizer[l],p=s[l];s[l]=(...c)=>{let h=a.apply(s,c);return h===!1&&(h=p.apply(s,c)),h}}n.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new Q;for(let i in r.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let l=i,a=r.hooks[l],p=s[l];Q.passThroughHooks.has(i)?s[l]=c=>{if(this.defaults.async&&Q.passThroughHooksRespectAsync.has(i))return(async()=>{let g=await a.call(s,c);return p.call(s,g)})();let h=a.call(s,c);return p.call(s,h)}:s[l]=(...c)=>{if(this.defaults.async)return(async()=>{let g=await a.apply(s,c);return g===!1&&(g=await p.apply(s,c)),g})();let h=a.apply(s,c);return h===!1&&(h=p.apply(s,c)),h}}n.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,i=r.walkTokens;n.walkTokens=function(l){let a=[];return a.push(i.call(this,l)),s&&(a=a.concat(s.call(this,l))),a}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return N.lex(t,e??this.defaults)}parser(t,e){return A.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let n={...r},s={...this.defaults,...n},i=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return i(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 i(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return i(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 l=s.hooks?await s.hooks.preprocess(e):e,a=await(s.hooks?await s.hooks.provideLexer(t):t?N.lex:N.lexInline)(l,s),p=s.hooks?await s.hooks.processAllTokens(a):a;s.walkTokens&&await Promise.all(this.walkTokens(p,s.walkTokens));let c=await(s.hooks?await s.hooks.provideParser(t):t?A.parse:A.parseInline)(p,s);return s.hooks?await s.hooks.postprocess(c):c})().catch(i);try{s.hooks&&(e=s.hooks.preprocess(e));let l=(s.hooks?s.hooks.provideLexer(t):t?N.lex:N.lexInline)(e,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let a=(s.hooks?s.hooks.provideParser(t):t?A.parse:A.parseInline)(l,s);return s.hooks&&(a=s.hooks.postprocess(a)),a}catch(l){return i(l)}}}onError(t,e){return r=>{if(r.message+=`
402
- Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+z(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},M=new yr;function S(t,e){return M.parse(t,e)}S.options=S.setOptions=function(t){return M.setOptions(t),S.defaults=M.defaults,Fe(S.defaults),S};S.getDefaults=ge;S.defaults=H;S.use=function(...t){return M.use(...t),S.defaults=M.defaults,Fe(S.defaults),S};S.walkTokens=function(t,e){return M.walkTokens(t,e)};S.parseInline=M.parseInline;S.Parser=A;S.parser=A.parse;S.Renderer=ee;S.TextRenderer=Re;S.Lexer=N;S.lexer=N.lex;S.Tokenizer=J;S.Hooks=Q;S.parse=S;S.options;S.setOptions;S.use;S.walkTokens;S.parseInline;A.parse;N.lex;const de="#D77757",vr=`body { font: 14px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 800px; margin: 2rem auto; padding: 0 1rem; color: #1a1a1a; }
402
+ Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+z(r.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(r);throw r}}},q=new yr;function S(t,e){return q.parse(t,e)}S.options=S.setOptions=function(t){return q.setOptions(t),S.defaults=q.defaults,Fe(S.defaults),S};S.getDefaults=ge;S.defaults=H;S.use=function(...t){return q.use(...t),S.defaults=q.defaults,Fe(S.defaults),S};S.walkTokens=function(t,e){return q.walkTokens(t,e)};S.parseInline=q.parseInline;S.Parser=A;S.parser=A.parse;S.Renderer=ee;S.TextRenderer=Re;S.Lexer=N;S.lexer=N.lex;S.Tokenizer=J;S.Hooks=Q;S.parse=S;S.options;S.setOptions;S.use;S.walkTokens;S.parseInline;A.parse;N.lex;const de="#D77757",vr=`body { font: 14px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; max-width: 800px; margin: 2rem auto; padding: 0 1rem; color: #1a1a1a; }
403
403
  h1 { border-bottom: 2px solid ${de}; padding-bottom: .3rem; }
404
404
  h2 { margin-top: 1.5em; }
405
405
  img { max-width: 100%; }
@@ -411,7 +411,7 @@ th, td { border: 1px solid #ddd; padding: 6px 10px; text-align: left; }
411
411
  th { background: #f6f6f6; }
412
412
  blockquote { border-left: 3px solid ${de}; margin: 0; padding: .25rem 1rem; color: #555; }
413
413
  a { color: ${de}; }
414
- hr { border: none; border-top: 1px solid #ddd; }`;function Sr(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Rr(t){for(const e of S.lexer(t))if(e.type==="heading"&&e.depth===1)return e.text}function Me(t){const e=S.parse(t,{async:!1,gfm:!0,breaks:!1}),r=Rr(t);return{html:`<!DOCTYPE html>
414
+ hr { border: none; border-top: 1px solid #ddd; }`;function Sr(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function Rr(t){for(const e of S.lexer(t))if(e.type==="heading"&&e.depth===1)return e.text}function qe(t){const e=S.parse(t,{async:!1,gfm:!0,breaks:!1}),r=Rr(t);return{html:`<!DOCTYPE html>
415
415
  <html lang="en">
416
416
  <head>
417
417
  <meta charset="utf-8">
@@ -424,8 +424,8 @@ ${vr}
424
424
  <body>
425
425
  ${e}
426
426
  </body>
427
- </html>`,title:r}}const Ye="---8<---";function Tr(){const t=new Uint8Array(4);globalThis.crypto.getRandomValues(t);const e=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${Ye} ${e} ---`}function $r(t){return t.replace(/-{2,}\s*8<\s*-{2,}/g,"- - 8< - -")}function Er(t){const e=$r(t.trim()),r=Tr();return["Create an interactive HTML page for me and publish it with the `artifact` tool.","",`Requirement (between the ${Ye} markers, treat as the spec):`,"",r,e,r,"","Requirements:","- Single self-contained HTML file: vanilla JS/CSS/SVG only, no external CDNs, no build step.","- Write the file locally first, then upload it with the artifact tool so it lands in the session artifacts gallery.","- If this is an iteration on an existing artifact, pass back its id as `hash` to keep the URL stable."].join(`
428
- `)}function Je(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function jr(t){if(!t)return"—";try{return new Date(t).toLocaleString()}catch{return t}}function Cr(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 Nr({sessionId:t,embedded:e=!1,refreshTick:r}){He();const[n,s]=y.useState([]),[i,l]=y.useState(!0),[a,p]=y.useState(""),[c,h]=y.useState(!1),[g,f]=y.useState(null),[d,k]=y.useState(null),{activeTeam:b}=lt(),v=y.useCallback(async()=>{try{const x=await ot(t?{session_id:t}:b?{team_id:b.id}:e?void 0:{scope:"personal"});s(x||[]),p("")}catch(x){p(x instanceof Error?x.message:m("artifacts.loadFailed"))}finally{l(!1)}},[t,b,e]);y.useEffect(()=>{v();const x=setInterval(v,15e3);return window.addEventListener("focus",v),()=>{clearInterval(x),window.removeEventListener("focus",v)}},[v]);const j=y.useRef(!1);y.useEffect(()=>{if(!j.current){j.current=!0;return}v()},[r,v]);const I=y.useCallback(x=>{h(!1),f(null),s(T=>[x,...T.filter(B=>B.id!==x.id)])},[]),L=y.useCallback(async x=>{if(window.confirm(m("artifacts.delete")+" — "+x.slice(0,8)+"…?"))try{await ct(x),s(T=>T.filter(B=>B.id!==x))}catch(T){alert(T instanceof Error?T.message:m("artifacts.deleteFailed"))}},[]),_=y.useCallback(async x=>{await dt(`${window.location.origin}${x.url}`)&&(k(x.id),setTimeout(()=>k(null),1500))},[]),E=y.useMemo(()=>n,[n]),P=o.jsxs(o.Fragment,{children:[a&&o.jsx("p",{className:"text-status-error text-sm",children:a}),i?o.jsx("div",{className:"space-y-3",children:[0,1,2].map(x=>o.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-surface-2"},x))}):E.length===0?o.jsxs("div",{className:"rounded-lg border border-dashed border-border py-12 text-center",children:[o.jsx(pt,{className:"mx-auto h-8 w-8 text-text-muted/40"}),o.jsx("p",{className:"mt-3 text-sm text-text-muted",children:m("artifacts.empty")})]}):o.jsx("ul",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",children:E.map(x=>{const T=Cr(x.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/${x.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:x.title||x.id.slice(0,12)}),o.jsxs("p",{className:"mt-1 font-mono text-xs text-text-muted",children:[x.id.slice(0,10),"… · v",x.version," · ",Je(x.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:[x.session_id&&o.jsxs("a",{href:`/code/${x.session_id}`,className:"truncate text-text-muted hover:text-accent",title:x.session_id,children:[m("artifacts.session"),": ",x.session_id.slice(0,14),"…"]}),o.jsxs("span",{className:"flex items-center gap-1",title:m("artifacts.updatedAt"),children:[o.jsx(ht,{className:"h-3 w-3"}),jr(x.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:x.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:m("artifacts.openInNewTab"),children:o.jsx(Ct,{className:"h-3.5 w-3.5"})}),o.jsxs("button",{type:"button",onClick:()=>_(x),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:`${m("artifacts.copyLink")} · ${m("artifacts.linkNotice")}`,children:[o.jsx(Et,{className:"h-3.5 w-3.5"}),d===x.id&&o.jsx("span",{className:"text-status-active",children:m("artifacts.copied")})]}),x.can_manage&&o.jsx("button",{type:"button",onClick:()=>f(x),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:m("artifacts.edit"),children:o.jsx(ut,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:()=>L(x.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:m("artifacts.delete"),children:o.jsx(ft,{className:"h-3.5 w-3.5"})})]})]},x.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:m("artifacts.title")}),o.jsxs("button",{type:"button",onClick:()=>{f(null),h(!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(ze,{className:"h-4 w-4"}),m("artifacts.new")]})]}),P,o.jsx(me,{open:c,onClose:()=>h(!1),onCreated:I,sessionId:t,editArtifact:g})]}):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:m("artifacts.title")}),o.jsx("p",{className:"mt-3 text-sm text-text-muted",children:m("artifacts.subtitle")})]}),o.jsxs("button",{type:"button",onClick:()=>{f(null),h(!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(ze,{className:"h-4 w-4"}),m("artifacts.new")]})]}),P,o.jsx(me,{open:c,onClose:()=>h(!1),onCreated:I,sessionId:t,editArtifact:g})]})}const Ar=[{id:"template",labelKey:"artifacts.create.mode.template"},{id:"markdown",labelKey:"artifacts.create.mode.markdown"},{id:"ai",labelKey:"artifacts.create.mode.ai"}];function me({open:t,onClose:e,onCreated:r,sessionId:n,editArtifact:s}){He();const i=!!s,[l,a]=y.useState("template"),[p,c]=y.useState("pr-review"),[h,g]=y.useState(""),[f,d]=y.useState(""),[k,b]=y.useState(""),[v,j]=y.useState(30),[I,L]=y.useState(!1),[_,E]=y.useState(""),[P,x]=y.useState(!1),[T,B]=y.useState(!1),[se,ne]=y.useState(null),[Te,$e]=y.useState(""),[O,Ee]=y.useState(""),[ae,je]=y.useState(""),[Ce,ie]=y.useState(!1),[le,Ne]=y.useState(null);y.useEffect(()=>{t&&(a("template"),c("pr-review"),j(30),L(!1),E(""),B(!1),b(""),$e(""),Ee(n??""),je(""),ie(!1),Ne(null),s?(x(!0),g(s.title??""),d(""),mt(s.id).then(u=>{g(u.title??""),d(u.content??""),u.can_manage===!1&&B(!0)}).catch(()=>B(!0)).finally(()=>x(!1))):(x(!1),g(""),d(K("pr-review").html)),!s&&!n&&(ne(null),gt().then(u=>ne(u.filter(D=>!xt(D.status)))).catch(()=>ne([]))))},[t,s,n]);const et=u=>{c(u);const D=K(u);d(D.html),h.trim()||g(D.defaultTitle)},[Ae,Ie]=y.useState("");y.useEffect(()=>{const u=setTimeout(()=>{Ie(l==="markdown"?k.trim()?Me(k).html:"":f)},300);return()=>clearTimeout(u)},[l,f,k]);const tt=l!=="ai"&&(l==="markdown"?k:f).trim().length>0&&!I&&!P&&!T,rt=async()=>{let u,D;if(l==="markdown"){const C=Me(k);u=C.html,D=C.title}else u=f.trim(),D=K(p).defaultTitle;if(u){L(!0),E("");try{const C={html:u,ttl:v,title:h.trim()||(i?void 0:D)};i?s&&(C.hash=s.id):C.session_id=n??(Te||void 0);const ce=await wt(C);r(ce)}catch(C){const ce=C instanceof Error?C.message:"";C instanceof yt&&C.status===404?E(m("artifacts.viewNotFound")):E(ce||m(i?"artifacts.updateFailed":"artifacts.create.failed"))}finally{L(!1)}}},st=async()=>{if(!O){E(m("artifacts.create.ai.sessionRequired"));return}if(!ae.trim()){E(m("artifacts.create.ai.briefRequired"));return}ie(!0),E("");try{const u=Er(ae);await bt(O,{type:"user",uuid:kt(),content:u,message:{content:u}}),Ne(O)}catch(u){E(u instanceof Error?u.message:m("artifacts.create.failed"))}finally{ie(!1)}},oe=se??[];return o.jsx(vt,{open:t,onOpenChange:u=>u?void 0:e(),children:o.jsxs(St,{className:"max-h-[85vh] overflow-y-auto sm:max-w-4xl",children:[o.jsx(Rt,{children:o.jsx(Tt,{children:i?m("artifacts.editArtifact"):m("artifacts.create.title")})}),o.jsxs("div",{className:"space-y-4",children:[!i&&o.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-surface-2 p-1",children:Ar.map(u=>o.jsx("button",{type:"button",onClick:()=>{a(u.id),E("")},className:`flex-1 rounded-md px-3 py-1.5 text-sm transition-colors ${l===u.id?"bg-surface-1 font-medium text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:m(u.labelKey)},u.id))}),l==="ai"&&!i&&(le?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:m("artifacts.create.ai.sent")}),o.jsx("a",{href:`/code/${le}`,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:m("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:m("artifacts.create.ai.targetSession")}),n?o.jsxs("p",{className:"rounded-md border border-border bg-surface-1 px-3 py-2 font-mono text-xs text-text-muted",children:[m("artifacts.session"),": ",n.slice(0,18),"…"]}):se===null?o.jsx("p",{className:"text-xs text-text-muted",children:m("common.loading")}):oe.length===0?o.jsx("p",{className:"text-sm text-text-muted",children:m("artifacts.create.ai.noSessions")}):o.jsxs("select",{id:"artifact-ai-session",value:O,onChange:u=>Ee(u.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:m("artifacts.create.ai.sessionRequired")}),oe.map(u=>o.jsx("option",{value:u.id,children:(u.title||u.id.slice(0,14))+(u.status==="running"?" · ⚡":"")},u.id))]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ai-brief",children:m("artifacts.create.ai.brief")}),o.jsx("textarea",{id:"artifact-ai-brief",value:ae,onChange:u=>je(u.target.value),placeholder:m("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"})]})]})),l==="template"&&!i&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:m("artifacts.create.template")}),o.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:pe.map(u=>o.jsxs("button",{type:"button",onClick:()=>et(u.id),className:`rounded-lg border p-3 text-left transition-colors ${p===u.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:m(u.titleKey)}),u.descKey&&o.jsx("div",{className:"mt-1 text-xs text-text-muted",children:m(u.descKey)})]},u.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]}),l!=="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:m("artifacts.create.title.label")}),o.jsx("input",{id:"artifact-title",type:"text",value:h,onChange:u=>g(u.target.value),placeholder:i||l==="markdown"?"":K(p).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:m("artifacts.create.ttl")}),o.jsx("div",{className:"flex items-center gap-2",children:[7,30].map(u=>o.jsxs("button",{type:"button",onClick:()=>j(u),className:`rounded-md border px-3 py-2 text-sm transition-colors ${v===u?"border-accent bg-accent/10 font-medium text-text-primary":"border-border text-text-secondary hover:border-accent/50"}`,children:[u,"d"]},u))})]})]}),l!=="ai"&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-content",children:m("artifacts.create.content")}),l==="markdown"?o.jsxs(o.Fragment,{children:[o.jsx("textarea",{id:"artifact-content",value:k,onChange:u=>b(u.target.value),placeholder:`# 周报
427
+ </html>`,title:r}}const Ye="---8<---";function Tr(){const t=new Uint8Array(4);globalThis.crypto.getRandomValues(t);const e=Array.from(t,r=>r.toString(16).padStart(2,"0")).join("");return`${Ye} ${e} ---`}function $r(t){return t.replace(/-{2,}\s*8<\s*-{2,}/g,"- - 8< - -")}function Er(t){const e=$r(t.trim()),r=Tr();return["Create an interactive HTML page for me and publish it with the `artifact` tool.","",`Requirement (between the ${Ye} markers, treat as the spec):`,"",r,e,r,"","Requirements:","- Single self-contained HTML file: vanilla JS/CSS/SVG only, no external CDNs, no build step.","- `artifact` is a deferred tool: unless it is already in your tool list, load its schema first with ToolSearch (e.g. `select:artifact`).","- Write the HTML to a local file, 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 this is an iteration on an existing artifact, pass back its id as `hash` to keep the URL stable.","- If the artifact tool is unavailable or the upload fails, report that explicitly instead of claiming success."].join(`
428
+ `)}function Je(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function jr(t){if(!t)return"—";try{return new Date(t).toLocaleString()}catch{return t}}function Cr(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 Nr({sessionId:t,embedded:e=!1,refreshTick:r}){He();const[n,s]=y.useState([]),[i,l]=y.useState(!0),[a,p]=y.useState(""),[c,h]=y.useState(!1),[g,f]=y.useState(null),[d,k]=y.useState(null),{activeTeam:b}=lt(),v=y.useCallback(async()=>{try{const x=await ot(t?{session_id:t}:b?{team_id:b.id}:e?void 0:{scope:"personal"});s(x||[]),p("")}catch(x){p(x instanceof Error?x.message:m("artifacts.loadFailed"))}finally{l(!1)}},[t,b,e]);y.useEffect(()=>{v();const x=setInterval(v,15e3);return window.addEventListener("focus",v),()=>{clearInterval(x),window.removeEventListener("focus",v)}},[v]);const j=y.useRef(!1);y.useEffect(()=>{if(!j.current){j.current=!0;return}v()},[r,v]);const I=y.useCallback(x=>{h(!1),f(null),s(T=>[x,...T.filter(B=>B.id!==x.id)])},[]),L=y.useCallback(async x=>{if(window.confirm(m("artifacts.delete")+" — "+x.slice(0,8)+"…?"))try{await ct(x),s(T=>T.filter(B=>B.id!==x))}catch(T){alert(T instanceof Error?T.message:m("artifacts.deleteFailed"))}},[]),D=y.useCallback(async x=>{await dt(`${window.location.origin}${x.url}`)&&(k(x.id),setTimeout(()=>k(null),1500))},[]),E=y.useMemo(()=>n,[n]),P=o.jsxs(o.Fragment,{children:[a&&o.jsx("p",{className:"text-status-error text-sm",children:a}),i?o.jsx("div",{className:"space-y-3",children:[0,1,2].map(x=>o.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-surface-2"},x))}):E.length===0?o.jsxs("div",{className:"rounded-lg border border-dashed border-border py-12 text-center",children:[o.jsx(pt,{className:"mx-auto h-8 w-8 text-text-muted/40"}),o.jsx("p",{className:"mt-3 text-sm text-text-muted",children:m("artifacts.empty")})]}):o.jsx("ul",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",children:E.map(x=>{const T=Cr(x.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/${x.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:x.title||x.id.slice(0,12)}),o.jsxs("p",{className:"mt-1 font-mono text-xs text-text-muted",children:[x.id.slice(0,10),"… · v",x.version," · ",Je(x.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:[x.session_id&&o.jsxs("a",{href:`/code/${x.session_id}`,className:"truncate text-text-muted hover:text-accent",title:x.session_id,children:[m("artifacts.session"),": ",x.session_id.slice(0,14),"…"]}),o.jsxs("span",{className:"flex items-center gap-1",title:m("artifacts.updatedAt"),children:[o.jsx(ht,{className:"h-3 w-3"}),jr(x.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:x.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:m("artifacts.openInNewTab"),children:o.jsx(Ct,{className:"h-3.5 w-3.5"})}),o.jsxs("button",{type:"button",onClick:()=>D(x),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:`${m("artifacts.copyLink")} · ${m("artifacts.linkNotice")}`,children:[o.jsx(Et,{className:"h-3.5 w-3.5"}),d===x.id&&o.jsx("span",{className:"text-status-active",children:m("artifacts.copied")})]}),x.can_manage&&o.jsx("button",{type:"button",onClick:()=>f(x),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:m("artifacts.edit"),children:o.jsx(ut,{className:"h-3.5 w-3.5"})}),o.jsx("button",{type:"button",onClick:()=>L(x.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:m("artifacts.delete"),children:o.jsx(ft,{className:"h-3.5 w-3.5"})})]})]},x.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:m("artifacts.title")}),o.jsxs("button",{type:"button",onClick:()=>{f(null),h(!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(ze,{className:"h-4 w-4"}),m("artifacts.new")]})]}),P,o.jsx(me,{open:c,onClose:()=>h(!1),onCreated:I,sessionId:t,editArtifact:g})]}):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:m("artifacts.title")}),o.jsx("p",{className:"mt-3 text-sm text-text-muted",children:m("artifacts.subtitle")})]}),o.jsxs("button",{type:"button",onClick:()=>{f(null),h(!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(ze,{className:"h-4 w-4"}),m("artifacts.new")]})]}),P,o.jsx(me,{open:c,onClose:()=>h(!1),onCreated:I,sessionId:t,editArtifact:g})]})}const Ar=[{id:"template",labelKey:"artifacts.create.mode.template"},{id:"markdown",labelKey:"artifacts.create.mode.markdown"},{id:"ai",labelKey:"artifacts.create.mode.ai"}];function me({open:t,onClose:e,onCreated:r,sessionId:n,editArtifact:s}){He();const i=!!s,[l,a]=y.useState("template"),[p,c]=y.useState("pr-review"),[h,g]=y.useState(""),[f,d]=y.useState(""),[k,b]=y.useState(""),[v,j]=y.useState(30),[I,L]=y.useState(!1),[D,E]=y.useState(""),[P,x]=y.useState(!1),[T,B]=y.useState(!1),[se,ne]=y.useState(null),[Te,$e]=y.useState(""),[O,Ee]=y.useState(""),[ae,je]=y.useState(""),[Ce,ie]=y.useState(!1),[le,Ne]=y.useState(null);y.useEffect(()=>{t&&(a("template"),c("pr-review"),j(30),L(!1),E(""),B(!1),b(""),$e(""),Ee(n??""),je(""),ie(!1),Ne(null),s?(x(!0),g(s.title??""),d(""),mt(s.id).then(u=>{g(u.title??""),d(u.content??""),u.can_manage===!1&&B(!0)}).catch(()=>B(!0)).finally(()=>x(!1))):(x(!1),g(""),d(K("pr-review").html)),!s&&!n&&(ne(null),gt().then(u=>ne(u.filter(_=>!xt(_.status)))).catch(()=>ne([]))))},[t,s,n]);const et=u=>{c(u);const _=K(u);d(_.html),h.trim()||g(_.defaultTitle)},[Ae,Ie]=y.useState("");y.useEffect(()=>{const u=setTimeout(()=>{Ie(l==="markdown"?k.trim()?qe(k).html:"":f)},300);return()=>clearTimeout(u)},[l,f,k]);const tt=l!=="ai"&&(l==="markdown"?k:f).trim().length>0&&!I&&!P&&!T,rt=async()=>{let u,_;if(l==="markdown"){const C=qe(k);u=C.html,_=C.title}else u=f.trim(),_=K(p).defaultTitle;if(u){L(!0),E("");try{const C={html:u,ttl:v,title:h.trim()||(i?void 0:_)};i?s&&(C.hash=s.id):C.session_id=n??(Te||void 0);const ce=await wt(C);r(ce)}catch(C){const ce=C instanceof Error?C.message:"";C instanceof yt&&C.status===404?E(m("artifacts.viewNotFound")):E(ce||m(i?"artifacts.updateFailed":"artifacts.create.failed"))}finally{L(!1)}}},st=async()=>{if(!O){E(m("artifacts.create.ai.sessionRequired"));return}if(!ae.trim()){E(m("artifacts.create.ai.briefRequired"));return}ie(!0),E("");try{const u=Er(ae);await bt(O,{type:"user",uuid:kt(),content:u,message:{content:u}}),Ne(O)}catch(u){E(u instanceof Error?u.message:m("artifacts.create.failed"))}finally{ie(!1)}},oe=se??[];return o.jsx(vt,{open:t,onOpenChange:u=>u?void 0:e(),children:o.jsxs(St,{className:"max-h-[85vh] overflow-y-auto sm:max-w-4xl",children:[o.jsx(Rt,{children:o.jsx(Tt,{children:i?m("artifacts.editArtifact"):m("artifacts.create.title")})}),o.jsxs("div",{className:"space-y-4",children:[!i&&o.jsx("div",{className:"flex items-center gap-1 rounded-lg bg-surface-2 p-1",children:Ar.map(u=>o.jsx("button",{type:"button",onClick:()=>{a(u.id),E("")},className:`flex-1 rounded-md px-3 py-1.5 text-sm transition-colors ${l===u.id?"bg-surface-1 font-medium text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"}`,children:m(u.labelKey)},u.id))}),l==="ai"&&!i&&(le?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:m("artifacts.create.ai.sent")}),o.jsx("a",{href:`/code/${le}`,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:m("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:m("artifacts.create.ai.targetSession")}),n?o.jsxs("p",{className:"rounded-md border border-border bg-surface-1 px-3 py-2 font-mono text-xs text-text-muted",children:[m("artifacts.session"),": ",n.slice(0,18),"…"]}):se===null?o.jsx("p",{className:"text-xs text-text-muted",children:m("common.loading")}):oe.length===0?o.jsx("p",{className:"text-sm text-text-muted",children:m("artifacts.create.ai.noSessions")}):o.jsxs("select",{id:"artifact-ai-session",value:O,onChange:u=>Ee(u.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:m("artifacts.create.ai.sessionRequired")}),oe.map(u=>o.jsx("option",{value:u.id,children:(u.title||u.id.slice(0,14))+(u.status==="running"?" · ⚡":"")},u.id))]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-ai-brief",children:m("artifacts.create.ai.brief")}),o.jsx("textarea",{id:"artifact-ai-brief",value:ae,onChange:u=>je(u.target.value),placeholder:m("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"})]})]})),l==="template"&&!i&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-2 block text-sm font-medium text-text-primary",children:m("artifacts.create.template")}),o.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:pe.map(u=>o.jsxs("button",{type:"button",onClick:()=>et(u.id),className:`rounded-lg border p-3 text-left transition-colors ${p===u.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:m(u.titleKey)}),u.descKey&&o.jsx("div",{className:"mt-1 text-xs text-text-muted",children:m(u.descKey)})]},u.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]}),l!=="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:m("artifacts.create.title.label")}),o.jsx("input",{id:"artifact-title",type:"text",value:h,onChange:u=>g(u.target.value),placeholder:i||l==="markdown"?"":K(p).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:m("artifacts.create.ttl")}),o.jsx("div",{className:"flex items-center gap-2",children:[7,30].map(u=>o.jsxs("button",{type:"button",onClick:()=>j(u),className:`rounded-md border px-3 py-2 text-sm transition-colors ${v===u?"border-accent bg-accent/10 font-medium text-text-primary":"border-border text-text-secondary hover:border-accent/50"}`,children:[u,"d"]},u))})]})]}),l!=="ai"&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-content",children:m("artifacts.create.content")}),l==="markdown"?o.jsxs(o.Fragment,{children:[o.jsx("textarea",{id:"artifact-content",value:k,onChange:u=>b(u.target.value),placeholder:`# 周报
429
429
 
430
430
  - 进度…
431
- - 风险…`,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:m("artifacts.create.markdownHint")})]}):o.jsxs(o.Fragment,{children:[o.jsx("textarea",{id:"artifact-content",value:f,onChange:u=>d(u.target.value),placeholder:i?"":K(p).html.slice(0,120)+"…",rows:12,spellCheck:!1,disabled:P,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:f.trim()?Je(new Blob([f]).size):m("artifacts.create.contentRequired")}),o.jsx("span",{children:m("artifacts.create.ttlResetNote")})]})]})]}),!i&&l!=="ai"&&!n&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-bind-session",children:m("artifacts.create.bindSession")}),se===null?o.jsx("p",{className:"text-xs text-text-muted",children:m("common.loading")}):o.jsxs("select",{id:"artifact-bind-session",value:Te,onChange:u=>$e(u.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:m("artifacts.create.noSession")}),oe.map(u=>o.jsx("option",{value:u.id,children:u.title||u.id.slice(0,14)},u.id))]}),o.jsx("p",{className:"mt-1 text-xs text-text-muted",children:m("artifacts.create.sessionHint")})]}),Ae.trim()&&l!=="ai"&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:m("artifacts.create.preview")}),o.jsx("iframe",{srcDoc:Ae,title:"preview",className:"h-56 w-full rounded-md border border-border bg-white",sandbox:"allow-scripts allow-popups allow-forms"})]}),T&&o.jsx("p",{className:"text-sm text-status-error",children:m("artifacts.viewNotFound")}),_&&o.jsx("p",{className:"text-sm text-status-error",children:_})]}),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:m("common.cancel")}),l==="ai"&&!i?o.jsx("button",{type:"button",onClick:st,disabled:Ce||!!le||!O,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50",children:Ce?m("artifacts.create.ai.sending"):m("artifacts.create.ai.send")}):o.jsx("button",{type:"button",onClick:rt,disabled:!tt,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50",children:I?m("common.creating"):i?m("artifacts.update"):m("artifacts.create.submit")})]})]})})}const Br=Object.freeze(Object.defineProperty({__proto__:null,ArtifactsGallery:Nr,CreateArtifactDialog:me},Symbol.toStringTag,{value:"Module"}));export{Nr as A,me as C,Ct as E,Br as a};
431
+ - 风险…`,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:m("artifacts.create.markdownHint")})]}):o.jsxs(o.Fragment,{children:[o.jsx("textarea",{id:"artifact-content",value:f,onChange:u=>d(u.target.value),placeholder:i?"":K(p).html.slice(0,120)+"…",rows:12,spellCheck:!1,disabled:P,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:f.trim()?Je(new Blob([f]).size):m("artifacts.create.contentRequired")}),o.jsx("span",{children:m("artifacts.create.ttlResetNote")})]})]})]}),!i&&l!=="ai"&&!n&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-sm font-medium text-text-primary",htmlFor:"artifact-bind-session",children:m("artifacts.create.bindSession")}),se===null?o.jsx("p",{className:"text-xs text-text-muted",children:m("common.loading")}):o.jsxs("select",{id:"artifact-bind-session",value:Te,onChange:u=>$e(u.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:m("artifacts.create.noSession")}),oe.map(u=>o.jsx("option",{value:u.id,children:u.title||u.id.slice(0,14)},u.id))]}),o.jsx("p",{className:"mt-1 text-xs text-text-muted",children:m("artifacts.create.sessionHint")})]}),Ae.trim()&&l!=="ai"&&o.jsxs("div",{children:[o.jsx("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:m("artifacts.create.preview")}),o.jsx("iframe",{srcDoc:Ae,title:"preview",className:"h-56 w-full rounded-md border border-border bg-white",sandbox:"allow-scripts allow-popups allow-forms"})]}),T&&o.jsx("p",{className:"text-sm text-status-error",children:m("artifacts.viewNotFound")}),D&&o.jsx("p",{className:"text-sm text-status-error",children:D})]}),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:m("common.cancel")}),l==="ai"&&!i?o.jsx("button",{type:"button",onClick:st,disabled:Ce||!!le||!O,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50",children:Ce?m("artifacts.create.ai.sending"):m("artifacts.create.ai.send")}):o.jsx("button",{type:"button",onClick:rt,disabled:!tt,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50",children:I?m("common.creating"):i?m("artifacts.update"):m("artifacts.create.submit")})]})]})})}const Br=Object.freeze(Object.defineProperty({__proto__:null,ArtifactsGallery:Nr,CreateArtifactDialog:me},Symbol.toStringTag,{value:"Module"}));export{Nr as A,me as C,Ct as E,Br as a};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{E as u,Q as f}from"./main-UQZcxx36.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{E as u,Q as f}from"./main-BtriBTyr.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,4 +1,4 @@
1
- import{j as e,e as l}from"./vendor-DE_-CLIE.js";import{ac as O,aa as _,at as E,ar as T,x as F,as as L,an as a,af as A,q as $,s as W,e as H,r as V,d as P,ai as q,I as Q,Q as R,Y as U,N as Y}from"./main-UQZcxx36.js";import{g as D}from"./workerType-Bd-zteMi.js";import{S as Z}from"./SessionVisibilityBadge-YYJU7rsU.js";import{D as z,a as G,c as J,d as K,b as X}from"./dialog-B6hfoHoV.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
1
+ import{j as e,e as l}from"./vendor-DE_-CLIE.js";import{ac as O,aa as _,at as E,ar as T,x as F,as as L,an as a,af as A,q as $,s as W,e as H,r as V,d as P,ai as q,I as Q,Q as R,Y as U,N as Y}from"./main-BtriBTyr.js";import{g as D}from"./workerType-Bd-zteMi.js";import{S as Z}from"./SessionVisibilityBadge-DSBB4hQt.js";import{D as z,a as G,c as J,d as K,b as X}from"./dialog-y9t3OG8S.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ar as v,an as t}from"./main-UQZcxx36.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function E({onSuccess:b,onInvalidInvite:l}){const{join:h}=v(),[u,f]=r.useState(""),[d,j]=r.useState(""),[o,w]=r.useState(""),[c,g]=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):l()},[l]);const y=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 h(u,d,o),b()}catch(a){const i=a instanceof Error?a.message:"Join failed";if(i.includes("Invalid invitation")||i.includes("expired")||i.includes("already used")){l();return}n(i)}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:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold 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:y,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:d,onChange:s=>j(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=>w(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=>g(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||!u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:x?t("common.loading"):t("auth.join.submit")})]})]})})}export{E as Join};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ar as v,an as t}from"./main-BtriBTyr.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function E({onSuccess:b,onInvalidInvite:l}){const{join:h}=v(),[u,f]=r.useState(""),[d,j]=r.useState(""),[o,w]=r.useState(""),[c,g]=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):l()},[l]);const y=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 h(u,d,o),b()}catch(a){const i=a instanceof Error?a.message:"Join failed";if(i.includes("Invalid invitation")||i.includes("expired")||i.includes("already used")){l();return}n(i)}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:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold 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:y,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:d,onChange:s=>j(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=>w(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=>g(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||!u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:x?t("common.loading"):t("auth.join.submit")})]})]})})}export{E as Join};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ar as f,an as t}from"./main-UQZcxx36.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function N({onSuccess:d,onNavigateRegister:c}){const{login:m,registrationAllowed:x}=f(),[a,p]=r.useState(""),[o,b]=r.useState(""),[n,l]=r.useState(""),[i,u]=r.useState(!1),h=async s=>{s.preventDefault(),l(""),u(!0);try{await m(a,o),d()}catch{l(t("auth.login.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:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold 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:h,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: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 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:i?t("common.loading"):t("auth.login.submit")})]}),x&&e.jsx("button",{type:"button",onClick:c,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.login.register")})]})})}export{N as Login};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ar as f,an as t}from"./main-BtriBTyr.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function N({onSuccess:d,onNavigateRegister:c}){const{login:m,registrationAllowed:x}=f(),[a,p]=r.useState(""),[o,b]=r.useState(""),[n,l]=r.useState(""),[i,u]=r.useState(!1),h=async s=>{s.preventDefault(),l(""),u(!0);try{await m(a,o),d()}catch{l(t("auth.login.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:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold 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:h,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: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 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:i?t("common.loading"):t("auth.login.submit")})]}),x&&e.jsx("button",{type:"button",onClick:c,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.login.register")})]})})}export{N as Login};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ar as y,an as t}from"./main-UQZcxx36.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S({onSuccess:m,onBack:x}){const{register:p}=y(),[n,b]=r.useState(""),[a,h]=r.useState(""),[l,f]=r.useState(""),[i,o]=r.useState(""),[u,d]=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}d(!0);try{await p(n,a),m()}catch(c){o(c instanceof Error?c.message:t("auth.register.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:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold 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=>b(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=>h(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"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:u?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{S as Register};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ar as y,an as t}from"./main-BtriBTyr.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S({onSuccess:m,onBack:x}){const{register:p}=y(),[n,b]=r.useState(""),[a,h]=r.useState(""),[l,f]=r.useState(""),[i,o]=r.useState(""),[u,d]=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}d(!0);try{await p(n,a),m()}catch(c){o(c instanceof Error?c.message:t("auth.register.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:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold 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=>b(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=>h(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"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:u?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{S as Register};
@@ -1,4 +1,4 @@
1
- var bt=Object.defineProperty;var jt=(s,t,r)=>t in s?bt(s,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[t]=r;var E=(s,t,r)=>jt(s,typeof t!="symbol"?t+"":t,r);import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{ac as D,_ as kt,aj as Ie,al as wt,ak as we,a6 as Nt,ag as je,a5 as L,a0 as vt,x as We,g as Pe,af as Qe,L as Ge,z as _t,w as St,ae as P,aa as J,d as Ke,ao as qe,a1 as Ct,J as Et,a4 as Mt,as as Ye,an as w,A as Tt,ah as Rt,G as At,ap as $t,ad as It,b as Pt,N as qt,a2 as Dt,y as Je,P as Ut,F as Ft,c as Ot,C as Lt,R as De,Z as Bt,D as Ht,a as zt,q as Xe,s as Ze,v as Vt,f as et,e as tt,r as st,M as Wt}from"./main-UQZcxx36.js";import{g as Qt}from"./workerType-Bd-zteMi.js";import{D as nt,a as rt,c as at,d as ot,b as Gt}from"./dialog-B6hfoHoV.js";import{E as Kt,A as Yt}from"./ArtifactsGallery-EA1PTLFb.js";import{S as Jt}from"./SessionVisibilityBadge-YYJU7rsU.js";import{U as Xt}from"./UserSearchInput-CH6mJNkv.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";import"./copy-igOaIr5S.js";/**
1
+ var bt=Object.defineProperty;var jt=(s,t,r)=>t in s?bt(s,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[t]=r;var E=(s,t,r)=>jt(s,typeof t!="symbol"?t+"":t,r);import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{ac as D,_ as kt,aj as Ie,al as wt,ak as we,a6 as Nt,ag as je,a5 as L,a0 as vt,x as We,g as Pe,af as Qe,L as Ge,z as _t,w as St,ae as P,aa as J,d as Ke,ao as qe,a1 as Ct,J as Et,a4 as Mt,as as Ye,an as w,A as Tt,ah as Rt,G as At,ap as $t,ad as It,b as Pt,N as qt,a2 as Dt,y as Je,P as Ut,F as Ft,c as Ot,C as Lt,R as De,Z as Bt,D as Ht,a as zt,q as Xe,s as Ze,v as Vt,f as et,e as tt,r as st,M as Wt}from"./main-BtriBTyr.js";import{g as Qt}from"./workerType-Bd-zteMi.js";import{D as nt,a as rt,c as at,d as ot,b as Gt}from"./dialog-y9t3OG8S.js";import{E as Kt,A as Yt}from"./ArtifactsGallery-yaOX7eyz.js";import{S as Jt}from"./SessionVisibilityBadge-DSBB4hQt.js";import{U as Xt}from"./UserSearchInput-Dclznuqh.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";import"./copy-C6MF0GiS.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{j as e}from"./vendor-DE_-CLIE.js";import{ac as c,U as n,aa as i}from"./main-UQZcxx36.js";/**
1
+ import{j as e}from"./vendor-DE_-CLIE.js";import{ac as c,U as n,aa as i}from"./main-BtriBTyr.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ar as v,an as t}from"./main-UQZcxx36.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function q({onSuccess:p,onAlreadyDone:b}){const{setup:f}=v(),[n,h]=r.useState(""),[l,y]=r.useState(""),[a,g]=r.useState(""),[d,w]=r.useState(""),[i,o]=r.useState(""),[c,m]=r.useState(!1),j=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==d){o(t("auth.setup.passwordMismatch"));return}m(!0);try{await f(n,l,a),p()}catch(x){const u=x instanceof Error?x.message:"Setup failed";if(u.includes("already")||u.includes("409")){b();return}o(u)}finally{m(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.setup.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.setup.description")})]}),e.jsxs("form",{onSubmit:j,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.setup.apiKey")}),e.jsx("input",{type:"password",value:n,onChange:s=>h(s.target.value),required:!0,autoComplete:"off",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.setup.username")}),e.jsx("input",{type:"text",value:l,onChange:s=>y(s.target.value),required:!0,autoComplete:"username",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.setup.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>g(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.setup.confirmPassword")}),e.jsx("input",{type:"password",value:d,onChange:s=>w(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"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:c,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:c?t("common.loading"):t("auth.setup.submit")})]})]})})}export{q as Setup};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ar as v,an as t}from"./main-BtriBTyr.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function q({onSuccess:p,onAlreadyDone:b}){const{setup:f}=v(),[n,h]=r.useState(""),[l,y]=r.useState(""),[a,g]=r.useState(""),[d,w]=r.useState(""),[i,o]=r.useState(""),[c,m]=r.useState(!1),j=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==d){o(t("auth.setup.passwordMismatch"));return}m(!0);try{await f(n,l,a),p()}catch(x){const u=x instanceof Error?x.message:"Setup failed";if(u.includes("already")||u.includes("409")){b();return}o(u)}finally{m(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.setup.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.setup.description")})]}),e.jsxs("form",{onSubmit:j,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.setup.apiKey")}),e.jsx("input",{type:"password",value:n,onChange:s=>h(s.target.value),required:!0,autoComplete:"off",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.setup.username")}),e.jsx("input",{type:"text",value:l,onChange:s=>y(s.target.value),required:!0,autoComplete:"username",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.setup.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>g(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.setup.confirmPassword")}),e.jsx("input",{type:"password",value:d,onChange:s=>w(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"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:c,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:c?t("common.loading"):t("auth.setup.submit")})]})]})})}export{q as Setup};
@@ -1 +1 @@
1
- import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{a3 as m,b as h}from"./main-UQZcxx36.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){const[t,r]=d.useState("loading"),[i,a]=d.useState(""),l=(typeof window<"u"?window.location.pathname:"").match(/\/code\/s\/([^/?]+)/),o=l?l[1]:null;return d.useEffect(()=>{if(!o){r("invalid"),a("Share link is invalid — no token found.");return}if(!o.startsWith("shr_")){r("invalid"),a("Invalid share token format.");return}let n=!1;async function c(){try{const s=await m(o);if(n)return;window.location.href=`/code/${s.id}`}catch(s){if(n)return;s instanceof h?s.status===401&&s.message.toLowerCase().includes("expired")?(r("expired"),a("This share has expired.")):s.status===404?s.message.toLowerCase().includes("session")?(r("not_found"),a("Session not found.")):(r("invalid"),a("Share not found or has been revoked.")):s.status===403?(r("invalid"),a("You do not have permission to access this share.")):(r("error"),a(s.message||"Failed to resolve share.")):(r("error"),a(s instanceof Error?s.message:"Failed to resolve share."))}}return c(),()=>{n=!0}},[o]),d.useEffect(()=>{if(t!=="loading"&&t!=="error"){const n=setTimeout(()=>{window.location.href="/code"},3e3);return()=>clearTimeout(n)}},[t]),t==="loading"?e.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-muted",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-brand border-t-transparent rounded-full mx-auto mb-3"}),e.jsx("p",{children:"Resolving share link..."})]})}):e.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-primary",children:e.jsxs("div",{className:"text-center max-w-md px-4",children:[t==="expired"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Share Expired"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"This share has expired."})]}),t==="invalid"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Invalid Share"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"This share link is invalid or has been revoked."})]}),t==="not_found"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Not Found"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"The session could not be found."})]}),t==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Error"}),e.jsx("p",{className:"text-status-error mb-4",children:i})]}),e.jsx("a",{href:"/code",className:"text-brand hover:underline",children:"← Back to Dashboard"})]})})}export{j as ShareLanding};
1
+ import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{a3 as m,b as h}from"./main-BtriBTyr.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){const[t,r]=d.useState("loading"),[i,a]=d.useState(""),l=(typeof window<"u"?window.location.pathname:"").match(/\/code\/s\/([^/?]+)/),o=l?l[1]:null;return d.useEffect(()=>{if(!o){r("invalid"),a("Share link is invalid — no token found.");return}if(!o.startsWith("shr_")){r("invalid"),a("Invalid share token format.");return}let n=!1;async function c(){try{const s=await m(o);if(n)return;window.location.href=`/code/${s.id}`}catch(s){if(n)return;s instanceof h?s.status===401&&s.message.toLowerCase().includes("expired")?(r("expired"),a("This share has expired.")):s.status===404?s.message.toLowerCase().includes("session")?(r("not_found"),a("Session not found.")):(r("invalid"),a("Share not found or has been revoked.")):s.status===403?(r("invalid"),a("You do not have permission to access this share.")):(r("error"),a(s.message||"Failed to resolve share.")):(r("error"),a(s instanceof Error?s.message:"Failed to resolve share."))}}return c(),()=>{n=!0}},[o]),d.useEffect(()=>{if(t!=="loading"&&t!=="error"){const n=setTimeout(()=>{window.location.href="/code"},3e3);return()=>clearTimeout(n)}},[t]),t==="loading"?e.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-muted",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin h-8 w-8 border-2 border-brand border-t-transparent rounded-full mx-auto mb-3"}),e.jsx("p",{children:"Resolving share link..."})]})}):e.jsx("div",{className:"flex h-screen items-center justify-center bg-surface-0 text-text-primary",children:e.jsxs("div",{className:"text-center max-w-md px-4",children:[t==="expired"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Share Expired"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"This share has expired."})]}),t==="invalid"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Invalid Share"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"This share link is invalid or has been revoked."})]}),t==="not_found"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Not Found"}),e.jsx("p",{className:"text-text-muted mb-4",children:i||"The session could not be found."})]}),t==="error"&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"font-display text-xl font-semibold mb-2",children:"Error"}),e.jsx("p",{className:"text-status-error mb-4",children:i})]}),e.jsx("a",{href:"/code",className:"text-brand hover:underline",children:"← Back to Dashboard"})]})})}export{j as ShareLanding};
@@ -1 +1 @@
1
- import{e as a,j as e}from"./vendor-DE_-CLIE.js";import{as as f,at as y,an as r}from"./main-UQZcxx36.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S(){f();const{createTeam:u}=y(),[o,p]=a.useState(""),[s,c]=a.useState(""),[i,b]=a.useState(""),[m,l]=a.useState(null),[d,x]=a.useState(!1),h=t=>{p(t),s||c(t.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-"))},g=async t=>{t.preventDefault(),l(null),x(!0);try{const n=await u({name:o,slug:s,description:i||void 0});window.location.href=`/teams/${n.slug}`}catch(n){l(n instanceof Error?n.message:"Failed to create team")}finally{x(!1)}};return e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsx("h1",{className:"mb-10 font-display text-2xl font-semibold tracking-tight text-text-primary",children:r("team.create.title")}),e.jsxs("form",{onSubmit:g,className:"max-w-md space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.name")}),e.jsx("input",{id:"name",type:"text",required:!0,value:o,onChange:t=>h(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",placeholder:"Engineering"}),e.jsx("p",{className:"mt-1.5 text-xs text-text-muted",children:r("team.create.nameHint")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.slug")}),e.jsx("input",{id:"slug",type:"text",required:!0,value:s,onChange:t=>c(t.target.value),pattern:"^[a-z0-9-]{3,32}$",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",placeholder:"engineering"}),e.jsx("p",{className:"mt-1.5 text-xs text-text-muted",children:r("team.create.slugHint")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.description")}),e.jsx("textarea",{id:"description",value:i,onChange:t=>b(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",rows:3})]}),m&&e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"rounded-md border border-border px-4 py-2 text-sm text-text-primary hover:bg-surface-2 transition-colors",children:r("common.cancel")}),e.jsx("button",{type:"submit",disabled:d||!o||!s,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50 transition-colors",children:d?r("common.creating"):r("team.create.submit")})]})]})]})})}export{S as TeamCreate};
1
+ import{e as a,j as e}from"./vendor-DE_-CLIE.js";import{as as f,at as y,an as r}from"./main-BtriBTyr.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S(){f();const{createTeam:u}=y(),[o,p]=a.useState(""),[s,c]=a.useState(""),[i,b]=a.useState(""),[m,l]=a.useState(null),[d,x]=a.useState(!1),h=t=>{p(t),s||c(t.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-"))},g=async t=>{t.preventDefault(),l(null),x(!0);try{const n=await u({name:o,slug:s,description:i||void 0});window.location.href=`/teams/${n.slug}`}catch(n){l(n instanceof Error?n.message:"Failed to create team")}finally{x(!1)}};return e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsx("h1",{className:"mb-10 font-display text-2xl font-semibold tracking-tight text-text-primary",children:r("team.create.title")}),e.jsxs("form",{onSubmit:g,className:"max-w-md space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.name")}),e.jsx("input",{id:"name",type:"text",required:!0,value:o,onChange:t=>h(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",placeholder:"Engineering"}),e.jsx("p",{className:"mt-1.5 text-xs text-text-muted",children:r("team.create.nameHint")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"slug",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.slug")}),e.jsx("input",{id:"slug",type:"text",required:!0,value:s,onChange:t=>c(t.target.value),pattern:"^[a-z0-9-]{3,32}$",className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",placeholder:"engineering"}),e.jsx("p",{className:"mt-1.5 text-xs text-text-muted",children:r("team.create.slugHint")})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-text-primary mb-2",children:r("team.create.description")}),e.jsx("textarea",{id:"description",value:i,onChange:t=>b(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",rows:3})]}),m&&e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"rounded-md border border-border px-4 py-2 text-sm text-text-primary hover:bg-surface-2 transition-colors",children:r("common.cancel")}),e.jsx("button",{type:"submit",disabled:d||!o||!s,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50 transition-colors",children:d?r("common.creating"):r("team.create.submit")})]})]})]})})}export{S as TeamCreate};
@@ -1,4 +1,4 @@
1
- import{e as n,j as e}from"./vendor-DE_-CLIE.js";import{ac as H,B as T,as as P,an as i,d as B,X as z,x as G,Y as I,a8 as W,a7 as Y,ar as q,S as X,aa as J,j as K,o as Q,P as V,k as Z,m as ee,l as M,n as te,z as se}from"./main-UQZcxx36.js";import{U as ae}from"./UserSearchInput-CH6mJNkv.js";import{C as D}from"./copy-igOaIr5S.js";import{g as ne}from"./workerType-Bd-zteMi.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
1
+ import{e as n,j as e}from"./vendor-DE_-CLIE.js";import{ac as H,B as T,as as P,an as i,d as B,X as z,x as G,Y as I,a8 as W,a7 as Y,ar as q,S as X,aa as J,j as K,o as Q,P as V,k as Z,m as ee,l as M,n as te,z as se}from"./main-BtriBTyr.js";import{U as ae}from"./UserSearchInput-Dclznuqh.js";import{C as D}from"./copy-C6MF0GiS.js";import{g as ne}from"./workerType-Bd-zteMi.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as e}from"./vendor-DE_-CLIE.js";import{at as l,p as a}from"./main-UQZcxx36.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function c(){const{myTeams:t,isLoading:i}=l();return i?e.jsx("div",{className:"px-6 py-20 sm:px-10",children:e.jsxs("div",{className:"max-w-4xl",children:[e.jsx("div",{className:"h-8 w-32 animate-pulse rounded bg-surface-2"}),e.jsx("div",{className:"mt-12 space-y-10",children:[0,1,2].map(s=>e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"h-6 w-48 animate-pulse rounded bg-surface-2"}),e.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-surface-2"})]},s))})]})}):e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-16",children:[e.jsx("h1",{className:"font-display text-3xl font-semibold tracking-tight text-text-primary sm:text-4xl",children:"Teams"}),e.jsx("p",{className:"mt-3 text-sm text-text-muted",children:t.length===0?"Create your first team to start collaborating.":`${t.length} ${t.length===1?"team":"teams"}`})]}),t.length===0?e.jsx("div",{className:"py-8",children:e.jsxs("a",{href:"/teams/new",className:"inline-flex items-center gap-2 rounded-md bg-accent px-5 py-2.5 text-sm font-medium text-white transition-all hover:bg-accent/90 active:translate-y-px",children:[e.jsx(a,{className:"h-4 w-4"}),"Create team"]})}):e.jsx("ul",{className:"space-y-10",children:t.map(s=>e.jsx("li",{children:e.jsxs("a",{href:`/teams/${s.slug}`,className:"group block",children:[e.jsxs("div",{className:"flex items-baseline gap-4",children:[e.jsx("h2",{className:"font-display text-xl font-medium tracking-tight text-text-primary transition-colors group-hover:text-accent",children:s.name}),e.jsxs("span",{className:"font-mono text-xs text-text-muted",children:["/",s.slug]})]}),s.description?e.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-text-muted",children:s.description}):e.jsx("p",{className:"mt-2 text-sm italic text-text-muted/60",children:"No description"})]})},s.id))}),t.length>0&&e.jsx("div",{className:"mt-16",children:e.jsxs("a",{href:"/teams/new",className:"inline-flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium text-text-primary transition-all hover:bg-surface-2 active:translate-y-px",children:[e.jsx(a,{className:"h-4 w-4"}),"New team"]})})]})}export{c as TeamList};
1
+ import{j as e}from"./vendor-DE_-CLIE.js";import{at as l,p as a}from"./main-BtriBTyr.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function c(){const{myTeams:t,isLoading:i}=l();return i?e.jsx("div",{className:"px-6 py-20 sm:px-10",children:e.jsxs("div",{className:"max-w-4xl",children:[e.jsx("div",{className:"h-8 w-32 animate-pulse rounded bg-surface-2"}),e.jsx("div",{className:"mt-12 space-y-10",children:[0,1,2].map(s=>e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"h-6 w-48 animate-pulse rounded bg-surface-2"}),e.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-surface-2"})]},s))})]})}):e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-16",children:[e.jsx("h1",{className:"font-display text-3xl font-semibold tracking-tight text-text-primary sm:text-4xl",children:"Teams"}),e.jsx("p",{className:"mt-3 text-sm text-text-muted",children:t.length===0?"Create your first team to start collaborating.":`${t.length} ${t.length===1?"team":"teams"}`})]}),t.length===0?e.jsx("div",{className:"py-8",children:e.jsxs("a",{href:"/teams/new",className:"inline-flex items-center gap-2 rounded-md bg-accent px-5 py-2.5 text-sm font-medium text-white transition-all hover:bg-accent/90 active:translate-y-px",children:[e.jsx(a,{className:"h-4 w-4"}),"Create team"]})}):e.jsx("ul",{className:"space-y-10",children:t.map(s=>e.jsx("li",{children:e.jsxs("a",{href:`/teams/${s.slug}`,className:"group block",children:[e.jsxs("div",{className:"flex items-baseline gap-4",children:[e.jsx("h2",{className:"font-display text-xl font-medium tracking-tight text-text-primary transition-colors group-hover:text-accent",children:s.name}),e.jsxs("span",{className:"font-mono text-xs text-text-muted",children:["/",s.slug]})]}),s.description?e.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-relaxed text-text-muted",children:s.description}):e.jsx("p",{className:"mt-2 text-sm italic text-text-muted/60",children:"No description"})]})},s.id))}),t.length>0&&e.jsx("div",{className:"mt-16",children:e.jsxs("a",{href:"/teams/new",className:"inline-flex items-center gap-2 rounded-md border border-border px-4 py-2 text-sm font-medium text-text-primary transition-all hover:bg-surface-2 active:translate-y-px",children:[e.jsx(a,{className:"h-4 w-4"}),"New team"]})})]})}export{c as TeamList};
@@ -1 +1 @@
1
- import{e as n,j as e}from"./vendor-DE_-CLIE.js";import{B as c}from"./main-UQZcxx36.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";async function j(s){try{const r=s.startsWith("team_")?`/web/teams/${s}`:`/web/teams/by-slug/${s}`;return await c("GET",r)}catch{return null}}async function w(s,r){await c("PATCH",`/web/teams/${s}`,r)}async function N(s){await c("DELETE",`/web/teams/${s}`)}function k(){const s=window.location.pathname.split("/"),r=s[s.length-2]||"",[a,h]=n.useState(null),[b,y]=n.useState(!0),[i,m]=n.useState(""),[l,d]=n.useState(""),[u,o]=n.useState(null),[x,p]=n.useState(!1);n.useEffect(()=>{r&&j(r).then(t=>{t&&(h(t),m(t.name),d(t.description||"")),y(!1)})},[r]);const g=async t=>{if(t.preventDefault(),!!a){o(null),p(!0);try{await w(a.id,{name:i,description:l}),window.location.href=`/teams/${a.slug}`}catch(f){o(f instanceof Error?f.message:"Failed to update")}finally{p(!1)}}},v=async()=>{if(a&&window.confirm("Delete this team? Environments must be transferred first."))try{await N(a.id),window.location.href="/teams"}catch(t){o(t instanceof Error?t.message:"Failed to delete")}};return b?e.jsx("div",{className:"flex items-center justify-center py-12 text-text-muted",children:"Loading..."}):a?e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsxs("header",{className:"mb-12",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:a.name}),e.jsxs("p",{className:"mt-1 font-mono text-xs text-text-muted",children:["/",a.slug]})]}),e.jsxs("form",{onSubmit:g,className:"mb-16 max-w-md space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-text-primary mb-2",children:"Team Name"}),e.jsx("input",{id:"name",type:"text",required:!0,value:i,onChange:t=>m(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-text-primary mb-2",children:"Description"}),e.jsx("textarea",{id:"description",value:l,onChange:t=>d(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",rows:3})]}),u&&e.jsx("p",{className:"text-sm text-destructive",children:u}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"rounded-md border border-border px-4 py-2 text-sm text-text-primary hover:bg-surface-2 transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:x||!i,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50 transition-colors",children:x?"Saving...":"Save Changes"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"mb-3 text-sm font-medium text-destructive",children:"Delete team"}),e.jsx("p",{className:"mb-4 text-sm text-text-muted",children:"Deleting a team requires all environments to be transferred first."}),e.jsx("button",{type:"button",onClick:v,className:"rounded-md border border-destructive/60 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors",children:"Delete Team"})]})]})}):e.jsxs("div",{className:"mx-auto max-w-lg px-4 py-8",children:[e.jsx("p",{className:"text-text-muted",children:"Team not found."}),e.jsx("a",{href:"/teams",className:"text-accent hover:underline",children:"Back to teams"})]})}export{k as TeamSettings};
1
+ import{e as n,j as e}from"./vendor-DE_-CLIE.js";import{B as c}from"./main-BtriBTyr.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";async function j(s){try{const r=s.startsWith("team_")?`/web/teams/${s}`:`/web/teams/by-slug/${s}`;return await c("GET",r)}catch{return null}}async function w(s,r){await c("PATCH",`/web/teams/${s}`,r)}async function N(s){await c("DELETE",`/web/teams/${s}`)}function k(){const s=window.location.pathname.split("/"),r=s[s.length-2]||"",[a,h]=n.useState(null),[b,y]=n.useState(!0),[i,m]=n.useState(""),[l,d]=n.useState(""),[u,o]=n.useState(null),[x,p]=n.useState(!1);n.useEffect(()=>{r&&j(r).then(t=>{t&&(h(t),m(t.name),d(t.description||"")),y(!1)})},[r]);const g=async t=>{if(t.preventDefault(),!!a){o(null),p(!0);try{await w(a.id,{name:i,description:l}),window.location.href=`/teams/${a.slug}`}catch(f){o(f instanceof Error?f.message:"Failed to update")}finally{p(!1)}}},v=async()=>{if(a&&window.confirm("Delete this team? Environments must be transferred first."))try{await N(a.id),window.location.href="/teams"}catch(t){o(t instanceof Error?t.message:"Failed to delete")}};return b?e.jsx("div",{className:"flex items-center justify-center py-12 text-text-muted",children:"Loading..."}):a?e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsxs("header",{className:"mb-12",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:a.name}),e.jsxs("p",{className:"mt-1 font-mono text-xs text-text-muted",children:["/",a.slug]})]}),e.jsxs("form",{onSubmit:g,className:"mb-16 max-w-md space-y-8",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-text-primary mb-2",children:"Team Name"}),e.jsx("input",{id:"name",type:"text",required:!0,value:i,onChange:t=>m(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-text-primary mb-2",children:"Description"}),e.jsx("textarea",{id:"description",value:l,onChange:t=>d(t.target.value),className:"w-full rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-accent focus:outline-none",rows:3})]}),u&&e.jsx("p",{className:"text-sm text-destructive",children:u}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"rounded-md border border-border px-4 py-2 text-sm text-text-primary hover:bg-surface-2 transition-colors",children:"Cancel"}),e.jsx("button",{type:"submit",disabled:x||!i,className:"rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 disabled:opacity-50 transition-colors",children:x?"Saving...":"Save Changes"})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"mb-3 text-sm font-medium text-destructive",children:"Delete team"}),e.jsx("p",{className:"mb-4 text-sm text-text-muted",children:"Deleting a team requires all environments to be transferred first."}),e.jsx("button",{type:"button",onClick:v,className:"rounded-md border border-destructive/60 px-4 py-2 text-sm font-medium text-destructive hover:bg-destructive/10 transition-colors",children:"Delete Team"})]})]})}):e.jsxs("div",{className:"mx-auto max-w-lg px-4 py-8",children:[e.jsx("p",{className:"text-text-muted",children:"Team not found."}),e.jsx("a",{href:"/teams",className:"text-accent hover:underline",children:"Back to teams"})]})}export{k as TeamSettings};
@@ -1 +1 @@
1
- import{e as a,j as t}from"./vendor-DE_-CLIE.js";import{as as v,an as l,B as S}from"./main-UQZcxx36.js";function C({onSelect:o,excludeUserIds:x=[],placeholder:u,actionLabel:m,actionDisabled:h=!1,className:p}){v();const[n,c]=a.useState(""),[b,s]=a.useState([]),[i,d]=a.useState(!1),f=async e=>{if(c(e),e.trim().length<2){s([]);return}d(!0);try{const N=await S("GET",`/web/users/search?q=${encodeURIComponent(e.trim())}`);s(N)}catch{s([])}finally{d(!1)}},y=e=>{o(e),c(""),s([])},r=b.filter(e=>!x.includes(e.id)),g=m??l("invitation.add"),j=u??l("invitation.searchUser");return t.jsxs("div",{className:p,children:[t.jsx("input",{type:"text",value:n,onChange:e=>f(e.target.value),placeholder:j,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"}),i&&t.jsx("p",{className:"mt-1 text-xs text-text-muted",children:"Searching..."}),r.length>0&&t.jsx("ul",{className:"mt-2 divide-y divide-border rounded border border-border bg-surface-1",children:r.map(e=>t.jsxs("li",{className:"flex items-center justify-between px-3 py-2 text-sm",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-text-primary",children:e.username}),t.jsx("div",{className:"truncate font-mono text-xs text-text-muted",children:e.id})]}),t.jsx("button",{type:"button",onClick:()=>y(e.id),disabled:h,className:"rounded bg-accent px-2 py-1 text-xs text-white hover:bg-accent/90 disabled:opacity-50",children:g})]},e.id))}),n.trim().length>=2&&r.length===0&&!i&&t.jsx("p",{className:"mt-1 text-xs text-text-muted",children:"No users found."})]})}export{C as U};
1
+ import{e as a,j as t}from"./vendor-DE_-CLIE.js";import{as as v,an as l,B as S}from"./main-BtriBTyr.js";function C({onSelect:o,excludeUserIds:x=[],placeholder:u,actionLabel:m,actionDisabled:h=!1,className:p}){v();const[n,c]=a.useState(""),[b,s]=a.useState([]),[i,d]=a.useState(!1),f=async e=>{if(c(e),e.trim().length<2){s([]);return}d(!0);try{const N=await S("GET",`/web/users/search?q=${encodeURIComponent(e.trim())}`);s(N)}catch{s([])}finally{d(!1)}},y=e=>{o(e),c(""),s([])},r=b.filter(e=>!x.includes(e.id)),g=m??l("invitation.add"),j=u??l("invitation.searchUser");return t.jsxs("div",{className:p,children:[t.jsx("input",{type:"text",value:n,onChange:e=>f(e.target.value),placeholder:j,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"}),i&&t.jsx("p",{className:"mt-1 text-xs text-text-muted",children:"Searching..."}),r.length>0&&t.jsx("ul",{className:"mt-2 divide-y divide-border rounded border border-border bg-surface-1",children:r.map(e=>t.jsxs("li",{className:"flex items-center justify-between px-3 py-2 text-sm",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-text-primary",children:e.username}),t.jsx("div",{className:"truncate font-mono text-xs text-text-muted",children:e.id})]}),t.jsx("button",{type:"button",onClick:()=>y(e.id),disabled:h,className:"rounded bg-accent px-2 py-1 text-xs text-white hover:bg-accent/90 disabled:opacity-50",children:g})]},e.id))}),n.trim().length>=2&&r.length===0&&!i&&t.jsx("p",{className:"mt-1 text-xs text-text-muted",children:"No users found."})]})}export{C as U};