mage-ai 0.9.69__py3-none-any.whl → 0.9.71__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 mage-ai might be problematic. Click here for more details.

Files changed (624) hide show
  1. mage_ai/ai/utils/xgboost.py +222 -0
  2. mage_ai/api/errors.py +37 -25
  3. mage_ai/api/operations/base.py +13 -1
  4. mage_ai/api/parsers/PipelineScheduleParser.py +1 -1
  5. mage_ai/api/policies/BackfillPolicy.py +1 -0
  6. mage_ai/api/policies/BlockOutputPolicy.py +40 -17
  7. mage_ai/api/policies/GlobalDataProductPolicy.py +91 -41
  8. mage_ai/api/policies/KernelPolicy.py +55 -32
  9. mage_ai/api/policies/KernelProcessPolicy.py +56 -0
  10. mage_ai/api/policies/OutputPolicy.py +73 -41
  11. mage_ai/api/policies/PipelinePolicy.py +206 -137
  12. mage_ai/api/policies/WorkspacePolicy.py +1 -0
  13. mage_ai/api/presenters/BackfillPresenter.py +1 -0
  14. mage_ai/api/presenters/BlockLayoutItemPresenter.py +9 -7
  15. mage_ai/api/presenters/BlockPresenter.py +1 -1
  16. mage_ai/api/presenters/GlobalDataProductPresenter.py +6 -1
  17. mage_ai/api/presenters/KernelPresenter.py +5 -26
  18. mage_ai/api/presenters/KernelProcessPresenter.py +28 -0
  19. mage_ai/api/presenters/PipelinePresenter.py +18 -5
  20. mage_ai/api/presenters/StatusPresenter.py +2 -0
  21. mage_ai/api/presenters/SyncPresenter.py +25 -0
  22. mage_ai/api/resources/AutocompleteItemResource.py +1 -1
  23. mage_ai/api/resources/BlockLayoutItemResource.py +90 -44
  24. mage_ai/api/resources/BlockOutputResource.py +42 -9
  25. mage_ai/api/resources/BlockResource.py +4 -3
  26. mage_ai/api/resources/BlockRunResource.py +27 -22
  27. mage_ai/api/resources/ClusterResource.py +4 -1
  28. mage_ai/api/resources/CustomTemplateResource.py +34 -14
  29. mage_ai/api/resources/DataProviderResource.py +1 -1
  30. mage_ai/api/resources/ExecutionStateResource.py +3 -1
  31. mage_ai/api/resources/FileContentResource.py +8 -2
  32. mage_ai/api/resources/FileResource.py +10 -4
  33. mage_ai/api/resources/FileVersionResource.py +3 -1
  34. mage_ai/api/resources/GitBranchResource.py +101 -31
  35. mage_ai/api/resources/GitCustomBranchResource.py +29 -1
  36. mage_ai/api/resources/GlobalDataProductResource.py +44 -7
  37. mage_ai/api/resources/GlobalHookResource.py +4 -1
  38. mage_ai/api/resources/IntegrationDestinationResource.py +6 -2
  39. mage_ai/api/resources/IntegrationSourceResource.py +8 -4
  40. mage_ai/api/resources/IntegrationSourceStreamResource.py +6 -2
  41. mage_ai/api/resources/KernelProcessResource.py +44 -0
  42. mage_ai/api/resources/KernelResource.py +25 -3
  43. mage_ai/api/resources/OauthResource.py +1 -1
  44. mage_ai/api/resources/OutputResource.py +33 -11
  45. mage_ai/api/resources/PageBlockLayoutResource.py +34 -23
  46. mage_ai/api/resources/PipelineInteractionResource.py +31 -15
  47. mage_ai/api/resources/PipelineResource.py +258 -125
  48. mage_ai/api/resources/PipelineRunResource.py +52 -7
  49. mage_ai/api/resources/PipelineScheduleResource.py +11 -2
  50. mage_ai/api/resources/PipelineTriggerResource.py +6 -1
  51. mage_ai/api/resources/ProjectResource.py +18 -7
  52. mage_ai/api/resources/PullRequestResource.py +6 -4
  53. mage_ai/api/resources/SecretResource.py +1 -1
  54. mage_ai/api/resources/SeedResource.py +8 -1
  55. mage_ai/api/resources/StatusResource.py +21 -6
  56. mage_ai/api/resources/SyncResource.py +6 -8
  57. mage_ai/api/resources/VariableResource.py +46 -26
  58. mage_ai/api/resources/VersionControlProjectResource.py +9 -2
  59. mage_ai/api/resources/WidgetResource.py +1 -1
  60. mage_ai/api/resources/WorkspaceResource.py +6 -5
  61. mage_ai/api/views.py +47 -40
  62. mage_ai/authentication/permissions/seed.py +16 -2
  63. mage_ai/authentication/providers/oidc.py +21 -1
  64. mage_ai/autocomplete/utils.py +13 -9
  65. mage_ai/cache/base.py +1 -1
  66. mage_ai/cache/block.py +18 -12
  67. mage_ai/cache/block_action_object/__init__.py +33 -5
  68. mage_ai/cache/file.py +22 -19
  69. mage_ai/cache/pipeline.py +18 -12
  70. mage_ai/cli/main.py +1 -0
  71. mage_ai/cluster_manager/aws/emr_cluster_manager.py +9 -5
  72. mage_ai/cluster_manager/config.py +2 -2
  73. mage_ai/cluster_manager/kubernetes/workload_manager.py +52 -1
  74. mage_ai/cluster_manager/manage.py +1 -1
  75. mage_ai/cluster_manager/workspace/base.py +7 -1
  76. mage_ai/cluster_manager/workspace/kubernetes.py +22 -1
  77. mage_ai/command_center/applications/factory.py +10 -7
  78. mage_ai/command_center/applications/utils.py +2 -2
  79. mage_ai/command_center/files/factory.py +17 -15
  80. mage_ai/command_center/presenters/text.py +1 -1
  81. mage_ai/command_center/utils.py +25 -13
  82. mage_ai/data/__init__.py +0 -0
  83. mage_ai/data/constants.py +45 -0
  84. mage_ai/data/models/__init__.py +0 -0
  85. mage_ai/data/models/base.py +119 -0
  86. mage_ai/data/models/constants.py +1 -0
  87. mage_ai/data/models/generator.py +115 -0
  88. mage_ai/data/models/manager.py +168 -0
  89. mage_ai/data/models/pyarrow/__init__.py +0 -0
  90. mage_ai/data/models/pyarrow/record_batch.py +55 -0
  91. mage_ai/data/models/pyarrow/shared.py +21 -0
  92. mage_ai/data/models/pyarrow/table.py +8 -0
  93. mage_ai/data/models/reader.py +103 -0
  94. mage_ai/data/models/utils.py +59 -0
  95. mage_ai/data/models/writer.py +91 -0
  96. mage_ai/data/tabular/__init__.py +0 -0
  97. mage_ai/data/tabular/constants.py +23 -0
  98. mage_ai/data/tabular/mocks.py +19 -0
  99. mage_ai/data/tabular/models.py +126 -0
  100. mage_ai/data/tabular/reader.py +602 -0
  101. mage_ai/data/tabular/utils.py +102 -0
  102. mage_ai/data/tabular/writer.py +266 -0
  103. mage_ai/data/variables/__init__.py +0 -0
  104. mage_ai/data/variables/wrapper.py +54 -0
  105. mage_ai/data_cleaner/analysis/charts.py +61 -39
  106. mage_ai/data_cleaner/column_types/column_type_detector.py +53 -31
  107. mage_ai/data_cleaner/estimators/encoders.py +5 -2
  108. mage_ai/data_integrations/utils/scheduler.py +16 -11
  109. mage_ai/data_preparation/decorators.py +1 -0
  110. mage_ai/data_preparation/executors/block_executor.py +237 -155
  111. mage_ai/data_preparation/executors/k8s_block_executor.py +30 -7
  112. mage_ai/data_preparation/executors/k8s_pipeline_executor.py +30 -7
  113. mage_ai/data_preparation/executors/streaming_pipeline_executor.py +2 -2
  114. mage_ai/data_preparation/git/__init__.py +77 -29
  115. mage_ai/data_preparation/git/api.py +69 -8
  116. mage_ai/data_preparation/git/utils.py +64 -34
  117. mage_ai/data_preparation/logging/logger_manager.py +4 -3
  118. mage_ai/data_preparation/models/block/__init__.py +1562 -879
  119. mage_ai/data_preparation/models/block/data_integration/mixins.py +4 -3
  120. mage_ai/data_preparation/models/block/dynamic/__init__.py +17 -6
  121. mage_ai/data_preparation/models/block/dynamic/child.py +41 -102
  122. mage_ai/data_preparation/models/block/dynamic/constants.py +1 -0
  123. mage_ai/data_preparation/models/block/dynamic/counter.py +296 -0
  124. mage_ai/data_preparation/models/block/dynamic/data.py +16 -0
  125. mage_ai/data_preparation/models/block/dynamic/factory.py +163 -0
  126. mage_ai/data_preparation/models/block/dynamic/models.py +19 -0
  127. mage_ai/data_preparation/models/block/dynamic/shared.py +92 -0
  128. mage_ai/data_preparation/models/block/dynamic/utils.py +295 -167
  129. mage_ai/data_preparation/models/block/dynamic/variables.py +384 -144
  130. mage_ai/data_preparation/models/block/dynamic/wrappers.py +77 -0
  131. mage_ai/data_preparation/models/block/extension/utils.py +10 -1
  132. mage_ai/data_preparation/models/block/global_data_product/__init__.py +35 -3
  133. mage_ai/data_preparation/models/block/integration/__init__.py +6 -2
  134. mage_ai/data_preparation/models/block/outputs.py +722 -0
  135. mage_ai/data_preparation/models/block/platform/mixins.py +7 -8
  136. mage_ai/data_preparation/models/block/r/__init__.py +56 -38
  137. mage_ai/data_preparation/models/block/remote/__init__.py +0 -0
  138. mage_ai/data_preparation/models/block/remote/models.py +58 -0
  139. mage_ai/data_preparation/models/block/settings/__init__.py +0 -0
  140. mage_ai/data_preparation/models/block/settings/dynamic/__init__.py +0 -0
  141. mage_ai/data_preparation/models/block/settings/dynamic/constants.py +7 -0
  142. mage_ai/data_preparation/models/block/settings/dynamic/mixins.py +118 -0
  143. mage_ai/data_preparation/models/block/settings/dynamic/models.py +31 -0
  144. mage_ai/data_preparation/models/block/settings/global_data_products/__init__.py +0 -0
  145. mage_ai/data_preparation/models/block/settings/global_data_products/mixins.py +20 -0
  146. mage_ai/data_preparation/models/block/settings/global_data_products/models.py +46 -0
  147. mage_ai/data_preparation/models/block/settings/variables/__init__.py +0 -0
  148. mage_ai/data_preparation/models/block/settings/variables/mixins.py +74 -0
  149. mage_ai/data_preparation/models/block/settings/variables/models.py +49 -0
  150. mage_ai/data_preparation/models/block/spark/mixins.py +2 -1
  151. mage_ai/data_preparation/models/block/sql/__init__.py +30 -5
  152. mage_ai/data_preparation/models/block/sql/utils/shared.py +21 -3
  153. mage_ai/data_preparation/models/block/utils.py +164 -69
  154. mage_ai/data_preparation/models/constants.py +21 -14
  155. mage_ai/data_preparation/models/custom_templates/custom_block_template.py +18 -13
  156. mage_ai/data_preparation/models/custom_templates/custom_pipeline_template.py +33 -16
  157. mage_ai/data_preparation/models/custom_templates/utils.py +1 -1
  158. mage_ai/data_preparation/models/file.py +41 -28
  159. mage_ai/data_preparation/models/global_data_product/__init__.py +100 -58
  160. mage_ai/data_preparation/models/global_hooks/models.py +1 -0
  161. mage_ai/data_preparation/models/interfaces.py +29 -0
  162. mage_ai/data_preparation/models/pipeline.py +374 -185
  163. mage_ai/data_preparation/models/pipelines/integration_pipeline.py +1 -2
  164. mage_ai/data_preparation/models/pipelines/seed.py +1 -1
  165. mage_ai/data_preparation/models/project/__init__.py +66 -18
  166. mage_ai/data_preparation/models/project/constants.py +2 -0
  167. mage_ai/data_preparation/models/triggers/__init__.py +124 -26
  168. mage_ai/data_preparation/models/utils.py +467 -17
  169. mage_ai/data_preparation/models/variable.py +1028 -137
  170. mage_ai/data_preparation/models/variables/__init__.py +0 -0
  171. mage_ai/data_preparation/models/variables/cache.py +149 -0
  172. mage_ai/data_preparation/models/variables/constants.py +72 -0
  173. mage_ai/data_preparation/models/variables/summarizer.py +336 -0
  174. mage_ai/data_preparation/models/variables/utils.py +77 -0
  175. mage_ai/data_preparation/models/widget/__init__.py +63 -41
  176. mage_ai/data_preparation/models/widget/charts.py +40 -27
  177. mage_ai/data_preparation/models/widget/constants.py +2 -0
  178. mage_ai/data_preparation/models/widget/utils.py +3 -3
  179. mage_ai/data_preparation/preferences.py +3 -3
  180. mage_ai/data_preparation/repo_manager.py +55 -21
  181. mage_ai/data_preparation/storage/base_storage.py +2 -2
  182. mage_ai/data_preparation/storage/gcs_storage.py +7 -4
  183. mage_ai/data_preparation/storage/local_storage.py +18 -9
  184. mage_ai/data_preparation/storage/s3_storage.py +5 -2
  185. mage_ai/data_preparation/templates/data_exporters/streaming/oracledb.yaml +8 -0
  186. mage_ai/data_preparation/variable_manager.py +281 -76
  187. mage_ai/io/base.py +3 -2
  188. mage_ai/io/bigquery.py +1 -0
  189. mage_ai/io/redshift.py +7 -5
  190. mage_ai/kernels/__init__.py +0 -0
  191. mage_ai/kernels/models.py +188 -0
  192. mage_ai/kernels/utils.py +169 -0
  193. mage_ai/orchestration/concurrency.py +6 -2
  194. mage_ai/orchestration/db/__init__.py +1 -0
  195. mage_ai/orchestration/db/migrations/versions/0227396a216c_add_userproject_table.py +38 -0
  196. mage_ai/orchestration/db/migrations/versions/42a14d6143f1_update_token_column_type.py +54 -0
  197. mage_ai/orchestration/db/models/dynamic/__init__.py +0 -0
  198. mage_ai/orchestration/db/models/dynamic/controller.py +67 -0
  199. mage_ai/orchestration/db/models/oauth.py +12 -18
  200. mage_ai/orchestration/db/models/projects.py +10 -0
  201. mage_ai/orchestration/db/models/schedules.py +225 -187
  202. mage_ai/orchestration/db/models/schedules_project_platform.py +18 -12
  203. mage_ai/orchestration/db/models/utils.py +46 -5
  204. mage_ai/orchestration/metrics/pipeline_run.py +8 -9
  205. mage_ai/orchestration/notification/sender.py +38 -15
  206. mage_ai/orchestration/pipeline_scheduler_original.py +64 -33
  207. mage_ai/orchestration/pipeline_scheduler_project_platform.py +1 -1
  208. mage_ai/orchestration/run_status_checker.py +11 -4
  209. mage_ai/orchestration/triggers/api.py +41 -2
  210. mage_ai/orchestration/triggers/global_data_product.py +9 -4
  211. mage_ai/orchestration/triggers/utils.py +10 -1
  212. mage_ai/orchestration/utils/resources.py +3 -0
  213. mage_ai/presenters/charts/data_sources/base.py +4 -2
  214. mage_ai/presenters/charts/data_sources/block.py +15 -9
  215. mage_ai/presenters/charts/data_sources/chart_code.py +8 -5
  216. mage_ai/presenters/charts/data_sources/constants.py +1 -0
  217. mage_ai/presenters/charts/data_sources/system_metrics.py +22 -0
  218. mage_ai/presenters/interactions/models.py +11 -7
  219. mage_ai/presenters/pages/loaders/pipelines.py +5 -3
  220. mage_ai/presenters/pages/models/page_components/pipeline_schedules.py +3 -1
  221. mage_ai/presenters/utils.py +2 -0
  222. mage_ai/server/api/blocks.py +2 -1
  223. mage_ai/server/api/downloads.py +9 -2
  224. mage_ai/server/api/runs.py +151 -0
  225. mage_ai/server/api/triggers.py +3 -1
  226. mage_ai/server/constants.py +1 -1
  227. mage_ai/server/frontend_dist/404.html +8 -8
  228. mage_ai/server/frontend_dist/_next/static/UZLabyPgcxtZvp0O0EUUS/_buildManifest.js +1 -0
  229. mage_ai/server/frontend_dist/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
  230. mage_ai/server/frontend_dist/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
  231. mage_ai/server/frontend_dist/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
  232. mage_ai/server/frontend_dist/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
  233. mage_ai/server/frontend_dist/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
  234. mage_ai/server/frontend_dist/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
  235. mage_ai/server/frontend_dist/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
  236. mage_ai/server/frontend_dist/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
  237. mage_ai/server/frontend_dist/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
  238. mage_ai/server/frontend_dist/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
  239. mage_ai/server/frontend_dist/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
  240. mage_ai/server/frontend_dist/_next/static/chunks/5699-176f445e1313f001.js +1 -0
  241. mage_ai/server/frontend_dist/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
  242. mage_ai/server/frontend_dist/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
  243. mage_ai/server/frontend_dist/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
  244. mage_ai/server/frontend_dist/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
  245. mage_ai/server/frontend_dist/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
  246. mage_ai/server/frontend_dist/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
  247. mage_ai/server/frontend_dist/_next/static/chunks/{main-77fe248a6fbd12d8.js → main-b99d4e30a88d9dc7.js} +1 -1
  248. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-9fe2d9d07c94e968.js +1 -0
  249. mage_ai/server/frontend_dist/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
  250. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
  251. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
  252. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
  253. mage_ai/server/frontend_dist/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
  254. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
  255. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
  256. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
  257. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
  258. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
  259. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
  260. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
  261. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
  262. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
  263. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
  264. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
  265. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
  266. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
  267. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
  268. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
  269. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
  270. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
  271. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
  272. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
  273. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
  274. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
  275. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
  276. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
  277. mage_ai/server/frontend_dist/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
  278. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
  279. mage_ai/server/frontend_dist/_next/static/chunks/{webpack-d079359c241db804.js → webpack-ac7fdc472bedf682.js} +1 -1
  280. mage_ai/server/frontend_dist/block-layout.html +3 -3
  281. mage_ai/server/frontend_dist/compute.html +6 -6
  282. mage_ai/server/frontend_dist/files.html +6 -6
  283. mage_ai/server/frontend_dist/global-data-products/[...slug].html +6 -6
  284. mage_ai/server/frontend_dist/global-data-products.html +6 -6
  285. mage_ai/server/frontend_dist/global-hooks/[...slug].html +6 -6
  286. mage_ai/server/frontend_dist/global-hooks.html +6 -6
  287. mage_ai/server/frontend_dist/index.html +3 -3
  288. mage_ai/server/frontend_dist/manage/files.html +6 -6
  289. mage_ai/server/frontend_dist/manage/settings.html +6 -6
  290. mage_ai/server/frontend_dist/manage/users/[user].html +6 -6
  291. mage_ai/server/frontend_dist/manage/users/new.html +6 -6
  292. mage_ai/server/frontend_dist/manage/users.html +6 -6
  293. mage_ai/server/frontend_dist/manage.html +6 -6
  294. mage_ai/server/frontend_dist/oauth.html +5 -5
  295. mage_ai/server/frontend_dist/overview.html +6 -6
  296. mage_ai/server/frontend_dist/pipeline-runs.html +6 -6
  297. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  298. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +6 -6
  299. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +6 -6
  300. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +3 -3
  301. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +6 -6
  302. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  303. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  304. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +6 -6
  305. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +6 -6
  306. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +6 -6
  307. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +6 -6
  308. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +6 -6
  309. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  310. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +6 -6
  311. mage_ai/server/frontend_dist/pipelines/[pipeline].html +3 -3
  312. mage_ai/server/frontend_dist/pipelines.html +6 -6
  313. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +6 -6
  314. mage_ai/server/frontend_dist/platform/global-hooks.html +6 -6
  315. mage_ai/server/frontend_dist/settings/account/profile.html +6 -6
  316. mage_ai/server/frontend_dist/settings/platform/preferences.html +6 -6
  317. mage_ai/server/frontend_dist/settings/platform/settings.html +6 -6
  318. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +6 -6
  319. mage_ai/server/frontend_dist/settings/workspace/permissions.html +6 -6
  320. mage_ai/server/frontend_dist/settings/workspace/preferences.html +6 -6
  321. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +6 -6
  322. mage_ai/server/frontend_dist/settings/workspace/roles.html +6 -6
  323. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +6 -6
  324. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +6 -6
  325. mage_ai/server/frontend_dist/settings/workspace/users.html +6 -6
  326. mage_ai/server/frontend_dist/settings.html +3 -3
  327. mage_ai/server/frontend_dist/sign-in.html +15 -15
  328. mage_ai/server/frontend_dist/templates/[...slug].html +6 -6
  329. mage_ai/server/frontend_dist/templates.html +6 -6
  330. mage_ai/server/frontend_dist/terminal.html +6 -6
  331. mage_ai/server/frontend_dist/test.html +3 -3
  332. mage_ai/server/frontend_dist/triggers.html +6 -6
  333. mage_ai/server/frontend_dist/version-control.html +6 -6
  334. mage_ai/server/frontend_dist_base_path_template/404.html +8 -8
  335. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1376-22de38b4ad008d8a.js +1 -0
  336. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-25a7d985d5564fd3.js +1 -0
  337. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1668-30b4619b9534519b.js +1 -0
  338. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1799-c42db95a015689ee.js +1 -0
  339. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2996-2108b53b9d371d8d.js +1 -0
  340. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3548-fa0792ddb88f4646.js → 3548-9d26185b3fb663b1.js} +1 -1
  341. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{3763-61b542dafdbf5754.js → 3763-40780c6d1e4b261d.js} +1 -1
  342. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-129dd2a2448a2e36.js +1 -0
  343. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3958-bcdfa414ccfa1eb2.js +1 -0
  344. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4168-97fd1578d1a38315.js +1 -0
  345. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4982-fa5a238b139fbdd2.js +1 -0
  346. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-176f445e1313f001.js +1 -0
  347. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7162-7dd03f0f605de721.js +1 -0
  348. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7779-68d2b72a90c5f925.js +1 -0
  349. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-5446a8e43711e2f9.js +1 -0
  350. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8023-6c2f172f48dcb99b.js +1 -0
  351. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-c351b8a735d73e0c.js +1 -0
  352. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-8b8e100079ab69e1.js +1 -0
  353. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{main-70b78159c2bb3fe1.js → main-384298e9133cec76.js} +1 -1
  354. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-13a578bce3b7f30c.js +1 -0
  355. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{block-layout-14f952f66964022f.js → block-layout-7f4b735c67115df5.js} +1 -1
  356. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-e7d48e6b0c3068ac.js +1 -0
  357. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-b943f31f050fc3a4.js +1 -0
  358. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-4bfc84ff07d7656f.js +1 -0
  359. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{overview-597b74828bf105db.js → overview-9f1ac4ec003884f3.js} +1 -1
  360. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-6d183f91a2ff6668.js} +1 -1
  361. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-7e737f6fc7e83e9b.js +1 -0
  362. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-38e1fbcfbfc1014e.js +1 -0
  363. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-d94488e3f2eeef36.js +1 -0
  364. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-cc641a7fa8473796.js +1 -0
  365. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-a5c0362763a21fa8.js → block-runs-284309877f3c5a5a.js} +1 -1
  366. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-26250e5335194ade.js +1 -0
  367. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors-5f4c8128b2413fd8.js} +1 -1
  368. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-4ebfc8e400315dda.js +1 -0
  369. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-e5e0150a256aadb3.js +1 -0
  370. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-eb11c5390c982b49.js +1 -0
  371. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-1bdfda8edc9cf4a8.js → triggers-4612d15a65c35912.js} +1 -1
  372. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/{profile-3f0df3decc856ee9.js → profile-3ae43c932537b254.js} +1 -1
  373. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-b603d7fe4b175256.js +1 -0
  374. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-319ddbabc239e91b.js} +1 -1
  375. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-47b64ced27c24985.js → [...slug]-5c360f72e4498855.js} +1 -1
  376. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-e5a4d3d815cec25d.js → permissions-fb29fa6c2bd90bb0.js} +1 -1
  377. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-3b76fa959ffa09d3.js +1 -0
  378. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-379e1ee292504842.js → [...slug]-3b787b42f1093b1f.js} +1 -1
  379. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-0b83fbdd39e85f5b.js +1 -0
  380. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-a1e6950974d643a8.js +1 -0
  381. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-2af9afbe727d88aa.js → [...slug]-0aa019d87db8b0b8.js} +1 -1
  382. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-a4db8710f703c729.js → users-88c694d19207f2ec.js} +1 -1
  383. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{triggers-9cba3211434a8966.js → triggers-a599c6ac89be8c8d.js} +1 -1
  384. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-31d0d50f7f30462b.js +1 -0
  385. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-68c003fb6a175cd7.js → webpack-481689d9989710cd.js} +1 -1
  386. mage_ai/server/frontend_dist_base_path_template/_next/static/kcptwoOU-JJJg6Vwpkfmx/_buildManifest.js +1 -0
  387. mage_ai/server/frontend_dist_base_path_template/block-layout.html +3 -3
  388. mage_ai/server/frontend_dist_base_path_template/compute.html +6 -6
  389. mage_ai/server/frontend_dist_base_path_template/files.html +6 -6
  390. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +6 -6
  391. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +6 -6
  392. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +6 -6
  393. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +6 -6
  394. mage_ai/server/frontend_dist_base_path_template/index.html +3 -3
  395. mage_ai/server/frontend_dist_base_path_template/manage/files.html +6 -6
  396. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +6 -6
  397. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +6 -6
  398. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +6 -6
  399. mage_ai/server/frontend_dist_base_path_template/manage/users.html +6 -6
  400. mage_ai/server/frontend_dist_base_path_template/manage.html +6 -6
  401. mage_ai/server/frontend_dist_base_path_template/oauth.html +5 -5
  402. mage_ai/server/frontend_dist_base_path_template/overview.html +6 -6
  403. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +6 -6
  404. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +6 -6
  405. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +6 -6
  406. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +6 -6
  407. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +3 -3
  408. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +6 -6
  409. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +6 -6
  410. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +6 -6
  411. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +6 -6
  412. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +6 -6
  413. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +6 -6
  414. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +6 -6
  415. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +6 -6
  416. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +6 -6
  417. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +6 -6
  418. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +3 -3
  419. mage_ai/server/frontend_dist_base_path_template/pipelines.html +6 -6
  420. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +6 -6
  421. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +6 -6
  422. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +6 -6
  423. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +6 -6
  424. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +6 -6
  425. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +6 -6
  426. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +6 -6
  427. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +6 -6
  428. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +6 -6
  429. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +6 -6
  430. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +6 -6
  431. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +6 -6
  432. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +6 -6
  433. mage_ai/server/frontend_dist_base_path_template/settings.html +3 -3
  434. mage_ai/server/frontend_dist_base_path_template/sign-in.html +15 -15
  435. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +6 -6
  436. mage_ai/server/frontend_dist_base_path_template/templates.html +6 -6
  437. mage_ai/server/frontend_dist_base_path_template/terminal.html +6 -6
  438. mage_ai/server/frontend_dist_base_path_template/test.html +3 -3
  439. mage_ai/server/frontend_dist_base_path_template/triggers.html +6 -6
  440. mage_ai/server/frontend_dist_base_path_template/version-control.html +6 -6
  441. mage_ai/server/kernel_output_parser.py +4 -1
  442. mage_ai/server/scheduler_manager.py +12 -1
  443. mage_ai/server/server.py +69 -42
  444. mage_ai/server/utils/custom_output.py +284 -0
  445. mage_ai/server/utils/execute_custom_code.py +245 -0
  446. mage_ai/server/utils/output_display.py +123 -289
  447. mage_ai/server/websocket_server.py +116 -69
  448. mage_ai/services/aws/ecs/ecs.py +1 -0
  449. mage_ai/services/k8s/config.py +27 -4
  450. mage_ai/services/k8s/job_manager.py +6 -1
  451. mage_ai/services/k8s/utils.py +97 -0
  452. mage_ai/services/ssh/aws/emr/utils.py +8 -8
  453. mage_ai/settings/keys/auth.py +1 -0
  454. mage_ai/settings/platform/__init__.py +159 -38
  455. mage_ai/settings/platform/constants.py +5 -0
  456. mage_ai/settings/platform/utils.py +53 -10
  457. mage_ai/settings/repo.py +26 -12
  458. mage_ai/settings/server.py +128 -37
  459. mage_ai/shared/array.py +24 -1
  460. mage_ai/shared/complex.py +45 -0
  461. mage_ai/shared/config.py +2 -1
  462. mage_ai/shared/custom_logger.py +11 -0
  463. mage_ai/shared/dates.py +10 -6
  464. mage_ai/shared/files.py +63 -8
  465. mage_ai/shared/hash.py +33 -9
  466. mage_ai/shared/io.py +9 -5
  467. mage_ai/shared/models.py +82 -24
  468. mage_ai/shared/outputs.py +87 -0
  469. mage_ai/shared/parsers.py +144 -13
  470. mage_ai/shared/path_fixer.py +11 -7
  471. mage_ai/shared/singletons/__init__.py +0 -0
  472. mage_ai/shared/singletons/base.py +47 -0
  473. mage_ai/shared/singletons/memory.py +38 -0
  474. mage_ai/shared/strings.py +34 -1
  475. mage_ai/shared/yaml.py +24 -0
  476. mage_ai/streaming/sinks/oracledb.py +57 -0
  477. mage_ai/streaming/sinks/sink_factory.py +4 -0
  478. mage_ai/system/__init__.py +0 -0
  479. mage_ai/system/constants.py +14 -0
  480. mage_ai/system/memory/__init__.py +0 -0
  481. mage_ai/system/memory/constants.py +1 -0
  482. mage_ai/system/memory/manager.py +174 -0
  483. mage_ai/system/memory/presenters.py +158 -0
  484. mage_ai/system/memory/process.py +216 -0
  485. mage_ai/system/memory/samples.py +13 -0
  486. mage_ai/system/memory/utils.py +656 -0
  487. mage_ai/system/memory/wrappers.py +177 -0
  488. mage_ai/system/models.py +58 -0
  489. mage_ai/system/storage/__init__.py +0 -0
  490. mage_ai/system/storage/utils.py +29 -0
  491. mage_ai/tests/api/endpoints/mixins.py +2 -2
  492. mage_ai/tests/api/endpoints/test_blocks.py +2 -1
  493. mage_ai/tests/api/endpoints/test_custom_designs.py +4 -4
  494. mage_ai/tests/api/endpoints/test_pipeline_runs.py +2 -2
  495. mage_ai/tests/api/endpoints/test_projects.py +2 -1
  496. mage_ai/tests/api/operations/base/mixins.py +1 -1
  497. mage_ai/tests/api/operations/base/test_base.py +27 -27
  498. mage_ai/tests/api/operations/base/test_base_with_user_authentication.py +27 -27
  499. mage_ai/tests/api/operations/base/test_base_with_user_permissions.py +23 -23
  500. mage_ai/tests/api/operations/test_syncs.py +6 -4
  501. mage_ai/tests/api/resources/test_pipeline_resource.py +11 -4
  502. mage_ai/tests/authentication/oauth/test_utils.py +1 -1
  503. mage_ai/tests/authentication/providers/test_oidc.py +59 -0
  504. mage_ai/tests/base_test.py +2 -2
  505. mage_ai/tests/data/__init__.py +0 -0
  506. mage_ai/tests/data/models/__init__.py +0 -0
  507. mage_ai/tests/data_preparation/executors/test_block_executor.py +23 -16
  508. mage_ai/tests/data_preparation/git/test_git.py +4 -1
  509. mage_ai/tests/data_preparation/models/block/dynamic/test_combos.py +305 -0
  510. mage_ai/tests/data_preparation/models/block/dynamic/test_counter.py +212 -0
  511. mage_ai/tests/data_preparation/models/block/dynamic/test_factory.py +360 -0
  512. mage_ai/tests/data_preparation/models/block/dynamic/test_variables.py +332 -0
  513. mage_ai/tests/data_preparation/models/block/hook/test_hook_block.py +2 -2
  514. mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +1 -1
  515. mage_ai/tests/data_preparation/models/block/sql/utils/test_shared.py +26 -1
  516. mage_ai/tests/data_preparation/models/block/test_global_data_product.py +5 -2
  517. mage_ai/tests/data_preparation/models/custom_templates/test_utils.py +5 -4
  518. mage_ai/tests/data_preparation/models/global_hooks/test_hook.py +3 -0
  519. mage_ai/tests/data_preparation/models/global_hooks/test_predicates.py +9 -3
  520. mage_ai/tests/data_preparation/models/test_block.py +115 -120
  521. mage_ai/tests/data_preparation/models/test_blocks_helper.py +114 -0
  522. mage_ai/tests/data_preparation/models/test_global_data_product.py +41 -24
  523. mage_ai/tests/data_preparation/models/test_pipeline.py +9 -6
  524. mage_ai/tests/data_preparation/models/test_project.py +4 -1
  525. mage_ai/tests/data_preparation/models/test_utils.py +80 -0
  526. mage_ai/tests/data_preparation/models/test_variable.py +242 -69
  527. mage_ai/tests/data_preparation/models/variables/__init__.py +0 -0
  528. mage_ai/tests/data_preparation/models/variables/test_summarizer.py +481 -0
  529. mage_ai/tests/data_preparation/storage/shared/__init__.py +0 -0
  530. mage_ai/tests/data_preparation/test_repo_manager.py +6 -7
  531. mage_ai/tests/data_preparation/test_variable_manager.py +57 -48
  532. mage_ai/tests/factory.py +64 -43
  533. mage_ai/tests/orchestration/db/models/test_schedules.py +3 -3
  534. mage_ai/tests/orchestration/db/models/test_schedules_dynamic_blocks.py +279 -0
  535. mage_ai/tests/orchestration/test_pipeline_scheduler.py +1 -0
  536. mage_ai/tests/orchestration/triggers/test_global_data_product.py +141 -138
  537. mage_ai/tests/orchestration/triggers/test_utils.py +3 -2
  538. mage_ai/tests/server/test_server.py +19 -0
  539. mage_ai/tests/services/k8s/test_job_manager.py +27 -6
  540. mage_ai/tests/streaming/sinks/test_oracledb.py +38 -0
  541. mage_ai/tests/test_shared.py +61 -0
  542. mage_ai/usage_statistics/logger.py +7 -2
  543. mage_ai/utils/code.py +33 -19
  544. mage_ai/version_control/branch/utils.py +2 -1
  545. mage_ai/version_control/models.py +3 -2
  546. {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/METADATA +6 -3
  547. {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/RECORD +555 -454
  548. mage_ai/data_preparation/models/global_data_product/constants.py +0 -6
  549. mage_ai/server/frontend_dist/_next/static/_krrrgup_C-dPOpX36S8I/_buildManifest.js +0 -1
  550. mage_ai/server/frontend_dist/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
  551. mage_ai/server/frontend_dist/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
  552. mage_ai/server/frontend_dist/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
  553. mage_ai/server/frontend_dist/_next/static/chunks/4783-422429203610c318.js +0 -1
  554. mage_ai/server/frontend_dist/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
  555. mage_ai/server/frontend_dist/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
  556. mage_ai/server/frontend_dist/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
  557. mage_ai/server/frontend_dist/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
  558. mage_ai/server/frontend_dist/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
  559. mage_ai/server/frontend_dist/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
  560. mage_ai/server/frontend_dist/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
  561. mage_ai/server/frontend_dist/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
  562. mage_ai/server/frontend_dist/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
  563. mage_ai/server/frontend_dist/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
  564. mage_ai/server/frontend_dist/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
  565. mage_ai/server/frontend_dist/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
  566. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
  567. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
  568. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
  569. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
  570. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
  571. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
  572. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
  573. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
  574. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
  575. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
  576. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
  577. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
  578. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
  579. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
  580. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
  581. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
  582. mage_ai/server/frontend_dist_base_path_template/_next/static/KLL5mirre9d7_ZeEpaw3s/_buildManifest.js +0 -1
  583. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-df144fbd8b2208c3.js +0 -1
  584. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2631-b9f9bea3f1cf906d.js +0 -1
  585. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3782-ef4cd4f0b52072d0.js +0 -1
  586. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/4783-422429203610c318.js +0 -1
  587. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5699-6d708c6b2153ea08.js +0 -1
  588. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/635-0d6b7c8804bcd2dc.js +0 -1
  589. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7022-0d52dd8868621fb0.js +0 -1
  590. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7361-8a23dd8360593e7a.js +0 -1
  591. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/7966-f07b2913f7326b50.js +0 -1
  592. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8095-bdce03896ef9639a.js +0 -1
  593. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8146-6bed4e7401e067e6.js +0 -1
  594. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9265-d2a1aaec75ec69b8.js +0 -1
  595. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9440-4069842b90d4b801.js +0 -1
  596. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9624-59b2f803f9c88cd6.js +0 -1
  597. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9832-67896490f6e8a014.js +0 -1
  598. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/_app-d9c89527266296f7.js +0 -1
  599. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js +0 -1
  600. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products-78e8e88f2a757a18.js +0 -1
  601. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-852d403c7bda21b3.js +0 -1
  602. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js +0 -1
  603. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js +0 -1
  604. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js +0 -1
  605. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js +0 -1
  606. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js +0 -1
  607. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js +0 -1
  608. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js +0 -1
  609. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js +0 -1
  610. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-503049734a8b082f.js +0 -1
  611. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js +0 -1
  612. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js +0 -1
  613. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js +0 -1
  614. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-5753fac7c1bfdc88.js +0 -1
  615. mage_ai/shared/memory.py +0 -90
  616. mage_ai/tests/data_preparation/models/block/dynamic/test_dynamic_helpers.py +0 -48
  617. /mage_ai/{tests/data_preparation/shared → ai/utils}/__init__.py +0 -0
  618. /mage_ai/server/frontend_dist/_next/static/{_krrrgup_C-dPOpX36S8I → UZLabyPgcxtZvp0O0EUUS}/_ssgManifest.js +0 -0
  619. /mage_ai/server/frontend_dist_base_path_template/_next/static/{KLL5mirre9d7_ZeEpaw3s → kcptwoOU-JJJg6Vwpkfmx}/_ssgManifest.js +0 -0
  620. /mage_ai/tests/data_preparation/{shared → storage/shared}/test_secrets.py +0 -0
  621. {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/LICENSE +0 -0
  622. {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/WHEEL +0 -0
  623. {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/entry_points.txt +0 -0
  624. {mage_ai-0.9.69.dist-info → mage_ai-0.9.71.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4947],{64657:function(e,t,n){"use strict";n.d(t,{CD:function(){return a},NU:function(){return o},a_:function(){return r},hu:function(){return l}});var r,i=n(44897);!function(e){e.BLOCK_RUNS="block_runs",e.BLOCK_RUNTIME="block_runtime",e.PIPELINE_RUNS="pipeline_runs"}(r||(r={}));var o=[i.Z.accent.warning,i.Z.background.success,i.Z.accent.negative,i.Z.content.active,i.Z.interactive.linkPrimary],l=["cancelled","completed","failed","initial","running"],a=-50},7116:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});n(82684);var r=n(34376),i=n(85854),o=n(75457),l=n(38276),a=n(30160),c=n(74395),u=n(25976),s=n(44897),d=n(70515),p=u.default.div.withConfig({displayName:"indexstyle__LinkStyle",componentId:"sc-1in9sst-0"})(["padding:","px ","px;"," ",""],d.iI,d.tr,(function(e){return e.selected&&"\n background-color: ".concat((e.theme.interactive||s.Z.interactive).checked,";\n ")}),(function(e){return!e.selected&&"\n cursor: pointer;\n "})),f=n(64657),h=n(28795),m=n(28598);var v=function(e){var t=e.breadcrumbs,n=e.children,u=e.errors,s=e.monitorType,v=e.pipeline,x=e.setErrors,g=e.subheader,y=(0,r.useRouter)();return(0,m.jsx)(o.Z,{before:(0,m.jsxs)(c.M,{children:[(0,m.jsx)(l.Z,{p:d.cd,children:(0,m.jsx)(i.Z,{level:4,muted:!0,children:"Insights"})}),(0,m.jsx)(p,{onClick:function(e){e.preventDefault(),y.push("/pipelines/[pipeline]/monitors","/pipelines/".concat(null===v||void 0===v?void 0:v.uuid,"/monitors"))},selected:f.a_.PIPELINE_RUNS==s,children:(0,m.jsx)(a.ZP,{children:"Pipeline runs"})}),(0,m.jsx)(p,{onClick:function(e){e.preventDefault(),y.push("/pipelines/[pipeline]/monitors/block-runs","/pipelines/".concat(null===v||void 0===v?void 0:v.uuid,"/monitors/block-runs"))},selected:f.a_.BLOCK_RUNS==s,children:(0,m.jsx)(a.ZP,{children:"Block runs"})}),(0,m.jsx)(p,{onClick:function(e){e.preventDefault(),y.push("/pipelines/[pipeline]/monitors/block-runtime","/pipelines/".concat(null===v||void 0===v?void 0:v.uuid,"/monitors/block-runtime"))},selected:f.a_.BLOCK_RUNTIME==s,children:(0,m.jsx)(a.ZP,{children:"Block runtime"})})]}),breadcrumbs:t,errors:u,pageName:h.M.MONITOR,pipeline:v,setErrors:x,subheader:g,uuid:"pipeline/monitor",children:n})}},74395:function(e,t,n){"use strict";n.d(t,{M:function(){return l},W:function(){return o}});var r=n(25976),i=n(46684),o=34*n(70515).iI,l=r.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],i.Mz)},74168:function(e,t,n){"use strict";var r=n(26304),i=n(21831),o=n(82394),l=n(82684),a=n(26226),c=n(25976),u=n(90948),s=n(84969),d=n(65743),p=n(85587),f=n(79487),h=n(52136),m=n(67778),v=n(29989),x=n(17066),g=n(84482),y=n(76771),b=n(98889),k=n(65376),j=n(61655),Z=n(97745),w=n(48072),O=n(10103),P=n(84181),_=n(24903),M=n(55485),L=n(30160),C=n(94035),T=n(44897),E=n(8454),I=n(79633),F=n(95363),N=n(61896),D=n(70515),S=n(86735),B=n(79221),A=n(98684),R=n(28598),U=["areaBetweenLines","data","events","height","lineLegendNames","margin","width","xAxisLabel","xLabelFormat","yAxisLabel","yLabelFormat"];function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K=Y(Y({},k.j),{},{backgroundColor:T.Z.background.muted,border:"none"}),q=(0,j.Z)((function(e){var t=e.areaBetweenLines,n=e.data,r=e.events,o=void 0!==r&&r,a=e.getX,j=e.getY,M=e.getYScaleValues,C=e.gridProps,U=void 0===C?{}:C,X=e.height,q=e.hideGridX,W=e.hideTooltip,z=e.increasedXTicks,V=e.lineLegendNames,J=e.margin,G=e.noCurve,H=e.numYTicks,Q=e.renderXTooltipContent,$=e.renderYTooltipContent,ee=e.showTooltip,te=e.thickStroke,ne=e.tooltipData,re=e.tooltipLeft,ie=void 0===re?0:re,oe=e.tooltipTop,le=void 0===oe?[]:oe,ae=e.width,ce=e.xLabelFormat,ue=e.xLabelRotate,se=void 0===ue||ue,de=e.yLabelFormat,pe=(0,l.useContext)(c.ThemeContext),fe=a||function(e){return null===e||void 0===e?void 0:e.x},he=j||function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return null===e||void 0===e||null===(t=e.y)||void 0===t?void 0:t[n]},me=T.Z.monotone.gray,ve=T.Z.brand.wind200,xe=T.Z.content.muted,ge=T.Z.monotone.gray,ye=n.map((function(e){return Number(fe(e))}));if(ae<10)return null;var be=ae-J.left-J.right,ke=X-J.top-J.bottom,je=be/2,Ze=0===n.length?0:Math.max.apply(Math,(0,i.Z)(n.map((function(e){var t=e.y;return(null===t||void 0===t?void 0:t.length)||0})))),we=(0,l.useMemo)((function(){return(0,P.Z)({domain:[Math.min.apply(Math,(0,i.Z)(ye)),Math.max.apply(Math,(0,i.Z)(ye))],range:[0,be]})}),[be,ye]),Oe=Math.min.apply(Math,(0,i.Z)(n.map((function(e){var t=e.y;return Math.min.apply(Math,(0,i.Z)(M?M(t):t||[]))})))),Pe=Math.max.apply(Math,(0,i.Z)(n.map((function(e){var t=e.y;return Math.max.apply(Math,(0,i.Z)(M?M(t):t||[]))})))),_e=(0,l.useMemo)((function(){return(0,P.Z)({domain:[Oe,Pe],nice:!0,range:[ke,0]})}),[ke,Pe,Oe]),Me=ae>520?z?20:10:z?10:5,Le=(0,A.K)(pe),Ce=xe,Te=Le.map((function(e){return{stroke:e}})),Ee=(0,_.Z)({domain:V||[],range:Te.map((function(e){return e.stroke}))}),Ie=(0,l.useCallback)((function(e){var t=((0,w.Z)(e)||{x:0}).x,r=we.invert(t-J.left),i=(0,S.ry)(ye,(function(e){return r>=e})),o=n[i-1],l=n[i],a=o;l&&(r-fe(o)>fe(l)-r?a=l:(a=o,i-=1));var c=(0,O.range)(0,Ze).map((function(e){return _e(he(a,e))})),u=c.some((function(e){return"undefined"===typeof e}));(he(a)||M&&!u)&&ee({tooltipData:Y(Y({},a),{},{index:i}),tooltipLeft:t,tooltipTop:c})}),[n,fe,he,M,J,ee,we,ye,_e]),Fe={};return G||(Fe.curve=Z.ZP),(0,R.jsxs)(R.Fragment,{children:[V&&(0,R.jsx)("div",{style:{marginLeft:null===J||void 0===J?void 0:J.left},children:(0,R.jsx)(x.Z,{labelFormat:function(e){return e},scale:Ee,children:function(e){return(0,R.jsx)("div",{style:{display:"flex",flexDirection:E.qs.ROW},children:e.map((function(e,t){return(0,R.jsxs)(g.Z,{margin:"0 5px",onClick:function(){o&&alert("clicked: ".concat(JSON.stringify(e)))},children:[(0,R.jsx)("svg",{height:15,width:15,children:(0,R.jsx)("rect",{fill:e.value,height:15,width:15})}),(0,R.jsx)(y.Z,{align:"left",margin:"0 0 0 4px",children:(0,R.jsx)(L.ZP,{small:!0,children:e.text})})]},"legend-quantile-".concat(t))}))})}})}),(0,R.jsxs)("svg",{height:X,width:ae,children:[!t&&(0,R.jsx)(d.Z,{fill:"transparent",height:X,onMouseLeave:function(){return W()},onMouseMove:Ie,onTouchMove:Ie,onTouchStart:Ie,rx:14,width:ae-(J.left+J.right),x:J.left,y:0}),(0,R.jsxs)(v.Z,{left:J.left,top:J.top,children:[!q&&(0,R.jsx)(h.Z,Y({height:ke,pointerEvents:"none",scale:we,stroke:me,strokeDasharray:"3,3",strokeOpacity:.4,width:be},U)),(0,R.jsx)(m.Z,Y({height:ke,pointerEvents:"none",scale:_e,stroke:me,strokeDasharray:"3,3",strokeOpacity:.4,width:be},U)),(0,R.jsx)("line",{stroke:me,x1:be,x2:be,y1:0,y2:ke}),(0,R.jsx)(u.Z,{numTicks:Me,scale:we,stroke:Ce,tickFormat:function(e){return ce?ce(e):e},tickLabelProps:function(e){return{fill:xe,fontFamily:F.ry,fontSize:N.J5,textAnchor:"middle",transform:se&&"rotate(-45, ".concat(we(e),", 0) translate(-32, 4)")}},tickStroke:Ce,top:ke}),(0,R.jsx)(s.Z,{hideTicks:!0,numTicks:H,scale:_e,stroke:Ce,tickFormat:function(e){return de?de(e):(0,B.P5)(e)},tickLabelProps:function(e){return{dx:String(e).length>4?3:0,fill:xe,fontFamily:F.ry,fontSize:N.J5,textAnchor:"end",transform:"translate(0,2.5)"}},tickStroke:Ce}),t&&t.map((function(e){var t=e[0],r=e[1];return(0,l.createElement)(b.Z,Y(Y({},Fe),{},{aboveAreaProps:{fill:T.Z.brand.earth400,fillOpacity:.3},belowAreaProps:{fill:ve,fillOpacity:.2},clipAboveTo:0,clipBelowTo:ke,data:n,id:"".concat(Math.random()),key:"".concat(t,"-").concat(r),x:function(e){return we(fe(e))},y0:function(e){return _e("undefined"===typeof r?Oe:he(e,r))},y1:function(e){return _e(he(e,t))}}))})),(0,O.range)(0,Ze).map((function(e){return(0,l.createElement)(p.Z,Y(Y({},Fe),{},{data:n.filter((function(e){return void 0!=e.y})),key:e,pointerEvents:"none",strokeWidth:te?2:1,x:function(e){return we(fe(e))},y:function(t){return _e(t.y&&(e>=t.y.length?Oe:he(t,e)))}},Te[e]))}))]}),ne&&(0,R.jsxs)("g",{children:[(0,R.jsx)(f.Z,{from:{x:ie,y:J.top},pointerEvents:"none",stroke:I.Ej,strokeDasharray:"5,2",strokeWidth:1,to:{x:ie,y:ke+J.top}}),le.map((function(e,t){return(0,R.jsx)("circle",{cx:ie,cy:e+1+J.top,fill:Te[t].stroke,fillOpacity:.1,pointerEvents:"none",r:4,stroke:ge,strokeOpacity:.1,strokeWidth:1},t)})),le.map((function(e,t){return(0,R.jsx)("circle",{cx:ie,cy:e+J.top,fill:Te[t].stroke,pointerEvents:"none",r:4,stroke:Te[t].stroke,strokeWidth:2},t)}))]})]}),ne&&(0,R.jsxs)("div",{children:[le.map((function(e,t){var n=he(ne,t);return t>=1&&Math.abs(le[t-1]-e)<5*D.iI&&(e+=3*D.iI),(0,R.jsxs)(k.Z,{left:ie>je?ie-(0,B.Vs)($,ne,t)*D.iI:ie+D.iI,style:K,top:e-2*D.iI,children:[$&&$(ne,t),!$&&(0,R.jsxs)(L.ZP,{center:!0,small:!0,children:[n.toFixed?n.toFixed(3):n," ",null===V||void 0===V?void 0:V[t]]})]},t)})),(0,R.jsxs)(k.Z,{left:ie>je?ie-4*(0,B.Vs)(Q,ne):ie,style:Y(Y({},K),{},{transform:"translateX(-65%)"}),top:ke+J.top,children:[Q&&Q(ne),!Q&&(0,R.jsx)(L.ZP,{center:!0,small:!0,children:fe(ne).toFixed(3)})]})]})]})}));t.Z=function(e){var t=e.areaBetweenLines,n=e.data,i=(e.events,e.height),o=e.lineLegendNames,l=e.margin,c=void 0===l?{}:l,u=e.width,s=e.xAxisLabel,d=e.xLabelFormat,p=e.yAxisLabel,f=e.yLabelFormat,h=(0,r.Z)(e,U),m=Y(Y({},{bottom:3*D.iI,left:5*D.iI,right:3*D.iI,top:3*D.iI}),c);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{style:{display:"flex",height:i,marginBottom:D.iI,width:"100%"},children:[p&&(0,R.jsx)(M.ZP,{alignItems:"center",fullHeight:!0,justifyContent:"center",width:28,children:(0,R.jsx)(C.Z,{children:(0,R.jsx)(L.ZP,{center:!0,muted:!0,small:!0,children:p})})}),(0,R.jsx)("div",{style:{height:i,width:"undefined"===typeof u?"100%":u},children:(0,R.jsx)(a.Z,{children:function(e){var r=e.width,i=e.height;return(0,R.jsx)(q,Y(Y({},h),{},{areaBetweenLines:t,data:n,height:i,lineLegendNames:o,margin:m,width:r,xLabelFormat:d,yLabelFormat:f}))}})})]}),s&&(0,R.jsx)("div",{style:{paddingLeft:p?36:0,paddingTop:4},children:(0,R.jsx)(L.ZP,{center:!0,muted:!0,small:!0,children:s})})]})}},98684:function(e,t,n){"use strict";n.d(t,{K:function(){return i}});var r=n(70987),i=function(e){var t=e||r.Z,n=t.brand,i=n.earth200,o=n.earth300,l=n.earth400,a=n.energy200,c=n.energy300,u=n.energy400,s=n.fire200,d=n.fire300,p=n.fire400,f=n.water200,h=n.water300,m=n.water400,v=n.wind200,x=n.wind300,g=n.wind400,y=t.chart;return[y.backgroundPrimary,y.backgroundSecondary,y.backgroundTertiary].concat([g,m,p,u,l,x,h,d,c,o,v,f,s,a,i])}},94035:function(e,t,n){"use strict";var r=n(25976).default.div.withConfig({displayName:"YAxisLabelContainer",componentId:"sc-qwp21x-0"})(["-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-o-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg);white-space:nowrap;"]);t.Z=r},79221:function(e,t,n){"use strict";n.d(t,{P5:function(){return r},Vs:function(){return i}});n(81728);function r(e,t){var n=t||{},r=n.maxFractionDigits,i=n.minAmount,o=Intl.NumberFormat("en-US",{maximumFractionDigits:r||2,notation:"compact"});return"number"!==typeof e?e:e>=(i||1e4)?o.format(e):e.toString()}function i(e,t,n){var r,i;if("undefined"===typeof e||"undefined"===typeof t)return 0;var o=null===e||void 0===e||null===(r=e(t,n))||void 0===r||null===(i=r.props)||void 0===i?void 0:i.children;return(Array.isArray(o)?o:[o]).join("").length}},82864:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(75582),o=n(82394),l=n(38860),a=n.n(l),c=n(82684),u=n(92083),s=n.n(u),d=n(39867),p=n(55485),f=n(85854),h=n(74168),m=n(7116),v=n(93808),x=n(38276),g=n(44085),y=n(30160),b=n(35686),k=n(44897),j=n(42631),Z=n(46978),w=n(64657),O=n(25976),P=n(81728),_=n(55283),M=n(3917),L=n(86735),C=n(28598);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I="all_blocks";function F(e){var t,n=e.pipeline,r=(0,c.useContext)(O.ThemeContext),l=(0,c.useState)(null),a=l[0],u=l[1],v=n.uuid,T=b.ZP.pipelines.detail(v,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,F=(0,c.useMemo)((function(){return E(E({},null===T||void 0===T?void 0:T.pipeline),{},{uuid:v})}),[T,v]),N=b.ZP.pipeline_schedules.pipelines.list(v).data,D=(0,c.useMemo)((function(){return null===N||void 0===N?void 0:N.pipeline_schedules}),[N]),S=(0,c.useMemo)((function(){return(0,L.HK)(null===F||void 0===F?void 0:F.blocks,(function(e){return e.uuid}))||{}}),[F]),B={pipeline_uuid:v};(a||0===a)&&(B.pipeline_schedule_id=Number(a));var A=b.ZP.monitor_stats.detail("block_run_time",B),R=A.data,U=A.mutate;(0,c.useEffect)((function(){U(a)}),[U,a]);var X=((null===R||void 0===R?void 0:R.monitor_stat)||{}).stats,Y=(0,c.useMemo)((function(){return(0,M.Y_)()}),[]),K=(0,c.useMemo)((function(){var e,t;return X&&(e=(0,o.Z)({},I,[]),t={},Object.entries(X).forEach((function(n){var r=(0,i.Z)(n,2),o=r[0],l=r[1].data;t[o]=[],Y.forEach((function(n,r){t[o].push({x:n,y:n in l?[l[n]]:null}),e.all_blocks[r]||(e.all_blocks[r]={x:n,y:null}),n in l&&(e.all_blocks[r].y||(e.all_blocks[r].y=[]),e.all_blocks[r].y.push({blockUUID:o,runtime:l[n]}))}))}))),E(E({},e),t)}),[Y,X]),q=(0,c.useMemo)((function(){var e=[];return e.push({bold:!0,label:function(){return"Monitors"}}),e}),[]);return(0,C.jsx)(m.Z,{breadcrumbs:q,monitorType:w.a_.BLOCK_RUNTIME,pipeline:F,subheader:(0,C.jsx)(p.ZP,{children:(0,C.jsxs)(g.Z,{backgroundColor:k.Z.interactive.defaultBackground,label:"Trigger:",onChange:function(e){var t=e.target.value;"initial"!==t?(u(t),U(t)):(U(),u(null))},value:a||"initial",children:[(0,C.jsx)("option",{value:"initial",children:"All"}),D&&D.map((function(e){return(0,C.jsx)("option",{value:e.id,children:e.name},e.id)}))]})}),children:(0,C.jsx)(x.Z,{mx:2,children:(null===K||void 0===K||null===(t=K.all_blocks)||void 0===t?void 0:t.length)>0&&Object.entries(K).map((function(e,t){var n,o,l=(0,i.Z)(e,2),a=l[0],c=l[1];return(0,C.jsxs)(x.Z,{mt:2,children:[(0,C.jsxs)(p.ZP,{alignItems:"center",children:[(0,C.jsx)(x.Z,{mx:1,children:(0,C.jsx)(d.Z,{color:(0,_.qn)(null===(n=S[a])||void 0===n?void 0:n.type,{blockColor:null===(o=S[a])||void 0===o?void 0:o.color,theme:r}).accent,size:Z.ZG,square:!0})}),(0,C.jsx)(f.Z,{level:4,children:a===I?(0,P.J3)((0,P.kC)(a)):a})]}),(0,C.jsx)("div",{style:{backgroundColor:k.Z.background.chartBlock,borderRadius:"".concat(j.TR,"px"),marginTop:"8px"},children:(0,C.jsx)(h.Z,{data:c,getX:function(e){return s()(e.x).valueOf()},getY:a===I?function(e,t){var n,r;return null===e||void 0===e||null===(n=e.y)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.runtime}:null,getYScaleValues:a===I?function(e){return(null===e||void 0===e?void 0:e.map((function(e){return null===e||void 0===e?void 0:e.runtime})))||[]}:null,gridProps:{stroke:"black",strokeDasharray:null,strokeOpacity:.2},height:a===I?800:200,hideGridX:!0,margin:{bottom:30,left:35,right:-1,top:10},noCurve:!0,renderXTooltipContent:function(e){return(0,C.jsx)(y.ZP,{center:!0,inverted:!0,small:!0,children:s()(e.x).format("MMM DD")})},renderYTooltipContent:function(e,t){var n,r=null===e||void 0===e||null===(n=e.y)||void 0===n?void 0:n[t];if(a===I){var i=null===r||void 0===r?void 0:r.blockUUID,o=null===r||void 0===r?void 0:r.runtime;return void 0!==o&&(0,C.jsxs)(y.ZP,{center:!0,inverted:!0,small:!0,children:[i||"",": ",o.toFixed?o.toFixed(3):o,"s"]})}return void 0!==r&&(0,C.jsxs)(y.ZP,{center:!0,inverted:!0,small:!0,children:[r.toFixed?r.toFixed(3):r,"s"]})},thickStroke:!0,xLabelFormat:function(e){return s()(e).format("MMM DD")},xLabelRotate:!1,yLabelFormat:function(e){return e%1===0?e:e.toFixed(1)}})})]},"".concat(a,"_").concat(t))}))})})}F.getInitialProps=function(){var e=(0,r.Z)(a().mark((function e(t){var n;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.query.pipeline,e.abrupt("return",{pipeline:{uuid:n}});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.default=(0,v.Z)(F)},76017:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/monitors/block-runtime",function(){return n(82864)}])}},function(e){e.O(0,[3662,125,2714,9832,1557,3782,9774,2888,179],(function(){return t=76017,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8662],{8955:function(e,n,t){"use strict";t.d(n,{G7:function(){return x},ZP:function(){return P},u$:function(){return g}});var r=t(75582),i=t(82394),u=t(26304),o=t(90299),l=t(9134),c=t(24138),s=t(38276),a=t(30160),d=t(75499),p=t(70515),f=t(16488),v=t(42122),h=t(28598),b=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function m(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var g=44,O={uuid:"Run details"},y={uuid:"Dependency tree"},x=[y,O];function P(e){var n=e.height,t=e.heightOffset,i=e.pipeline,j=e.selectedRun,P=e.selectedTab,Z=e.setSelectedTab,k=m({},(0,u.Z)(e,b));j?k.blockStatus=(0,f.IJ)(null===j||void 0===j?void 0:j.block_runs):k.noStatus=!0;var _=(0,v.Kn)(null===j||void 0===j?void 0:j.variables)?m({},null===j||void 0===j?void 0:j.variables):(null===j||void 0===j?void 0:j.variables)||{},w=null===j||void 0===j?void 0:j.event_variables;if(w&&(0,v.Kn)(w)&&!(0,v.Qr)(w))if((0,v.Kn)(_)&&_.hasOwnProperty("event")){var E=(0,v.Kn)(_.event)?_.event:{};_.event=m(m({},E),w)}else _.event=m({},w);var T=[];_&&JSON.stringify(_,null,2).split("\n").forEach((function(e){T.push(" ".concat(e))}));var S=j&&[["Run ID",null===j||void 0===j?void 0:j.id],["Variables",(0,h.jsx)(l.Z,{language:"json",small:!0,source:T.join("\n")},"variable_value")]],D=j&&(0,h.jsx)(s.Z,{pb:p.cd,px:p.cd,children:(0,h.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:S.map((function(e,n){var t=(0,r.Z)(e,2),i=t[0],u=t[1];return[(0,h.jsx)(a.ZP,{monospace:!0,muted:!0,children:i},"key_".concat(n)),(0,h.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:u},"val_".concat(n))]})),uuid:"LogDetail"})}),R=P&&Z;return(0,h.jsxs)(h.Fragment,{children:[R&&(0,h.jsx)(o.Z,{onClickTab:Z,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:x,underlineStyle:!0}),(!R||y.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,h.jsx)(c.ZP,m(m({},k),{},{height:n,heightOffset:(t||0)+(R?g:0),pipeline:i})),O.uuid===(null===P||void 0===P?void 0:P.uuid)&&D]})}},16488:function(e,n,t){"use strict";t.d(n,{IJ:function(){return h},M8:function(){return k},Uc:function(){return O},XM:function(){return Z},_U:function(){return v},eI:function(){return g},gU:function(){return x},lO:function(){return S},ri:function(){return j},tL:function(){return y},vJ:function(){return P},xH:function(){return m}});var r,i=t(82394),u=t(92083),o=t.n(u),l=t(3917),c=t(4383),s=t(30229),a=t(42122),d=t(86735);function p(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function f(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?p(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):p(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var v=function(e){return!!e&&!Object.values(s.U5).includes(e)};function h(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,u=n.started_at,l=n.status,c=null;u&&r&&(c=o()(r).valueOf()-o()(u).valueOf());return f(f({},e),{},(0,i.Z)({},t,{runtime:c,status:l}))}),{})}var b,j=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:s.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:s.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:s.Xm.API}];return e?n.slice(0,1):n};function m(e){var n=(0,a.gR)(e,[s.gm.INTERVAL,s.gm.TYPE]),t=e[s.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var r=e[s.gm.TYPE];return r&&(n["schedule_type[]"]=r),n}function g(e){return e?new Date(o()(e).valueOf()):null}function O(e,n){return n?(0,l.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return o()(g(n)).format(l.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(b||(b={}));var y=(r={},(0,i.Z)(r,b.DAY,86400),(0,i.Z)(r,b.HOUR,3600),(0,i.Z)(r,b.MINUTE,60),(0,i.Z)(r,b.SECOND,1),r);function x(e){var n=b.SECOND,t=e;return e%86400===0?(t/=86400,n=b.DAY):e%3600===0?(t/=3600,n=b.HOUR):e%60===0&&(t/=60,n=b.MINUTE),{time:t,unit:n}}function P(e,n){return e*y[n]}function Z(e,n,t){var r,i=o()(e);return i.set("hour",+(null===n||void 0===n?void 0:n.hour)||0),i.set("minute",+(null===n||void 0===n?void 0:n.minute)||0),i.set("second",0),r=i.format(l.TD),null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(r=i.format(l.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,l.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),r}function k(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t="",r=!0;if(r){var i=(0,c.XF)();n?t="".concat(i,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(t="".concat(i,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(t="".concat(t,"/").concat(e.token)))}return t}function _(e,n,t){return e.match(/[*,-/]/)?{additionalOffset:0,cronValue:e}:function(e,n,t){var r=t.indexOf(e),i=0;if(n<0)for(var u=0;u>n;u--)0===r?(r=t.length-1,i-=1):r-=1;else if(n>0)for(var o=0;o<n;o++)r===t.length-1?(r=0,i+=1):r+=1;var l="number"===typeof t[r]?t[r]:e;return{additionalOffset:i,cronValue:String(l)}}(+e,n,t)}var w=(0,d.m5)(60),E=(0,d.m5)(24),T=(0,l.Cs)();function S(e,n){if(!e)return e;var t=o()().local().format("Z"),r=t.split(":"),i="-"===t[0],u=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),l=Number(r[1]);(i&&!n||!i&&n)&&(u=-u,l=-l);var c=e.split(" "),s=c[0],a=c[1],d=c[2],p=_(s,l,w),f=_(a,u+p.additionalOffset,E);if(c[0]=p.cronValue,c[1]=f.cronValue,0!==(null===f||void 0===f?void 0:f.additionalOffset)){var v=_(d,f.additionalOffset,T);c[2]=v.cronValue}return c.join(" ")}},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return p},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),u=t(38276),o=t(31748),l=t(72473),c=t(79633),s=t(70515),a=t(28598),d=30,p=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,p=e.totalPages,f=[],v=t;if(v>p)f=Array.from({length:p},(function(e,n){return n}));else{var h=Math.floor(v/2),b=n-h;n+h>=p?(b=p-v+2,v-=2):n-h<=0?(b=0,v-=2):(v-=4,b=n-Math.floor(v/2)),f=Array.from({length:v},(function(e,n){return n+b}))}return(0,a.jsx)(a.Fragment,{children:p>0&&(0,a.jsxs)(i.ZP,{alignItems:"center",children:[(0,a.jsx)(r.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,a.jsx)(l.PaginateArrowLeft,{size:1.5*s.iI,stroke:o.Av})}),!f.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!f.includes(1)&&(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),f.map((function(e){return(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{backgroundColor:e===n&&c.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!f.includes(p-1)&&(0,a.jsxs)(a.Fragment,{children:[!f.includes(p-2)&&(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,a.jsx)(u.Z,{ml:1,children:(0,a.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,a.jsx)(u.Z,{ml:1}),(0,a.jsx)(r.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,a.jsx)(l.PaginateArrowRight,{size:1.5*s.iI,stroke:o.Av})})]})})}},14532:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return re}});var r=t(77837),i=t(75582),u=t(82394),o=t(38860),l=t.n(o),c=t(82684),s=t(69864),a=t(34376),d=t(23192),p=t(71180),f=t(15338),v=t(97618),h=t(55485),b=t(85854),j=t(55072),m=t(75457),g=t(44265),O=t(57653),y=t(93808),x=t(38276),P=t(4190),Z=t(30160),k=t(35686),_=t(21831),w=t(26304),E=t(90299),T=t(93859),S=t(24138),D=t(48339),R=t(46684),I=t(70515),N=t(66909),C=t(8955),M=t(16488),U=t(81728),A=t(86735),B=t(28598),L=["blockRuns","blocksOverride","columns","dataType","height","heightOffset","loadingData","outputs","pipeline","renderColumnHeader","rows","selectedRun","selectedTab","setSelectedTab","textData"];function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function G(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var V={uuid:"Dependency tree"},X={uuid:"Block output"},H=[X,V];var J=t(28795),Y=t(81655),z=t(3917),q=t(72619),$=t(95924),K=t(69419),Q=t(70320);function W(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function ee(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?W(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):W(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ne=100;function te(e){var n=e.pipeline,t=e.pipelineRun,r=(0,Q.qB)(),u=(0,a.useRouter)(),o=(0,K.iV)(),l=null!==o&&void 0!==o&&o.page?o.page:0,y=(0,c.useState)(null),F=y[0],W=y[1],te=(0,c.useState)(H[0]),re=te[0],ie=te[1],ue=(0,c.useState)(null),oe=ue[0],le=ue[1],ce=(0,c.useState)(null),se=ce[0],ae=ce[1],de=(0,c.useMemo)((function(){return!!se&&se!==g.VO.RUNNING}),[se]),pe=n.uuid,fe=k.ZP.pipelines.detail(pe,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,ve=(0,c.useMemo)((function(){return ee(ee({},null===fe||void 0===fe?void 0:fe.pipeline),{},{uuid:pe})}),[fe,pe]),he=k.ZP.pipeline_runs.detail(t.id,{_format:"with_basic_details"},{refreshInterval:de?null:3e3,revalidateOnFocus:!0}),be=he.data,je=he.mutate,me=(0,c.useMemo)((function(){return(null===be||void 0===be?void 0:be.pipeline_run)||{}}),[be]),ge=me.execution_date,Oe=me.id,ye=me.status,xe={_limit:ne,_offset:l*ne,pipeline_run_id:Oe},Pe=null===o||void 0===o?void 0:o[Y.lG.SORT_COL_IDX],Ze=null===o||void 0===o?void 0:o[Y.lG.SORT_DIRECTION];if(Pe){var ke=d.fi[Pe],_e=Ze||Y.sh.ASC;xe.order_by="".concat(ke,"%20").concat(_e)}(0,c.useEffect)((function(){se!==ye&&ae(ye)}),[se,ye]);var we=k.ZP.block_runs.list(xe,{refreshInterval:de?null:5e3},{pauseFetch:"undefined"===typeof Oe||null===Oe}),Ee=we.data,Te=we.mutate,Se=(0,c.useMemo)((function(){return(null===Ee||void 0===Ee?void 0:Ee.block_runs)||[]}),[Ee]),De=Se.map((function(e){return e.block_uuid})),Re=(0,c.useMemo)((function(){return De}),[De]),Ie=k.ZP.blocks.pipeline_runs.list(null===t||void 0===t?void 0:t.id,{_limit:ne,block_uuid:Re},{refreshInterval:de?null:5e3}).data,Ne=(0,s.Db)(k.ZP.pipeline_runs.useUpdate(Oe),{onSuccess:function(e){return(0,q.wD)(e,{callback:function(e){e.pipeline_run;W(null),null===Te||void 0===Te||Te(),je()},onErrorCallback:function(e,n){return le({errors:n,response:e})}})}}),Ce=(0,i.Z)(Ne,2),Me=Ce[0],Ue=Ce[1].isLoading,Ae=k.ZP.outputs.block_runs.list(null===F||void 0===F?void 0:F.id),Be=Ae.data,Le=Ae.loading;(0,c.useEffect)((function(){F||(null===re||void 0===re?void 0:re.uuid)!==X.uuid||ie(V)}),[F,null===re||void 0===re?void 0:re.uuid]);var Fe=(0,c.useMemo)((function(){return(0,B.jsx)(d.ZP,{blockRuns:Se,onClickRow:function(e){W((function(n){var t=Se[e],r=(null===n||void 0===n?void 0:n.id)!==t.id?t:null;return r&&ie((function(e){return e!==X?X:e})),r}))},pipeline:ve,selectedRun:F,setErrors:le,sortableColumnIndexes:d.lG})}),[Se,ve,F]),Ge=(null===ve||void 0===ve?void 0:ve.type)!==O.qL.STREAMING&&se&&se!==g.VO.COMPLETED,Ve=((null===ve||void 0===ve?void 0:ve.type)===O.qL.PYTHON||(null===ve||void 0===ve?void 0:ve.type)===O.qL.INTEGRATION)&&F&&g.Az.includes(se),Xe=(0,c.useMemo)((function(){var e;return(null===Ee||void 0===Ee||null===(e=Ee.metadata)||void 0===e?void 0:e.count)||[]}),[Ee]),He=(0,c.useMemo)((function(){return(0,B.jsx)(x.Z,{p:2,children:(0,B.jsx)(j.ZP,{maxPages:j.Et,onUpdate:function(e){var n=Number(e),t=ee(ee({},o),{},{page:n>=0?n:0});W(null),u.push("/pipelines/[pipeline]/runs/[run]","/pipelines/".concat(pe,"/runs/").concat(Oe,"?").concat((0,K.uM)(t)))},page:Number(l),totalPages:Math.ceil(Xe/ne)})})}),[l,Oe,pe,o,u,Xe]),Je=(0,c.useCallback)((function(e){return function(e){var n=e.blockRuns,t=e.blocksOverride,r=(e.columns,e.dataType,e.height),u=e.heightOffset,o=e.loadingData,l=e.outputs,c=e.pipeline,s=e.renderColumnHeader,a=(e.rows,e.selectedRun),d=e.selectedTab,p=e.setSelectedTab,v=(e.textData,G({},(0,w.Z)(e,L)));v.blockStatus=(0,M.IJ)(n);var b=[],j=[],m=(0,U.bH)();if(!o){var g,O={};null===l||void 0===l||l.forEach((function(e){var n=e.type;O[n]||(O[n]={outputs:[],priority:Object.keys(O).length}),O[n].outputs.push(e)})),null===(g=(0,A.YC)(Object.entries(O),(function(e){var n=(0,i.Z)(e,2);return n[0],n[1].priority})))||void 0===g||g.forEach((function(e,n){var t=(0,i.Z)(e,2),o=t[0],l=t[1].outputs,c=[];null===l||void 0===l||l.forEach((function(e,t){var i,l=e.sample_data,a=e.text_data,d=e.type,p=(0,B.jsx)(x.Z,{ml:2,children:(0,B.jsx)(Z.ZP,{children:"This block run has no output."})},"output-empty-".concat(n,"-").concat(t));if(d===D.Gi.TABLE){var f=((null===l||void 0===l?void 0:l.columns)||[]).slice(0,40),v=(null===l||void 0===l?void 0:l.rows)||[];i=v&&(null===v||void 0===v?void 0:v.length)>=1?(0,B.jsx)(T.Z,{columnHeaderHeight:s?N.Eh:0,columns:f,height:r-u-90,noBorderBottom:!0,noBorderLeft:!0,noBorderRight:!0,renderColumnHeader:s,rows:v},"output-table-".concat(n,"-").concat(t)):p}else{var h=(0,U.Pb)(a)?JSON.stringify(JSON.parse(a),null,2):a;i="undefined"!==typeof a&&null!==a?(0,B.jsx)(x.Z,{ml:2,children:(0,B.jsx)(Z.ZP,{monospace:!0,children:(0,B.jsx)("pre",{children:h})})},"output-text-".concat(n,"-").concat(t)):p}var g=m[n];D.Gi.TEXT===o?(c.push(i),0===t&&j.push({uuid:"Block output ".concat(t+1).concat(g)})):(b.push(i),j.push({uuid:"Block output ".concat(t+1).concat(g)}))})),D.Gi.TEXT===o&&b.push(c)}))}var y=b,k=j,F=H;(null===k||void 0===k?void 0:k.length)>=2&&(F=[X].concat((0,_.Z)(k.slice(1)),[V]));var J=d&&p,Y=y[F.findIndex((function(e){return e.uuid===(null===d||void 0===d?void 0:d.uuid)}))];return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{style:{position:"fixed",top:R.Mz},children:J&&(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(x.Z,{py:0,children:(0,B.jsx)(E.Z,{onClickTab:p,regularSizeText:!0,selectedTabUUID:null===d||void 0===d?void 0:d.uuid,tabs:a?F:[V],underlineStyle:!0})})})}),(0,B.jsxs)("div",{style:{position:"relative",top:C.u$},children:[J&&(0,B.jsx)(f.Z,{light:!0}),(!a||V.uuid===(null===d||void 0===d?void 0:d.uuid))&&(0,B.jsx)(S.ZP,G(G({},v),{},{blocksOverride:t,enablePorts:!1,height:r,heightOffset:(u||0)+(J?C.u$+1:0),pipeline:c})),a&&d&&V.uuid!==(null===d||void 0===d?void 0:d.uuid)&&(0,B.jsxs)(B.Fragment,{children:[o&&(0,B.jsx)(x.Z,{mt:2,children:(0,B.jsx)(h.ZP,{alignItems:"center",fullWidth:!0,justifyContent:"center",children:(0,B.jsx)(P.Z,{color:"white",large:!0})})}),!o&&(0,B.jsx)(x.Z,{py:I.cd,children:Y})]})]})]})}(ee(ee({},e),{},{blockRuns:Se,blocksOverride:Xe<=ne&&(null===Ie||void 0===Ie?void 0:Ie.blocks),loadingData:Le,outputs:null===Be||void 0===Be?void 0:Be.outputs,selectedRun:F,selectedTab:re,setSelectedTab:ie,showDynamicBlocks:!0}))}),[Se,Ie,Be,Le,F,re,ie,Xe]);return(0,B.jsxs)(m.Z,{breadcrumbs:[{label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(pe,"/runs"),href:"/pipelines/[pipeline]/runs"}},{label:function(){return r?(0,z.XG)(ge,r):ge}}],buildSidekick:Je,errors:oe,pageName:J.M.RUNS,pipeline:ve,setErrors:le,subheader:(Ge||Ve)&&(0,B.jsxs)(h.ZP,{alignItems:"center",children:[g.BF.includes(se)&&(0,B.jsxs)(v.Z,{children:[(0,B.jsx)(Z.ZP,{bold:!0,default:!0,large:!0,children:"Pipeline is running"}),(0,B.jsx)(x.Z,{mr:1}),(0,B.jsx)(P.Z,{inverted:!0}),(0,B.jsx)(x.Z,{mr:2})]}),Ge&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(p.ZP,{danger:!0,loading:Ue,onClick:function(e){(0,$.j)(e),Me({pipeline_run:{pipeline_run_action:"retry_blocks"}})},outline:!0,children:"Retry incomplete blocks"}),(0,B.jsx)(x.Z,{mr:2})]}),Ve&&(0,B.jsxs)(p.ZP,{loading:Ue,onClick:function(e){(0,$.j)(e),Me({pipeline_run:{from_block_uuid:F.block_uuid,pipeline_run_action:"retry_blocks"}})},outline:!0,primary:!0,children:["Retry from selected block (",F.block_uuid,")"]})]}),title:function(e){var n=e.name;return"".concat(n," runs")},uuid:"pipelines/detail/".concat(J.M.RUNS),children:[(0,B.jsx)(x.Z,{mt:I.cd,px:I.cd,children:(0,B.jsx)(b.Z,{level:5,children:"Block runs"})}),(0,B.jsx)(f.Z,{light:!0,mt:I.cd,short:!0}),Fe,He]})}te.getInitialProps=function(){var e=(0,r.Z)(l().mark((function e(n){var t,r,i;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query,r=t.pipeline,i=t.run,e.abrupt("return",{pipeline:{uuid:r},pipelineRun:{id:i}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var re=(0,y.Z)(te)},39525:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/runs/[run]",function(){return t(14532)}])}},function(e){e.O(0,[125,9161,2631,1557,3782,8095,9265,9774,2888,179],(function(){return n=39525,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8170],{81334:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var i=t(82394),r=t(82684),o=t(27277),u=t(31882),l=t(38276),c=t(48381),s=t(30160),a=t(17488),d=t(25976),p=t(44897),f=t(42631),v=t(47041),g=t(70515),h=d.default.div.withConfig({displayName:"indexstyle__DropdownStyle",componentId:"sc-suwkha-0"})([""," border-radius:","px;max-height:","px;overflow:auto;position:absolute;width:100%;z-index:1;"," ",""],v.w5,f.BG,40*g.iI,(function(e){return"\n background-color: ".concat((e.theme.background||p.Z.background).popup,";\n box-shadow: ").concat((e.theme.shadow||p.Z.shadow).popup,";\n ")}),(function(e){return e.topOffset&&"\n top: ".concat(e.topOffset-.5*g.iI,"px;\n ")})),m=d.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-suwkha-1"})(["padding:","px;position:relative;z-index:2;&:hover{cursor:pointer;}",""],.5*g.iI,(function(e){return e.highlighted&&"\n background-color: ".concat((e.theme.interactive||p.Z.interactive).hoverBackground,";\n ")})),y=t(39643),b=t(95924),_=t(86735),j=t(44688),x=t(28598);function O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?O(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):O(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var w=function(e){var n,t=e.removeTag,i=e.selectTag,d=e.selectedTags,p=void 0===d?[]:d,f=e.tags,v=void 0===f?[]:f,g=e.uuid,O=(0,r.useRef)(null),w=(0,r.useState)(!1),P=w[0],k=w[1],C=(0,r.useState)(null),S=C[0],E=C[1],N=(0,r.useMemo)((function(){return(0,_.YC)(v||[],"uuid")}),[v]),T=(0,r.useMemo)((function(){return null===N||void 0===N?void 0:N.map((function(e){return{itemObject:e,searchQueries:[e.uuid],value:e.uuid}}))}),[N]),D=(0,r.useMemo)((function(){return(null===S||void 0===S?void 0:S.length)>=1?T.concat({itemObject:{uuid:S},searchQueries:[S],value:"Add tag: ".concat(S)}):T}),[T,S]),R=(0,j.y)(),M=R.registerOnKeyDown,I=R.unregisterOnKeyDown;return(0,r.useEffect)((function(){return function(){return I(g)}}),[I,g]),null===M||void 0===M||M(g,(function(e,n){var t;P&&n[y.vP]&&(k(!1),null===O||void 0===O||null===(t=O.current)||void 0===t||t.blur())}),[P,O]),(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(c.Z,{onClickTag:t,tags:p}),(0,x.jsxs)(l.Z,{mt:1,style:{position:"relative"},children:[(0,x.jsx)(a.Z,{onBlur:function(){return setTimeout((function(){return k(!1)}),150)},onChange:function(e){return E(e.target.value)},onFocus:function(){return k(!0)},ref:O,value:S||""}),(0,x.jsx)(h,{topOffset:null===O||void 0===O||null===(n=O.current)||void 0===n?void 0:n.getBoundingClientRect().height,children:(0,x.jsx)(o.Z,{eventProperties:{eventParameters:{item_type:"tag"}},itemGroups:[{items:P?D:[],renderItem:function(e,n){var t=e.value;return(0,x.jsx)(m,Z(Z({},n),{},{onClick:function(e){var t;(0,b.j)(e),null===n||void 0===n||null===(t=n.onClick)||void 0===t||t.call(n,e)},children:(0,x.jsx)(u.Z,{small:!0,children:(0,x.jsx)(s.ZP,{children:t})})}))}}],onSelectItem:function(e){var n=e.itemObject;null===i||void 0===i||i(n),E(null)},searchQuery:S,uuid:g})})]})]})}},68781:function(e,n,t){"use strict";var i;t.d(n,{R:function(){return r}}),function(e){e.AZURE_CONTAINER_INSTANCE="azure_container_instance",e.ECS="ecs",e.GCP_CLOUD_RUN="gcp_cloud_run",e.K8S="k8s",e.LOCAL_PYTHON="local_python",e.PYSPARK="pyspark"}(i||(i={}));var r=[i.AZURE_CONTAINER_INSTANCE,i.ECS,i.GCP_CLOUD_RUN,i.K8S,i.LOCAL_PYTHON,i.PYSPARK]},37003:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return K}});var i=t(77837),r=t(75582),o=t(82394),u=t(38860),l=t.n(u),c=t(82684),s=t(34376),a=t(75457),d=t(93808),p=t(71180),f=t(70652),v=t(55485),g=t(85854),h=t(48670),m=t(44085),y=t(88543),b=t(38276),_=t(81334),j=t(30160),x=t(17488),O=t(35686),Z=t(98464),w=t(77417),P=t(68781),k=t(78419),C=t(70515),S=t(53808),E=t(42122),N=t(81728),T=t(86735),D=t(28598);function R(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?R(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):R(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=function(e){var n,t,i,r,u,l,s,a=e.isPipelineUpdating,d=e.pipeline,R=e.updatePipeline,I=(0,w.Z)().project,A=(0,c.useRef)(null),U=(0,c.useRef)(null),H=null===d||void 0===d?void 0:d.uuid,F=(0,c.useMemo)((function(){return(null===d||void 0===d?void 0:d.blocks)||[]}),[d]),L=(0,c.useState)(!1),G=L[0],K=L[1],Y=(0,c.useState)(!1),z=Y[0],B=Y[1],W=(0,c.useState)(null),Q=W[0],X=W[1],q=(0,Z.Z)(d);(0,c.useEffect)((function(){(0,E.Xy)(d,q)||X(d)}),[d,q]);var J=(0,c.useCallback)((function(e){K(!0),X(e)}),[]),$="".concat(k.g6,"_").concat(H),V=(0,c.useState)({}),ee=V[0],ne=V[1],te="".concat(k.vF,"_").concat(H),ie=(0,c.useState)(!1),re=ie[0],oe=ie[1],ue=(0,c.useCallback)((function(e){ne((function(n){var t=e(n);return(0,S.t8)($,JSON.stringify(t)),t}))}),[$,ne]),le=(0,c.useCallback)((function(e){oe((function(n){var t=e(n);return(0,S.t8)(te,t),t}))}),[te,oe]);(0,c.useEffect)((function(){var e=(0,S.U2)($);e&&(0,N.Pb)(e)&&ne(JSON.parse(e))}),[$,ne]),(0,c.useEffect)((function(){var e=(0,S.U2)(te);e&&oe(e)}),[te,oe]);var ce=(0,c.useMemo)((function(){return null===Q||void 0===Q?void 0:Q.executor_type}),[Q]);(0,c.useEffect)((function(){z||!ce||P.R.find((function(e){return e===ce}))||B(!0)}),[z,ce]);var se=(0,c.useMemo)((function(){return(null===F||void 0===F?void 0:F.filter((function(e){var n=e.uuid;return!(null===ee||void 0===ee||!ee[n])}))).length===F.length}),[F,ee]),ae=(0,c.useMemo)((function(){return!(null!==F&&void 0!==F&&F.length)}),[F]),de=(0,c.useMemo)((function(){return(null===Q||void 0===Q?void 0:Q.tags)||[]}),[Q]),pe=O.ZP.tags.list().data,fe=(0,c.useMemo)((function(){return((null===pe||void 0===pe?void 0:pe.tags)||[]).filter((function(e){var n=e.uuid;return!de.includes(n)}))}),[pe,de]),ve=(0,c.useMemo)((function(){var e;return null===I||void 0===I||null===(e=I.pipelines)||void 0===e?void 0:e.settings}),[I]),ge=(0,c.useMemo)((function(){var e,n,t;return(null===ve||void 0===ve||null===(e=ve.triggers)||void 0===e?void 0:e.save_in_code_automatically)&&"undefined"===typeof(null===Q||void 0===Q||null===(n=Q.settings)||void 0===n||null===(t=n.triggers)||void 0===t?void 0:t.save_in_code_automatically)}),[Q,ve]);return(0,D.jsxs)(b.Z,{p:C.cd,children:[(0,D.jsxs)(y.Z,{title:"Details",children:[(0,D.jsx)(y.S,{invalid:G&&!(null!==Q&&void 0!==Q&&Q.name),textInput:{onChange:function(e){return J((function(n){return M(M({},n),{},{name:e.target.value})}))},value:null===Q||void 0===Q?void 0:Q.name},title:"Pipeline name"}),(0,D.jsx)(y.S,{textInput:{onChange:function(e){return J((function(n){return M(M({},n),{},{description:e.target.value})}))},placeholder:"Enter description...",value:(null===Q||void 0===Q?void 0:Q.description)||""},title:"Pipeline description"}),(0,D.jsx)(y.S,{description:"When enabled, this setting allows sharing of objects and memory space across blocks within a single pipeline.",title:"Run pipeline in a single process",toggleSwitch:{checked:!(null===Q||void 0===Q||!Q.run_pipeline_in_one_process),onCheck:function(e){return J((function(n){return M(M({},n),{},{run_pipeline_in_one_process:e(null===n||void 0===n?void 0:n.run_pipeline_in_one_process)})}))}}}),(0,D.jsx)(y.S,{description:(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(j.ZP,{muted:!0,small:!0,children:"Every time a trigger is created or updated in this pipeline, it\u2019ll be automatically be persisted it in code."}),(null===ve||void 0===ve||null===(n=ve.triggers)||void 0===n?void 0:n.save_in_code_automatically)&&(0,D.jsx)(j.ZP,{small:!0,warning:!0,children:"This settings is enabled at the project level. Changing the value here will only affect this pipeline."})]}),title:"Save triggers in code automatically",toggleSwitch:{checked:ge||!(null===Q||void 0===Q||null===(t=Q.settings)||void 0===t||null===(i=t.triggers)||void 0===i||!i.save_in_code_automatically),onCheck:function(e){return J((function(n){var t,i,r;return M(M({},n),{},{settings:M(M({},null===n||void 0===n?void 0:n.settings),{},{triggers:M(M({},null===n||void 0===n||null===(t=n.settings)||void 0===t?void 0:t.triggers),{},{save_in_code_automatically:e(ge||(null===n||void 0===n||null===(i=n.settings)||void 0===i||null===(r=i.triggers)||void 0===r?void 0:r.save_in_code_automatically))})})})}))}}})]}),(0,D.jsxs)(b.Z,{mt:C.HN,children:[(0,D.jsx)(g.Z,{children:"Executor type"}),(0,D.jsxs)(j.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,D.jsx)(h.Z,{href:"https://docs.mage.ai/production/configuring-production-settings/compute-resource#2-set-executor-type-and-customize-the-compute-resource-of-the-mage-executor",openNewWindow:!0,children:"documentation"}),"."]}),(0,D.jsxs)(b.Z,{mt:1,children:[!z&&(0,D.jsx)(m.Z,{label:"Executor type",onChange:function(e){return J((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},primary:!0,ref:A,value:(null===Q||void 0===Q?void 0:Q.executor_type)||"",children:P.R.map((function(e){return(0,D.jsx)("option",{value:e,children:e},e)}))}),z&&(0,D.jsx)(x.Z,{label:"Executor type",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{executor_type:e.target.value})}))},ref:U,setContentOnMount:!0,value:(null===Q||void 0===Q?void 0:Q.executor_type)||""}),(0,D.jsx)(b.Z,{mt:1,children:(0,D.jsx)(h.Z,{muted:!0,onClick:function(){z?(J((function(e){return M(M({},e),{},{executor_type:null===d||void 0===d?void 0:d.executor_type})})),setTimeout((function(){var e;return null===A||void 0===A||null===(e=A.current)||void 0===e?void 0:e.focus()}),1)):setTimeout((function(){var e;return null===U||void 0===U||null===(e=U.current)||void 0===e?void 0:e.focus()}),1),B(!z)},preventDefault:!0,small:!0,children:z?"Select a preset executor type":"Enter a custom executor type"})})]})]}),(0,D.jsxs)(b.Z,{mt:C.HN,children:[(0,D.jsx)(g.Z,{children:"Retry configuration"}),(0,D.jsxs)(j.ZP,{muted:!0,children:["For more information on this setting, please read the ",(0,D.jsx)(h.Z,{href:"https://docs.mage.ai/orchestration/pipeline-runs/retrying-block-runs",openNewWindow:!0,children:"documentation"}),"."]}),(0,D.jsx)(b.Z,{mt:1,children:(0,D.jsxs)(v.ZP,{children:[(0,D.jsx)(x.Z,{label:"Retries",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{retry_config:M(M({},null===n||void 0===n?void 0:n.retry_config),{},{retries:"undefined"!==typeof e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(r=Q.retry_config)||void 0===r?void 0:r.retries)||""}),(0,D.jsx)(b.Z,{mr:1}),(0,D.jsx)(x.Z,{label:"Delay",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{retry_config:M(M({},null===n||void 0===n?void 0:n.retry_config),{},{delay:"undefined"!==typeof e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(u=Q.retry_config)||void 0===u?void 0:u.delay)||""}),(0,D.jsx)(b.Z,{mr:1}),(0,D.jsx)(x.Z,{label:"Max delay",monospace:!0,onChange:function(e){return J((function(n){return M(M({},n),{},{retry_config:M(M({},null===n||void 0===n?void 0:n.retry_config),{},{max_delay:"undefined"!==typeof e.target.value&&null!==e.target.value?Number(e.target.value):e.target.value})})}))},setContentOnMount:!0,type:"number",value:(null===Q||void 0===Q||null===(l=Q.retry_config)||void 0===l?void 0:l.max_delay)||""}),(0,D.jsx)(b.Z,{mr:1}),(0,D.jsx)(f.Z,{checked:!(null===Q||void 0===Q||null===(s=Q.retry_config)||void 0===s||!s.exponential_backoff),label:"Exponential backoff",onClick:function(){return J((function(e){var n;return M(M({},e),{},{retry_config:M(M({},null===e||void 0===e?void 0:e.retry_config),{},{exponential_backoff:!(null!==e&&void 0!==e&&null!==(n=e.retry_config)&&void 0!==n&&n.exponential_backoff)})})}))}})]})})]}),(0,D.jsxs)(b.Z,{mt:C.HN,children:[(0,D.jsx)(g.Z,{children:"Tags"}),(0,D.jsx)(b.Z,{mt:1,children:(0,D.jsx)(_.Z,{removeTag:function(e){J((function(n){return M(M({},n),{},{tags:de.filter((function(n){return n!==e.uuid}))})}))},selectTag:function(e){J((function(n){return M(M({},n),{},{tags:(0,T.$C)(e.uuid,de,(function(n){return n===e.uuid}))})}))},selectedTags:null===de||void 0===de?void 0:de.map((function(e){return{uuid:e}})),tags:fe,uuid:"TagsAutocompleteInputField-".concat(null===d||void 0===d?void 0:d.uuid)})})]}),(0,D.jsx)(b.Z,{mt:C.HN,children:(0,D.jsx)(v.ZP,{children:(0,D.jsx)(p.ZP,{disabled:!G,loading:a,onClick:function(){return R({description:null===Q||void 0===Q?void 0:Q.description,executor_type:null===Q||void 0===Q?void 0:Q.executor_type,name:null===Q||void 0===Q?void 0:Q.name,retry_config:null===Q||void 0===Q?void 0:Q.retry_config,run_pipeline_in_one_process:null===Q||void 0===Q?void 0:Q.run_pipeline_in_one_process,settings:null===Q||void 0===Q?void 0:Q.settings,tags:null===Q||void 0===Q?void 0:Q.tags}).then((function(){return K(!1)}))},primary:!0,children:"Save pipeline settings"})})}),(0,D.jsx)(b.Z,{mt:C.HN,children:(0,D.jsx)(f.Z,{checked:se&&!ae,disabled:ae,label:"Hide all blocks in notebook",onClick:function(){return ue((function(){return se?{}:null===F||void 0===F?void 0:F.reduce((function(e,n){var t=n.uuid;return M(M({},e),{},(0,o.Z)({},t,!0))}),{})}))}})}),(0,D.jsx)(b.Z,{mt:C.Mq,children:(0,D.jsx)(f.Z,{checked:re,label:"When running a block while editing a pipeline, output the block messages to the logs",onClick:function(){return le((function(e){return!e}))}})})]})},A=t(28795),U=t(69864),H=t(72619);function F(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function L(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?F(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):F(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function G(e){var n=e.pipeline,t=(0,s.useRouter)(),i=(0,c.useState)(null),o=i[0],u=i[1],l=null===n||void 0===n?void 0:n.uuid,d=O.ZP.pipelines.detail(l).data,p=L(L({},null===d||void 0===d?void 0:d.pipeline),n),f=(0,U.Db)(O.ZP.pipelines.useUpdate(l,{update_content:!0}),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){if(null!==e&&void 0!==e&&e.pipeline){var n=e.pipeline.uuid;l!==n&&(window.location.href="".concat(t.basePath,"/pipelines/").concat(n,"/settings"))}},onErrorCallback:function(e,n){return u({errors:n,response:e})}})}}),v=(0,r.Z)(f,2),g=v[0],h=v[1].isLoading;return(0,D.jsx)(a.Z,{breadcrumbs:[{label:function(){return"Settings"}}],errors:o,pageName:A.M.SETTINGS,pipeline:p,setErrors:u,title:function(e){var n=e.name;return"".concat(n," settings")},uuid:"".concat(A.M.SETTINGS,"_").concat(l),children:p&&(0,D.jsx)(I,{isPipelineUpdating:h,pipeline:p,updatePipeline:function(e){return g({pipeline:e})}})})}G.getInitialProps=function(){var e=(0,i.Z)(l().mark((function e(n){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.query.pipeline,e.abrupt("return",{pipeline:{uuid:t}});case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var K=(0,d.Z)(G)},59606:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/settings",function(){return t(37003)}])},80022:function(e,n,t){"use strict";function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return i}})},15544:function(e,n,t){"use strict";function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}t.d(n,{Z:function(){return i}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return r}});var i=t(61049);function r(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,i.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var i=t(12539),r=t(80022);function o(e,n){if(n&&("object"===i(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,r.Z)(e)}}},function(e){e.O(0,[1557,3782,9774,2888,179],(function(){return n=59606,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[643],{74395:function(e,n,i){"use strict";i.d(n,{M:function(){return s},W:function(){return l}});var t=i(25976),r=i(46684),l=34*i(70515).iI,s=t.default.div.withConfig({displayName:"indexstyle__BeforeStyle",componentId:"sc-12ee2ib-0"})(["min-height:calc(100vh - ","px);"],r.Mz)},8955:function(e,n,i){"use strict";i.d(n,{G7:function(){return b},ZP:function(){return P},u$:function(){return m}});var t=i(75582),r=i(82394),l=i(26304),s=i(90299),o=i(9134),c=i(24138),u=i(38276),a=i(30160),d=i(75499),p=i(70515),g=i(16488),h=i(42122),f=i(28598),v=["height","heightOffset","pipeline","selectedRun","selectedTab","setSelectedTab"];function x(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function j(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?x(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):x(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var m=44,Z={uuid:"Run details"},_={uuid:"Dependency tree"},b=[_,Z];function P(e){var n=e.height,i=e.heightOffset,r=e.pipeline,x=e.selectedRun,P=e.selectedTab,y=e.setSelectedTab,O=j({},(0,l.Z)(e,v));x?O.blockStatus=(0,g.IJ)(null===x||void 0===x?void 0:x.block_runs):O.noStatus=!0;var k=(0,h.Kn)(null===x||void 0===x?void 0:x.variables)?j({},null===x||void 0===x?void 0:x.variables):(null===x||void 0===x?void 0:x.variables)||{},w=null===x||void 0===x?void 0:x.event_variables;if(w&&(0,h.Kn)(w)&&!(0,h.Qr)(w))if((0,h.Kn)(k)&&k.hasOwnProperty("event")){var I=(0,h.Kn)(k.event)?k.event:{};k.event=j(j({},I),w)}else k.event=j({},w);var S=[];k&&JSON.stringify(k,null,2).split("\n").forEach((function(e){S.push(" ".concat(e))}));var C=x&&[["Run ID",null===x||void 0===x?void 0:x.id],["Variables",(0,f.jsx)(o.Z,{language:"json",small:!0,source:S.join("\n")},"variable_value")]],E=x&&(0,f.jsx)(u.Z,{pb:p.cd,px:p.cd,children:(0,f.jsx)(d.Z,{alignTop:!0,columnFlex:[null,1],columnMaxWidth:function(e){return 1===e?"100px":null},rows:C.map((function(e,n){var i=(0,t.Z)(e,2),r=i[0],l=i[1];return[(0,f.jsx)(a.ZP,{monospace:!0,muted:!0,children:r},"key_".concat(n)),(0,f.jsx)(a.ZP,{monospace:!0,textOverflow:!0,children:l},"val_".concat(n))]})),uuid:"LogDetail"})}),D=P&&y;return(0,f.jsxs)(f.Fragment,{children:[D&&(0,f.jsx)(s.Z,{onClickTab:y,selectedTabUUID:null===P||void 0===P?void 0:P.uuid,tabs:b,underlineStyle:!0}),(!D||_.uuid===(null===P||void 0===P?void 0:P.uuid))&&(0,f.jsx)(c.ZP,j(j({},O),{},{height:n,heightOffset:(i||0)+(D?m:0),pipeline:r})),Z.uuid===(null===P||void 0===P?void 0:P.uuid)&&E]})}},55072:function(e,n,i){"use strict";i.d(n,{Et:function(){return p},Q:function(){return d}});i(82684);var t=i(71180),r=i(55485),l=i(38276),s=i(31748),o=i(72473),c=i(79633),u=i(70515),a=i(28598),d=30,p=9;n.ZP=function(e){var n=e.page,i=e.maxPages,d=e.onUpdate,p=e.totalPages,g=[],h=i;if(h>p)g=Array.from({length:p},(function(e,n){return n}));else{var f=Math.floor(h/2),v=n-f;n+f>=p?(v=p-h+2,h-=2):n-f<=0?(v=0,h-=2):(h-=4,v=n-Math.floor(h/2)),g=Array.from({length:h},(function(e,n){return n+v}))}return(0,a.jsx)(a.Fragment,{children:p>0&&(0,a.jsxs)(r.ZP,{alignItems:"center",children:[(0,a.jsx)(t.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,a.jsx)(o.PaginateArrowLeft,{size:1.5*u.iI,stroke:s.Av})}),!g.includes(0)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!g.includes(1)&&(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),g.map((function(e){return(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{backgroundColor:e===n&&c.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!g.includes(p-1)&&(0,a.jsxs)(a.Fragment,{children:[!g.includes(p-2)&&(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,a.jsx)(l.Z,{ml:1,children:(0,a.jsx)(t.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(p-1)},children:p})},p-1)]}),(0,a.jsx)(l.Z,{ml:1}),(0,a.jsx)(t.ZP,{disabled:n===p-1,onClick:function(){return d(n+1)},children:(0,a.jsx)(o.PaginateArrowRight,{size:1.5*u.iI,stroke:s.Av})})]})})}},36604:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return ge}});var t=i(75582),r=i(77837),l=i(82394),s=i(38860),o=i.n(s),c=i(82684),u=i(12691),a=i.n(u),d=i(25976),p=i(69864),g=i(34376),h=i(71180),f=i(39457),v=i(15338),x=i(55485),j=i(85854),m=i(48670),Z=i(55072),_=i(75457),b=i(27966),P=i(44265),y=i(30229),O=i(57653),k=i(83784),w=i(44085),I=i(38276),S=i(4190),C=i(75499),E=i(48381),D=i(30160),M=i(12468),T=i(35686),N=i(8955),A=i(77417),F=i(74395),R=i(44425),L=i(72473),U=i(72191),z=i(70515),H=i(28795),q=i(97196),X=i(8916),B=i(16488),G=i(3917),W=i(55283),K=i(44375),V=i(15610),$=i(86735),J=i(42122),Q=i(50178),Y=i(72619),ee=i(95924),ne=i(69419),ie=i(70320),te=i(28598);function re(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function le(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?re(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):re(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var se=function(e){var n=e.errors,i=e.fetchPipelineSchedule,r=e.pipeline,l=e.pipelineSchedule,s=e.setErrors,o=e.variables,u=(0,c.useContext)(d.ThemeContext),re=(0,A.Z)().project,se=(0,g.useRouter)(),oe=(0,Q.Ct)(),ce=(0,ie.qB)(),ue=(0,c.useMemo)((function(){return(0,$.HK)((null===r||void 0===r?void 0:r.blocks)||[],(function(e){return e.uuid}))}),[r]),ae=r||{},de=ae.uuid,pe=ae.type,ge=l||{},he=ge.description,fe=ge.id,ve=ge.event_matchers,xe=ge.last_enabled_at,je=ge.name,me=ge.next_pipeline_run_date,Ze=ge.schedule_interval,_e=ge.schedule_type,be=ge.settings,Pe=ge.sla,ye=ge.start_time,Oe=ge.status,ke=ge.tags,we=ge.variables,Ie=void 0===we?{}:we,Se=(0,c.useMemo)((function(){return(0,B._U)(Ze)}),[Ze]),Ce=(0,ne.iV)(),Ee={_limit:30,_offset:30*(null!==Ce&&void 0!==Ce&&Ce.page?Ce.page:0)};null!==Ce&&void 0!==Ce&&Ce.status&&(Ee.status=Ce.status),null!==l&&void 0!==l&&l.global_data_product_uuid&&(Ee.global_data_product_uuid=null===l||void 0===l?void 0:l.global_data_product_uuid);var De=T.ZP.pipeline_runs.pipeline_schedules.list(fe,Ee,{refreshInterval:3e3,revalidateOnFocus:!0}),Me=De.data,Te=De.mutate,Ne=(0,c.useMemo)((function(){return(null===Me||void 0===Me?void 0:Me.pipeline_runs)||[]}),[Me]),Ae=(0,c.useMemo)((function(){var e;return(null===Me||void 0===Me||null===(e=Me.metadata)||void 0===e?void 0:e.count)||[]}),[Me]),Fe=(0,c.useState)(null),Re=Fe[0],Le=Fe[1],Ue=(0,c.useMemo)((function(){var e=null!==Ce&&void 0!==Ce&&Ce.page?Ce.page:0;return(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(b.Z,{fetchPipelineRuns:Te,onClickRow:function(e){return Le((function(n){var i=Ne[e];return(null===n||void 0===n?void 0:n.id)!==i.id?i:null}))},pipelineRuns:Ne,selectedRun:Re,setErrors:s,setSelectedRun:Le}),(0,te.jsx)(I.Z,{p:2,children:(0,te.jsx)(Z.ZP,{maxPages:9,onUpdate:function(e){var n=Number(e),i=le(le({},Ce),{},{page:n>=0?n:0});se.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(de,"/triggers/").concat(fe,"?").concat((0,ne.uM)(i)))},page:Number(e),totalPages:Math.ceil(Ae/30)})})]})}),[Te,Ne,fe,de,Ce,se,Re,s,Ae]),ze=(0,c.useState)(N.G7[0]),He=ze[0],qe=ze[1],Xe=(0,p.Db)((function(e){return T.ZP.pipeline_schedules.useUpdate(e.id)({pipeline_schedule:(0,J.gR)(e,["id"])})}),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){i()},onErrorCallback:function(e,n){return null===s||void 0===s?void 0:s({errors:n,response:e})}})}}),Be=(0,t.Z)(Xe,2),Ge=Be[0],We=Be[1].isLoading,Ke=T.ZP.pipeline_triggers.pipelines.list(de),Ve=Ke.data,$e=Ke.mutate,Je=(0,c.useMemo)((function(){return(0,$.HK)((null===Ve||void 0===Ve?void 0:Ve.pipeline_triggers)||[],(function(e){return e.name}))}),[Ve]),Qe=(0,c.useMemo)((function(){return!(null===Je||void 0===Je||!Je[null===l||void 0===l?void 0:l.name])}),[l,Je]),Ye=(0,p.Db)(T.ZP.pipeline_triggers.pipelines.useCreate(de),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){$e()},onErrorCallback:function(e,n){return null===s||void 0===s?void 0:s({errors:n,response:e})}})}}),en=(0,t.Z)(Ye,2),nn=en[0],tn=en[1].isLoading,rn=(0,p.Db)(T.ZP.pipeline_runs.pipeline_schedules.useCreate(fe),{onSuccess:function(e){return(0,Y.wD)(e,{callback:function(){Te()},onErrorCallback:function(e,n){return null===s||void 0===s?void 0:s({errors:n,response:e})}})}}),ln=(0,t.Z)(rn,2),sn=ln[0],on=ln[1].isLoading,cn=(0,c.useMemo)((function(){return y.fq.ACTIVE===Oe}),[Oe]),un=(0,c.useMemo)((function(){return!cn&&!(_e===y.Xm.TIME&&Ze===y.U5.ONCE)}),[cn,Ze,_e]),an=(0,c.useMemo)((function(){var e,n,i,t={default:!0,size:1.5*z.iI},r=[[(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.MultiShare,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Trigger type"})]},"trigger_type_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:null===(e=y.Z4[_e])||void 0===e?void 0:e.call(y.Z4)},"trigger_type")],[(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.Switch,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Status"})]},"trigger_status_label"),(0,te.jsx)(D.ZP,{danger:!cn,monospace:!0,success:cn,children:Oe},"trigger_status")]];if(he&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.Alphabet,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Description"})]},"trigger_description_label"),(0,te.jsx)(D.ZP,{children:he},"trigger_description")]),Pe){var s=(0,B.gU)(Pe),o=s.time,c=s.unit,u=1===o?c:"".concat(c,"s");r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.Info,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"SLA"})]},"trigger_sla_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:"".concat(o," ").concat(u)},"trigger_sla")])}if(Ze&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.Schedule,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Frequency"})]},"trigger_frequency_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:ce&&Se?(0,B.lO)(Ze):Ze.replace("@","")},"trigger_frequency")],[(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.CalendarDate,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Next run date"})]},"trigger_next_run_date_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:me?ce?(0,G.XG)(me,ce):(0,G.d$)(me,{includeSeconds:!0,utcFormat:!0}):"N/A"},"trigger_next_run_date")]),ye&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.CalendarDate,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Start date"})]},"trigger_start_date_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:ce?(0,G.XG)(ye,ce):ye},"trigger_start_date")]),xe&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.CalendarDate,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Last enabled at"})]},"trigger_last_enabled_at_label"),(0,te.jsx)(D.ZP,{monospace:!0,children:ce?(0,G.XG)(xe,ce):(0,G.d$)(xe,{includeSeconds:!0})},"trigger_last_enabled_at")]),y.Xm.API===_e){var a=(0,B.M8)(l);r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(L.PlugAPI,le({},t)),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"API endpoint"})]},"trigger_api_endpoint_label"),(0,te.jsx)(f.Z,{copiedText:a,children:(0,te.jsx)(D.ZP,{monospace:!0,small:!0,children:a})},"trigger_api_endpoint")])}if(null!==be&&void 0!==be&&be.timeout){var d=(0,B.gU)(null===be||void 0===be?void 0:be.timeout),p=d.time,g=d.unit,h=1===p?g:"".concat(g,"s");r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(M.Z,{default:!0,label:"Timeout set for runs of this trigger",size:U.gt,widthFitContent:!0}),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Timeout"})]},"trigger_timeout"),(0,te.jsx)(D.ZP,{monospace:!0,children:"".concat(p," ").concat(h)},"trigger_timeout_label")])}null!==be&&void 0!==be&&be.skip_if_previous_running&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(M.Z,{default:!0,label:"Skip current run if any previous runs are still in progress",size:U.gt,widthFitContent:!0}),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Skip if running"})]},"trigger_skip_if_running"),(0,te.jsx)(D.ZP,{monospace:!0,children:null===(n=be.skip_if_previous_running)||void 0===n?void 0:n.toString()},"trigger_skip_if_running_label")]);(null!==be&&void 0!==be&&be.allow_blocks_to_fail&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(M.Z,{default:!0,label:"Trigger runs will continue running blocks if other unrelated blocks fail",size:U.gt,widthFitContent:!0}),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Allow blocks to fail"})]},"trigger_allow_blocks_to_fail"),(0,te.jsx)(D.ZP,{monospace:!0,children:be.allow_blocks_to_fail.toString()},"trigger_allow_blocks_to_fail_label")]),null!==be&&void 0!==be&&be.create_initial_pipeline_run)&&r.push([(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(M.Z,{default:!0,label:"Create initial pipeline run if start date is before current execution period",maxWidth:32*z.iI,size:U.gt}),(0,te.jsx)(I.Z,{mr:1}),(0,te.jsx)(D.ZP,{default:!0,children:"Create initial run"})]},"trigger_create_initial_pipeline_run"),(0,te.jsx)(D.ZP,{monospace:!0,children:null===(i=be.create_initial_pipeline_run)||void 0===i?void 0:i.toString()},"trigger_create_initial_pipeline_run_label")]);return(0,te.jsx)(C.Z,{columnFlex:[null,1],rows:r})}),[he,ce,cn,Se,me,l,Ze,_e,be,Pe,ye,Oe]),dn=(0,c.useMemo)((function(){return Ie||{}}),[Ie]),pn=(0,c.useMemo)((function(){var e,n=[];return(0,J.Qr)(dn)?n=(0,X.wx)(o,(function(e){return e.uuid===k.C})):Object.entries(dn).forEach((function(e){var i=(0,t.Z)(e,2),r=i[0],l=i[1];[P.sZ,y.PN].includes(r)||n.push({uuid:r,value:(0,X.FS)(l)})})),"undefined"!==typeof(n=(0,X.JZ)(n||[],_e))&&null!==(e=n)&&void 0!==e&&e.length?(0,te.jsx)(C.Z,{columnFlex:[null,1],rows:n.map((function(e){var n=e.uuid,i=e.value;return[(0,te.jsx)(D.ZP,{default:!0,monospace:!0,children:n},"settings_variable_label_".concat(n)),(0,te.jsx)(D.ZP,{monospace:!0,children:i},"settings_variable_".concat(n))]}))}):null}),[_e,dn,o]),gn=(0,c.useMemo)((function(){var e=null===dn||void 0===dn?void 0:dn[y.PN];return e?(0,te.jsx)(te.Fragment,{children:Object.entries(e||{}).map((function(e){var n,i=(0,t.Z)(e,2),r=i[0],l=i[1],s=null===ue||void 0===ue?void 0:ue[r];return(0,te.jsxs)(I.Z,{mt:1,children:[(0,te.jsx)(I.Z,{pb:1,px:z.cd,children:(0,te.jsx)(D.ZP,{color:(0,W.qn)(null===s||void 0===s?void 0:s.type,{blockColor:null===s||void 0===s?void 0:s.color,theme:u}).accent,monospace:!0,children:r})}),(0,te.jsx)(v.Z,{light:!0}),null===(n=Object.entries(l||{}))||void 0===n?void 0:n.map((function(e,n){var i=(0,t.Z)(e,2),r=i[0],l=i[1];return(0,te.jsx)("div",{children:(0,te.jsx)(C.Z,{columnFlex:[null,1],rows:[[(0,te.jsx)(D.ZP,{default:!0,monospace:!0,children:"Stream"},"stream_title_".concat(n)),(0,te.jsx)(D.ZP,{monospace:!0,rightAligned:!0,children:r},"stream_id_".concat(n))]].concat(Object.entries(l||{}).map((function(e){var n=(0,t.Z)(e,2),i=n[0],r=n[1];return[(0,te.jsx)(D.ZP,{default:!0,monospace:!0,children:i},"settings_variable_label_".concat(i)),(0,te.jsx)(D.ZP,{monospace:!0,rightAligned:!0,children:r},"settings_variable_".concat(i))]})))})},r)}))]},r)}))}):null}),[ue,dn,u]),hn=(0,c.useMemo)((function(){var e,n,i=[],t=null===dn||void 0===dn||null===(e=dn[P.sZ])||void 0===e?void 0:e.blocks;return null===r||void 0===r||null===(n=r.blocks)||void 0===n||n.forEach((function(e){var n=e.type,r=e.uuid;if(R.tf.DBT===n){var l,s=(null===t||void 0===t||null===(l=t[r])||void 0===l?void 0:l.configuration)||{},o=s.flags,c=s.prefix,u=s.suffix,a=(0,K.IU)(e).name;(o||c||u)&&i.push({flags:o,prefix:c,suffix:u,uuid:a})}})),"undefined"!==typeof i&&null!==i&&void 0!==i&&i.length?(0,te.jsx)(C.Z,{columnFlex:[1,null],rows:i.map((function(e){var n=e.flags,i=e.prefix,t=e.suffix,r=e.uuid;return[(0,te.jsxs)(D.ZP,{monospace:!0,small:!0,children:[i&&(0,te.jsx)(D.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:i}),r,t&&(0,te.jsx)(D.ZP,{inline:!0,monospace:!0,muted:!0,small:!0,children:t})]},"settings_variable_label_".concat(r)),(0,te.jsx)(D.ZP,{monospace:!0,muted:!0,small:!0,children:n&&n.join(", ")},"settings_variable_".concat(r))]}))}):null}),[r,dn]),fn=(0,c.useMemo)((function(){return(0,te.jsx)(C.Z,{columnFlex:[null,1],columns:[{uuid:"Provider"},{uuid:"Event"}],rows:null===ve||void 0===ve?void 0:ve.map((function(e,n){var i=e.event_type,t=e.name;return[(0,te.jsx)(D.ZP,{default:!0,monospace:!0,children:q._P[i].label()},"".concat(i,"_").concat(n,"_label")),(0,te.jsx)(D.ZP,{monospace:!0,children:t},"".concat(i,"_").concat(n,"_name"))]}))})}),[ve]),vn=(0,c.useMemo)((function(){var e,n,i,t,l,s,o;return"undefined"===typeof(null===r||void 0===r||null===(e=r.settings)||void 0===e||null===(n=e.triggers)||void 0===n?void 0:n.save_in_code_automatically)?null===re||void 0===re||null===(i=re.pipelines)||void 0===i||null===(t=i.settings)||void 0===t||null===(l=t.triggers)||void 0===l?void 0:l.save_in_code_automatically:null===r||void 0===r||null===(s=r.settings)||void 0===s||null===(o=s.triggers)||void 0===o?void 0:o.save_in_code_automatically}),[r,re]);return(0,te.jsxs)(_.Z,{afterHidden:!Re,before:(0,te.jsxs)(F.M,{children:[(0,te.jsxs)(I.Z,{mb:z.HN,pt:z.cd,px:z.cd,children:[(0,te.jsxs)(I.Z,{mb:z.cd,children:[y.Xm.TIME===_e&&(0,te.jsx)(L.Sun,{size:5*z.iI}),y.Xm.EVENT===_e&&(0,te.jsx)(L.MusicNotes,{size:5*z.iI}),y.Xm.API===_e&&(0,te.jsx)(L.Lightning,{size:5*z.iI}),!_e&&(0,te.jsx)(L.MultiShare,{size:5*z.iI})]}),(0,te.jsx)(j.Z,{children:je})]}),(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Settings"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),an,(null===ve||void 0===ve?void 0:ve.length)>=1&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Events"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),fn]}),pn&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Runtime variables"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),pn]}),gn&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Bookmark values"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),gn]}),hn&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"dbt runtime settings"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),hn]}),(null===ke||void 0===ke?void 0:ke.length)>=1&&(0,te.jsxs)(I.Z,{my:z.HN,children:[(0,te.jsx)(I.Z,{px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Tags"})}),(0,te.jsx)(v.Z,{light:!0,mt:1,short:!0}),(0,te.jsx)(I.Z,{mt:z.cd,px:z.cd,children:(0,te.jsx)(E.Z,{tags:null===ke||void 0===ke?void 0:ke.map((function(e){return{uuid:e}}))})})]}),"\\",(0,te.jsx)(I.Z,{my:z.HN,children:(0,te.jsxs)(I.Z,{px:z.cd,children:[(0,te.jsxs)(j.Z,{level:5,children:[Qe&&"Trigger exists in code",!Qe&&"Store trigger in code"]}),(0,te.jsxs)(I.Z,{mt:1,children:[vn&&(0,te.jsxs)(D.ZP,{default:!0,children:["This trigger will automatically be persisted in code. To change this behavior, update the ",(0,te.jsx)(a(),{as:"/pipelines/".concat(de,"/settings"),href:"/pipelines/[pipeline]/settings",passHref:!0,children:(0,te.jsx)(m.Z,{openNewWindow:!0,children:"pipeline\u2019s settings"})})," or ",(0,te.jsx)(a(),{as:"/settings/workspace/preferences",href:"/settings/workspace/preferences",passHref:!0,children:(0,te.jsx)(m.Z,{openNewWindow:!0,children:"project settings"})}),"."]}),!vn&&(0,te.jsxs)(D.ZP,{default:!0,children:["Save or update the trigger and its settings in the pipeline\u2019s metadata and version control the trigger using Git. For more information, please read the ",(0,te.jsx)(m.Z,{href:"https://docs.mage.ai/guides/triggers/configure-triggers-in-code",openNewWindow:!0,children:"documentation"}),"."]})]}),!vn&&(0,te.jsxs)(I.Z,{mt:z.cd,children:[!Ve&&(0,te.jsx)(S.Z,{inverted:!0}),Ve&&(0,te.jsxs)(h.ZP,{disabled:!(null!==l&&void 0!==l&&l.id),loading:tn,onClick:function(){nn({pipeline_trigger:{pipeline_schedule_id:null===l||void 0===l?void 0:l.id}})},secondary:!0,children:[Qe&&"Update trigger in code",!Qe&&"Save trigger in code"]})]})]})})]}),beforeWidth:F.W,breadcrumbs:[{label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(de,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{label:function(){return je},linkProps:{as:"/pipelines/".concat(de,"/triggers/").concat(fe),href:"/pipelines/[pipeline]/triggers/[...slug]"}}],buildSidekick:function(e){return(0,N.ZP)(le(le({},e),{},{selectedRun:Re,selectedTab:He,setSelectedTab:qe}))},errors:n,pageName:H.M.TRIGGERS,pipeline:r,setErrors:s,subheader:(0,te.jsxs)(x.ZP,{alignItems:"center",children:[(0,te.jsx)(h.ZP,{beforeIcon:cn?(0,te.jsx)(L.LightningOff,{size:U.bL}):(0,te.jsx)(L.Lightning,{inverted:!oe,size:U.bL}),danger:cn&&!oe,loading:We,onClick:function(e){(0,ee.j)(e),Ge({id:fe,status:cn?y.fq.INACTIVE:y.fq.ACTIVE})},outline:!0,success:!cn&&!oe,children:cn?"Disable trigger":"Enable trigger"}),(0,te.jsx)(I.Z,{mr:z.cd}),pe!==O.qL.STREAMING&&(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(h.ZP,{beforeIcon:(0,te.jsx)(L.Once,{size:U.bL}),disabled:un,loading:on,onClick:function(){return sn({pipeline_run:{pipeline_schedule_id:fe,pipeline_uuid:de,variables:dn}})},outline:!0,title:un?"Trigger must be enabled to run@once":"Manually run pipeline once immediately",children:(0,te.jsx)(D.ZP,{disabled:un,children:"Run@once"})}),(0,te.jsx)(I.Z,{mr:z.cd})]}),!oe&&(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)(h.ZP,{beforeIcon:(0,te.jsx)(L.Edit,{size:U.bL}),linkProps:{as:"/pipelines/".concat(de,"/triggers/").concat(fe,"/edit"),href:"/pipelines/[pipeline]/triggers/[...slug]"},noHoverUnderline:!0,outline:!0,sameColorAsText:!0,children:"Edit trigger"}),(0,te.jsx)(I.Z,{mr:z.cd})]}),(0,te.jsxs)(w.Z,{compact:!0,defaultColor:!0,onChange:function(e){e.preventDefault(),"all"===e.target.value?se.push("/pipelines/[pipeline]/triggers/[...slug]","/pipelines/".concat(de,"/triggers/").concat(fe)):(0,V.u)({page:0,status:e.target.value})},paddingRight:4*z.iI,placeholder:"Select run status",value:(null===Ce||void 0===Ce?void 0:Ce.status)||"all",children:[(0,te.jsx)("option",{value:"all",children:"All statuses"},"all_statuses"),P.IK.map((function(e){return(0,te.jsx)("option",{value:e,children:P.Do[e]},e)}))]})]}),title:function(){return je},uuid:"triggers/detail",children:[(0,te.jsx)(I.Z,{mt:z.cd,px:z.cd,children:(0,te.jsx)(j.Z,{level:5,children:"Runs for this trigger"})}),(0,te.jsx)(v.Z,{light:!0,mt:z.cd,short:!0}),Ue]})},oe=i(12717),ce=i(93808),ue=i(92709);function ae(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function de(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(i),!0).forEach((function(n){(0,l.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ae(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}function pe(e){var n=e.pipelineScheduleId,i=e.pipelineUUID,t=e.subpath,r=ue.b7===t,l=(0,c.useState)(null),s=l[0],o=l[1],u=T.ZP.variables.pipelines.list(i,{},{revalidateOnFocus:!1}).data,a=null===u||void 0===u?void 0:u.variables,d={};r&&(d._format="with_runtime_average");var p=T.ZP.pipeline_schedules.detail("undefined"!==typeof n&&n,d),g=p.data,h=p.mutate,f=null===g||void 0===g?void 0:g.pipeline_schedule,v=T.ZP.pipelines.detail(i,{includes_content:!1,includes_outputs:!1},{revalidateOnFocus:!1}).data,x=de(de({},null===v||void 0===v?void 0:v.pipeline),{},{uuid:i});return r?(0,te.jsx)(oe.Z,{errors:s,fetchPipelineSchedule:h,pipeline:x,pipelineSchedule:f,setErrors:o,variables:a}):(0,te.jsx)(se,{errors:s,fetchPipelineSchedule:h,pipeline:x,pipelineSchedule:f,setErrors:o,variables:a})}pe.getInitialProps=function(){var e=(0,r.Z)(o().mark((function e(n){var i,r,l,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.query,r=i.pipeline,l=i.slug,!Array.isArray(l)){e.next=4;break}return s=(0,t.Z)(l,2),c=s[0],u=s[1],e.abrupt("return",{pipelineScheduleId:c,pipelineUUID:r,subpath:u});case 4:return e.abrupt("return",{pipelineUUID:r});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();var ge=(0,ce.Z)(pe)},95488:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines/[pipeline]/triggers/[...slug]",function(){return i(36604)}])}},function(e){e.O(0,[9161,7674,26,1557,3782,7966,2717,9774,2888,179],(function(){return n=95488,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3605],{55729:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(82394),i=n(75582),o=n(82684),c=n(69864),l=n(71180),s=n(15338),d=n(97618),u=n(55485),a=n(85854),p=n(48670),j=n(65956),f=n(82359),v=n(88543),h=n(38276),g=n(30160),m=n(17488),Z=n(69650),x=n(12468),y=n(35686),b=n(77417),O=n(25976),_=n(44897),P=n(42631),w=n(70515),k=O.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],P.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||_.Z.background).codeArea,";\n ")})),C=n(72473),E=n(72191),S=n(70320),D=n(81728),I=n(42122),N=n(72619),L=n(23780),A=n(28598);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var M=function(e){var t,n,O,_=e.cancelButtonText,P=e.contained,H=e.header,M=e.onCancel,T=e.onSaveSuccess,F=e.rootProject,B=(0,L.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,i.Z)(B,1)[0],V=(0,o.useState)(null),W=V[0],X=V[1],q=(0,o.useState)(!1),z=q[0],G=q[1],J=(0,b.Z)(),K=J.fetchProjects,Y=J.project,Q=J.projectPlatformActivated,$=J.rootProject,ee=(0,o.useMemo)((function(){return F?$:Y}),[Y,$,F]),te=ee||{},ne=te.name,re=te.openai_api_key,ie=te.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){W||X(ee)}),[ee,W]);var ce=(0,c.Db)(y.ZP.projects.useUpdate(ne),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var t,n=e.project;K(),X(n),G(!1),(0,S.hY)(null===n||void 0===n||null===(t=n.features)||void 0===t?void 0:t[f.d.LOCAL_TIMEZONE]),T&&(null===T||void 0===T||T(n))},onErrorCallback:function(e,t){return U({errors:t,response:e})}})}}),le=(0,i.Z)(ce,2),se=le[0],de=le[1].isLoading,ue=(0,o.useCallback)((function(e){return se({project:R(R({},e),{},{root_project:F})})}),[F,se]),ae=(0,A.jsxs)(A.Fragment,{children:[H,(0,A.jsxs)(j.Z,{noPadding:!0,children:[(0,A.jsxs)(h.Z,{p:w.cd,children:[(0,A.jsx)(h.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project name"})}),(0,A.jsx)(g.ZP,{default:!0,monospace:!0,children:ne})]}),(0,A.jsx)(s.Z,{light:!0}),(0,A.jsxs)(h.Z,{p:w.cd,children:[(0,A.jsx)(h.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,A.jsx)(g.ZP,{default:!!ie,monospace:!0,muted:!ie,children:ie||"Not required"})]}),(0,A.jsx)(s.Z,{light:!0}),(0,A.jsx)(h.Z,{p:w.cd,children:(0,A.jsxs)(u.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,A.jsxs)(d.Z,{flexDirection:"column",children:[(0,A.jsx)(h.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,A.jsxs)(g.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,A.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,A.jsx)(h.Z,{mr:w.cd}),(0,A.jsx)(Z.Z,{checked:null===W||void 0===W?void 0:W.help_improve_mage,compact:!0,id:"help_improve_mage_toggle",onCheck:function(){return X((function(e){return R(R({},e),{},{help_improve_mage:!(null!==W&&void 0!==W&&W.help_improve_mage)})}))}})]})})]}),(0,A.jsx)(h.Z,{mt:w.HN}),(0,A.jsx)(v.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,A.jsx)(v.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===W||void 0===W||null===(t=W.pipelines)||void 0===t||null===(n=t.settings)||void 0===n||null===(O=n.triggers)||void 0===O||!O.save_in_code_automatically),onCheck:function(e){return X((function(t){var n,r,i,o,c,l;return R(R({},t),{},{pipelines:R(R({},null===t||void 0===t?void 0:t.pipelines),{},{settings:R(R({},null===t||void 0===t||null===(n=t.pipelines)||void 0===n?void 0:n.settings),{},{triggers:R(R({},null===t||void 0===t||null===(r=t.pipelines)||void 0===r||null===(i=r.settings)||void 0===i?void 0:i.triggers),{},{save_in_code_automatically:e(null===t||void 0===t||null===(o=t.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(l=c.triggers)||void 0===l?void 0:l.save_in_code_automatically)})})})})}))}}})}),(0,A.jsx)(h.Z,{mt:w.HN}),(0,A.jsx)(j.Z,{noPadding:!0,overflowVisible:!0,children:(0,A.jsxs)(h.Z,{p:w.cd,children:[(0,A.jsx)(h.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,I.gR)(null===W||void 0===W?void 0:W.features,[f.d.CODE_BLOCK_V2])||{}).map((function(e,t){var n=(0,i.Z)(e,2),o=n[0],c=n[1],l=Q&&!F&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,A.jsx)(h.Z,{mt:0===t?0:1,children:(0,A.jsxs)(u.ZP,{alignItems:"center",children:[(0,A.jsxs)(d.Z,{flex:1,children:[(0,A.jsx)(Z.Z,{disabled:l,checked:!!c,compact:!0,onCheck:function(){return X((function(e){return R(R({},e),{},{features:R(R({},null===W||void 0===W?void 0:W.features),{},(0,r.Z)({},o,!c))})}))}}),(0,A.jsx)(h.Z,{mr:w.cd}),(0,A.jsxs)(d.Z,{children:[(0,A.jsx)(g.ZP,{default:!c,monospace:!0,children:(0,D.vg)(o)}),o===f.d.LOCAL_TIMEZONE&&(0,A.jsx)(h.Z,{ml:1,children:(0,A.jsx)(x.Z,R({},S.EB))})]})]}),l&&(0,A.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,A.jsx)(h.Z,{mt:w.HN}),(0,A.jsx)(j.Z,{noPadding:!0,children:(0,A.jsxs)(h.Z,{p:w.cd,children:[(0,A.jsx)(h.Z,{mb:1,children:(0,A.jsx)(a.Z,{level:5,children:"OpenAI"})}),re&&!z?(0,A.jsxs)(u.ZP,R(R({},u.A0),{},{children:[(0,A.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,A.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return G(!0)},secondary:!0,title:"Edit",children:(0,A.jsx)(C.Edit,{size:E.bL})})]})):(0,A.jsx)(m.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return X((function(t){return R(R({},t),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===W||void 0===W?void 0:W.openai_api_key)||""})]})}),(0,A.jsx)(h.Z,{mt:w.HN}),(0,A.jsxs)(u.ZP,{alignItems:"center",children:[(0,A.jsx)(l.ZP,{id:"save-project-settings",loading:de,onClick:function(){var e={features:null===W||void 0===W?void 0:W.features,help_improve_mage:null===W||void 0===W?void 0:W.help_improve_mage,openai_api_key:null===W||void 0===W?void 0:W.openai_api_key,pipelines:null===W||void 0===W?void 0:W.pipelines};!0===(null===ee||void 0===ee?void 0:ee.help_improve_mage)&&!1===(null===W||void 0===W?void 0:W.help_improve_mage)&&(e.deny_improve_mage=!0),ue(e)},primary:!0,children:"Save project settings"}),M&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(h.Z,{mr:w.cd}),(0,A.jsx)(l.ZP,{onClick:M,secondary:!0,children:_||"Cancel"})]})]})]});return P?(0,A.jsx)(k,{children:ae}):ae}},46568:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=(n(82684),n(33591)),c=n(28598),l=["children","fullHeight","gutter","style"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,s=e.style,u=void 0===s?{}:s,a=(0,i.Z)(e,l),p=d({},u);return r&&(p.paddingLeft=r,p.paddingRight=p.paddingLeft),n&&(p.height="100%"),(0,c.jsx)(o.Col,d(d({},a),{},{style:p,children:t}))}},82682:function(e,t,n){"use strict";var r=n(82394),i=n(26304),o=n(82684),c=n(33591),l=n(28598),s=["children","fullHeight","gutter","justifyContent","style"];function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=e.children,n=e.fullHeight,r=e.gutter,d=e.justifyContent,a=e.style,p=void 0===a?{}:a,j=(0,i.Z)(e,s),f=u({},p);return r&&(f.marginLeft=-1*r,f.marginRight=f.marginLeft),n&&(f.height="100%"),(0,l.jsx)(c.Row,u(u({},j),{},{justifyContent:d,style:f,children:o.Children.map(t,(function(e,t){return e&&o.cloneElement(e,{gutter:r,key:t})}))}))}},70791:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(38860),o=n.n(i),c=n(46568),l=n(55729),s=n(93808),d=n(82682),u=n(28274),a=n(38276),p=n(70515),j=n(24755),f=n(28598);function v(){return(0,f.jsx)(u.Z,{uuidItemSelected:j.B2.PREFERENCES,uuidWorkspaceSelected:j.Pl.PROJECT_PLATFORM,children:(0,f.jsx)(a.Z,{p:p.cd,children:(0,f.jsx)(d.Z,{justifyContent:"center",children:(0,f.jsx)(c.Z,{xl:8,xxl:6,children:(0,f.jsx)(l.Z,{rootProject:!0})})})})})}v.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,s.Z)(v)},8071:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/platform/preferences",function(){return n(70791)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return t=8071,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{55729:function(e,n,t){"use strict";t.d(n,{Z:function(){return T}});var r=t(82394),i=t(75582),o=t(82684),c=t(69864),l=t(71180),s=t(15338),d=t(97618),u=t(55485),a=t(85854),p=t(48670),j=t(65956),f=t(82359),v=t(88543),h=t(38276),g=t(30160),m=t(17488),Z=t(69650),x=t(12468),y=t(35686),b=t(77417),O=t(25976),_=t(44897),P=t(42631),w=t(70515),k=O.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],P.n_,w.cd*w.iI,(function(e){return"\n background-color: ".concat((e.theme.background||_.Z.background).codeArea,";\n ")})),C=t(72473),E=t(72191),S=t(70320),D=t(81728),I=t(42122),N=t(72619),L=t(23780),H=t(28598);function A(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var T=function(e){var n,t,O,_=e.cancelButtonText,P=e.contained,A=e.header,T=e.onCancel,R=e.onSaveSuccess,B=e.rootProject,F=(0,L.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),U=(0,i.Z)(F,1)[0],V=(0,o.useState)(null),W=V[0],X=V[1],Y=(0,o.useState)(!1),q=Y[0],z=Y[1],G=(0,b.Z)(),K=G.fetchProjects,J=G.project,Q=G.projectPlatformActivated,$=G.rootProject,ee=(0,o.useMemo)((function(){return B?$:J}),[J,$,B]),ne=ee||{},te=ne.name,re=ne.openai_api_key,ie=ne.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){W||X(ee)}),[ee,W]);var ce=(0,c.Db)(y.ZP.projects.useUpdate(te),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var n,t=e.project;K(),X(t),z(!1),(0,S.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[f.d.LOCAL_TIMEZONE]),R&&(null===R||void 0===R||R(t))},onErrorCallback:function(e,n){return U({errors:n,response:e})}})}}),le=(0,i.Z)(ce,2),se=le[0],de=le[1].isLoading,ue=(0,o.useCallback)((function(e){return se({project:M(M({},e),{},{root_project:B})})}),[B,se]),ae=(0,H.jsxs)(H.Fragment,{children:[A,(0,H.jsxs)(j.Z,{noPadding:!0,children:[(0,H.jsxs)(h.Z,{p:w.cd,children:[(0,H.jsx)(h.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Project name"})}),(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:te})]}),(0,H.jsx)(s.Z,{light:!0}),(0,H.jsxs)(h.Z,{p:w.cd,children:[(0,H.jsx)(h.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Project UUID"})}),(0,H.jsx)(g.ZP,{default:!!ie,monospace:!0,muted:!ie,children:ie||"Not required"})]}),(0,H.jsx)(s.Z,{light:!0}),(0,H.jsx)(h.Z,{p:w.cd,children:(0,H.jsxs)(u.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,H.jsxs)(d.Z,{flexDirection:"column",children:[(0,H.jsx)(h.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Help improve Mage"})}),(0,H.jsxs)(g.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,H.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,H.jsx)(h.Z,{mr:w.cd}),(0,H.jsx)(Z.Z,{checked:null===W||void 0===W?void 0:W.help_improve_mage,compact:!0,id:"help_improve_mage_toggle",onCheck:function(){return X((function(e){return M(M({},e),{},{help_improve_mage:!(null!==W&&void 0!==W&&W.help_improve_mage)})}))}})]})})]}),(0,H.jsx)(h.Z,{mt:w.HN}),(0,H.jsx)(v.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,H.jsx)(v.S,{description:"Every time a trigger is created or updated in this pipeline, automatically persist it in code.",title:"Save triggers in code automatically",toggleSwitch:{checked:!(null===W||void 0===W||null===(n=W.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(O=t.triggers)||void 0===O||!O.save_in_code_automatically),onCheck:function(e){return X((function(n){var t,r,i,o,c,l;return M(M({},n),{},{pipelines:M(M({},null===n||void 0===n?void 0:n.pipelines),{},{settings:M(M({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:M(M({},null===n||void 0===n||null===(r=n.pipelines)||void 0===r||null===(i=r.settings)||void 0===i?void 0:i.triggers),{},{save_in_code_automatically:e(null===n||void 0===n||null===(o=n.pipelines)||void 0===o||null===(c=o.settings)||void 0===c||null===(l=c.triggers)||void 0===l?void 0:l.save_in_code_automatically)})})})})}))}}})}),(0,H.jsx)(h.Z,{mt:w.HN}),(0,H.jsx)(j.Z,{noPadding:!0,overflowVisible:!0,children:(0,H.jsxs)(h.Z,{p:w.cd,children:[(0,H.jsx)(h.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"Features"})}),Object.entries((0,I.gR)(null===W||void 0===W?void 0:W.features,[f.d.CODE_BLOCK_V2])||{}).map((function(e,n){var t=(0,i.Z)(e,2),o=t[0],c=t[1],l=Q&&!B&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,H.jsx)(h.Z,{mt:0===n?0:1,children:(0,H.jsxs)(u.ZP,{alignItems:"center",children:[(0,H.jsxs)(d.Z,{flex:1,children:[(0,H.jsx)(Z.Z,{disabled:l,checked:!!c,compact:!0,onCheck:function(){return X((function(e){return M(M({},e),{},{features:M(M({},null===W||void 0===W?void 0:W.features),{},(0,r.Z)({},o,!c))})}))}}),(0,H.jsx)(h.Z,{mr:w.cd}),(0,H.jsxs)(d.Z,{children:[(0,H.jsx)(g.ZP,{default:!c,monospace:!0,children:(0,D.vg)(o)}),o===f.d.LOCAL_TIMEZONE&&(0,H.jsx)(h.Z,{ml:1,children:(0,H.jsx)(x.Z,M({},S.EB))})]})]}),l&&(0,H.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,H.jsx)(h.Z,{mt:w.HN}),(0,H.jsx)(j.Z,{noPadding:!0,children:(0,H.jsxs)(h.Z,{p:w.cd,children:[(0,H.jsx)(h.Z,{mb:1,children:(0,H.jsx)(a.Z,{level:5,children:"OpenAI"})}),re&&!q?(0,H.jsxs)(u.ZP,M(M({},u.A0),{},{children:[(0,H.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,H.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return z(!0)},secondary:!0,title:"Edit",children:(0,H.jsx)(C.Edit,{size:E.bL})})]})):(0,H.jsx)(m.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return X((function(n){return M(M({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===W||void 0===W?void 0:W.openai_api_key)||""})]})}),(0,H.jsx)(h.Z,{mt:w.HN}),(0,H.jsxs)(u.ZP,{alignItems:"center",children:[(0,H.jsx)(l.ZP,{id:"save-project-settings",loading:de,onClick:function(){var e={features:null===W||void 0===W?void 0:W.features,help_improve_mage:null===W||void 0===W?void 0:W.help_improve_mage,openai_api_key:null===W||void 0===W?void 0:W.openai_api_key,pipelines:null===W||void 0===W?void 0:W.pipelines};!0===(null===ee||void 0===ee?void 0:ee.help_improve_mage)&&!1===(null===W||void 0===W?void 0:W.help_improve_mage)&&(e.deny_improve_mage=!0),ue(e)},primary:!0,children:"Save project settings"}),T&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(h.Z,{mr:w.cd}),(0,H.jsx)(l.ZP,{onClick:T,secondary:!0,children:_||"Cancel"})]})]})]});return P?(0,H.jsx)(k,{children:ae}):ae}},46568:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=(t(82684),t(33591)),c=t(28598),l=["children","fullHeight","gutter","style"];function s(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function d(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?s(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,s=e.style,u=void 0===s?{}:s,a=(0,i.Z)(e,l),p=d({},u);return r&&(p.paddingLeft=r,p.paddingRight=p.paddingLeft),t&&(p.height="100%"),(0,c.jsx)(o.Col,d(d({},a),{},{style:p,children:n}))}},82682:function(e,n,t){"use strict";var r=t(82394),i=t(26304),o=t(82684),c=t(33591),l=t(28598),s=["children","fullHeight","gutter","justifyContent","style"];function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n=e.children,t=e.fullHeight,r=e.gutter,d=e.justifyContent,a=e.style,p=void 0===a?{}:a,j=(0,i.Z)(e,s),f=u({},p);return r&&(f.marginLeft=-1*r,f.marginRight=f.marginLeft),t&&(f.height="100%"),(0,l.jsx)(c.Row,u(u({},j),{},{justifyContent:d,style:f,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:r,key:n})}))}))}},61316:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(38860),o=t.n(i),c=t(46568),l=t(55729),s=t(93808),d=t(82682),u=t(28274),a=t(38276),p=t(70515),j=t(24755),f=t(28598);function v(){return(0,f.jsx)(u.Z,{uuidItemSelected:j.HY,uuidWorkspaceSelected:j.WH,children:(0,f.jsx)(a.Z,{p:p.cd,children:(0,f.jsx)(d.Z,{justifyContent:"center",children:(0,f.jsx)(c.Z,{xl:8,xxl:6,children:(0,f.jsx)(l.Z,{})})})})})}v.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,s.Z)(v)},33323:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return t(61316)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return n=33323,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2344],{53795:function(e,n,r){"use strict";r.r(n);var s=r(77837),t=r(75582),o=r(38860),i=r.n(o),u=r(21764),c=r(82684),l=r(69864),d=r(34376),a=r(71180),p=r(15338),f=r(55485),h=r(48670),m=r(63637),x=r(93808),j=r(17022),w=r(28274),Z=r(38276),v=r(75499),k=r(30160),b=r(12468),g=r(35686),_=r(70515),P=r(24755),C=r(3917),I=r(76417),T=r(72619),A=r(95924),O=r(28598);function E(){var e=(0,d.useRouter)(),n=(0,c.useState)(!1),r=n[0],s=n[1],o=g.ZP.roles.list().data,i=(0,c.useMemo)((function(){return(null===o||void 0===o?void 0:o.roles)||[]}),[o]),x=[{bold:!r,label:function(){return"Roles"}}];r?(x[0].onClick=function(){return s(!1)},x.push({bold:!0,label:function(){return"New role"}})):x[0].linkProps={href:"/settings/workspace/roles"};var E=(0,l.Db)(g.ZP.seeds.useCreate(),{onSuccess:function(e){return(0,T.wD)(e,{callback:function(){u.Am.success("Roles and permissions successfully created.",{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:"seed-create-success"})},onErrorCallback:function(e){var n=e.error,r=n.errors,s=n.exception,t=n.message,o=n.type;u.Am.error((null===r||void 0===r?void 0:r.error)||s||t,{position:u.Am.POSITION.BOTTOM_RIGHT,toastId:o})}})}}),N=(0,t.Z)(E,2),R=N[0],S=N[1].isLoading;return(0,O.jsxs)(w.Z,{appendBreadcrumbs:!0,breadcrumbs:x,title:"Roles",uuidItemSelected:P.B2.ROLES,uuidWorkspaceSelected:P.Pl.USER_MANAGEMENT,children:[r&&(0,O.jsx)(j.Z,{contained:!0,onCancel:function(){return s(!1)}}),!r&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Z.Z,{p:_.cd,children:(0,O.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,O.jsx)(a.ZP,{beforeIcon:(0,O.jsx)(m.Z,{}),onClick:function(){return s(!0)},primary:!0,children:"Add new role"}),(0,O.jsx)(Z.Z,{mr:_.cd}),(0,O.jsx)(b.Z,{appearBefore:!0,fullSize:!0,description:(0,O.jsxs)(k.ZP,{default:!0,children:["This will create 6 roles and 100s of permissions",(0,O.jsx)("br",{}),"that Mage normally uses when user defined",(0,O.jsx)("br",{}),"permissions isn\u2019t turned on."]}),lightBackground:!0,widthFitContent:!0,children:(0,O.jsx)(a.ZP,{compact:!0,loading:S,onClick:function(){return R({seed:{permissions:!0,roles:!0}})},secondary:!0,small:!0,children:"Create default roles and permissions"})})]})}),(0,O.jsx)(p.Z,{light:!0}),(0,O.jsx)(v.Z,{columnFlex:[1,1,1,null],columns:[{uuid:"Role"},{uuid:"Created by"},{uuid:"Last updated"},{rightAligned:!0,uuid:"Created at"}],onClickRow:function(n){var r,s=null===(r=i[n])||void 0===r?void 0:r.id;e.push("/settings/workspace/roles/".concat(s))},rows:null===i||void 0===i?void 0:i.map((function(n){var r=n.created_at,s=(n.id,n.name),t=n.updated_at,o=n.user;return[(0,O.jsx)(k.ZP,{children:s},"name"),o?(0,O.jsx)(h.Z,{default:!0,onClick:function(n){(0,A.j)(n),e.push("/settings/workspace/users/".concat(null===o||void 0===o?void 0:o.id))},children:(0,I.s)(o)}):(0,O.jsx)("div",{},"user"),(0,O.jsx)(k.ZP,{monospace:!0,default:!0,children:t&&(0,C.d$)(t)},"updatedAt"),(0,O.jsx)(k.ZP,{monospace:!0,default:!0,rightAligned:!0,children:r&&(0,C.d$)(r)},"createdAt")]})),uuid:"roles"})]})]})}E.getInitialProps=(0,s.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),n.default=(0,x.Z)(E)},8619:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/roles",function(){return r(53795)}])}},function(e){e.O(0,[1557,5699,7022,9774,2888,179],(function(){return n=8619,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2403],{60480:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return G}});var r,i=t(77837),s=t(82394),o=t(75582),l=t(38860),c=t.n(l),u=t(82684),a=t(12691),d=t.n(a),h=t(21764),p=t(69864),m=t(71180),y=t(70652),b=t(50724),f=t(1402),v=t(55485),j=t(85854),x=t(48670),_=t(93808),Z=t(44085),g=t(28274),k=t(38276);!function(e){e.SSH="ssh",e.HTTPS="https"}(r||(r={}));var w=[{autoComplete:"remote_repo_link",label:"Remote repo url",required:!0,uuid:"remote_repo_link"},{autoComplete:"repo_path",label:"Local directory path",labelDescription:"Defaults to Python's os.getcwd() if omitted. Mage will create this local directory if it doesn't already exist.",uuid:"repo_path"}],P=[{autoComplete:"username",label:"Username",uuid:"username"},{autoComplete:"email",label:"Email",uuid:"email"},{autoComplete:"ssh_public_key",label:"SSH public key in base64",type:"password",uuid:"ssh_public_key"},{autoComplete:"ssh_private_key",label:"SSH private key in base64",type:"password",uuid:"ssh_private_key"}],O=[{autoComplete:"username",label:"Username",required:!0,uuid:"username"},{autoComplete:"email",label:"Email",required:!0,uuid:"email"},{autoComplete:"access_token",label:"Access token",labelDescription:"Add your Git access token to authenticate with your provided username. The access token will be stored as a Mage secret.",required:!0,type:"password",uuid:"access_token"}],C=[{autoComplete:"branch",label:"Branch name",required:!0,uuid:"branch"}],S=t(30160),T=t(17488),I=t(35686),M=t(70515),q=t(24755),H=t(72619),A=t(28598);function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function N(){var e=I.ZP.syncs.list().data,n=(0,u.useState)(null),t=n[0],i=n[1],l=(0,u.useState)(null),c=l[0],a=l[1],_=(0,u.useState)(null),D=_[0],N=_[1],G=(0,u.useState)(null),R=G[0],B=G[1];(0,u.useEffect)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];a(null===t||void 0===t?void 0:t.user_git_settings),i(t),B(!(null===t||void 0===t||!t.branch))}}),[e]);var F=(0,u.useMemo)((function(){if(e){var n,t=null===e||void 0===e||null===(n=e.syncs)||void 0===n?void 0:n[0];return!(null===t||void 0===t||!t.branch)}return!1}),[e]),U=(0,p.Db)(I.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){var n=e.sync;n&&(i(n),window.location.reload(),h.Am.success("Sync saved",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"}))},onErrorCallback:function(e,n){return N({errors:n,response:e})}})}}),W=(0,o.Z)(U,2),L=W[0],z=W[1].isLoading,X=(0,p.Db)(I.ZP.syncs.useUpdate("git"),{onSuccess:function(e){return(0,H.wD)(e,{callback:function(e){e.sync&&h.Am.success("Success!",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:"data_sync_success"})},onErrorCallback:function(e,n){return N({errors:n,response:e})}})}}),Y=(0,o.Z)(X,2),J=Y[0],K=Y[1].isLoading,Q=(0,u.useMemo)((function(){return(null===t||void 0===t?void 0:t.auth_type)||r.SSH}),[null===t||void 0===t?void 0:t.auth_type]),V=(0,u.useMemo)((function(){return Q===r.HTTPS?O:P}),[Q]),$=I.ZP.statuses.list().data,ee=(0,u.useMemo)((function(){var e,n;return null===$||void 0===$||null===(e=$.statuses)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.require_user_authentication}),[$]),ne=(0,u.useMemo)((function(){var e=i,n=t;return!R&&ee&&(e=a,n=c),(0,A.jsx)("form",{children:V.map((function(t){var r,i,o=t.autoComplete,l=t.disabled,c=t.label,u=t.labelDescription,a=t.required,d=t.type,p=t.uuid;return i="ssh_public_key"===p?(0,A.jsx)(k.Z,{mb:1,children:(0,A.jsxs)(S.ZP,{small:!0,children:["Run ",(0,A.jsx)(x.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519.pub | base64 | tr -d \\\\n && echo"})," in terminal to get base64 encoded public key and paste the result here. The key will be stored as a Mage secret."]})}):"ssh_private_key"===p?(0,A.jsx)(k.Z,{mb:1,children:(0,A.jsxs)(S.ZP,{small:!0,children:["Follow same steps as the public key, but run ",(0,A.jsx)(x.Z,{onClick:function(){navigator.clipboard.writeText("cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"),h.Am.success("Successfully copied to clipboard.",{position:h.Am.POSITION.BOTTOM_RIGHT,toastId:p})},small:!0,children:"cat ~/.ssh/id_ed25519 | base64 | tr -d \\\\n && echo"})," instead. The key will be stored as a Mage secret."]})}):u&&(0,A.jsx)(k.Z,{mb:1,children:(0,A.jsx)(S.ZP,{small:!0,children:u})}),(0,A.jsxs)(k.Z,{mt:2,children:[i,(0,A.jsx)(T.Z,{autoComplete:o,disabled:l,label:c,onChange:function(n){e((function(e){return E(E({},e),{},(0,s.Z)({},p,n.target.value))}))},primary:!0,required:a,setContentOnMount:!0,type:d,value:(null===(r=n)||void 0===r?void 0:r[p])||""})]},p)}))})}),[V,ee,a,i,R,t,c]);return(0,A.jsx)(g.Z,{uuidItemSelected:q.fF,uuidWorkspaceSelected:q.WH,children:(0,A.jsxs)(k.Z,{p:M.cd,style:{width:"600px"},children:[(0,A.jsx)(j.Z,{children:"Git repository settings"}),(0,A.jsxs)(S.ZP,{children:["If you are using Github and want to use a more feature rich integration, you can check out the ",(0,A.jsx)(d(),{as:"/version-control",href:"/version-control",children:(0,A.jsx)(x.Z,{inline:!0,children:"version control app"})}),"."]}),(0,A.jsx)(x.Z,{}),(0,A.jsx)(k.Z,{mt:1,children:(0,A.jsx)(S.ZP,{bold:!0,children:"Authentication type"})}),(0,A.jsx)(k.Z,{mt:1,children:(0,A.jsx)(Z.Z,{compact:!0,label:"Authentication type",onChange:function(e){var n=e.target.value;i((function(e){return E(E({},e),{},{auth_type:n})}))},value:Q,children:Object.entries(r).map((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return(0,A.jsx)("option",{value:r,children:t},r)}))})}),(0,A.jsx)(k.Z,{mt:M.Mq,children:Q===r.SSH&&(0,A.jsxs)(S.ZP,{bold:!0,children:["You will need to ",(0,A.jsx)(x.Z,{href:"https://docs.mage.ai/development/git/configure#generate-ssh-token",openNewWindow:!0,children:"set up your SSH key"})," if you have not done so already."]})}),(0,A.jsx)("form",{children:w.map((function(e){var n=e.autoComplete,r=e.disabled,o=e.label,l=e.labelDescription,c=e.required,u=e.type,a=e.uuid;return(0,A.jsxs)(k.Z,{mt:2,children:[l&&(0,A.jsx)(k.Z,{mb:1,children:(0,A.jsx)(S.ZP,{small:!0,children:l})}),(0,A.jsx)(T.Z,{autoComplete:n,disabled:r,label:o,onChange:function(e){i((function(n){return E(E({},n),{},(0,s.Z)({},a,e.target.value))}))},primary:!0,required:c,setContentOnMount:!0,type:u,value:(null===t||void 0===t?void 0:t[a])||""})]},a)}))}),(0,A.jsx)(k.Z,{mt:M.Mq,children:(0,A.jsxs)(v.ZP,{alignItems:"center",children:[(0,A.jsx)(k.Z,{mr:1,children:(0,A.jsx)(y.Z,{checked:!!R,onClick:function(){return B((function(e){var n=!e;return n||i((function(e){return E(E({},e),{},{branch:null,sync_on_executor_start:!1,sync_on_pipeline_run:!1,sync_on_start:!1,sync_submodules:!1})})),n}))}})}),(0,A.jsxs)(S.ZP,{bold:!0,children:["Use ",(0,A.jsx)(x.Z,{bold:!0,href:"https://docs.mage.ai/production/data-sync/git-sync",openNewWindow:!0,children:"One-way git sync"})," (Click link for more info)"]})]})}),R?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(k.Z,{mt:M.Mq,children:(0,A.jsx)(S.ZP,{bold:!0,children:"Sync with a specified branch. These settings will be saved at the project level."})}),(0,A.jsx)("form",{children:C.map((function(e){var n=e.autoComplete,r=e.disabled,o=e.label,l=e.required,c=e.type,u=e.uuid;return(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(T.Z,{autoComplete:n,disabled:r,label:o,onChange:function(e){i((function(n){return E(E({},n),{},(0,s.Z)({},u,e.target.value))}))},primary:!0,required:l,setContentOnMount:!0,type:c,value:(null===t||void 0===t?void 0:t[u])||""})},u)}))}),(0,A.jsx)(v.ZP,{alignItems:"center",children:(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(y.Z,{checked:null===t||void 0===t?void 0:t.sync_submodules,label:"Include submodules",onClick:function(){i((function(e){return E(E({},e),{},{sync_submodules:!(null!==t&&void 0!==t&&t.sync_submodules)})}))}})})}),(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(j.Z,{level:5,children:"Additional sync settings"})}),(0,A.jsx)(v.ZP,{alignItems:"center",children:(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(y.Z,{checked:null===t||void 0===t?void 0:t.sync_on_pipeline_run,label:"Sync before each trigger run",onClick:function(){i((function(e){return E(E({},e),{},{sync_on_pipeline_run:!(null!==t&&void 0!==t&&t.sync_on_pipeline_run)})}))}})})}),(0,A.jsx)(v.ZP,{alignItems:"center",children:(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(y.Z,{checked:null===t||void 0===t?void 0:t.sync_on_start,label:"Sync on server start up",onClick:function(){i((function(e){return E(E({},e),{},{sync_on_start:!(null!==t&&void 0!==t&&t.sync_on_start)})}))}})})}),(0,A.jsx)(k.Z,{mt:M.Mq,children:(0,A.jsx)(S.ZP,{bold:!0,children:"Configure the Git authentication credentials that will be used to sync with the specified Git repository."})}),ne]}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(k.Z,{mt:M.Mq,children:(0,A.jsx)(S.ZP,{bold:!0,children:"These fields are required to help Mage configure your Git settings. These settings will be specific to your user."})}),ne]}),(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsx)(m.ZP,{loading:z,onClick:function(){return L({sync:E(E({},t),{},{user_git_settings:c})})},primary:!0,children:"Save repository settings"})}),D&&(0,A.jsx)(b.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,A.jsx)(f.Z,E(E({},D),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))}),F&&(0,A.jsxs)(k.Z,{mt:M.HN,children:[(0,A.jsx)(j.Z,{children:"Synchronize code from remote repository"}),(0,A.jsxs)(k.Z,{mt:1,children:[(0,A.jsxs)(S.ZP,{children:["Running the sync from this page will run a one time sync with the remote repository.",(0,A.jsx)("br",{}),"This may ",(0,A.jsx)(S.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," your existing data, so make sure you\u2019ve committed or backed up your current changes."]}),(0,A.jsx)(k.Z,{mt:2}),(0,A.jsxs)(S.ZP,{children:["Reset will tell Mage to try to clone your repository from remote. This will also ",(0,A.jsx)(S.ZP,{bold:!0,danger:!0,inline:!0,children:"overwrite"})," all your local changes and reset any settings you may have configured for your local Git repo. This may be helpful if you are having issues syncing your repository."]})]}),(0,A.jsx)(k.Z,{mt:2,children:(0,A.jsxs)(v.ZP,{children:[(0,A.jsx)(m.ZP,{loading:K,onClick:function(){return J({sync:{action_type:"sync_data"}})},warning:!0,children:"Synchronize code"}),(0,A.jsx)(k.Z,{ml:2}),(0,A.jsx)(m.ZP,{danger:!0,loading:K,onClick:function(){return J({sync:{action_type:"reset"}})},children:"Reset repository"})]})})]})]})})}N.getInitialProps=(0,i.Z)(c().mark((function e(){return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var G=(0,_.Z)(N)},37056:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/sync-data",function(){return t(60480)}])}},function(e){e.O(0,[1557,5699,9774,2888,179],(function(){return n=37056,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2858],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return C}});var r=t(82394),o=t(21831),i=t(82684),l=t(50724),s=t(1402),c=t(97618),u=t(70613),a=t(31557),d=t(68899),h=t(28598);function f(e,n){var t=e.children,r=e.noPadding;return(0,h.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var m=i.forwardRef(f),v=t(62547),j=t(82571),p=t(77417),x=t(46684),b=t(75375);function Z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function g(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Z(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function y(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var t=e.after,r=e.afterHeader,i=e.afterHidden,f=e.afterWidth,Z=e.afterWidthOverride,y=e.appendBreadcrumbs,C=e.before,P=e.beforeHeader,_=e.beforeWidth,w=e.breadcrumbs,O=e.children,k=e.contained,M=e.errors,I=e.headerMenuItems,S=e.headerOffset,H=e.hideAfterCompletely,E=e.mainContainerHeader,A=e.navigationItems,D=e.setAfterHidden,R=e.setAfterWidth,F=e.setBeforeWidth,B=e.setErrors,N=e.subheaderChildren,V=e.subheaderNoPadding,T=e.title,U=e.uuid,L=(0,b.Z)(U,{beforeResizeOffset:b.H,setWidthAfter:R,setWidthBefore:F,widthAfter:f,widthBefore:_,widthOverrideAfter:Z}),q=L.mainContainerRef,G=L.mousedownActiveAfter,z=L.mousedownActiveBefore,W=L.setMousedownActiveAfter,Q=L.setMousedownActiveBefore,K=L.setWidthAfter,Y=L.setWidthBefore,X=L.widthAfter,J=L.widthBefore,$=(0,p.Z)().project,ee=[];return w&&ee.push.apply(ee,(0,o.Z)(w)),null!==w&&void 0!==w&&w.length&&!y||!$||null!==w&&void 0!==w&&w.length||ee.unshift({bold:!y,label:function(){return T}}),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u.Z,{title:T}),(0,h.jsx)(a.Z,{breadcrumbs:ee,menuItems:I}),(0,h.jsxs)(d.Nk,{ref:n,children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,h.jsx)(d.lm,{showMore:!0,children:(0,h.jsx)(j.Z,{navigationItems:A,showMore:!0})}),(0,h.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,h.jsxs)(v.Z,{after:t,afterHeader:r,afterHeightOffset:x.Mz,afterHidden:i,afterMousedownActive:G,afterWidth:X,before:C,beforeHeader:P,beforeHeightOffset:x.Mz,beforeMousedownActive:z,beforeWidth:C?J:d.k1,contained:k,headerOffset:S,hideAfterCompletely:!t||H,leftOffset:C?d.k1:null,mainContainerHeader:E,mainContainerRef:q,setAfterHidden:D,setAfterMousedownActive:W,setAfterWidth:K,setBeforeMousedownActive:Q,setBeforeWidth:Y,children:[N&&(0,h.jsx)(m,{noPadding:V,children:N}),O]})})]}),M&&(0,h.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,h.jsx)(s.Z,g(g({},M),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}var C=i.forwardRef(y)},93808:function(e,n,t){"use strict";t.d(n,{Z:function(){return O}});var r=t(77837),o=t(26304),i=t(62243),l=t(29385),s=t(80022),c=t(13692),u=t(93189),a=t(15544),d=t(82394),h=t(38860),f=t.n(h),m=t(82684),v=t(56663),j=t.n(v),p=t(40761),x=t(34661),b=t(36105),Z=t(50178),g=t(69419),y=t(28598),C=["auth"];function P(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function _(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?P(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function w(e){var n=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=(0,a.Z)(e);if(n){var o=(0,a.Z)(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return(0,u.Z)(this,t)}}function O(e){return function(n){(0,c.Z)(u,n);var t=w(u);function u(){var e;(0,i.Z)(this,u);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e=t.call.apply(t,[this].concat(r)),(0,d.Z)((0,s.Z)(e),"state",{auth:new p.Z(e.props.token)}),e}return(0,l.Z)(u,[{key:"componentDidMount",value:function(){this.setState({auth:new p.Z(this.props.token)})}},{key:"render",value:function(){var n=this.props,t=(n.auth,(0,o.Z)(n,C));return(0,y.jsx)(e,_({auth:this.state.auth},t))}}],[{key:"getInitialProps",value:function(){var n=(0,r.Z)(f().mark((function n(t){var r,o,i,l,s,c,u,a,d;return f().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=j()(t),o=(0,Z.ex)(t),i=o.id,l=r[x.Mv],s=r[b.qt],c=new p.Z(l),u=_(_({},t),{},{auth:c,currentGroupId:i,theme:s}),(0,Z.YB)(t)&&c.isExpired&&(console.log("OAuth token has expired."),a=_(_({},t.query),{},{redirect_url:t.asPath}),(0,g.nL)("/sign-in?".concat((0,g.uM)(a)),t.res)),!e.getInitialProps){n.next=12;break}return n.next=10,e.getInitialProps(u);case 10:return d=n.sent,n.abrupt("return",_(_({},d),{},{auth:c,currentGroupId:i,theme:s}));case 12:return n.abrupt("return",u);case 13:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()}]),u}(m.Component)}},91769:function(e,n,t){"use strict";t.d(n,{f:function(){return x},h:function(){return j}});var r=t(82394),o=t(82684),i=t(34376),l=t(68562),s=t(72473),c=t(70515),u=t(69419),a=t(53808),d=t(28598);var h=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),h=r.url,f=r.redirect_query_params,m=void 0===f?{}:f;return(0,d.jsx)(d.Fragment,{children:h&&(0,d.jsx)(l.ZP,{beforeElement:(0,d.jsx)(s.GoogleIcon,{size:2*c.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(h).state;(0,a.t8)(e,m),t.push(h)},uuid:"SignForm/google",children:"Sign in with Google"})})};var f=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),h=r.url,f=r.redirect_query_params,m=void 0===f?{}:f;return(0,d.jsx)(d.Fragment,{children:h&&(0,d.jsx)(l.ZP,{beforeElement:(0,d.jsx)(s.MicrosoftIcon,{size:2*c.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(h).state;m&&(0,a.t8)(e,m),t.push(h)},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})};var m=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),s=r.url,c=r.redirect_query_params,h=void 0===c?{}:c;return(0,d.jsx)(d.Fragment,{children:s&&(0,d.jsx)(l.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(s).state;(0,a.t8)(e,h),t.push(s)},uuid:"SignForm/oidc_generic",children:"Sign in with OIDC"})})};var v,j,p=function(e){var n=e.oauthResponse,t=(0,i.useRouter)(),r=(0,o.useMemo)((function(){return n||{}}),[n]),s=r.url,c=r.redirect_query_params,h=void 0===c?{}:c;return(0,d.jsx)(d.Fragment,{children:s&&(0,d.jsx)(l.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,u.iV)(s).state;(0,a.t8)(e,h),t.push(s)},uuid:"SignForm/okta",children:"Sign in with Okta"})})};!function(e){e.ACTIVE_DIRECTORY="active_directory",e.AZURE_DEVOPS="azure_devops",e.BITBUCKET="bitbucket",e.GITHUB="github",e.GITLAB="gitlab",e.GOOGLE="google",e.OIDC_GENERIC="oidc_generic",e.OKTA="okta"}(j||(j={}));var x=(v={},(0,r.Z)(v,j.ACTIVE_DIRECTORY,f),(0,r.Z)(v,j.GOOGLE,h),(0,r.Z)(v,j.OIDC_GENERIC,m),(0,r.Z)(v,j.OKTA,p),v)},37520:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Ne}});var r=t(77837),o=t(38860),i=t.n(o),l=t(93808),s=t(82394),c=t(75582),u=t(82684),a=t(69864),d=t(71180),h=t(15338),f=t(55485),m=t(85854),v=t(44085),j=t(38276),p=t(4190),x=t(30160),b=t(35576),Z=t(17488),g=t(12468),y=t(35686),C=t(72473),P="clone",_="delete",w="fetch",O="merge",k="pull",M="push",I="rebase",S="git_remote_name",H="git_repository_name",E={uuid:"Branches"},A={uuid:"Commit"},D={uuid:"Push & Pull Requests"},R={uuid:"Remote & Auth"},F=[R,E,A,D],B=t(70515),N=t(81728),V=t(72619),T=t(28598);var U=function(e){var n=e.actionRemoteName,t=e.branch,r=e.branches,o=e.fetchBranch,i=e.fetchBranches,l=e.remotes,s=e.setActionRemoteName,P=e.showError,w=(0,u.useState)(""),k=w[0],M=w[1],S=(0,u.useState)(null),H=S[0],E=S[1],D=(0,u.useState)(null),F=D[0],U=D[1],L=(0,u.useState)(null),q=L[0],G=L[1],z=(0,u.useState)(""),W=z[0],Q=z[1],K=(0,u.useMemo)((function(){return null===l||void 0===l?void 0:l.find((function(e){return e.name===n}))}),[n,l]),Y=(0,u.useMemo)((function(){return(null===r||void 0===r?void 0:r.concat((null===K||void 0===K?void 0:K.refs)||[]))||[]}),[r,K]),X=(0,a.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){o(),i(),Q("")},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),J=(0,c.Z)(X,2),$=J[0],ee=J[1].isLoading,ne=(0,a.Db)(y.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){o(),window.location.reload()},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),te=(0,c.Z)(ne,2),re=te[0],oe=te[1].isLoading,ie=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===t||void 0===t?void 0:t.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(e){var n=e.git_custom_branch.progress;o(),M(""),E(""),U(n),G("")},onErrorCallback:function(e,n){return P({errors:n,response:e})}})}}),le=(0,c.Z)(ie,2),se=le[0],ce=le[1].isLoading;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsxs)(m.Z,{children:["Branches",r?" (".concat(null===r||void 0===r?void 0:r.length,")"):""]}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Remote"})}),(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.MultiShare,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return s(e.target.value)},placeholder:"Choose a remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(g.Z,{fullSize:!0,label:"Choose a different branch to switch branches",widthFitContent:!0,children:(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{muted:!1}),beforeIconSize:2*B.iI,monospace:!0,onChange:function(e){return re({git_custom_branch:{name:e.target.value,remote:n}})},value:null===t||void 0===t?void 0:t.name,children:(null===t||void 0===t?void 0:t.name)&&(null===Y||void 0===Y?void 0:Y.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)})))})}),(0,T.jsx)(j.Z,{mr:B.cd}),oe&&(0,T.jsx)(p.Z,{inverted:!0})]})]})]})}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(Z.Z,{label:"New branch name",monospace:!0,onChange:function(e){var n;return Q(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:W||""}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Add,{size:2*B.iI}),disabled:!W,loading:ee,onClick:function(){$({git_custom_branch:{name:W}})},primary:!0,children:"Create new branch"})]})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(m.Z,{children:"Actions"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(j.Z,{mb:B.Mq,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),(null===t||void 0===t?void 0:t.name)&&(0,T.jsx)(x.ZP,{monospace:!0,children:null===t||void 0===t?void 0:t.name})]}),(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Base branch"})}),(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return G(e.target.value)},placeholder:"Choose a branch",value:q,children:null===Y||void 0===Y?void 0:Y.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Action"})}),(0,T.jsxs)(v.Z,{onChange:function(e){return E(e.target.value)},placeholder:"Choose action",value:H||"",children:[(0,T.jsx)("option",{value:O,children:(0,N.vg)(O)}),(0,T.jsx)("option",{value:I,children:(0,N.vg)(I)}),(0,T.jsx)("option",{value:_,children:(0,N.vg)(_)})]})]})]}),H&&[O,I].includes(H)&&(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsxs)(x.ZP,{bold:!0,muted:!0,children:["Message for ",H]})}),(0,T.jsx)(b.Z,{monospace:!0,onChange:function(e){return M(e.target.value)},value:k||""})]}),(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!H||!q,loading:ce,onClick:function(){(_!==H||"undefined"!==typeof location&&window.confirm("Are you sure you want to delete branch ".concat(q,"?")))&&se({git_custom_branch:{action_payload:{base_branch:q},action_type:H,message:k}})},primary:!0,children:H?(0,N.vg)(H):"Execute action"}),F&&(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(x.ZP,{default:!0,monospace:!0,preWrap:!0,children:F})})]})]})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsxs)(f.ZP,{children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.PaginateArrowLeft,{}),linkProps:{href:"/version-control?tab=".concat(encodeURIComponent(R.uuid))},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:R.uuid}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)(d.ZP,{afterIcon:(0,T.jsx)(C.PaginateArrowRight,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",A.uuid]})]})]})]})},L=t(90299),q=t(32013),G=t(98777),z=t(48670),W=t(75499);function Q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function K(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Q(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Q(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var Y={base_branch:null,body:null,compare_branch:null,repository:null,title:null};var X=function(e){var n=e.actionRemoteName,t=e.branch,r=e.branches,o=e.fetchBranch,i=e.loading,l=e.remotes,s=e.repositories,g=e.repositoryName,P=e.setActionRemoteName,_=e.setRepositoryName,w=e.showError,O=(0,u.useState)((null===t||void 0===t?void 0:t.name)||""),k=O[0],I=O[1],S=(0,u.useState)(null),H=S[0],E=S[1],D=(0,u.useState)(null),R=D[0],F=D[1],U=(0,u.useState)(Y),L=U[0],Q=U[1],X=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===t||void 0===t?void 0:t.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(e){var n=e.git_custom_branch,t=n.error,r=n.progress;t?(E(t),F(null)):(o(),E(null),F(r))},onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),J=(0,c.Z)(X,2),$=J[0],ee=J[1].isLoading,ne=(0,u.useMemo)((function(){var e;return null===s||void 0===s||null===(e=s.find((function(e){return e.name===g})))||void 0===e?void 0:e.url}),[s,g]),te=y.ZP.pull_requests.list({remote_url:ne,repository:g},{},{pauseFetch:!g}),re=te.data,oe=te.mutate,ie=(0,u.useMemo)((function(){return(null===re||void 0===re?void 0:re.pull_requests)||[]}),[re]),le=(0,u.useMemo)((function(){return(0,T.jsx)(W.Z,{columnFlex:[null,null,null,null],columns:[{uuid:"Title"},{uuid:"Author"},{uuid:"Created"},{uuid:"Last modified"}],onClickRow:function(e){var n,t=null===ie||void 0===ie||null===(n=ie[e])||void 0===n?void 0:n.url;t&&window.open(t,"_blank")},rows:null===ie||void 0===ie?void 0:ie.map((function(e){var n=e.created_at,t=e.last_modified,r=e.title,o=e.url,i=e.user;return[(0,T.jsx)(z.Z,{default:!0,href:o,monospace:!0,openNewWindow:!0,small:!0,children:r},"title"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:i},"user"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:n},"createdAt"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:t||"-"},"lastModified")]})),uuid:"pull-requests"})}),[ie]),se=y.ZP.git_custom_branches.list({remote_url:ne,repository:g},{},{pauseFetch:!g}).data,ce=(0,u.useMemo)((function(){return(null===se||void 0===se?void 0:se.git_custom_branches)||[]}),[se]);(0,u.useEffect)((function(){null!==L&&void 0!==L&&L.compare_branch||null===ce||void 0===ce||!ce.find((function(e){return e.name===(null===t||void 0===t?void 0:t.name)}))||Q((function(e){return K(K({},e),{},{compare_branch:null===t||void 0===t?void 0:t.name})}))}),[t,ce,L]);var ue=(0,a.Db)(y.ZP.pull_requests.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){oe(),Q(Y)},onErrorCallback:function(e,n){return w({errors:n,response:e})}})}}),ae=(0,c.Z)(ue,2),de=ae[0],he=ae[1].isLoading;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(m.Z,{children:(0,N.vg)(M)})}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Remote"})}),i&&(0,T.jsx)(p.Z,{inverted:!0}),!i&&(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.MultiShare,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return P(e.target.value)},placeholder:"Choose remote",value:n||"",children:null===l||void 0===l?void 0:l.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Branch"})}),(0,T.jsxs)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return I(e.target.value)},placeholder:"Choose branch",value:k||"",children:[(0,T.jsx)("option",{value:""}),null===r||void 0===r?void 0:r.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsxs)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!n||!k,loading:ee,onClick:function(){F(null),$({git_custom_branch:{action_payload:{branch:k,remote:n},action_type:M}})},primary:!0,children:[(0,N.vg)(M)," ",n," ",n&&k]})}),(R||H)&&(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(x.ZP,{danger:!!H,default:!!R,monospace:!0,preWrap:!0,children:R||H})})]})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(m.Z,{children:"Create pull request"})}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[i&&(0,T.jsx)(p.Z,{inverted:!0}),!i&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Repository"})}),(0,T.jsx)(v.Z,{monospace:!0,onChange:function(e){return _(e.target.value)},placeholder:"Choose repository",value:g||"",children:null===s||void 0===s?void 0:s.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Base branch"})}),g&&!se&&(0,T.jsx)(p.Z,{inverted:!0}),(!g||se)&&(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,disabled:!g,monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{base_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===L||void 0===L?void 0:L.base_branch)||"",children:null===ce||void 0===ce?void 0:ce.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)("div",{children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),g&&!se&&(0,T.jsx)(p.Z,{inverted:!0}),(!g||se||(null===L||void 0===L?void 0:L.compare_branch))&&(0,T.jsxs)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,disabled:!g,monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{compare_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===L||void 0===L?void 0:L.compare_branch)||"",children:[!(null!==ce&&void 0!==ce&&ce.length)&&(null===L||void 0===L?void 0:L.compare_branch)&&(0,T.jsx)("option",{value:null===L||void 0===L?void 0:L.compare_branch,children:null===L||void 0===L?void 0:L.compare_branch}),null===ce||void 0===ce?void 0:ce.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(Z.Z,{label:"Title",monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{title:e.target.value})}))},value:(null===L||void 0===L?void 0:L.title)||""})}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(b.Z,{label:"Description",monospace:!0,onChange:function(e){return Q((function(n){return K(K({},n),{},{body:e.target.value})}))},value:(null===L||void 0===L?void 0:L.body)||""})}),(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!g||!(null!==L&&void 0!==L&&L.title)||!(null!==L&&void 0!==L&&L.base_branch)||!(null!==L&&void 0!==L&&L.compare_branch),loading:he,onClick:function(){de({pull_request:K(K({},L),{},{remote_url:ne,repository:g})})},primary:!0,children:"Create new pull request"})})]})]}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsx)(q.Z,{visibleMapping:{0:!g},children:(0,T.jsxs)(G.Z,{noPaddingContent:!0,title:re?"Pull requests (".concat(null===ie||void 0===ie?void 0:ie.length,")"):"Pull requests",children:[!g&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(x.ZP,{muted:!0,children:"Please select a repository to view open pull requests."})}),g&&(0,T.jsxs)(T.Fragment,{children:[!re&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(p.Z,{inverted:!0})}),re&&le]})]})})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(f.ZP,{children:(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.PaginateArrowLeft,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:A.uuid})})]})]})},J=t(94629),$=t(78650),ee=t(70652),ne=t(97618),te=t(25976),re=te.default.div.withConfig({displayName:"indexstyle__SpacingStyle",componentId:"sc-el09vr-0"})(["margin-top:","px;"],.5*B.iI),oe=t(42122);function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?ie(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var se,ce=function(e){var n=e.branch,t=e.fetchBranch,r=e.modifiedFiles,o=e.setSelectedFilePath,i=e.showError,l=e.stagedFiles,s=e.untrackedFiles,v=(0,u.useRef)(null),Z=(0,u.useState)(""),g=Z[0],P=Z[1],_=(0,u.useState)({}),w=_[0],O=_[1],k=(0,u.useState)({}),M=k[0],I=k[1],S=(0,u.useMemo)((function(){return Object.keys(r).concat(Object.keys(s)).sort()}),[r,s]),H=(0,u.useMemo)((function(){return Object.keys(l||{})}),[l]),A=(0,u.useMemo)((function(){return H.length}),[H]),R=(0,u.useMemo)((function(){return Object.keys(w).length===(null===S||void 0===S?void 0:S.length)}),[w,S]),F=(0,u.useMemo)((function(){return Object.keys(M).length===(null===H||void 0===H?void 0:H.length)}),[M,H]),U=(0,u.useMemo)((function(){return{onErrorCallback:function(e,n){return i({errors:n,response:e})}}}),[i]),L=(0,u.useMemo)((function(){return{onSuccess:function(e){return(0,V.wD)(e,le({callback:function(){t(),O({})}},U))}}}),[t,U]),Q=(0,u.useMemo)((function(){return y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name)}),[n]),K=(0,a.Db)(Q,L),Y=(0,c.Z)(K,2),X=Y[0],J=Y[1].isLoading,$=(0,a.Db)(Q,L),te=(0,c.Z)($,2),ie=te[0],se=te[1].isLoading,ce=(0,a.Db)(Q,{onSuccess:function(e){return(0,V.wD)(e,le({callback:function(){t(),I({})}},U))}}),ue=(0,c.Z)(ce,2),ae=ue[0],de=ue[1].isLoading,he=(0,u.useCallback)((function(e,n,t,r,o){var i=(null===e||void 0===e?void 0:e.length)>=1;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(z.Z,{block:!0,noHoverUnderline:!0,onClick:function(){t(o?{}:r)},preventDefault:!0,children:(0,T.jsxs)(f.ZP,{alignItems:"center",flexDirection:"row",children:[(0,T.jsx)(ee.Z,{checked:i&&o,disabled:!i}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(x.ZP,{bold:!0,children:i&&o?"Unselect all":"Select all"})]})}),e.map((function(e){return(0,T.jsx)(re,{children:(0,T.jsx)(z.Z,{block:!0,noHoverUnderline:!0,onClick:function(){return t((function(n){var t=le({},n);return!(null!==t&&void 0!==t&&t[e])?t[e]=!0:delete t[e],t}))},preventDefault:!0,children:(0,T.jsxs)(f.ZP,{alignItems:"center",flexDirection:"row",children:[(0,T.jsx)(ee.Z,{checked:!(null===n||void 0===n||!n[e])}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,children:e})]})})},e)}))]})}),[]),fe=(0,u.useMemo)((function(){return(0,oe.Qr)(w)}),[w]),me=y.ZP.git_custom_branches.detail("with_logs",{_format:"with_logs"}),ve=me.data,je=me.mutate,pe=(0,u.useMemo)((function(){var e;return(null===ve||void 0===ve||null===(e=ve.git_custom_branch)||void 0===e?void 0:e.logs)||[]}),[ve]),xe=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){je(),t(),P("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),be=(0,c.Z)(xe,2),Ze=be[0],ge=be[1].isLoading,ye=(0,u.useMemo)((function(){return(0,T.jsx)(W.Z,{columnFlex:[1,1,1],columns:[{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:pe.map((function(e){var n=e.author,t=e.date,r=e.message;return[(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===n||void 0===n?void 0:n.name},"author"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:t},"date"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:r},"message")]})),uuid:"git-branch-logs"})}),[pe]);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)(ne.Z,{flex:1,flexDirection:"column",children:[(0,T.jsxs)(m.Z,{children:["Not staged ",(null===S||void 0===S?void 0:S.length)>=1&&"(".concat(null===S||void 0===S?void 0:S.length,")")]}),(0,T.jsx)(j.Z,{my:B.cd,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(j.Z,{mb:B.cd,children:(0,T.jsxs)(f.ZP,{flexDirection:"row",children:[(0,T.jsx)(d.ZP,{compact:!0,disabled:fe||de||se,loading:J,onClick:function(){X({git_custom_branch:{action_type:"add",files:Object.keys(w)}}).then((function(e){var n,t=e.data;null!==t&&void 0!==t&&t.git_custom_branch&&(null===v||void 0===v||null===(n=v.current)||void 0===n||n.focus())}))},primary:!0,children:"Add files"}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{compact:!0,disabled:fe||J||de,loading:se,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to undo all changes in the selected files?")&&ie({git_custom_branch:{action_type:"checkout",files:Object.keys(w)}})},children:"Checkout files"})]})}),he(S,w,O,le(le({},r),s),R)]}),(0,T.jsx)(j.Z,{mr:B.cd}),(0,T.jsxs)(ne.Z,{flex:1,flexDirection:"column",children:[(0,T.jsxs)(m.Z,{children:["Staged files ",(null===H||void 0===H?void 0:H.length)>=1&&"(".concat(null===H||void 0===H?void 0:H.length,")")]}),(0,T.jsx)(j.Z,{my:B.cd,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(j.Z,{mb:B.cd,children:(0,T.jsx)(f.ZP,{flexDirection:"row",children:(0,T.jsx)(d.ZP,{compact:!0,disabled:(0,oe.Qr)(M)||J||se,loading:de,onClick:function(){ae({git_custom_branch:{action_type:"reset",files:Object.keys(M)}})},secondary:!0,children:"Reset files"})})}),he(H,M,I,l,F)]})]})}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(m.Z,{children:"Commit"})}),(0,T.jsx)(j.Z,{mb:B.cd,children:(0,T.jsx)(q.Z,{children:(0,T.jsx)(G.Z,{noPaddingContent:!0,title:A>=1?"Staged files (".concat(A,")"):"No staged files",children:null===H||void 0===H?void 0:H.map((function(e){return(0,T.jsx)(j.Z,{my:1,px:B.cd,children:(0,T.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,T.jsx)(z.Z,{default:!0,monospace:!0,onClick:function(){return o((function(n){return n===e?null:e}))},warning:null===r||void 0===r?void 0:r[e],children:e}),(0,T.jsx)(j.Z,{mr:1}),(null===r||void 0===r?void 0:r[e])&&(0,T.jsx)(x.ZP,{warning:!0,children:"Modified after staging"})]})},e)}))})})}),(0,T.jsx)(b.Z,{label:"Commit message",monospace:!0,onChange:function(e){return P(e.target.value)},ref:v,value:g||""}),(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsxs)(d.ZP,{disabled:0===A||!((null===g||void 0===g?void 0:g.length)>=1),loading:ge,onClick:function(){Ze({git_custom_branch:{action_type:"commit",message:g}})},primary:!0,children:["Commit ",(0,N._6)("file",A,!0)," with message"]}),0===A&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(x.ZP,{danger:!0,small:!0,children:"Please stage at least 1 file before committing."})]})]})})]}),(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(q.Z,{children:(0,T.jsxs)(G.Z,{noPaddingContent:!0,title:"Logs",children:[!ve&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(p.Z,{inverted:!0})}),ve&&ye]})})}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsxs)(f.ZP,{children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.PaginateArrowLeft,{}),linkProps:{href:"/version-control?tab=".concat(E.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:E.uuid}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)(d.ZP,{afterIcon:(0,T.jsx)(C.PaginateArrowRight,{}),linkProps:fe?{href:"/version-control?tab=".concat(encodeURIComponent(D.uuid))}:null,noHoverUnderline:!0,primary:fe,sameColorAsText:!0,secondary:!fe,children:["Next: ",D.uuid]})]})]})]})},ue=t(23531),ae=t(12691),de=t.n(ae),he=t(34376),fe=t(63403),me=te.default.svg.withConfig({displayName:"BitbucketWithText__SVGStyle",componentId:"sc-wdje9z-0"})([""]),ve=function(e){var n=e.fill,t=e.opacity,r=e.size,o=void 0===r?fe.C:r,i=e.style,l=e.viewBox,s=void 0===l?"0 0 299 42":l;return(0,T.jsxs)(me,{fill:n,height:o,opacity:t,style:i,viewBox:s,width:o,children:[(0,T.jsx)("path",{d:"M63.3372 2.9978H79.5353C87.4335 2.9978 91.2488 6.77741 91.2488 12.8379C91.2488 17.3994 89.1068 20.2016 84.756 21.179C90.4455 22.0914 93.3237 25.1542 93.3237 30.4978C93.3237 36.4931 89.1737 40.6637 80.4724 40.6637H63.3372V2.9978ZM68.625 19.0939H78.799C83.8191 19.0939 85.894 16.8782 85.894 13.2289C85.894 9.57954 83.6852 7.82008 78.799 7.82008H68.625V19.0939ZM68.625 23.7206V35.4504H80.673C85.7601 35.4504 88.036 33.6909 88.036 29.9113C88.036 25.871 85.827 23.7206 80.5393 23.7206H68.625Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M101.958 0.977783C104.033 0.977783 105.506 2.21592 105.506 4.43157C105.506 6.58205 104.033 7.88536 101.958 7.88536C99.8833 7.88536 98.4106 6.6472 98.4106 4.43157C98.4106 2.21592 99.8833 0.977783 101.958 0.977783ZM99.3478 11.9907H104.435V40.6638H99.3478V11.9907Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M123.779 36.0376C124.984 36.0376 126.055 35.7769 126.992 35.6466V40.4037C126.121 40.6643 125.117 40.8599 123.578 40.8599C117.286 40.8599 114.207 37.2756 114.207 31.9321V16.5529H109.455V11.9912H114.207V5.93091H119.16V11.9912H126.992V16.5529H119.16V31.7367C119.093 34.2781 120.633 36.0376 123.779 36.0376Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M138.504 35.5806V40.5982H133.417V0H138.504V17.1386C140.378 13.359 143.926 11.4039 148.477 11.4039C156.309 11.4039 160.258 17.8554 160.258 26.3271C160.258 34.4076 156.108 41.25 147.875 41.25C143.524 41.25 140.244 39.3602 138.504 35.5806ZM147.072 16.0309C142.52 16.0309 138.504 18.8329 138.504 25.2191V27.5001C138.504 33.8863 142.186 36.6883 146.536 36.6883C152.226 36.6883 155.171 33.0392 155.171 26.3921C155.171 19.4194 152.36 16.0309 147.072 16.0309Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M165.546 11.991H170.633V29.3252C170.633 34.4733 172.775 36.7541 177.594 36.7541C182.279 36.7541 185.559 33.6913 185.559 27.8915V11.991H190.647V40.664H185.559V35.972C183.685 39.3607 180.204 41.2505 176.255 41.2505C169.495 41.2505 165.613 36.6888 165.613 28.8039V11.991H165.546Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M219.027 39.8814C217.287 40.7938 214.542 41.1847 211.864 41.1847C201.355 41.1847 196.469 34.9941 196.469 26.1967C196.469 17.5296 201.355 11.3389 211.864 11.3389C214.542 11.3389 216.55 11.6647 218.892 12.7072V17.2689C217.019 16.4218 215.011 15.9006 212.266 15.9006C204.636 15.9006 201.49 20.5924 201.49 26.1967C201.49 31.8009 204.702 36.4929 212.401 36.4929C215.412 36.4929 217.287 36.1018 219.092 35.4502V39.8814H219.027Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M224.783 40.6635V0H229.87V25.4147L242.52 11.9904H249.147L235.29 26.0664L249.681 40.6635H242.789L229.802 27.2392V40.6635H224.783Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M266.483 41.2506C255.437 41.2506 250.619 35.0599 250.619 26.2624C250.619 17.5954 255.572 11.4045 264.541 11.4045C273.644 11.4045 277.259 17.5302 277.259 26.2624V28.4781H255.773C256.51 33.3655 259.722 36.4935 266.684 36.4935C270.096 36.4935 272.974 35.8418 275.652 34.9296V39.4911C273.175 40.7944 269.494 41.2506 266.483 41.2506ZM255.706 24.2423H272.172C271.904 18.8987 269.427 15.9012 264.34 15.9012C258.919 15.9012 256.242 19.2897 255.706 24.2423Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M294.929 36.0376C296.134 36.0376 297.205 35.7769 298.142 35.6466V40.4037C297.272 40.6643 296.267 40.8599 294.728 40.8599C288.437 40.8599 285.359 37.2756 285.359 31.9321V16.5529H280.606V11.9912H285.359V5.93091H290.311V11.9912H298.142V16.5529H290.311V31.7367C290.245 34.2781 291.784 36.0376 294.929 36.0376Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M1.36497 4.1062C0.556341 4.1062 -0.117513 4.82301 0.0172582 5.605L5.74501 39.1654C5.87979 40.0127 6.62103 40.6642 7.56442 40.6642H34.9903C35.6641 40.6642 36.2032 40.208 36.338 39.5565L42.0658 5.605C42.2006 4.82301 41.594 4.1062 40.718 4.1062H1.36497ZM25.4889 28.3479H16.7288L14.3704 16.3573H27.6453L25.4889 28.3479Z",fill:n||"white"}),(0,T.jsx)("path",{d:"M40.2462 16.3572H27.5775L25.4886 28.3478H16.7286L6.3512 40.2079C6.3512 40.2079 6.82289 40.6641 7.56413 40.6641H34.99C35.6639 40.6641 36.2029 40.2079 36.3377 39.5562L40.2462 16.3572Z",fill:"url(#paint0_linear_13549_1163)"}),(0,T.jsx)("defs",{children:(0,T.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"paint0_linear_13549_1163",x1:"43.1513",x2:"22.7826",y1:"19.7256",y2:"36.1667",children:[(0,T.jsx)("stop",{offset:"0.176",stopColor:"#0052CC"}),(0,T.jsx)("stop",{offset:"1",stopColor:"#2684FF"})]})})]})},je=t(91769),pe=t(69419),xe=t(53808),be=(se={},(0,s.Z)(se,je.h.AZURE_DEVOPS,C.DevOpsWithText),(0,s.Z)(se,je.h.BITBUCKET,ve),(0,s.Z)(se,je.h.GITHUB,C.GitHubWithTextIcon),(0,s.Z)(se,je.h.GITLAB,C.GitLabWithTextIcon),se);function Ze(e){var n=e.isLoadingCreateOauth,t=e.oauth,r=e.provider,o=e.showError,i=(0,he.useRouter)(),l=(0,a.Db)(y.ZP.oauths.useUpdate(r),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){return window.location.href=window.location.href.split("?")[0]},onErrorCallback:function(e,n){return o({errors:n,response:e})}})}}),s=(0,c.Z)(l,2),u=s[0],h=s[1].isLoading,m=be[r];return(0,T.jsxs)(f.ZP,{justifyContent:"space-between",children:[(0,T.jsx)(ne.Z,{children:(0,T.jsx)(m,{size:12*B.iI})}),(0,T.jsx)(ne.Z,{alignItems:"center",children:null!==t&&void 0!==t&&t.authenticated?(0,T.jsx)(d.ZP,{loading:h,onClick:function(){return u({oauth:{action_type:"reset"}})},warning:!0,children:"Reset"}):(0,T.jsx)(d.ZP,{loading:n,onClick:function(){var e=null===t||void 0===t?void 0:t.url,n=(0,pe.iV)(e).state;(0,xe.t8)(n,(null===t||void 0===t?void 0:t.redirect_query_params)||{}),i.push(e)},primary:!0,children:"Authenticate"})})]})}var ge=function(e){var n=e.branch,t=e.isLoadingCreateOauth,r=e.showError,o=y.ZP.oauths.list({type:"git",redirect_uri:encodeURIComponent(window.location.href)}),i=o.data,l=(o.mutate,y.ZP.oauths.detail(je.h.GITHUB,{redirect_uri:encodeURIComponent(window.location.href)})),s=l.data,a=(l.mutate,(0,u.useMemo)((function(){return(null===s||void 0===s?void 0:s.oauth)||{}}),[s])),f=(0,u.useMemo)((function(){return null===n||void 0===n?void 0:n.access_token_exists}),[n]),v=(0,u.useMemo)((function(){var e,n=(null===i||void 0===i||null===(e=i.oauths)||void 0===e?void 0:e.reduce((function(e,n){return e[n.provider]=n,e}),{}))||{};return a&&(n[je.h.GITHUB]=a),n}),[i,a]),p=(0,u.useMemo)((function(){return Object.values(v).some((function(e){return null===e||void 0===e?void 0:e.authenticated}))}),[v]);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(m.Z,{children:"Authentication"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[f&&!p&&(0,T.jsxs)(j.Z,{mb:2,children:[(0,T.jsx)(d.ZP,{disabled:!0,children:"Using access token from Git Settings"}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(x.ZP,{muted:!0,children:"Some features may not work unless you authenticate with a Git client."})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.Mq,children:(0,T.jsx)(x.ZP,{muted:!0,children:"Authenticating with the apps below will allow you to easily pull, push, and create pull requests."})}),(0,T.jsxs)(j.Z,{mb:B.Mq,style:{maxWidth:"600px"},children:[(0,T.jsx)(h.Z,{muted:!0}),Object.entries(v||{}).map((function(e){var n=(0,c.Z)(e,2),o=n[0],i=n[1];return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(Ze,{isLoadingCreateOauth:t,oauth:i,provider:o,showError:r},o),(0,T.jsx)(h.Z,{muted:!0})]})}))]})]})]})]})},ye=t(77417);var Ce=function(e){var n,t,r,o,i=e.actionRemoteName,l=e.branch,s=e.fetchBranch,b=e.loading,g=e.remotes,_=e.setActionRemoteName,O=e.showError,M=(0,he.useRouter)(),I=(0,ye.Z)().project,S=(0,u.useRef)(null),H=(0,u.useState)(null),A=H[0],D=H[1],R=(0,u.useState)(null),F=R[0],U=R[1],L=(0,u.useState)(null),Q=L[0],K=L[1],Y=(0,u.useState)(null),X=Y[0],J=Y[1],$=(0,u.useState)(!1),ee=$[0],te=$[1],re=(0,u.useState)(null),oe=re[0],ie=re[1],le=(0,u.useState)(""),se=le[0],ce=le[1],ue=(0,u.useState)(""),ae=ue[0],fe=ue[1],me=(0,u.useState)(null),ve=me[0],xe=me[1],be=(0,u.useMemo)((function(){return!(null===l||void 0===l||!l.name)}),[l]);(0,u.useEffect)((function(){var e,n;!ve&&(null!==l&&void 0!==l&&null!==(e=l.sync_config)&&void 0!==e&&e.repo_path||null!==I&&void 0!==I&&I.repo_path)&&xe((null===l||void 0===l||null===(n=l.sync_config)||void 0===n?void 0:n.repo_path)||(null===I||void 0===I?void 0:I.repo_path))}),[l,I,ve]);var Ze=(0,u.useMemo)((function(){var e,n;return null===g||void 0===g||null===(e=g.find((function(e){return e.name===i})))||void 0===e||null===(n=e.refs)||void 0===n?void 0:n.map((function(e){var n=e.name.split("/");return{name:n[n.length-1]}}))}),[i,g]),Ce=(0,a.Db)(y.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){s(),te(!1)},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),Pe=(0,c.Z)(Ce,2),_e=Pe[0],we=Pe[1].isLoading,Oe=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===l||void 0===l?void 0:l.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(e){var n=e.git_custom_branch,t=n.error,r=n.progress;t?(U(t),J(null)):(s(),D(null),U(null),K(null),J(r))},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),ke=(0,c.Z)(Oe,2),Me=ke[0],Ie=ke[1].isLoading,Se=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===l||void 0===l?void 0:l.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){s(),ce(""),fe("")},onErrorCallback:function(e,n){return O({errors:n,response:e})}})}}),He=(0,c.Z)(Se,2),Ee=He[0],Ae=He[1].isLoading,De=(0,a.Db)(y.ZP.git_custom_branches.useUpdate(null===l||void 0===l?void 0:l.name),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){s(),ie(null)},onErrorCallback:function(e,n){ie(null),O({errors:n,response:e})}})}}),Re=(0,c.Z)(De,2),Fe=Re[0],Be=Re[1].isLoading,Ne=(0,a.Db)(y.ZP.oauths.useCreate(),{onSuccess:function(e){return(0,V.wD)(e,{callback:function(){return window.location.href="".concat(M.basePath,"/version-control")},onErrorCallback:function(e,n){O({errors:n,response:e})}})}}),Ve=(0,c.Z)(Ne,2),Te=Ve[0],Ue=Ve[1].isLoading,Le=(0,pe.iV)()||{},qe=Le.access_token,Ge=Le.provider,ze=Le.refresh_token,We=Le.expires_in;(0,u.useEffect)((function(){qe&&Te({oauth:{expires_in:We,provider:Ge||je.h.GITHUB,refresh_token:ze,token:qe}})}),[qe,Te,We,Ge,ze]);var Qe=(0,u.useMemo)((function(){return null===g||void 0===g?void 0:g.map((function(e){var n=e.name,t=e.refs,r=e.urls;return(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsxs)(f.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,T.jsxs)(ne.Z,{alignItems:"center",children:[(0,T.jsx)(x.ZP,{bold:!0,children:n}),(0,T.jsx)(j.Z,{mx:1,children:(0,T.jsx)(C.ChevronRight,{muted:!0})}),null===r||void 0===r?void 0:r.map((function(e){return(0,T.jsx)(j.Z,{mr:1,children:(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:e})},e)}))]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{compact:!0,disabled:Be&&oe!==n,iconOnly:!0,loading:Be&&oe===n,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to remove remote ".concat(n,"?"))&&(ie(n),Fe({git_custom_branch:{action_type:"remove_remote",action_payload:{name:n}}}).then((function(){i===n&&_(null)})))},small:!0,title:"Remote remote ".concat(n),children:(0,T.jsx)(C.Trash,{})})]})}),(0,T.jsx)(q.Z,{children:(0,T.jsxs)(G.Z,{noPaddingContent:!0,smallTitle:!0,title:"Refs (".concat(null===t||void 0===t?void 0:t.length,")"),children:[0===(null===t||void 0===t?void 0:t.length)&&(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(x.ZP,{muted:!0,children:"This remote has no refs."})}),(null===t||void 0===t?void 0:t.length)>=1&&(0,T.jsx)(W.Z,{columnFlex:[1,1,1],columns:[{uuid:"Ref"},{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:t.map((function(e){var n,t=e.commit,r=e.name;return[(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:r},"ref-name"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===t||void 0===t||null===(n=t.author)||void 0===n?void 0:n.name},"author"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===t||void 0===t?void 0:t.date},"date"),(0,T.jsx)(x.ZP,{default:!0,monospace:!0,small:!0,children:null===t||void 0===t?void 0:t.message},"message")]})),uuid:"git-branch-remotes-refs"})]})}),(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsx)(h.Z,{light:!0})})]},n)}))}),[Be,oe,g,Fe]);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(m.Z,{children:"Setup"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(j.Z,{mb:1,children:[(0,T.jsx)(x.ZP,{bold:!0,large:!0,children:be?"Git init directory":"Initialize Git directory"}),!be&&(0,T.jsxs)(x.ZP,{muted:!0,children:["Enter the directory you want to initialize git in.",(0,T.jsx)("br",{}),"The current project directoy is filled in for you. If you want to use that, click the save button."]}),be&&(0,T.jsxs)(x.ZP,{muted:!0,children:["If the directory below is blank, then the current working directory will be used to initialize git.",(0,T.jsx)("br",{}),"If git hasn\u2019t been initialized in the directory below, Mage will automatically run git init for you."]})]}),(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(Z.Z,{disabled:be&&!ee,fullWidth:!0,label:"Git directory",maxWidth:400,monospace:!0,onChange:function(e){return xe(e.target.value)},ref:S,value:ve||""}),(0,T.jsx)(j.Z,{mr:1}),(!be||ee)&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(d.ZP,{compact:!0,disabled:!be&&!ve,loading:we,onClick:function(){_e({sync:{repo_path:ve}})},primary:!0,small:!0,children:"Save"}),be&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(z.Z,{onClick:function(){return te(!1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Cancel"})]})]}),be&&!ee&&(0,T.jsx)(z.Z,{onClick:function(){te(!0),setTimeout((function(){var e;return null===S||void 0===S||null===(e=S.current)||void 0===e?void 0:e.focus()}),1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Edit"})]})]})]}),(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(ge,{branch:l,isLoadingCreateOauth:Ue,showError:O})}),be&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsxs)(m.Z,{children:["Remotes",!b&&g?" (".concat(null===g||void 0===g?void 0:g.length,")"):""]}),b&&(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsx)(p.Z,{inverted:!0})}),!b&&Qe,(0,T.jsx)(j.Z,{mt:B.Mq,children:(0,T.jsxs)(f.ZP,{alignItems:"flex-start",children:[(0,T.jsx)(Z.Z,{label:"New remote name",monospace:!0,onChange:function(e){var n;return ce(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:se||""}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsxs)(f.ZP,{flexDirection:"column",children:[(0,T.jsx)(Z.Z,{label:"Remote URL",monospace:!0,onChange:function(e){var n;return fe(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:ae||""}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["Use the https URL if you",(0,T.jsx)("br",{}),"authenticated with GitHub above."]})})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Add,{size:2*B.iI}),disabled:!se||!ae,loading:Ae,onClick:function(){Ee({git_custom_branch:{action_type:"add_remote",action_payload:{name:se,url:ae}}})},primary:!0,children:"Create new remote"})]})})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(m.Z,{children:"Actions"}),(0,T.jsxs)(j.Z,{mt:B.Mq,children:[(0,T.jsxs)(j.Z,{mb:B.Mq,children:[(0,T.jsx)(j.Z,{mb:1,children:(0,T.jsx)(x.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(null===l||void 0===l?void 0:l.name)&&(0,T.jsxs)(f.ZP,{alignItems:"center",children:[(0,T.jsx)(x.ZP,{monospace:!0,children:null===l||void 0===l?void 0:l.name}),(0,T.jsx)(j.Z,{mr:B.cd}),(0,T.jsx)(de(),{href:"/version-control?tab=".concat(E.uuid),passHref:!0,children:(0,T.jsx)(z.Z,{small:!0,children:"Switch branch"})})]})]}),(0,T.jsxs)(f.ZP,{children:[(0,T.jsxs)(v.Z,{onChange:function(e){return K(e.target.value)},placeholder:"Action",value:Q||"",children:[(0,T.jsx)("option",{value:w,children:(0,N.vg)(w)}),(0,T.jsx)("option",{value:k,children:(0,N.vg)(k)}),(0,T.jsx)("option",{value:"reset",children:(0,N.vg)("reset --hard")}),(0,T.jsx)("option",{value:P,children:(0,N.vg)(P)})]}),(0,T.jsx)(j.Z,{mr:1}),(0,T.jsx)(v.Z,{beforeIcon:(0,T.jsx)(C.MultiShare,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return _(e.target.value)},placeholder:"Remote",value:i||"",children:null===g||void 0===g?void 0:g.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))}),![w,P].includes(Q)&&(0,T.jsx)(j.Z,{ml:1,children:(0,T.jsxs)(v.Z,{beforeIcon:(0,T.jsx)(C.Branch,{}),beforeIconSize:1.5*B.iI,monospace:!0,onChange:function(e){return D(e.target.value)},value:A||"",children:[(0,T.jsx)("option",{value:"",children:"All branches"}),null===Ze||void 0===Ze?void 0:Ze.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))]})})]}),P===Q&&(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["Cloning a branch will copy all the files and folders from the remote repository and put them into the Git directory configured above:",(0,T.jsx)("br",{}),(0,T.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null===l||void 0===l||null===(n=l.sync_config)||void 0===n?void 0:n.repo_path}),"."]}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsx)(x.ZP,{muted:!0,small:!0,children:"Cloning won\u2019t automatically create a folder that is named after the remote repository."})}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["For example, if you have a file named ",(0,T.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"magic.py"})," in a remote repository named ",(0,T.jsx)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"project_romeo"}),(0,T.jsx)("br",{}),"then that file will be cloned here ",(0,T.jsxs)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:[null===l||void 0===l||null===(t=l.sync_config)||void 0===t?void 0:t.repo_path,"/magic.py"]}),(0,T.jsx)("br",{}),"as opposed to ",(0,T.jsxs)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:[null===l||void 0===l||null===(r=l.sync_config)||void 0===r?void 0:r.repo_path,"/project_romeo/magic.py"]}),"."]})}),(0,T.jsx)(j.Z,{mt:1,children:(0,T.jsxs)(x.ZP,{muted:!0,small:!0,children:["If you want to clone the content of a remote repository into a folder named after the remote repository, then change the Git init directoy above to",(0,T.jsx)("br",{}),(0,T.jsxs)(x.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:[null===l||void 0===l||null===(o=l.sync_config)||void 0===o?void 0:o.repo_path,"/",(0,T.jsx)(x.ZP,{inline:!0,monospace:!0,small:!0,children:"[remote repository name]"})]})]})})]}),(0,T.jsxs)(j.Z,{mt:B.cd,children:[(0,T.jsx)(d.ZP,{beforeIcon:(0,T.jsx)(C.Lightning,{size:2*B.iI}),disabled:!Q||!i,loading:Ie,onClick:function(){J(null),(Q!==P||"undefined"!==typeof location&&window.confirm("Are you sure you want to clone remote ".concat(i,"? This will ")+"overwrite all your local changes and may reset any settings you may have configured for your local Git repo. This action cannot be undone."))&&Me({git_custom_branch:{action_payload:{branch:A,remote:i},action_type:Q}})},primary:!0,children:Q?(0,N.vg)(Q):"Execute action"}),(X||F)&&(0,T.jsx)(j.Z,{mt:B.cd,children:(0,T.jsx)(x.ZP,{danger:!!F,default:!!X,monospace:!0,preWrap:!0,children:X||F})})]})]})]}),(0,T.jsxs)(j.Z,{mb:B.HN,children:[(0,T.jsx)(j.Z,{mb:B.HN,children:(0,T.jsx)(h.Z,{light:!0})}),(0,T.jsx)(f.ZP,{children:(0,T.jsxs)(d.ZP,{afterIcon:(0,T.jsx)(C.PaginateArrowRight,{}),linkProps:{href:"/version-control?tab=".concat(E.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",E.uuid]})})]})]})]})},Pe=t(93528),_e=t(98464),we=t(46684),Oe=t(53005),ke=t(15610),Me=(t(17717),t(74401)),Ie=t(86735);function Se(e,n){var t=(0,Me.a9)(e),r=Object.keys(n)||[];return null===r||void 0===r?void 0:r.find((function(e){return null===t||void 0===t?void 0:t.endsWith(e)}))}var He=t(23780);function Ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function Ae(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ee(Object(t),!0).forEach((function(n){(0,s.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ee(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var De="version_control/index",Re=30*B.iI;var Fe=function(){var e=(0,u.useRef)(null),n=(0,u.useRef)(null),t=(0,He.VI)(null,{},[],{uuid:"VersionControlPage"}),r=(0,c.Z)(t,1)[0],o=(0,u.useState)(!0),i=o[0],l=o[1],d=(0,u.useState)(Re),f=d[0],m=d[1],b="layout_before_".concat(De,"_width"),Z=(0,xe.U2)(b,Re),C=(0,u.useState)(Z),P=C[0],_=C[1],w=(0,u.useState)({}),O=w[0],k=w[1],M=(0,u.useState)(null),I=M[0],N=M[1],V=(0,u.useState)(null),q=V[0],G=V[1],z=(0,u.useState)(F[0]),W=z[0],Q=z[1],K=(0,u.useState)({"All projects":{uuid:"All projects"},"Git directory":{uuid:"Git directory"}}),Y=K[0],ee=K[1],ne=(0,pe.iV)();(0,u.useEffect)((function(){null!==ne&&void 0!==ne&&ne.tab&&Q(F.find((function(e){return e.uuid===(null===ne||void 0===ne?void 0:ne.tab)})))}),[ne]);var te=y.ZP.git_custom_branches.list({include_remote_branches:1}),re=te.data,ie=te.mutate,le=(0,u.useMemo)((function(){return null===re||void 0===re?void 0:re.git_custom_branches}),[re]);(0,u.useEffect)((function(){var e,n;!I&&(null===le||void 0===le?void 0:le.length)>=1&&null!==(e=le[0])&&void 0!==e&&e.name&&N(null===(n=le[0])||void 0===n?void 0:n.name)}),[I,le]);var se=y.ZP.git_custom_branches.detail("current",{_format:"with_files"}),ae=se.data,de=se.mutate,he=(0,u.useMemo)((function(){return(null===ae||void 0===ae?void 0:ae.git_custom_branch)||{}}),[ae]),fe=(0,u.useMemo)((function(){return(null===he||void 0===he?void 0:he.files)||[]}),[he]),me=y.ZP.git_custom_branches.detail("with_remotes",{_format:"with_remotes"}),ve=me.data,je=me.mutate,be=(0,u.useMemo)((function(){return null===ve||void 0===ve?void 0:ve.git_custom_branch}),[ve]),Ze=(0,u.useMemo)((function(){return(null===be||void 0===be?void 0:be.remotes)||[]}),[be]),ge=(0,u.useState)(null),ye=ge[0],Me=ge[1],Ee=(0,u.useCallback)((function(e){(0,xe.t8)(S,e),Me(e)}),[]);(0,u.useEffect)((function(){var e=(0,xe.U2)(S,null);if(ve&&e){var n=null===Ze||void 0===Ze?void 0:Ze.find((function(n){return n.name===e}));Ee(n?null===n||void 0===n?void 0:n.name:null)}}),[ve,Ze,Ee]);var Fe=(0,u.useState)((0,xe.U2)(H,"")),Be=Fe[0],Ne=Fe[1],Ve=(0,u.useCallback)((function(e){(0,xe.t8)(H,e),Ne(e)}),[]),Te=(0,u.useMemo)((function(){return(0,Ie.Tw)(Ze.reduce((function(e,n){var t;return e.concat((null===n||void 0===n||null===(t=n.repository_names)||void 0===t?void 0:t.map((function(e){var t;return{name:e,url:null===n||void 0===n||null===(t=n.urls)||void 0===t?void 0:t[0]}})))||[])}),[]),(function(e){return e.name}))}),[Ze]);(0,u.useEffect)((function(){var e=(0,xe.U2)(H,null);if(ve&&e){var n=null===Te||void 0===Te?void 0:Te.find((function(n){return n.name===e}));Ve(n?null===n||void 0===n?void 0:n.name:null)}}),[ve,Te,Ve]);var Ue=y.ZP.git_files.detail(q?encodeURIComponent(q):null,{base_branch:I}),Le=Ue.data,qe=Ue.mutate,Ge=(0,u.useMemo)((function(){return null===Le||void 0===Le?void 0:Le.git_file}),[Le]),ze=(0,_e.Z)(Ge);(0,u.useEffect)((function(){if(Ge!==ze){var e,n=null===he||void 0===he||null===(e=he.files_absolute_path)||void 0===e?void 0:e[q];k((function(e){var t;return Ae(Ae({},e),{},(0,s.Z)({},n,Ae(Ae({},Ge),{},{fullPath:n,relativePath:q,repoPath:null===he||void 0===he||null===(t=he.sync_config)||void 0===t?void 0:t.repo_path})))}))}}),[he,Ge,ze]),(0,u.useEffect)((function(){I&&qe()}),[I,qe]),(0,u.useEffect)((function(){null!==Le&&void 0!==Le&&Le.error&&r({errors:null===Le||void 0===Le?void 0:Le.error,response:Le})}),[Le,r]);var We=(0,u.useMemo)((function(){var e,n,t;return{modifiedFiles:null===he||void 0===he||null===(e=he.modified_files)||void 0===e?void 0:e.reduce((function(e,n){return Ae(Ae({},e),{},(0,s.Z)({},n,!0))}),{}),stagedFiles:null===he||void 0===he||null===(n=he.staged_files)||void 0===n?void 0:n.reduce((function(e,n){return Ae(Ae({},e),{},(0,s.Z)({},n,!0))}),{}),untrackedFiles:null===he||void 0===he||null===(t=he.untracked_files)||void 0===t?void 0:t.reduce((function(e,n){return Ae(Ae({},e),{},(0,s.Z)({},n,!0))}),{})}}),[he]),Qe=We.modifiedFiles,Ke=void 0===Qe?{}:Qe,Ye=We.stagedFiles,Xe=void 0===Ye?{}:Ye,Je=We.untrackedFiles,$e=void 0===Je?{}:Je;(0,u.useEffect)((function(){q&&(0,oe.Qr)(Ke)&&(0,oe.Qr)(Xe)&&(0,oe.Qr)($e)&&G(null)}),[Ke,q,Xe,$e]);var en=(0,u.useMemo)((function(){return(null===fe||void 0===fe?void 0:fe.length)>=1?(0,T.jsx)($.Z,{allowEmptyFolders:!0,disableContextMenu:!0,fetchFiles:de,files:fe,isFileDisabled:function(){return!1},onClickFile:function(e,t){G((function(t){if(!t||t!==e){var r;if(!I)null===n||void 0===n||null===(r=n.current)||void 0===r||r.focus();return e}return null})),qe()},ref:e,renderAfterContent:function(e){var n,t,r=e.children,o=(null===r||void 0===r?void 0:r.length)>=1,i=(0,Oe.a9)(e);o&&(i="".concat(i,"/"));var l={};return Se(e,Ke)?(n="M",t="Modified",l.warning=!0):Se(e,$e)?(n="U",t="Untracked",l.danger=!0):Se(e,Xe)&&(n="S",t="Staged",l.success=!0),o&&!n?null:(0,T.jsx)(j.Z,{mx:1,children:(0,T.jsx)(g.Z,{appearBefore:!0,label:t,widthFitContent:!0,children:(0,T.jsx)(x.ZP,Ae(Ae({},l),{},{monospace:!0,rightAligned:!0,small:!0,children:n}))})})},useRootFolder:!0,uuid:"pages/VersionControl"}):(0,T.jsx)(j.Z,{p:B.cd,children:(0,T.jsx)(x.ZP,{monospace:!0,muted:!0,children:"No files modified"})})}),[I,de,qe,e,fe,Ke,n,G,Xe,$e]),nn=((0,u.useMemo)((function(){return!Le||!Ge||q&&(null===Ge||void 0===Ge?void 0:Ge.filename)!==q}),[Le,Ge,q]),(0,u.useMemo)((function(){return ae&&null!==he&&void 0!==he&&he.name?F:F.slice(0,1)}),[he,ae])),tn=(0,u.useMemo)((function(){return(0,T.jsxs)("div",{style:{marginTop:5},children:[(0,T.jsx)(L.Z,{onClickTab:function(e){var n=e.uuid;(0,ke.u)({tab:n})},selectedTabUUID:null===W||void 0===W?void 0:W.uuid,tabs:nn,underlineStyle:!0}),(0,T.jsx)(h.Z,{light:!0})]})}),[W,nn]),rn=(0,u.useMemo)((function(){return(0,T.jsx)(Ce,{actionRemoteName:ye,branch:he,fetchBranch:function(){de(),je()},loading:!ve,remotes:Ze,setActionRemoteName:Ee,showError:r})}),[ye,he,ve,de,je,Ze,Ee,r]),on=(0,u.useMemo)((function(){return(0,T.jsx)(U,{actionRemoteName:ye,branch:he,branches:le,fetchBranch:de,fetchBranches:ie,remotes:Ze,setActionRemoteName:Ee,showError:r})}),[ye,he,le,de,ie,Ze,Ee,r]),ln=(0,u.useMemo)((function(){return(0,T.jsx)(ce,{branch:he,fetchBranch:de,modifiedFiles:Ke,setSelectedFilePath:G,showError:r,stagedFiles:Xe,untrackedFiles:$e})}),[he,de,Ke,G,r,Xe,$e]),sn=(0,u.useMemo)((function(){return(0,T.jsx)(X,{actionRemoteName:ye,branch:he,branches:le,fetchBranch:de,loading:!ve,modifiedFiles:Ke,remotes:Ze,repositories:Te,repositoryName:Be,setActionRemoteName:Ee,setRepositoryName:Ve,showError:r,stagedFiles:Xe})}),[ye,he,le,ve,de,Ke,Ze,Te,Be,Ee,Ve,r,Xe]),cn=(0,u.useMemo)((function(){return(0,T.jsx)(L.Z,{allowScroll:!0,onClickTab:function(e){ee((function(n){return Ae(Ae({},(0,oe.gR)(n,[null===e||void 0===e?void 0:e.uuid])),null!==n&&void 0!==n&&n[null===e||void 0===e?void 0:e.uuid]?{}:(0,s.Z)({},null===e||void 0===e?void 0:e.uuid,e))}))},selectedTabUUIDs:Y,tabs:[{uuid:"All projects"},{uuid:"Git directory"}],underlineStyle:!0})}),[Y]),un=(0,u.useCallback)((function(){qe()}),[qe]),an=(0,u.useCallback)((function(){de()}),[de]),dn=(0,u.useMemo)((function(){var e;if(q)return null===he||void 0===he||null===(e=he.files_absolute_path)||void 0===e?void 0:e[q]}),[he,q]),hn=(0,u.useCallback)((function(e){k((function(n){return(0,oe.gR)(n,[e])}))}),[]),fn=(0,Pe.ZP)({codeEditorMaximumHeightOffset:2*we.Mz+10,onClickTabClose:hn,onCreateFile:an,onUpdateFileSuccess:un,originalContent:O,selectedFilePath:dn,showHiddenFilesSetting:!0,uuid:"pages/VersionControlPage"}),mn=fn.browser,vn=fn.controller,jn=fn.filePaths,pn=(fn.menu,fn.selectedFilePath),xn=fn.tabs,bn=(0,a.Db)((function(e){var n=e.filePath,t=e.query;return y.ZP.git_files.detailAsync(encodeURIComponent(n),t)})),Zn=(0,c.Z)(bn,2),gn=Zn[0];Zn[1].isLoading,(0,u.useEffect)((function(){pn&&gn({filePath:pn,query:{base_branch:I,derive:!0}}).then((function(e){return k((function(n){var t;return Ae(Ae({},n),{},(0,s.Z)({},pn,null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.git_file))}))}))}),[pn]),(0,u.useEffect)((function(){(null===jn||void 0===jn?void 0:jn.length)>=1&&l(!1)}),[jn]);var yn=(0,u.useMemo)((function(){var e=[];return"All projects"in Y&&e.push([{render:function(e){var n=e.columnWidth;return(0,T.jsx)("div",{style:{width:"".concat(n,"px")},children:mn})}}]),"Git directory"in Y&&e.push([{render:function(){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(j.Z,{p:1,children:(0,T.jsx)(v.Z,{compact:!0,label:"Base branch",onChange:function(e){return N(e.target.value)},ref:n,small:!0,value:I||"",children:null===le||void 0===le?void 0:le.map((function(e){var n=e.name;return(0,T.jsx)("option",{value:n,children:n},n)}))})}),en]})}}]),(0,T.jsx)(ue.Z,{columnsOfItems:e,fullHeight:!0,heightOffset:2*we.Mz,uuid:"version-control-all-modified-files",width:P})}),[I,le,mn,P,en,Y]);return(0,T.jsx)(J.Z,{after:vn,afterHeader:xn,afterHidden:i,afterWidth:f,before:yn,beforeHeader:cn,beforeWidth:P,mainContainerHeader:tn,setAfterHidden:l,setAfterWidth:m,setBeforeWidth:_,title:"Version control",uuid:De,children:(0,T.jsxs)(j.Z,{p:B.cd,children:[!ae&&(0,T.jsx)(p.Z,{inverted:!0}),ae&&(0,T.jsxs)(T.Fragment,{children:[R.uuid===(null===W||void 0===W?void 0:W.uuid)&&rn,E.uuid===(null===W||void 0===W?void 0:W.uuid)&&on,A.uuid===(null===W||void 0===W?void 0:W.uuid)&&ln,D.uuid===(null===W||void 0===W?void 0:W.uuid)&&sn]})]})})};function Be(){return(0,T.jsx)(Fe,{})}Be.getInitialProps=(0,r.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)})));var Ne=(0,l.Z)(Be)},75302:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/version-control",function(){return t(37520)}])},80022:function(e,n,t){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}t.d(n,{Z:function(){return r}})},15544:function(e,n,t){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}t.d(n,{Z:function(){return r}})},13692:function(e,n,t){"use strict";t.d(n,{Z:function(){return o}});var r=t(61049);function o(e,n){if("function"!==typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),n&&(0,r.Z)(e,n)}},93189:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var r=t(12539),o=t(80022);function i(e,n){if(n&&("object"===r(n)||"function"===typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return(0,o.Z)(e)}}},function(e){e.O(0,[1557,9774,2888,179],(function(){return n=75302,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
@@ -1 +0,0 @@
1
- self.__BUILD_MANIFEST=function(s,e,i,a,t,c,n,p,l,g,u,r,o,f,k,b,d,h,j,m,w,_,v,y,I,B,F,A,D,E,L){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":["static/chunks/pages/index-4e12783b064c1cfe.js"],"/404":["static/chunks/pages/404-8ecd93274c427b76.js"],"/_error":["static/chunks/pages/_error-e989623bffcbf724.js"],"/block-layout":[l,a,t,g,o,u,f,m,"static/chunks/pages/block-layout-14f952f66964022f.js"],"/compute":[s,v,"static/chunks/pages/compute-010d9ac728f8a517.js"],"/files":[s,"static/chunks/pages/files-98df0674eac4ec84.js"],"/global-data-products":[s,c,k,y,"static/chunks/pages/global-data-products-78e8e88f2a757a18.js"],"/global-data-products/[...slug]":[s,c,k,y,"static/chunks/pages/global-data-products/[...slug]-591abd392dc50ed4.js"],"/global-hooks":[s,b,"static/chunks/pages/global-hooks-34966cfd2d89c366.js"],"/global-hooks/[...slug]":[s,b,"static/chunks/pages/global-hooks/[...slug]-fbc51d79d3196fa2.js"],"/manage":[s,n,d,"static/chunks/pages/manage-852d403c7bda21b3.js"],"/manage/files":[s,n,"static/chunks/pages/manage/files-f15a685682b1037b.js"],"/manage/settings":[s,n,"static/chunks/pages/manage/settings-52a597d0c674907a.js"],"/manage/users":[s,n,"static/chunks/pages/manage/users-b2896118903236c5.js"],"/manage/users/new":[s,n,"static/chunks/pages/manage/users/new-d0a403e8920104d2.js"],"/manage/users/[user]":[s,n,"static/chunks/pages/manage/users/[user]-8bbfa0c19b5e4cb3.js"],"/oauth":[s,"static/chunks/pages/oauth-30e34ee15d410331.js"],"/overview":[l,a,t,g,o,s,r,u,f,h,m,w,I,B,"static/chunks/pages/overview-597b74828bf105db.js"],"/pipeline-runs":[s,c,d,"static/chunks/pages/pipeline-runs-3edc6270c5b0e962.js"],"/pipelines":[s,r,d,h,w,I,"static/chunks/pages/pipelines-3591d035bb3bb2b8.js"],"/pipelines/[pipeline]":["static/chunks/pages/pipelines/[pipeline]-91a5d6a11e7d4c56.js"],"/pipelines/[pipeline]/backfills":[s,e,"static/chunks/pages/pipelines/[pipeline]/backfills-a8b61d8d239fd16f.js"],"/pipelines/[pipeline]/backfills/[...slug]":[p,j,s,e,c,"static/chunks/pages/pipelines/[pipeline]/backfills/[...slug]-ff4bd7a8ec3bab40.js"],"/pipelines/[pipeline]/dashboard":[l,a,t,g,o,s,e,u,f,m,"static/chunks/pages/pipelines/[pipeline]/dashboard-95ffcd3e2b27e567.js"],"/pipelines/[pipeline]/edit":[l,a,t,p,g,o,s,r,u,f,h,w,F,v,"static/chunks/pages/pipelines/[pipeline]/edit-e1dd1ed71d26c10d.js"],"/pipelines/[pipeline]/logs":[j,s,e,"static/chunks/pages/pipelines/[pipeline]/logs-3f5c14076ddde20e.js"],"/pipelines/[pipeline]/monitors":[a,t,s,e,B,"static/chunks/pages/pipelines/[pipeline]/monitors-7acc7afc00df17c2.js"],"/pipelines/[pipeline]/monitors/block-runs":[a,t,s,e,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runs-a5c0362763a21fa8.js"],"/pipelines/[pipeline]/monitors/block-runtime":[l,a,t,"static/chunks/9832-67896490f6e8a014.js",s,e,"static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-1ed9045b2f1dfd65.js"],"/pipelines/[pipeline]/runs":[p,s,e,c,"static/chunks/pages/pipelines/[pipeline]/runs-6dae38250e135c54.js"],"/pipelines/[pipeline]/runs/[run]":[a,p,g,s,e,u,F,"static/chunks/pages/pipelines/[pipeline]/runs/[run]-1417ad1c821d720a.js"],"/pipelines/[pipeline]/settings":[s,e,"static/chunks/pages/pipelines/[pipeline]/settings-59aca25a5b1d3998.js"],"/pipelines/[pipeline]/syncs":[s,e,"static/chunks/pages/pipelines/[pipeline]/syncs-90abafc7ed61c582.js"],"/pipelines/[pipeline]/triggers":[p,j,A,s,e,d,k,D,"static/chunks/pages/pipelines/[pipeline]/triggers-1bdfda8edc9cf4a8.js"],"/pipelines/[pipeline]/triggers/[...slug]":[p,j,A,s,e,c,D,"static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-f028ef3880ed856c.js"],"/platform/global-hooks":[s,b,"static/chunks/pages/platform/global-hooks-c916c778b0764634.js"],"/platform/global-hooks/[...slug]":[s,b,"static/chunks/pages/platform/global-hooks/[...slug]-e187f4c2b4eccd00.js"],"/settings":["static/chunks/pages/settings-b39e5bca035dec41.js"],"/settings/account/profile":[s,i,_,"static/chunks/pages/settings/account/profile-3f0df3decc856ee9.js"],"/settings/platform/preferences":[s,i,"static/chunks/pages/settings/platform/preferences-503049734a8b082f.js"],"/settings/platform/settings":[s,i,"static/chunks/pages/settings/platform/settings-c2e9ef989c8bfa73.js"],"/settings/workspace/permissions":[s,i,E,"static/chunks/pages/settings/workspace/permissions-e5a4d3d815cec25d.js"],"/settings/workspace/permissions/[...slug]":[s,i,E,"static/chunks/pages/settings/workspace/permissions/[...slug]-47b64ced27c24985.js"],"/settings/workspace/preferences":[s,i,"static/chunks/pages/settings/workspace/preferences-5b26eeda8aed8a7b.js"],"/settings/workspace/roles":[s,i,L,"static/chunks/pages/settings/workspace/roles-36fa165a48af586b.js"],"/settings/workspace/roles/[...slug]":[s,i,L,"static/chunks/pages/settings/workspace/roles/[...slug]-379e1ee292504842.js"],"/settings/workspace/sync-data":[s,i,"static/chunks/pages/settings/workspace/sync-data-8b793b3b696a2cd3.js"],"/settings/workspace/users":[s,i,_,"static/chunks/pages/settings/workspace/users-a4db8710f703c729.js"],"/settings/workspace/users/[...slug]":[s,i,_,"static/chunks/pages/settings/workspace/users/[...slug]-2af9afbe727d88aa.js"],"/sign-in":[s,"static/chunks/pages/sign-in-09414a8b66fb6f06.js"],"/templates":[s,r,h,"static/chunks/pages/templates-05a5312f50db749c.js"],"/templates/[...slug]":[s,r,"static/chunks/pages/templates/[...slug]-98a34c313012fc10.js"],"/terminal":[s,"static/chunks/pages/terminal-89e1b3e6799378a5.js"],"/test":["static/chunks/pages/test-bd51b3918b39329e.js"],"/triggers":[s,k,"static/chunks/pages/triggers-9cba3211434a8966.js"],"/version-control":[s,"static/chunks/pages/version-control-5753fac7c1bfdc88.js"],sortedPages:["/","/404","/_app","/_error","/block-layout","/compute","/files","/global-data-products","/global-data-products/[...slug]","/global-hooks","/global-hooks/[...slug]","/manage","/manage/files","/manage/settings","/manage/users","/manage/users/new","/manage/users/[user]","/oauth","/overview","/pipeline-runs","/pipelines","/pipelines/[pipeline]","/pipelines/[pipeline]/backfills","/pipelines/[pipeline]/backfills/[...slug]","/pipelines/[pipeline]/dashboard","/pipelines/[pipeline]/edit","/pipelines/[pipeline]/logs","/pipelines/[pipeline]/monitors","/pipelines/[pipeline]/monitors/block-runs","/pipelines/[pipeline]/monitors/block-runtime","/pipelines/[pipeline]/runs","/pipelines/[pipeline]/runs/[run]","/pipelines/[pipeline]/settings","/pipelines/[pipeline]/syncs","/pipelines/[pipeline]/triggers","/pipelines/[pipeline]/triggers/[...slug]","/platform/global-hooks","/platform/global-hooks/[...slug]","/settings","/settings/account/profile","/settings/platform/preferences","/settings/platform/settings","/settings/workspace/permissions","/settings/workspace/permissions/[...slug]","/settings/workspace/preferences","/settings/workspace/roles","/settings/workspace/roles/[...slug]","/settings/workspace/sync-data","/settings/workspace/users","/settings/workspace/users/[...slug]","/sign-in","/templates","/templates/[...slug]","/terminal","/test","/triggers","/version-control"]}}("static/chunks/1557-df144fbd8b2208c3.js","static/chunks/3782-ef4cd4f0b52072d0.js","static/chunks/5699-6d708c6b2153ea08.js","static/chunks/125-abc06c39b97fd8aa.js","static/chunks/2714-68fef54789d7eaeb.js","static/chunks/7966-f07b2913f7326b50.js","static/chunks/1598-3070ba5a71ce3e2d.js","static/chunks/9161-837b653aa849a76f.js","static/chunks/29107295-989a0767a635d9d5.js","static/chunks/2631-b9f9bea3f1cf906d.js","static/chunks/8095-bdce03896ef9639a.js","static/chunks/4241-4499461184ba0d23.js","static/chunks/4783-422429203610c318.js","static/chunks/635-0d6b7c8804bcd2dc.js","static/chunks/9624-59b2f803f9c88cd6.js","static/chunks/1187-c9537b3f51775d0c.js","static/chunks/5544-d10ee8ec70354aa1.js","static/chunks/523-be11ad59861d00ca.js","static/chunks/7674-5f8f0882b3411d98.js","static/chunks/9440-4069842b90d4b801.js","static/chunks/3548-fa0792ddb88f4646.js","static/chunks/7361-8a23dd8360593e7a.js","static/chunks/3366-526b00bb494c02a4.js","static/chunks/3763-61b542dafdbf5754.js","static/chunks/5627-237a3de578538022.js","static/chunks/5831-2abc4063e887a03e.js","static/chunks/9265-d2a1aaec75ec69b8.js","static/chunks/26-38bc9380422f3900.js","static/chunks/2717-d9200be634dd6766.js","static/chunks/8146-6bed4e7401e067e6.js","static/chunks/7022-0d52dd8868621fb0.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();