@runeya/runeya 2.0.55 → 2.0.56

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 (187) hide show
  1. package/package.json +1 -1
  2. package/web/assets/{AgentScalarChatInterface.vue-BMqFzngo.js → AgentScalarChatInterface.vue-CBm8pMxm.js} +1 -1
  3. package/web/assets/{AgentTerminalPage-BaeZYHEz.js → AgentTerminalPage-Cu2yebw0.js} +1 -1
  4. package/web/assets/AiChatPage-D_QT__oC.js +1 -0
  5. package/web/assets/{AppLayout-DKaFXFNm.js → AppLayout-B-JzLiuN.js} +1 -1
  6. package/web/assets/{AuditPage-BoqD2rTL.js → AuditPage-O5w_rRoF.js} +1 -1
  7. package/web/assets/CloudAccountPage-8iUKumU1.js +1 -0
  8. package/web/assets/{CloudAccountPage-BvlALaKX.js → CloudAccountPage-CxclkzzF.js} +1 -1
  9. package/web/assets/{CloudMessagingPage-DU_Y4dCb.js → CloudMessagingPage-Cn4mBsGb.js} +1 -1
  10. package/web/assets/{DashboardPage-UpH-RReH.js → DashboardPage-CBPAacTy.js} +1 -1
  11. package/web/assets/{EditorIcon-C69miffT.js → EditorIcon-CZLL1qox.js} +1 -1
  12. package/web/assets/{EnvironmentForm-DMG36ruj.js → EnvironmentForm-A41dAsGK.js} +1 -1
  13. package/web/assets/{EnvironmentFormPage-DZQ1aCFu.js → EnvironmentFormPage-seMzTipP.js} +1 -1
  14. package/web/assets/{EnvironmentListPage-BxHOrX38.js → EnvironmentListPage-Bx_8aQ7W.js} +1 -1
  15. package/web/assets/{EnvironmentSelector-DzSlMAQT.js → EnvironmentSelector-GuLEFkas.js} +1 -1
  16. package/web/assets/{KanbanBoardPage-DmguTXbS.js → KanbanBoardPage-BV-1mFti.js} +3 -3
  17. package/web/assets/{KanbanListPage-EwWSNHFg.js → KanbanListPage-BHmn0L7d.js} +1 -1
  18. package/web/assets/{LaunchProjectPage-uL_AUfYG.js → LaunchProjectPage-0x_cAt48.js} +1 -1
  19. package/web/assets/{LaunchServicesPage-BCoT8uka.js → LaunchServicesPage-wC2HNYAu.js} +1 -1
  20. package/web/assets/{LogViewer-CP5tPjpN.js → LogViewer-BRsgOXsv.js} +1 -1
  21. package/web/assets/{ProcessControls-BT8Hq3fS.js → ProcessControls-BKUKb6vL.js} +1 -1
  22. package/web/assets/{ProcessDetailPage-Dl5eVR0B.js → ProcessDetailPage-DqInQZoM.js} +1 -1
  23. package/web/assets/{ProcessMetrics-DCPeQlXs.js → ProcessMetrics-4aaZekKw.js} +1 -1
  24. package/web/assets/{ProjectDetailPage-I4it0Fch.js → ProjectDetailPage-DWdYGIm5.js} +1 -1
  25. package/web/assets/{ProjectListPage-BpdbODZn.js → ProjectListPage-XKb11ZSl.js} +1 -1
  26. package/web/assets/{RandomJobTestPage-B54p6EdF.js → RandomJobTestPage-D3mNVwkH.js} +1 -1
  27. package/web/assets/{ScenarioEditorPage-C0NIE3t8.js → ScenarioEditorPage-Bhp_uvLq.js} +1 -1
  28. package/web/assets/{SendToChatDialog-Dy_x4DDI.js → SendToChatDialog-DdjtI7RN.js} +1 -1
  29. package/web/assets/{ServiceControlsBar-DPDmBLOQ.js → ServiceControlsBar-CRzSTSbf.js} +1 -1
  30. package/web/assets/{ServiceDetailPage-D_hndxqK.js → ServiceDetailPage-ChZVB2uY.js} +1 -1
  31. package/web/assets/{ServiceFormPage-DAyFlHvA.js → ServiceFormPage-CXrwDYXc.js} +1 -1
  32. package/web/assets/{SettingsPage-CcuC2wFK.js → SettingsPage-BKImNNGC.js} +4 -4
  33. package/web/assets/{UnlockPage-B58VPSfR.js → UnlockPage-IF_kNWCK.js} +1 -1
  34. package/web/assets/{VariablesTable-Mj9gxe8i.js → VariablesTable-BnfdPTJs.js} +1 -1
  35. package/web/assets/{VaultMigrationPage-Dlo4g-x3.js → VaultMigrationPage-Dzn-moG9.js} +1 -1
  36. package/web/assets/{VersionBadge-BAI4Ayxx.js → VersionBadge-DJlVV7r7.js} +1 -1
  37. package/web/assets/WikiPage-DNm8r3l9.js +1 -0
  38. package/web/assets/{WikiView-1GXLAPfT.js → WikiView-DCuU1ES2.js} +1 -1
  39. package/web/assets/{add-scalar-classes-BkwoBpWy.js → add-scalar-classes-DGIbkQ1f.js} +3 -3
  40. package/web/assets/auth-errors-DQYwI7Ju.js +1 -0
  41. package/web/assets/{autocomplete--65VKbBs.js → autocomplete-BIqGkkg7.js} +1 -1
  42. package/web/assets/{basic-shape-diamond.svg-CAMv78H-.js → basic-shape-diamond.svg-DH2telU3.js} +1 -1
  43. package/web/assets/{basic-shape-hexagon.svg-XSrcZLW0.js → basic-shape-hexagon.svg-CkFORYUC.js} +1 -1
  44. package/web/assets/{basic-shape-primary-circle-ellipse-round.svg-BgVH88jK.js → basic-shape-primary-circle-ellipse-round.svg-BlV1CeJ6.js} +1 -1
  45. package/web/assets/{basic-shape-primary-square-rectangle.svg-xTzxoq2Y.js → basic-shape-primary-square-rectangle.svg-BaAO9T6a.js} +1 -1
  46. package/web/assets/{basic-shape-shield.svg-BTgpH2yJ.js → basic-shape-shield.svg-CAX-F0Ai.js} +1 -1
  47. package/web/assets/{browser-3-eXKCbo.js → browser-CgnxRAK6.js} +1 -1
  48. package/web/assets/{browser-CUmhJaQx.js → browser-DPOAuokj.js} +1 -1
  49. package/web/assets/{card-C002Ads9.js → card-BinmfAW6.js} +1 -1
  50. package/web/assets/{checkbox-oRGfXjHa.js → checkbox-DRF4pbAa.js} +1 -1
  51. package/web/assets/{chip-C16evUWL.js → chip-Dvt1MVQM.js} +1 -1
  52. package/web/assets/{client-DQ7l0X0R.js → client-BqPXDxC1.js} +1 -1
  53. package/web/assets/{cloud-chat.store-6rrle1LS.js → cloud-chat.store-DqrDy_y_.js} +1 -1
  54. package/web/assets/{cloud-session-C1j_MV8O.js → cloud-session-BPYJmCDW.js} +1 -1
  55. package/web/assets/{column-_TAitU2u.js → column-DFi06tD3.js} +1 -1
  56. package/web/assets/{computer-device-desktop-monitor.svg-Dc6aGusC.js → computer-device-desktop-monitor.svg-CJMZ28bk.js} +1 -1
  57. package/web/assets/{computer-device-desktop.svg-CM2cPc30.js → computer-device-desktop.svg-BedAMKhR.js} +1 -1
  58. package/web/assets/{computer-device-laptop.svg-Cgkag9qJ.js → computer-device-laptop.svg-DdhI-EdQ.js} +1 -1
  59. package/web/assets/{computer-device-mobile-phone-android-samsung-back.svg-zn5env47.js → computer-device-mobile-phone-android-samsung-back.svg-C5diuYjt.js} +1 -1
  60. package/web/assets/{computer-device-mobile-phone-android-samsung.svg-oS1pUYbb.js → computer-device-mobile-phone-android-samsung.svg-DGHCufqU.js} +1 -1
  61. package/web/assets/{computer-device-mobile-phone-iphone-x-back.svg-Cn7NWYpM.js → computer-device-mobile-phone-iphone-x-back.svg-CMWyPtt9.js} +1 -1
  62. package/web/assets/{computer-device-mobile-phone-iphone-x.svg-B5OAArcG.js → computer-device-mobile-phone-iphone-x.svg-BRy5W1In.js} +1 -1
  63. package/web/assets/{computer-device-mobile-tablet-touch.svg-DUz5IocO.js → computer-device-mobile-tablet-touch.svg-BGnBo8Ih.js} +1 -1
  64. package/web/assets/{computer-device-mobile-tablet.svg--VeqZdb9.js → computer-device-mobile-tablet.svg-xSg_XplW.js} +1 -1
  65. package/web/assets/{computer-device-network-ethernet-cat6.svg-DXH_pdMh.js → computer-device-network-ethernet-cat6.svg-hz-jiJFA.js} +1 -1
  66. package/web/assets/{computer-device-network-lan-www.svg-uqOsigHB.js → computer-device-network-lan-www.svg-BF6NF79C.js} +1 -1
  67. package/web/assets/{computer-device-network-wifi-connection.svg-BP5vkv9N.js → computer-device-network-wifi-connection.svg-gwpaLcz6.js} +1 -1
  68. package/web/assets/{computer-device-network-wifi-router.svg-CjK4RVQx.js → computer-device-network-wifi-router.svg-B4oSiJHk.js} +1 -1
  69. package/web/assets/{cssMode-CN46e-Az.js → cssMode-HHg8IzQM.js} +1 -1
  70. package/web/assets/{divider-LLul0-iW.js → divider-C5a--3VK.js} +1 -1
  71. package/web/assets/{ecology-science-erlenmeyer-flask.svg-cnbAOGwK.js → ecology-science-erlenmeyer-flask.svg-DkoOes8O.js} +1 -1
  72. package/web/assets/{fieldset-ZxYA8U84.js → fieldset-c3hO4nzt.js} +1 -1
  73. package/web/assets/{freemarker2-Qlh6aPDo.js → freemarker2-BJSUPPPz.js} +1 -1
  74. package/web/assets/{handlebars-CpN0Qvyd.js → handlebars-BAY2_Hod.js} +1 -1
  75. package/web/assets/{html-DnKAO9rJ.js → html-CNW7z0dM.js} +1 -1
  76. package/web/assets/{htmlMode-Bj-LpSqo.js → htmlMode-SpxSLWYn.js} +1 -1
  77. package/web/assets/{image-flash-lightning.svg-2F6xtNBK.js → image-flash-lightning.svg-DzcaFZwQ.js} +1 -1
  78. package/web/assets/{image-picture-flower.svg-BW6lv8j7.js → image-picture-flower.svg-DbYkuhs0.js} +1 -1
  79. package/web/assets/{index-Bdr5knDo.js → index-BIjjyvxm.js} +5 -5
  80. package/web/assets/{interface-alert-exclamation-diamond.svg-CEYeQFhC.js → interface-alert-exclamation-diamond.svg-VqQleX3x.js} +1 -1
  81. package/web/assets/{interface-alert-exclamation-triangle-warning.svg-CJfmEMRl.js → interface-alert-exclamation-triangle-warning.svg-B4xCH3UD.js} +1 -1
  82. package/web/assets/{interface-alert-information-circle.svg-Dmru-S4E.js → interface-alert-information-circle.svg-5k54XhJ-.js} +1 -1
  83. package/web/assets/{interface-award-crown.svg-UJmfoU0o.js → interface-award-crown.svg-BXVJGSgl.js} +1 -1
  84. package/web/assets/{interface-bookmark.svg-BtCSsE7I.js → interface-bookmark-tag.svg-CBUeCBGD.js} +1 -1
  85. package/web/assets/{interface-bookmark-tag.svg-DYlOV-H_.js → interface-bookmark.svg-D0afhfDQ.js} +1 -1
  86. package/web/assets/{interface-calendar-date-one.svg-BG8zrSlq.js → interface-calendar-date-one.svg-CFO_cJx5.js} +1 -1
  87. package/web/assets/{interface-content-book-open-pages.svg-CK8vOvUS.js → interface-content-book-open-pages.svg-D_VJNLAI.js} +1 -1
  88. package/web/assets/{interface-content-book-page.svg-txhkDQQp.js → interface-content-book-page.svg-BxdaWR7b.js} +1 -1
  89. package/web/assets/{interface-content-file.svg-UZc-jRFQ.js → interface-content-file.svg-CCKgKAVi.js} +1 -1
  90. package/web/assets/interface-content-folder.svg-DnPIUwnJ.js +1 -0
  91. package/web/assets/{interface-content-folder.svg-oD2MMIrG.js → interface-content-folder.svg-Dw0SKwbv.js} +1 -1
  92. package/web/assets/{interface-copy-clipboard.svg-VhpbGb8y.js → interface-copy-clipboard.svg-Co7ESi9t.js} +1 -1
  93. package/web/assets/{interface-edit-attachment.svg-CuGtstos.js → interface-edit-attachment.svg-DB4Fu5ck.js} +1 -1
  94. package/web/assets/{interface-edit-binocular.svg-Naq_0QWK.js → interface-edit-binocular.svg-DSEtWb7P.js} +1 -1
  95. package/web/assets/{interface-edit-magic-wand.svg-DrbefRb0.js → interface-edit-magic-wand.svg-Bh9JP-_u.js} +1 -1
  96. package/web/assets/{interface-edit-tool-paint-roller.svg-NzqkhEEN.js → interface-edit-tool-paint-roller.svg-DXODVJeW.js} +1 -1
  97. package/web/assets/{interface-edit-tool-pencil.svg-CHQRBxu1.js → interface-edit-tool-pencil.svg-gJSTl1EM.js} +1 -1
  98. package/web/assets/{interface-favorite-award.svg-CtNtg14Q.js → interface-favorite-award.svg-Bv3Ditpr.js} +1 -1
  99. package/web/assets/{interface-favorite-flag.svg-80koie1H.js → interface-favorite-flag.svg-RU02g1Zi.js} +1 -1
  100. package/web/assets/{interface-favorite-heart.svg-DA5IHByK.js → interface-favorite-heart.svg-C9umX2vE.js} +1 -1
  101. package/web/assets/{interface-favorite-star.svg-JGlI0-Gv.js → interface-favorite-star.svg-CWsQ-mGb.js} +1 -1
  102. package/web/assets/{interface-favorite-stars-sparkles.svg-DVC5nlik.js → interface-favorite-stars-sparkles.svg-C5z_gPrX.js} +1 -1
  103. package/web/assets/{interface-hierarchy-flowchart.svg-z_RqQP1A.js → interface-hierarchy-flowchart.svg-CctM7HYF.js} +1 -1
  104. package/web/assets/{interface-home-house.svg-DSwCUQvt.js → interface-home-house.svg-Cd6GJDkx.js} +1 -1
  105. package/web/assets/{interface-hyperlink.svg-voKgjrwo.js → interface-hyperlink.svg-RUZY_MPS.js} +1 -1
  106. package/web/assets/{interface-lighting-brightness.svg-qz6LzfZ_.js → interface-lighting-brightness.svg-CoJei7Uh.js} +1 -1
  107. package/web/assets/{interface-lock-closed.svg-BCXfx-uz.js → interface-lock-closed.svg-DHBiQkRu.js} +1 -1
  108. package/web/assets/{interface-lock-open-unlock.svg-CLnjXmO8.js → interface-lock-open-unlock.svg-D9gUzkAe.js} +1 -1
  109. package/web/assets/{interface-login-key.svg-Rb6Hb0dk.js → interface-login-key.svg-BGNkKSCc.js} +1 -1
  110. package/web/assets/{interface-search.svg-DisX65jX.js → interface-search.svg-a20xpUNh.js} +1 -1
  111. package/web/assets/{interface-setting-cog.svg-VBsFZ4k1.js → interface-setting-cog.svg-Du_6PHwV.js} +1 -1
  112. package/web/assets/{interface-share-megaphone-bullhorn.svg-zBjfLFB-.js → interface-share-megaphone-bullhorn.svg-cUXjeKNG.js} +1 -1
  113. package/web/assets/{interface-share-rocket.svg-84fU9l-d.js → interface-share-rocket.svg-D5DY8-4Z.js} +1 -1
  114. package/web/assets/{interface-share-satellite.svg-BX00A6-3.js → interface-share-satellite.svg-CxZ9ENCv.js} +1 -1
  115. package/web/assets/{interface-share-space-ship.svg-Bd4tm7i6.js → interface-share-space-ship.svg-DxRCAuZe.js} +1 -1
  116. package/web/assets/{interface-share.svg-CKrFOUGn.js → interface-share.svg-CJ86d8ve.js} +1 -1
  117. package/web/assets/{interface-signal-square.svg-ChP-Ag0w.js → interface-signal-square.svg-DaITtWso.js} +1 -1
  118. package/web/assets/{interface-time-clock-circle.svg-BK02YgSw.js → interface-time-clock-circle.svg-DOXyhrEi.js} +1 -1
  119. package/web/assets/{interface-time-hour-glass.svg-0NvuFWjn.js → interface-time-hour-glass.svg-DEzjXGhd.js} +1 -1
  120. package/web/assets/{interface-users-multiple.svg-Ba9lXpUM.js → interface-users-multiple.svg-DuW2zZO9.js} +1 -1
  121. package/web/assets/{interface-weather-moon.svg-CwqP_Nej.js → interface-weather-moon.svg-CAJTRm96.js} +1 -1
  122. package/web/assets/{javascript-CFWxThAh.js → javascript-DoNH7W21.js} +1 -1
  123. package/web/assets/{jsonMode-Cdw2w5W7.js → jsonMode-Ba_3RQUr.js} +1 -1
  124. package/web/assets/{liquid-cH8Ar8JC.js → liquid-yqqVxQ3r.js} +1 -1
  125. package/web/assets/{lspLanguageFeatures-CSQgHrR9.js → lspLanguageFeatures-DsNvNJOK.js} +1 -1
  126. package/web/assets/{mail-chat-bubble-square.svg-C-ovjGCd.js → mail-chat-bubble-square.svg-DxuFTrxl.js} +1 -1
  127. package/web/assets/{mail-send-email-paper-airplane.svg-BZayiABF.js → mail-send-email-paper-airplane.svg-fobU5Rru.js} +1 -1
  128. package/web/assets/{mail-send-envelope.svg-C_cz8SOf.js → mail-send-envelope.svg-DjoyQmbK.js} +1 -1
  129. package/web/assets/{mdx-QDarK7vD.js → mdx-We_KeaPg.js} +1 -1
  130. package/web/assets/{message-QiLCZQ6U.js → message-Cgzl10yY.js} +1 -1
  131. package/web/assets/{minus-CjIL1IQ0.js → minus-CWad93a9.js} +1 -1
  132. package/web/assets/{modal-C6AVHTdY.js → modal-BwAKEIsn.js} +1 -1
  133. package/web/assets/modal-tmtc9vXB.js +1 -0
  134. package/web/assets/{money-cashier-receipt.svg-CGCVucBa.js → money-cashier-receipt.svg-Cd3vbq1N.js} +1 -1
  135. package/web/assets/{money-currency-dollar-pay.svg-BLMxlzG8.js → money-currency-dollar-pay.svg-q2PhWmHi.js} +1 -1
  136. package/web/assets/{money-graph-arrow-increase.svg-n46081bf.js → money-graph-arrow-increase.svg-DFoTvPe7.js} +1 -1
  137. package/web/assets/{money-graph-bar-chart-increase.svg-Dyf3rVrr.js → money-graph-bar-chart-increase.svg-N1y-bW8g.js} +1 -1
  138. package/web/assets/{multiselect-CeWstZUW.js → multiselect-DlPZQWML.js} +1 -1
  139. package/web/assets/{nature-ecology-leaf.svg-BSyMcKpo.js → nature-ecology-leaf.svg-B759TwbF.js} +1 -1
  140. package/web/assets/{password-CWjT4bmn.js → password-Bbkf0Avi.js} +1 -1
  141. package/web/assets/{phone-telephone.svg-AdhrXmF7.js → phone-telephone.svg-BAjrImUz.js} +1 -1
  142. package/web/assets/{plus-M3hWJrgM.js → plus-CSmkO4gT.js} +1 -1
  143. package/web/assets/process.store-f72KyYo3.js +1 -0
  144. package/web/assets/{programming-bug.svg-CH-KL4Vs.js → programming-bug.svg-C9yxLgbr.js} +1 -1
  145. package/web/assets/{programming-cloud.svg-iqzO95XV.js → programming-cloud.svg-Brnt7HfW.js} +1 -1
  146. package/web/assets/{programming-computer-database-server.svg-CwYDnoeu.js → programming-computer-database-server.svg-CA5tIDJ_.js} +1 -1
  147. package/web/assets/{programming-computer-database.svg-DIR7nexS.js → programming-computer-database.svg-BJ_fk-M0.js} +1 -1
  148. package/web/assets/{programming-module-four-layout.svg-BLM5JSuM.js → programming-module-four-layout.svg-DULdtPL4.js} +1 -1
  149. package/web/assets/{programming-module-three.svg-VkTvwtGj.js → programming-module-three.svg-B1vBli33.js} +1 -1
  150. package/web/assets/{programming-module.svg-ploUKZF1.js → programming-module.svg-DpVKFxMS.js} +1 -1
  151. package/web/assets/{programming-script-code.svg-CBb1n9Wg.js → programming-script-code.svg-CTNuSx8y.js} +1 -1
  152. package/web/assets/{python-D50H1ABE.js → python-B0GPM7en.js} +1 -1
  153. package/web/assets/{razor-DlRTIZjA.js → razor-YCIzBEVM.js} +1 -1
  154. package/web/assets/router-CRcngiuT.js +1 -0
  155. package/web/assets/settings-scope-BIR0n6j3.js +1 -0
  156. package/web/assets/{settings.store-D8H5j7LI.js → settings.store-DuwB5egt.js} +1 -1
  157. package/web/assets/{shopping-cart.svg-f8XztG2a.js → shopping-cart.svg-DinVLM6s.js} +1 -1
  158. package/web/assets/{shopping-gift-present.svg-CCWvUU2s.js → shopping-gift-present.svg-CzHOD4sx.js} +1 -1
  159. package/web/assets/{shopping-shipping-box-parcel-package.svg-B34dpKOx.js → shopping-shipping-box-parcel-package.svg-Ct0cSZV2.js} +1 -1
  160. package/web/assets/{src-BNFzRy6K.js → src-DsmqQeZ9.js} +1 -1
  161. package/web/assets/{src-BGDKWMIa.js → src-HJHc4vH7.js} +1 -1
  162. package/web/assets/{tabpanel-CNk_cZBK.js → tabpanel-C4RQhLki.js} +1 -1
  163. package/web/assets/{tag-new-circle.svg-DfVbdtgP.js → tag-new-circle.svg-DszV9Yu3.js} +1 -1
  164. package/web/assets/{travel-map-earth-globe.svg-DtHjmNYO.js → travel-map-earth-globe.svg-DJS5nR0r.js} +1 -1
  165. package/web/assets/trpc-CTOLa5Ye.js +1 -0
  166. package/web/assets/{tsMode-JB8srzcV.js → tsMode-DAiF0SK5.js} +1 -1
  167. package/web/assets/{typescript-tyJPc3H7.js → typescript-Bs2RtJDr.js} +1 -1
  168. package/web/assets/useAiChatDrawer-CFsO_u5Q.js +1 -0
  169. package/web/assets/useCloudOrg-Ds7-Bvva.js +1 -0
  170. package/web/assets/useCloudOrg-zVC74FRC.css +1 -0
  171. package/web/assets/{useProjectCatalog-Dm1KHBII.js → useProjectCatalog-OUh8Jzm4.js} +1 -1
  172. package/web/assets/{xml-C7fJ7rgN.js → xml-DNJakbU1.js} +1 -1
  173. package/web/assets/{yaml-C7Vw_RLP.js → yaml-CuCgMv5w.js} +1 -1
  174. package/web/index.html +1 -1
  175. package/web/assets/AiChatPage-cppSydlY.js +0 -1
  176. package/web/assets/CloudAccountPage-BhXNhby1.js +0 -1
  177. package/web/assets/WikiPage-C0PzmD-1.js +0 -1
  178. package/web/assets/auth-errors-B7MynIJ7.js +0 -1
  179. package/web/assets/interface-content-folder.svg-B10e_dq6.js +0 -1
  180. package/web/assets/modal--_j6f_13.js +0 -1
  181. package/web/assets/process.store-DMSZ0UO0.js +0 -1
  182. package/web/assets/router-CJ2cAlAQ.js +0 -1
  183. package/web/assets/settings-scope-RHM8yNPa.js +0 -1
  184. package/web/assets/trpc-zpvXCcIc.js +0 -1
  185. package/web/assets/useAiChatDrawer-DBi9CDz5.js +0 -1
  186. package/web/assets/useCloudOrg-BZaqB7v3.css +0 -1
  187. package/web/assets/useCloudOrg-DoXBgqMB.js +0 -1
@@ -1 +1 @@
1
- import{$r as e,An as t,Bn as n,Di as r,Ji as i,Jr as ee,Sa as a,Ut as o,Xr as s,Xt as c,Yt as te,Zt as l,bi as u,c as d,ci as f,ei as p,ji as m,jn as h,l as g,mn as _,ni as v,pa as y,qt as b,ri as x,s as S,si as C,ta as w,ti as T,ui as E,un as ne,vn as D}from"./index-Bdr5knDo.js";import{t as O}from"./message-QiLCZQ6U.js";import{t as k}from"./password-CWjT4bmn.js";import{t as A}from"./card-C002Ads9.js";import{t as j}from"./VersionBadge-BAI4Ayxx.js";var M={class:`unlock-container`},N={class:`unlock-header`},P={class:`unlock-title`,"data-testid":`unlock-title`},F={class:`unlock-subtitle`},I={class:`field`},L={for:`masterPassword`},R={key:0,class:`field`},z={for:`encryptionKey`},B={class:`field-help`},V=_(E({__name:`UnlockPage`,setup(_){let E=h(),V=t(),{t:H}=n(),U=d(),W=g(),G=y(``),K=y(``),q=y(``),J=y(!1),Y=y(null),X=y(null);function Z(){u(()=>{(X.value?.$el?.querySelector(`input`))?.focus()})}let Q=e(()=>Y.value?.state===`setup`);r(async()=>{Z();try{Y.value=await b(),Y.value.state===`unlocked`&&await $()}catch{q.value=H(`unlockPage.serverUnreachable`)}});async function re(){q.value=``,J.value=!0;try{let e;if(Y.value?.state===`setup`){let t=Y.value.hasVerifyFile&&!Y.value.isLegacyMigration&&K.value||void 0;e=await c(G.value,t)}else e=await l(G.value);te(e),await S({loadPreferences:()=>W.loadPreferences(),initTrpcWs:o,startStatusStream:()=>U.startStatusStream()}),await $()}catch(e){q.value=e instanceof Error?e.message:H(`unlockPage.unknownError`),Z()}finally{J.value=!1}}async function $(){try{if((await b()).legacyVault){await E.push({name:`migrate-vault`});return}}catch{}let e=V.query.redirect;e&&e.startsWith(`/`)?await E.push(e):await E.push({name:`launch-project`})}return(e,t)=>(m(),x(`div`,M,[f(a(A),{class:`unlock-card`},{header:i(()=>[p(`div`,N,[p(`h1`,P,w(Q.value?a(H)(`unlockPage.titleSetup`):a(H)(`unlockPage.titleLocked`)),1),p(`p`,F,[Q.value&&Y.value?.isLegacyMigration?(m(),x(s,{key:0},[C(w(a(H)(`unlockPage.subtitleLegacyMigration`)),1)],64)):Q.value&&Y.value?.hasVerifyFile?(m(),x(s,{key:1},[C(w(a(H)(`unlockPage.subtitleHasVerifyFile`)),1)],64)):Q.value?(m(),x(s,{key:2},[C(w(a(H)(`unlockPage.subtitleSetup`)),1)],64)):(m(),x(s,{key:3},[C(w(a(H)(`unlockPage.subtitleUnlock`)),1)],64))])])]),content:i(()=>[p(`form`,{onSubmit:ee(re,[`prevent`]),class:`unlock-form`},[p(`div`,I,[p(`label`,L,w(a(H)(`unlockPage.masterPasswordLabel`)),1),f(a(k),{ref_key:`passwordRef`,ref:X,id:`masterPassword`,"data-testid":`master-password-input`,modelValue:G.value,"onUpdate:modelValue":t[0]||=e=>G.value=e,feedback:Q.value,toggleMask:``,fluid:``,disabled:J.value,autocomplete:Q.value?`new-password`:`current-password`,placeholder:a(H)(`unlockPage.masterPasswordPlaceholder`)},null,8,[`modelValue`,`feedback`,`disabled`,`autocomplete`,`placeholder`])]),Q.value&&Y.value?.hasVerifyFile&&!Y.value?.isLegacyMigration?(m(),x(`div`,R,[p(`label`,z,w(a(H)(`unlockPage.encryptionKeyLabel`)),1),f(a(ne),{id:`encryptionKey`,"data-testid":`encryption-key-input`,modelValue:K.value,"onUpdate:modelValue":t[1]||=e=>K.value=e,fluid:``,disabled:J.value,placeholder:a(H)(`unlockPage.encryptionKeyPlaceholder`),autocomplete:`off`},null,8,[`modelValue`,`disabled`,`placeholder`]),p(`small`,B,w(a(H)(`unlockPage.encryptionKeyHelp`)),1)])):v(``,!0),q.value?(m(),T(a(O),{key:1,severity:`error`,closable:!1,"data-testid":`unlock-error`},{default:i(()=>[C(w(q.value),1)]),_:1})):v(``,!0),Q.value?(m(),T(a(O),{key:2,severity:`info`,closable:!1,class:`machine-warning`},{default:i(()=>[C(w(a(H)(`unlockPage.machineWarning`)),1)]),_:1})):v(``,!0),f(a(D),{type:`submit`,"data-testid":`unlock-submit-btn`,label:J.value?a(H)(`unlockPage.pleaseWait`):Q.value?a(H)(`unlockPage.configure`):a(H)(`unlockPage.unlock`),disabled:J.value||!G.value,loading:J.value,fluid:``},null,8,[`label`,`disabled`,`loading`])],32)]),_:1}),f(j)]))}}),[[`__scopeId`,`data-v-b06081cf`]]);export{V as default};
1
+ import{$r as e,An as t,Bn as n,Di as r,Ji as i,Jr as ee,Sa as a,Ut as o,Xr as s,Xt as c,Yt as te,Zt as l,bi as u,c as d,ci as f,ei as p,ji as m,jn as h,l as g,mn as _,ni as v,pa as y,qt as b,ri as x,s as S,si as C,ta as w,ti as T,ui as E,un as ne,vn as D}from"./index-BIjjyvxm.js";import{t as O}from"./message-Cgzl10yY.js";import{t as k}from"./password-Bbkf0Avi.js";import{t as A}from"./card-BinmfAW6.js";import{t as j}from"./VersionBadge-DJlVV7r7.js";var M={class:`unlock-container`},N={class:`unlock-header`},P={class:`unlock-title`,"data-testid":`unlock-title`},F={class:`unlock-subtitle`},I={class:`field`},L={for:`masterPassword`},R={key:0,class:`field`},z={for:`encryptionKey`},B={class:`field-help`},V=_(E({__name:`UnlockPage`,setup(_){let E=h(),V=t(),{t:H}=n(),U=d(),W=g(),G=y(``),K=y(``),q=y(``),J=y(!1),Y=y(null),X=y(null);function Z(){u(()=>{(X.value?.$el?.querySelector(`input`))?.focus()})}let Q=e(()=>Y.value?.state===`setup`);r(async()=>{Z();try{Y.value=await b(),Y.value.state===`unlocked`&&await $()}catch{q.value=H(`unlockPage.serverUnreachable`)}});async function re(){q.value=``,J.value=!0;try{let e;if(Y.value?.state===`setup`){let t=Y.value.hasVerifyFile&&!Y.value.isLegacyMigration&&K.value||void 0;e=await c(G.value,t)}else e=await l(G.value);te(e),await S({loadPreferences:()=>W.loadPreferences(),initTrpcWs:o,startStatusStream:()=>U.startStatusStream()}),await $()}catch(e){q.value=e instanceof Error?e.message:H(`unlockPage.unknownError`),Z()}finally{J.value=!1}}async function $(){try{if((await b()).legacyVault){await E.push({name:`migrate-vault`});return}}catch{}let e=V.query.redirect;e&&e.startsWith(`/`)?await E.push(e):await E.push({name:`launch-project`})}return(e,t)=>(m(),x(`div`,M,[f(a(A),{class:`unlock-card`},{header:i(()=>[p(`div`,N,[p(`h1`,P,w(Q.value?a(H)(`unlockPage.titleSetup`):a(H)(`unlockPage.titleLocked`)),1),p(`p`,F,[Q.value&&Y.value?.isLegacyMigration?(m(),x(s,{key:0},[C(w(a(H)(`unlockPage.subtitleLegacyMigration`)),1)],64)):Q.value&&Y.value?.hasVerifyFile?(m(),x(s,{key:1},[C(w(a(H)(`unlockPage.subtitleHasVerifyFile`)),1)],64)):Q.value?(m(),x(s,{key:2},[C(w(a(H)(`unlockPage.subtitleSetup`)),1)],64)):(m(),x(s,{key:3},[C(w(a(H)(`unlockPage.subtitleUnlock`)),1)],64))])])]),content:i(()=>[p(`form`,{onSubmit:ee(re,[`prevent`]),class:`unlock-form`},[p(`div`,I,[p(`label`,L,w(a(H)(`unlockPage.masterPasswordLabel`)),1),f(a(k),{ref_key:`passwordRef`,ref:X,id:`masterPassword`,"data-testid":`master-password-input`,modelValue:G.value,"onUpdate:modelValue":t[0]||=e=>G.value=e,feedback:Q.value,toggleMask:``,fluid:``,disabled:J.value,autocomplete:Q.value?`new-password`:`current-password`,placeholder:a(H)(`unlockPage.masterPasswordPlaceholder`)},null,8,[`modelValue`,`feedback`,`disabled`,`autocomplete`,`placeholder`])]),Q.value&&Y.value?.hasVerifyFile&&!Y.value?.isLegacyMigration?(m(),x(`div`,R,[p(`label`,z,w(a(H)(`unlockPage.encryptionKeyLabel`)),1),f(a(ne),{id:`encryptionKey`,"data-testid":`encryption-key-input`,modelValue:K.value,"onUpdate:modelValue":t[1]||=e=>K.value=e,fluid:``,disabled:J.value,placeholder:a(H)(`unlockPage.encryptionKeyPlaceholder`),autocomplete:`off`},null,8,[`modelValue`,`disabled`,`placeholder`]),p(`small`,B,w(a(H)(`unlockPage.encryptionKeyHelp`)),1)])):v(``,!0),q.value?(m(),T(a(O),{key:1,severity:`error`,closable:!1,"data-testid":`unlock-error`},{default:i(()=>[C(w(q.value),1)]),_:1})):v(``,!0),Q.value?(m(),T(a(O),{key:2,severity:`info`,closable:!1,class:`machine-warning`},{default:i(()=>[C(w(a(H)(`unlockPage.machineWarning`)),1)]),_:1})):v(``,!0),f(a(D),{type:`submit`,"data-testid":`unlock-submit-btn`,label:J.value?a(H)(`unlockPage.pleaseWait`):Q.value?a(H)(`unlockPage.configure`):a(H)(`unlockPage.unlock`),disabled:J.value||!G.value,loading:J.value,fluid:``},null,8,[`label`,`disabled`,`loading`])],32)]),_:1}),f(j)]))}}),[[`__scopeId`,`data-v-b06081cf`]]);export{V as default};
@@ -1 +1 @@
1
- import{$r as e,At as t,Bn as n,Ci as r,Di as i,In as a,Ji as o,Jr as s,Ni as ee,Qi as c,Sa as l,Ui as te,Wi as u,Xr as d,bi as f,ci as p,ea as m,ei as h,gn as g,ji as _,ln as v,mn as y,ni as b,pa as x,ri as S,si as ne,ta as C,ti as w,ui as T,un as E,vn as re}from"./index-Bdr5knDo.js";import{t as D}from"./message-QiLCZQ6U.js";import{n as ie,t as ae}from"./column-_TAitU2u.js";import{n as oe,t as se}from"./autocomplete--65VKbBs.js";import{t as O}from"./uuid-aTVnbu2y.js";var k={key:0,class:`env-badge`},A={class:`env-badge__name`},ce=y(T({__name:`EnvironmentBadge`,props:{environmentId:{}},setup(n){let r=n,i=t(),a=e(()=>i.getById(r.environmentId));function o(e){if(e)return e.startsWith(`#`)?e:`#${e}`}return(e,t)=>a.value?(_(),S(`span`,k,[h(`span`,{class:`env-badge__swatch`,style:m({backgroundColor:o(a.value.bgColor)||o(a.value.color)||`var(--p-primary-color)`})},null,4),h(`span`,A,C(a.value.name),1)])):b(``,!0)}}),[[`__scopeId`,`data-v-b70e647b`]]),j={class:`key-row`},M={class:`expansion-field expansion-field--key`},le=[`for`],ue={key:2,class:`value-display`},de={key:0,class:`expansion-field expansion-field--toggle`},fe={class:`expansion-label`,for:`varrow-secret`},pe={key:1,class:`expansion-field expansion-field--toggle`},me=[`title`],he={key:2,class:`key-row-delete`},ge={key:0,class:`not-secret-warning`},_e={class:`expansion-section`},N={class:`section-title`},ve={class:`section-fields`},ye={class:`expansion-field expansion-field--prepost`},P={class:`expansion-label`,for:`varrow-prefix`},F={key:1,class:`value-display`},be={class:`expansion-field expansion-field--value`},xe=[`for`],I={key:0,class:`secret-input-wrap`},L=[`disabled`],R=[`title`],Se={key:1,class:`value-display value-display--with-actions`},Ce={key:0,class:`value-actions`},we={key:0},z={key:1},Te={class:`expansion-field expansion-field--prepost`},B={class:`expansion-label`,for:`varrow-suffix`},Ee={key:1,class:`value-display`},De={key:0,class:`preview-value`},Oe={key:0,class:`prepost-part prepost-part--pre`},ke={key:1,class:`prepost-part prepost-part--interpolation`},Ae={class:`prepost-part--value prepost-resolved-inline`},je=[`title`],Me={key:2,class:`prepost-part prepost-part--value`},Ne={key:3,class:`prepost-part prepost-part--post`},Pe={key:1,class:`expansion-section`},Fe={class:`section-header`},Ie={class:`section-title`},Le={class:`section-fields`},Re={class:`expansion-field expansion-field--prepost`},ze={class:`expansion-label`,for:`varrow-override-prefix`},Be={class:`expansion-field expansion-field--value`},V=[`for`],Ve={key:0,class:`secret-input-wrap`},He=[`disabled`],Ue=[`title`],We={class:`expansion-field expansion-field--prepost`},Ge={class:`expansion-label`,for:`varrow-override-suffix`},Ke={key:1,class:`override-view`},qe={key:0,class:`value-display--with-actions`},Je={class:`value-actions`},Ye={key:0,class:`override-value-masked`},Xe={key:1,class:`override-value`},Ze={key:1,class:`override-value`},Qe={key:1,class:`override-empty`},$e={key:0,class:`preview-value preview-value--override`},et={key:0,class:`prepost-part prepost-part--pre`},tt={key:1,class:`prepost-part prepost-part--interpolation`},nt={key:0,class:`prepost-part--value prepost-resolved-inline`},rt={key:2,class:`prepost-part prepost-part--value`},it={key:3,class:`prepost-part prepost-part--post`},at=y(T({__name:`VariableRowEditor`,props:{environmentId:{},variableId:{},overrides:{},editable:{type:Boolean,default:!0},showOverrides:{type:Boolean,default:!1},canEditSource:{type:Boolean,default:!1},showDelete:{type:Boolean,default:!0},showOverrideBadge:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},resolvedEnv:{default:()=>({})},autocompleteEnabled:{type:Boolean,default:!1},autocompleteSuggestions:{default:()=>[]},autocompleteMeta:{default:()=>({})},isPending:{type:Boolean,default:!1}},emits:[`deleted`,`saved`,`autocomplete-search`,`override-changed`,`edit-source`],setup(r,{emit:o}){let ee=/^\{\{(.+)\}\}$/,te=/^\{\{environment\.(.+)\}\}$/,f=r,m=o,g=t(),y=a(),{t:T}=n(),D=x(!1),ie=x(!1),ae=x(!1),O=x(!1),k=x(!1),A=x(null);function ce(e,t){navigator.clipboard.writeText(t),A.value=e,setTimeout(()=>{A.value===e&&(A.value=null)},1500)}let at=e(()=>g.getById(f.environmentId)?.variables?.[f.variableId]),H=x(``),U=x(``),W=x(``),G=x(``),K=x(!1),ot=x(!1),st=e(()=>Q(U.value)),q=e(()=>K.value&&!st.value);function ct(){let e=at.value;H.value=e?.key??``,U.value=e?.value?.value??``,W.value=e?.value?.pre??``,G.value=e?.value?.post??``,K.value=e?.value?.isSecret??!1,ot.value=e?.value?.injectIntoAi??!1}i(ct),u(at,(e,t)=>{!t&&e&&ct()});let J=e(()=>f.overrides[f.variableId]??null),Y=x(``),X=x(``),Z=x(``);function lt(){let e=J.value;Y.value=e?.pre??``,X.value=e?.value??``,Z.value=e?.post??``}i(lt),u(J,lt);function Q(e){return ee.test(e)}function ut(e){let t=e.match(ee);return t?t[1].replace(/^environment\./,``):e}function dt(e){let t=e.match(te);return t?f.resolvedEnv[t[1]]??null:null}function ft(e){let t=e.value;H.value=t,U.value=`{{environment.${t}}}`,K.value=!1;let n=f.autocompleteMeta?.[t];n&&(W.value=n.pre,G.value=n.post),$()}async function $(){if(D.value)return;let e=H.value.trim();if(e){D.value=!0;try{await g.upsertVariable(f.environmentId,f.variableId,{key:e,value:{value:U.value,pre:W.value,post:G.value,isSecret:q.value,injectIntoAi:ot.value}}),f.isPending&&m(`saved`)}catch(e){y.add({severity:`error`,summary:T(`common.error`),detail:e.message??T(`variableRowEditor.saveError`),life:4e3})}finally{D.value=!1}}}async function pt(){if(f.isPending){m(`deleted`);return}D.value=!0;try{J.value&&await g.removeOverride(f.variableId),await g.removeVariable(f.environmentId,f.variableId),m(`deleted`)}catch(e){y.add({severity:`error`,summary:T(`common.error`),detail:e.message??T(`variableRowEditor.deleteError`),life:4e3})}finally{D.value=!1}}async function mt(){let e=Y.value||X.value||Z.value;try{if(!e){J.value&&(await g.removeOverride(f.variableId),m(`override-changed`));return}await g.setOverride(f.variableId,{value:{value:X.value,pre:Y.value,post:Z.value,isSecret:q.value}}),m(`override-changed`)}catch(e){y.add({severity:`error`,summary:T(`common.error`),detail:e.message??T(`variableRowEditor.overrideError`),life:4e3})}}async function ht(){try{await g.removeOverride(f.variableId),m(`override-changed`)}catch(e){y.add({severity:`error`,summary:T(`common.error`),detail:e.message??T(`variableRowEditor.clearOverrideError`),life:4e3})}}function gt(e){let t=e.relatedTarget;(!t||!e.currentTarget.contains(t))&&$()}return(e,t)=>(_(),S(`div`,{class:`expansion-form`,onFocusout:gt},[h(`div`,j,[h(`div`,M,[h(`label`,{class:`expansion-label`,for:r.editable&&r.autocompleteEnabled?`varrow-key-ac`:`varrow-key-input`},C(l(T)(`common.key`)),9,le),r.editable&&r.autocompleteEnabled?(_(),w(l(se),{key:0,"input-id":`varrow-key-ac`,modelValue:H.value,"onUpdate:modelValue":t[0]||=e=>H.value=e,suggestions:r.autocompleteSuggestions,placeholder:l(T)(`variableRowEditor.variableNamePlaceholder`),class:`w-full`,disabled:r.disabled,onComplete:t[1]||=e=>m(`autocomplete-search`,e.query),onItemSelect:ft,onBlur:$},null,8,[`modelValue`,`suggestions`,`placeholder`,`disabled`])):r.editable?(_(),w(l(E),{key:1,id:`varrow-key-input`,modelValue:H.value,"onUpdate:modelValue":t[2]||=e=>H.value=e,placeholder:l(T)(`variableRowEditor.variableNamePlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:$},null,8,[`modelValue`,`placeholder`,`disabled`])):(_(),S(`code`,ue,C(H.value),1))]),r.editable&&!st.value?(_(),S(`div`,de,[h(`label`,fe,C(l(T)(`variableRowEditor.secret`)),1),p(l(oe),{"input-id":`varrow-secret`,modelValue:K.value,"onUpdate:modelValue":[t[3]||=e=>K.value=e,$],disabled:r.disabled},null,8,[`modelValue`,`disabled`])])):b(``,!0),r.editable?(_(),S(`div`,pe,[h(`label`,{class:`expansion-label`,for:`varrow-injectai`,title:l(T)(`variableRowEditor.injectIntoAiHint`)},C(l(T)(`variableRowEditor.injectIntoAi`)),9,me),p(l(oe),{"input-id":`varrow-injectai`,modelValue:ot.value,"onUpdate:modelValue":[t[4]||=e=>ot.value=e,$],disabled:r.disabled},null,8,[`modelValue`,`disabled`])])):b(``,!0),r.showDelete&&r.editable?(_(),S(`div`,he,[p(l(re),{icon:`pi pi-trash`,severity:`danger`,text:``,rounded:``,size:`small`,disabled:r.disabled||D.value,onClick:pt},null,8,[`disabled`])])):b(``,!0)]),r.editable&&!K.value&&!Q(U.value)?(_(),S(`div`,ge,[t[26]||=h(`i`,{class:`pi pi-info-circle`},null,-1),h(`span`,null,C(l(T)(`variableRowEditor.notSecretWarning`)),1)])):b(``,!0),h(`div`,_e,[h(`div`,N,C(l(T)(`variableRowEditor.value`)),1),h(`div`,ve,[h(`div`,ye,[h(`label`,P,C(l(T)(`variableRowEditor.prefix`)),1),r.editable?(_(),w(l(E),{key:0,id:`varrow-prefix`,modelValue:W.value,"onUpdate:modelValue":t[5]||=e=>W.value=e,placeholder:l(T)(`variableRowEditor.prefixPlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:$},null,8,[`modelValue`,`placeholder`,`disabled`])):(_(),S(`code`,F,C(W.value||`—`),1))]),h(`div`,be,[h(`label`,{class:`expansion-label`,for:q.value?`varrow-value-secret`:`varrow-value-plain`},C(l(T)(`variableRowEditor.value`)),9,xe),r.editable?(_(),S(d,{key:0},[q.value?(_(),S(`div`,I,[p(l(E),{id:`varrow-value-secret`,modelValue:U.value,"onUpdate:modelValue":t[6]||=e=>U.value=e,type:O.value?`text`:`password`,placeholder:l(T)(`variableRowEditor.valuePlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:$},null,8,[`modelValue`,`type`,`placeholder`,`disabled`]),h(`button`,{type:`button`,class:`secret-toggle`,disabled:r.disabled,onClick:t[7]||=e=>O.value=!O.value,tabindex:`-1`},[h(`i`,{class:c(O.value?`pi pi-eye-slash`:`pi pi-eye`)},null,2)],8,L)])):Q(U.value)&&!ie.value?(_(),S(`span`,{key:1,class:`interpolation-badge`,title:U.value,onClick:t[8]||=e=>ie.value=!0},[p(l(v),{severity:`secondary`,value:ut(U.value)},null,8,[`value`]),t[27]||=h(`i`,{class:`pi pi-pencil interpolation-edit-icon`},null,-1)],8,R)):(_(),w(l(E),{key:2,id:`varrow-value-plain`,modelValue:U.value,"onUpdate:modelValue":t[9]||=e=>U.value=e,placeholder:l(T)(`variableRowEditor.valuePlaceholder`),class:`w-full`,disabled:r.disabled,onFocus:t[10]||=e=>ie.value=!0,onBlur:t[11]||=e=>{ie.value=!1,$()}},null,8,[`modelValue`,`placeholder`,`disabled`]))],64)):(_(),S(`span`,Se,[U.value?(_(),S(`span`,Ce,[q.value?(_(),S(`i`,{key:0,class:c([O.value?`pi pi-eye-slash`:`pi pi-eye`,`action-icon`]),onClick:t[12]||=e=>O.value=!O.value},null,2)):b(``,!0),h(`i`,{class:c([A.value===`val`?`pi pi-check`:`pi pi-copy`,`action-icon`]),onClick:t[13]||=e=>ce(`val`,W.value+U.value+G.value)},null,2)])):b(``,!0),Q(U.value)?(_(),w(l(v),{key:1,severity:`secondary`,value:ut(U.value)},null,8,[`value`])):q.value?(_(),S(d,{key:2},[O.value?(_(),S(`span`,z,C(U.value),1)):(_(),S(`span`,we,`***`))],64)):(_(),S(d,{key:3},[ne(C(U.value),1)],64))]))]),h(`div`,Te,[h(`label`,B,C(l(T)(`variableRowEditor.suffix`)),1),r.editable?(_(),w(l(E),{key:0,id:`varrow-suffix`,modelValue:G.value,"onUpdate:modelValue":t[14]||=e=>G.value=e,placeholder:l(T)(`variableRowEditor.suffixPlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:$},null,8,[`modelValue`,`placeholder`,`disabled`])):(_(),S(`code`,Ee,C(G.value||`—`),1))])]),q.value?b(``,!0):(_(),S(`code`,De,[W.value?(_(),S(`span`,Oe,C(W.value),1)):b(``,!0),Q(U.value)?(_(),S(`span`,ke,[dt(U.value)==null?(_(),S(d,{key:1},[p(l(v),{severity:`secondary`,value:ut(U.value),style:{"font-size":`0.7rem`}},null,8,[`value`]),t[28]||=h(`span`,{class:`prepost-unresolved`},`(?)`,-1)],64)):(_(),S(d,{key:0},[h(`span`,Ae,C(dt(U.value)),1),r.canEditSource?(_(),S(`i`,{key:0,class:`pi pi-pencil edit-source-icon`,title:l(T)(`variablesTable.editParentTitle`),onClick:t[15]||=s(e=>m(`edit-source`),[`stop`])},null,8,je)):b(``,!0)],64))])):(_(),S(`span`,Me,C(U.value||`…`),1)),G.value?(_(),S(`span`,Ne,C(G.value),1)):b(``,!0)]))]),r.showOverrides&&H.value?.trim()?(_(),S(`div`,Pe,[h(`div`,Fe,[h(`div`,Ie,C(l(T)(`variableRowEditor.localOverride`)),1),r.editable&&J.value?(_(),w(l(re),{key:0,icon:`pi pi-times`,text:``,rounded:``,size:`small`,severity:`danger`,title:l(T)(`variableRowEditor.clearOverride`),disabled:r.disabled,onClick:ht},null,8,[`title`,`disabled`])):b(``,!0)]),h(`div`,Le,[r.editable?(_(),S(d,{key:0},[h(`div`,Re,[h(`label`,ze,C(l(T)(`variableRowEditor.prefix`)),1),p(l(E),{id:`varrow-override-prefix`,modelValue:Y.value,"onUpdate:modelValue":t[16]||=e=>Y.value=e,placeholder:l(T)(`variableRowEditor.prefixPlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:mt},null,8,[`modelValue`,`placeholder`,`disabled`])]),h(`div`,Be,[h(`label`,{class:`expansion-label`,for:q.value?`varrow-override-value-secret`:`varrow-override-value-plain`},C(l(T)(`variableRowEditor.value`)),9,V),q.value?(_(),S(`div`,Ve,[p(l(E),{id:`varrow-override-value-secret`,modelValue:X.value,"onUpdate:modelValue":t[17]||=e=>X.value=e,type:k.value?`text`:`password`,placeholder:l(T)(`variableRowEditor.overrideValuePlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:mt},null,8,[`modelValue`,`type`,`placeholder`,`disabled`]),h(`button`,{type:`button`,class:`secret-toggle`,disabled:r.disabled,onClick:t[18]||=e=>k.value=!k.value,tabindex:`-1`},[h(`i`,{class:c(k.value?`pi pi-eye-slash`:`pi pi-eye`)},null,2)],8,He)])):Q(X.value)&&!ae.value?(_(),S(`span`,{key:1,class:`interpolation-badge`,title:X.value,onClick:t[19]||=e=>ae.value=!0},[p(l(v),{severity:`secondary`,value:ut(X.value)},null,8,[`value`]),t[29]||=h(`i`,{class:`pi pi-pencil interpolation-edit-icon`},null,-1)],8,Ue)):(_(),w(l(E),{key:2,id:`varrow-override-value-plain`,modelValue:X.value,"onUpdate:modelValue":t[20]||=e=>X.value=e,placeholder:l(T)(`variableRowEditor.overrideValuePlaceholder`),class:`w-full`,disabled:r.disabled,onFocus:t[21]||=e=>ae.value=!0,onBlur:t[22]||=e=>{ae.value=!1,mt()}},null,8,[`modelValue`,`placeholder`,`disabled`]))]),h(`div`,We,[h(`label`,Ge,C(l(T)(`variableRowEditor.suffix`)),1),p(l(E),{id:`varrow-override-suffix`,modelValue:Z.value,"onUpdate:modelValue":t[23]||=e=>Z.value=e,placeholder:l(T)(`variableRowEditor.suffixPlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:mt},null,8,[`modelValue`,`placeholder`,`disabled`])])],64)):(_(),S(`div`,Ke,[J.value?(_(),S(`span`,qe,[h(`span`,Je,[q.value||J.value.isSecret?(_(),S(`i`,{key:0,class:c([k.value?`pi pi-eye-slash`:`pi pi-eye`,`action-icon`]),onClick:t[24]||=e=>k.value=!k.value},null,2)):b(``,!0),h(`i`,{class:c([A.value===`ovr`?`pi pi-check`:`pi pi-copy`,`action-icon`]),onClick:t[25]||=e=>ce(`ovr`,J.value.pre+J.value.value+J.value.post)},null,2)]),q.value||J.value.isSecret?(_(),S(d,{key:0},[k.value?(_(),S(`code`,Xe,C(J.value.pre)+C(J.value.value)+C(J.value.post),1)):(_(),S(`span`,Ye,`***`))],64)):(_(),S(`code`,Ze,C(J.value.pre)+C(J.value.value)+C(J.value.post),1))])):(_(),S(`span`,Qe,`—`))]))]),r.editable&&!q.value&&(Y.value||X.value||Z.value)?(_(),S(`code`,$e,[Y.value?(_(),S(`span`,et,C(Y.value),1)):b(``,!0),Q(X.value)?(_(),S(`span`,tt,[dt(X.value)==null?(_(),S(d,{key:1},[p(l(v),{severity:`secondary`,value:ut(X.value),style:{"font-size":`0.7rem`}},null,8,[`value`]),t[30]||=h(`span`,{class:`prepost-unresolved`},`(?)`,-1)],64)):(_(),S(`span`,nt,C(dt(X.value)),1))])):(_(),S(`span`,rt,C(X.value||`…`),1)),Z.value?(_(),S(`span`,it,C(Z.value),1)):b(``,!0)])):b(``,!0)])):b(``,!0)],32))}}),[[`__scopeId`,`data-v-2a3078f4`]]),H={class:`table-toolbar`},U={key:0,class:`overrides-filter`},W={for:`overrides-filter`},G={class:`text-center py-4 text-gray-500`},K={class:`row-key-cell`},ot={class:`row-key-line`},st={class:`row-key`},q=[`title`],ct=[`title`],J={key:1,class:`resolved-from-line`},Y={class:`row-value`},X=[`title`,`onClick`],Z=[`title`,`onClick`],lt={key:1,class:`value-levels`},Q={class:`resolved-level`},ut={key:0,class:`secret-mask`},dt=[`title`],ft={key:0,class:`secret-mask`},$=[`title`],pt=[`title`],mt={key:6,class:`empty-value`},ht={key:0,class:`override-indicator`},gt=[`title`,`onClick`],_t=[`title`,`onClick`],vt={key:0,class:`override-value-masked`},yt=[`title`],bt=[`title`],xt={key:0,class:`parent-edit`},St={class:`parent-edit__field`},Ct={class:`parent-edit__label`,for:`parent-edit-value`},wt={class:`parent-edit__usages`},Tt={class:`parent-edit__usages-title`},Et={key:0,class:`parent-edit__usages-loading`},Dt={key:0,class:`parent-edit__usage-list`},Ot={class:`parent-edit__usage-env`},kt={key:0,class:`parent-edit__usage-svc`},At={key:1,class:`parent-edit__usages-empty`},jt=40,Mt=200,Nt=24,Pt=y(T({__name:`VariablesTable`,props:{environmentId:{},resolvedEnv:{default:()=>({})},sources:{default:()=>({})},editable:{type:Boolean,default:!0},showOverrides:{type:Boolean,default:!1},showOverrideBadge:{type:Boolean,default:!1},showDelete:{type:Boolean,default:!0},showAddButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autocompleteEnabled:{type:Boolean,default:!1},autocompleteSuggestions:{default:()=>[]},autocompleteMeta:{default:()=>({})},serviceBuiltins:{},scrollHeight:{default:`auto`}},emits:[`autocomplete-search`,`variables-changed`],setup(u,{emit:m}){let y=/^\{\{(.+)\}\}$/,T=/^\{\{environment\.(.+)\}\}$/,se={"service.HOST_LAN":`(agent LAN IP)`},k=u,A=m,{t:j}=n(),M=t(),le=e(()=>Object.keys(k.sources).length>0),ue=e(()=>Object.keys(k.resolvedEnv).length>0),de=te(`rootRef`),fe=x(null),pe=e(()=>k.scrollHeight===`auto`?fe.value??`460px`:k.scrollHeight);function me(){if(k.scrollHeight!==`auto`)return;let e=de.value;if(!e)return;let t=(e.querySelector(`.p-datatable-table-container`)??e).getBoundingClientRect().top,n=window.innerHeight-t-Nt;fe.value=`${Math.max(Mt,Math.round(n))}px`}let he=null;i(()=>{f(me),window.addEventListener(`resize`,me),typeof ResizeObserver<`u`&&de.value&&(he=new ResizeObserver(()=>me()),he.observe(document.body))}),r(()=>{window.removeEventListener(`resize`,me),he?.disconnect(),he=null});let ge=x(``),_e=x(!1),N=x({});async function ve(){if(k.showOverrides)try{let e=await M.getOverrides(),t={};for(let[n,r]of Object.entries(e)){let e=r;t[n]={value:e.value.value,pre:e.value.pre,post:e.value.post,isSecret:e.value.isSecret}}N.value=t}catch{}}i(ve);let ye=e(()=>M.getById(k.environmentId));function P(e){return ye.value?.variables?.[e]}let F=x([]),be=e(()=>{let e=Object.keys(ye.value?.variables??{}).map(e=>({variableId:e})),t=new Set(e.map(e=>e.variableId)),n=F.value.filter(e=>!t.has(e)).map(e=>({variableId:e}));return[...e,...n]}),xe=te(`tableRef`),I=x({}),L=x([]),R=x(new Set);function Se(e){let t=new Set(R.value);t.has(e)?t.delete(e):t.add(e),R.value=t}let Ce=x(null);function we(e,t){navigator.clipboard.writeText(t),Ce.value=e,setTimeout(()=>{Ce.value===e&&(Ce.value=null)},1500)}function z(e){let t=P(e);if(!t)return``;let n=t.value?.value??``;return V(n)?He(n)??n:(t.value?.pre??``)+n+(t.value?.post??``)}let Te=a(),B=x(null),Ee=x(!1),De=x(!1),Oe=x(!1),ke=0,Ae=x([]);async function je(e){let t=k.sources[e]?.resolvedFrom,n=P(e)?.value?.value??``;if(!t||!n)return;let r=Ve(n),i=M.getById(t.environmentId),a=Object.entries(i?.variables??{}).find(([,e])=>e.key===r);if(!a){Te.add({severity:`warn`,summary:j(`variablesTable.editParentNotFound`),life:4e3});return}let[o,s]=a;B.value={key:r,environmentId:t.environmentId,environmentName:t.environmentName,variableId:o,value:s.value?.value??``,pre:s.value?.pre??``,post:s.value?.post??``,isSecret:s.value?.isSecret??!1,injectIntoAi:s.value?.injectIntoAi??!1},Ae.value=[],Ee.value=!0,Me(r,t.environmentId)}async function Me(e,t){let n=++ke;Oe.value=!0;try{let r=M.currentProjectId;if(!r)return;let i=await M.keyUsages(r,e,t);if(n!==ke)return;Ae.value=[...i.inheritedBy.map(e=>({kind:`inherits`,environmentName:e.environmentName,...e.serviceName?{serviceName:e.serviceName}:{}})),...i.definedIn.map(e=>({kind:`defines`,environmentName:e.environmentName,...e.serviceName?{serviceName:e.serviceName}:{}})),...i.referencedBy.map(e=>({kind:`references`,environmentName:e.environmentName,...e.serviceName?{serviceName:e.serviceName}:{},viaKey:e.key}))]}catch{n===ke&&(Ae.value=[])}finally{n===ke&&(Oe.value=!1)}}async function Ne(){let e=B.value;if(e){De.value=!0;try{await M.upsertVariable(e.environmentId,e.variableId,{key:e.key,value:{value:e.value,pre:e.pre,post:e.post,isSecret:e.isSecret,injectIntoAi:e.injectIntoAi}}),Ee.value=!1,A(`variables-changed`)}catch(e){Te.add({severity:`error`,summary:j(`common.error`),detail:e.message,life:4e3})}finally{De.value=!1}}}function Pe(e){let t=N.value[e];return t?t.pre+t.value+t.post:``}let Fe=e(()=>{let e=[...be.value];if(_e.value&&(e=e.filter(e=>!!N.value[e.variableId])),ge.value.trim()){let t=ge.value.toLowerCase();e=e.filter(e=>{let n=P(e.variableId);if(!n)return!1;if(n.key.toLowerCase().includes(t)||(n.value?.value??``).toLowerCase().includes(t))return!0;let r=N.value[e.variableId];return!!(r&&r.value.toLowerCase().includes(t))})}return L.value.length>0?e.sort((e,t)=>{let n=L.value.indexOf(e.variableId),r=L.value.indexOf(t.variableId);return n===-1?1:r===-1?-1:n-r}):e.sort((e,t)=>{let n=P(e.variableId)?.key??``,r=P(t.variableId)?.key??``;return n?r?n.localeCompare(r):-1:1}),e});function Ie(e){let t=e.data.variableId;I.value[t]?(I.value={},L.value=[],Le(t)):(L.value=Fe.value.map(e=>e.variableId),I.value={[t]:!0})}function Le(e){f(()=>{let t=xe.value?.$el;if(!t)return;let n=Fe.value.findIndex(t=>t.variableId===e);n<0||t.querySelectorAll(`tbody tr[data-p-index]`)[n]?.scrollIntoView({block:`nearest`,behavior:`smooth`})})}function Re(e){F.value=F.value.filter(t=>t!==e),I.value[e]&&(I.value={},L.value=[])}function ze(e){F.value=F.value.filter(t=>t!==e)}function Be(){let e=O();F.value=[...F.value,e],L.value=[...be.value.map(e=>e.variableId),e],f(()=>{I.value={[e]:!0},f(()=>{let e=document.querySelector(`.variables-expand-table .p-datatable-row-expansion:last-of-type`);e&&e.scrollIntoView({block:`nearest`,behavior:`smooth`})})})}function V(e){return y.test(e)}function Ve(e){let t=e.match(y);return t?t[1].replace(/^(?:environment|service)\./,``):e}function He(e){let t=e.match(T);if(t)return k.resolvedEnv[t[1]]??null;let n=e.match(y);if(n){let e={...se,...k.serviceBuiltins};if(n[1]in e)return e[n[1]]}return null}function Ue(e){return e.length<=jt?e:e.substring(0,jt)+`…`}return(e,t)=>(_(),S(d,null,[h(`div`,{ref_key:`rootRef`,ref:de,class:`variables-table`},[h(`div`,H,[p(l(E),{modelValue:ge.value,"onUpdate:modelValue":t[0]||=e=>ge.value=e,placeholder:`Search variables...`,class:`search-input`,size:`small`},null,8,[`modelValue`]),u.showOverrides?(_(),S(`div`,U,[p(l(oe),{modelValue:_e.value,"onUpdate:modelValue":t[1]||=e=>_e.value=e,"input-id":`overrides-filter`},null,8,[`modelValue`]),h(`label`,W,C(l(j)(`variablesTable.overriddenOnly`)),1)])):b(``,!0)]),p(l(ie),{ref_key:`tableRef`,ref:xe,"expanded-rows":I.value,"onUpdate:expandedRows":t[5]||=e=>I.value=e,value:Fe.value,"data-key":`variableId`,class:`p-datatable-sm variables-expand-table`,scrollable:``,"scroll-height":pe.value,onRowClick:Ie},{empty:o(()=>[h(`div`,G,C(u.showAddButton?l(j)(`variablesTable.empty`):l(j)(`variablesTable.emptyReadonly`)),1)]),expansion:o(({data:e})=>[p(at,{"environment-id":u.environmentId,"variable-id":e.variableId,overrides:N.value,editable:u.editable,"show-overrides":u.showOverrides,"show-delete":u.showDelete,"show-override-badge":u.showOverrideBadge,disabled:u.disabled,"resolved-env":u.resolvedEnv,"autocomplete-enabled":u.autocompleteEnabled,"autocomplete-suggestions":u.autocompleteSuggestions,"autocomplete-meta":u.autocompleteMeta,"is-pending":F.value.includes(e.variableId),onDeleted:t=>Re(e.variableId),onSaved:t=>ze(e.variableId),onAutocompleteSearch:t[4]||=e=>A(`autocomplete-search`,e),onOverrideChanged:ve,"can-edit-source":!!u.sources[e.variableId]?.resolvedFrom,onEditSource:t=>je(e.variableId)},null,8,[`environment-id`,`variable-id`,`overrides`,`editable`,`show-overrides`,`show-delete`,`show-override-badge`,`disabled`,`resolved-env`,`autocomplete-enabled`,`autocomplete-suggestions`,`autocomplete-meta`,`is-pending`,`onDeleted`,`onSaved`,`can-edit-source`,`onEditSource`])]),default:o(()=>[p(l(ae),{expander:``,style:{width:`2.5rem`}}),p(l(ae),{field:`variableId`,header:l(j)(`common.key`)},{body:o(({data:e})=>[h(`div`,K,[h(`span`,ot,[h(`code`,st,C(P(e.variableId)?.key||`(new variable)`),1),u.sources[e.variableId]?.overriddenBy?(_(),S(`span`,{key:0,class:`overridden-badge overridden-badge--local`,title:l(j)(`variablesTable.localOverrideTooltip`,{env:u.sources[e.variableId].overriddenBy.environmentName})},[t[9]||=h(`i`,{class:`pi pi-desktop`},null,-1),ne(` `+C(l(j)(`variablesTable.localOverride`)),1)],8,q)):u.showOverrideBadge&&u.sources[e.variableId]?.overridden&&!V(P(e.variableId)?.value?.value??``)?(_(),S(`span`,{key:1,class:`overridden-badge`,title:l(j)(`variablesTable.overrideTooltip`)},[t[10]||=h(`i`,{class:`pi pi-exclamation-triangle`},null,-1),ne(` `+C(l(j)(`variablesTable.override`)),1)],8,ct)):b(``,!0)]),le.value&&u.sources[e.variableId]?(_(),w(ce,{key:0,"environment-id":u.sources[e.variableId].environmentId,class:`source-badge`},null,8,[`environment-id`])):b(``,!0),le.value&&u.sources[e.variableId]?.resolvedFrom?(_(),S(`span`,J,[t[11]||=h(`i`,{class:`pi pi-arrow-right resolved-from-arrow`},null,-1),p(ce,{"environment-id":u.sources[e.variableId].resolvedFrom.environmentId,class:`source-badge`},null,8,[`environment-id`])])):b(``,!0)])]),_:1},8,[`header`]),p(l(ae),{header:l(j)(`common.value`)},{body:o(({data:e})=>[h(`span`,Y,[z(e.variableId)?(_(),S(`span`,{key:0,class:`value-actions`,onClick:t[2]||=s(()=>{},[`stop`])},[P(e.variableId)?.value?.isSecret?(_(),S(`i`,{key:0,class:c([R.value.has(e.variableId)?`pi pi-eye-slash`:`pi pi-eye`,`action-icon`]),title:l(j)(`variablesTable.reveal`),onClick:t=>Se(e.variableId)},null,10,X)):b(``,!0),h(`i`,{class:c([Ce.value===e.variableId?`pi pi-check`:`pi pi-copy`,`action-icon`]),title:l(j)(`actions.copy`),onClick:t=>we(e.variableId,z(e.variableId))},null,10,Z)])):b(``,!0),V(P(e.variableId)?.value?.value??``)&&He(P(e.variableId)?.value?.value??``)!=null?(_(),S(`span`,lt,[p(l(v),{severity:`secondary`,value:Ve(P(e.variableId)?.value?.value??``),class:`interpolation-hint-tag`},null,8,[`value`]),h(`span`,Q,[P(e.variableId)?.value?.isSecret&&!R.value.has(e.variableId)?(_(),S(`span`,ut,`***`)):(_(),S(`code`,{key:1,class:`resolved-final`,title:He(P(e.variableId)?.value?.value??``)},C(Ue(He(P(e.variableId)?.value?.value??``))),9,dt))])])):V(P(e.variableId)?.value?.value??``)&&ue.value&&He(P(e.variableId)?.value?.value??``)==null?(_(),S(d,{key:2},[t[12]||=h(`i`,{class:`pi pi-exclamation-triangle unresolved-icon`},null,-1),p(l(v),{severity:`secondary`,value:Ve(P(e.variableId)?.value?.value??``)},null,8,[`value`]),t[13]||=h(`span`,{class:`unresolved-msg`},`Variable not found in this environment`,-1)],64)):V(P(e.variableId)?.value?.value??``)?(_(),w(l(v),{key:3,severity:`secondary`,value:Ve(P(e.variableId)?.value?.value??``)},null,8,[`value`])):P(e.variableId)?.value?.isSecret?(_(),S(d,{key:4},[R.value.has(e.variableId)?(_(),S(`code`,{key:1,title:z(e.variableId)},C(Ue(z(e.variableId))),9,$)):(_(),S(`span`,ft,`***`))],64)):P(e.variableId)?.value?.value||P(e.variableId)?.value?.pre||P(e.variableId)?.value?.post?(_(),S(`code`,{key:5,title:z(e.variableId)},C(Ue(z(e.variableId))),9,pt)):(_(),S(`span`,mt,`(empty)`))]),u.showOverrides&&!V(P(e.variableId)?.value?.value??``)&&N.value[e.variableId]?(_(),S(`span`,ht,[t[14]||=h(`i`,{class:`pi pi-arrow-right`,style:{"font-size":`0.7rem`}},null,-1),h(`span`,{class:`value-actions`,onClick:t[3]||=s(()=>{},[`stop`])},[P(e.variableId)?.value?.isSecret||N.value[e.variableId].isSecret?(_(),S(`i`,{key:0,class:c([R.value.has(`ovr:`+e.variableId)?`pi pi-eye-slash`:`pi pi-eye`,`action-icon`]),title:l(j)(`variablesTable.reveal`),onClick:t=>Se(`ovr:`+e.variableId)},null,10,gt)):b(``,!0),h(`i`,{class:c([Ce.value===`ovr:`+e.variableId?`pi pi-check`:`pi pi-copy`,`action-icon`]),title:l(j)(`actions.copy`),onClick:t=>we(`ovr:`+e.variableId,Pe(e.variableId))},null,10,_t)]),P(e.variableId)?.value?.isSecret||N.value[e.variableId].isSecret?(_(),S(d,{key:0},[R.value.has(`ovr:`+e.variableId)?(_(),S(`code`,{key:1,class:`override-value`,title:Pe(e.variableId)},C(Ue(Pe(e.variableId))),9,yt)):(_(),S(`span`,vt,`***`))],64)):(_(),S(`code`,{key:1,class:`override-value`,title:Pe(e.variableId)},C(Ue(Pe(e.variableId))),9,bt))])):b(``,!0)]),_:1},8,[`header`])]),_:1},8,[`expanded-rows`,`value`,`scroll-height`]),u.showAddButton?(_(),w(l(re),{key:0,type:`button`,label:l(j)(`variablesTable.addVariable`),icon:`pi pi-plus`,text:``,disabled:u.disabled,class:`mt-3`,onClick:Be},null,8,[`label`,`disabled`])):b(``,!0)],512),p(l(g),{visible:Ee.value,"onUpdate:visible":t[8]||=e=>Ee.value=e,modal:``,header:l(j)(`variablesTable.editParentHeader`),style:{width:`38rem`,maxWidth:`95vw`}},{footer:o(()=>[p(l(re),{label:l(j)(`common.cancel`),text:``,disabled:De.value,onClick:t[7]||=e=>Ee.value=!1},null,8,[`label`,`disabled`]),p(l(re),{label:l(j)(`variablesTable.editParentConfirm`),severity:`warn`,loading:De.value,onClick:Ne},null,8,[`label`,`loading`])]),default:o(()=>[B.value?(_(),S(`div`,xt,[p(l(D),{severity:`warn`,closable:!1,class:`parent-edit__warning`},{default:o(()=>[ne(C(l(j)(`variablesTable.editParentWarning`,{key:B.value.key,env:B.value.environmentName})),1)]),_:1}),h(`div`,St,[h(`label`,Ct,C(l(j)(`common.value`)),1),p(l(E),{id:`parent-edit-value`,modelValue:B.value.value,"onUpdate:modelValue":t[6]||=e=>B.value.value=e,class:`w-full`,disabled:De.value},null,8,[`modelValue`,`disabled`])]),h(`div`,wt,[h(`div`,Tt,[t[15]||=h(`i`,{class:`pi pi-sitemap`},null,-1),ne(` `+C(l(j)(`variablesTable.editParentImpact`)),1)]),Oe.value?(_(),S(`div`,Et,[t[16]||=h(`i`,{class:`pi pi-spin pi-spinner`},null,-1),h(`span`,null,C(l(j)(`variablesTable.editParentLoading`)),1)])):(_(),S(d,{key:1},[Ae.value.length?(_(),S(`ul`,Dt,[(_(!0),S(d,null,ee(Ae.value,(e,t)=>(_(),S(`li`,{key:t},[p(l(v),{severity:e.kind===`references`?`info`:`secondary`,value:e.kind===`references`?e.viaKey:e.kind===`inherits`?l(j)(`variablesTable.editParentInherits`):l(j)(`variablesTable.editParentDefines`)},null,8,[`severity`,`value`]),h(`span`,Ot,C(e.environmentName),1),e.serviceName?(_(),S(`span`,kt,C(e.serviceName),1)):b(``,!0)]))),128))])):(_(),S(`div`,At,C(l(j)(`variablesTable.editParentNoUsage`)),1))],64))])])):b(``,!0)]),_:1},8,[`visible`,`header`])],64))}}),[[`__scopeId`,`data-v-5af35db0`]]);export{ce as n,Pt as t};
1
+ import{$r as e,At as t,Bn as n,Ci as r,Di as i,In as a,Ji as o,Jr as s,Ni as ee,Qi as c,Sa as l,Ui as te,Wi as u,Xr as d,bi as f,ci as p,ea as m,ei as h,gn as g,ji as _,ln as v,mn as y,ni as b,pa as x,ri as S,si as ne,ta as C,ti as w,ui as T,un as E,vn as re}from"./index-BIjjyvxm.js";import{t as D}from"./message-Cgzl10yY.js";import{n as ie,t as ae}from"./column-DFi06tD3.js";import{n as oe,t as se}from"./autocomplete-BIqGkkg7.js";import{t as O}from"./uuid-aTVnbu2y.js";var k={key:0,class:`env-badge`},A={class:`env-badge__name`},ce=y(T({__name:`EnvironmentBadge`,props:{environmentId:{}},setup(n){let r=n,i=t(),a=e(()=>i.getById(r.environmentId));function o(e){if(e)return e.startsWith(`#`)?e:`#${e}`}return(e,t)=>a.value?(_(),S(`span`,k,[h(`span`,{class:`env-badge__swatch`,style:m({backgroundColor:o(a.value.bgColor)||o(a.value.color)||`var(--p-primary-color)`})},null,4),h(`span`,A,C(a.value.name),1)])):b(``,!0)}}),[[`__scopeId`,`data-v-b70e647b`]]),j={class:`key-row`},M={class:`expansion-field expansion-field--key`},le=[`for`],ue={key:2,class:`value-display`},de={key:0,class:`expansion-field expansion-field--toggle`},fe={class:`expansion-label`,for:`varrow-secret`},pe={key:1,class:`expansion-field expansion-field--toggle`},me=[`title`],he={key:2,class:`key-row-delete`},ge={key:0,class:`not-secret-warning`},_e={class:`expansion-section`},N={class:`section-title`},ve={class:`section-fields`},ye={class:`expansion-field expansion-field--prepost`},P={class:`expansion-label`,for:`varrow-prefix`},F={key:1,class:`value-display`},be={class:`expansion-field expansion-field--value`},xe=[`for`],I={key:0,class:`secret-input-wrap`},L=[`disabled`],R=[`title`],Se={key:1,class:`value-display value-display--with-actions`},Ce={key:0,class:`value-actions`},we={key:0},z={key:1},Te={class:`expansion-field expansion-field--prepost`},B={class:`expansion-label`,for:`varrow-suffix`},Ee={key:1,class:`value-display`},De={key:0,class:`preview-value`},Oe={key:0,class:`prepost-part prepost-part--pre`},ke={key:1,class:`prepost-part prepost-part--interpolation`},Ae={class:`prepost-part--value prepost-resolved-inline`},je=[`title`],Me={key:2,class:`prepost-part prepost-part--value`},Ne={key:3,class:`prepost-part prepost-part--post`},Pe={key:1,class:`expansion-section`},Fe={class:`section-header`},Ie={class:`section-title`},Le={class:`section-fields`},Re={class:`expansion-field expansion-field--prepost`},ze={class:`expansion-label`,for:`varrow-override-prefix`},Be={class:`expansion-field expansion-field--value`},V=[`for`],Ve={key:0,class:`secret-input-wrap`},He=[`disabled`],Ue=[`title`],We={class:`expansion-field expansion-field--prepost`},Ge={class:`expansion-label`,for:`varrow-override-suffix`},Ke={key:1,class:`override-view`},qe={key:0,class:`value-display--with-actions`},Je={class:`value-actions`},Ye={key:0,class:`override-value-masked`},Xe={key:1,class:`override-value`},Ze={key:1,class:`override-value`},Qe={key:1,class:`override-empty`},$e={key:0,class:`preview-value preview-value--override`},et={key:0,class:`prepost-part prepost-part--pre`},tt={key:1,class:`prepost-part prepost-part--interpolation`},nt={key:0,class:`prepost-part--value prepost-resolved-inline`},rt={key:2,class:`prepost-part prepost-part--value`},it={key:3,class:`prepost-part prepost-part--post`},at=y(T({__name:`VariableRowEditor`,props:{environmentId:{},variableId:{},overrides:{},editable:{type:Boolean,default:!0},showOverrides:{type:Boolean,default:!1},canEditSource:{type:Boolean,default:!1},showDelete:{type:Boolean,default:!0},showOverrideBadge:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},resolvedEnv:{default:()=>({})},autocompleteEnabled:{type:Boolean,default:!1},autocompleteSuggestions:{default:()=>[]},autocompleteMeta:{default:()=>({})},isPending:{type:Boolean,default:!1}},emits:[`deleted`,`saved`,`autocomplete-search`,`override-changed`,`edit-source`],setup(r,{emit:o}){let ee=/^\{\{(.+)\}\}$/,te=/^\{\{environment\.(.+)\}\}$/,f=r,m=o,g=t(),y=a(),{t:T}=n(),D=x(!1),ie=x(!1),ae=x(!1),O=x(!1),k=x(!1),A=x(null);function ce(e,t){navigator.clipboard.writeText(t),A.value=e,setTimeout(()=>{A.value===e&&(A.value=null)},1500)}let at=e(()=>g.getById(f.environmentId)?.variables?.[f.variableId]),H=x(``),U=x(``),W=x(``),G=x(``),K=x(!1),ot=x(!1),st=e(()=>Q(U.value)),q=e(()=>K.value&&!st.value);function ct(){let e=at.value;H.value=e?.key??``,U.value=e?.value?.value??``,W.value=e?.value?.pre??``,G.value=e?.value?.post??``,K.value=e?.value?.isSecret??!1,ot.value=e?.value?.injectIntoAi??!1}i(ct),u(at,(e,t)=>{!t&&e&&ct()});let J=e(()=>f.overrides[f.variableId]??null),Y=x(``),X=x(``),Z=x(``);function lt(){let e=J.value;Y.value=e?.pre??``,X.value=e?.value??``,Z.value=e?.post??``}i(lt),u(J,lt);function Q(e){return ee.test(e)}function ut(e){let t=e.match(ee);return t?t[1].replace(/^environment\./,``):e}function dt(e){let t=e.match(te);return t?f.resolvedEnv[t[1]]??null:null}function ft(e){let t=e.value;H.value=t,U.value=`{{environment.${t}}}`,K.value=!1;let n=f.autocompleteMeta?.[t];n&&(W.value=n.pre,G.value=n.post),$()}async function $(){if(D.value)return;let e=H.value.trim();if(e){D.value=!0;try{await g.upsertVariable(f.environmentId,f.variableId,{key:e,value:{value:U.value,pre:W.value,post:G.value,isSecret:q.value,injectIntoAi:ot.value}}),f.isPending&&m(`saved`)}catch(e){y.add({severity:`error`,summary:T(`common.error`),detail:e.message??T(`variableRowEditor.saveError`),life:4e3})}finally{D.value=!1}}}async function pt(){if(f.isPending){m(`deleted`);return}D.value=!0;try{J.value&&await g.removeOverride(f.variableId),await g.removeVariable(f.environmentId,f.variableId),m(`deleted`)}catch(e){y.add({severity:`error`,summary:T(`common.error`),detail:e.message??T(`variableRowEditor.deleteError`),life:4e3})}finally{D.value=!1}}async function mt(){let e=Y.value||X.value||Z.value;try{if(!e){J.value&&(await g.removeOverride(f.variableId),m(`override-changed`));return}await g.setOverride(f.variableId,{value:{value:X.value,pre:Y.value,post:Z.value,isSecret:q.value}}),m(`override-changed`)}catch(e){y.add({severity:`error`,summary:T(`common.error`),detail:e.message??T(`variableRowEditor.overrideError`),life:4e3})}}async function ht(){try{await g.removeOverride(f.variableId),m(`override-changed`)}catch(e){y.add({severity:`error`,summary:T(`common.error`),detail:e.message??T(`variableRowEditor.clearOverrideError`),life:4e3})}}function gt(e){let t=e.relatedTarget;(!t||!e.currentTarget.contains(t))&&$()}return(e,t)=>(_(),S(`div`,{class:`expansion-form`,onFocusout:gt},[h(`div`,j,[h(`div`,M,[h(`label`,{class:`expansion-label`,for:r.editable&&r.autocompleteEnabled?`varrow-key-ac`:`varrow-key-input`},C(l(T)(`common.key`)),9,le),r.editable&&r.autocompleteEnabled?(_(),w(l(se),{key:0,"input-id":`varrow-key-ac`,modelValue:H.value,"onUpdate:modelValue":t[0]||=e=>H.value=e,suggestions:r.autocompleteSuggestions,placeholder:l(T)(`variableRowEditor.variableNamePlaceholder`),class:`w-full`,disabled:r.disabled,onComplete:t[1]||=e=>m(`autocomplete-search`,e.query),onItemSelect:ft,onBlur:$},null,8,[`modelValue`,`suggestions`,`placeholder`,`disabled`])):r.editable?(_(),w(l(E),{key:1,id:`varrow-key-input`,modelValue:H.value,"onUpdate:modelValue":t[2]||=e=>H.value=e,placeholder:l(T)(`variableRowEditor.variableNamePlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:$},null,8,[`modelValue`,`placeholder`,`disabled`])):(_(),S(`code`,ue,C(H.value),1))]),r.editable&&!st.value?(_(),S(`div`,de,[h(`label`,fe,C(l(T)(`variableRowEditor.secret`)),1),p(l(oe),{"input-id":`varrow-secret`,modelValue:K.value,"onUpdate:modelValue":[t[3]||=e=>K.value=e,$],disabled:r.disabled},null,8,[`modelValue`,`disabled`])])):b(``,!0),r.editable?(_(),S(`div`,pe,[h(`label`,{class:`expansion-label`,for:`varrow-injectai`,title:l(T)(`variableRowEditor.injectIntoAiHint`)},C(l(T)(`variableRowEditor.injectIntoAi`)),9,me),p(l(oe),{"input-id":`varrow-injectai`,modelValue:ot.value,"onUpdate:modelValue":[t[4]||=e=>ot.value=e,$],disabled:r.disabled},null,8,[`modelValue`,`disabled`])])):b(``,!0),r.showDelete&&r.editable?(_(),S(`div`,he,[p(l(re),{icon:`pi pi-trash`,severity:`danger`,text:``,rounded:``,size:`small`,disabled:r.disabled||D.value,onClick:pt},null,8,[`disabled`])])):b(``,!0)]),r.editable&&!K.value&&!Q(U.value)?(_(),S(`div`,ge,[t[26]||=h(`i`,{class:`pi pi-info-circle`},null,-1),h(`span`,null,C(l(T)(`variableRowEditor.notSecretWarning`)),1)])):b(``,!0),h(`div`,_e,[h(`div`,N,C(l(T)(`variableRowEditor.value`)),1),h(`div`,ve,[h(`div`,ye,[h(`label`,P,C(l(T)(`variableRowEditor.prefix`)),1),r.editable?(_(),w(l(E),{key:0,id:`varrow-prefix`,modelValue:W.value,"onUpdate:modelValue":t[5]||=e=>W.value=e,placeholder:l(T)(`variableRowEditor.prefixPlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:$},null,8,[`modelValue`,`placeholder`,`disabled`])):(_(),S(`code`,F,C(W.value||`—`),1))]),h(`div`,be,[h(`label`,{class:`expansion-label`,for:q.value?`varrow-value-secret`:`varrow-value-plain`},C(l(T)(`variableRowEditor.value`)),9,xe),r.editable?(_(),S(d,{key:0},[q.value?(_(),S(`div`,I,[p(l(E),{id:`varrow-value-secret`,modelValue:U.value,"onUpdate:modelValue":t[6]||=e=>U.value=e,type:O.value?`text`:`password`,placeholder:l(T)(`variableRowEditor.valuePlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:$},null,8,[`modelValue`,`type`,`placeholder`,`disabled`]),h(`button`,{type:`button`,class:`secret-toggle`,disabled:r.disabled,onClick:t[7]||=e=>O.value=!O.value,tabindex:`-1`},[h(`i`,{class:c(O.value?`pi pi-eye-slash`:`pi pi-eye`)},null,2)],8,L)])):Q(U.value)&&!ie.value?(_(),S(`span`,{key:1,class:`interpolation-badge`,title:U.value,onClick:t[8]||=e=>ie.value=!0},[p(l(v),{severity:`secondary`,value:ut(U.value)},null,8,[`value`]),t[27]||=h(`i`,{class:`pi pi-pencil interpolation-edit-icon`},null,-1)],8,R)):(_(),w(l(E),{key:2,id:`varrow-value-plain`,modelValue:U.value,"onUpdate:modelValue":t[9]||=e=>U.value=e,placeholder:l(T)(`variableRowEditor.valuePlaceholder`),class:`w-full`,disabled:r.disabled,onFocus:t[10]||=e=>ie.value=!0,onBlur:t[11]||=e=>{ie.value=!1,$()}},null,8,[`modelValue`,`placeholder`,`disabled`]))],64)):(_(),S(`span`,Se,[U.value?(_(),S(`span`,Ce,[q.value?(_(),S(`i`,{key:0,class:c([O.value?`pi pi-eye-slash`:`pi pi-eye`,`action-icon`]),onClick:t[12]||=e=>O.value=!O.value},null,2)):b(``,!0),h(`i`,{class:c([A.value===`val`?`pi pi-check`:`pi pi-copy`,`action-icon`]),onClick:t[13]||=e=>ce(`val`,W.value+U.value+G.value)},null,2)])):b(``,!0),Q(U.value)?(_(),w(l(v),{key:1,severity:`secondary`,value:ut(U.value)},null,8,[`value`])):q.value?(_(),S(d,{key:2},[O.value?(_(),S(`span`,z,C(U.value),1)):(_(),S(`span`,we,`***`))],64)):(_(),S(d,{key:3},[ne(C(U.value),1)],64))]))]),h(`div`,Te,[h(`label`,B,C(l(T)(`variableRowEditor.suffix`)),1),r.editable?(_(),w(l(E),{key:0,id:`varrow-suffix`,modelValue:G.value,"onUpdate:modelValue":t[14]||=e=>G.value=e,placeholder:l(T)(`variableRowEditor.suffixPlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:$},null,8,[`modelValue`,`placeholder`,`disabled`])):(_(),S(`code`,Ee,C(G.value||`—`),1))])]),q.value?b(``,!0):(_(),S(`code`,De,[W.value?(_(),S(`span`,Oe,C(W.value),1)):b(``,!0),Q(U.value)?(_(),S(`span`,ke,[dt(U.value)==null?(_(),S(d,{key:1},[p(l(v),{severity:`secondary`,value:ut(U.value),style:{"font-size":`0.7rem`}},null,8,[`value`]),t[28]||=h(`span`,{class:`prepost-unresolved`},`(?)`,-1)],64)):(_(),S(d,{key:0},[h(`span`,Ae,C(dt(U.value)),1),r.canEditSource?(_(),S(`i`,{key:0,class:`pi pi-pencil edit-source-icon`,title:l(T)(`variablesTable.editParentTitle`),onClick:t[15]||=s(e=>m(`edit-source`),[`stop`])},null,8,je)):b(``,!0)],64))])):(_(),S(`span`,Me,C(U.value||`…`),1)),G.value?(_(),S(`span`,Ne,C(G.value),1)):b(``,!0)]))]),r.showOverrides&&H.value?.trim()?(_(),S(`div`,Pe,[h(`div`,Fe,[h(`div`,Ie,C(l(T)(`variableRowEditor.localOverride`)),1),r.editable&&J.value?(_(),w(l(re),{key:0,icon:`pi pi-times`,text:``,rounded:``,size:`small`,severity:`danger`,title:l(T)(`variableRowEditor.clearOverride`),disabled:r.disabled,onClick:ht},null,8,[`title`,`disabled`])):b(``,!0)]),h(`div`,Le,[r.editable?(_(),S(d,{key:0},[h(`div`,Re,[h(`label`,ze,C(l(T)(`variableRowEditor.prefix`)),1),p(l(E),{id:`varrow-override-prefix`,modelValue:Y.value,"onUpdate:modelValue":t[16]||=e=>Y.value=e,placeholder:l(T)(`variableRowEditor.prefixPlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:mt},null,8,[`modelValue`,`placeholder`,`disabled`])]),h(`div`,Be,[h(`label`,{class:`expansion-label`,for:q.value?`varrow-override-value-secret`:`varrow-override-value-plain`},C(l(T)(`variableRowEditor.value`)),9,V),q.value?(_(),S(`div`,Ve,[p(l(E),{id:`varrow-override-value-secret`,modelValue:X.value,"onUpdate:modelValue":t[17]||=e=>X.value=e,type:k.value?`text`:`password`,placeholder:l(T)(`variableRowEditor.overrideValuePlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:mt},null,8,[`modelValue`,`type`,`placeholder`,`disabled`]),h(`button`,{type:`button`,class:`secret-toggle`,disabled:r.disabled,onClick:t[18]||=e=>k.value=!k.value,tabindex:`-1`},[h(`i`,{class:c(k.value?`pi pi-eye-slash`:`pi pi-eye`)},null,2)],8,He)])):Q(X.value)&&!ae.value?(_(),S(`span`,{key:1,class:`interpolation-badge`,title:X.value,onClick:t[19]||=e=>ae.value=!0},[p(l(v),{severity:`secondary`,value:ut(X.value)},null,8,[`value`]),t[29]||=h(`i`,{class:`pi pi-pencil interpolation-edit-icon`},null,-1)],8,Ue)):(_(),w(l(E),{key:2,id:`varrow-override-value-plain`,modelValue:X.value,"onUpdate:modelValue":t[20]||=e=>X.value=e,placeholder:l(T)(`variableRowEditor.overrideValuePlaceholder`),class:`w-full`,disabled:r.disabled,onFocus:t[21]||=e=>ae.value=!0,onBlur:t[22]||=e=>{ae.value=!1,mt()}},null,8,[`modelValue`,`placeholder`,`disabled`]))]),h(`div`,We,[h(`label`,Ge,C(l(T)(`variableRowEditor.suffix`)),1),p(l(E),{id:`varrow-override-suffix`,modelValue:Z.value,"onUpdate:modelValue":t[23]||=e=>Z.value=e,placeholder:l(T)(`variableRowEditor.suffixPlaceholder`),class:`w-full`,disabled:r.disabled,onBlur:mt},null,8,[`modelValue`,`placeholder`,`disabled`])])],64)):(_(),S(`div`,Ke,[J.value?(_(),S(`span`,qe,[h(`span`,Je,[q.value||J.value.isSecret?(_(),S(`i`,{key:0,class:c([k.value?`pi pi-eye-slash`:`pi pi-eye`,`action-icon`]),onClick:t[24]||=e=>k.value=!k.value},null,2)):b(``,!0),h(`i`,{class:c([A.value===`ovr`?`pi pi-check`:`pi pi-copy`,`action-icon`]),onClick:t[25]||=e=>ce(`ovr`,J.value.pre+J.value.value+J.value.post)},null,2)]),q.value||J.value.isSecret?(_(),S(d,{key:0},[k.value?(_(),S(`code`,Xe,C(J.value.pre)+C(J.value.value)+C(J.value.post),1)):(_(),S(`span`,Ye,`***`))],64)):(_(),S(`code`,Ze,C(J.value.pre)+C(J.value.value)+C(J.value.post),1))])):(_(),S(`span`,Qe,`—`))]))]),r.editable&&!q.value&&(Y.value||X.value||Z.value)?(_(),S(`code`,$e,[Y.value?(_(),S(`span`,et,C(Y.value),1)):b(``,!0),Q(X.value)?(_(),S(`span`,tt,[dt(X.value)==null?(_(),S(d,{key:1},[p(l(v),{severity:`secondary`,value:ut(X.value),style:{"font-size":`0.7rem`}},null,8,[`value`]),t[30]||=h(`span`,{class:`prepost-unresolved`},`(?)`,-1)],64)):(_(),S(`span`,nt,C(dt(X.value)),1))])):(_(),S(`span`,rt,C(X.value||`…`),1)),Z.value?(_(),S(`span`,it,C(Z.value),1)):b(``,!0)])):b(``,!0)])):b(``,!0)],32))}}),[[`__scopeId`,`data-v-2a3078f4`]]),H={class:`table-toolbar`},U={key:0,class:`overrides-filter`},W={for:`overrides-filter`},G={class:`text-center py-4 text-gray-500`},K={class:`row-key-cell`},ot={class:`row-key-line`},st={class:`row-key`},q=[`title`],ct=[`title`],J={key:1,class:`resolved-from-line`},Y={class:`row-value`},X=[`title`,`onClick`],Z=[`title`,`onClick`],lt={key:1,class:`value-levels`},Q={class:`resolved-level`},ut={key:0,class:`secret-mask`},dt=[`title`],ft={key:0,class:`secret-mask`},$=[`title`],pt=[`title`],mt={key:6,class:`empty-value`},ht={key:0,class:`override-indicator`},gt=[`title`,`onClick`],_t=[`title`,`onClick`],vt={key:0,class:`override-value-masked`},yt=[`title`],bt=[`title`],xt={key:0,class:`parent-edit`},St={class:`parent-edit__field`},Ct={class:`parent-edit__label`,for:`parent-edit-value`},wt={class:`parent-edit__usages`},Tt={class:`parent-edit__usages-title`},Et={key:0,class:`parent-edit__usages-loading`},Dt={key:0,class:`parent-edit__usage-list`},Ot={class:`parent-edit__usage-env`},kt={key:0,class:`parent-edit__usage-svc`},At={key:1,class:`parent-edit__usages-empty`},jt=40,Mt=200,Nt=24,Pt=y(T({__name:`VariablesTable`,props:{environmentId:{},resolvedEnv:{default:()=>({})},sources:{default:()=>({})},editable:{type:Boolean,default:!0},showOverrides:{type:Boolean,default:!1},showOverrideBadge:{type:Boolean,default:!1},showDelete:{type:Boolean,default:!0},showAddButton:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autocompleteEnabled:{type:Boolean,default:!1},autocompleteSuggestions:{default:()=>[]},autocompleteMeta:{default:()=>({})},serviceBuiltins:{},scrollHeight:{default:`auto`}},emits:[`autocomplete-search`,`variables-changed`],setup(u,{emit:m}){let y=/^\{\{(.+)\}\}$/,T=/^\{\{environment\.(.+)\}\}$/,se={"service.HOST_LAN":`(agent LAN IP)`},k=u,A=m,{t:j}=n(),M=t(),le=e(()=>Object.keys(k.sources).length>0),ue=e(()=>Object.keys(k.resolvedEnv).length>0),de=te(`rootRef`),fe=x(null),pe=e(()=>k.scrollHeight===`auto`?fe.value??`460px`:k.scrollHeight);function me(){if(k.scrollHeight!==`auto`)return;let e=de.value;if(!e)return;let t=(e.querySelector(`.p-datatable-table-container`)??e).getBoundingClientRect().top,n=window.innerHeight-t-Nt;fe.value=`${Math.max(Mt,Math.round(n))}px`}let he=null;i(()=>{f(me),window.addEventListener(`resize`,me),typeof ResizeObserver<`u`&&de.value&&(he=new ResizeObserver(()=>me()),he.observe(document.body))}),r(()=>{window.removeEventListener(`resize`,me),he?.disconnect(),he=null});let ge=x(``),_e=x(!1),N=x({});async function ve(){if(k.showOverrides)try{let e=await M.getOverrides(),t={};for(let[n,r]of Object.entries(e)){let e=r;t[n]={value:e.value.value,pre:e.value.pre,post:e.value.post,isSecret:e.value.isSecret}}N.value=t}catch{}}i(ve);let ye=e(()=>M.getById(k.environmentId));function P(e){return ye.value?.variables?.[e]}let F=x([]),be=e(()=>{let e=Object.keys(ye.value?.variables??{}).map(e=>({variableId:e})),t=new Set(e.map(e=>e.variableId)),n=F.value.filter(e=>!t.has(e)).map(e=>({variableId:e}));return[...e,...n]}),xe=te(`tableRef`),I=x({}),L=x([]),R=x(new Set);function Se(e){let t=new Set(R.value);t.has(e)?t.delete(e):t.add(e),R.value=t}let Ce=x(null);function we(e,t){navigator.clipboard.writeText(t),Ce.value=e,setTimeout(()=>{Ce.value===e&&(Ce.value=null)},1500)}function z(e){let t=P(e);if(!t)return``;let n=t.value?.value??``;return V(n)?He(n)??n:(t.value?.pre??``)+n+(t.value?.post??``)}let Te=a(),B=x(null),Ee=x(!1),De=x(!1),Oe=x(!1),ke=0,Ae=x([]);async function je(e){let t=k.sources[e]?.resolvedFrom,n=P(e)?.value?.value??``;if(!t||!n)return;let r=Ve(n),i=M.getById(t.environmentId),a=Object.entries(i?.variables??{}).find(([,e])=>e.key===r);if(!a){Te.add({severity:`warn`,summary:j(`variablesTable.editParentNotFound`),life:4e3});return}let[o,s]=a;B.value={key:r,environmentId:t.environmentId,environmentName:t.environmentName,variableId:o,value:s.value?.value??``,pre:s.value?.pre??``,post:s.value?.post??``,isSecret:s.value?.isSecret??!1,injectIntoAi:s.value?.injectIntoAi??!1},Ae.value=[],Ee.value=!0,Me(r,t.environmentId)}async function Me(e,t){let n=++ke;Oe.value=!0;try{let r=M.currentProjectId;if(!r)return;let i=await M.keyUsages(r,e,t);if(n!==ke)return;Ae.value=[...i.inheritedBy.map(e=>({kind:`inherits`,environmentName:e.environmentName,...e.serviceName?{serviceName:e.serviceName}:{}})),...i.definedIn.map(e=>({kind:`defines`,environmentName:e.environmentName,...e.serviceName?{serviceName:e.serviceName}:{}})),...i.referencedBy.map(e=>({kind:`references`,environmentName:e.environmentName,...e.serviceName?{serviceName:e.serviceName}:{},viaKey:e.key}))]}catch{n===ke&&(Ae.value=[])}finally{n===ke&&(Oe.value=!1)}}async function Ne(){let e=B.value;if(e){De.value=!0;try{await M.upsertVariable(e.environmentId,e.variableId,{key:e.key,value:{value:e.value,pre:e.pre,post:e.post,isSecret:e.isSecret,injectIntoAi:e.injectIntoAi}}),Ee.value=!1,A(`variables-changed`)}catch(e){Te.add({severity:`error`,summary:j(`common.error`),detail:e.message,life:4e3})}finally{De.value=!1}}}function Pe(e){let t=N.value[e];return t?t.pre+t.value+t.post:``}let Fe=e(()=>{let e=[...be.value];if(_e.value&&(e=e.filter(e=>!!N.value[e.variableId])),ge.value.trim()){let t=ge.value.toLowerCase();e=e.filter(e=>{let n=P(e.variableId);if(!n)return!1;if(n.key.toLowerCase().includes(t)||(n.value?.value??``).toLowerCase().includes(t))return!0;let r=N.value[e.variableId];return!!(r&&r.value.toLowerCase().includes(t))})}return L.value.length>0?e.sort((e,t)=>{let n=L.value.indexOf(e.variableId),r=L.value.indexOf(t.variableId);return n===-1?1:r===-1?-1:n-r}):e.sort((e,t)=>{let n=P(e.variableId)?.key??``,r=P(t.variableId)?.key??``;return n?r?n.localeCompare(r):-1:1}),e});function Ie(e){let t=e.data.variableId;I.value[t]?(I.value={},L.value=[],Le(t)):(L.value=Fe.value.map(e=>e.variableId),I.value={[t]:!0})}function Le(e){f(()=>{let t=xe.value?.$el;if(!t)return;let n=Fe.value.findIndex(t=>t.variableId===e);n<0||t.querySelectorAll(`tbody tr[data-p-index]`)[n]?.scrollIntoView({block:`nearest`,behavior:`smooth`})})}function Re(e){F.value=F.value.filter(t=>t!==e),I.value[e]&&(I.value={},L.value=[])}function ze(e){F.value=F.value.filter(t=>t!==e)}function Be(){let e=O();F.value=[...F.value,e],L.value=[...be.value.map(e=>e.variableId),e],f(()=>{I.value={[e]:!0},f(()=>{let e=document.querySelector(`.variables-expand-table .p-datatable-row-expansion:last-of-type`);e&&e.scrollIntoView({block:`nearest`,behavior:`smooth`})})})}function V(e){return y.test(e)}function Ve(e){let t=e.match(y);return t?t[1].replace(/^(?:environment|service)\./,``):e}function He(e){let t=e.match(T);if(t)return k.resolvedEnv[t[1]]??null;let n=e.match(y);if(n){let e={...se,...k.serviceBuiltins};if(n[1]in e)return e[n[1]]}return null}function Ue(e){return e.length<=jt?e:e.substring(0,jt)+`…`}return(e,t)=>(_(),S(d,null,[h(`div`,{ref_key:`rootRef`,ref:de,class:`variables-table`},[h(`div`,H,[p(l(E),{modelValue:ge.value,"onUpdate:modelValue":t[0]||=e=>ge.value=e,placeholder:`Search variables...`,class:`search-input`,size:`small`},null,8,[`modelValue`]),u.showOverrides?(_(),S(`div`,U,[p(l(oe),{modelValue:_e.value,"onUpdate:modelValue":t[1]||=e=>_e.value=e,"input-id":`overrides-filter`},null,8,[`modelValue`]),h(`label`,W,C(l(j)(`variablesTable.overriddenOnly`)),1)])):b(``,!0)]),p(l(ie),{ref_key:`tableRef`,ref:xe,"expanded-rows":I.value,"onUpdate:expandedRows":t[5]||=e=>I.value=e,value:Fe.value,"data-key":`variableId`,class:`p-datatable-sm variables-expand-table`,scrollable:``,"scroll-height":pe.value,onRowClick:Ie},{empty:o(()=>[h(`div`,G,C(u.showAddButton?l(j)(`variablesTable.empty`):l(j)(`variablesTable.emptyReadonly`)),1)]),expansion:o(({data:e})=>[p(at,{"environment-id":u.environmentId,"variable-id":e.variableId,overrides:N.value,editable:u.editable,"show-overrides":u.showOverrides,"show-delete":u.showDelete,"show-override-badge":u.showOverrideBadge,disabled:u.disabled,"resolved-env":u.resolvedEnv,"autocomplete-enabled":u.autocompleteEnabled,"autocomplete-suggestions":u.autocompleteSuggestions,"autocomplete-meta":u.autocompleteMeta,"is-pending":F.value.includes(e.variableId),onDeleted:t=>Re(e.variableId),onSaved:t=>ze(e.variableId),onAutocompleteSearch:t[4]||=e=>A(`autocomplete-search`,e),onOverrideChanged:ve,"can-edit-source":!!u.sources[e.variableId]?.resolvedFrom,onEditSource:t=>je(e.variableId)},null,8,[`environment-id`,`variable-id`,`overrides`,`editable`,`show-overrides`,`show-delete`,`show-override-badge`,`disabled`,`resolved-env`,`autocomplete-enabled`,`autocomplete-suggestions`,`autocomplete-meta`,`is-pending`,`onDeleted`,`onSaved`,`can-edit-source`,`onEditSource`])]),default:o(()=>[p(l(ae),{expander:``,style:{width:`2.5rem`}}),p(l(ae),{field:`variableId`,header:l(j)(`common.key`)},{body:o(({data:e})=>[h(`div`,K,[h(`span`,ot,[h(`code`,st,C(P(e.variableId)?.key||`(new variable)`),1),u.sources[e.variableId]?.overriddenBy?(_(),S(`span`,{key:0,class:`overridden-badge overridden-badge--local`,title:l(j)(`variablesTable.localOverrideTooltip`,{env:u.sources[e.variableId].overriddenBy.environmentName})},[t[9]||=h(`i`,{class:`pi pi-desktop`},null,-1),ne(` `+C(l(j)(`variablesTable.localOverride`)),1)],8,q)):u.showOverrideBadge&&u.sources[e.variableId]?.overridden&&!V(P(e.variableId)?.value?.value??``)?(_(),S(`span`,{key:1,class:`overridden-badge`,title:l(j)(`variablesTable.overrideTooltip`)},[t[10]||=h(`i`,{class:`pi pi-exclamation-triangle`},null,-1),ne(` `+C(l(j)(`variablesTable.override`)),1)],8,ct)):b(``,!0)]),le.value&&u.sources[e.variableId]?(_(),w(ce,{key:0,"environment-id":u.sources[e.variableId].environmentId,class:`source-badge`},null,8,[`environment-id`])):b(``,!0),le.value&&u.sources[e.variableId]?.resolvedFrom?(_(),S(`span`,J,[t[11]||=h(`i`,{class:`pi pi-arrow-right resolved-from-arrow`},null,-1),p(ce,{"environment-id":u.sources[e.variableId].resolvedFrom.environmentId,class:`source-badge`},null,8,[`environment-id`])])):b(``,!0)])]),_:1},8,[`header`]),p(l(ae),{header:l(j)(`common.value`)},{body:o(({data:e})=>[h(`span`,Y,[z(e.variableId)?(_(),S(`span`,{key:0,class:`value-actions`,onClick:t[2]||=s(()=>{},[`stop`])},[P(e.variableId)?.value?.isSecret?(_(),S(`i`,{key:0,class:c([R.value.has(e.variableId)?`pi pi-eye-slash`:`pi pi-eye`,`action-icon`]),title:l(j)(`variablesTable.reveal`),onClick:t=>Se(e.variableId)},null,10,X)):b(``,!0),h(`i`,{class:c([Ce.value===e.variableId?`pi pi-check`:`pi pi-copy`,`action-icon`]),title:l(j)(`actions.copy`),onClick:t=>we(e.variableId,z(e.variableId))},null,10,Z)])):b(``,!0),V(P(e.variableId)?.value?.value??``)&&He(P(e.variableId)?.value?.value??``)!=null?(_(),S(`span`,lt,[p(l(v),{severity:`secondary`,value:Ve(P(e.variableId)?.value?.value??``),class:`interpolation-hint-tag`},null,8,[`value`]),h(`span`,Q,[P(e.variableId)?.value?.isSecret&&!R.value.has(e.variableId)?(_(),S(`span`,ut,`***`)):(_(),S(`code`,{key:1,class:`resolved-final`,title:He(P(e.variableId)?.value?.value??``)},C(Ue(He(P(e.variableId)?.value?.value??``))),9,dt))])])):V(P(e.variableId)?.value?.value??``)&&ue.value&&He(P(e.variableId)?.value?.value??``)==null?(_(),S(d,{key:2},[t[12]||=h(`i`,{class:`pi pi-exclamation-triangle unresolved-icon`},null,-1),p(l(v),{severity:`secondary`,value:Ve(P(e.variableId)?.value?.value??``)},null,8,[`value`]),t[13]||=h(`span`,{class:`unresolved-msg`},`Variable not found in this environment`,-1)],64)):V(P(e.variableId)?.value?.value??``)?(_(),w(l(v),{key:3,severity:`secondary`,value:Ve(P(e.variableId)?.value?.value??``)},null,8,[`value`])):P(e.variableId)?.value?.isSecret?(_(),S(d,{key:4},[R.value.has(e.variableId)?(_(),S(`code`,{key:1,title:z(e.variableId)},C(Ue(z(e.variableId))),9,$)):(_(),S(`span`,ft,`***`))],64)):P(e.variableId)?.value?.value||P(e.variableId)?.value?.pre||P(e.variableId)?.value?.post?(_(),S(`code`,{key:5,title:z(e.variableId)},C(Ue(z(e.variableId))),9,pt)):(_(),S(`span`,mt,`(empty)`))]),u.showOverrides&&!V(P(e.variableId)?.value?.value??``)&&N.value[e.variableId]?(_(),S(`span`,ht,[t[14]||=h(`i`,{class:`pi pi-arrow-right`,style:{"font-size":`0.7rem`}},null,-1),h(`span`,{class:`value-actions`,onClick:t[3]||=s(()=>{},[`stop`])},[P(e.variableId)?.value?.isSecret||N.value[e.variableId].isSecret?(_(),S(`i`,{key:0,class:c([R.value.has(`ovr:`+e.variableId)?`pi pi-eye-slash`:`pi pi-eye`,`action-icon`]),title:l(j)(`variablesTable.reveal`),onClick:t=>Se(`ovr:`+e.variableId)},null,10,gt)):b(``,!0),h(`i`,{class:c([Ce.value===`ovr:`+e.variableId?`pi pi-check`:`pi pi-copy`,`action-icon`]),title:l(j)(`actions.copy`),onClick:t=>we(`ovr:`+e.variableId,Pe(e.variableId))},null,10,_t)]),P(e.variableId)?.value?.isSecret||N.value[e.variableId].isSecret?(_(),S(d,{key:0},[R.value.has(`ovr:`+e.variableId)?(_(),S(`code`,{key:1,class:`override-value`,title:Pe(e.variableId)},C(Ue(Pe(e.variableId))),9,yt)):(_(),S(`span`,vt,`***`))],64)):(_(),S(`code`,{key:1,class:`override-value`,title:Pe(e.variableId)},C(Ue(Pe(e.variableId))),9,bt))])):b(``,!0)]),_:1},8,[`header`])]),_:1},8,[`expanded-rows`,`value`,`scroll-height`]),u.showAddButton?(_(),w(l(re),{key:0,type:`button`,label:l(j)(`variablesTable.addVariable`),icon:`pi pi-plus`,text:``,disabled:u.disabled,class:`mt-3`,onClick:Be},null,8,[`label`,`disabled`])):b(``,!0)],512),p(l(g),{visible:Ee.value,"onUpdate:visible":t[8]||=e=>Ee.value=e,modal:``,header:l(j)(`variablesTable.editParentHeader`),style:{width:`38rem`,maxWidth:`95vw`}},{footer:o(()=>[p(l(re),{label:l(j)(`common.cancel`),text:``,disabled:De.value,onClick:t[7]||=e=>Ee.value=!1},null,8,[`label`,`disabled`]),p(l(re),{label:l(j)(`variablesTable.editParentConfirm`),severity:`warn`,loading:De.value,onClick:Ne},null,8,[`label`,`loading`])]),default:o(()=>[B.value?(_(),S(`div`,xt,[p(l(D),{severity:`warn`,closable:!1,class:`parent-edit__warning`},{default:o(()=>[ne(C(l(j)(`variablesTable.editParentWarning`,{key:B.value.key,env:B.value.environmentName})),1)]),_:1}),h(`div`,St,[h(`label`,Ct,C(l(j)(`common.value`)),1),p(l(E),{id:`parent-edit-value`,modelValue:B.value.value,"onUpdate:modelValue":t[6]||=e=>B.value.value=e,class:`w-full`,disabled:De.value},null,8,[`modelValue`,`disabled`])]),h(`div`,wt,[h(`div`,Tt,[t[15]||=h(`i`,{class:`pi pi-sitemap`},null,-1),ne(` `+C(l(j)(`variablesTable.editParentImpact`)),1)]),Oe.value?(_(),S(`div`,Et,[t[16]||=h(`i`,{class:`pi pi-spin pi-spinner`},null,-1),h(`span`,null,C(l(j)(`variablesTable.editParentLoading`)),1)])):(_(),S(d,{key:1},[Ae.value.length?(_(),S(`ul`,Dt,[(_(!0),S(d,null,ee(Ae.value,(e,t)=>(_(),S(`li`,{key:t},[p(l(v),{severity:e.kind===`references`?`info`:`secondary`,value:e.kind===`references`?e.viaKey:e.kind===`inherits`?l(j)(`variablesTable.editParentInherits`):l(j)(`variablesTable.editParentDefines`)},null,8,[`severity`,`value`]),h(`span`,Ot,C(e.environmentName),1),e.serviceName?(_(),S(`span`,kt,C(e.serviceName),1)):b(``,!0)]))),128))])):(_(),S(`div`,At,C(l(j)(`variablesTable.editParentNoUsage`)),1))],64))])])):b(``,!0)]),_:1},8,[`visible`,`header`])],64))}}),[[`__scopeId`,`data-v-5af35db0`]]);export{ce as n,Pt as t};
@@ -1 +1 @@
1
- import{Bn as e,Di as t,Ji as n,Jr as r,Ni as i,Qt as a,Sa as o,Xr as s,ci as c,ei as l,ji as u,jn as d,jt as f,mn as p,ni as m,pa as h,qt as g,ri as _,si as v,ta as y,ti as b,ui as x,vn as S}from"./index-Bdr5knDo.js";import{t as C}from"./message-QiLCZQ6U.js";import{t as w}from"./password-CWjT4bmn.js";var T={class:`migration-page`,"data-testid":`page-content`},E={class:`migration-card`},D={class:`migration-title`,"data-testid":`vault-migration-title`},O={class:`migration-lead`},k={class:`migration-path`},A={for:`legacyMasterPassword`},j={class:`migration-report`},M={key:0},N={key:1,class:`migration-report__warn`},P={class:`migration-backup`},F=p(x({__name:`VaultMigrationPage`,setup(p){let x=d(),{t:F}=e(),I=h(null),L=h(``),R=h(!1),z=h(``),B=h(null);t(async()=>{try{I.value=(await g()).legacyVault??null,I.value||await x.replace({name:`launch-project`})}catch{z.value=F(`vaultMigration.statusError`)}});async function V(){if(L.value){R.value=!0,z.value=``;try{B.value=await a(L.value),L.value=``}catch(e){z.value=f(e)??F(`vaultMigration.failed`)}finally{R.value=!1}}}async function H(){await x.replace({name:`launch-project`})}return(e,t)=>(u(),_(`div`,T,[l(`div`,E,[l(`h1`,D,y(o(F)(`vaultMigration.title`)),1),B.value?(u(),_(s,{key:1},[c(o(C),{severity:`success`,closable:!1,"data-testid":`vault-migration-done`},{default:n(()=>[v(y(o(F)(`vaultMigration.done`)),1)]),_:1}),l(`ul`,j,[(u(!0),_(s,null,i(B.value.rekeyed,e=>(u(),_(`li`,{key:e.file},y(o(F)(`vaultMigration.rekeyed`,{file:e.file,count:e.values})),1))),128)),B.value.moved.length?(u(),_(`li`,M,y(o(F)(`vaultMigration.moved`,{files:B.value.moved.join(`, `)})),1)):m(``,!0),B.value.skipped.length?(u(),_(`li`,N,y(o(F)(`vaultMigration.skipped`,{files:B.value.skipped.join(`, `)})),1)):m(``,!0)]),l(`p`,P,[v(y(o(F)(`vaultMigration.backupKept`))+` `,1),l(`code`,null,y(B.value.backupDir),1)]),c(o(S),{"data-testid":`vault-migration-continue`,label:o(F)(`vaultMigration.continue`),onClick:H},null,8,[`label`])],64)):(u(),_(s,{key:0},[l(`p`,O,y(o(F)(`vaultMigration.lead`)),1),l(`p`,k,[l(`code`,null,y(I.value),1)]),c(o(C),{severity:`info`,closable:!1,class:`migration-note`},{default:n(()=>[v(y(o(F)(`vaultMigration.backupNote`)),1)]),_:1}),l(`form`,{class:`migration-form`,onSubmit:r(V,[`prevent`])},[l(`label`,A,y(o(F)(`vaultMigration.oldPasswordLabel`)),1),c(o(w),{id:`legacyMasterPassword`,modelValue:L.value,"onUpdate:modelValue":t[0]||=e=>L.value=e,"data-testid":`legacy-master-password-input`,feedback:!1,"toggle-mask":``,autocomplete:`current-password`,disabled:R.value,fluid:``},null,8,[`modelValue`,`disabled`]),z.value?(u(),b(o(C),{key:0,severity:`error`,closable:!1,"data-testid":`vault-migration-error`},{default:n(()=>[v(y(z.value),1)]),_:1})):m(``,!0),c(o(S),{type:`submit`,"data-testid":`vault-migration-submit`,label:R.value?o(F)(`vaultMigration.migrating`):o(F)(`vaultMigration.migrate`),loading:R.value,disabled:R.value||!L.value},null,8,[`label`,`loading`,`disabled`])],32)],64))])]))}}),[[`__scopeId`,`data-v-fb50c36e`]]);export{F as default};
1
+ import{Bn as e,Di as t,Ji as n,Jr as r,Ni as i,Qt as a,Sa as o,Xr as s,ci as c,ei as l,ji as u,jn as d,jt as f,mn as p,ni as m,pa as h,qt as g,ri as _,si as v,ta as y,ti as b,ui as x,vn as S}from"./index-BIjjyvxm.js";import{t as C}from"./message-Cgzl10yY.js";import{t as w}from"./password-Bbkf0Avi.js";var T={class:`migration-page`,"data-testid":`page-content`},E={class:`migration-card`},D={class:`migration-title`,"data-testid":`vault-migration-title`},O={class:`migration-lead`},k={class:`migration-path`},A={for:`legacyMasterPassword`},j={class:`migration-report`},M={key:0},N={key:1,class:`migration-report__warn`},P={class:`migration-backup`},F=p(x({__name:`VaultMigrationPage`,setup(p){let x=d(),{t:F}=e(),I=h(null),L=h(``),R=h(!1),z=h(``),B=h(null);t(async()=>{try{I.value=(await g()).legacyVault??null,I.value||await x.replace({name:`launch-project`})}catch{z.value=F(`vaultMigration.statusError`)}});async function V(){if(L.value){R.value=!0,z.value=``;try{B.value=await a(L.value),L.value=``}catch(e){z.value=f(e)??F(`vaultMigration.failed`)}finally{R.value=!1}}}async function H(){await x.replace({name:`launch-project`})}return(e,t)=>(u(),_(`div`,T,[l(`div`,E,[l(`h1`,D,y(o(F)(`vaultMigration.title`)),1),B.value?(u(),_(s,{key:1},[c(o(C),{severity:`success`,closable:!1,"data-testid":`vault-migration-done`},{default:n(()=>[v(y(o(F)(`vaultMigration.done`)),1)]),_:1}),l(`ul`,j,[(u(!0),_(s,null,i(B.value.rekeyed,e=>(u(),_(`li`,{key:e.file},y(o(F)(`vaultMigration.rekeyed`,{file:e.file,count:e.values})),1))),128)),B.value.moved.length?(u(),_(`li`,M,y(o(F)(`vaultMigration.moved`,{files:B.value.moved.join(`, `)})),1)):m(``,!0),B.value.skipped.length?(u(),_(`li`,N,y(o(F)(`vaultMigration.skipped`,{files:B.value.skipped.join(`, `)})),1)):m(``,!0)]),l(`p`,P,[v(y(o(F)(`vaultMigration.backupKept`))+` `,1),l(`code`,null,y(B.value.backupDir),1)]),c(o(S),{"data-testid":`vault-migration-continue`,label:o(F)(`vaultMigration.continue`),onClick:H},null,8,[`label`])],64)):(u(),_(s,{key:0},[l(`p`,O,y(o(F)(`vaultMigration.lead`)),1),l(`p`,k,[l(`code`,null,y(I.value),1)]),c(o(C),{severity:`info`,closable:!1,class:`migration-note`},{default:n(()=>[v(y(o(F)(`vaultMigration.backupNote`)),1)]),_:1}),l(`form`,{class:`migration-form`,onSubmit:r(V,[`prevent`])},[l(`label`,A,y(o(F)(`vaultMigration.oldPasswordLabel`)),1),c(o(w),{id:`legacyMasterPassword`,modelValue:L.value,"onUpdate:modelValue":t[0]||=e=>L.value=e,"data-testid":`legacy-master-password-input`,feedback:!1,"toggle-mask":``,autocomplete:`current-password`,disabled:R.value,fluid:``},null,8,[`modelValue`,`disabled`]),z.value?(u(),b(o(C),{key:0,severity:`error`,closable:!1,"data-testid":`vault-migration-error`},{default:n(()=>[v(y(z.value),1)]),_:1})):m(``,!0),c(o(S),{type:`submit`,"data-testid":`vault-migration-submit`,label:R.value?o(F)(`vaultMigration.migrating`):o(F)(`vaultMigration.migrate`),loading:R.value,disabled:R.value||!L.value},null,8,[`label`,`loading`,`disabled`])],32)],64))])]))}}),[[`__scopeId`,`data-v-fb50c36e`]]);export{F as default};
@@ -1 +1 @@
1
- import{Di as e,Gt as t,ji as n,mn as r,ni as i,pa as a,ri as o,ta as s,ui as c}from"./index-Bdr5knDo.js";var l={key:0,class:`version-badge`,"data-testid":`version-badge`},u=r(c({__name:`VersionBadge`,setup(r){let c=a(``);return e(()=>{t.health.check.query().then(e=>{c.value=e.version}).catch(()=>{})}),(e,t)=>c.value?(n(),o(`span`,l,`v`+s(c.value),1)):i(``,!0)}}),[[`__scopeId`,`data-v-61dd6b89`]]);export{u as t};
1
+ import{Di as e,Gt as t,ji as n,mn as r,ni as i,pa as a,ri as o,ta as s,ui as c}from"./index-BIjjyvxm.js";var l={key:0,class:`version-badge`,"data-testid":`version-badge`},u=r(c({__name:`VersionBadge`,setup(r){let c=a(``);return e(()=>{t.health.check.query().then(e=>{c.value=e.version}).catch(()=>{})}),(e,t)=>c.value?(n(),o(`span`,l,`v`+s(c.value),1)):i(``,!0)}}),[[`__scopeId`,`data-v-61dd6b89`]]);export{u as t};
@@ -0,0 +1 @@
1
+ import{ji as e,ti as t,ui as n}from"./index-BIjjyvxm.js";import"./src-DsmqQeZ9.js";import"./w3c-keyname-CjzYiphr.js";import{t as r}from"./WikiView-DCuU1ES2.js";var i=n({__name:`WikiPage`,setup(n){return(n,i)=>(e(),t(r,{scope:`global`}))}});export{i as default};
@@ -1 +1 @@
1
- import{$r as e,Ci as t,Di as n,Fi as r,Fn as i,Gt as a,Ji as o,Jr as s,Ni as c,Qi as l,Sa as u,Wi as d,Xr as f,ci as p,ei as m,gn as ee,ji as h,jn as te,mn as g,ni as _,pa as v,qr as y,ri as b,si as x,ta as S,ti as ne,ui as C,un as w,vn as T}from"./index-Bdr5knDo.js";import{t as re}from"./src-BNFzRy6K.js";var E={class:`fs-node`},D=[`title`],O={class:`fs-node__name`},k=[`title`],A={class:`fs-node__name`},j={key:2,class:`fs-node__actions`},M={key:0,class:`fs-node__children`},ie=C({__name:`FsNode`,props:{entry:{},selectedPath:{},expanded:{},editable:{type:Boolean}},emits:[`toggle`,`select`,`create-child`,`rename`,`delete`],setup(t,{emit:n}){let i=t,a=n,o=e(()=>i.entry.type===`dir`&&i.expanded.has(i.entry.path)),u=e(()=>i.entry.type===`file`&&i.selectedPath===i.entry.path);return(e,n)=>{let i=r(`FsNode`,!0);return h(),b(`div`,E,[m(`div`,{class:l([`fs-node__row`,{"fs-node__row--selected":u.value}])},[t.entry.type===`dir`?(h(),b(`button`,{key:0,class:`fs-node__main`,title:t.entry.path,onClick:n[0]||=e=>a(`toggle`,t.entry.path)},[m(`i`,{class:l(`pi ${o.value?`pi-chevron-down`:`pi-chevron-right`} fs-node__caret`)},null,2),m(`i`,{class:l(`pi ${o.value?`pi-folder-open`:`pi-folder`} fs-node__icon fs-node__icon--folder`)},null,2),m(`span`,O,S(t.entry.name),1)],8,D)):(h(),b(`button`,{key:1,class:`fs-node__main`,title:t.entry.path,onClick:n[1]||=e=>a(`select`,t.entry.path)},[n[11]||=m(`span`,{class:`fs-node__caret-spacer`},null,-1),n[12]||=m(`i`,{class:`pi pi-file fs-node__icon`},null,-1),m(`span`,A,S(t.entry.name),1)],8,k)),t.editable?(h(),b(`div`,j,[t.entry.type===`dir`?(h(),b(`button`,{key:0,class:`fs-node__action`,title:`Nouveau fichier`,onClick:n[2]||=s(e=>a(`create-child`,t.entry.path,`file`),[`stop`])},[...n[13]||=[m(`i`,{class:`pi pi-file-plus`},null,-1)]])):_(``,!0),t.entry.type===`dir`?(h(),b(`button`,{key:1,class:`fs-node__action`,title:`Nouveau dossier`,onClick:n[3]||=s(e=>a(`create-child`,t.entry.path,`dir`),[`stop`])},[...n[14]||=[m(`i`,{class:`pi pi-folder-plus`},null,-1)]])):_(``,!0),m(`button`,{class:`fs-node__action`,title:`Renommer`,onClick:n[4]||=s(e=>a(`rename`,t.entry.path,t.entry.type===`dir`),[`stop`])},[...n[15]||=[m(`i`,{class:`pi pi-pencil`},null,-1)]]),m(`button`,{class:`fs-node__action fs-node__action--danger`,title:`Supprimer`,onClick:n[5]||=s(e=>a(`delete`,t.entry.path,t.entry.type===`dir`),[`stop`])},[...n[16]||=[m(`i`,{class:`pi pi-trash`},null,-1)]])])):_(``,!0)],2),t.entry.type===`dir`&&o.value?(h(),b(`ul`,M,[(h(!0),b(f,null,c(t.entry.children,e=>(h(),b(`li`,{key:e.path},[p(i,{entry:e,"selected-path":t.selectedPath,expanded:t.expanded,editable:t.editable,onToggle:n[6]||=e=>a(`toggle`,e),onSelect:n[7]||=e=>a(`select`,e),onCreateChild:n[8]||=(e,t)=>a(`create-child`,e,t),onRename:n[9]||=(e,t)=>a(`rename`,e,t),onDelete:n[10]||=(e,t)=>a(`delete`,e,t)},null,8,[`entry`,`selected-path`,`expanded`,`editable`])]))),128))])):_(``,!0)])}}}),ae={key:0,class:`wiki__not-configured`},oe={key:1,class:`wiki__not-configured`},se={key:0},ce={key:1},le={key:2,class:`wiki`},ue={class:`wiki__sidebar`},de={class:`wiki__sidebar-header`},fe=[`title`],pe={class:`wiki__sidebar-actions`},me={key:0,class:`wiki__loading`},he={key:1,class:`wiki__error`},ge={key:2,class:`wiki__empty`},_e={key:3,class:`wiki__tree`},ve={class:`wiki__main`},ye={class:`wiki__title-row`},be={class:`wiki__title-path`},xe={key:0,class:`wiki__status`},Se={key:0},Ce={key:1},we={key:2,class:`wiki__status-saved`},Te={key:1,class:`wiki__status wiki__status-readonly`},Ee={key:0,class:`wiki__editor-actions`},De={key:1,class:`wiki__loading`},Oe={key:1,class:`wiki__placeholder`},ke={class:`wiki__prompt-body`},Ae={for:`wiki-prompt-input`,class:`wiki__prompt-label`},je={class:`wiki__link-list`},Me=[`onClick`],Ne={class:`wiki__link-path`},Pe={key:0,class:`wiki__link-empty`},N=g(C({__name:`WikiView`,props:{scope:{}},setup(r){let g=te(),C=r,E=i(),D=v(``),O=v([]),k=v(!1),A=v(null),j=v(!1),M=v(null),N=v(!1),P=v(new Set),F=v(null),I=v(``),L=v(!1),R=v(!1),z=v(!1),B=null,V=``,Fe=v(null),H=v(!1),U=v(``),W=v({open:!1,title:``,label:``,value:``,placeholder:``,resolve:null});function Ie(e){return new Promise(t=>{W.value={open:!0,title:e.title,label:e.label,value:e.initialValue??``,placeholder:e.placeholder??``,resolve:t}})}function Le(){let e=W.value.value.trim();W.value.resolve?.(e||null),W.value.open=!1}function G(){W.value.resolve?.(null),W.value.open=!1}let Re=e(()=>{let e=[],t=n=>{for(let r of n)r.type===`file`?e.push({path:r.path,name:r.name}):t(r.children)};return t(O.value),e}),ze=e(()=>{let e=U.value.trim().toLowerCase();return Re.value.filter(e=>e.path!==F.value).filter(t=>!e||t.path.toLowerCase().includes(e))});async function K(){k.value=!0,A.value=null,j.value=!1,M.value=null;try{let e=await a.wiki.list.query({scope:C.scope});D.value=e.root,O.value=e.entries}catch(e){let t=e.message;if(/Aucun dossier de docs|globalDocsPath|docsPath|Aucun cwd/i.test(t))j.value=!0;else{let e=t.match(/Dossier introuvable:\s*(.+)$/);e?M.value=e[1].trim():A.value=t}}finally{k.value=!1}}async function Be(){N.value=!0;try{await a.wiki.ensureRoot.mutate({scope:C.scope}),M.value=null,await K()}catch(e){A.value=e.message}finally{N.value=!1}}let q=e(()=>C.scope===`global`),Ve=e(()=>C.scope.startsWith(`service:`)),He=e(()=>Ve.value?C.scope.slice(8):null);function Ue(){q.value?g.push({name:`settings`,query:{section:`general`}}):He.value&&g.push(`/services/${He.value}/config?configTab=general`)}function We(e){P.value.has(e)?P.value.delete(e):P.value.add(e),P.value=new Set(P.value)}async function J(e){X(),z.value=!1,F.value=e,L.value=!0,I.value=``;try{let t=await a.wiki.read.query({scope:C.scope,path:e});I.value=t.content,V=t.content;let n=e.split(`/`);for(n.pop();n.length;)P.value.add(n.join(`/`)),n.pop();P.value=new Set(P.value)}catch(e){A.value=e.message}finally{L.value=!1}}function Ge(){B&&clearTimeout(B),B=setTimeout(()=>{Y()},800)}async function Y(){if(!F.value||I.value===V)return;let e=F.value,t=I.value;R.value=!0;try{await a.wiki.write.mutate({scope:C.scope,path:e,content:t}),V=t}catch(e){A.value=e.message}finally{R.value=!1}}function X(){B&&(clearTimeout(B),B=null,Y())}d(I,()=>{F.value&&z.value&&Ge()});function Ke(){z.value?(X(),z.value=!1):z.value=!0}async function Z(e,t){let n=await Ie({title:t===`file`?`Nouveau fichier`:`Nouveau dossier`,label:t===`file`?`Nom du fichier (sans extension)`:`Nom du dossier`,initialValue:t===`file`?`nouveau`:`nouveau-dossier`});if(!n)return;let r=n.trim().replace(/[^A-Za-z0-9_./-]/g,`-`);if(!r)return;let i=t===`file`&&!/\.(md|markdown)$/i.test(r)?`${r}.md`:r,o=e?`${e}/${i}`:i;try{t===`file`?(await a.wiki.createFile.mutate({scope:C.scope,path:o}),await K(),J(o)):(await a.wiki.createDir.mutate({scope:C.scope,path:o}),P.value.add(o),P.value=new Set(P.value),await K())}catch(e){A.value=e.message}}async function qe(e,t){let n=e.split(`/`),r=n[n.length-1],i=await Ie({title:`Renommer`,label:`Nouveau nom`,initialValue:r});if(!i||i===r)return;let o=i.trim().replace(/[^A-Za-z0-9_./-]/g,`-`);if(!o)return;let s=!t&&!/\.(md|markdown)$/i.test(o)?`${o}.md`:o;n[n.length-1]=s;let c=n.join(`/`);try{await a.wiki.rename.mutate({scope:C.scope,fromPath:e,toPath:c}),F.value===e&&(F.value=c),await K()}catch(e){A.value=e.message}}function Je(e,t){E.require({message:`Supprimer "${e}" ${t?`(et tout son contenu)`:``} ?`,header:`Confirmation`,icon:`pi pi-exclamation-triangle`,rejectProps:{label:`Annuler`,severity:`secondary`,outlined:!0},acceptProps:{label:`Supprimer`,severity:`danger`},accept:async()=>{try{await a.wiki.delete.mutate({scope:C.scope,path:e}),(F.value===e||t&&F.value?.startsWith(e+`/`))&&(F.value=null,I.value=``),await K()}catch(e){A.value=e.message}}})}function Ye(){U.value=``,H.value=!0}function Xe(e){let t=Ze(F.value??``,e.path);Fe.value?.insertWikiLink?.(t,e.name.replace(/\.(md|markdown)$/i,``)),H.value=!1}function Ze(e,t){let n=e.split(`/`);n.pop();let r=t.split(`/`),i=0;for(;i<n.length&&i<r.length-1&&n[i]===r[i];)i++;let a=n.length-i,o=r.slice(i);return(a===0?`./`:`../`.repeat(a))+o.join(`/`)}function Qe(e){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`mailto:`)){window.open(e,`_blank`,`noopener,noreferrer`);return}if(e.startsWith(`#`)||!/\.(md|markdown)(#|\?|$)/i.test(e))return;let t=e.split(`#`)[0].split(`?`)[0],n=$e(F.value??``,t);Re.value.some(e=>e.path===n)?J(n):A.value=`Fichier introuvable: ${n}`}function $e(e,t){if(t.startsWith(`/`))return t.replace(/^\/+/,``);let n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)).split(`/`).filter(Boolean):[];for(let e of t.split(`/`))e===``||e===`.`||(e===`..`?n.pop():n.push(e));return n.join(`/`)}function Q(){F.value&&J(F.value)}function $(){document.visibilityState===`visible`&&Q()}return d(()=>C.scope,()=>{F.value=null,I.value=``,O.value=[],K()}),n(()=>{K(),window.addEventListener(`focus`,Q),document.addEventListener(`visibilitychange`,$)}),t(()=>{X(),window.removeEventListener(`focus`,Q),document.removeEventListener(`visibilitychange`,$)}),(e,t)=>M.value?(h(),b(`div`,ae,[t[8]||=m(`i`,{class:`pi pi-folder-open wiki__not-configured-icon`},null,-1),t[9]||=m(`h2`,null,`Le dossier de documentation n'existe pas encore`,-1),m(`p`,null,[t[7]||=x(` Chemin attendu : `,-1),m(`code`,null,S(M.value),1)]),p(u(T),{icon:`pi pi-plus`,label:`Créer le dossier`,loading:N.value,onClick:Be},null,8,[`loading`])])):j.value?(h(),b(`div`,oe,[t[11]||=m(`i`,{class:`pi pi-cog wiki__not-configured-icon`},null,-1),m(`h2`,null,S(q.value?`Wiki global non configuré`:`Documentation du service non configurée`),1),q.value?(h(),b(`p`,se,` Le wiki global a besoin d'un chemin absolu vers un dossier sur disque pour fonctionner. `)):(h(),b(`p`,ce,[...t[10]||=[x(` Ce service n'a pas de `,-1),m(`code`,null,`cwd`,-1),x(` ni de `,-1),m(`code`,null,`docsPath`,-1),x(` renseigné. `,-1)]])),p(u(T),{icon:`pi pi-arrow-right`,label:q.value?`Configurer le wiki global`:`Configurer le service`,onClick:Ue},null,8,[`label`])])):(h(),b(`div`,le,[m(`aside`,ue,[m(`div`,de,[m(`span`,{class:`wiki__sidebar-title`,title:D.value},S(D.value||`Pages`),9,fe),m(`div`,pe,[p(u(T),{icon:`pi pi-folder-plus`,size:`small`,text:``,rounded:``,title:`Nouveau dossier racine`,onClick:t[0]||=e=>Z(``,`dir`)}),p(u(T),{icon:`pi pi-file-plus`,size:`small`,text:``,rounded:``,title:`Nouveau fichier racine`,onClick:t[1]||=e=>Z(``,`file`)}),p(u(T),{icon:`pi pi-refresh`,size:`small`,text:``,rounded:``,title:`Rafraîchir`,onClick:K})])]),k.value?(h(),b(`div`,me,`Chargement…`)):A.value?(h(),b(`div`,he,S(A.value),1)):O.value.length===0?(h(),b(`div`,ge,` Aucun fichier. Utilisez les boutons en haut pour créer un fichier ou un dossier. `)):(h(),b(`ul`,_e,[(h(!0),b(f,null,c(O.value,e=>(h(),b(`li`,{key:e.path},[p(ie,{entry:e,"selected-path":F.value,expanded:P.value,editable:!0,onToggle:We,onSelect:J,onCreateChild:Z,onRename:qe,onDelete:Je},null,8,[`entry`,`selected-path`,`expanded`])]))),128))]))]),m(`section`,ve,[F.value?(h(),b(f,{key:0},[m(`div`,ye,[t[16]||=m(`i`,{class:`pi pi-file wiki__title-icon`},null,-1),m(`span`,be,S(F.value),1),z.value?(h(),b(`span`,xe,[R.value?(h(),b(`span`,Se,[...t[12]||=[m(`i`,{class:`pi pi-spin pi-spinner`},null,-1),x(` Sauvegarde…`,-1)]])):I.value===u(V)?(h(),b(`span`,we,[...t[14]||=[m(`i`,{class:`pi pi-check`},null,-1),x(` Sauvegardé`,-1)]])):(h(),b(`span`,Ce,[...t[13]||=[m(`i`,{class:`pi pi-circle-fill wiki__status-pending`},null,-1),x(` Modifié`,-1)]]))])):(h(),b(`span`,Te,[...t[15]||=[m(`i`,{class:`pi pi-eye`},null,-1),x(` Lecture seule `,-1)]])),p(u(T),{icon:z.value?`pi pi-check`:`pi pi-pencil`,label:z.value?`Terminer`:`Modifier`,size:`small`,severity:z.value?`success`:`secondary`,outlined:!z.value,onClick:Ke},null,8,[`icon`,`label`,`severity`,`outlined`]),p(u(T),{icon:`pi pi-refresh`,size:`small`,text:``,rounded:``,title:`Recharger depuis le disque`,loading:L.value,onClick:Q},null,8,[`loading`])]),z.value?(h(),b(`div`,Ee,[p(u(T),{icon:`pi pi-link`,label:`Lier un fichier`,size:`small`,text:``,onClick:Ye})])):_(``,!0),L.value?(h(),b(`div`,De,`Chargement du fichier…`)):(h(),ne(u(re),{key:2,ref_key:`editorRef`,ref:Fe,modelValue:I.value,"onUpdate:modelValue":t[2]||=e=>I.value=e,markdown:``,editable:z.value,class:l([`wiki__editor`,{"wiki__editor--readonly":!z.value}]),placeholder:`Écrivez le contenu de la page…`,onLinkClick:Qe},null,8,[`modelValue`,`editable`,`class`]))],64)):(h(),b(`div`,Oe,[...t[17]||=[m(`i`,{class:`pi pi-book wiki__placeholder-icon`},null,-1),m(`p`,null,`Sélectionnez un fichier ou créez-en un nouveau.`,-1)]]))]),p(u(ee),{visible:W.value.open,"onUpdate:visible":t[4]||=e=>W.value.open=e,header:W.value.title,modal:``,style:{width:`420px`},"close-on-escape":!0,onHide:G},{footer:o(()=>[p(u(T),{label:`Annuler`,severity:`secondary`,outlined:``,size:`small`,onClick:G}),p(u(T),{label:`OK`,size:`small`,disabled:!W.value.value.trim(),onClick:Le},null,8,[`disabled`])]),default:o(()=>[m(`div`,ke,[m(`label`,Ae,S(W.value.label),1),p(u(w),{id:`wiki-prompt-input`,modelValue:W.value.value,"onUpdate:modelValue":t[3]||=e=>W.value.value=e,class:`wiki__prompt-input`,placeholder:W.value.placeholder,autofocus:``,onKeydown:[y(s(Le,[`prevent`]),[`enter`]),y(G,[`escape`])]},null,8,[`modelValue`,`placeholder`,`onKeydown`])])]),_:1},8,[`visible`,`header`]),p(u(ee),{visible:H.value,"onUpdate:visible":t[6]||=e=>H.value=e,header:`Insérer un lien vers un fichier`,modal:``,style:{width:`500px`}},{default:o(()=>[p(u(w),{modelValue:U.value,"onUpdate:modelValue":t[5]||=e=>U.value=e,placeholder:`Rechercher un fichier…`,class:`wiki__link-search`,autofocus:``},null,8,[`modelValue`]),m(`div`,je,[(h(!0),b(f,null,c(ze.value,e=>(h(),b(`button`,{key:e.path,class:`wiki__link-item`,onClick:t=>Xe(e)},[t[18]||=m(`i`,{class:`pi pi-file`},null,-1),m(`span`,Ne,S(e.path),1)],8,Me))),128)),ze.value.length===0?(h(),b(`div`,Pe,` Aucun fichier disponible. `)):_(``,!0)])]),_:1},8,[`visible`])]))}}),[[`__scopeId`,`data-v-10f9637d`]]);export{N as t};
1
+ import{$r as e,Ci as t,Di as n,Fi as r,Fn as i,Gt as a,Ji as o,Jr as s,Ni as c,Qi as l,Sa as u,Wi as d,Xr as f,ci as p,ei as m,gn as ee,ji as h,jn as te,mn as g,ni as _,pa as v,qr as y,ri as b,si as x,ta as S,ti as ne,ui as C,un as w,vn as T}from"./index-BIjjyvxm.js";import{t as re}from"./src-DsmqQeZ9.js";var E={class:`fs-node`},D=[`title`],O={class:`fs-node__name`},k=[`title`],A={class:`fs-node__name`},j={key:2,class:`fs-node__actions`},M={key:0,class:`fs-node__children`},ie=C({__name:`FsNode`,props:{entry:{},selectedPath:{},expanded:{},editable:{type:Boolean}},emits:[`toggle`,`select`,`create-child`,`rename`,`delete`],setup(t,{emit:n}){let i=t,a=n,o=e(()=>i.entry.type===`dir`&&i.expanded.has(i.entry.path)),u=e(()=>i.entry.type===`file`&&i.selectedPath===i.entry.path);return(e,n)=>{let i=r(`FsNode`,!0);return h(),b(`div`,E,[m(`div`,{class:l([`fs-node__row`,{"fs-node__row--selected":u.value}])},[t.entry.type===`dir`?(h(),b(`button`,{key:0,class:`fs-node__main`,title:t.entry.path,onClick:n[0]||=e=>a(`toggle`,t.entry.path)},[m(`i`,{class:l(`pi ${o.value?`pi-chevron-down`:`pi-chevron-right`} fs-node__caret`)},null,2),m(`i`,{class:l(`pi ${o.value?`pi-folder-open`:`pi-folder`} fs-node__icon fs-node__icon--folder`)},null,2),m(`span`,O,S(t.entry.name),1)],8,D)):(h(),b(`button`,{key:1,class:`fs-node__main`,title:t.entry.path,onClick:n[1]||=e=>a(`select`,t.entry.path)},[n[11]||=m(`span`,{class:`fs-node__caret-spacer`},null,-1),n[12]||=m(`i`,{class:`pi pi-file fs-node__icon`},null,-1),m(`span`,A,S(t.entry.name),1)],8,k)),t.editable?(h(),b(`div`,j,[t.entry.type===`dir`?(h(),b(`button`,{key:0,class:`fs-node__action`,title:`Nouveau fichier`,onClick:n[2]||=s(e=>a(`create-child`,t.entry.path,`file`),[`stop`])},[...n[13]||=[m(`i`,{class:`pi pi-file-plus`},null,-1)]])):_(``,!0),t.entry.type===`dir`?(h(),b(`button`,{key:1,class:`fs-node__action`,title:`Nouveau dossier`,onClick:n[3]||=s(e=>a(`create-child`,t.entry.path,`dir`),[`stop`])},[...n[14]||=[m(`i`,{class:`pi pi-folder-plus`},null,-1)]])):_(``,!0),m(`button`,{class:`fs-node__action`,title:`Renommer`,onClick:n[4]||=s(e=>a(`rename`,t.entry.path,t.entry.type===`dir`),[`stop`])},[...n[15]||=[m(`i`,{class:`pi pi-pencil`},null,-1)]]),m(`button`,{class:`fs-node__action fs-node__action--danger`,title:`Supprimer`,onClick:n[5]||=s(e=>a(`delete`,t.entry.path,t.entry.type===`dir`),[`stop`])},[...n[16]||=[m(`i`,{class:`pi pi-trash`},null,-1)]])])):_(``,!0)],2),t.entry.type===`dir`&&o.value?(h(),b(`ul`,M,[(h(!0),b(f,null,c(t.entry.children,e=>(h(),b(`li`,{key:e.path},[p(i,{entry:e,"selected-path":t.selectedPath,expanded:t.expanded,editable:t.editable,onToggle:n[6]||=e=>a(`toggle`,e),onSelect:n[7]||=e=>a(`select`,e),onCreateChild:n[8]||=(e,t)=>a(`create-child`,e,t),onRename:n[9]||=(e,t)=>a(`rename`,e,t),onDelete:n[10]||=(e,t)=>a(`delete`,e,t)},null,8,[`entry`,`selected-path`,`expanded`,`editable`])]))),128))])):_(``,!0)])}}}),ae={key:0,class:`wiki__not-configured`},oe={key:1,class:`wiki__not-configured`},se={key:0},ce={key:1},le={key:2,class:`wiki`},ue={class:`wiki__sidebar`},de={class:`wiki__sidebar-header`},fe=[`title`],pe={class:`wiki__sidebar-actions`},me={key:0,class:`wiki__loading`},he={key:1,class:`wiki__error`},ge={key:2,class:`wiki__empty`},_e={key:3,class:`wiki__tree`},ve={class:`wiki__main`},ye={class:`wiki__title-row`},be={class:`wiki__title-path`},xe={key:0,class:`wiki__status`},Se={key:0},Ce={key:1},we={key:2,class:`wiki__status-saved`},Te={key:1,class:`wiki__status wiki__status-readonly`},Ee={key:0,class:`wiki__editor-actions`},De={key:1,class:`wiki__loading`},Oe={key:1,class:`wiki__placeholder`},ke={class:`wiki__prompt-body`},Ae={for:`wiki-prompt-input`,class:`wiki__prompt-label`},je={class:`wiki__link-list`},Me=[`onClick`],Ne={class:`wiki__link-path`},Pe={key:0,class:`wiki__link-empty`},N=g(C({__name:`WikiView`,props:{scope:{}},setup(r){let g=te(),C=r,E=i(),D=v(``),O=v([]),k=v(!1),A=v(null),j=v(!1),M=v(null),N=v(!1),P=v(new Set),F=v(null),I=v(``),L=v(!1),R=v(!1),z=v(!1),B=null,V=``,Fe=v(null),H=v(!1),U=v(``),W=v({open:!1,title:``,label:``,value:``,placeholder:``,resolve:null});function Ie(e){return new Promise(t=>{W.value={open:!0,title:e.title,label:e.label,value:e.initialValue??``,placeholder:e.placeholder??``,resolve:t}})}function Le(){let e=W.value.value.trim();W.value.resolve?.(e||null),W.value.open=!1}function G(){W.value.resolve?.(null),W.value.open=!1}let Re=e(()=>{let e=[],t=n=>{for(let r of n)r.type===`file`?e.push({path:r.path,name:r.name}):t(r.children)};return t(O.value),e}),ze=e(()=>{let e=U.value.trim().toLowerCase();return Re.value.filter(e=>e.path!==F.value).filter(t=>!e||t.path.toLowerCase().includes(e))});async function K(){k.value=!0,A.value=null,j.value=!1,M.value=null;try{let e=await a.wiki.list.query({scope:C.scope});D.value=e.root,O.value=e.entries}catch(e){let t=e.message;if(/Aucun dossier de docs|globalDocsPath|docsPath|Aucun cwd/i.test(t))j.value=!0;else{let e=t.match(/Dossier introuvable:\s*(.+)$/);e?M.value=e[1].trim():A.value=t}}finally{k.value=!1}}async function Be(){N.value=!0;try{await a.wiki.ensureRoot.mutate({scope:C.scope}),M.value=null,await K()}catch(e){A.value=e.message}finally{N.value=!1}}let q=e(()=>C.scope===`global`),Ve=e(()=>C.scope.startsWith(`service:`)),He=e(()=>Ve.value?C.scope.slice(8):null);function Ue(){q.value?g.push({name:`settings`,query:{section:`general`}}):He.value&&g.push(`/services/${He.value}/config?configTab=general`)}function We(e){P.value.has(e)?P.value.delete(e):P.value.add(e),P.value=new Set(P.value)}async function J(e){X(),z.value=!1,F.value=e,L.value=!0,I.value=``;try{let t=await a.wiki.read.query({scope:C.scope,path:e});I.value=t.content,V=t.content;let n=e.split(`/`);for(n.pop();n.length;)P.value.add(n.join(`/`)),n.pop();P.value=new Set(P.value)}catch(e){A.value=e.message}finally{L.value=!1}}function Ge(){B&&clearTimeout(B),B=setTimeout(()=>{Y()},800)}async function Y(){if(!F.value||I.value===V)return;let e=F.value,t=I.value;R.value=!0;try{await a.wiki.write.mutate({scope:C.scope,path:e,content:t}),V=t}catch(e){A.value=e.message}finally{R.value=!1}}function X(){B&&(clearTimeout(B),B=null,Y())}d(I,()=>{F.value&&z.value&&Ge()});function Ke(){z.value?(X(),z.value=!1):z.value=!0}async function Z(e,t){let n=await Ie({title:t===`file`?`Nouveau fichier`:`Nouveau dossier`,label:t===`file`?`Nom du fichier (sans extension)`:`Nom du dossier`,initialValue:t===`file`?`nouveau`:`nouveau-dossier`});if(!n)return;let r=n.trim().replace(/[^A-Za-z0-9_./-]/g,`-`);if(!r)return;let i=t===`file`&&!/\.(md|markdown)$/i.test(r)?`${r}.md`:r,o=e?`${e}/${i}`:i;try{t===`file`?(await a.wiki.createFile.mutate({scope:C.scope,path:o}),await K(),J(o)):(await a.wiki.createDir.mutate({scope:C.scope,path:o}),P.value.add(o),P.value=new Set(P.value),await K())}catch(e){A.value=e.message}}async function qe(e,t){let n=e.split(`/`),r=n[n.length-1],i=await Ie({title:`Renommer`,label:`Nouveau nom`,initialValue:r});if(!i||i===r)return;let o=i.trim().replace(/[^A-Za-z0-9_./-]/g,`-`);if(!o)return;let s=!t&&!/\.(md|markdown)$/i.test(o)?`${o}.md`:o;n[n.length-1]=s;let c=n.join(`/`);try{await a.wiki.rename.mutate({scope:C.scope,fromPath:e,toPath:c}),F.value===e&&(F.value=c),await K()}catch(e){A.value=e.message}}function Je(e,t){E.require({message:`Supprimer "${e}" ${t?`(et tout son contenu)`:``} ?`,header:`Confirmation`,icon:`pi pi-exclamation-triangle`,rejectProps:{label:`Annuler`,severity:`secondary`,outlined:!0},acceptProps:{label:`Supprimer`,severity:`danger`},accept:async()=>{try{await a.wiki.delete.mutate({scope:C.scope,path:e}),(F.value===e||t&&F.value?.startsWith(e+`/`))&&(F.value=null,I.value=``),await K()}catch(e){A.value=e.message}}})}function Ye(){U.value=``,H.value=!0}function Xe(e){let t=Ze(F.value??``,e.path);Fe.value?.insertWikiLink?.(t,e.name.replace(/\.(md|markdown)$/i,``)),H.value=!1}function Ze(e,t){let n=e.split(`/`);n.pop();let r=t.split(`/`),i=0;for(;i<n.length&&i<r.length-1&&n[i]===r[i];)i++;let a=n.length-i,o=r.slice(i);return(a===0?`./`:`../`.repeat(a))+o.join(`/`)}function Qe(e){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`mailto:`)){window.open(e,`_blank`,`noopener,noreferrer`);return}if(e.startsWith(`#`)||!/\.(md|markdown)(#|\?|$)/i.test(e))return;let t=e.split(`#`)[0].split(`?`)[0],n=$e(F.value??``,t);Re.value.some(e=>e.path===n)?J(n):A.value=`Fichier introuvable: ${n}`}function $e(e,t){if(t.startsWith(`/`))return t.replace(/^\/+/,``);let n=e.includes(`/`)?e.slice(0,e.lastIndexOf(`/`)).split(`/`).filter(Boolean):[];for(let e of t.split(`/`))e===``||e===`.`||(e===`..`?n.pop():n.push(e));return n.join(`/`)}function Q(){F.value&&J(F.value)}function $(){document.visibilityState===`visible`&&Q()}return d(()=>C.scope,()=>{F.value=null,I.value=``,O.value=[],K()}),n(()=>{K(),window.addEventListener(`focus`,Q),document.addEventListener(`visibilitychange`,$)}),t(()=>{X(),window.removeEventListener(`focus`,Q),document.removeEventListener(`visibilitychange`,$)}),(e,t)=>M.value?(h(),b(`div`,ae,[t[8]||=m(`i`,{class:`pi pi-folder-open wiki__not-configured-icon`},null,-1),t[9]||=m(`h2`,null,`Le dossier de documentation n'existe pas encore`,-1),m(`p`,null,[t[7]||=x(` Chemin attendu : `,-1),m(`code`,null,S(M.value),1)]),p(u(T),{icon:`pi pi-plus`,label:`Créer le dossier`,loading:N.value,onClick:Be},null,8,[`loading`])])):j.value?(h(),b(`div`,oe,[t[11]||=m(`i`,{class:`pi pi-cog wiki__not-configured-icon`},null,-1),m(`h2`,null,S(q.value?`Wiki global non configuré`:`Documentation du service non configurée`),1),q.value?(h(),b(`p`,se,` Le wiki global a besoin d'un chemin absolu vers un dossier sur disque pour fonctionner. `)):(h(),b(`p`,ce,[...t[10]||=[x(` Ce service n'a pas de `,-1),m(`code`,null,`cwd`,-1),x(` ni de `,-1),m(`code`,null,`docsPath`,-1),x(` renseigné. `,-1)]])),p(u(T),{icon:`pi pi-arrow-right`,label:q.value?`Configurer le wiki global`:`Configurer le service`,onClick:Ue},null,8,[`label`])])):(h(),b(`div`,le,[m(`aside`,ue,[m(`div`,de,[m(`span`,{class:`wiki__sidebar-title`,title:D.value},S(D.value||`Pages`),9,fe),m(`div`,pe,[p(u(T),{icon:`pi pi-folder-plus`,size:`small`,text:``,rounded:``,title:`Nouveau dossier racine`,onClick:t[0]||=e=>Z(``,`dir`)}),p(u(T),{icon:`pi pi-file-plus`,size:`small`,text:``,rounded:``,title:`Nouveau fichier racine`,onClick:t[1]||=e=>Z(``,`file`)}),p(u(T),{icon:`pi pi-refresh`,size:`small`,text:``,rounded:``,title:`Rafraîchir`,onClick:K})])]),k.value?(h(),b(`div`,me,`Chargement…`)):A.value?(h(),b(`div`,he,S(A.value),1)):O.value.length===0?(h(),b(`div`,ge,` Aucun fichier. Utilisez les boutons en haut pour créer un fichier ou un dossier. `)):(h(),b(`ul`,_e,[(h(!0),b(f,null,c(O.value,e=>(h(),b(`li`,{key:e.path},[p(ie,{entry:e,"selected-path":F.value,expanded:P.value,editable:!0,onToggle:We,onSelect:J,onCreateChild:Z,onRename:qe,onDelete:Je},null,8,[`entry`,`selected-path`,`expanded`])]))),128))]))]),m(`section`,ve,[F.value?(h(),b(f,{key:0},[m(`div`,ye,[t[16]||=m(`i`,{class:`pi pi-file wiki__title-icon`},null,-1),m(`span`,be,S(F.value),1),z.value?(h(),b(`span`,xe,[R.value?(h(),b(`span`,Se,[...t[12]||=[m(`i`,{class:`pi pi-spin pi-spinner`},null,-1),x(` Sauvegarde…`,-1)]])):I.value===u(V)?(h(),b(`span`,we,[...t[14]||=[m(`i`,{class:`pi pi-check`},null,-1),x(` Sauvegardé`,-1)]])):(h(),b(`span`,Ce,[...t[13]||=[m(`i`,{class:`pi pi-circle-fill wiki__status-pending`},null,-1),x(` Modifié`,-1)]]))])):(h(),b(`span`,Te,[...t[15]||=[m(`i`,{class:`pi pi-eye`},null,-1),x(` Lecture seule `,-1)]])),p(u(T),{icon:z.value?`pi pi-check`:`pi pi-pencil`,label:z.value?`Terminer`:`Modifier`,size:`small`,severity:z.value?`success`:`secondary`,outlined:!z.value,onClick:Ke},null,8,[`icon`,`label`,`severity`,`outlined`]),p(u(T),{icon:`pi pi-refresh`,size:`small`,text:``,rounded:``,title:`Recharger depuis le disque`,loading:L.value,onClick:Q},null,8,[`loading`])]),z.value?(h(),b(`div`,Ee,[p(u(T),{icon:`pi pi-link`,label:`Lier un fichier`,size:`small`,text:``,onClick:Ye})])):_(``,!0),L.value?(h(),b(`div`,De,`Chargement du fichier…`)):(h(),ne(u(re),{key:2,ref_key:`editorRef`,ref:Fe,modelValue:I.value,"onUpdate:modelValue":t[2]||=e=>I.value=e,markdown:``,editable:z.value,class:l([`wiki__editor`,{"wiki__editor--readonly":!z.value}]),placeholder:`Écrivez le contenu de la page…`,onLinkClick:Qe},null,8,[`modelValue`,`editable`,`class`]))],64)):(h(),b(`div`,Oe,[...t[17]||=[m(`i`,{class:`pi pi-book wiki__placeholder-icon`},null,-1),m(`p`,null,`Sélectionnez un fichier ou créez-en un nouveau.`,-1)]]))]),p(u(ee),{visible:W.value.open,"onUpdate:visible":t[4]||=e=>W.value.open=e,header:W.value.title,modal:``,style:{width:`420px`},"close-on-escape":!0,onHide:G},{footer:o(()=>[p(u(T),{label:`Annuler`,severity:`secondary`,outlined:``,size:`small`,onClick:G}),p(u(T),{label:`OK`,size:`small`,disabled:!W.value.value.trim(),onClick:Le},null,8,[`disabled`])]),default:o(()=>[m(`div`,ke,[m(`label`,Ae,S(W.value.label),1),p(u(w),{id:`wiki-prompt-input`,modelValue:W.value.value,"onUpdate:modelValue":t[3]||=e=>W.value.value=e,class:`wiki__prompt-input`,placeholder:W.value.placeholder,autofocus:``,onKeydown:[y(s(Le,[`prevent`]),[`enter`]),y(G,[`escape`])]},null,8,[`modelValue`,`placeholder`,`onKeydown`])])]),_:1},8,[`visible`,`header`]),p(u(ee),{visible:H.value,"onUpdate:visible":t[6]||=e=>H.value=e,header:`Insérer un lien vers un fichier`,modal:``,style:{width:`500px`}},{default:o(()=>[p(u(w),{modelValue:U.value,"onUpdate:modelValue":t[5]||=e=>U.value=e,placeholder:`Rechercher un fichier…`,class:`wiki__link-search`,autofocus:``},null,8,[`modelValue`]),m(`div`,je,[(h(!0),b(f,null,c(ze.value,e=>(h(),b(`button`,{key:e.path,class:`wiki__link-item`,onClick:t=>Xe(e)},[t[18]||=m(`i`,{class:`pi pi-file`},null,-1),m(`span`,Ne,S(e.path),1)],8,Me))),128)),ze.value.length===0?(h(),b(`div`,Pe,` Aucun fichier disponible. `)):_(``,!0)])]),_:1},8,[`visible`])]))}}),[[`__scopeId`,`data-v-10f9637d`]]);export{N as t};