abstra 3.24.6__py3-none-any.whl → 3.24.8__py3-none-any.whl

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.

Potentially problematic release.


This version of abstra might be problematic. Click here for more details.

Files changed (219) hide show
  1. {abstra-3.24.6.dist-info → abstra-3.24.8.dist-info}/METADATA +1 -1
  2. {abstra-3.24.6.dist-info → abstra-3.24.8.dist-info}/RECORD +176 -175
  3. abstra_internals/contracts_generated.py +2873 -2735
  4. abstra_internals/repositories/git/native.py +1 -1
  5. abstra_internals/repositories/tasks.py +22 -21
  6. abstra_internals/services/fs.py +25 -0
  7. abstra_internals/tasks_watcher.py +16 -1
  8. abstra_internals/tasks_watcher_test.py +254 -0
  9. abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.905e8d9e.js +2 -0
  10. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.11067aac.js +2 -0
  11. abstra_statics/dist/assets/ApiKeys.c2a1c483.js +2 -0
  12. abstra_statics/dist/assets/App.608af2ed.js +2 -0
  13. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.8bbdcede.js +2 -0
  14. abstra_statics/dist/assets/{BaseLayout.fed5adb7.js → BaseLayout.b03df2cd.js} +2 -2
  15. abstra_statics/dist/assets/Billing.f84cedb5.js +2 -0
  16. abstra_statics/dist/assets/{Breadcrumb.ae24888f.js → Breadcrumb.9686bc9b.js} +2 -2
  17. abstra_statics/dist/assets/{Builds.c30d0eb0.js → Builds.c90a1506.js} +2 -2
  18. abstra_statics/dist/assets/{Card.e1ec3051.js → Card.95a0c7f0.js} +2 -2
  19. abstra_statics/dist/assets/{CircularLoading.26cebe64.js → CircularLoading.6ab785c3.js} +2 -2
  20. abstra_statics/dist/assets/CloseCircleOutlined.66e5f1b1.js +2 -0
  21. abstra_statics/dist/assets/{ConnectorsView.6eae8e1e.js → ConnectorsView.bac282fa.js} +2 -2
  22. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.e768f033.js +2 -0
  23. abstra_statics/dist/assets/ContentLayout.2ae39d29.js +2 -0
  24. abstra_statics/dist/assets/{CrudView.ca91f805.js → CrudView.391f0e9f.js} +2 -2
  25. abstra_statics/dist/assets/{DocsButton.vue_vue_type_script_setup_true_lang.c50f6a0a.js → DocsButton.vue_vue_type_script_setup_true_lang.e6d1d3ad.js} +2 -2
  26. abstra_statics/dist/assets/{EditorLogin.19fe1dcc.js → EditorLogin.feee5e85.js} +2 -2
  27. abstra_statics/dist/assets/{EditorsView.3f4d1241.js → EditorsView.b9309eb9.js} +2 -2
  28. abstra_statics/dist/assets/EnvVars.facbb73b.js +2 -0
  29. abstra_statics/dist/assets/{Error.f38d90e4.js → Error.cec1d9ae.js} +2 -2
  30. abstra_statics/dist/assets/ExclamationCircleOutlined.81063754.js +2 -0
  31. abstra_statics/dist/assets/{ExecutionContext.69bc5c09.js → ExecutionContext.8c367ef7.js} +2 -2
  32. abstra_statics/dist/assets/{ExecutionStatusIcon.vue_vue_type_script_setup_true_lang.a2a7ab75.js → ExecutionStatusIcon.vue_vue_type_script_setup_true_lang.7bd1f43d.js} +2 -2
  33. abstra_statics/dist/assets/{Files.81259c6b.js → Files.325d463d.js} +2 -2
  34. abstra_statics/dist/assets/{Form.723342d2.js → Form.48029b6f.js} +2 -2
  35. abstra_statics/dist/assets/{FormRunner.d1186e5c.js → FormRunner.7e7ce26d.js} +2 -2
  36. abstra_statics/dist/assets/Home.72bb903d.js +2 -0
  37. abstra_statics/dist/assets/{Home.bad5d80b.js → Home.fb4fb018.js} +2 -2
  38. abstra_statics/dist/assets/LoadingContainer.e7fd3862.js +2 -0
  39. abstra_statics/dist/assets/LoadingOutlined.eb1ab7c7.js +2 -0
  40. abstra_statics/dist/assets/Login.ab4296a6.js +2 -0
  41. abstra_statics/dist/assets/{Login.a40bc609.js → Login.f25e3cc8.js} +2 -2
  42. abstra_statics/dist/assets/{Login.vue_vue_type_script_setup_true_lang.6f146a14.js → Login.vue_vue_type_script_setup_true_lang.c0c3af9a.js} +2 -2
  43. abstra_statics/dist/assets/Logo.417950ea.js +2 -0
  44. abstra_statics/dist/assets/{Logs.859d8699.js → Logs.eff00ffa.js} +2 -2
  45. abstra_statics/dist/assets/Main.9c7e6552.js +2 -0
  46. abstra_statics/dist/assets/{MockForm.958e1a8b.js → MockForm.a8c36e57.js} +2 -2
  47. abstra_statics/dist/assets/{Navbar.299ef0ee.js → Navbar.36275768.js} +2 -2
  48. abstra_statics/dist/assets/{NewEditor.1d3b7038.js → NewEditor.652251d2.js} +2 -2
  49. abstra_statics/dist/assets/OidcLoginCallback.31318c8c.js +2 -0
  50. abstra_statics/dist/assets/OidcLogoutCallback.af3bbbed.js +2 -0
  51. abstra_statics/dist/assets/{OmniChat.fb0615b3.js → OmniChat.6d49a0d2.js} +2 -2
  52. abstra_statics/dist/assets/{OnboardingView.e2af008f.js → OnboardingView.ec680bc2.js} +2 -2
  53. abstra_statics/dist/assets/{Organization.1c340a2f.js → Organization.640cf320.js} +2 -2
  54. abstra_statics/dist/assets/Organizations.be19ecba.js +2 -0
  55. abstra_statics/dist/assets/{PhArrowCounterClockwise.vue.dbc4fdc7.js → PhArrowCounterClockwise.vue.44a61827.js} +2 -2
  56. abstra_statics/dist/assets/{PhArrowSquareOut.vue.5a8d2f86.js → PhArrowSquareOut.vue.d71d80fc.js} +2 -2
  57. abstra_statics/dist/assets/{PhClockCounterClockwise.vue.15ff64b9.js → PhClockCounterClockwise.vue.701e6c6a.js} +2 -2
  58. abstra_statics/dist/assets/{PhCopy.vue.3f2b76a2.js → PhCopy.vue.5aeb9248.js} +2 -2
  59. abstra_statics/dist/assets/{PhCopySimple.vue.7cacc0f7.js → PhCopySimple.vue.33922e71.js} +2 -2
  60. abstra_statics/dist/assets/{PhCube.vue.6a150c53.js → PhCube.vue.3f7281ae.js} +2 -2
  61. abstra_statics/dist/assets/PhDatabase.vue.09fef09d.js +2 -0
  62. abstra_statics/dist/assets/{PhDotsThreeVertical.vue.e305b3a2.js → PhDotsThreeVertical.vue.b3fda5f6.js} +2 -2
  63. abstra_statics/dist/assets/{PhDownloadSimple.vue.2759a067.js → PhDownloadSimple.vue.db22067f.js} +2 -2
  64. abstra_statics/dist/assets/{PhFileArrowUp.vue.7e13d264.js → PhFileArrowUp.vue.1e3b8493.js} +2 -2
  65. abstra_statics/dist/assets/{PhFilePlus.vue.537e8e0d.js → PhFilePlus.vue.1b7fc04b.js} +2 -2
  66. abstra_statics/dist/assets/{PhFolderPlus.vue.53737c9c.js → PhFolderPlus.vue.7b02d45f.js} +2 -2
  67. abstra_statics/dist/assets/{PhGear.vue.3a3d45d2.js → PhGear.vue.3049f8f5.js} +2 -2
  68. abstra_statics/dist/assets/{PhKey.vue.07ccc3ef.js → PhKey.vue.3fb1fd34.js} +2 -2
  69. abstra_statics/dist/assets/{PhPencil.vue.e0099a7f.js → PhPencil.vue.8e94a4bd.js} +2 -2
  70. abstra_statics/dist/assets/{PhPencilSimple.vue.7ffd0edb.js → PhPencilSimple.vue.c30ff752.js} +2 -2
  71. abstra_statics/dist/assets/{PhRocket.vue.a2ca27d6.js → PhRocket.vue.1927fd55.js} +2 -2
  72. abstra_statics/dist/assets/{PhSignOut.vue.4f6997f5.js → PhSignOut.vue.0c10fd8d.js} +2 -2
  73. abstra_statics/dist/assets/{PhSparkle.vue.e6119d8d.js → PhSparkle.vue.88da054d.js} +2 -2
  74. abstra_statics/dist/assets/{PhTranslate.vue.d4756feb.js → PhTranslate.vue.5fd55ee3.js} +2 -2
  75. abstra_statics/dist/assets/{PhUsersThree.vue.50cc946e.js → PhUsersThree.vue.506e9873.js} +2 -2
  76. abstra_statics/dist/assets/{PhWarningCircle.vue.03a6e5c8.js → PhWarningCircle.vue.139a2f32.js} +2 -2
  77. abstra_statics/dist/assets/{PhWebhooksLogo.vue.13c489ce.js → PhWebhooksLogo.vue.28d1edea.js} +2 -2
  78. abstra_statics/dist/assets/{PlayerConfigProvider.d0d5439f.js → PlayerConfigProvider.f7be8491.js} +2 -2
  79. abstra_statics/dist/assets/{PlayerNavbar.fd53d29e.js → PlayerNavbar.fb3a012d.js} +2 -2
  80. abstra_statics/dist/assets/{Project.7c3bdd8a.js → Project.6af32e98.js} +2 -2
  81. abstra_statics/dist/assets/{ProjectLogin.9cec413b.js → ProjectLogin.7f541a88.js} +2 -2
  82. abstra_statics/dist/assets/ProjectSettings.52805237.js +2 -0
  83. abstra_statics/dist/assets/{ProjectsView.4d026e78.js → ProjectsView.53e4ed94.js} +2 -2
  84. abstra_statics/dist/assets/{SaveButton.813aaf8d.js → SaveButton.bf92f582.js} +2 -2
  85. abstra_statics/dist/assets/{ScrollArea.vue_vue_type_script_setup_true_lang.e8269806.js → ScrollArea.vue_vue_type_script_setup_true_lang.b4f189da.js} +2 -2
  86. abstra_statics/dist/assets/{Sidebar.08e9b51a.js → Sidebar.af08c680.js} +2 -2
  87. abstra_statics/dist/assets/{Sql.18a715c6.js → Sql.fd118d60.js} +4 -4
  88. abstra_statics/dist/assets/Steps.27508a86.js +2 -0
  89. abstra_statics/dist/assets/{TableCard.2543b684.js → TableCard.0bcd184a.js} +2 -2
  90. abstra_statics/dist/assets/{TableEditor.ee57cc7f.js → TableEditor.0b14bc7b.js} +2 -2
  91. abstra_statics/dist/assets/{Tables.a358bf91.js → Tables.8dabe248.js} +2 -2
  92. abstra_statics/dist/assets/{TablesDiagram.991fc1b3.js → TablesDiagram.547215e0.js} +2 -2
  93. abstra_statics/dist/assets/{TablesTabs.vue_vue_type_script_setup_true_lang.744da918.js → TablesTabs.vue_vue_type_script_setup_true_lang.9027b106.js} +2 -2
  94. abstra_statics/dist/assets/Tasks.6d16250c.js +2 -0
  95. abstra_statics/dist/assets/{UploadOutlined.113850a1.js → UploadOutlined.736aa5bc.js} +2 -2
  96. abstra_statics/dist/assets/{View.67504c02.js → View.b4fa346f.js} +2 -2
  97. abstra_statics/dist/assets/{View.vue_vue_type_script_setup_true_lang.f7c2ef15.js → View.vue_vue_type_script_setup_true_lang.d5d3a410.js} +2 -2
  98. abstra_statics/dist/assets/{Watermark.6e692419.js → Watermark.e6c4654b.js} +2 -2
  99. abstra_statics/dist/assets/{WebEditor.7a1fcb94.js → WebEditor.49aee538.js} +2 -2
  100. abstra_statics/dist/assets/{WidgetPreview.0b7ab78b.js → WidgetPreview.e0916bed.js} +2 -2
  101. abstra_statics/dist/assets/{WorkflowViewer.95d64da4.js → WorkflowViewer.b2b3ee29.js} +2 -2
  102. abstra_statics/dist/assets/ant-design.805ab95d.js +2 -0
  103. abstra_statics/dist/assets/{apiKey.975dfeae.js → apiKey.1b1aafc4.js} +2 -2
  104. abstra_statics/dist/assets/asyncComputed.0308626b.js +2 -0
  105. abstra_statics/dist/assets/{build.c626214a.js → build.1cc9147c.js} +2 -2
  106. abstra_statics/dist/assets/colorHelpers.93df70ab.js +2 -0
  107. abstra_statics/dist/assets/{console.1e432ec7.js → console.c2a83def.js} +2 -2
  108. abstra_statics/dist/assets/constants.ba2d8460.js +2 -0
  109. abstra_statics/dist/assets/{contracts.generated.c5043d35.js → contracts.generated.bc42bf02.js} +2 -2
  110. abstra_statics/dist/assets/{cssMode.75e3c56c.js → cssMode.da3677b5.js} +2 -2
  111. abstra_statics/dist/assets/datetime.049cd1b4.js +2 -0
  112. abstra_statics/dist/assets/dayjs.ba8d5e03.js +2 -0
  113. abstra_statics/dist/assets/editor.4df699e8.js +2 -0
  114. abstra_statics/dist/assets/editor.main.1441c190.js +2 -0
  115. abstra_statics/dist/assets/fetch.6b0b8dbd.js +2 -0
  116. abstra_statics/dist/assets/files.a48976ba.js +2 -0
  117. abstra_statics/dist/assets/{folder.bd31d9bc.js → folder.1303b3cc.js} +2 -2
  118. abstra_statics/dist/assets/{freemarker2.400d456f.js → freemarker2.78f622a4.js} +2 -2
  119. abstra_statics/dist/assets/{handlebars.d8549cd4.js → handlebars.f24ca206.js} +3 -3
  120. abstra_statics/dist/assets/{html.dcc0e819.js → html.d6232cb7.js} +3 -3
  121. abstra_statics/dist/assets/{htmlMode.b93d1fe9.js → htmlMode.66845b4f.js} +2 -2
  122. abstra_statics/dist/assets/{index.a4dc5332.js → index.4073d3ba.js} +2 -2
  123. abstra_statics/dist/assets/{index.36a090cf.js → index.5654c649.js} +2 -2
  124. abstra_statics/dist/assets/{index.dfc79bf7.js → index.5eda0243.js} +2 -2
  125. abstra_statics/dist/assets/{index.5ecb9a37.js → index.680764ed.js} +2 -2
  126. abstra_statics/dist/assets/{index.ddb89818.js → index.705ce630.js} +2 -2
  127. abstra_statics/dist/assets/{index.99fb59f0.js → index.aa2603a0.js} +2 -2
  128. abstra_statics/dist/assets/{index.ab7dc629.js → index.bbb3a202.js} +2 -2
  129. abstra_statics/dist/assets/index.c25fb6e2.js +2 -0
  130. abstra_statics/dist/assets/{index.2400150a.js → index.fd17682d.js} +2 -2
  131. abstra_statics/dist/assets/{javascript.6a1a2db7.js → javascript.1009e690.js} +3 -3
  132. abstra_statics/dist/assets/{jsonMode.0650153f.js → jsonMode.bd88eaca.js} +2 -2
  133. abstra_statics/dist/assets/{jwt-decode.cfe2994b.css → jwt-decode.aa5b9ed3.css} +1 -1
  134. abstra_statics/dist/assets/{jwt-decode.esm.32f71954.js → jwt-decode.esm.4071145e.js} +9 -8
  135. abstra_statics/dist/assets/{linters.3b9f6de6.js → linters.5d49f0b2.js} +2 -2
  136. abstra_statics/dist/assets/{liquid.612ef64b.js → liquid.fd06ec69.js} +3 -3
  137. abstra_statics/dist/assets/{member.91dd2bc0.js → member.d4cf4c10.js} +2 -2
  138. abstra_statics/dist/assets/{metadata.c5f500d1.js → metadata.bd34dda0.js} +2 -2
  139. abstra_statics/dist/assets/{omniChatStore.10d769d2.js → omniChatStore.3d16b4ad.js} +4 -4
  140. abstra_statics/dist/assets/{organization.2c5a9815.js → organization.1b235ed0.js} +2 -2
  141. abstra_statics/dist/assets/{os.d718583c.js → os.b6b83ab9.js} +2 -2
  142. abstra_statics/dist/assets/player.9c3751ac.js +2 -0
  143. abstra_statics/dist/assets/{plotly.min.cdd940d3.js → plotly.min.5ef097da.js} +2 -2
  144. abstra_statics/dist/assets/polling.cabdf3a3.js +2 -0
  145. abstra_statics/dist/assets/{project.b14b799c.js → project.794c2cba.js} +2 -2
  146. abstra_statics/dist/assets/{python.de00ef26.js → python.014e8707.js} +3 -3
  147. abstra_statics/dist/assets/{razor.7aff1cf0.js → razor.eee706f7.js} +3 -3
  148. abstra_statics/dist/assets/{record.41c9caee.js → record.daabed01.js} +2 -2
  149. abstra_statics/dist/assets/redirect.8303afd7.js +2 -0
  150. abstra_statics/dist/assets/{repository.bfee664a.js → repository.010eeaad.js} +2 -2
  151. abstra_statics/dist/assets/{repository.e580214f.js → repository.997243c1.js} +2 -2
  152. abstra_statics/dist/assets/router.e1e467ab.js +2 -0
  153. abstra_statics/dist/assets/{router.29e08ea4.js → router.ef7a08cf.js} +5 -5
  154. abstra_statics/dist/assets/{string.ff0b4ef9.js → string.0157e442.js} +2 -2
  155. abstra_statics/dist/assets/{tables.94d324c3.js → tables.59457dad.js} +2 -2
  156. abstra_statics/dist/assets/{tasksController.42d22818.js → tasksController.a5bd1328.js} +3 -3
  157. abstra_statics/dist/assets/{toggleHighContrast.7b4a31db.js → toggleHighContrast.2a096764.js} +7 -7
  158. abstra_statics/dist/assets/{tsMode.5cdf91a5.js → tsMode.5a841751.js} +2 -2
  159. abstra_statics/dist/assets/{typescript.53676cd5.js → typescript.a8946c53.js} +3 -3
  160. abstra_statics/dist/assets/url.4aa6f272.js +2 -0
  161. abstra_statics/dist/assets/{useCodebaseEvents.5fbf9bc1.js → useCodebaseEvents.c0197501.js} +2 -2
  162. abstra_statics/dist/assets/useTables.413ae4ce.js +2 -0
  163. abstra_statics/dist/assets/userStore.1004ebc1.js +2 -0
  164. abstra_statics/dist/assets/uuid.14c9b73e.js +2 -0
  165. abstra_statics/dist/assets/{vue-flow-background.7de722ba.js → vue-flow-background.cc5881af.js} +2 -2
  166. abstra_statics/dist/assets/{vue-flow-core.589f776e.js → vue-flow-core.64ea4397.js} +2 -2
  167. abstra_statics/dist/assets/{vue-quill.esm-bundler.d3994d88.js → vue-quill.esm-bundler.404d7a1a.js} +2 -2
  168. abstra_statics/dist/assets/{workspaceStore.5dfe5329.js → workspaceStore.260ac7fc.js} +2 -2
  169. abstra_statics/dist/assets/{xml.a905d090.js → xml.6d7ee5c8.js} +3 -3
  170. abstra_statics/dist/assets/{yaml.112096a6.js → yaml.a48b0813.js} +3 -3
  171. abstra_statics/dist/console.html +15 -15
  172. abstra_statics/dist/editor.html +14 -14
  173. abstra_statics/dist/player.html +10 -10
  174. abstra_statics/dist/assets/AbstraButton.vue_vue_type_script_setup_true_lang.9c0844e1.js +0 -2
  175. abstra_statics/dist/assets/AbstraLogo.vue_vue_type_script_setup_true_lang.f0472c1e.js +0 -2
  176. abstra_statics/dist/assets/ApiKeys.e05d1ca1.js +0 -2
  177. abstra_statics/dist/assets/App.89fb6f4a.js +0 -2
  178. abstra_statics/dist/assets/App.vue_vue_type_style_index_0_lang.7b340da5.js +0 -2
  179. abstra_statics/dist/assets/Billing.f1e5c3f8.js +0 -2
  180. abstra_statics/dist/assets/CloseCircleOutlined.fdea1f27.js +0 -2
  181. abstra_statics/dist/assets/ConsoleOmniChat.vue_vue_type_script_setup_true_lang.cbe8dd45.js +0 -2
  182. abstra_statics/dist/assets/ContentLayout.b1b0e8fb.js +0 -2
  183. abstra_statics/dist/assets/EnvVars.84ca50aa.js +0 -2
  184. abstra_statics/dist/assets/ExclamationCircleOutlined.380af12e.js +0 -2
  185. abstra_statics/dist/assets/Home.889db6be.js +0 -2
  186. abstra_statics/dist/assets/LoadingContainer.395f4c42.js +0 -2
  187. abstra_statics/dist/assets/LoadingOutlined.6f7bdc44.js +0 -2
  188. abstra_statics/dist/assets/Login.90ebb0f6.js +0 -2
  189. abstra_statics/dist/assets/Logo.c75e45a8.js +0 -2
  190. abstra_statics/dist/assets/Main.6fd4bb0a.js +0 -2
  191. abstra_statics/dist/assets/OidcLoginCallback.17eeec42.js +0 -2
  192. abstra_statics/dist/assets/OidcLogoutCallback.b4d1c600.js +0 -2
  193. abstra_statics/dist/assets/Organizations.96e88f77.js +0 -2
  194. abstra_statics/dist/assets/PhDatabase.vue.425a706f.js +0 -2
  195. abstra_statics/dist/assets/ProjectSettings.995a749e.js +0 -2
  196. abstra_statics/dist/assets/Steps.7b2e867b.js +0 -2
  197. abstra_statics/dist/assets/Tasks.932349fa.js +0 -2
  198. abstra_statics/dist/assets/ant-design.a8b36151.js +0 -2
  199. abstra_statics/dist/assets/asyncComputed.f9fa4c71.js +0 -2
  200. abstra_statics/dist/assets/colorHelpers.b41220cb.js +0 -2
  201. abstra_statics/dist/assets/constants.b5d83622.js +0 -2
  202. abstra_statics/dist/assets/datetime.cf8e211d.js +0 -2
  203. abstra_statics/dist/assets/dayjs.68053597.js +0 -2
  204. abstra_statics/dist/assets/editor.a00709d8.js +0 -2
  205. abstra_statics/dist/assets/editor.main.80ee55a4.js +0 -2
  206. abstra_statics/dist/assets/fetch.a8fb4ba0.js +0 -2
  207. abstra_statics/dist/assets/files.e8f04848.js +0 -2
  208. abstra_statics/dist/assets/index.c59ca45b.js +0 -2
  209. abstra_statics/dist/assets/player.66868a86.js +0 -2
  210. abstra_statics/dist/assets/polling.ca800fea.js +0 -2
  211. abstra_statics/dist/assets/redirect.2f506c19.js +0 -2
  212. abstra_statics/dist/assets/router.235ae730.js +0 -2
  213. abstra_statics/dist/assets/url.79cc02c3.js +0 -2
  214. abstra_statics/dist/assets/useTables.64fe45b0.js +0 -2
  215. abstra_statics/dist/assets/userStore.339db438.js +0 -2
  216. abstra_statics/dist/assets/uuid.77e093c3.js +0 -2
  217. {abstra-3.24.6.dist-info → abstra-3.24.8.dist-info}/WHEEL +0 -0
  218. {abstra-3.24.6.dist-info → abstra-3.24.8.dist-info}/entry_points.txt +0 -0
  219. {abstra-3.24.6.dist-info → abstra-3.24.8.dist-info}/top_level.txt +0 -0
@@ -1,2 +1,2 @@
1
- var ve=Object.defineProperty;var ye=(u,t,d)=>t in u?ve(u,t,{enumerable:!0,configurable:!0,writable:!0,value:d}):u[t]=d;var de=(u,t,d)=>(ye(u,typeof t!="symbol"?t+"":t,d),d);import{_ as G}from"./AbstraButton.vue_vue_type_script_setup_true_lang.9c0844e1.js";import{d as X,at as O,c as b,o as c,ac as A,ae as he,h as H,ed as ke,e as _,f as s,u as e,a as $,b as o,g as C,t as g,df as F,ad as be,aY as fe,_ as ie,dj as Z,ej as Se,f6 as ce,de as q,i as k,cS as ge,cT as Me,ei as me,ec as _e,el as R,bE as $e,bD as K,eh as re,bW as Le,cM as xe,eD as Ie,fa as Ce,r as V,w as Ae,ax as ze,U as Be,S as Ze,A as Q,dd as Pe,eG as je,eH as Te,es as Ne,et as Ve}from"./jwt-decode.esm.32f71954.js";import{F as Ee}from"./PhArrowSquareOut.vue.5a8d2f86.js";import{I as ue}from"./PhCopy.vue.3f2b76a2.js";import{F as He,I as We,O as De}from"./os.d718583c.js";import{G as Fe}from"./PhPencilSimple.vue.7ffd0edb.js";import{_ as Ye}from"./vue-flow-background.7de722ba.js";import{a as Xe,b as Ge,g as ee,u as Oe,e as qe,M as Je}from"./vue-flow-core.589f776e.js";import{k as te}from"./router.29e08ea4.js";import{a as le,B as Ue,b as Re}from"./build.c626214a.js";import"./tables.94d324c3.js";import{G as Ke}from"./PhArrowCounterClockwise.vue.dbc4fdc7.js";import{I as Qe}from"./PhCopySimple.vue.7cacc0f7.js";import{G as et}from"./PhDotsThreeVertical.vue.e305b3a2.js";import{F as tt,G as at,I as st,a as ot}from"./PhWebhooksLogo.vue.13c489ce.js";import{a as ae}from"./asyncComputed.f9fa4c71.js";import{a as nt}from"./project.b14b799c.js";import{g as rt}from"./datetime.cf8e211d.js";import{_ as lt,R as it}from"./ExecutionStatusIcon.vue_vue_type_script_setup_true_lang.a2a7ab75.js";import{R as dt}from"./repository.e580214f.js";import{u as ct}from"./polling.ca800fea.js";import{C as se}from"./Card.e1ec3051.js";import"./index.2400150a.js";import"./record.41c9caee.js";import"./string.ff0b4ef9.js";import"./LoadingOutlined.6f7bdc44.js";(function(){try{var u=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(u._sentryDebugIds=u._sentryDebugIds||{},u._sentryDebugIds[t]="441c6031-b325-4c4c-bbd7-be99ddda98e3",u._sentryDebugIdIdentifier="sentry-dbid-441c6031-b325-4c4c-bbd7-be99ddda98e3")}catch{}})();const ut=["width","height","fill","transform"],pt={key:0},ft=_("path",{d:"M227.85,46.89a20,20,0,0,0-18.74-18.74c-13.13-.77-46.65.42-74.48,28.24L131,60H74.36a19.83,19.83,0,0,0-14.14,5.86L25.87,100.19a20,20,0,0,0,11.35,33.95l37.14,5.18,42.32,42.32,5.19,37.18A19.88,19.88,0,0,0,135.34,235a20.13,20.13,0,0,0,6.37,1,19.9,19.9,0,0,0,14.1-5.87l34.34-34.35A19.85,19.85,0,0,0,196,181.64V125l3.6-3.59C227.43,93.54,228.62,60,227.85,46.89ZM76,84h31L75.75,115.28l-27.23-3.8ZM151.6,73.37A72.27,72.27,0,0,1,204,52a72.17,72.17,0,0,1-21.38,52.41L128,159,97,128ZM172,180l-27.49,27.49-3.8-27.23L172,149Zm-72,22c-8.71,11.85-26.19,26-60,26a12,12,0,0,1-12-12c0-33.84,14.12-51.32,26-60A12,12,0,1,1,68.18,175.3C62.3,179.63,55.51,187.8,53,203c15.21-2.51,23.37-9.3,27.7-15.18A12,12,0,1,1,100,202Z"},null,-1),gt=[ft],mt={key:1},_t=_("path",{d:"M184,120v61.65a8,8,0,0,1-2.34,5.65l-34.35,34.35a8,8,0,0,1-13.57-4.53L128,176ZM136,72H74.35a8,8,0,0,0-5.65,2.34L34.35,108.69a8,8,0,0,0,4.53,13.57L80,128ZM40,216c37.65,0,50.69-19.69,54.56-28.18L68.18,161.44C59.69,165.31,40,178.35,40,216Z",opacity:"0.2"},null,-1),wt=_("path",{d:"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z"},null,-1),vt=[_t,wt],yt={key:2},ht=_("path",{d:"M101.85,191.14C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Zm122-144a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.4,27.07h0L88,108.7A8,8,0,0,1,76.67,97.39l26.56-26.57A4,4,0,0,0,100.41,64H74.35A15.9,15.9,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A16,16,0,0,0,192,181.65V155.59a4,4,0,0,0-6.83-2.82l-26.57,26.56a8,8,0,0,1-11.71-.42,8.2,8.2,0,0,1,.6-11.1l49.27-49.27h0C223.45,91.86,224.6,59.71,223.85,47.12Z"},null,-1),kt=[ht],bt={key:3},St=_("path",{d:"M221.86,47.24a14,14,0,0,0-13.11-13.1c-12.31-.73-43.77.39-69.88,26.5L133.52,66H74.35a13.9,13.9,0,0,0-9.89,4.1L30.11,104.44a14,14,0,0,0,7.94,23.76l39.13,5.46,45.16,45.16L127.8,218a14,14,0,0,0,23.76,7.92l34.35-34.35a13.91,13.91,0,0,0,4.1-9.89V122.48l5.35-5.35h0C221.46,91,222.59,59.56,221.86,47.24ZM38.11,115a2,2,0,0,1,.49-2L72.94,78.58A2,2,0,0,1,74.35,78h47.17L77.87,121.64l-38.14-5.32A1.93,1.93,0,0,1,38.11,115ZM178,181.65a2,2,0,0,1-.59,1.41L143.08,217.4a2,2,0,0,1-3.4-1.11l-5.32-38.16L178,134.48Zm8.87-73h0L128,167.51,88.49,128l58.87-58.88a78.47,78.47,0,0,1,60.69-23A2,2,0,0,1,209.88,48,78.47,78.47,0,0,1,186.88,108.64ZM100,190.31C95.68,199.84,81.13,222,40,222a6,6,0,0,1-6-6c0-41.13,22.16-55.68,31.69-60a6,6,0,1,1,5,10.92c-7,3.17-22.53,13.52-24.47,42.91,29.39-1.94,39.74-17.52,42.91-24.47a6,6,0,1,1,10.92,5Z"},null,-1),Mt=[St],$t={key:4},Lt=_("path",{d:"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z"},null,-1),xt=[Lt],It={key:5},Ct=_("path",{d:"M219.86,47.36a12,12,0,0,0-11.22-11.22c-12-.71-42.82.38-68.35,25.91L134.35,68h-60a11.9,11.9,0,0,0-8.48,3.52L31.52,105.85a12,12,0,0,0,6.81,20.37l39.79,5.55,46.11,46.11,5.55,39.81a12,12,0,0,0,20.37,6.79l34.34-34.35a11.9,11.9,0,0,0,3.52-8.48v-60l5.94-5.94C219.48,90.18,220.57,59.41,219.86,47.36ZM36.21,115.6a3.94,3.94,0,0,1,1-4.09L71.53,77.17A4,4,0,0,1,74.35,76h52L78.58,123.76,39.44,118.3A3.94,3.94,0,0,1,36.21,115.6ZM180,181.65a4,4,0,0,1-1.17,2.83l-34.35,34.34a4,4,0,0,1-6.79-2.25l-5.46-39.15L180,129.65Zm-52-11.31L85.66,128l60.28-60.29c23.24-23.24,51.25-24.23,62.22-23.58a3.93,3.93,0,0,1,3.71,3.71c.65,11-.35,39-23.58,62.22ZM98.21,189.48C94,198.66,80,220,40,220a4,4,0,0,1-4-4c0-40,21.34-54,30.52-58.21a4,4,0,0,1,3.32,7.28c-7.46,3.41-24.43,14.66-25.76,46.85,32.19-1.33,43.44-18.3,46.85-25.76a4,4,0,1,1,7.28,3.32Z"},null,-1),At=[Ct],zt={name:"PhRocketLaunch"},Bt=X({...zt,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(u){const t=u,d=O("weight","regular"),L=O("size","1em"),w=O("color","currentColor"),r=O("mirrored",!1),a=b(()=>{var i;return(i=t.weight)!=null?i:d}),p=b(()=>{var i;return(i=t.size)!=null?i:L}),l=b(()=>{var i;return(i=t.color)!=null?i:w}),x=b(()=>t.mirrored!==void 0?t.mirrored?"scale(-1, 1)":void 0:r?"scale(-1, 1)":void 0);return(i,v)=>(c(),A("svg",ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:p.value,height:p.value,fill:l.value,transform:x.value},i.$attrs),[he(i.$slots,"default"),a.value==="bold"?(c(),A("g",pt,gt)):a.value==="duotone"?(c(),A("g",mt,vt)):a.value==="fill"?(c(),A("g",yt,kt)):a.value==="light"?(c(),A("g",bt,Mt)):a.value==="regular"?(c(),A("g",$t,xt)):a.value==="thin"?(c(),A("g",It,At)):H("",!0)],16,ut))}}),Zt=X({__name:"WorkflowEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{type:[String,Object,Function]},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{}},setup(u){const t=u;function d(r,a,p=0){const l=a.center.x-r.center.x,x=a.center.y-r.center.y,i=Math.sqrt(l*l+x*x);if(i===0)return{sourceX:r.center.x,sourceY:r.center.y,targetX:a.center.x,targetY:a.center.y};const v=l/i,S=x/i,f=r.width/2,M=r.height/2;let P=r.center.x,j=r.center.y;Math.abs(v)*M>Math.abs(S)*f?(P=r.center.x+(v>0?f:-f),j=r.center.y+S*f/Math.abs(v)):(P=r.center.x+v*M/Math.abs(S),j=r.center.y+(S>0?M:-M));const z=a.width/2,T=a.height/2;let E=a.center.x,m=a.center.y;return Math.abs(v)*T>Math.abs(S)*z?(E=a.center.x-(v>0?z:-z),m=a.center.y-S*z/Math.abs(v)):(E=a.center.x-v*T/Math.abs(S),m=a.center.y-(S>0?T:-T)),P+=v*p,j+=S*p,E-=v*p,m-=S*p,{sourceX:P,sourceY:j,targetX:E,targetY:m}}function L(r,a){const l={center:{x:r.computedPosition.x+r.dimensions.width/2,y:r.computedPosition.y+r.dimensions.height/2},width:r.dimensions.width,height:r.dimensions.height},i={center:{x:a.computedPosition.x+a.dimensions.width/2,y:a.computedPosition.y+a.dimensions.height/2},width:a.dimensions.width,height:a.dimensions.height};return d(l,i,10)}const w=b(()=>{if(!t.sourceNode||!t.targetNode)return ee({sourceX:0,sourceY:0,targetX:0,targetY:0});if(!t.sourceNode.dimensions.width||!t.targetNode.dimensions.width||!t.sourceNode.dimensions.height||!t.targetNode.dimensions.height)return ee({sourceX:0,sourceY:0,targetX:0,targetY:0});const r=L(t.sourceNode,t.targetNode);return ee(r)});return(r,a)=>{var p,l;return c(),A(fe,null,[s(e(Xe),{path:w.value[0],"marker-end":t.markerEnd},null,8,["path","marker-end"]),(l=(p=t.data)==null?void 0:p.props)!=null&&l.taskType?(c(),$(e(Ge),{key:0},{default:o(()=>[_("div",{style:be({transform:`translate(-50%, -50%) translate(${w.value[1]}px,${w.value[2]}px)`}),class:"nodrag nopan edge-label"},[s(e(F),null,{default:o(()=>[C(g(t.data.props.taskType),1)]),_:1})],4)]),_:1})):H("",!0)],64)}}});const Pt=ie(Zt,[["__scopeId","data-v-8f1859d4"]]);class jt{async list(t){return te.get(`projects/${t}/disabled-stages`)}async disableStage({projectId:t,stageId:d}){return te.patch(`projects/${t}/disabled-stages/${d}`,{enable:!1})}async enableStage({projectId:t,stageId:d}){return te.patch(`projects/${t}/disabled-stages/${d}`,{enable:!0})}}const oe=new jt;class Y{constructor(t){de(this,"id");this.dto=t,this.id=t}static async list(t){return(await oe.list(t)).map(L=>new Y(L))}static async disableStage({projectId:t,stageId:d}){return oe.disableStage({projectId:t,stageId:d})}static async enableStage({projectId:t,stageId:d}){return oe.enableStage({projectId:t,stageId:d})}}const Tt=X({__name:"WorkflowStageExecutions",props:{stageId:{},projectId:{},executions:{},taskStats:{},loading:{type:Boolean}},setup(u){const t=u,d=b(()=>t.taskStats?Math.round(t.taskStats.completed/t.taskStats.total*100):0),L=b(()=>{const a=d.value;return a===100?"#52c41a":a>=50?"#1890ff":"#faad14"}),w=a=>rt(a,{weekday:void 0}),r=a=>{if(a<60)return`${Math.round(a)}s`;const p=Math.floor(a/60);if(p<60)return`${p}m`;const l=Math.floor(p/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`};return(a,p)=>(c(),$(e(Z),{vertical:"",size:4,style:{width:"100%"}},{default:o(()=>[a.executions&&a.executions.length>0?(c(),$(e(Z),{key:0,size:4,gap:4},{default:o(()=>[(c(!0),A(fe,null,Se(a.executions,l=>(c(),$(e(ce),{key:l.id,to:{name:"logs",params:{projectId:a.projectId},query:{executionId:l.id}}},{default:o(()=>[s(e(ge),{title:w(l.createdAt)},{content:o(()=>[s(e(Z),{vertical:"",size:4},{default:o(()=>[s(e(q),null,{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_status"))+": "+g(l.status),1)]),_:2},1024),s(e(q),null,{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_duration"))+": "+g(l.duration_seconds)+"s",1)]),_:2},1024),s(e(q),null,{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_version"))+": "+g(l.buildId.slice(0,6)),1)]),_:2},1024)]),_:2},1024)]),default:o(()=>[s(lt,{status:l.status},null,8,["status"])]),_:2},1032,["title"])]),_:2},1032,["to"]))),128))]),_:1})):H("",!0),a.taskStats&&a.taskStats.total>0?(c(),$(e(ce),{key:1,to:{name:"tasks",params:{projectId:a.projectId},query:{stage:a.stageId,status:"pending"}}},{default:o(()=>[s(e(Z),{vertical:"",size:2},{default:o(()=>[s(e(Me),{"show-info":!1,percent:d.value,"stroke-color":L.value,size:"small"},null,8,["percent","stroke-color"]),s(e(Z),{vertical:"",size:0},{default:o(()=>[a.taskStats.pending&&a.taskStats.averageCompletionSeconds?(c(),$(e(q),{key:0,type:"secondary",style:{fontSize:"11px"}},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_pending_tasks").replace("{count}",a.taskStats.pending.toString()))+" ("+g(r(a.taskStats.averageCompletionSeconds))+" "+g(e(k).translate("i18n_workflowviewer_average"))+") ",1)]),_:1})):H("",!0)]),_:1})]),_:1})]),_:1},8,["to"])):H("",!0)]),_:1}))}}),Nt={class:"stage-content"},Vt={class:"stage-title"},Et={class:"action-item"},Ht={class:"action-item"},Wt={class:"action-warning"},Dt={key:1,class:"action-item"},pe="3.18.0",Ft=X({__name:"WorkflowStageNode",props:{stage:{}},setup(u){const t=u,d=me(),L=_e(),w=d.params.projectId,r=b(()=>({forms:tt,hooks:at,scripts:st,jobs:ot})[t.stage.type]),{result:a}=ae(async()=>await nt.get(w)),{result:p}=ae(async()=>{const I=(await le.list(w)).find(n=>n.latest);return I?await Ue.get(I.id):null}),{result:l,refetch:x}=ae(async()=>(await Y.list(w)).filter(I=>I)),i=()=>{L.push({name:"logs",params:{projectId:w},query:{stageId:t.stage.id}})},v=b(()=>t.stage.type==="forms"||t.stage.type==="hooks"),S=()=>{var n;if(!t.stage.path)return;const m=t.stage.type==="forms"?`/${t.stage.path}`:`/_hooks/${t.stage.path}`,I=(n=a.value)==null?void 0:n.getUrl(m);!I||(navigator.clipboard.writeText(I),xe.success(k.translate("i18n_workflowviewer_copied_url")))},f=b(()=>{var m;return(m=l.value)==null?void 0:m.map(I=>I.id).includes(t.stage.id)}),M=(m,I)=>{const[n,y,h]=m.split(".").map(Number),[D,B,W]=I.split(".").map(Number);return n>D?!0:n<D?!1:y>B?!0:y<B?!1:h>=W},P=b(()=>f.value?Ie:Ce),j=b(()=>f.value?k.translate("i18n_workflowviewer_enable_stage"):k.translate("i18n_workflowviewer_disable_stage")),z=b(()=>{var m;return!M(((m=p.value)==null?void 0:m.abstraVersion)||"0.0.0",pe)}),T=b(()=>z.value?k.translate("i18n_workflowviewer_disable_stages_warning").replace("{version}",pe):""),E=async()=>{z.value||(f.value?await Y.enableStage({projectId:w,stageId:t.stage.id}):await Y.disableStage({projectId:w,stageId:t.stage.id}),await x())};return(m,I)=>(c(),A("div",{class:re(["stage-node",{disabled:f.value}])},[_("div",Nt,[(c(),$(R(r.value),{size:18,class:"stage-icon"})),_("div",Vt,g(m.stage.title),1),s(e(Le),{trigger:["click"]},{overlay:o(()=>[s(e($e),null,{default:o(()=>[s(e(K),{onClick:i},{default:o(()=>[_("div",Et,[s(e(Ke),{size:16}),_("span",null,g(e(k).translate("i18n_workflowviewer_view_logs")),1)])]),_:1}),v.value?(c(),$(e(K),{key:0,onClick:S},{default:o(()=>[_("div",Ht,[s(e(Qe),{size:16}),_("span",null,g(e(k).translate("i18n_workflowviewer_copy_url")),1)])]),_:1})):H("",!0),s(e(K),{onClick:E},{default:o(()=>[z.value?(c(),$(e(ge),{key:0,placement:"left"},{content:o(()=>[_("div",Wt,[s(e(F),null,{default:o(()=>[C(g(T.value),1)]),_:1})])]),default:o(()=>[_("div",{class:re(["action-item",{disabled:z.value}])},[(c(),$(R(P.value),{size:16})),_("span",null,g(j.value),1)],2)]),_:1})):(c(),A("div",Dt,[(c(),$(R(P.value),{size:16})),_("span",null,g(j.value),1)]))]),_:1})]),_:1})]),default:o(()=>[s(e(et),{style:{cursor:"pointer"},size:20,class:"actions-menu"})]),_:1})]),s(Tt,{"stage-id":m.stage.id,"project-id":e(w),executions:m.stage.executions,"task-stats":m.stage.taskStats,style:{"margin-top":"8px"}},null,8,["stage-id","project-id","executions","task-stats"])],2))}});const J=ie(Ft,[["__scopeId","data-v-0d8346f9"]]);function Yt(u,t){const d=new it,L=new dt(u),w=V({}),r=V({}),a=V(!1);async function p(){const i=t.value;if(i.length===0){a.value=!1;return}a.value=!0;try{const[v,S]=await Promise.all([Promise.all(i.map(async f=>{try{const{executions:M}=await d.list({projectId:u,stageId:f,limit:6});return{stageId:f,executions:M}}catch(M){return console.error(`Failed to load executions for stage ${f}:`,M),{stageId:f,executions:[]}}})),L.getTasksStatistics()]);v.forEach(({stageId:f,executions:M})=>{w.value[f]=M}),S.forEach(f=>{r.value[f.stageId]={pending:f.pendingTasks,completed:f.completedTasks,total:f.totalTasks,averageCompletionSeconds:f.averageCompletionSeconds}})}catch(v){console.error("Failed to load workflow data:",v)}finally{a.value=!1}}const{startPolling:l,endPolling:x}=ct({task:p,interval:15e3});return Ae(t,i=>{i.length>0&&(p(),l())},{immediate:!0}),ze(()=>{x()}),{executionsByStage:w,taskStatsByStage:r,loading:a,refetch:p}}const we=u=>(Ne("data-v-7b40ff03"),u=u(),Ve(),u),Xt={class:"flow-container"},Gt={class:"code-container"},Ot=we(()=>_("code",{class:"install-code"},"pip install abstra",-1)),qt={class:"code-container"},Jt=we(()=>_("code",{class:"install-code"},"abstra editor .",-1)),Ut={key:0,class:"edit-button-text"},ne="#ea576a",Rt=X({__name:"WorkflowViewer",setup(u){const{onInit:t}=Oe(),d=new Re,L=me(),w=_e(),r=L.params.projectId,a=L.query.buildId,p=V(!0),l=V(null),x=V(!0),i=V(!1),v=()=>{w.push({name:"web-editor",params:{projectId:r}})},S=async n=>{try{await navigator.clipboard.writeText(n)}catch(y){console.error("Failed to copy:",y)}};t(n=>{x.value&&(n.fitView(),x.value=!1)});const f=V([]),M=V([]),P=b(()=>f.value.map(n=>n.id)),{executionsByStage:j,taskStatsByStage:z}=Yt(r,P),T=b(()=>f.value.length>0),E=b(()=>f.value.map(n=>({id:n.id,type:n.type,data:{...n,executions:j.value[n.id]||[],taskStats:z.value[n.id]||null},position:{x:n.position.x,y:n.position.y*1.5}}))),m=b(()=>M.value.map(n=>({id:n.id,source:n.sourceStageId,target:n.targetStageId,type:"task",data:{id:n.id,props:{taskType:n.taskType}},markerEnd:{type:Je.Arrow,width:24,height:24}})));function I(n){const y=[],h=[],D=["jobs","hooks","forms","scripts"];for(const B of D){const W=n[B]||[];for(const N of W){y.push({id:N.id,type:B,title:N.title,position:{x:N.workflow_position[0],y:N.workflow_position[1]},file:N.file,path:N.path,schedule:N.schedule});for(const U of N.transitions||[])h.push({id:U.id,sourceStageId:N.id,targetStageId:U.target_id,taskType:U.task_type})}}f.value=y,M.value=h}return Be(async()=>{try{p.value=!0;let n;if(a){const B=(await le.list(r)).find(W=>W.id===a);if(!B){l.value="Build not found";return}n=B}else{const B=(await le.list(r)).find(W=>W.latest);if(!B){l.value="No builds found for this project";return}n=B}const y=await d.get(n.id);if(!y||!y.abstraJson){l.value="No workflow data available for this build";return}const h=JSON.parse(y.abstraJson);I(h)}catch(n){l.value=n instanceof Error?n.message:"Failed to load workflow",console.error(n)}finally{p.value=!1}}),(n,y)=>(c(),A("div",Xt,[p.value?(c(),$(e(Ze),{key:0,style:{width:"100%"}})):T.value?(c(),$(e(qe),{key:2,nodes:E.value,edges:m.value,"default-viewport":{zoom:1.5},"fit-view-on-init":"","min-zoom":.1,"max-zoom":1.25,"pan-on-scroll":e(De).isMac,"snap-to-grid":""},{"edge-task":o(h=>[s(Pt,je(Te(h)),null,16)]),"node-forms":o(h=>[s(J,{stage:h.data},null,8,["stage"])]),"node-hooks":o(h=>[s(J,{stage:h.data},null,8,["stage"])]),"node-scripts":o(h=>[s(J,{stage:h.data},null,8,["stage"])]),"node-jobs":o(h=>[s(J,{stage:h.data},null,8,["stage"])]),default:o(()=>[s(e(Ye),{"pattern-color":"#aaa",gap:16})]),_:1},8,["nodes","edges","pan-on-scroll"])):(c(),$(e(se),{key:1,class:"empty-state-card"},{default:o(()=>[s(e(Z),{vertical:"",gap:24,align:"center"},{default:o(()=>[s(e(Bt),{size:64,color:ne}),s(e(Z),{vertical:"",gap:8,align:"center"},{default:o(()=>[s(e(Q),{level:3},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_getting_started")),1)]),_:1}),s(e(F),{type:"secondary",style:{"text-align":"center"}},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_no_workflow_description")),1)]),_:1})]),_:1}),s(e(Z),{gap:16,wrap:"wrap",justify:"center"},{default:o(()=>[s(e(se),{class:"option-card"},{default:o(()=>[s(e(Z),{vertical:"",gap:12},{default:o(()=>[s(e(He),{size:32,color:ne}),s(e(Q),{level:5},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_option_cli")),1)]),_:1}),s(e(F),{type:"secondary",style:{"font-size":"13px"}},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_cli_description")),1)]),_:1}),s(e(Z),{vertical:"",gap:8},{default:o(()=>[_("div",Gt,[Ot,s(G,{type:"text",size:"small",onClick:y[0]||(y[0]=h=>S("pip install abstra"))},{default:o(()=>[s(e(ue),{size:16})]),_:1})]),_("div",qt,[Jt,s(G,{type:"text",size:"small",onClick:y[1]||(y[1]=h=>S("abstra editor ."))},{default:o(()=>[s(e(ue),{size:16})]),_:1})])]),_:1})]),_:1})]),_:1}),s(e(se),{class:"option-card"},{default:o(()=>[s(e(Z),{vertical:"",gap:12},{default:o(()=>[s(e(We),{size:32,color:ne}),s(e(Q),{level:5},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_option_online")),1)]),_:1}),s(e(F),{type:"secondary",style:{"font-size":"13px"}},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_online_description")),1)]),_:1}),s(G,{type:"primary",onClick:v},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_open_editor")),1)]),_:1})]),_:1})]),_:1})]),_:1}),s(e(Pe),{href:"https://www.abstra.io/docs",target:"_blank"},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_view_docs"))+" ",1),s(e(Ee),{size:14,style:{"margin-left":"4px"}})]),_:1})]),_:1})]),_:1})),!p.value&&T.value?(c(),$(G,{key:3,class:re(["edit-button",{expanded:i.value}]),type:"primary",size:"large",onClick:v,onMouseenter:y[2]||(y[2]=h=>i.value=!0),onMouseleave:y[3]||(y[3]=h=>i.value=!1)},{default:o(()=>[s(e(Fe),{size:24}),i.value?(c(),A("span",Ut,g(e(k).translate("i18n_workflowviewer_edit_online")),1)):H("",!0)]),_:1},8,["class"])):H("",!0)]))}});const $a=ie(Rt,[["__scopeId","data-v-7b40ff03"]]);export{$a as default};
2
- //# sourceMappingURL=WorkflowViewer.95d64da4.js.map
1
+ var ve=Object.defineProperty;var ye=(u,t,d)=>t in u?ve(u,t,{enumerable:!0,configurable:!0,writable:!0,value:d}):u[t]=d;var de=(u,t,d)=>(ye(u,typeof t!="symbol"?t+"":t,d),d);import{_ as G}from"./AbstraButton.vue_vue_type_script_setup_true_lang.905e8d9e.js";import{d as X,at as O,c as b,o as c,ac as A,ae as he,h as H,ed as ke,e as _,f as s,u as e,a as $,b as o,g as C,t as g,df as F,ad as be,aY as fe,_ as ie,dj as Z,ej as Se,f6 as ce,de as q,i as k,cS as ge,cT as Me,ei as me,ec as _e,el as R,bE as $e,bD as K,eh as re,bW as Le,cM as xe,eD as Ie,fa as Ce,r as V,w as Ae,ax as ze,U as Be,S as Ze,A as Q,dd as Pe,eG as je,eH as Te,es as Ne,et as Ve}from"./jwt-decode.esm.4071145e.js";import{F as Ee}from"./PhArrowSquareOut.vue.d71d80fc.js";import{I as ue}from"./PhCopy.vue.5aeb9248.js";import{F as He,I as We,O as De}from"./os.b6b83ab9.js";import{G as Fe}from"./PhPencilSimple.vue.c30ff752.js";import{_ as Ye}from"./vue-flow-background.cc5881af.js";import{a as Xe,b as Ge,g as ee,u as Oe,e as qe,M as Je}from"./vue-flow-core.64ea4397.js";import{k as te}from"./router.ef7a08cf.js";import{a as le,B as Ue,b as Re}from"./build.1cc9147c.js";import"./tables.59457dad.js";import{G as Ke}from"./PhArrowCounterClockwise.vue.44a61827.js";import{I as Qe}from"./PhCopySimple.vue.33922e71.js";import{G as et}from"./PhDotsThreeVertical.vue.b3fda5f6.js";import{F as tt,G as at,I as st,a as ot}from"./PhWebhooksLogo.vue.28d1edea.js";import{a as ae}from"./asyncComputed.0308626b.js";import{a as nt}from"./project.794c2cba.js";import{g as rt}from"./datetime.049cd1b4.js";import{_ as lt,R as it}from"./ExecutionStatusIcon.vue_vue_type_script_setup_true_lang.7bd1f43d.js";import{R as dt}from"./repository.997243c1.js";import{u as ct}from"./polling.cabdf3a3.js";import{C as se}from"./Card.95a0c7f0.js";import"./index.fd17682d.js";import"./record.daabed01.js";import"./string.0157e442.js";import"./LoadingOutlined.eb1ab7c7.js";(function(){try{var u=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(u._sentryDebugIds=u._sentryDebugIds||{},u._sentryDebugIds[t]="c2f62a9e-7548-4fd9-a8f1-52d4261b0885",u._sentryDebugIdIdentifier="sentry-dbid-c2f62a9e-7548-4fd9-a8f1-52d4261b0885")}catch{}})();const ut=["width","height","fill","transform"],pt={key:0},ft=_("path",{d:"M227.85,46.89a20,20,0,0,0-18.74-18.74c-13.13-.77-46.65.42-74.48,28.24L131,60H74.36a19.83,19.83,0,0,0-14.14,5.86L25.87,100.19a20,20,0,0,0,11.35,33.95l37.14,5.18,42.32,42.32,5.19,37.18A19.88,19.88,0,0,0,135.34,235a20.13,20.13,0,0,0,6.37,1,19.9,19.9,0,0,0,14.1-5.87l34.34-34.35A19.85,19.85,0,0,0,196,181.64V125l3.6-3.59C227.43,93.54,228.62,60,227.85,46.89ZM76,84h31L75.75,115.28l-27.23-3.8ZM151.6,73.37A72.27,72.27,0,0,1,204,52a72.17,72.17,0,0,1-21.38,52.41L128,159,97,128ZM172,180l-27.49,27.49-3.8-27.23L172,149Zm-72,22c-8.71,11.85-26.19,26-60,26a12,12,0,0,1-12-12c0-33.84,14.12-51.32,26-60A12,12,0,1,1,68.18,175.3C62.3,179.63,55.51,187.8,53,203c15.21-2.51,23.37-9.3,27.7-15.18A12,12,0,1,1,100,202Z"},null,-1),gt=[ft],mt={key:1},_t=_("path",{d:"M184,120v61.65a8,8,0,0,1-2.34,5.65l-34.35,34.35a8,8,0,0,1-13.57-4.53L128,176ZM136,72H74.35a8,8,0,0,0-5.65,2.34L34.35,108.69a8,8,0,0,0,4.53,13.57L80,128ZM40,216c37.65,0,50.69-19.69,54.56-28.18L68.18,161.44C59.69,165.31,40,178.35,40,216Z",opacity:"0.2"},null,-1),wt=_("path",{d:"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z"},null,-1),vt=[_t,wt],yt={key:2},ht=_("path",{d:"M101.85,191.14C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Zm122-144a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.4,27.07h0L88,108.7A8,8,0,0,1,76.67,97.39l26.56-26.57A4,4,0,0,0,100.41,64H74.35A15.9,15.9,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A16,16,0,0,0,192,181.65V155.59a4,4,0,0,0-6.83-2.82l-26.57,26.56a8,8,0,0,1-11.71-.42,8.2,8.2,0,0,1,.6-11.1l49.27-49.27h0C223.45,91.86,224.6,59.71,223.85,47.12Z"},null,-1),kt=[ht],bt={key:3},St=_("path",{d:"M221.86,47.24a14,14,0,0,0-13.11-13.1c-12.31-.73-43.77.39-69.88,26.5L133.52,66H74.35a13.9,13.9,0,0,0-9.89,4.1L30.11,104.44a14,14,0,0,0,7.94,23.76l39.13,5.46,45.16,45.16L127.8,218a14,14,0,0,0,23.76,7.92l34.35-34.35a13.91,13.91,0,0,0,4.1-9.89V122.48l5.35-5.35h0C221.46,91,222.59,59.56,221.86,47.24ZM38.11,115a2,2,0,0,1,.49-2L72.94,78.58A2,2,0,0,1,74.35,78h47.17L77.87,121.64l-38.14-5.32A1.93,1.93,0,0,1,38.11,115ZM178,181.65a2,2,0,0,1-.59,1.41L143.08,217.4a2,2,0,0,1-3.4-1.11l-5.32-38.16L178,134.48Zm8.87-73h0L128,167.51,88.49,128l58.87-58.88a78.47,78.47,0,0,1,60.69-23A2,2,0,0,1,209.88,48,78.47,78.47,0,0,1,186.88,108.64ZM100,190.31C95.68,199.84,81.13,222,40,222a6,6,0,0,1-6-6c0-41.13,22.16-55.68,31.69-60a6,6,0,1,1,5,10.92c-7,3.17-22.53,13.52-24.47,42.91,29.39-1.94,39.74-17.52,42.91-24.47a6,6,0,1,1,10.92,5Z"},null,-1),Mt=[St],$t={key:4},Lt=_("path",{d:"M223.85,47.12a16,16,0,0,0-15-15c-12.58-.75-44.73.4-71.41,27.07L132.69,64H74.36A15.91,15.91,0,0,0,63,68.68L28.7,103a16,16,0,0,0,9.07,27.16l38.47,5.37,44.21,44.21,5.37,38.49a15.94,15.94,0,0,0,10.78,12.92,16.11,16.11,0,0,0,5.1.83A15.91,15.91,0,0,0,153,227.3L187.32,193A15.91,15.91,0,0,0,192,181.64V123.31l4.77-4.77C223.45,91.86,224.6,59.71,223.85,47.12ZM74.36,80h42.33L77.16,119.52,40,114.34Zm74.41-9.45a76.65,76.65,0,0,1,59.11-22.47,76.46,76.46,0,0,1-22.42,59.16L128,164.68,91.32,128ZM176,181.64,141.67,216l-5.19-37.17L176,139.31Zm-74.16,9.5C97.34,201,82.29,224,40,224a8,8,0,0,1-8-8c0-42.29,23-57.34,32.86-61.85a8,8,0,0,1,6.64,14.56c-6.43,2.93-20.62,12.36-23.12,38.91,26.55-2.5,36-16.69,38.91-23.12a8,8,0,1,1,14.56,6.64Z"},null,-1),xt=[Lt],It={key:5},Ct=_("path",{d:"M219.86,47.36a12,12,0,0,0-11.22-11.22c-12-.71-42.82.38-68.35,25.91L134.35,68h-60a11.9,11.9,0,0,0-8.48,3.52L31.52,105.85a12,12,0,0,0,6.81,20.37l39.79,5.55,46.11,46.11,5.55,39.81a12,12,0,0,0,20.37,6.79l34.34-34.35a11.9,11.9,0,0,0,3.52-8.48v-60l5.94-5.94C219.48,90.18,220.57,59.41,219.86,47.36ZM36.21,115.6a3.94,3.94,0,0,1,1-4.09L71.53,77.17A4,4,0,0,1,74.35,76h52L78.58,123.76,39.44,118.3A3.94,3.94,0,0,1,36.21,115.6ZM180,181.65a4,4,0,0,1-1.17,2.83l-34.35,34.34a4,4,0,0,1-6.79-2.25l-5.46-39.15L180,129.65Zm-52-11.31L85.66,128l60.28-60.29c23.24-23.24,51.25-24.23,62.22-23.58a3.93,3.93,0,0,1,3.71,3.71c.65,11-.35,39-23.58,62.22ZM98.21,189.48C94,198.66,80,220,40,220a4,4,0,0,1-4-4c0-40,21.34-54,30.52-58.21a4,4,0,0,1,3.32,7.28c-7.46,3.41-24.43,14.66-25.76,46.85,32.19-1.33,43.44-18.3,46.85-25.76a4,4,0,1,1,7.28,3.32Z"},null,-1),At=[Ct],zt={name:"PhRocketLaunch"},Bt=X({...zt,props:{weight:{type:String},size:{type:[String,Number]},color:{type:String},mirrored:{type:Boolean}},setup(u){const t=u,d=O("weight","regular"),L=O("size","1em"),w=O("color","currentColor"),r=O("mirrored",!1),a=b(()=>{var i;return(i=t.weight)!=null?i:d}),p=b(()=>{var i;return(i=t.size)!=null?i:L}),l=b(()=>{var i;return(i=t.color)!=null?i:w}),x=b(()=>t.mirrored!==void 0?t.mirrored?"scale(-1, 1)":void 0:r?"scale(-1, 1)":void 0);return(i,v)=>(c(),A("svg",ke({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",width:p.value,height:p.value,fill:l.value,transform:x.value},i.$attrs),[he(i.$slots,"default"),a.value==="bold"?(c(),A("g",pt,gt)):a.value==="duotone"?(c(),A("g",mt,vt)):a.value==="fill"?(c(),A("g",yt,kt)):a.value==="light"?(c(),A("g",bt,Mt)):a.value==="regular"?(c(),A("g",$t,xt)):a.value==="thin"?(c(),A("g",It,At)):H("",!0)],16,ut))}}),Zt=X({__name:"WorkflowEdge",props:{id:{},sourceNode:{},targetNode:{},source:{},target:{},type:{},label:{type:[String,Object,Function]},style:{},selected:{type:Boolean},sourcePosition:{},targetPosition:{},sourceHandleId:{},targetHandleId:{},animated:{type:Boolean},updatable:{type:Boolean},markerStart:{},markerEnd:{},curvature:{},interactionWidth:{},data:{},events:{},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{},sourceX:{},sourceY:{},targetX:{},targetY:{}},setup(u){const t=u;function d(r,a,p=0){const l=a.center.x-r.center.x,x=a.center.y-r.center.y,i=Math.sqrt(l*l+x*x);if(i===0)return{sourceX:r.center.x,sourceY:r.center.y,targetX:a.center.x,targetY:a.center.y};const v=l/i,S=x/i,f=r.width/2,M=r.height/2;let P=r.center.x,j=r.center.y;Math.abs(v)*M>Math.abs(S)*f?(P=r.center.x+(v>0?f:-f),j=r.center.y+S*f/Math.abs(v)):(P=r.center.x+v*M/Math.abs(S),j=r.center.y+(S>0?M:-M));const z=a.width/2,T=a.height/2;let E=a.center.x,m=a.center.y;return Math.abs(v)*T>Math.abs(S)*z?(E=a.center.x-(v>0?z:-z),m=a.center.y-S*z/Math.abs(v)):(E=a.center.x-v*T/Math.abs(S),m=a.center.y-(S>0?T:-T)),P+=v*p,j+=S*p,E-=v*p,m-=S*p,{sourceX:P,sourceY:j,targetX:E,targetY:m}}function L(r,a){const l={center:{x:r.computedPosition.x+r.dimensions.width/2,y:r.computedPosition.y+r.dimensions.height/2},width:r.dimensions.width,height:r.dimensions.height},i={center:{x:a.computedPosition.x+a.dimensions.width/2,y:a.computedPosition.y+a.dimensions.height/2},width:a.dimensions.width,height:a.dimensions.height};return d(l,i,10)}const w=b(()=>{if(!t.sourceNode||!t.targetNode)return ee({sourceX:0,sourceY:0,targetX:0,targetY:0});if(!t.sourceNode.dimensions.width||!t.targetNode.dimensions.width||!t.sourceNode.dimensions.height||!t.targetNode.dimensions.height)return ee({sourceX:0,sourceY:0,targetX:0,targetY:0});const r=L(t.sourceNode,t.targetNode);return ee(r)});return(r,a)=>{var p,l;return c(),A(fe,null,[s(e(Xe),{path:w.value[0],"marker-end":t.markerEnd},null,8,["path","marker-end"]),(l=(p=t.data)==null?void 0:p.props)!=null&&l.taskType?(c(),$(e(Ge),{key:0},{default:o(()=>[_("div",{style:be({transform:`translate(-50%, -50%) translate(${w.value[1]}px,${w.value[2]}px)`}),class:"nodrag nopan edge-label"},[s(e(F),null,{default:o(()=>[C(g(t.data.props.taskType),1)]),_:1})],4)]),_:1})):H("",!0)],64)}}});const Pt=ie(Zt,[["__scopeId","data-v-8f1859d4"]]);class jt{async list(t){return te.get(`projects/${t}/disabled-stages`)}async disableStage({projectId:t,stageId:d}){return te.patch(`projects/${t}/disabled-stages/${d}`,{enable:!1})}async enableStage({projectId:t,stageId:d}){return te.patch(`projects/${t}/disabled-stages/${d}`,{enable:!0})}}const oe=new jt;class Y{constructor(t){de(this,"id");this.dto=t,this.id=t}static async list(t){return(await oe.list(t)).map(L=>new Y(L))}static async disableStage({projectId:t,stageId:d}){return oe.disableStage({projectId:t,stageId:d})}static async enableStage({projectId:t,stageId:d}){return oe.enableStage({projectId:t,stageId:d})}}const Tt=X({__name:"WorkflowStageExecutions",props:{stageId:{},projectId:{},executions:{},taskStats:{},loading:{type:Boolean}},setup(u){const t=u,d=b(()=>t.taskStats?Math.round(t.taskStats.completed/t.taskStats.total*100):0),L=b(()=>{const a=d.value;return a===100?"#52c41a":a>=50?"#1890ff":"#faad14"}),w=a=>rt(a,{weekday:void 0}),r=a=>{if(a<60)return`${Math.round(a)}s`;const p=Math.floor(a/60);if(p<60)return`${p}m`;const l=Math.floor(p/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`};return(a,p)=>(c(),$(e(Z),{vertical:"",size:4,style:{width:"100%"}},{default:o(()=>[a.executions&&a.executions.length>0?(c(),$(e(Z),{key:0,size:4,gap:4},{default:o(()=>[(c(!0),A(fe,null,Se(a.executions,l=>(c(),$(e(ce),{key:l.id,to:{name:"logs",params:{projectId:a.projectId},query:{executionId:l.id}}},{default:o(()=>[s(e(ge),{title:w(l.createdAt)},{content:o(()=>[s(e(Z),{vertical:"",size:4},{default:o(()=>[s(e(q),null,{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_status"))+": "+g(l.status),1)]),_:2},1024),s(e(q),null,{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_duration"))+": "+g(l.duration_seconds)+"s",1)]),_:2},1024),s(e(q),null,{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_version"))+": "+g(l.buildId.slice(0,6)),1)]),_:2},1024)]),_:2},1024)]),default:o(()=>[s(lt,{status:l.status},null,8,["status"])]),_:2},1032,["title"])]),_:2},1032,["to"]))),128))]),_:1})):H("",!0),a.taskStats&&a.taskStats.total>0?(c(),$(e(ce),{key:1,to:{name:"tasks",params:{projectId:a.projectId},query:{stage:a.stageId,status:"pending"}}},{default:o(()=>[s(e(Z),{vertical:"",size:2},{default:o(()=>[s(e(Me),{"show-info":!1,percent:d.value,"stroke-color":L.value,size:"small"},null,8,["percent","stroke-color"]),s(e(Z),{vertical:"",size:0},{default:o(()=>[a.taskStats.pending&&a.taskStats.averageCompletionSeconds?(c(),$(e(q),{key:0,type:"secondary",style:{fontSize:"11px"}},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_pending_tasks").replace("{count}",a.taskStats.pending.toString()))+" ("+g(r(a.taskStats.averageCompletionSeconds))+" "+g(e(k).translate("i18n_workflowviewer_average"))+") ",1)]),_:1})):H("",!0)]),_:1})]),_:1})]),_:1},8,["to"])):H("",!0)]),_:1}))}}),Nt={class:"stage-content"},Vt={class:"stage-title"},Et={class:"action-item"},Ht={class:"action-item"},Wt={class:"action-warning"},Dt={key:1,class:"action-item"},pe="3.18.0",Ft=X({__name:"WorkflowStageNode",props:{stage:{}},setup(u){const t=u,d=me(),L=_e(),w=d.params.projectId,r=b(()=>({forms:tt,hooks:at,scripts:st,jobs:ot})[t.stage.type]),{result:a}=ae(async()=>await nt.get(w)),{result:p}=ae(async()=>{const I=(await le.list(w)).find(n=>n.latest);return I?await Ue.get(I.id):null}),{result:l,refetch:x}=ae(async()=>(await Y.list(w)).filter(I=>I)),i=()=>{L.push({name:"logs",params:{projectId:w},query:{stageId:t.stage.id}})},v=b(()=>t.stage.type==="forms"||t.stage.type==="hooks"),S=()=>{var n;if(!t.stage.path)return;const m=t.stage.type==="forms"?`/${t.stage.path}`:`/_hooks/${t.stage.path}`,I=(n=a.value)==null?void 0:n.getUrl(m);!I||(navigator.clipboard.writeText(I),xe.success(k.translate("i18n_workflowviewer_copied_url")))},f=b(()=>{var m;return(m=l.value)==null?void 0:m.map(I=>I.id).includes(t.stage.id)}),M=(m,I)=>{const[n,y,h]=m.split(".").map(Number),[D,B,W]=I.split(".").map(Number);return n>D?!0:n<D?!1:y>B?!0:y<B?!1:h>=W},P=b(()=>f.value?Ie:Ce),j=b(()=>f.value?k.translate("i18n_workflowviewer_enable_stage"):k.translate("i18n_workflowviewer_disable_stage")),z=b(()=>{var m;return!M(((m=p.value)==null?void 0:m.abstraVersion)||"0.0.0",pe)}),T=b(()=>z.value?k.translate("i18n_workflowviewer_disable_stages_warning").replace("{version}",pe):""),E=async()=>{z.value||(f.value?await Y.enableStage({projectId:w,stageId:t.stage.id}):await Y.disableStage({projectId:w,stageId:t.stage.id}),await x())};return(m,I)=>(c(),A("div",{class:re(["stage-node",{disabled:f.value}])},[_("div",Nt,[(c(),$(R(r.value),{size:18,class:"stage-icon"})),_("div",Vt,g(m.stage.title),1),s(e(Le),{trigger:["click"]},{overlay:o(()=>[s(e($e),null,{default:o(()=>[s(e(K),{onClick:i},{default:o(()=>[_("div",Et,[s(e(Ke),{size:16}),_("span",null,g(e(k).translate("i18n_workflowviewer_view_logs")),1)])]),_:1}),v.value?(c(),$(e(K),{key:0,onClick:S},{default:o(()=>[_("div",Ht,[s(e(Qe),{size:16}),_("span",null,g(e(k).translate("i18n_workflowviewer_copy_url")),1)])]),_:1})):H("",!0),s(e(K),{onClick:E},{default:o(()=>[z.value?(c(),$(e(ge),{key:0,placement:"left"},{content:o(()=>[_("div",Wt,[s(e(F),null,{default:o(()=>[C(g(T.value),1)]),_:1})])]),default:o(()=>[_("div",{class:re(["action-item",{disabled:z.value}])},[(c(),$(R(P.value),{size:16})),_("span",null,g(j.value),1)],2)]),_:1})):(c(),A("div",Dt,[(c(),$(R(P.value),{size:16})),_("span",null,g(j.value),1)]))]),_:1})]),_:1})]),default:o(()=>[s(e(et),{style:{cursor:"pointer"},size:20,class:"actions-menu"})]),_:1})]),s(Tt,{"stage-id":m.stage.id,"project-id":e(w),executions:m.stage.executions,"task-stats":m.stage.taskStats,style:{"margin-top":"8px"}},null,8,["stage-id","project-id","executions","task-stats"])],2))}});const J=ie(Ft,[["__scopeId","data-v-0d8346f9"]]);function Yt(u,t){const d=new it,L=new dt(u),w=V({}),r=V({}),a=V(!1);async function p(){const i=t.value;if(i.length===0){a.value=!1;return}a.value=!0;try{const[v,S]=await Promise.all([Promise.all(i.map(async f=>{try{const{executions:M}=await d.list({projectId:u,stageId:f,limit:6});return{stageId:f,executions:M}}catch(M){return console.error(`Failed to load executions for stage ${f}:`,M),{stageId:f,executions:[]}}})),L.getTasksStatistics()]);v.forEach(({stageId:f,executions:M})=>{w.value[f]=M}),S.forEach(f=>{r.value[f.stageId]={pending:f.pendingTasks,completed:f.completedTasks,total:f.totalTasks,averageCompletionSeconds:f.averageCompletionSeconds}})}catch(v){console.error("Failed to load workflow data:",v)}finally{a.value=!1}}const{startPolling:l,endPolling:x}=ct({task:p,interval:15e3});return Ae(t,i=>{i.length>0&&(p(),l())},{immediate:!0}),ze(()=>{x()}),{executionsByStage:w,taskStatsByStage:r,loading:a,refetch:p}}const we=u=>(Ne("data-v-7b40ff03"),u=u(),Ve(),u),Xt={class:"flow-container"},Gt={class:"code-container"},Ot=we(()=>_("code",{class:"install-code"},"pip install abstra",-1)),qt={class:"code-container"},Jt=we(()=>_("code",{class:"install-code"},"abstra editor .",-1)),Ut={key:0,class:"edit-button-text"},ne="#ea576a",Rt=X({__name:"WorkflowViewer",setup(u){const{onInit:t}=Oe(),d=new Re,L=me(),w=_e(),r=L.params.projectId,a=L.query.buildId,p=V(!0),l=V(null),x=V(!0),i=V(!1),v=()=>{w.push({name:"web-editor",params:{projectId:r}})},S=async n=>{try{await navigator.clipboard.writeText(n)}catch(y){console.error("Failed to copy:",y)}};t(n=>{x.value&&(n.fitView(),x.value=!1)});const f=V([]),M=V([]),P=b(()=>f.value.map(n=>n.id)),{executionsByStage:j,taskStatsByStage:z}=Yt(r,P),T=b(()=>f.value.length>0),E=b(()=>f.value.map(n=>({id:n.id,type:n.type,data:{...n,executions:j.value[n.id]||[],taskStats:z.value[n.id]||null},position:{x:n.position.x,y:n.position.y*1.5}}))),m=b(()=>M.value.map(n=>({id:n.id,source:n.sourceStageId,target:n.targetStageId,type:"task",data:{id:n.id,props:{taskType:n.taskType}},markerEnd:{type:Je.Arrow,width:24,height:24}})));function I(n){const y=[],h=[],D=["jobs","hooks","forms","scripts"];for(const B of D){const W=n[B]||[];for(const N of W){y.push({id:N.id,type:B,title:N.title,position:{x:N.workflow_position[0],y:N.workflow_position[1]},file:N.file,path:N.path,schedule:N.schedule});for(const U of N.transitions||[])h.push({id:U.id,sourceStageId:N.id,targetStageId:U.target_id,taskType:U.task_type})}}f.value=y,M.value=h}return Be(async()=>{try{p.value=!0;let n;if(a){const B=(await le.list(r)).find(W=>W.id===a);if(!B){l.value="Build not found";return}n=B}else{const B=(await le.list(r)).find(W=>W.latest);if(!B){l.value="No builds found for this project";return}n=B}const y=await d.get(n.id);if(!y||!y.abstraJson){l.value="No workflow data available for this build";return}const h=JSON.parse(y.abstraJson);I(h)}catch(n){l.value=n instanceof Error?n.message:"Failed to load workflow",console.error(n)}finally{p.value=!1}}),(n,y)=>(c(),A("div",Xt,[p.value?(c(),$(e(Ze),{key:0,style:{width:"100%"}})):T.value?(c(),$(e(qe),{key:2,nodes:E.value,edges:m.value,"default-viewport":{zoom:1.5},"fit-view-on-init":"","min-zoom":.1,"max-zoom":1.25,"pan-on-scroll":e(De).isMac,"snap-to-grid":""},{"edge-task":o(h=>[s(Pt,je(Te(h)),null,16)]),"node-forms":o(h=>[s(J,{stage:h.data},null,8,["stage"])]),"node-hooks":o(h=>[s(J,{stage:h.data},null,8,["stage"])]),"node-scripts":o(h=>[s(J,{stage:h.data},null,8,["stage"])]),"node-jobs":o(h=>[s(J,{stage:h.data},null,8,["stage"])]),default:o(()=>[s(e(Ye),{"pattern-color":"#aaa",gap:16})]),_:1},8,["nodes","edges","pan-on-scroll"])):(c(),$(e(se),{key:1,class:"empty-state-card"},{default:o(()=>[s(e(Z),{vertical:"",gap:24,align:"center"},{default:o(()=>[s(e(Bt),{size:64,color:ne}),s(e(Z),{vertical:"",gap:8,align:"center"},{default:o(()=>[s(e(Q),{level:3},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_getting_started")),1)]),_:1}),s(e(F),{type:"secondary",style:{"text-align":"center"}},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_no_workflow_description")),1)]),_:1})]),_:1}),s(e(Z),{gap:16,wrap:"wrap",justify:"center"},{default:o(()=>[s(e(se),{class:"option-card"},{default:o(()=>[s(e(Z),{vertical:"",gap:12},{default:o(()=>[s(e(He),{size:32,color:ne}),s(e(Q),{level:5},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_option_cli")),1)]),_:1}),s(e(F),{type:"secondary",style:{"font-size":"13px"}},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_cli_description")),1)]),_:1}),s(e(Z),{vertical:"",gap:8},{default:o(()=>[_("div",Gt,[Ot,s(G,{type:"text",size:"small",onClick:y[0]||(y[0]=h=>S("pip install abstra"))},{default:o(()=>[s(e(ue),{size:16})]),_:1})]),_("div",qt,[Jt,s(G,{type:"text",size:"small",onClick:y[1]||(y[1]=h=>S("abstra editor ."))},{default:o(()=>[s(e(ue),{size:16})]),_:1})])]),_:1})]),_:1})]),_:1}),s(e(se),{class:"option-card"},{default:o(()=>[s(e(Z),{vertical:"",gap:12},{default:o(()=>[s(e(We),{size:32,color:ne}),s(e(Q),{level:5},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_option_online")),1)]),_:1}),s(e(F),{type:"secondary",style:{"font-size":"13px"}},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_online_description")),1)]),_:1}),s(G,{type:"primary",onClick:v},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_open_editor")),1)]),_:1})]),_:1})]),_:1})]),_:1}),s(e(Pe),{href:"https://www.abstra.io/docs",target:"_blank"},{default:o(()=>[C(g(e(k).translate("i18n_workflowviewer_view_docs"))+" ",1),s(e(Ee),{size:14,style:{"margin-left":"4px"}})]),_:1})]),_:1})]),_:1})),!p.value&&T.value?(c(),$(G,{key:3,class:re(["edit-button",{expanded:i.value}]),type:"primary",size:"large",onClick:v,onMouseenter:y[2]||(y[2]=h=>i.value=!0),onMouseleave:y[3]||(y[3]=h=>i.value=!1)},{default:o(()=>[s(e(Fe),{size:24}),i.value?(c(),A("span",Ut,g(e(k).translate("i18n_workflowviewer_edit_online")),1)):H("",!0)]),_:1},8,["class"])):H("",!0)]))}});const $a=ie(Rt,[["__scopeId","data-v-7b40ff03"]]);export{$a as default};
2
+ //# sourceMappingURL=WorkflowViewer.b2b3ee29.js.map
@@ -0,0 +1,2 @@
1
+ import{en as n,M as y}from"./jwt-decode.esm.4071145e.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},r=new Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="d2641f97-6a68-4d8a-af76-94fe7e640790",e._sentryDebugIdIdentifier="sentry-dbid-d2641f97-6a68-4d8a-af76-94fe7e640790")}catch{}})();function u(e){return n.exports.isArray(e)?e.length===0?"[ ]":"[ ... ]":n.exports.isObject(e)?Object.keys(e).length===0?"{ }":"{ ... }":n.exports.isString(e)?`'${e}'`:n.exports.isUndefined(e)||n.exports.isNull(e)?"None":e===!0?"True":e===!1?"False":`${e}`}function o(e){if(n.exports.isArray(e))return"array";if(n.exports.isObject(e))return"object";throw new Error("treeKey called with non-object and non-array")}function c(e,r=[],t){const f=t?`'${t}': ${u(e)}`:u(e);if(n.exports.isArray(e)){const i=o(e);return[{title:f,key:[...r,i].join("/"),children:e.flatMap((s,l)=>c(s,[...r,i,`${l}`]))}]}else if(n.exports.isObject(e)){const i=o(e);return[{title:f,key:[...r,i].join("/"),children:Object.entries(e).flatMap(([s,l])=>c(l,[...r,i,s],s))}]}else return[{title:f,key:r.join("/"),children:[]}]}function x(e,r){return new Promise(t=>{y.confirm({title:e,onOk:()=>t(!0),okText:r==null?void 0:r.okText,onCancel:()=>t(!1),cancelText:r==null?void 0:r.cancelText})})}export{x as a,c as t};
2
+ //# sourceMappingURL=ant-design.805ab95d.js.map
@@ -1,2 +1,2 @@
1
- var o=Object.defineProperty;var c=(a,t,e)=>t in a?o(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var d=(a,t,e)=>(c(a,typeof t!="symbol"?t+"":t,e),e);import{k as s}from"./router.29e08ea4.js";import"./jwt-decode.esm.32f71954.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="dce0f3a7-3ae0-4701-9196-1e0823a34362",a._sentryDebugIdIdentifier="sentry-dbid-dce0f3a7-3ae0-4701-9196-1e0823a34362")}catch{}})();class u{constructor(){d(this,"urlPath","api-keys")}async create({projectId:t,name:e}){return s.post(`projects/${t}/${this.urlPath}`,{name:e})}async delete(t,e){await s.delete(`projects/${t}/${this.urlPath}/${e}`)}async list(t){return s.get(`projects/${t}/${this.urlPath}`)}}const r=new u;class n{constructor(t){this.dto=t}static async list(t){return(await r.list(t)).map(i=>new n(i))}static async create(t){const e=await r.create(t);return new n(e)}static async delete(t,e){await r.delete(t,e)}get id(){return this.dto.id}get name(){return this.dto.name}get createdAt(){return new Date(this.dto.createdAt)}get ownerId(){return this.dto.createdBy}get value(){var t;return(t=this.dto.value)!=null?t:null}}export{n as A};
2
- //# sourceMappingURL=apiKey.975dfeae.js.map
1
+ var i=Object.defineProperty;var o=(a,t,e)=>t in a?i(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var d=(a,t,e)=>(o(a,typeof t!="symbol"?t+"":t,e),e);import{k as s}from"./router.ef7a08cf.js";import"./jwt-decode.esm.4071145e.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="219c49af-40b2-4c5d-a7f8-0b652d7a2c70",a._sentryDebugIdIdentifier="sentry-dbid-219c49af-40b2-4c5d-a7f8-0b652d7a2c70")}catch{}})();class u{constructor(){d(this,"urlPath","api-keys")}async create({projectId:t,name:e}){return s.post(`projects/${t}/${this.urlPath}`,{name:e})}async delete(t,e){await s.delete(`projects/${t}/${this.urlPath}/${e}`)}async list(t){return s.get(`projects/${t}/${this.urlPath}`)}}const r=new u;class n{constructor(t){this.dto=t}static async list(t){return(await r.list(t)).map(c=>new n(c))}static async create(t){const e=await r.create(t);return new n(e)}static async delete(t,e){await r.delete(t,e)}get id(){return this.dto.id}get name(){return this.dto.name}get createdAt(){return new Date(this.dto.createdAt)}get ownerId(){return this.dto.createdBy}get value(){var t;return(t=this.dto.value)!=null?t:null}}export{n as A};
2
+ //# sourceMappingURL=apiKey.1b1aafc4.js.map
@@ -0,0 +1,2 @@
1
+ import{$ as c,c as l}from"./jwt-decode.esm.4071145e.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[e]="fd11a98b-3fc1-4100-915f-aa6c97863509",r._sentryDebugIdIdentifier="sentry-dbid-fd11a98b-3fc1-4100-915f-aa6c97863509")}catch{}})();const i=r=>{const e=c({loading:!0,result:null,error:null}),n=t=>(e.value={loading:!1,result:t,error:null},t),a=t=>{e.value={loading:!1,result:null,error:t}},o=async()=>(e.value={loading:!0,result:e.value.result,error:null},r().then(n).catch(a));o();const s=l(()=>e.value.loading),u=l(()=>e.value.result),d=l(()=>e.value.error);return{loading:s,result:u,error:d,refetch:o}};export{i as a};
2
+ //# sourceMappingURL=asyncComputed.0308626b.js.map
@@ -1,2 +1,2 @@
1
- import{k as n}from"./router.29e08ea4.js";import"./jwt-decode.esm.32f71954.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="bc5c7e2f-a03c-46d3-94e8-e26375377c04",a._sentryDebugIdIdentifier="sentry-dbid-bc5c7e2f-a03c-46d3-94e8-e26375377c04")}catch{}})();class g{async list(e){return n.get(`projects/${e}/builds`)}async get(e){return n.get(`builds/${e}`)}async download(e){return n.get(`builds/${e}/download`)}}const d=new g;class l{constructor(e){this.dto=e}static async list(e){return(await d.list(e)).map(o=>new l(o))}get id(){return this.dto.id}get projectId(){return this.dto.projectId}get createdAt(){return new Date(this.dto.createdAt)}get status(){return this.dto.status}get log(){return this.dto.log}get latest(){return this.dto.latest}get abstraVersion(){return this.dto.abstraVersion}async download(){const e=await d.download(this.id);if(!e)throw new Error("Download failed");window.open(e.url,"_blank")}}class c{constructor(e,s,o,r){this.projectId=e,this.buildId=s,this.abstraVersion=o,this.project=r}static fromV0(e,s,o,r){const i={hooks:r.hooks.map(t=>({id:t.path,logQuery:{buildId:s,stageId:t.path,stageTitle:t.title},...t})),forms:r.forms.map(t=>({id:t.path,logQuery:{buildId:s,stageId:t.path,stageTitle:t.title},...t})),jobs:r.jobs.map(t=>({id:t.identifier,logQuery:{buildId:s,stageId:t.identifier,stageTitle:t.title},...t})),scripts:[]};return new c(e,s,o,i)}static fromDTO(e,s,o,r){const i={hooks:r.hooks.map(t=>({logQuery:{buildId:s,stageId:t.id,stageTitle:t.title},...t})),forms:r.forms.map(t=>({logQuery:{buildId:s,stageId:t.id,stageTitle:t.title},...t})),jobs:r.jobs.map(t=>({logQuery:{buildId:s,stageId:t.id,stageTitle:t.title},...t})),scripts:r.scripts.map(t=>({logQuery:{buildId:s,stageId:t.id,stageTitle:t.title},...t}))};return new c(e,s,o,i)}static async get(e){const s=await d.get(e);if(!s)throw new Error("Build not found");const{projectId:o,abstraJson:r,abstraVersion:i}=s;if(!r||!i)return null;const t=JSON.parse(r);if(!t.version)throw new Error("Version is invalid");return t.version==="0.1"?this.fromV0(o,e,i,t):this.fromDTO(o,e,i,t)}get runtimes(){return[...this.project.forms.map(e=>({...e,type:"form"})),...this.project.hooks.map(e=>({...e,type:"hook"})),...this.project.jobs.map(e=>({...e,type:"job"})),...this.project.scripts.map(e=>({...e,type:"script"}))]}}export{c as B,l as a,g as b};
2
- //# sourceMappingURL=build.c626214a.js.map
1
+ import{k as n}from"./router.ef7a08cf.js";import"./jwt-decode.esm.4071145e.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=new Error().stack;e&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[e]="e5570ae2-b48d-44f9-9346-8a4c10174edf",i._sentryDebugIdIdentifier="sentry-dbid-e5570ae2-b48d-44f9-9346-8a4c10174edf")}catch{}})();class c{async list(e){return n.get(`projects/${e}/builds`)}async get(e){return n.get(`builds/${e}`)}async download(e){return n.get(`builds/${e}/download`)}}const d=new c;class g{constructor(e){this.dto=e}static async list(e){return(await d.list(e)).map(a=>new g(a))}get id(){return this.dto.id}get projectId(){return this.dto.projectId}get createdAt(){return new Date(this.dto.createdAt)}get status(){return this.dto.status}get log(){return this.dto.log}get latest(){return this.dto.latest}get abstraVersion(){return this.dto.abstraVersion}async download(){const e=await d.download(this.id);if(!e)throw new Error("Download failed");window.open(e.url,"_blank")}}class l{constructor(e,s,a,r){this.projectId=e,this.buildId=s,this.abstraVersion=a,this.project=r}static fromV0(e,s,a,r){const o={hooks:r.hooks.map(t=>({id:t.path,logQuery:{buildId:s,stageId:t.path,stageTitle:t.title},...t})),forms:r.forms.map(t=>({id:t.path,logQuery:{buildId:s,stageId:t.path,stageTitle:t.title},...t})),jobs:r.jobs.map(t=>({id:t.identifier,logQuery:{buildId:s,stageId:t.identifier,stageTitle:t.title},...t})),scripts:[]};return new l(e,s,a,o)}static fromDTO(e,s,a,r){const o={hooks:r.hooks.map(t=>({logQuery:{buildId:s,stageId:t.id,stageTitle:t.title},...t})),forms:r.forms.map(t=>({logQuery:{buildId:s,stageId:t.id,stageTitle:t.title},...t})),jobs:r.jobs.map(t=>({logQuery:{buildId:s,stageId:t.id,stageTitle:t.title},...t})),scripts:r.scripts.map(t=>({logQuery:{buildId:s,stageId:t.id,stageTitle:t.title},...t}))};return new l(e,s,a,o)}static async get(e){const s=await d.get(e);if(!s)throw new Error("Build not found");const{projectId:a,abstraJson:r,abstraVersion:o}=s;if(!r||!o)return null;const t=JSON.parse(r);if(!t.version)throw new Error("Version is invalid");return t.version==="0.1"?this.fromV0(a,e,o,t):this.fromDTO(a,e,o,t)}get runtimes(){return[...this.project.forms.map(e=>({...e,type:"form"})),...this.project.hooks.map(e=>({...e,type:"hook"})),...this.project.jobs.map(e=>({...e,type:"job"})),...this.project.scripts.map(e=>({...e,type:"script"}))]}}export{l as B,g as a,c as b};
2
+ //# sourceMappingURL=build.1cc9147c.js.map
@@ -0,0 +1,2 @@
1
+ import"./jwt-decode.esm.4071145e.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="36f98360-7e41-4282-b881-cbccbeb3bf5d",e._sentryDebugIdIdentifier="sentry-dbid-36f98360-7e41-4282-b881-cbccbeb3bf5d")}catch{}})();function p(e,t){const{r:n,g:r,b:o,usePound:s}=g(e);return w(u(n,-t),u(r,-t),u(o,-t),s)}function u(e,t){const n=e*(100+t*100)/100;return n>255?255:n<0?0:Math.round(n)}function E(e){return e.startsWith("#")||e.match(/^(rgb|hsl)/)}const v=(e,t)=>y(p(y(e),t)),P=e=>k(e)?v(e,.1):p(e,.1);function k(e){const{r:t,g:n,b:r}=g(e);return t*.299+n*.587+r*.114<186}function g(e){let t=!1;e[0]=="#"&&(e=e.slice(1),t=!0);const n=parseInt(e,16);return{r:n>>16&255,g:n>>8&255,b:n&255,usePound:t}}function y(e){const{r:t,g:n,b:r,usePound:o}=g(e);return w(255-t,255-n,255-r,o)}const w=(e,t,n,r=!0)=>(r?"#":"")+(n|t<<8|e<<16).toString(16).padStart(6,"0");function _(e){return new Promise((t,n)=>{const r=document.createElement("img");r.src=e,r.crossOrigin="Anonymous",r.style.display="none",document.body.appendChild(r);let o=0;r.onerror=s=>n(new Error(`Failed to load image: ${s}`)),r.onload=()=>{const{width:s,height:f}=r,a=document.createElement("canvas");a.width=s,a.height=f;const c=a.getContext("2d");if(!c)return t(!1);c.drawImage(r,0,0);const I=c.getImageData(0,0,a.width,a.height),{data:d}=I;let b,l,h,m;for(let i=0,x=d.length;i<x;i+=4)b=d[i],l=d[i+1],h=d[i+2],m=Math.floor((b+l+h)/3),o+=m;const D=Math.floor(o/(s*f));document.body.removeChild(r),t(D<=127)}})}export{k as a,_ as b,P as c,E as i,v as l};
2
+ //# sourceMappingURL=colorHelpers.93df70ab.js.map