mage-ai 0.9.55__py3-none-any.whl → 0.9.57__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 (377) hide show
  1. mage_ai/api/parsers/ProjectParser.py +29 -0
  2. mage_ai/api/policies/BlockPolicy.py +1 -0
  3. mage_ai/api/policies/CustomDesignPolicy.py +3 -0
  4. mage_ai/api/policies/GitBranchPolicy.py +9 -0
  5. mage_ai/api/policies/GitCustomBranchPolicy.py +1 -0
  6. mage_ai/api/policies/GlobalHookPolicy.py +3 -0
  7. mage_ai/api/policies/ProjectPolicy.py +28 -0
  8. mage_ai/api/presenters/ProjectPresenter.py +4 -0
  9. mage_ai/api/resources/BlockResource.py +14 -1
  10. mage_ai/api/resources/FileResource.py +1 -1
  11. mage_ai/api/resources/GitFileResource.py +1 -1
  12. mage_ai/api/resources/GlobalHookResource.py +55 -10
  13. mage_ai/api/resources/PipelineResource.py +12 -11
  14. mage_ai/api/resources/ProjectResource.py +95 -7
  15. mage_ai/authentication/operation_history/models.py +1 -1
  16. mage_ai/cache/dbt/cache.py +1 -1
  17. mage_ai/cache/dbt/utils.py +22 -2
  18. mage_ai/cluster_manager/kubernetes/workload_manager.py +17 -7
  19. mage_ai/data_preparation/models/block/__init__.py +71 -5
  20. mage_ai/data_preparation/models/block/dbt/block_sql.py +13 -3
  21. mage_ai/data_preparation/models/block/dbt/dbt_adapter.py +15 -1
  22. mage_ai/data_preparation/models/block/dbt/profiles.py +14 -12
  23. mage_ai/data_preparation/models/block/platform/mixins.py +6 -2
  24. mage_ai/data_preparation/models/block/platform/utils.py +9 -1
  25. mage_ai/data_preparation/models/file.py +1 -1
  26. mage_ai/data_preparation/models/global_hooks/models.py +2 -2
  27. mage_ai/data_preparation/models/project/__init__.py +74 -4
  28. mage_ai/data_preparation/models/project/constants.py +1 -0
  29. mage_ai/data_preparation/repo_manager.py +3 -0
  30. mage_ai/orchestration/db/models/schedules.py +64 -102
  31. mage_ai/orchestration/db/models/schedules_project_platform.py +365 -0
  32. mage_ai/orchestration/pipeline_scheduler.py +5 -1700
  33. mage_ai/orchestration/pipeline_scheduler_original.py +1635 -0
  34. mage_ai/orchestration/pipeline_scheduler_project_platform.py +1701 -0
  35. mage_ai/server/constants.py +1 -1
  36. mage_ai/server/frontend_dist/404.html +2 -2
  37. mage_ai/server/frontend_dist/_next/static/A7VXVGKgLQCukXcjdysDz/_buildManifest.js +1 -0
  38. mage_ai/server/frontend_dist/_next/static/chunks/1557-724bfc3eabd095f7.js +1 -0
  39. mage_ai/server/frontend_dist/_next/static/chunks/161-33f26e485ddef393.js +1 -0
  40. mage_ai/server/frontend_dist/_next/static/chunks/2646-78905b899b68f4eb.js +1 -0
  41. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/3419-ad674b271b8520ce.js → frontend_dist/_next/static/chunks/3419-b8bd26f5946bec5a.js} +1 -1
  42. mage_ai/server/frontend_dist/_next/static/chunks/3437-ce26fc28e114b44e.js +1 -0
  43. mage_ai/server/frontend_dist/_next/static/chunks/3540-9bb48b08f439d0a0.js +1 -0
  44. mage_ai/server/frontend_dist/_next/static/chunks/3745-61b1c63bb56bb670.js +1 -0
  45. mage_ai/server/frontend_dist/_next/static/chunks/{5729.0f2748e9e6dab951.js → 5189.dca121eccea793be.js} +1 -1
  46. mage_ai/server/frontend_dist/_next/static/chunks/5457-b373ebdf4d05d8e2.js +1 -0
  47. mage_ai/server/frontend_dist/_next/static/chunks/5533-3455832bc3f8429b.js +1 -0
  48. mage_ai/server/frontend_dist/_next/static/chunks/5729-9d8204ab91da631d.js +1 -0
  49. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/5810-e26a0768db1cfdba.js → frontend_dist/_next/static/chunks/5810-addfa3491ae6b01c.js} +1 -1
  50. mage_ai/server/frontend_dist/_next/static/chunks/8264-68db2a8334ad48f1.js +1 -0
  51. mage_ai/server/frontend_dist/_next/static/chunks/8432-0ace6fb7bdbc6864.js +1 -0
  52. mage_ai/server/frontend_dist/_next/static/chunks/8731-82571147875a2d58.js +1 -0
  53. mage_ai/server/frontend_dist/_next/static/chunks/874-d9e1b3c9c00ebac9.js +1 -0
  54. mage_ai/server/frontend_dist/_next/static/chunks/9264-5df6e4c7b1e85c02.js +1 -0
  55. mage_ai/server/frontend_dist/_next/static/chunks/pages/{_app-0d183e2f234d52c6.js → _app-4c0239ca6203e827.js} +1 -1
  56. mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-822e66aa2e90cf4c.js +1 -0
  57. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-373217c5de51aeef.js +1 -0
  58. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-data-products/{[...slug]-1e4838e534c8f31e.js → [...slug]-0325e76a2f3e08c1.js} +1 -1
  59. mage_ai/server/frontend_dist/_next/static/chunks/pages/{global-data-products-bb38f73540efeac4.js → global-data-products-927ebbdc29529765.js} +1 -1
  60. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-a172f5a447bd8925.js +1 -0
  61. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-97bec2ac883e0c26.js +1 -0
  62. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-02d001d99eeaae3f.js +1 -0
  63. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-2e577bfd4f0db2b7.js +1 -0
  64. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-1827574a4ba95a72.js +1 -0
  65. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-a913c361bcc0d1a9.js +1 -0
  66. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-4e6fdcbbfc931d67.js +1 -0
  67. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-1c327edcf05df9c9.js +1 -0
  68. mage_ai/server/frontend_dist/_next/static/chunks/pages/{oauth-eba7027969034415.js → oauth-bd8494f8875c5c97.js} +1 -1
  69. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-5a98e6a531410afb.js +1 -0
  70. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-1442183d13edec2e.js +1 -0
  71. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-b526282c8ac49986.js → [...slug]-38b2241cdd10320c.js} +1 -1
  72. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-515eb343210aa1fb.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-1c646dbef65d6a69.js} +1 -1
  73. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-fe4d1321da8291cb.js → dashboard-35cb916a18ac4e1f.js} +1 -1
  74. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-cd1918632dfef29d.js +1 -0
  75. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{logs-c011d465f61138ee.js → logs-67b0572c84db0940.js} +1 -1
  76. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-46c0dabd155581a0.js → block-runs-40201b626ea3a664.js} +1 -1
  77. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f2a052cb8a20fe47.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-d1f23308effebe03.js} +1 -1
  78. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-579899cbaedcdefc.js → monitors-9a116d88f00916ff.js} +1 -1
  79. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-7a2265b7e44bed0b.js → [run]-2d5abcd019d4bea1.js} +1 -1
  80. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{runs-9b53da919db959bd.js → runs-5363a7ae9afe8983.js} +1 -1
  81. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{settings-1839276725bfd757.js → settings-931a1b3112866a72.js} +1 -1
  82. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-68d779bc62185470.js → syncs-5ec5367cb877db38.js} +1 -1
  83. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-01f4528602f4ba2a.js → frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-8366661f8e2b2959.js} +1 -1
  84. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-358523847fdbf547.js → triggers-378f8dada7d0c1dd.js} +1 -1
  85. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-627be24ef4963cfb.js +1 -0
  86. mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks/[...slug]-814bbd11e10c26dc.js +1 -0
  87. mage_ai/server/frontend_dist/_next/static/chunks/pages/platform/global-hooks-021ec25e05862f8f.js +1 -0
  88. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-00393e67ab1e6788.js → frontend_dist/_next/static/chunks/pages/settings/account/profile-2b0aa123043519b8.js} +1 -1
  89. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/preferences-05186e17c94347c1.js +1 -0
  90. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/platform/settings-efe8bf1bf3177a7e.js +1 -0
  91. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-eaeba99f9547a20a.js → [...slug]-aa5d871de1f3f7b0.js} +1 -1
  92. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{permissions-c3140516cc28e467.js → permissions-ce45aad47049d993.js} +1 -1
  93. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-1bc694b056ff0bcb.js +1 -0
  94. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-f6ff0e219a4b9ffd.js → [...slug]-88d29d1774db67e4.js} +1 -1
  95. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{roles-22ff9d862736b2ec.js → roles-d8ca763e405cd9d1.js} +1 -1
  96. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{sync-data-614925e838d1974c.js → sync-data-42bd909eb8951040.js} +1 -1
  97. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/users/{[...slug]-5b88dfb1c6d0d16c.js → [...slug]-250dfdf22bfe67e9.js} +1 -1
  98. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/{users-eb904db7ac7ea57c.js → users-97c4ce119f7238b5.js} +1 -1
  99. mage_ai/server/{frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-dcdd0c71f99aebad.js → frontend_dist/_next/static/chunks/pages/sign-in-1af3ba18ff646dd4.js} +1 -1
  100. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-ff9d49355393daea.js +1 -0
  101. mage_ai/server/frontend_dist/_next/static/chunks/pages/{templates-5ebfe79c24d8c4b4.js → templates-299a2c8f2dd89cf3.js} +1 -1
  102. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-fb3f398009a02879.js +1 -0
  103. mage_ai/server/frontend_dist/_next/static/chunks/pages/test-59a08e06f4ef6c3a.js +1 -0
  104. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-551b85802515e313.js +1 -0
  105. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-1362aeda4a31dd41.js +1 -0
  106. mage_ai/server/frontend_dist/_next/static/chunks/{webpack-fea697dd168c6d0c.js → webpack-17c3a8f588f14cfd.js} +1 -1
  107. mage_ai/server/frontend_dist/block-layout.html +2 -2
  108. mage_ai/server/frontend_dist/compute.html +2 -2
  109. mage_ai/server/frontend_dist/files.html +2 -2
  110. mage_ai/server/frontend_dist/global-data-products/[...slug].html +2 -2
  111. mage_ai/server/frontend_dist/global-data-products.html +2 -2
  112. mage_ai/server/frontend_dist/global-hooks/[...slug].html +2 -2
  113. mage_ai/server/frontend_dist/global-hooks.html +2 -2
  114. mage_ai/server/frontend_dist/index.html +2 -2
  115. mage_ai/server/frontend_dist/manage/files.html +2 -2
  116. mage_ai/server/frontend_dist/manage/settings.html +2 -2
  117. mage_ai/server/frontend_dist/manage/users/[user].html +2 -2
  118. mage_ai/server/frontend_dist/manage/users/new.html +2 -2
  119. mage_ai/server/frontend_dist/manage/users.html +2 -2
  120. mage_ai/server/frontend_dist/manage.html +2 -2
  121. mage_ai/server/frontend_dist/oauth.html +3 -3
  122. mage_ai/server/frontend_dist/overview.html +2 -2
  123. mage_ai/server/frontend_dist/pipeline-runs.html +2 -2
  124. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills/[...slug].html +2 -2
  125. mage_ai/server/frontend_dist/pipelines/[pipeline]/backfills.html +2 -2
  126. mage_ai/server/frontend_dist/pipelines/[pipeline]/dashboard.html +2 -2
  127. mage_ai/server/frontend_dist/pipelines/[pipeline]/edit.html +2 -2
  128. mage_ai/server/frontend_dist/pipelines/[pipeline]/logs.html +2 -2
  129. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runs.html +2 -2
  130. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors/block-runtime.html +2 -2
  131. mage_ai/server/frontend_dist/pipelines/[pipeline]/monitors.html +2 -2
  132. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs/[run].html +2 -2
  133. mage_ai/server/frontend_dist/pipelines/[pipeline]/runs.html +2 -2
  134. mage_ai/server/frontend_dist/pipelines/[pipeline]/settings.html +2 -2
  135. mage_ai/server/frontend_dist/pipelines/[pipeline]/syncs.html +2 -2
  136. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers/[...slug].html +2 -2
  137. mage_ai/server/frontend_dist/pipelines/[pipeline]/triggers.html +2 -2
  138. mage_ai/server/frontend_dist/pipelines/[pipeline].html +2 -2
  139. mage_ai/server/frontend_dist/pipelines.html +2 -2
  140. mage_ai/server/frontend_dist/platform/global-hooks/[...slug].html +24 -0
  141. mage_ai/server/frontend_dist/platform/global-hooks.html +24 -0
  142. mage_ai/server/frontend_dist/settings/account/profile.html +2 -2
  143. mage_ai/server/frontend_dist/settings/platform/preferences.html +24 -0
  144. mage_ai/server/frontend_dist/settings/platform/settings.html +24 -0
  145. mage_ai/server/frontend_dist/settings/workspace/permissions/[...slug].html +2 -2
  146. mage_ai/server/frontend_dist/settings/workspace/permissions.html +2 -2
  147. mage_ai/server/frontend_dist/settings/workspace/preferences.html +2 -2
  148. mage_ai/server/frontend_dist/settings/workspace/roles/[...slug].html +2 -2
  149. mage_ai/server/frontend_dist/settings/workspace/roles.html +2 -2
  150. mage_ai/server/frontend_dist/settings/workspace/sync-data.html +2 -2
  151. mage_ai/server/frontend_dist/settings/workspace/users/[...slug].html +2 -2
  152. mage_ai/server/frontend_dist/settings/workspace/users.html +2 -2
  153. mage_ai/server/frontend_dist/settings.html +2 -2
  154. mage_ai/server/frontend_dist/sign-in.html +3 -3
  155. mage_ai/server/frontend_dist/templates/[...slug].html +2 -2
  156. mage_ai/server/frontend_dist/templates.html +2 -2
  157. mage_ai/server/frontend_dist/terminal.html +2 -2
  158. mage_ai/server/frontend_dist/test.html +2 -2
  159. mage_ai/server/frontend_dist/triggers.html +2 -2
  160. mage_ai/server/frontend_dist/version-control.html +2 -2
  161. mage_ai/server/frontend_dist_base_path_template/404.html +4 -4
  162. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1557-724bfc3eabd095f7.js +1 -0
  163. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/161-33f26e485ddef393.js +1 -0
  164. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2646-78905b899b68f4eb.js +1 -0
  165. mage_ai/server/{frontend_dist/_next/static/chunks/3419-ad674b271b8520ce.js → frontend_dist_base_path_template/_next/static/chunks/3419-b8bd26f5946bec5a.js} +1 -1
  166. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-ce26fc28e114b44e.js +1 -0
  167. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3540-9bb48b08f439d0a0.js +1 -0
  168. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3745-61b1c63bb56bb670.js +1 -0
  169. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{5729.0f2748e9e6dab951.js → 5189.dca121eccea793be.js} +1 -1
  170. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-b373ebdf4d05d8e2.js +1 -0
  171. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5533-3455832bc3f8429b.js +1 -0
  172. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5729-9d8204ab91da631d.js +1 -0
  173. mage_ai/server/{frontend_dist/_next/static/chunks/5810-e26a0768db1cfdba.js → frontend_dist_base_path_template/_next/static/chunks/5810-addfa3491ae6b01c.js} +1 -1
  174. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-68db2a8334ad48f1.js +1 -0
  175. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8432-0ace6fb7bdbc6864.js +1 -0
  176. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8731-82571147875a2d58.js +1 -0
  177. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/874-d9e1b3c9c00ebac9.js +1 -0
  178. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-5df6e4c7b1e85c02.js +1 -0
  179. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{_app-0d183e2f234d52c6.js → _app-4c0239ca6203e827.js} +1 -1
  180. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-822e66aa2e90cf4c.js +1 -0
  181. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-373217c5de51aeef.js +1 -0
  182. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-data-products/{[...slug]-1e4838e534c8f31e.js → [...slug]-0325e76a2f3e08c1.js} +1 -1
  183. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{global-data-products-bb38f73540efeac4.js → global-data-products-927ebbdc29529765.js} +1 -1
  184. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-a172f5a447bd8925.js +1 -0
  185. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-97bec2ac883e0c26.js +1 -0
  186. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-02d001d99eeaae3f.js +1 -0
  187. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-2e577bfd4f0db2b7.js +1 -0
  188. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-1827574a4ba95a72.js +1 -0
  189. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-a913c361bcc0d1a9.js +1 -0
  190. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-4e6fdcbbfc931d67.js +1 -0
  191. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-1c327edcf05df9c9.js +1 -0
  192. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{oauth-eba7027969034415.js → oauth-bd8494f8875c5c97.js} +1 -1
  193. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-5a98e6a531410afb.js +1 -0
  194. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-1442183d13edec2e.js +1 -0
  195. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills/{[...slug]-b526282c8ac49986.js → [...slug]-38b2241cdd10320c.js} +1 -1
  196. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/backfills-515eb343210aa1fb.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/backfills-1c646dbef65d6a69.js} +1 -1
  197. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{dashboard-fe4d1321da8291cb.js → dashboard-35cb916a18ac4e1f.js} +1 -1
  198. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-cd1918632dfef29d.js +1 -0
  199. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{logs-c011d465f61138ee.js → logs-67b0572c84db0940.js} +1 -1
  200. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/{block-runs-46c0dabd155581a0.js → block-runs-40201b626ea3a664.js} +1 -1
  201. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-f2a052cb8a20fe47.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/monitors/block-runtime-d1f23308effebe03.js} +1 -1
  202. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{monitors-579899cbaedcdefc.js → monitors-9a116d88f00916ff.js} +1 -1
  203. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/runs/{[run]-7a2265b7e44bed0b.js → [run]-2d5abcd019d4bea1.js} +1 -1
  204. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{runs-9b53da919db959bd.js → runs-5363a7ae9afe8983.js} +1 -1
  205. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{settings-1839276725bfd757.js → settings-931a1b3112866a72.js} +1 -1
  206. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{syncs-68d779bc62185470.js → syncs-5ec5367cb877db38.js} +1 -1
  207. mage_ai/server/{frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-01f4528602f4ba2a.js → frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/triggers/[...slug]-8366661f8e2b2959.js} +1 -1
  208. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/{triggers-358523847fdbf547.js → triggers-378f8dada7d0c1dd.js} +1 -1
  209. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-627be24ef4963cfb.js +1 -0
  210. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks/[...slug]-814bbd11e10c26dc.js +1 -0
  211. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/platform/global-hooks-021ec25e05862f8f.js +1 -0
  212. mage_ai/server/{frontend_dist/_next/static/chunks/pages/settings/account/profile-00393e67ab1e6788.js → frontend_dist_base_path_template/_next/static/chunks/pages/settings/account/profile-2b0aa123043519b8.js} +1 -1
  213. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/preferences-05186e17c94347c1.js +1 -0
  214. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/platform/settings-efe8bf1bf3177a7e.js +1 -0
  215. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/permissions/{[...slug]-eaeba99f9547a20a.js → [...slug]-aa5d871de1f3f7b0.js} +1 -1
  216. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{permissions-c3140516cc28e467.js → permissions-ce45aad47049d993.js} +1 -1
  217. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-1bc694b056ff0bcb.js +1 -0
  218. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/roles/{[...slug]-f6ff0e219a4b9ffd.js → [...slug]-88d29d1774db67e4.js} +1 -1
  219. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{roles-22ff9d862736b2ec.js → roles-d8ca763e405cd9d1.js} +1 -1
  220. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{sync-data-614925e838d1974c.js → sync-data-42bd909eb8951040.js} +1 -1
  221. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/users/{[...slug]-5b88dfb1c6d0d16c.js → [...slug]-250dfdf22bfe67e9.js} +1 -1
  222. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/{users-eb904db7ac7ea57c.js → users-97c4ce119f7238b5.js} +1 -1
  223. mage_ai/server/{frontend_dist/_next/static/chunks/pages/sign-in-dcdd0c71f99aebad.js → frontend_dist_base_path_template/_next/static/chunks/pages/sign-in-1af3ba18ff646dd4.js} +1 -1
  224. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-ff9d49355393daea.js +1 -0
  225. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/{templates-5ebfe79c24d8c4b4.js → templates-299a2c8f2dd89cf3.js} +1 -1
  226. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-fb3f398009a02879.js +1 -0
  227. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-59a08e06f4ef6c3a.js +1 -0
  228. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-551b85802515e313.js +1 -0
  229. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-1362aeda4a31dd41.js +1 -0
  230. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/{webpack-d30cb09c85b4c4f0.js → webpack-b55fe1e575d8ac9d.js} +1 -1
  231. mage_ai/server/frontend_dist_base_path_template/_next/static/wSRrM15xnvA8lOWcaque7/_buildManifest.js +1 -0
  232. mage_ai/server/frontend_dist_base_path_template/block-layout.html +2 -2
  233. mage_ai/server/frontend_dist_base_path_template/compute.html +5 -5
  234. mage_ai/server/frontend_dist_base_path_template/files.html +5 -5
  235. mage_ai/server/frontend_dist_base_path_template/global-data-products/[...slug].html +5 -5
  236. mage_ai/server/frontend_dist_base_path_template/global-data-products.html +5 -5
  237. mage_ai/server/frontend_dist_base_path_template/global-hooks/[...slug].html +5 -5
  238. mage_ai/server/frontend_dist_base_path_template/global-hooks.html +5 -5
  239. mage_ai/server/frontend_dist_base_path_template/index.html +2 -2
  240. mage_ai/server/frontend_dist_base_path_template/manage/files.html +5 -5
  241. mage_ai/server/frontend_dist_base_path_template/manage/settings.html +5 -5
  242. mage_ai/server/frontend_dist_base_path_template/manage/users/[user].html +5 -5
  243. mage_ai/server/frontend_dist_base_path_template/manage/users/new.html +5 -5
  244. mage_ai/server/frontend_dist_base_path_template/manage/users.html +5 -5
  245. mage_ai/server/frontend_dist_base_path_template/manage.html +5 -5
  246. mage_ai/server/frontend_dist_base_path_template/oauth.html +3 -3
  247. mage_ai/server/frontend_dist_base_path_template/overview.html +5 -5
  248. mage_ai/server/frontend_dist_base_path_template/pipeline-runs.html +5 -5
  249. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills/[...slug].html +5 -5
  250. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/backfills.html +5 -5
  251. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/dashboard.html +5 -5
  252. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/edit.html +2 -2
  253. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/logs.html +5 -5
  254. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runs.html +5 -5
  255. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors/block-runtime.html +5 -5
  256. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/monitors.html +5 -5
  257. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs/[run].html +5 -5
  258. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/runs.html +5 -5
  259. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/settings.html +5 -5
  260. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/syncs.html +5 -5
  261. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers/[...slug].html +5 -5
  262. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline]/triggers.html +5 -5
  263. mage_ai/server/frontend_dist_base_path_template/pipelines/[pipeline].html +2 -2
  264. mage_ai/server/frontend_dist_base_path_template/pipelines.html +5 -5
  265. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks/[...slug].html +24 -0
  266. mage_ai/server/frontend_dist_base_path_template/platform/global-hooks.html +24 -0
  267. mage_ai/server/frontend_dist_base_path_template/settings/account/profile.html +5 -5
  268. mage_ai/server/frontend_dist_base_path_template/settings/platform/preferences.html +24 -0
  269. mage_ai/server/frontend_dist_base_path_template/settings/platform/settings.html +24 -0
  270. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions/[...slug].html +5 -5
  271. mage_ai/server/frontend_dist_base_path_template/settings/workspace/permissions.html +5 -5
  272. mage_ai/server/frontend_dist_base_path_template/settings/workspace/preferences.html +5 -5
  273. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles/[...slug].html +5 -5
  274. mage_ai/server/frontend_dist_base_path_template/settings/workspace/roles.html +5 -5
  275. mage_ai/server/frontend_dist_base_path_template/settings/workspace/sync-data.html +5 -5
  276. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users/[...slug].html +5 -5
  277. mage_ai/server/frontend_dist_base_path_template/settings/workspace/users.html +5 -5
  278. mage_ai/server/frontend_dist_base_path_template/settings.html +2 -2
  279. mage_ai/server/frontend_dist_base_path_template/sign-in.html +11 -11
  280. mage_ai/server/frontend_dist_base_path_template/templates/[...slug].html +5 -5
  281. mage_ai/server/frontend_dist_base_path_template/templates.html +5 -5
  282. mage_ai/server/frontend_dist_base_path_template/terminal.html +5 -5
  283. mage_ai/server/frontend_dist_base_path_template/test.html +2 -2
  284. mage_ai/server/frontend_dist_base_path_template/triggers.html +5 -5
  285. mage_ai/server/frontend_dist_base_path_template/version-control.html +5 -5
  286. mage_ai/server/websocket_server.py +33 -22
  287. mage_ai/settings/models/configuration_option.py +15 -1
  288. mage_ai/settings/platform/__init__.py +44 -20
  289. mage_ai/shared/io.py +3 -0
  290. mage_ai/streaming/sinks/rabbitmq.py +3 -1
  291. mage_ai/streaming/sources/rabbitmq.py +5 -2
  292. mage_ai/tests/api/endpoints/test_pipeline_runs.py +4 -0
  293. mage_ai/tests/api/endpoints/test_projects.py +1 -0
  294. mage_ai/tests/api/resources/test_pipeline_resource.py +2 -2
  295. mage_ai/tests/data_preparation/models/block/platform/test_mixins.py +4 -3
  296. mage_ai/tests/data_preparation/models/test_block.py +2 -1
  297. mage_ai/tests/data_preparation/models/test_project.py +27 -7
  298. mage_ai/tests/orchestration/db/models/test_schedules.py +25 -7
  299. mage_ai/tests/orchestration/test_pipeline_scheduler.py +6 -261
  300. mage_ai/tests/orchestration/test_pipeline_scheduler_project_platform.py +286 -0
  301. mage_ai/tests/shared/mixins.py +1 -0
  302. {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/METADATA +1 -1
  303. {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/RECORD +309 -286
  304. mage_ai/server/frontend_dist/_next/static/7yQskzl_RfcpoOQn1DPQV/_buildManifest.js +0 -1
  305. mage_ai/server/frontend_dist/_next/static/chunks/1125-fbdaaef471846c61.js +0 -1
  306. mage_ai/server/frontend_dist/_next/static/chunks/1952-c4ba37bc172d7051.js +0 -1
  307. mage_ai/server/frontend_dist/_next/static/chunks/2646-d8612648f7836101.js +0 -1
  308. mage_ai/server/frontend_dist/_next/static/chunks/3437-91f6098316edaf17.js +0 -1
  309. mage_ai/server/frontend_dist/_next/static/chunks/3745-0aacee8ac93a042a.js +0 -1
  310. mage_ai/server/frontend_dist/_next/static/chunks/5332-c5abdf5c8d65a52e.js +0 -1
  311. mage_ai/server/frontend_dist/_next/static/chunks/5457-6e700aadac17ceec.js +0 -1
  312. mage_ai/server/frontend_dist/_next/static/chunks/8264-dad1f090c4278137.js +0 -1
  313. mage_ai/server/frontend_dist/_next/static/chunks/8432-ec2b97cbf32ec5a7.js +0 -1
  314. mage_ai/server/frontend_dist/_next/static/chunks/8731-9e0ad513b0dfce83.js +0 -1
  315. mage_ai/server/frontend_dist/_next/static/chunks/874-18d9f33cdd028e9d.js +0 -1
  316. mage_ai/server/frontend_dist/_next/static/chunks/9264-4428392376aa9dd4.js +0 -1
  317. mage_ai/server/frontend_dist/_next/static/chunks/9626-2627bc34f11b2906.js +0 -1
  318. mage_ai/server/frontend_dist/_next/static/chunks/pages/compute-5ead3afa88d14721.js +0 -1
  319. mage_ai/server/frontend_dist/_next/static/chunks/pages/files-87b31b998e9f1222.js +0 -1
  320. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks/[...slug]-a7d74042d52c3c38.js +0 -1
  321. mage_ai/server/frontend_dist/_next/static/chunks/pages/global-hooks-cf7f1ba0b44ec0fb.js +0 -1
  322. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/files-899b362caff47d4d.js +0 -1
  323. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/settings-b9ddd48737fba474.js +0 -1
  324. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/[user]-1e8731ba2559fef4.js +0 -1
  325. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users/new-a6307396dfa82c88.js +0 -1
  326. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage/users-fc5aafe5085739a9.js +0 -1
  327. mage_ai/server/frontend_dist/_next/static/chunks/pages/manage-c008f0201864d693.js +0 -1
  328. mage_ai/server/frontend_dist/_next/static/chunks/pages/overview-321f47b2dba4c780.js +0 -1
  329. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipeline-runs-bf4d162b5460acc6.js +0 -1
  330. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines/[pipeline]/edit-62ee3e957688c725.js +0 -1
  331. mage_ai/server/frontend_dist/_next/static/chunks/pages/pipelines-33d9fb90871be84c.js +0 -1
  332. mage_ai/server/frontend_dist/_next/static/chunks/pages/settings/workspace/preferences-f4ff09cfff8bad46.js +0 -1
  333. mage_ai/server/frontend_dist/_next/static/chunks/pages/templates/[...slug]-04b0a55e8ad6f814.js +0 -1
  334. mage_ai/server/frontend_dist/_next/static/chunks/pages/terminal-88025dd0ed3051a6.js +0 -1
  335. mage_ai/server/frontend_dist/_next/static/chunks/pages/test-b936dd972db94c6b.js +0 -1
  336. mage_ai/server/frontend_dist/_next/static/chunks/pages/triggers-e5e49ac3b9282aaa.js +0 -1
  337. mage_ai/server/frontend_dist/_next/static/chunks/pages/version-control-a5372e488b5f44a2.js +0 -1
  338. mage_ai/server/frontend_dist_base_path_template/_next/static/2_SHgS8M315ekLG0qkZzC/_buildManifest.js +0 -1
  339. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1125-fbdaaef471846c61.js +0 -1
  340. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/1952-c4ba37bc172d7051.js +0 -1
  341. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/2646-d8612648f7836101.js +0 -1
  342. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3437-91f6098316edaf17.js +0 -1
  343. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/3745-0aacee8ac93a042a.js +0 -1
  344. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5332-c5abdf5c8d65a52e.js +0 -1
  345. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/5457-6e700aadac17ceec.js +0 -1
  346. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8264-dad1f090c4278137.js +0 -1
  347. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8432-ec2b97cbf32ec5a7.js +0 -1
  348. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/8731-9e0ad513b0dfce83.js +0 -1
  349. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/874-18d9f33cdd028e9d.js +0 -1
  350. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9264-4428392376aa9dd4.js +0 -1
  351. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/9626-2627bc34f11b2906.js +0 -1
  352. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/compute-5ead3afa88d14721.js +0 -1
  353. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/files-87b31b998e9f1222.js +0 -1
  354. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks/[...slug]-a7d74042d52c3c38.js +0 -1
  355. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/global-hooks-cf7f1ba0b44ec0fb.js +0 -1
  356. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/files-899b362caff47d4d.js +0 -1
  357. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/settings-b9ddd48737fba474.js +0 -1
  358. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/[user]-1e8731ba2559fef4.js +0 -1
  359. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users/new-a6307396dfa82c88.js +0 -1
  360. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage/users-fc5aafe5085739a9.js +0 -1
  361. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/manage-c008f0201864d693.js +0 -1
  362. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/overview-321f47b2dba4c780.js +0 -1
  363. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipeline-runs-bf4d162b5460acc6.js +0 -1
  364. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines/[pipeline]/edit-62ee3e957688c725.js +0 -1
  365. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/pipelines-33d9fb90871be84c.js +0 -1
  366. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/settings/workspace/preferences-f4ff09cfff8bad46.js +0 -1
  367. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/templates/[...slug]-04b0a55e8ad6f814.js +0 -1
  368. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/terminal-88025dd0ed3051a6.js +0 -1
  369. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/test-b936dd972db94c6b.js +0 -1
  370. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/triggers-e5e49ac3b9282aaa.js +0 -1
  371. mage_ai/server/frontend_dist_base_path_template/_next/static/chunks/pages/version-control-a5372e488b5f44a2.js +0 -1
  372. /mage_ai/server/frontend_dist/_next/static/{7yQskzl_RfcpoOQn1DPQV → A7VXVGKgLQCukXcjdysDz}/_ssgManifest.js +0 -0
  373. /mage_ai/server/frontend_dist_base_path_template/_next/static/{2_SHgS8M315ekLG0qkZzC → wSRrM15xnvA8lOWcaque7}/_ssgManifest.js +0 -0
  374. {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/LICENSE +0 -0
  375. {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/WHEEL +0 -0
  376. {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/entry_points.txt +0 -0
  377. {mage_ai-0.9.55.dist-info → mage_ai-0.9.57.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1221],{8666:function(e,n,i){"use strict";var t;i.d(n,{b:function(){return t}}),function(e){e.BLOCK="block",e.PIPELINE="pipeline"}(t||(t={}))},30229:function(e,n,i){"use strict";i.d(n,{PN:function(){return l},TR:function(){return v},U5:function(){return s},Wb:function(){return f},Xm:function(){return o},Z4:function(){return d},fq:function(){return c},gm:function(){return a},kJ:function(){return p}});var t,u,o,r=i(82394),l="__bookmark_values__";!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var c,s,d=(t={},(0,r.Z)(t,o.API,(function(){return"API"})),(0,r.Z)(t,o.EVENT,(function(){return"event"})),(0,r.Z)(t,o.TIME,(function(){return"schedule"})),t);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(c||(c={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly",e.ALWAYS_ON="@always_on"}(s||(s={}));var a,p,f=[s.ONCE,s.HOURLY,s.DAILY,s.WEEKLY,s.MONTHLY];!function(e){e.INTERVAL="frequency[]",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(a||(a={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(p||(p={}));var v=(u={},(0,r.Z)(u,p.CREATED_AT,"Created at"),(0,r.Z)(u,p.NAME,"Name"),(0,r.Z)(u,p.PIPELINE,"Pipeline"),(0,r.Z)(u,p.STATUS,"Active"),(0,r.Z)(u,p.TYPE,"Type"),u)},31882:function(e,n,i){"use strict";var t=i(38626),u=i(71180),o=i(55485),r=i(30160),l=i(44897),c=i(72473),s=i(70515),d=i(61896),a=i(28598),p=t.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||l.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||l.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((s.iI+d.Al)/2,"px;\n height: ").concat(1.5*s.iI+d.Al,"px;\n padding: ").concat(s.iI/1.5,"px ").concat(1.25*s.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((s.iI/2+d.Al)/2,"px;\n height: ").concat(d.Al+s.iI/2+2,"px;\n padding: ").concat(s.iI/4,"px ").concat(s.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((s.iI/1+d.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||l.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,i=e.children,t=e.disabled,l=e.label,d=e.monospace,f=e.onClick,v=e.primary,h=e.small,m=e.xsmall;return(0,a.jsx)(p,{border:n,primary:v,small:h,xsmall:m,children:(0,a.jsx)(u.ZP,{basic:!0,disabled:t,noBackground:!0,noPadding:!0,onClick:f,transparent:!0,children:(0,a.jsxs)(o.ZP,{alignItems:"center",children:[i,l&&(0,a.jsx)(r.ZP,{monospace:d,small:h,xsmall:m,children:l}),!t&&f&&(0,a.jsx)("div",{style:{marginLeft:2}}),!t&&f&&(0,a.jsx)(c.x8,{default:v,muted:!v,size:h?s.iI:1.25*s.iI})]})})})}},55620:function(e,n,i){"use strict";i.r(n),i.d(n,{default:function(){return Me}});var t=i(77837),u=i(75582),o=i(21831),r=i(82394),l=i(38860),c=i.n(l),s=i(12691),d=i.n(s),a=i(82684),p=i(69864),f=i(34376),v=i(52749),h=i(60523),m=i(71180),g=i(90299),b=i(31882),x=i(94629),Z=i(97618),j=i(55485),C=i(85854),_=i(93369),I=i(65956),w=i(38276),y=i(30160),P=i(35576),k=i(17488),T=i(28598);var E=function(e){var n=e.description,i=e.isLoading,t=e.maxWidth,u=e.minWidth,o=e.noEmptyValue,r=e.onClose,l=e.onSave,c=e.textArea,s=e.title,d=e.value,p=(0,a.useRef)(null),f=(0,a.useState)(d),v=f[0],h=f[1],g=c?P.Z:k.Z;return(0,a.useEffect)((function(){var e;null===p||void 0===p||null===(e=p.current)||void 0===e||e.focus()}),[]),(0,T.jsxs)(I.Z,{maxWidth:t,minWidth:u,children:[(0,T.jsx)(y.ZP,{bold:!0,children:s}),(0,T.jsx)(w.Z,{mt:1,children:(0,T.jsx)(g,{monospace:!0,onChange:function(e){return h(e.target.value)},ref:p,rows:c?7:null,value:v})}),n&&(0,T.jsx)(w.Z,{mt:2,children:(0,T.jsx)(y.ZP,{muted:!0,small:!0,children:n})}),(0,T.jsx)(w.Z,{mt:3,children:(0,T.jsxs)(j.ZP,{children:[(0,T.jsx)(_.ZP,{bold:!0,inline:!0,loading:i,onClick:function(){v===d||o&&!v?r():l(v)},outline:!0,primary:!0,uuid:"Inputs/InputModal/SaveInput",children:"Save"}),(0,T.jsx)(w.Z,{ml:1}),(0,T.jsx)(m.ZP,{onClick:r,children:"Cancel"})]})})]})},A=i(48670),S=i(55072),O=i(57653),M=i(55729),D=i(93808),R=i(82359),N=i(44085),L=i(4190),U=i(75499),G=i(48381),H=i(69650),Y=i(85544),B=i(35686),$=i(44897),V=i(77417),W=i(42631),z=i(44425),F=i(72473),q=i(23780),K=i(8666),Q=i(46684),X=i(53808),J="pipeline_list_filters",ee="pipeline_list_group_bys",ne="pipeline_list_sort_column_index",ie="pipeline_list_sort_direction",te="pipeline_list_selected_tab_uuid";function ue(e){return(0,X.t8)(J,e),e}function oe(e){return(0,X.t8)(ee,e),e}var re=i(11498),le=i(32929),ce=i(44898),se=i(70515),de=i(30229),ae=i(81655),pe=i(31608),fe=i(81728),ve=i(3917),he=i(72619),me=i(69419),ge=i(65458),be=i(15610),xe=i(86735),Ze=i(42122),je=i(95924),Ce=i(70320),_e=i(89538),Ie=i(44952);function we(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 ye(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?we(Object(i),!0).forEach((function(n){(0,r.Z)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):we(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var Pe={Icon:F.Pf,label:function(){return"Recently viewed"},uuid:"recent"},ke={Icon:F.vd,label:function(e){return null!==e&&void 0!==e&&e.count?"All pipelines \u203a ".concat((null===e||void 0===e?void 0:e.count)||0):"All pipelines"},uuid:"all"},Te=[ke,Pe],Ee="tab",Ae=[O.$1.SEARCH],Se={borderRadius:"".concat(W.BG,"px"),iconOnly:!0,noBackground:!0,noBorder:!0,outline:!0,padding:"4px"};function Oe(){var e,n,i,t,l=(0,f.useRouter)(),c=(0,a.useRef)(null),s=(0,a.useRef)(null),_=(0,a.useRef)(null),P=(0,a.useRef)(null),k=(0,V.Z)(),D=k.fetchProjects,W=k.project,we=(0,a.useState)(null),Oe=we[0],Me=we[1],De=(0,a.useState)(null),Re=De[0],Ne=De[1],Le=(0,a.useState)(null),Ue=Le[0],Ge=Le[1],He=(0,a.useState)(null),Ye=He[0],Be=He[1],$e=(0,a.useState)(null),Ve=$e[0],We=$e[1],ze=(0,a.useCallback)((function(e){We(e),clearTimeout(P.current),P.current=setTimeout((function(){return(0,be.u)((0,r.Z)({},O.$1.SEARCH,e))}),500)}),[We]),Fe=(0,a.useState)({}),qe=Fe[0],Ke=Fe[1],Qe=(0,a.useState)(null),Xe=Qe[0],Je=Qe[1],en=(0,me.iV)(),nn=ye((0,r.Z)({},re.$D.LIMIT,S.Q),(0,me.DQ)(en,[O.$1.SEARCH,O.$1.STATUS,O.$1.TAG,O.$1.TYPE].concat((0,o.Z)(re.RG)))),tn=(0,a.useMemo)((function(){return null===en||void 0===en?void 0:en.tab}),[en]);(0,a.useEffect)((function(){var e;Me(null===c||void 0===c||null===(e=c.current)||void 0===e?void 0:e.getBoundingClientRect().height)}),[en,c]);var un=(0,a.useMemo)((function(){var e;return(0,Ce.hY)(null===W||void 0===W||null===(e=W.features)||void 0===e?void 0:e[R.d.LOCAL_TIMEZONE])}),[null===W||void 0===W?void 0:W.features]),on=(0,a.useMemo)((function(){var e;return null===W||void 0===W||null===(e=W.features)||void 0===e?void 0:e[R.d.OPERATION_HISTORY]}),[W]),rn=(0,a.useMemo)((function(){return un?ae.O$:{}}),[un]),ln=B.ZP.pipelines.list(ye(ye({},nn),{},{include_schedules:1}),{revalidateOnFocus:!1}),cn=ln.data,sn=ln.mutate,dn=(0,a.useMemo)((function(){return(null===en||void 0===en?void 0:en[O.$1.HISTORY_DAYS])||7}),[en]),an=B.ZP.pipelines.list(ye(ye({},nn),{},(e={},(0,r.Z)(e,O.$1.HISTORY_DAYS,(0,fe.HW)(dn)?Number(dn):dn),(0,r.Z)(e,"include_schedules",1),e)),{},{pauseFetch:!on||!tn||Pe.uuid!==tn}),pn=an.data,fn=an.mutate,vn=(0,a.useCallback)((function(e){return e}),[Ve]),hn=(0,a.useMemo)((function(){var e=vn((null===cn||void 0===cn?void 0:cn.pipelines)||[]);if(null!==en&&void 0!==en&&en[O.$1.TAG]){var n=en[O.$1.TAG];e=e.filter((function(e){var i=e.tags;return i.some((function(e){return n.includes(e)}))||0===i.length&&n.includes(O.$1.NO_TAGS)}))}return e}),[cn,vn,en]),mn=(0,a.useMemo)((function(){return vn((null===pn||void 0===pn?void 0:pn.pipelines)||[])}),[pn,vn]),gn=(0,a.useMemo)((function(){return(0,xe.HK)(hn,(function(e){return e.uuid}))}),[hn]),bn=(0,a.useMemo)((function(){return(0,xe.HK)(mn,(function(e){return e.uuid}))}),[mn]),xn=(0,a.useCallback)((function(e){var n,i,t,u;return null===e||void 0===e||null===(n=e[2])||void 0===n||null===(i=n.props)||void 0===i||null===(t=i.children)||void 0===t||null===(u=t.props)||void 0===u?void 0:u.children}),[]),Zn=(0,a.useMemo)((function(){return(null===Ue||void 0===Ue?void 0:Ue.length)>0?null===Ue||void 0===Ue?void 0:Ue.map((function(e){var n=xn(e);return null===gn||void 0===gn?void 0:gn[n]})):hn}),[xn,Ue,hn,gn]),jn=(0,a.useMemo)((function(){return(null===Ye||void 0===Ye?void 0:Ye.length)>0?null===Ye||void 0===Ye?void 0:Ye.map((function(e){var n=xn(e);return null===bn||void 0===bn?void 0:bn[n]})):mn}),[xn,Ye,mn,bn]),Cn=(0,a.useMemo)((function(){return[1,2,3,4,5,6,8,9]}),[]),_n=null===en||void 0===en?void 0:en[ae.lG.SORT_COL_IDX],In=null===en||void 0===en?void 0:en[ae.lG.SORT_DIRECTION],wn=(0,a.useMemo)((function(){return _n?{columnIndex:+_n,sortDirection:In||ae.sh.ASC}:void 0}),[_n,In]),yn=null===en||void 0===en?void 0:en[O.$1.GROUP],Pn=(0,p.Db)((function(e){var n=e.pipelineUUID,i=e.filesOnly,t=void 0!==i&&i;return B.ZP.downloads.pipelines.useCreate(n)({download:{ignore_folder_structure:t}})}),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(){var n=e.data.download.token;(0,Ie.K)(n)},onErrorCallback:function(e,n){return Je({errors:n,response:e})}})}}),kn=(0,u.Z)(Pn,1)[0];(0,a.useEffect)((function(){null!==nn&&void 0!==nn&&nn[O.$1.SEARCH]&&null===Ve&&We(null===nn||void 0===nn?void 0:nn[O.$1.SEARCH])}),[nn,Ve,We]),(0,a.useEffect)((function(){var e,n={};if(_n&&Cn.includes(+_n))(0,X.t8)(ne,_n),In&&(0,X.t8)(ie,In);else{var i=(0,X.U2)(ne,null),t=(0,X.U2)(ie,ae.sh.ASC);null!==i&&(n[ae.lG.SORT_COL_IDX]=i,n[ae.lG.SORT_DIRECTION]=t)}on&&(tn?(0,X.t8)(te,tn):n.tab=(0,X.U2)(te,null===Te||void 0===Te||null===(e=Te[0])||void 0===e?void 0:e.uuid));if(yn)oe((0,r.Z)({},yn,!0));else{var o,l=(0,X.U2)(ee,{});l&&Object.entries(l).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];!o&&t&&(o=i)})),o&&(n[O.$1.GROUP]=o)}if((0,Ze.Qr)(nn)){var c={},s=(0,X.U2)(J,{});s&&Object.entries(s).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];"undefined"!==typeof t&&null!==t&&(re.RG.includes(i)||Ae.includes(i)?c[i]=t:(c[i]=[],Object.entries(t).forEach((function(e){var n=(0,u.Z)(e,2),t=n[0];n[1]&&c[i].push(t)}))))})),(0,Ze.Qr)(c)||(n={},Object.entries(ye(ye({},n),c)||{}).forEach((function(e){var i=(0,u.Z)(e,2),t=i[0],o=i[1];"undefined"!==typeof o&&null!==o&&(n[t]=o)})))}else{var d={};Object.entries(nn).forEach((function(e){var n=(0,u.Z)(e,2),i=n[0],t=n[1];d[i]={};var o,r=t;"undefined"!==typeof t&&null!==t&&(re.RG.includes(i)||Ae.includes(i)?d[i]=r:(Array.isArray(r)||(r=[r]),r&&Array.isArray(r)&&(null===(o=r)||void 0===o||o.forEach((function(e){d[i][e]=!0})))))})),ue((0,Ze.hB)(d))}(0,Ze.Qr)(n)||(0,be.u)((0,Ze.hB)(n),{pushHistory:!1})}),[yn,on,nn,tn,Cn,_n,In]),(0,a.useEffect)((function(){(0,he.bB)(cn,Je)}),[cn]);var Tn=function(e){return(0,p.Db)(B.ZP.pipelines.useCreate(),{onSuccess:function(n){return(0,he.wD)(n,{callback:function(n){var i=n.pipeline.uuid;null===e||void 0===e||e(i)},onErrorCallback:function(e,n){return Je({errors:n,response:e})}})}})},En=Tn((function(e){return l.push("/pipelines/[pipeline]/edit","/pipelines/".concat(e,"/edit"))})),An=(0,u.Z)(En,2),Sn=An[0],On=An[1].isLoading,Mn=Tn((function(){null===sn||void 0===sn||sn(),null===fn||void 0===fn||fn()})),Dn=(0,u.Z)(Mn,2),Rn=Dn[0],Nn=Dn[1].isLoading,Ln=(0,p.Db)((function(e){return B.ZP.pipelines.useUpdate(e.uuid)({pipeline:e})}),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(e){var n=e.pipeline.uuid;Ke((function(e){return ye(ye({},e),{},(0,r.Z)({},n,!1))})),sn(),null===fn||void 0===fn||fn(),null===qn||void 0===qn||qn(),Ne(null)},onErrorCallback:function(e,n){var i,t=null===e||void 0===e||null===(i=e.url_parameters)||void 0===i?void 0:i.pk;Ke((function(e){return ye(ye({},e),{},(0,r.Z)({},t,!1))})),Je({errors:n,response:e})}})}}),Un=(0,u.Z)(Ln,2),Gn=Un[0],Hn=Un[1].isLoading,Yn=(0,p.Db)((function(e){return B.ZP.pipelines.useDelete(e)()}),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(){null===sn||void 0===sn||sn(),null===fn||void 0===fn||fn()},onErrorCallback:function(e,n){return Je({errors:n,response:e})}})}}),Bn=(0,u.Z)(Yn,2),$n=Bn[0],Vn=Bn[1].isLoading,Wn=(0,_e.dd)((function(e){var n=e.pipeline,i=e.pipelineDescription,t=e.pipelineName;return(0,T.jsx)(E,{isLoading:Hn,minWidth:55*se.iI,noEmptyValue:!!t,onClose:qn,onSave:function(e){var i=n||Re;if(i){var u=i.uuid,o={uuid:u};t?o.name=e:o.description=e,Ke((function(e){return ye(ye({},e),{},(0,r.Z)({},u,!0))})),Gn(o)}},textArea:!t,title:t?"Rename pipeline":"Edit description for ".concat(null===n||void 0===n?void 0:n.uuid),value:t||i})}),{},[Hn,Re],{background:!0,uuid:"rename_pipeline_and_save"}),zn=(0,u.Z)(Wn,2),Fn=zn[0],qn=zn[1],Kn=(0,_e.dd)((function(){return(0,T.jsx)(q.BC,{children:(0,T.jsx)(h.Z,{contained:!0,onClickCustomTemplate:function(e){Sn({pipeline:{custom_template_uuid:null===e||void 0===e?void 0:e.template_uuid,name:(0,fe.Y6)()}}).then((function(){Jn()}))},showBreadcrumbs:!0,tabs:[le.A2]})})}),{},[Sn],{background:!0,uuid:"browse_templates"}),Qn=(0,u.Z)(Kn,2),Xn=Qn[0],Jn=Qn[1],ei=(0,_e.dd)((function(e){var n=e.cancelButtonText,i=(e.header,e.onCancel),t=e.onSaveSuccess;return(0,T.jsx)(q.BC,{children:(0,T.jsx)(M.Z,{cancelButtonText:n,contained:!0,header:(0,T.jsx)(w.Z,{mb:se.HN,children:(0,T.jsxs)(I.Z,{children:[(0,T.jsx)(y.ZP,{warning:!0,children:"You need to add an OpenAI API key to your project before you can generate pipelines using AI."}),(0,T.jsx)(w.Z,{mt:1,children:(0,T.jsxs)(y.ZP,{warning:!0,children:["Read ",(0,T.jsx)(A.Z,{href:"https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key",openNewWindow:!0,children:"OpenAI\u2019s documentation"})," to get your API key."]})})]})}),onCancel:function(){null===i||void 0===i||i(),ti()},onSaveSuccess:function(e){D(),ti(),null===t||void 0===t||t(e)}})})}),{},[D],{background:!0,uuid:"configure_project"}),ni=(0,u.Z)(ei,2),ii=ni[0],ti=ni[1],ui=(0,_e.dd)((function(){return(0,T.jsx)(q.BC,{children:(0,T.jsx)(v.Z,{createPipeline:Sn,isLoading:On,onClose:li})})}),{},[Sn,On],{background:!0,disableClickOutside:!0,disableCloseButton:!0,uuid:"AI_modal"}),oi=(0,u.Z)(ui,2),ri=oi[0],li=oi[1],ci=(0,a.useMemo)((function(){return(0,ge.d)(Sn,{showAIModal:function(){null!==W&&void 0!==W&&W.openai_api_key?ri():ii({onSaveSuccess:function(){ri()}})},showBrowseTemplates:Xn})}),[Sn,W,ri,Xn,ii]),si=B.ZP.tags.list().data,di=(0,a.useMemo)((function(){return(0,xe.YC)((null===si||void 0===si?void 0:si.tags)||[],(function(e){return e.uuid}))}),[si]),ai=(0,a.useMemo)((function(){return(0,T.jsx)(Y.Z,{addButtonProps:{isLoading:On,label:"New",menuItems:ci},deleteRowProps:{confirmationMessage:"This is irreversible and will immediately delete everything associated with the pipeline, including its blocks, triggers, runs, logs, and history.",isLoading:Vn,item:"pipeline",onDelete:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===Re||void 0===Re?void 0:Re.uuid,"?"))&&$n(null===Re||void 0===Re?void 0:Re.uuid)}},extraActionButtonProps:{Icon:F.oX,confirmationDescription:"Cloning the selected pipeline will create a new pipeline with the same configuration and code blocks. The blocks use the same block files as the original pipeline. Pipeline triggers, runs, backfills, and logs are not copied over to the new pipeline.",confirmationMessage:"Do you want to clone the pipeline ".concat(null===Re||void 0===Re?void 0:Re.uuid,"?"),isLoading:Nn,onClick:function(){return Rn({pipeline:{clone_pipeline_uuid:null===Re||void 0===Re?void 0:Re.uuid}})},openConfirmationDialogue:!0,tooltip:"Clone pipeline"},filterOptions:{status:O.kA,tag:[O.$1.NO_TAGS].concat((0,o.Z)(di.map((function(e){return e.uuid})))),type:Object.values(O.qL)},filterValueLabelMapping:{status:O.kA.reduce((function(e,n){return ye(ye({},e),{},(0,r.Z)({},n,(0,fe.J3)((0,fe.kC)(n))))}),{}),tag:ye((0,r.Z)({},O.$1.NO_TAGS,"No tags"),di.reduce((function(e,n){var i=n.uuid;return ye(ye({},e),{},(0,r.Z)({},i,i))}),{})),type:O.G7},groupButtonProps:{groupByLabel:yn,menuItems:[{beforeIcon:yn===O.r0.STATUS?(0,T.jsx)(F.Jr,{fill:$.Z.content.default,size:1.5*se.iI}):(0,T.jsx)(F.Cd,{muted:!0,size:1.5*se.iI}),label:function(){return(0,fe.kC)(O.r0.STATUS)},onClick:function(){var e=yn===O.r0.STATUS?null:O.r0.STATUS;e||oe({}),(0,be.u)((0,r.Z)({},O.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Status"},{beforeIcon:yn===O.r0.TAG?(0,T.jsx)(F.Jr,{fill:$.Z.content.default,size:1.5*se.iI}):(0,T.jsx)(F.Cd,{muted:!0,size:1.5*se.iI}),label:function(){return(0,fe.kC)(O.r0.TAG)},onClick:function(){var e=yn===O.r0.TAG?null:O.r0.TAG;e||oe({}),(0,be.u)((0,r.Z)({},O.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Tag"},{beforeIcon:yn===O.r0.TYPE?(0,T.jsx)(F.Jr,{fill:$.Z.content.default,size:1.5*se.iI}):(0,T.jsx)(F.Cd,{muted:!0,size:1.5*se.iI}),label:function(){return(0,fe.kC)(O.r0.TYPE)},onClick:function(){var e=yn===O.r0.TYPE?null:O.r0.TYPE;e||oe({}),(0,be.u)((0,r.Z)({},O.$1.GROUP,e),{pushHistory:!0})},uuid:"Pipelines/GroupMenu/Type"}]},moreActionsMenuItems:[{label:function(){return"Rename pipeline"},onClick:function(){return Fn({pipelineName:null===Re||void 0===Re?void 0:Re.name})},uuid:"Pipelines/MoreActionsMenu/Rename"},{label:function(){return"Edit description"},onClick:function(){return Fn({pipeline:Re,pipelineDescription:null===Re||void 0===Re?void 0:Re.description})},uuid:"Pipelines/MoreActionsMenu/EditDescription"}],onClickFilterDefaults:function(){ue({}),l.push("/pipelines")},onFilterApply:function(e,n){Object.values(n).every((function(e){return!(null!==e&&void 0!==e&&e.length)}))&&ue({})},query:nn,resetLimitOnFilterApply:!0,searchProps:{onChange:ze,value:Ve},selectedRowId:null===Re||void 0===Re?void 0:Re.uuid,setSelectedRow:Ne})}),[Rn,$n,yn,Nn,On,Vn,ci,nn,l,Ve,Re,ze,Fn,di]),pi=(0,q.VI)(null,{},[],{uuid:"pipelines/list"}),fi=(0,u.Z)(pi,1)[0],vi=(0,p.Db)(B.ZP.projects.useUpdate(null===W||void 0===W?void 0:W.name),{onSuccess:function(e){return(0,he.wD)(e,{callback:function(){D()},onErrorCallback:function(e,n){return fi({errors:n,response:e})}})}}),hi=(0,u.Z)(vi,2),mi=hi[0],gi=hi[1].isLoading,bi=(0,a.useCallback)((function(e){return mi({project:e})}),[mi]),xi=(0,_e.dd)((function(){return(0,T.jsxs)(I.Z,{maxWidth:60*se.iI,children:[(0,T.jsx)(w.Z,{mb:1,children:(0,T.jsx)(C.Z,{children:"Help improve Mage"})}),(0,T.jsx)(w.Z,{mb:se.cd,children:(0,T.jsx)(y.ZP,{default:!0,children:"Please contribute usage statistics to help improve the developer experience for you and everyone in the community \ud83e\udd1d."})}),(0,T.jsx)(w.Z,{mb:se.cd,children:(0,T.jsx)(I.Z,{success:!0,children:(0,T.jsxs)(j.ZP,{alignItems:"center",children:[(0,T.jsx)(F.Yo,{size:5*se.iI,success:!0}),(0,T.jsx)(w.Z,{mr:1}),(0,T.jsx)(Z.Z,{children:(0,T.jsx)(y.ZP,{children:"All usage statistics are completely anonymous. It\u2019s impossible for Mage to know which statistics belongs to whom."})})]})})}),(0,T.jsx)(w.Z,{mb:se.cd,children:(0,T.jsxs)(y.ZP,{default:!0,children:["By opting into sending usage statistics to ",(0,T.jsx)(A.Z,{href:"https://www.mage.ai",openNewWindow:!0,children:"Mage"}),", it\u2019ll help the team and community of contributors (",(0,T.jsx)(A.Z,{href:"https://www.mage.ai/chat",openNewWindow:!0,children:"Magers"}),") learn what\u2019s going wrong with the tool and what improvements can be made."]})}),(0,T.jsx)(w.Z,{mb:se.cd,children:(0,T.jsx)(y.ZP,{default:!0,children:"In addition to helping reduce potential errors, you\u2019ll help inform which features are useful and which need work."})}),(0,T.jsx)(w.Z,{mb:se.cd,children:(0,T.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,T.jsx)(y.ZP,{bold:!0,children:"I want to help make Mage more powerful for everyone"}),(0,T.jsx)(w.Z,{mr:se.cd}),(0,T.jsx)(H.Z,{checked:!0,onCheck:function(){window.confirm("Are you sure you don\u2019t want to help everyone in the community?")&&bi({help_improve_mage:!1}).then((function(){return Ci()}))}})]})}),gi&&(0,T.jsx)(w.Z,{mb:se.cd,children:(0,T.jsx)(L.Z,{inverted:!0})}),(0,T.jsx)(w.Z,{mb:se.cd,children:(0,T.jsxs)(y.ZP,{muted:!0,small:!0,children:["To learn more about how this works, please check out the ",(0,T.jsx)(A.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,small:!0,children:"documentation"}),"."]})}),(0,T.jsx)(m.ZP,{onClick:function(){return bi({help_improve_mage:!0}).then((function(){return Ci()}))},secondary:!0,children:"Close"})]})}),{},[W],{background:!0,hideCallback:function(){bi({help_improve_mage:!0})},uuid:"help_mage"}),Zi=(0,u.Z)(xi,2),ji=Zi[0],Ci=Zi[1];(0,a.useEffect)((function(){W&&null===(null===W||void 0===W?void 0:W.help_improve_mage)&&ji()}),[W,ji]);var _i=(0,a.useCallback)((function(e){var n={};null===e||void 0===e||e.forEach((function(e,i){var t=null===e||void 0===e?void 0:e[yn];if(O.r0.STATUS===yn){var u=(e||{}).schedules,o=void 0===u?[]:u,r=o.length;t=o.find((function(e){var n=e.status;return de.fq.ACTIVE===n}))?O.QK.ACTIVE:r>=1?O.QK.INACTIVE:O.QK.NO_SCHEDULES}else if(O.r0.TAG===yn){t=(null===e||void 0===e?void 0:e.tags)?(0,xe.YC)(e.tags,(function(e){return e})).join(", "):""}n[t]||(n[t]=[]),n[t].push(i)}));var i=[],t=[];O.r0.STATUS===yn?Object.values(O.QK).forEach((function(e){i.push(n[e]),t.push((0,fe.vg)(e))})):O.r0.TAG===yn?(0,xe.YC)(Object.keys(n),(function(e){return e})).forEach((function(e){i.push(n[e]),e?t.push(e.split(", ").map((function(e,n){return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{style:{marginLeft:n>=1?4:0}},"".concat(e,"-").concat(n,"-spacing")),(0,T.jsx)(b.Z,{small:!0,children:(0,T.jsx)(y.ZP,{children:e})},"".concat(e,"-").concat(n))]})}))):t.push("No tags")})):O.r0.TYPE===yn&&Object.values(O.qL).forEach((function(e){i.push(n[e]),t.push(O.G7[e])}));var u=[],o=[];return null===i||void 0===i||i.forEach((function(e,n){"undefined"!==typeof e&&null!==e&&(null===e||void 0===e?void 0:e.length)>=1&&(o.push(e),u.push(null===t||void 0===t?void 0:t[n]))})),{rowGroupHeaders:u,rowsGroupedByIndex:o}}),[yn]),Ii=(0,a.useMemo)((function(){return _i(Zn)}),[_i,Zn]),wi=Ii.rowGroupHeaders,yi=Ii.rowsGroupedByIndex,Pi=(0,a.useMemo)((function(){return _i(jn)}),[_i,jn]),ki=Pi.rowGroupHeaders,Ti=Pi.rowsGroupedByIndex,Ei=(0,a.useCallback)((function(e,n,i,t,u){return(0,T.jsx)(U.Z,{columnFlex:[null,null,null,2,null,null,null,1,null,null,null],columns:[{label:function(){return""},uuid:"action"},{uuid:(0,fe.kC)(O.r0.STATUS)},{uuid:"Name"},{uuid:"Description"},{uuid:(0,fe.kC)(O.r0.TYPE)},ye(ye({},rn),{},{uuid:"Updated at"}),ye(ye({},rn),{},{uuid:"Created at"}),{uuid:"Tags"},{uuid:"Blocks"},{uuid:"Triggers"},{center:!0,label:function(){return""},uuid:"Actions"}],defaultSortColumnIndex:2,getUniqueRowIdentifier:xn,isSelectedRow:function(e){var i;return(null===(i=n[e])||void 0===i?void 0:i.uuid)===(null===Re||void 0===Re?void 0:Re.uuid)},localStorageKeySortColIdx:ne,localStorageKeySortDirection:ie,onClickRow:function(e){return Ne((function(i){var t=n[e];return(null===i||void 0===i?void 0:i.uuid)!==(null===t||void 0===t?void 0:t.uuid)?t:null}))},onDoubleClickRow:function(e){l.push("/pipelines/[pipeline]/edit","/pipelines/".concat(n[e].uuid,"/edit"))},ref:s,renderRightClickMenuItems:function(e){var i=n[e];return[{label:function(){return"Edit description"},onClick:function(){return Fn({pipeline:i,pipelineDescription:null===i||void 0===i?void 0:i.description})},uuid:"edit_description"},{label:function(){return"Rename"},onClick:function(){return Fn({pipeline:i,pipelineName:null===i||void 0===i?void 0:i.name})},uuid:"rename"},{label:function(){return"Clone"},onClick:function(){return Rn({pipeline:{clone_pipeline_uuid:null===i||void 0===i?void 0:i.uuid}})},uuid:"clone"},{label:function(){return"Download (keep folder structure)"},onClick:function(){kn({pipelineUUID:null===i||void 0===i?void 0:i.uuid,filesOnly:!1})},uuid:"download_keep_folder_structure"},{label:function(){return"Download (without folder structure)"},onClick:function(){kn({pipelineUUID:null===i||void 0===i?void 0:i.uuid,filesOnly:!0})},uuid:"download_without_folder_structure"},{label:function(){return"Add/Remove tags"},onClick:function(){l.push("/pipelines/[pipeline]/settings","/pipelines/".concat(null===i||void 0===i?void 0:i.uuid,"/settings"))},uuid:"add_tags"},{label:function(){return"Create template"},onClick:function(){l.push("/templates?object_type=".concat(ce.R,"&new=1&pipeline_uuid=").concat(null===i||void 0===i?void 0:i.uuid))},uuid:"create_custom_template"},{label:function(){return"Create global data product"},onClick:function(){l.push("/global-data-products?object_type=".concat(K.b.PIPELINE,"&new=1&object_uuid=").concat(null===i||void 0===i?void 0:i.uuid))},uuid:"create_global_data_product"},{label:function(){return"Delete"},onClick:function(){window.confirm("Are you sure you want to delete pipeline ".concat(null===i||void 0===i?void 0:i.uuid,"?"))&&$n(null===i||void 0===i?void 0:i.uuid)},uuid:"delete"}]},rightClickMenuHeight:252,rightClickMenuWidth:30*se.iI,rowGroupHeaders:i,rows:null===e||void 0===e?void 0:e.map((function(e,n){var i=e.blocks,t=e.created_at,u=e.description,o=e.schedules,c=e.tags,s=e.type,a=e.updated_at,p=e.uuid,f=i.filter((function(e){var n=e.type;return z.tf.SCRATCHPAD!==n})).length,v=o.length,h=o.find((function(e){var n=e.status;return de.fq.ACTIVE===n})),g=(0,T.jsx)("div",{children:(0,T.jsx)(G.Z,{tags:null===c||void 0===c?void 0:c.map((function(e){return{uuid:e}}))})},"pipeline_tags_".concat(n));return[v>=1||qe[p]?(0,T.jsx)(m.ZP,{iconOnly:!0,loading:!!qe[p],noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(n){(0,je.j)(n),Ke((function(e){return ye(ye({},e),{},(0,r.Z)({},p,!0))})),Gn(ye(ye({},e),{},{status:h?de.fq.INACTIVE:de.fq.ACTIVE}))},children:h?(0,T.jsx)(F.dz,{muted:!0,size:2*se.iI}):(0,T.jsx)(F.Py,{default:!0,size:2*se.iI})}):null,(0,T.jsx)(y.ZP,{default:!h,monospace:!0,success:!!h,children:h?de.fq.ACTIVE:v>=1?de.fq.INACTIVE:"no schedules"},"pipeline_status_".concat(n)),(0,T.jsx)(d(),{as:"/pipelines/".concat(p),href:"/pipelines/[pipeline]",passHref:!0,children:(0,T.jsx)(A.Z,{sameColorAsText:!0,children:p})},"pipeline_name_".concat(n)),(0,T.jsx)(y.ZP,{default:!0,preWrap:!0,title:u,children:u},"pipeline_description_".concat(n)),(0,T.jsx)(y.ZP,{children:O.G7[s]},"pipeline_type_".concat(n)),(0,T.jsx)(y.ZP,{monospace:!0,small:!0,title:a?(0,ve._6)(a):null,children:a?(0,ve.XG)(a,un):(0,T.jsx)(T.Fragment,{children:"\u2014"})},"pipeline_updated_at_".concat(n)),(0,T.jsx)(y.ZP,{monospace:!0,small:!0,title:t?(0,ve._6)(t):null,children:t?(0,ve.XG)(t.slice(0,19),un):(0,T.jsx)(T.Fragment,{children:"\u2014"})},"pipeline_created_at_".concat(n)),g,(0,T.jsx)(y.ZP,{default:0===f,monospace:!0,children:f},"pipeline_block_count_".concat(n)),(0,T.jsx)(y.ZP,{default:0===v,monospace:!0,children:v},"pipeline_trigger_count_".concat(n)),(0,T.jsxs)(Z.Z,{flex:1,justifyContent:"flex-end",children:[(0,T.jsx)(m.ZP,ye(ye({},Se),{},{onClick:function(){kn({pipelineUUID:p})},title:"Download (keep folder structure)",children:(0,T.jsx)(F.vc,{default:!0,size:2*se.iI})})),(0,T.jsx)(w.Z,{mr:1}),(0,T.jsx)(m.ZP,ye(ye({},Se),{},{onClick:function(){l.push("/pipelines/[pipeline]","/pipelines/".concat(p))},title:"Detail",children:(0,T.jsx)(F.UY,{default:!0,size:2*se.iI})})),(0,T.jsx)(w.Z,{mr:1}),(0,T.jsx)(m.ZP,ye(ye({},Se),{},{onClick:function(){l.push("/pipelines/[pipeline]/logs","/pipelines/".concat(p,"/logs"))},title:"Logs",children:(0,T.jsx)(F.$B,{default:!0,size:2*se.iI})}))]},"chevron_icon_".concat(n))]})),rowsGroupedByIndex:t,setRowsSorted:u,sortableColumnIndexes:Cn,sortedColumn:wn,stickyHeader:!0})}),[Rn,$n,kn,un,xn,qe,l,Re,Ke,Ne,Fn,Cn,wn,rn,Gn]),Ai=(0,a.useMemo)((function(){return Ei(hn,Zn,wi,yi,Ge)}),[hn,Zn,Ei,wi,yi,Ge]),Si=(0,a.useMemo)((function(){return Ei(mn,jn,ki,Ti,Be)}),[mn,jn,Ei,ki,Ti,Be]),Oi=(0,a.useMemo)((function(){return(null===hn||void 0===hn?void 0:hn.length)||0}),[hn]),Mi=(0,a.useMemo)((function(){return(null===mn||void 0===mn?void 0:mn.length)||0}),[mn]),Di=(0,a.useMemo)((function(){return(!on||ke.uuid===tn)&&!Oi||on&&Pe.uuid===tn&&!Mi}),[on,Oi,Mi,tn]),Ri=(0,a.useMemo)((function(){var e=null===nn||void 0===nn?void 0:nn[re.$D.LIMIT];return(0,T.jsxs)(j.ZP,{alignItems:"center",children:[(0,T.jsx)(y.ZP,{muted:!0,small:!0,children:"Per page"}),(0,T.jsx)(w.Z,{mr:1}),(0,T.jsxs)(N.Z,{compact:!0,onChange:function(e){return(0,be.u)((0,r.Z)({},re.$D.LIMIT,e.target.value),{pushHistory:!0})},small:!0,value:e,children:[e&&(e>5*S.Q||e%S.Q)&&(0,T.jsx)("option",{value:e,children:e}),(0,xe.w6)(5).map((function(e,n){var i=(n+1)*S.Q;return(0,T.jsx)("option",{value:i,children:i},i)}))]})]})}),[nn]),Ni=(0,a.useMemo)((function(){var e,n,i=cn;on&&Pe.uuid===tn&&(i=pn);var t=(null===(e=i)||void 0===e||null===(n=e.metadata)||void 0===n?void 0:n.count)||0,u=(null===nn||void 0===nn?void 0:nn[re.$D.LIMIT])||S.Q,o=(null===nn||void 0===nn?void 0:nn[re.$D.OFFSET])||0,l=Math.ceil(t/u);return(0,T.jsx)(w.Z,{p:se.cd,children:(0,T.jsx)(S.ZP,{maxPages:S.Et,onUpdate:function(e){var n=Number(e);(0,be.u)((0,r.Z)({},re.$D.OFFSET,n*u))},page:Math.floor(o/u),totalPages:l})})}),[cn,pn,on,nn,tn]);return(0,T.jsxs)(x.Z,{errors:Xe,setErrors:Je,subheaderChildren:(0,T.jsxs)(j.ZP,{alignItems:"center",justifyContent:"space-between",children:[ai,Ri]}),title:"Pipelines",uuid:"pipelines/index",children:[on&&(0,T.jsx)(w.Z,{px:se.cd,ref:c,children:(0,T.jsx)(g.Z,{noPadding:!0,onClickTab:function(e){var n,i=e.uuid;return(0,be.u)((n={},(0,r.Z)(n,Ee,i),(0,r.Z)(n,re.$D.LIMIT,null),(0,r.Z)(n,re.$D.OFFSET,null),n),{pushHistory:!0})},regularSizeText:!0,selectedTabUUID:tn,tabs:Te.map((function(e){var n=e.Icon,i=e.label;return{Icon:n,label:function(){var e;return i({count:null===cn||void 0===cn||null===(e=cn.metadata)||void 0===e?void 0:e.count})},uuid:e.uuid}})),underlineStyle:!0})}),Di?(0,T.jsx)(w.Z,{p:se.Mq,children:cn?(0,T.jsx)(y.ZP,{bold:!0,default:!0,monospace:!0,muted:!0,children:"No pipelines available"}):(0,T.jsx)(L.Z,{inverted:!0,large:!0})}):null,(0,T.jsxs)(pe.cl,{hide:Di,includePadding:!!yn,maxHeight:"calc(100vh - ".concat(Q.Mz+74+(Oe||0)+(null===_||void 0===_||null===(n=_.current)||void 0===n||null===(i=n.getBoundingClientRect)||void 0===i||null===(t=i.call(n))||void 0===t?void 0:t.height),"px)"),children:[(!on||ke.uuid===tn)&&Ai,on&&Pe.uuid===tn&&Si]}),(0,T.jsx)("div",{ref:_,children:Ni})]})}Oe.getInitialProps=(0,t.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 Me=(0,D.Z)(Oe)},44952:function(e,n,i){"use strict";i.d(n,{K:function(){return u}});var t=i(4383);function u(e){var n=(0,t.ZP)("downloads",e),i=document.createElement("a");i.href=n,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(n),document.body.removeChild(i)}},79274:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/pipelines",function(){return i(55620)}])}},function(e){e.O(0,[2678,1154,844,5820,6639,1124,1751,341,1821,874,9626,8264,7858,5499,5283,3745,5810,3859,2646,8998,3004,9264,2474,1952,9774,2888,179],(function(){return n=79274,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([[3853],{55729:function(e,n,t){"use strict";t.d(n,{Z:function(){return B}});var i=t(82394),r=t(75582),o=t(82684),c=t(69864),l=t(71180),a=t(15338),d=t(97618),s=t(55485),u=t(85854),p=t(48670),f=t(65956),h=t(82359),g=t(88543),m=t(38276),j=t(30160),x=t(17488),v=t(69650),b=t(12468),y=t(35686),Z=t(77417),w=t(38626),O=t(44897),P=t(42631),_=t(70515),k=w.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1b0w59t-0"})(["border-radius:","px;padding:","px;",""],P.n_,_.cd*_.iI,(function(e){return"\n background-color: ".concat((e.theme.background||O.Z.background).codeArea,";\n ")})),I=t(72473),C=t(72191),S=t(70320),H=t(81728),N=t(42122),z=t(72619),D=t(23780),E=t(28598);function L(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 W(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var B=function(e){var n,t,w,O=e.cancelButtonText,P=e.contained,L=e.header,B=e.onCancel,V=e.onSaveSuccess,M=(0,D.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),A=(0,r.Z)(M,1)[0],F=(0,o.useState)(null),R=F[0],T=F[1],X=(0,o.useState)(!1),Y=X[0],Q=X[1],U=(0,Z.Z)(),q=U.project,G=U.fetchProjects,J=q||{},K=J.name,$=J.openai_api_key,ee=J.project_uuid,ne=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){R||T(q)}),[q,R]);var te=(0,c.Db)(y.ZP.projects.useUpdate(K),{onSuccess:function(e){return(0,z.wD)(e,{callback:function(e){var n,t=e.project;G(),T(t),Q(!1),(0,S.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[h.d.LOCAL_TIMEZONE]),V&&(null===V||void 0===V||V(t))},onErrorCallback:function(e,n){return A({errors:n,response:e})}})}}),ie=(0,r.Z)(te,2),re=ie[0],oe=ie[1].isLoading,ce=(0,o.useCallback)((function(e){return re({project:e})}),[re]),le=(0,E.jsxs)(E.Fragment,{children:[L,(0,E.jsxs)(f.Z,{noPadding:!0,children:[(0,E.jsxs)(m.Z,{p:_.cd,children:[(0,E.jsx)(m.Z,{mb:1,children:(0,E.jsx)(u.Z,{level:5,children:"Project name"})}),(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:K})]}),(0,E.jsx)(a.Z,{light:!0}),(0,E.jsxs)(m.Z,{p:_.cd,children:[(0,E.jsx)(m.Z,{mb:1,children:(0,E.jsx)(u.Z,{level:5,children:"Project UUID"})}),(0,E.jsx)(j.ZP,{default:!!ee,monospace:!0,muted:!ee,children:ee||"Not required"})]}),(0,E.jsx)(a.Z,{light:!0}),(0,E.jsx)(m.Z,{p:_.cd,children:(0,E.jsxs)(s.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,E.jsxs)(d.Z,{flexDirection:"column",children:[(0,E.jsx)(m.Z,{mb:1,children:(0,E.jsx)(u.Z,{level:5,children:"Help improve Mage"})}),(0,E.jsxs)(j.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,E.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,E.jsx)(m.Z,{mr:_.cd}),(0,E.jsx)(v.Z,{compact:!0,checked:null===R||void 0===R?void 0:R.help_improve_mage,onCheck:function(){return T((function(e){return W(W({},e),{},{help_improve_mage:!(null!==R&&void 0!==R&&R.help_improve_mage)})}))}})]})})]}),(0,E.jsx)(m.Z,{mt:_.HN}),(0,E.jsx)(g.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,E.jsx)(g.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===R||void 0===R||null===(n=R.pipelines)||void 0===n||null===(t=n.settings)||void 0===t||null===(w=t.triggers)||void 0===w||!w.save_in_code_automatically),onCheck:function(e){return T((function(n){var t,i,r,o,c,l;return W(W({},n),{},{pipelines:W(W({},null===n||void 0===n?void 0:n.pipelines),{},{settings:W(W({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:W(W({},null===n||void 0===n||null===(i=n.pipelines)||void 0===i||null===(r=i.settings)||void 0===r?void 0:r.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,E.jsx)(m.Z,{mt:_.HN}),(0,E.jsx)(f.Z,{noPadding:!0,overflowVisible:!0,children:(0,E.jsxs)(m.Z,{p:_.cd,children:[(0,E.jsx)(m.Z,{mb:1,children:(0,E.jsx)(u.Z,{level:5,children:"Features"})}),Object.entries((0,N.gR)(null===R||void 0===R?void 0:R.features,[h.d.GLOBAL_HOOKS])||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],c=t[1];return(0,E.jsx)(m.Z,{mt:0===n?0:1,children:(0,E.jsxs)(s.ZP,{alignItems:"center",children:[(0,E.jsx)(v.Z,{checked:!!c,compact:!0,onCheck:function(){return T((function(e){return W(W({},e),{},{features:W(W({},null===R||void 0===R?void 0:R.features),{},(0,i.Z)({},o,!c))})}))}}),(0,E.jsx)(m.Z,{mr:_.cd}),(0,E.jsxs)(d.Z,{children:[(0,E.jsx)(j.ZP,{default:!c,monospace:!0,children:(0,H.vg)(o)}),o===h.d.LOCAL_TIMEZONE&&(0,E.jsx)(m.Z,{ml:1,children:(0,E.jsx)(b.Z,W({},S.EB))})]})]})},o)}))]})}),(0,E.jsx)(m.Z,{mt:_.HN}),(0,E.jsx)(f.Z,{noPadding:!0,children:(0,E.jsxs)(m.Z,{p:_.cd,children:[(0,E.jsx)(m.Z,{mb:1,children:(0,E.jsx)(u.Z,{level:5,children:"OpenAI"})}),$&&!Y?(0,E.jsxs)(s.ZP,W(W({},s.A0),{},{children:[(0,E.jsx)(j.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,E.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return Q(!0)},secondary:!0,title:"Edit",children:(0,E.jsx)(I.I8,{size:C.bL})})]})):(0,E.jsx)(x.Z,{disabled:ne,label:ne?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return T((function(n){return W(W({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===R||void 0===R?void 0:R.openai_api_key)||""})]})}),(0,E.jsx)(m.Z,{mt:_.HN}),(0,E.jsxs)(s.ZP,{alignItems:"center",children:[(0,E.jsx)(l.ZP,{loading:oe,onClick:function(){ce({features:null===R||void 0===R?void 0:R.features,help_improve_mage:null===R||void 0===R?void 0:R.help_improve_mage,openai_api_key:null===R||void 0===R?void 0:R.openai_api_key,pipelines:null===R||void 0===R?void 0:R.pipelines})},primary:!0,children:"Save project settings"}),B&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(m.Z,{mr:_.cd}),(0,E.jsx)(l.ZP,{onClick:B,secondary:!0,children:O||"Cancel"})]})]})]});return P?(0,E.jsx)(k,{children:le}):le}},46568:function(e,n,t){"use strict";var i=t(82394),r=t(26304),o=(t(82684),t(33591)),c=t(28598),l=["children","fullHeight","gutter","style"];function a(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 d(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,i.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}n.Z=function(e){var n=e.children,t=e.fullHeight,i=e.gutter,a=e.style,s=void 0===a?{}:a,u=(0,r.Z)(e,l),p=d({},s);return i&&(p.paddingLeft=i,p.paddingRight=p.paddingLeft),t&&(p.height="100%"),(0,c.jsx)(o.Col,d(d({},u),{},{style:p,children:n}))}},82682:function(e,n,t){"use strict";var i=t(82394),r=t(26304),o=t(82684),c=t(33591),l=t(28598),a=["children","fullHeight","gutter","justifyContent","style"];function d(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 s(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,i.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,i=e.gutter,d=e.justifyContent,u=e.style,p=void 0===u?{}:u,f=(0,r.Z)(e,a),h=s({},p);return i&&(h.marginLeft=-1*i,h.marginRight=h.marginLeft),t&&(h.height="100%"),(0,l.jsx)(c.Row,s(s({},f),{},{justifyContent:d,style:h,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:i,key:n})}))}))}},88543:function(e,n,t){"use strict";t.d(n,{S:function(){return y},Z:function(){return Z}});var i=t(82684),r=t(15338),o=t(97618),c=t(55485),l=t(85854),a=t(65956),d=t(82394),s=t(44085),u=t(38276),p=t(30160),f=t(17488),h=t(69650),g=t(72473),m=t(8193),j=t(70515),x=t(28598);function v(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 b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,d.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var y=function(e){var n,t=e.children,i=e.description,r=e.invalid,l=e.large,a=void 0===l||l,d=e.selectInput,v=e.textInput,y=e.title,Z=e.toggleSwitch,w=e.warning;return(0,x.jsx)(u.Z,{p:j.cd,children:(0,x.jsxs)(c.ZP,{alignItems:"center",children:[(0,x.jsxs)(c.ZP,{flexDirection:"column",children:[(0,x.jsxs)(p.ZP,{danger:r,default:!0,large:a,warning:w,children:[y," ",r&&(0,x.jsx)(p.ZP,{danger:!0,inline:!0,large:a,children:"is required"})]}),i&&"string"===typeof i&&(0,x.jsx)(p.ZP,{muted:!0,small:!0,children:i}),i&&"string"!==typeof i&&i]}),(0,x.jsx)(u.Z,{mr:j.cd}),(0,x.jsxs)(o.Z,{flex:1,justifyContent:"flex-end",children:[t,v&&(0,x.jsx)(f.Z,b({afterIcon:(0,x.jsx)(g.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:a,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},v)),d&&(0,x.jsx)(s.Z,b(b({},d),{},{afterIcon:(0,x.jsx)(g._M,{}),afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:a,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===d||void 0===d||null===(n=d.options)||void 0===n?void 0:n.map((function(e){var n=e.label,t=e.value;return(0,x.jsx)("option",{value:t,children:n||t},t)}))})),Z&&(0,x.jsx)(h.Z,{checked:!(null===Z||void 0===Z||!Z.checked),compact:!0,onCheck:null===Z||void 0===Z?void 0:Z.onCheck})]})]})})},Z=function(e){var n=e.children,t=e.description,d=e.headerChildren,s=e.title;return(0,x.jsxs)(a.Z,{noPadding:!0,children:[(0,x.jsx)(u.Z,{p:j.cd,children:(0,x.jsxs)(c.ZP,{alignItems:"center",children:[(0,x.jsxs)(o.Z,{flex:1,flexDirection:"column",children:[(0,x.jsx)(l.Z,{level:4,children:s}),t&&"string"===typeof t&&(0,x.jsx)(u.Z,{mt:1,children:(0,x.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),d]})}),i.Children.map(n,(function(e,n){return(0,x.jsxs)("div",{children:[(0,x.jsx)(r.Z,{light:!0}),e]},"".concat(s,"-").concat(n))}))]})}},8193:function(e,n,t){"use strict";t.d(n,{N:function(){return a},Z:function(){return l}});var i=t(38626),r=t(44897),o=t(42631),c=t(70515),l=2*c.iI,a=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],o.n_,c.cd*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).codeArea,";\n ")}))},65956:function(e,n,t){"use strict";var i=t(38626),r=t(55485),o=t(38276),c=t(30160),l=t(44897),a=t(42631),d=t(47041),s=t(70515),u=t(28598),p=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*s.iI,1.5*s.iI,1.5*s.iI),f=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],a.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||l.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||l.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||l.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),h=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],a.n_,a.n_,(function(e){return"\n background-color: ".concat((e.theme.background||l.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||l.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),g=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*s.iI,d.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*s.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],a.M8,a.YF,1.75*s.iI);n.Z=function(e){var n=e.borderless,t=e.children,i=e.containerRef,l=e.contentContainerRef,a=e.dark,d=e.footer,s=e.fullHeight,p=void 0===s||s,j=e.fullWidth,x=void 0===j||j,v=e.header,b=e.headerHeight,y=e.headerIcon,Z=e.headerPaddingVertical,w=e.headerTitle,O=e.maxHeight,P=e.maxWidth,_=e.minWidth,k=e.noPadding,I=e.overflowVisible,C=e.subtitle,S=e.success;return(0,u.jsxs)(f,{borderless:n,dark:a,fullHeight:p,fullWidth:x,maxHeight:O,maxWidth:P,minWidth:_,overflowVisible:I,ref:i,success:S,children:[(v||w)&&(0,u.jsxs)(h,{headerPaddingVertical:Z,height:b,children:[v&&v,w&&(0,u.jsx)(r.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,u.jsxs)(r.ZP,{alignItems:"center",children:[y&&y,(0,u.jsx)(o.Z,{ml:y?1:0,children:(0,u.jsx)(c.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,u.jsxs)(g,{maxHeight:O,noPadding:k,overflowVisible:I,ref:l,children:[C&&"string"===typeof C&&(0,u.jsx)(o.Z,{mb:2,children:(0,u.jsx)(c.ZP,{default:!0,children:C})}),C&&"string"!==typeof C&&C,t]}),d&&(0,u.jsx)(m,{children:d})]})}},85854:function(e,n,t){"use strict";var i,r,o,c,l,a,d,s,u=t(82394),p=t(26304),f=t(26653),h=t(38626),g=t(33591),m=t(44897),j=t(95363),x=t(61896),v=t(30160),b=t(70515),y=t(38276),Z=t(28598),w=["children","condensed","inline","level","marketing","spacingBelow"];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 P(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,u.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 _=(0,h.css)([""," margin:0;"," "," "," "," "," "," "," "," "," "," "," "," "," ",""],v.IH,(function(e){return e.color&&"\n color: ".concat(e.color,"\n ")}),(function(e){return e.yellow&&"\n color: ".concat((e.theme.accent||m.Z.accent).yellow,";\n ")}),(function(e){return e.center&&"\n text-align: center;\n "}),(function(e){return!e.monospace&&0===Number(e.weightStyle)&&"\n font-family: ".concat(j.iI,";\n ")}),(function(e){return!e.monospace&&1===Number(e.weightStyle)&&"\n font-family: ".concat(j.LX,";\n ")}),(function(e){return!e.monospace&&2===Number(e.weightStyle)&&"\n font-family: ".concat(j.LX,";\n ")}),(function(e){return!e.monospace&&3===Number(e.weightStyle)&&"\n font-family: ".concat(j.ry,";\n ")}),(function(e){return!e.monospace&&4===Number(e.weightStyle)&&"\n font-family: ".concat(j.YC,";\n ")}),(function(e){return!e.monospace&&5===Number(e.weightStyle)&&"\n font-family: ".concat(j.nF,";\n ")}),(function(e){return!e.monospace&&(6===Number(e.weightStyle)||e.bold)&&"\n font-family: ".concat(j.nF,";\n ")}),(function(e){return!e.monospace&&7===Number(e.weightStyle)&&"\n font-family: ".concat(j.nF,";\n ")}),(function(e){return!e.monospace&&8===Number(e.weightStyle)&&"\n font-family: ".concat(j.nF,";\n ")}),(function(e){return e.lineHeightAuto&&"\n line-height: normal !important;\n "}),(function(e){return e.strikethrough&&"\n text-decoration: line-through;\n "})),k=h.default.div.withConfig({displayName:"Headline__HeadlineContainerStyle",componentId:"sc-12jzt2e-0"})(["",""],(function(e){return"\n color: ".concat((e.theme.content||m.Z.content).active,";\n ")})),I=h.default.h1.withConfig({displayName:"Headline__H1HeroStyle",componentId:"sc-12jzt2e-1"})([""," font-size:42px;line-height:56px;"," "," ",""],_,g.media.md(i||(i=(0,f.Z)(["\n ","\n "])),x.aQ),g.media.lg(r||(r=(0,f.Z)(["\n ","\n "])),x.aQ),g.media.xl(o||(o=(0,f.Z)(["\n ","\n "])),x.aQ)),C=h.default.h1.withConfig({displayName:"Headline__H1Style",componentId:"sc-12jzt2e-2"})([""," ",""],_,x.MJ),S=h.default.h1.withConfig({displayName:"Headline__H1MarketingStyle",componentId:"sc-12jzt2e-3"})([""," "," "," "," "," ",""],_,g.media.xs(c||(c=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),g.media.sm(l||(l=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),g.media.md(a||(a=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),g.media.lg(d||(d=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI),g.media.xl(s||(s=(0,f.Z)(["\n font-size: ","px;\n line-height: ","px;\n "])),6*b.iI,7*b.iI)),H=h.default.h2.withConfig({displayName:"Headline__H2Style",componentId:"sc-12jzt2e-4"})([""," ",""],_,x.BL),N=h.default.h3.withConfig({displayName:"Headline__H3Style",componentId:"sc-12jzt2e-5"})([""," font-size:24px;line-height:32px;"],_),z=h.default.h4.withConfig({displayName:"Headline__H4Style",componentId:"sc-12jzt2e-6"})([""," font-size:20px;line-height:28px;"],_),D=h.default.h5.withConfig({displayName:"Headline__H5Style",componentId:"sc-12jzt2e-7"})([""," font-size:18px;line-height:26px;"],_),E=h.default.span.withConfig({displayName:"Headline__SpanStyle",componentId:"sc-12jzt2e-8"})([""," "," "," "," ",""],_,(function(e){return 1===e.level&&"\n ".concat(x.MJ,"\n ")}),(function(e){return 2===e.level&&"\n ".concat(x.BL,"\n ")}),(function(e){return 3===e.level&&"\n font-size: 24px;\n line-height: 32px;\n "}),(function(e){return 4===e.level&&"\n font-size: 20px;\n line-height: 28px;\n "})),L=function(e){var n,t=e.children,i=e.condensed,r=e.inline,o=e.level,c=e.marketing,l=e.spacingBelow,a=(0,p.Z)(e,w);r?n=E:0===Number(o)?n=I:1===Number(o)?n=c?S:C:2===Number(o)?n=H:3===Number(o)?n=N:4===Number(o)?n=z:5===Number(o)&&(n=D);var d=(0,Z.jsxs)(n,P(P({},a),{},{level:o,children:[l&&(0,Z.jsx)(y.Z,{mb:i?2:3,children:t}),!l&&t]}));return r?d:(0,Z.jsx)(k,{children:d})};L.defaultProps={level:3,weightStyle:6},n.Z=L},61316:function(e,n,t){"use strict";t.r(n);var i=t(77837),r=t(38860),o=t.n(r),c=t(46568),l=t(55729),a=t(93808),d=t(82682),s=t(28274),u=t(38276),p=t(70515),f=t(24755),h=t(28598);function g(){return(0,h.jsx)(s.Z,{uuidItemSelected:f.HY,uuidWorkspaceSelected:f.WH,children:(0,h.jsx)(u.Z,{p:p.cd,children:(0,h.jsx)(d.Z,{justifyContent:"center",children:(0,h.jsx)(c.Z,{xl:8,xxl:6,children:(0,h.jsx)(l.Z,{})})})})})}g.getInitialProps=(0,i.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,a.Z)(g)},33323:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings/workspace/preferences",function(){return t(61316)}])}},function(e){e.O(0,[2678,1154,844,874,9626,8264,8432,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([[6568],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return P}});var n=r(82394),i=r(21831),o=r(82684),u=r(50724),s=r(82555),a=r(97618),c=r(70613),d=r(79626),l=r(68899),f=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,f.jsx)(l.HS,{noPadding:n,ref:t,children:r})}var p=o.forwardRef(h),b=r(62547),m=r(82571),v=r(98464),j=r(77417),O=r(46684),g=r(70515),w=r(53808),_=r(19183);function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Z(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,h=e.afterHidden,x=e.afterWidth,Z=e.afterWidthOverride,P=e.appendBreadcrumbs,C=e.before,E=e.beforeWidth,k=e.breadcrumbs,H=e.children,A=e.errors,M=e.headerMenuItems,S=e.headerOffset,B=e.hideAfterCompletely,R=e.mainContainerHeader,T=e.navigationItems,I=e.setAfterHidden,N=e.setErrors,W=e.subheaderChildren,D=e.subheaderNoPadding,U=e.title,z=e.uuid,F=(0,_.i)().width,X="dashboard_after_width_".concat(z),q="dashboard_before_width_".concat(z),V=(0,o.useRef)(null),G=(0,o.useState)(Z?x:(0,w.U2)(X,x)),J=G[0],K=G[1],L=(0,o.useState)(!1),Q=L[0],Y=L[1],$=(0,o.useState)(C?Math.max((0,w.U2)(q,E),13*g.iI):null),ee=$[0],te=$[1],re=(0,o.useState)(!1),ne=re[0],ie=re[1],oe=(0,o.useState)(null)[1],ue=(0,j.Z)().project,se=[];k&&se.push.apply(se,(0,i.Z)(k)),null!==k&&void 0!==k&&k.length&&!P||!ue||null!==k&&void 0!==k&&k.length||se.unshift({bold:!P,label:function(){return U}}),(0,o.useEffect)((function(){null===V||void 0===V||!V.current||Q||ne||null===oe||void 0===oe||oe(V.current.getBoundingClientRect().width)}),[Q,J,ne,ee,V,oe,F]),(0,o.useEffect)((function(){Q||(0,w.t8)(X,J)}),[h,Q,J,X]),(0,o.useEffect)((function(){ne||(0,w.t8)(q,ee)}),[ne,ee,q]);var ae=(0,v.Z)(x);return(0,o.useEffect)((function(){Z&&ae!==x&&K(x)}),[Z,x,ae]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c.Z,{title:U}),(0,f.jsx)(d.Z,{breadcrumbs:se,menuItems:M}),(0,f.jsxs)(l.Nk,{ref:t,children:[0!==(null===T||void 0===T?void 0:T.length)&&(0,f.jsx)(l.lm,{showMore:!0,children:(0,f.jsx)(m.Z,{navigationItems:T,showMore:!0})}),(0,f.jsx)(a.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(b.Z,{after:r,afterHeader:n,afterHeightOffset:O.Mz,afterHidden:h,afterMousedownActive:Q,afterWidth:J,before:C,beforeHeightOffset:O.Mz,beforeMousedownActive:ne,beforeWidth:l.k1+(C?ee:0),headerOffset:S,hideAfterCompletely:!I||B,leftOffset:C?l.k1:null,mainContainerHeader:R,mainContainerRef:V,setAfterHidden:I,setAfterMousedownActive:Y,setAfterWidth:K,setBeforeMousedownActive:ie,setBeforeWidth:te,children:[W&&(0,f.jsx)(p,{noPadding:D,children:W}),H]})})]}),A&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===N||void 0===N?void 0:N(null)},children:(0,f.jsx)(s.Z,y(y({},A),{},{onClose:function(){return null===N||void 0===N?void 0:N(null)}}))})]})}var P=o.forwardRef(Z)},14759:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(38860),o=r.n(i),u=r(82684),s=r(44898),a=r(94629),c=r(88328),d=r(93808),l=r(38276),f=r(4190),h=r(5755),p=r(35686),b=r(70515),m=r(69419),v=r(28598);function j(e){var t,r=e.objectType,n=e.slug,i=(0,m.iV)().object_type,o=(0,u.useState)(null),d=o[0],j=o[1],O=i||r||s.Z,g=s.R===O,w=p.ZP.custom_templates.detail(n&&encodeURIComponent(n),{object_type:O}).data;return(0,u.useEffect)((function(){w&&j(null===w||void 0===w?void 0:w.custom_template)}),[w]),(0,v.jsxs)(a.Z,{addProjectBreadcrumbToCustomBreadcrumbs:!0,breadcrumbs:[{label:function(){return"Templates"},linkProps:{href:g?"/templates?object_type=".concat(s.R):"/templates"}},{bold:!0,label:function(){return n}}],title:n,uuid:"TemplatesDetail/index",children:[!w&&(0,v.jsx)(l.Z,{p:b.cd,children:(0,v.jsx)(f.Z,{inverted:!0})}),d&&(0,v.jsxs)(v.Fragment,{children:[(!O||s.Z===O)&&(0,v.jsx)(h.Z,{template:d},null===d||void 0===d||null===(t=d.content)||void 0===t?void 0:t.slice(0,40)),g&&(0,v.jsx)(c.Z,{template:d})]})]})}j.getInitialProps=function(){var e=(0,n.Z)(o().mark((function e(t){var r,n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.query,n=r.object_type,i=r.slug,e.abrupt("return",{objectType:n,slug:i});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.default=(0,d.Z)(j)},45082:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates/[...slug]",function(){return r(14759)}])}},function(e){e.O(0,[2678,1154,844,5820,6639,1124,1751,341,1821,874,9626,8264,7858,5499,5283,3745,5810,3859,2646,8998,3004,9264,9774,2888,179],(function(){return t=45082,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([[4841],{94629:function(e,t,r){"use strict";r.d(t,{Z:function(){return x}});var n=r(82394),i=r(21831),o=r(82684),u=r(50724),s=r(82555),c=r(97618),f=r(70613),a=r(79626),d=r(68899),l=r(28598);function h(e,t){var r=e.children,n=e.noPadding;return(0,l.jsx)(d.HS,{noPadding:n,ref:t,children:r})}var b=o.forwardRef(h),p=r(62547),v=r(82571),O=r(98464),j=r(77417),m=r(46684),w=r(70515),g=r(53808),y=r(19183);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function P(e,t){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,n=e.afterHeader,h=e.afterHidden,_=e.afterWidth,P=e.afterWidthOverride,x=e.appendBreadcrumbs,E=e.before,M=e.beforeWidth,C=e.breadcrumbs,k=e.children,H=e.errors,A=e.headerMenuItems,S=e.headerOffset,R=e.hideAfterCompletely,I=e.mainContainerHeader,N=e.navigationItems,W=e.setAfterHidden,B=e.setErrors,D=e.subheaderChildren,T=e.subheaderNoPadding,z=e.title,U=e.uuid,X=(0,y.i)().width,q="dashboard_after_width_".concat(U),F="dashboard_before_width_".concat(U),G=(0,o.useRef)(null),J=(0,o.useState)(P?_:(0,g.U2)(q,_)),K=J[0],L=J[1],Q=(0,o.useState)(!1),V=Q[0],Y=Q[1],$=(0,o.useState)(E?Math.max((0,g.U2)(F,M),13*w.iI):null),ee=$[0],te=$[1],re=(0,o.useState)(!1),ne=re[0],ie=re[1],oe=(0,o.useState)(null)[1],ue=(0,j.Z)().project,se=[];C&&se.push.apply(se,(0,i.Z)(C)),null!==C&&void 0!==C&&C.length&&!x||!ue||null!==C&&void 0!==C&&C.length||se.unshift({bold:!x,label:function(){return z}}),(0,o.useEffect)((function(){null===G||void 0===G||!G.current||V||ne||null===oe||void 0===oe||oe(G.current.getBoundingClientRect().width)}),[V,K,ne,ee,G,oe,X]),(0,o.useEffect)((function(){V||(0,g.t8)(q,K)}),[h,V,K,q]),(0,o.useEffect)((function(){ne||(0,g.t8)(F,ee)}),[ne,ee,F]);var ce=(0,O.Z)(_);return(0,o.useEffect)((function(){P&&ce!==_&&L(_)}),[P,_,ce]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(f.Z,{title:z}),(0,l.jsx)(a.Z,{breadcrumbs:se,menuItems:A}),(0,l.jsxs)(d.Nk,{ref:t,children:[0!==(null===N||void 0===N?void 0:N.length)&&(0,l.jsx)(d.lm,{showMore:!0,children:(0,l.jsx)(v.Z,{navigationItems:N,showMore:!0})}),(0,l.jsx)(c.Z,{flex:1,flexDirection:"column",children:(0,l.jsxs)(p.Z,{after:r,afterHeader:n,afterHeightOffset:m.Mz,afterHidden:h,afterMousedownActive:V,afterWidth:K,before:E,beforeHeightOffset:m.Mz,beforeMousedownActive:ne,beforeWidth:d.k1+(E?ee:0),headerOffset:S,hideAfterCompletely:!W||R,leftOffset:E?d.k1:null,mainContainerHeader:I,mainContainerRef:G,setAfterHidden:W,setAfterMousedownActive:Y,setAfterWidth:L,setBeforeMousedownActive:ie,setBeforeWidth:te,children:[D&&(0,l.jsx)(b,{noPadding:T,children:D}),k]})})]}),H&&(0,l.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,l.jsx)(s.Z,Z(Z({},H),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}var x=o.forwardRef(P)},74805:function(e,t,r){"use strict";r.r(t);var n=r(77837),i=r(38860),o=r.n(i),u=(r(82684),r(56085)),s=r(94629),c=r(93808),f=r(28026),a=r(4383),d=r(50178),l=r(28598);function h(){var e=(0,d.PR)()||{},t=(0,u.ZP)((0,a.Ib)("terminal"),{queryParams:{term_name:null===e||void 0===e?void 0:e.id},shouldReconnect:function(){return!0}}),r=t.lastMessage,n=t.sendMessage;return(0,l.jsx)(s.Z,{title:"Terminal",uuid:"terminal/index",children:(0,l.jsx)(f.Z,{lastMessage:r,sendMessage:n})})}h.getInitialProps=(0,n.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,c.Z)(h)},27271:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/terminal",function(){return r(74805)}])},80022:function(e,t,r){"use strict";function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}r.d(t,{Z:function(){return n}})},15544:function(e,t,r){"use strict";function n(e){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(e)}r.d(t,{Z:function(){return n}})},13692:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(61049);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(0,n.Z)(e,t)}},93189:function(e,t,r){"use strict";r.d(t,{Z:function(){return o}});var n=r(12539),i=r(80022);function o(e,t){if(t&&("object"===n(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,i.Z)(e)}},61049:function(e,t,r){"use strict";function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}r.d(t,{Z:function(){return n}})}},function(e){e.O(0,[2678,1154,844,874,9626,8264,9774,2888,179],(function(){return t=27271,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([[5378],{82359:function(e,n,t){"use strict";var o,r;t.d(n,{d:function(){return o},k:function(){return r}}),function(e){e.ADD_NEW_BLOCK_V2="add_new_block_v2",e.COMPUTE_MANAGEMENT="compute_management",e.CUSTOM_DESIGN="custom_design",e.DATA_INTEGRATION_IN_BATCH_PIPELINE="data_integration_in_batch_pipeline",e.DBT_V2="dbt_v2",e.GLOBAL_HOOKS="global_hooks",e.INTERACTIONS="interactions",e.NOTEBOOK_BLOCK_OUTPUT_SPLIT_VIEW="notebook_block_output_split_view",e.LOCAL_TIMEZONE="display_local_timezone",e.OPERATION_HISTORY="operation_history"}(o||(o={})),function(e){e.MAIN="main",e.STANDALONE="standalone",e.SUB="sub"}(r||(r={}))},8025:function(e,n,t){"use strict";t.r(n);var o=t(58401),r=t(28598);n.default=function(){var e=(0,o.Z)().designs;return console.log(e),(0,r.jsx)("div",{})}},58401:function(e,n,t){"use strict";var o=t(82684),r=t(34376),u=t(35686),i=t(77417),a=t(42122);n.Z=function(e){var n,t=e||{operation:null,pageType:null,pageUUID:null,resource:null,resourceID:null,resourceParent:null,resourceParentID:null,useProjectData:null},l=t.operation,c=t.pageType,s=t.pageUUID,_=t.resource,d=t.resourceID,p=t.resourceParent,v=t.resourceParentID,f=t.useProjectData,E=(0,i.Z)({pauseFetch:!!f}),g=(0,o.useMemo)((function(){return"undefined"!==typeof f&&null!==f?f:E}),[f,E])||{featureEnabled:null,featureUUIDs:null,project:null},O=g.featureEnabled,I=g.featureUUIDs,N=g.project,T=(0,o.useMemo)((function(){return O&&I&&N&&(null===O||void 0===O?void 0:O(null===I||void 0===I?void 0:I.CUSTOM_DESIGN))}),[O,I,N]),h=(0,r.useRouter)(),P=null===h||void 0===h?void 0:h.asPath,m=null===h||void 0===h||null===(n=h.pathname)||void 0===n?void 0:n.replace(/^\/{1}/i,""),D=null===h||void 0===h?void 0:h.query,j=u.ZP.custom_designs.detail(encodeURIComponent(m),(0,a.hB)({operation:l,page_path:P,page_query:D?JSON.stringify(D||""):null,page_type:c,page_uuid:s,resource:_,resource_id:d,resource_parent:p,resource_parent_id:v}),{},{pauseFetch:!T}),U=j.data,A=j.mutate;return{design:(0,o.useMemo)((function(){return(null===U||void 0===U?void 0:U.custom_design)||[]}),[U]),fetchDesign:A,router:h,routerDetails:{asPath:P,pathname:m,query:D}}}},77417:function(e,n,t){"use strict";t.d(n,{Z:function(){return a}});var o=t(82684),r=t(82359),u=t(35686);function i(e,n){var t;return!(null===e||void 0===e||null===(t=e.features)||void 0===t||!t[n])}var a=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pauseFetch:!1},a=t.pauseFetch,l=u.ZP.projects.list({},{},{pauseFetch:a}),c=l.data,s=l.mutate,_=(0,o.useMemo)((function(){var e,n,t;return null===(e=(null===c||void 0===c?void 0:c.projects)||[])||void 0===e||e.forEach((function(e){n&&t||(null!==e&&void 0!==e&&e.root_project?t||(t=e):n||(n=e))})),t&&!n&&(n=t,t=null),{project:n,rootProject:t}}),[c]),d=_.project,p=_.rootProject,v=i(d,r.d.COMPUTE_MANAGEMENT);return{featureEnabled:function(e){return i(d,e)},featureUUIDs:r.d,fetchProjects:s,project:d,projectPlatformActivated:(null===d||void 0===d?void 0:d.name)!==(null===p||void 0===p?void 0:p.name),rootProject:p,sparkEnabled:v&&(d.spark_config||d.emr_config)&&((null===(e=Object.keys(d.spark_config||{}))||void 0===e?void 0:e.length)>=1||(null===(n=Object.keys(d.emr_config||{}))||void 0===n?void 0:n.length)>=1)}}},91185:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/test",function(){return t(8025)}])}},function(e){e.O(0,[9774,2888,179],(function(){return n=91185,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([[585],{94629:function(e,n,t){"use strict";t.d(n,{Z:function(){return w}});var r=t(82394),i=t(21831),o=t(82684),u=t(50724),c=t(82555),l=t(97618),a=t(70613),s=t(79626),d=t(68899),f=t(28598);function p(e,n){var t=e.children,r=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:r,ref:n,children:t})}var h=o.forwardRef(p),v=t(62547),m=t(82571),g=t(98464),b=t(77417),O=t(46684),j=t(70515),x=t(53808),P=t(19183);function y(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 Z(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?y(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function E(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var t=e.after,r=e.afterHeader,p=e.afterHidden,y=e.afterWidth,E=e.afterWidthOverride,w=e.appendBreadcrumbs,_=e.before,A=e.beforeWidth,I=e.breadcrumbs,T=e.children,k=e.errors,C=e.headerMenuItems,N=e.headerOffset,S=e.hideAfterCompletely,M=e.mainContainerHeader,D=e.navigationItems,R=e.setAfterHidden,H=e.setErrors,U=e.subheaderChildren,L=e.subheaderNoPadding,Y=e.title,V=e.uuid,B=(0,P.i)().width,W="dashboard_after_width_".concat(V),X="dashboard_before_width_".concat(V),z=(0,o.useRef)(null),F=(0,o.useState)(E?y:(0,x.U2)(W,y)),J=F[0],Q=F[1],K=(0,o.useState)(!1),q=K[0],G=K[1],$=(0,o.useState)(_?Math.max((0,x.U2)(X,A),13*j.iI):null),ee=$[0],ne=$[1],te=(0,o.useState)(!1),re=te[0],ie=te[1],oe=(0,o.useState)(null)[1],ue=(0,b.Z)().project,ce=[];I&&ce.push.apply(ce,(0,i.Z)(I)),null!==I&&void 0!==I&&I.length&&!w||!ue||null!==I&&void 0!==I&&I.length||ce.unshift({bold:!w,label:function(){return Y}}),(0,o.useEffect)((function(){null===z||void 0===z||!z.current||q||re||null===oe||void 0===oe||oe(z.current.getBoundingClientRect().width)}),[q,J,re,ee,z,oe,B]),(0,o.useEffect)((function(){q||(0,x.t8)(W,J)}),[p,q,J,W]),(0,o.useEffect)((function(){re||(0,x.t8)(X,ee)}),[re,ee,X]);var le=(0,g.Z)(y);return(0,o.useEffect)((function(){E&&le!==y&&Q(y)}),[E,y,le]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(a.Z,{title:Y}),(0,f.jsx)(s.Z,{breadcrumbs:ce,menuItems:C}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null===D||void 0===D?void 0:D.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(m.Z,{navigationItems:D,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(v.Z,{after:t,afterHeader:r,afterHeightOffset:O.Mz,afterHidden:p,afterMousedownActive:q,afterWidth:J,before:_,beforeHeightOffset:O.Mz,beforeMousedownActive:re,beforeWidth:d.k1+(_?ee:0),headerOffset:N,hideAfterCompletely:!R||S,leftOffset:_?d.k1:null,mainContainerHeader:M,mainContainerRef:z,setAfterHidden:R,setAfterMousedownActive:G,setAfterWidth:Q,setBeforeMousedownActive:ie,setBeforeWidth:ne,children:[U&&(0,f.jsx)(h,{noPadding:L,children:U}),T]})})]}),k&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===H||void 0===H?void 0:H(null)},children:(0,f.jsx)(c.Z,Z(Z({},k),{},{onClose:function(){return null===H||void 0===H?void 0:H(null)}}))})]})}var w=o.forwardRef(E)},48381:function(e,n,t){"use strict";var r=t(82684),i=t(31882),o=t(55485),u=t(30160),c=t(86735),l=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,a=void 0===t?[]:t,s=(0,r.useMemo)((function(){return(null===a||void 0===a?void 0:a.length)||0}),[a]),d=(0,r.useMemo)((function(){return(0,c.YC)(a||[],"uuid")}),[a]);return(0,l.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===d||void 0===d?void 0:d.reduce((function(e,t){return e.push((0,l.jsx)("div",{style:{marginBottom:2,marginRight:s>=2?4:0,marginTop:2},children:(0,l.jsx)(i.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,l.jsx)(u.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},16488:function(e,n,t){"use strict";t.d(n,{IJ:function(){return v},M8:function(){return E},Uc:function(){return j},XM:function(){return Z},_U:function(){return h},eI:function(){return O},gU:function(){return P},lO:function(){return T},ri:function(){return g},tL:function(){return x},vJ:function(){return y},xH:function(){return b}});var r,i=t(82394),o=t(92083),u=t.n(o),c=t(3917),l=t(4383),a=t(30229),s=t(42122),d=t(86735);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 p(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,i.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 h=function(e){return!!e&&!Object.values(a.U5).includes(e)};function v(e){return null===e||void 0===e?void 0:e.reduce((function(e,n){var t=n.block_uuid,r=n.completed_at,o=n.started_at,c=n.status,l=null;o&&r&&(l=u()(r).valueOf()-u()(o).valueOf());return p(p({},e),{},(0,i.Z)({},t,{runtime:l,status:c}))}),{})}var m,g=function(e){var n=[{description:function(){return"This pipeline will run continuously on an interval or just once."},label:function(){return"Schedule"},uuid:a.Xm.TIME},{description:function(){return"This pipeline will run when a specific event occurs."},label:function(){return"Event"},uuid:a.Xm.EVENT},{description:function(){return"Run this pipeline when you make an API call."},label:function(){return"API"},uuid:a.Xm.API}];return e?n.slice(0,1):n};function b(e){var n=(0,s.gR)(e,[a.gm.INTERVAL,a.gm.TYPE]),t=e[a.gm.INTERVAL];t&&(n["schedule_interval[]"]=encodeURIComponent(t));var r=e[a.gm.TYPE];return r&&(n["schedule_type[]"]=r),n}function O(e){return e?new Date(u()(e).valueOf()):null}function j(e,n){return n?(0,c.XG)(e,n):function(e){if("string"!==typeof e)return e;var n=e.split("+")[0];return u()(O(n)).format(c.Nx)}(e)}!function(e){e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second"}(m||(m={}));var x=(r={},(0,i.Z)(r,m.DAY,86400),(0,i.Z)(r,m.HOUR,3600),(0,i.Z)(r,m.MINUTE,60),(0,i.Z)(r,m.SECOND,1),r);function P(e){var n=m.SECOND,t=e;return e%86400===0?(t/=86400,n=m.DAY):e%3600===0?(t/=3600,n=m.HOUR):e%60===0&&(t/=60,n=m.MINUTE),{time:t,unit:n}}function y(e,n){return e*x[n]}function Z(e,n,t){var r,i=u()(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(c.TD),null!==t&&void 0!==t&&t.includeSeconds&&(r=r.concat(":00")),null!==t&&void 0!==t&&t.localTimezone&&(r=i.format(c.lE),null!==t&&void 0!==t&&t.convertToUtc&&(r=(0,c.d$)(r,{includeSeconds:null===t||void 0===t?void 0:t.includeSeconds,utcFormat:!0}))),r}function E(e){var n,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",i=!0;return i&&(t?r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/api_trigger"):(r="".concat(window.origin,"/api/pipeline_schedules/").concat(null===e||void 0===e?void 0:e.id,"/pipeline_runs"),null!==e&&void 0!==e&&e.token&&(r="".concat(r,"/").concat(e.token)))),i&&(n=window.location.port)&&(r=r.replace(n,l.QT)),r}function w(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 o=0;o>n;o--)0===r?(r=t.length-1,i-=1):r-=1;else if(n>0)for(var u=0;u<n;u++)r===t.length-1?(r=0,i+=1):r+=1;return{additionalOffset:i,cronValue:String(t[r]||e)}}(+e,n,t)}var _=(0,d.m5)(60),A=(0,d.m5)(24),I=(0,c.Cs)();function T(e,n){if(!e)return e;var t=u()().local().format("Z"),r=t.split(":"),i="-"===t[0],o=3===r[0].length?Number(r[0].slice(1)):Number(r[0]),c=Number(r[1]);(i&&!n||!i&&n)&&(o=-o,c=-c);var l=e.split(" "),a=l[0],s=l[1],d=l[2],f=w(a,c,_),p=w(s,o+f.additionalOffset,A);if(l[0]=f.cronValue,l[1]=p.cronValue,0!==(null===p||void 0===p?void 0:p.additionalOffset)){var h=w(d,p.additionalOffset,I);l[2]=h.cronValue}return l.join(" ")}},55072:function(e,n,t){"use strict";t.d(n,{Et:function(){return f},Q:function(){return d}});t(82684);var r=t(71180),i=t(55485),o=t(38276),u=t(31748),c=t(72473),l=t(79633),a=t(70515),s=t(28598),d=30,f=9;n.ZP=function(e){var n=e.page,t=e.maxPages,d=e.onUpdate,f=e.totalPages,p=[],h=t;if(h>f)p=Array.from({length:f},(function(e,n){return n}));else{var v=Math.floor(h/2),m=n-v;n+v>=f?(m=f-h+2,h-=2):n-v<=0?(m=0,h-=2):(h-=4,m=n-Math.floor(h/2)),p=Array.from({length:h},(function(e,n){return n+m}))}return(0,s.jsx)(s.Fragment,{children:f>0&&(0,s.jsxs)(i.ZP,{alignItems:"center",children:[(0,s.jsx)(r.ZP,{disabled:0===n,onClick:function(){return d(n-1)},children:(0,s.jsx)(c.Hd,{size:1.5*a.iI,stroke:u.Av})}),!p.includes(0)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(0)},children:1})},0),!p.includes(1)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0)]}),p.map((function(e){return(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.ZP,{backgroundColor:e===n&&l.a$,borderLess:!0,noBackground:!0,notClickable:e===n,onClick:function(){e!==n&&d(e)},children:e+1})},e)})),!p.includes(f-1)&&(0,s.jsxs)(s.Fragment,{children:[!p.includes(f-2)&&(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.ZP,{noBackground:!0,noPadding:!0,notClickable:!0,children:"..."})},0),(0,s.jsx)(o.Z,{ml:1,children:(0,s.jsx)(r.ZP,{borderLess:!0,noBackground:!0,onClick:function(){return d(f-1)},children:f})},f-1)]}),(0,s.jsx)(o.Z,{ml:1}),(0,s.jsx)(r.ZP,{disabled:n===f-1,onClick:function(){return d(n+1)},children:(0,s.jsx)(c.Kw,{size:1.5*a.iI,stroke:u.Av})})]})})}},30229:function(e,n,t){"use strict";t.d(n,{PN:function(){return c},TR:function(){return h},U5:function(){return a},Wb:function(){return p},Xm:function(){return o},Z4:function(){return s},fq:function(){return l},gm:function(){return d},kJ:function(){return f}});var r,i,o,u=t(82394),c="__bookmark_values__";!function(e){e.API="api",e.EVENT="event",e.TIME="time"}(o||(o={}));var l,a,s=(r={},(0,u.Z)(r,o.API,(function(){return"API"})),(0,u.Z)(r,o.EVENT,(function(){return"event"})),(0,u.Z)(r,o.TIME,(function(){return"schedule"})),r);!function(e){e.ACTIVE="active",e.INACTIVE="inactive"}(l||(l={})),function(e){e.ONCE="@once",e.HOURLY="@hourly",e.DAILY="@daily",e.WEEKLY="@weekly",e.MONTHLY="@monthly",e.ALWAYS_ON="@always_on"}(a||(a={}));var d,f,p=[a.ONCE,a.HOURLY,a.DAILY,a.WEEKLY,a.MONTHLY];!function(e){e.INTERVAL="frequency[]",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(d||(d={})),function(e){e.CREATED_AT="created_at",e.NAME="name",e.PIPELINE="pipeline_uuid",e.STATUS="status",e.TYPE="schedule_type"}(f||(f={}));var h=(i={},(0,u.Z)(i,f.CREATED_AT,"Created at"),(0,u.Z)(i,f.NAME,"Name"),(0,u.Z)(i,f.PIPELINE,"Pipeline"),(0,u.Z)(i,f.STATUS,"Active"),(0,u.Z)(i,f.TYPE,"Type"),i)},31882:function(e,n,t){"use strict";var r=t(38626),i=t(71180),o=t(55485),u=t(30160),c=t(44897),l=t(72473),a=t(70515),s=t(61896),d=t(28598),f=r.default.div.withConfig({displayName:"Chip__ChipStyle",componentId:"sc-1ok73g-0"})(["display:inline-block;"," "," "," "," "," ",""],(function(e){return!e.primary&&"\n background-color: ".concat((e.theme.background||c.Z.background).tag,";\n ")}),(function(e){return e.primary&&"\n background-color: ".concat((e.theme.chart||c.Z.chart).primary,";\n ")}),(function(e){return!e.small&&"\n border-radius: ".concat((a.iI+s.Al)/2,"px;\n height: ").concat(1.5*a.iI+s.Al,"px;\n padding: ").concat(a.iI/1.5,"px ").concat(1.25*a.iI,"px;\n ")}),(function(e){return e.small&&"\n border-radius: ".concat((a.iI/2+s.Al)/2,"px;\n height: ").concat(s.Al+a.iI/2+2,"px;\n padding: ").concat(a.iI/4,"px ").concat(a.iI,"px;\n ")}),(function(e){return e.xsmall&&"\n border-radius: ".concat((a.iI/1+s.Al)/1,"px;\n height: ").concat(20,"px;\n padding: 4px 6px;\n ")}),(function(e){return e.border&&"\n border: 1px solid ".concat((e.theme.content||c.Z.content).muted,";\n ")}));n.Z=function(e){var n=e.border,t=e.children,r=e.disabled,c=e.label,s=e.monospace,p=e.onClick,h=e.primary,v=e.small,m=e.xsmall;return(0,d.jsx)(f,{border:n,primary:h,small:v,xsmall:m,children:(0,d.jsx)(i.ZP,{basic:!0,disabled:r,noBackground:!0,noPadding:!0,onClick:p,transparent:!0,children:(0,d.jsxs)(o.ZP,{alignItems:"center",children:[t,c&&(0,d.jsx)(u.ZP,{monospace:s,small:v,xsmall:m,children:c}),!r&&p&&(0,d.jsx)("div",{style:{marginLeft:2}}),!r&&p&&(0,d.jsx)(l.x8,{default:h,muted:!h,size:v?a.iI:1.25*a.iI})]})})})}},77174:function(e,n,t){"use strict";t.r(n);var r=t(77837),i=t(82394),o=t(75582),u=t(38860),c=t.n(u),l=t(82684),a=t(34376),s=t(94629),d=t(55485),f=t(55072),p=t(93808),h=t(82359),v=t(44085),m=t(38276),g=t(30160),b=t(29624),O=t(35686),j=t(30229),x=t(70515),P=t(15610),y=t(69419),Z=t(70320),E=t(28598);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 _(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,i.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}function A(){var e=(0,a.useRouter)(),n=(0,l.useState)(null),t=n[0],r=n[1],i=(0,y.iV)(),u=null!==i&&void 0!==i&&i.page?i.page:0,c=(null===i||void 0===i?void 0:i.order_by)||j.kJ.CREATED_AT,p=O.ZP.projects.list().data,w=(0,l.useMemo)((function(){var e;return null===p||void 0===p||null===(e=p.projects)||void 0===e?void 0:e[0]}),[p]),A=((0,l.useMemo)((function(){var e;return(0,Z.hY)(null===w||void 0===w||null===(e=w.features)||void 0===e?void 0:e[h.d.LOCAL_TIMEZONE])}),[null===w||void 0===w?void 0:w.features]),{_limit:f.Q,_offset:u*f.Q,order_by:c}),I=O.ZP.pipeline_schedules.list(A,{refreshInterval:7500,revalidateOnFocus:!0}),T=I.data,k=I.mutate,C=(0,l.useMemo)((function(){return(null===T||void 0===T?void 0:T.pipeline_schedules)||[]}),[T]),N=(0,l.useMemo)((function(){var e;return(null===T||void 0===T||null===(e=T.metadata)||void 0===e?void 0:e.count)||[]}),[T]);return(0,E.jsxs)(s.Z,{errors:t,setErrors:r,title:"Triggers",uuid:"triggers/index",children:[(0,E.jsx)(m.Z,{mx:2,my:1,children:(0,E.jsxs)(d.ZP,{alignItems:"center",children:[(0,E.jsx)(g.ZP,{bold:!0,default:!0,large:!0,children:"Sort runs by:"}),(0,E.jsx)(m.Z,{mr:1}),(0,E.jsx)(v.Z,{compact:!0,defaultColor:!0,fitContent:!0,onChange:function(e){e.preventDefault(),(0,P.u)({order_by:e.target.value,page:0})},paddingRight:4*x.iI,placeholder:"Select column",value:c||j.kJ.CREATED_AT,children:Object.entries(j.TR).map((function(e){var n=(0,o.Z)(e,2),t=n[0],r=n[1];return(0,E.jsx)("option",{value:t,children:r},t)}))})]})}),(0,E.jsx)(b.Z,{fetchPipelineSchedules:k,highlightRowOnHover:!0,includeCreatedAtColumn:!0,includePipelineColumn:!0,pipelineSchedules:C,setErrors:r,stickyHeader:!0}),(0,E.jsx)(m.Z,{p:2,children:(0,E.jsx)(f.ZP,{maxPages:9,onUpdate:function(n){var t=Number(n),r=_(_({},i),{},{page:t>=0?t:0});e.push("/triggers","/triggers?".concat((0,y.uM)(r)))},page:Number(u),totalPages:Math.ceil(N/f.Q)})})]})}A.getInitialProps=(0,r.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)}))),n.default=(0,p.Z)(A)},59733:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/triggers",function(){return t(77174)}])},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 i}});var r=t(61049);function i(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 o}});var r=t(12539),i=t(80022);function o(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,i.Z)(e)}},61049:function(e,n,t){"use strict";function r(e,n){return r=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},r(e,n)}t.d(n,{Z:function(){return r}})}},function(e){e.O(0,[2678,1154,844,874,9626,8264,7858,5499,9624,9774,2888,179],(function(){return n=59733,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,r){"use strict";r.d(n,{Z:function(){return y}});var t=r(82394),o=r(21831),i=r(82684),l=r(50724),c=r(82555),s=r(97618),d=r(70613),a=r(79626),u=r(68899),h=r(28598);function f(e,n){var r=e.children,t=e.noPadding;return(0,h.jsx)(u.HS,{noPadding:t,ref:n,children:r})}var m=i.forwardRef(f),v=r(62547),x=r(82571),g=r(98464),b=r(77417),p=r(46684),j=r(70515),Z=r(53808),C=r(19183);function w(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function _(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?w(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function P(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,t=e.afterHeader,f=e.afterHidden,w=e.afterWidth,P=e.afterWidthOverride,y=e.appendBreadcrumbs,k=e.before,I=e.beforeWidth,S=e.breadcrumbs,O=e.children,E=e.errors,H=e.headerMenuItems,M=e.headerOffset,B=e.hideAfterCompletely,T=e.mainContainerHeader,A=e.navigationItems,N=e.setAfterHidden,D=e.setErrors,R=e.subheaderChildren,V=e.subheaderNoPadding,L=e.title,F=e.uuid,U=(0,C.i)().width,G="dashboard_after_width_".concat(F),W="dashboard_before_width_".concat(F),q=(0,i.useRef)(null),z=(0,i.useState)(P?w:(0,Z.U2)(G,w)),K=z[0],Q=z[1],X=(0,i.useState)(!1),Y=X[0],J=X[1],$=(0,i.useState)(k?Math.max((0,Z.U2)(W,I),13*j.iI):null),ee=$[0],ne=$[1],re=(0,i.useState)(!1),te=re[0],oe=re[1],ie=(0,i.useState)(null)[1],le=(0,b.Z)().project,ce=[];S&&ce.push.apply(ce,(0,o.Z)(S)),null!==S&&void 0!==S&&S.length&&!y||!le||null!==S&&void 0!==S&&S.length||ce.unshift({bold:!y,label:function(){return L}}),(0,i.useEffect)((function(){null===q||void 0===q||!q.current||Y||te||null===ie||void 0===ie||ie(q.current.getBoundingClientRect().width)}),[Y,K,te,ee,q,ie,U]),(0,i.useEffect)((function(){Y||(0,Z.t8)(G,K)}),[f,Y,K,G]),(0,i.useEffect)((function(){te||(0,Z.t8)(W,ee)}),[te,ee,W]);var se=(0,g.Z)(w);return(0,i.useEffect)((function(){P&&se!==w&&Q(w)}),[P,w,se]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(d.Z,{title:L}),(0,h.jsx)(a.Z,{breadcrumbs:ce,menuItems:H}),(0,h.jsxs)(u.Nk,{ref:n,children:[0!==(null===A||void 0===A?void 0:A.length)&&(0,h.jsx)(u.lm,{showMore:!0,children:(0,h.jsx)(x.Z,{navigationItems:A,showMore:!0})}),(0,h.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,h.jsxs)(v.Z,{after:r,afterHeader:t,afterHeightOffset:p.Mz,afterHidden:f,afterMousedownActive:Y,afterWidth:K,before:k,beforeHeightOffset:p.Mz,beforeMousedownActive:te,beforeWidth:u.k1+(k?ee:0),headerOffset:M,hideAfterCompletely:!N||B,leftOffset:k?u.k1:null,mainContainerHeader:T,mainContainerRef:q,setAfterHidden:N,setAfterMousedownActive:J,setAfterWidth:Q,setBeforeMousedownActive:oe,setBeforeWidth:ne,children:[R&&(0,h.jsx)(m,{noPadding:V,children:R}),O]})})]}),E&&(0,h.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===D||void 0===D?void 0:D(null)},children:(0,h.jsx)(c.Z,_(_({},E),{},{onClose:function(){return null===D||void 0===D?void 0:D(null)}}))})]})}var y=i.forwardRef(P)},85385:function(e,n,r){"use strict";r.d(n,{Qq:function(){return m},Z7:function(){return v},cH:function(){return o},du:function(){return h},fp:function(){return u},j5:function(){return f},uM:function(){return a}});var t,o,i=r(82394),l=r(57653),c=r(82359),s=r(72473),d=r(86735),a="sideview",u=90;!function(e){e.ADDON_BLOCKS="addon_blocks",e.BLOCK_SETTINGS="block_settings",e.CALLBACKS="callbacks",e.CHARTS="charts",e.DATA="data",e.EXTENSIONS="power_ups",e.FILE_VERSIONS="file_versions",e.GRAPHS="graphs",e.INTERACTIONS="interactions",e.REPORTS="reports",e.SECRETS="secrets",e.SETTINGS="settings",e.TERMINAL="terminal",e.TREE="tree",e.VARIABLES="variables"}(o||(o={}));o.BLOCK_SETTINGS,o.CALLBACKS,o.CHARTS,o.DATA,o.EXTENSIONS,o.TREE;var h=[o.DATA];function f(e){var n,r,t,i=[{key:o.TREE,label:"Tree"},{buildLabel:function(e){var n=(e.pipeline||{}).widgets,r=void 0===n?[]:n;return(null===r||void 0===r?void 0:r.length)>=1?"Charts (".concat(r.length,")"):"Charts"},key:o.CHARTS},{buildLabel:function(e){var n=e.variables;return(null===n||void 0===n?void 0:n.length)>=1?"Variables (".concat(n.length,")"):"Variables"},key:o.VARIABLES},{buildLabel:function(e){var n=e.secrets;return(null===n||void 0===n?void 0:n.length)>=1?"Secrets (".concat(n.length,")"):"Secrets"},key:o.SECRETS}];return l.qL.PYSPARK!==(null===e||void 0===e||null===(n=e.pipeline)||void 0===n?void 0:n.type)&&i.push.apply(i,[{buildLabel:function(e){e.pipeline;return"Add-on blocks"},key:o.ADDON_BLOCKS},{buildLabel:function(e){var n=(e.pipeline||{}).extensions,r=void 0===n?{}:n,t=0;return Object.values(r).forEach((function(e){var n=e.blocks;t+=(null===n||void 0===n?void 0:n.length)||0})),t>=1?"Power ups (".concat(t,")"):"Power ups"},key:o.EXTENSIONS}]),i.push.apply(i,[{key:o.DATA,label:"Data"},{key:o.TERMINAL,label:"Terminal"},{key:o.BLOCK_SETTINGS,label:"Block settings"}]),null!==e&&void 0!==e&&null!==(r=e.project)&&void 0!==r&&null!==(t=r.features)&&void 0!==t&&t[c.d.INTERACTIONS]&&i.push({key:o.INTERACTIONS,label:"Interactions"}),i}function m(e){return(0,d.HK)(f(e),(function(e){return e.key}))}var v=(t={},(0,i.Z)(t,o.ADDON_BLOCKS,s.EJ),(0,i.Z)(t,o.BLOCK_SETTINGS,s.JG),(0,i.Z)(t,o.CALLBACKS,s.AQ),(0,i.Z)(t,o.CHARTS,s.GQ),(0,i.Z)(t,o.DATA,s.iA),(0,i.Z)(t,o.EXTENSIONS,s.Bf),(0,i.Z)(t,o.INTERACTIONS,s.yd),(0,i.Z)(t,o.SECRETS,s.Yo),(0,i.Z)(t,o.SETTINGS,s.Zr),(0,i.Z)(t,o.TERMINAL,s.oI),(0,i.Z)(t,o.TREE,s.mp),(0,i.Z)(t,o.VARIABLES,s.LO),t)},40109:function(e,n,r){"use strict";r.d(n,{f:function(){return g},h:function(){return v}});var t=r(82394),o=r(82684),i=r(34376),l=r(93369),c=r(72473),s=r(70515),d=r(69419),a=r(53808),u=r(28598);var h=function(e){var n=e.oauthResponse,r=(0,i.useRouter)(),t=(0,o.useMemo)((function(){return n||{}}),[n]),h=t.url,f=t.redirect_query_params,m=void 0===f?{}:f;return(0,u.jsx)(u.Fragment,{children:h&&(0,u.jsx)(l.ZP,{beforeElement:(0,u.jsx)(c._8,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,d.iV)(h).state;(0,a.t8)(e,m),r.push(h)},uuid:"SignForm/google",children:"Sign in with Google"})})};var f=function(e){var n=e.oauthResponse,r=(0,i.useRouter)(),t=(0,o.useMemo)((function(){return n||{}}),[n]),h=t.url,f=t.redirect_query_params,m=void 0===f?{}:f;return(0,u.jsx)(u.Fragment,{children:h&&(0,u.jsx)(l.ZP,{beforeElement:(0,u.jsx)(c.Dg,{size:2*s.iI}),bold:!0,inline:!0,onClick:function(){var e=(0,d.iV)(h).state;m&&(0,a.t8)(e,m),r.push(h)},uuid:"SignForm/active_directory",children:"Sign in with Microsoft"})})};var m,v,x=function(e){var n=e.oauthResponse,r=(0,i.useRouter)(),t=(0,o.useMemo)((function(){return n||{}}),[n]),c=t.url,s=t.redirect_query_params,h=void 0===s?{}:s;return(0,u.jsx)(u.Fragment,{children:c&&(0,u.jsx)(l.ZP,{bold:!0,inline:!0,onClick:function(){var e=(0,d.iV)(c).state;(0,a.t8)(e,h),r.push(c)},uuid:"SignForm/okta",children:"Sign in with Okta"})})};!function(e){e.ACTIVE_DIRECTORY="active_directory",e.BITBUCKET="bitbucket",e.GITHUB="github",e.GOOGLE="google",e.OKTA="okta"}(v||(v={}));var g=(m={},(0,t.Z)(m,v.ACTIVE_DIRECTORY,f),(0,t.Z)(m,v.GOOGLE,h),(0,t.Z)(m,v.OKTA,x),m)},65956:function(e,n,r){"use strict";var t=r(38626),o=r(55485),i=r(38276),l=r(30160),c=r(44897),s=r(42631),d=r(47041),a=r(70515),u=r(28598),h=(0,t.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*a.iI,1.5*a.iI,1.5*a.iI),f=t.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],s.n_,(function(e){return e.fullWidth&&"\n width: 100%;\n "}),(function(e){return!e.borderless&&"\n border: 1px solid ".concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).successLight,";\n ")}),(function(e){return e.success&&!e.borderless&&"\n border: 1px solid ".concat((e.theme.background||c.Z.background).success,";\n ")}),(function(e){return!e.dark&&!e.success&&"\n background-color: ".concat((e.theme.background||c.Z.background).panel,";\n ")}),(function(e){return e.dark&&"\n background-color: ".concat((e.theme.background||c.Z.background).content,";\n ")}),(function(e){return!e.fullHeight&&"\n height: fit-content;\n "}),(function(e){return e.maxHeight&&"\n max-height: ".concat(e.maxHeight,";\n ")}),(function(e){return e.maxWidth&&"\n max-width: ".concat(e.maxWidth,"px;\n ")}),(function(e){return e.minWidth&&"\n min-width: ".concat(e.minWidth,"px;\n\n @media (max-width: ").concat(e.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(e){return e.borderless&&"\n border: none;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=t.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],s.n_,s.n_,(function(e){return"\n background-color: ".concat((e.theme.background||c.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((e.theme.interactive||c.Z.interactive).defaultBorder,";\n ")}),(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),h,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),v=t.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*a.iI,d.w5,(function(e){return e.height&&"\n height: ".concat(e.height,"px;\n ")}),(function(e){return e.maxHeight&&"\n max-height: calc(".concat(e.maxHeight," - ").concat(15*a.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),x=t.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],s.M8,s.YF,1.75*a.iI);n.Z=function(e){var n=e.borderless,r=e.children,t=e.containerRef,c=e.contentContainerRef,s=e.dark,d=e.footer,a=e.fullHeight,h=void 0===a||a,g=e.fullWidth,b=void 0===g||g,p=e.header,j=e.headerHeight,Z=e.headerIcon,C=e.headerPaddingVertical,w=e.headerTitle,_=e.maxHeight,P=e.maxWidth,y=e.minWidth,k=e.noPadding,I=e.overflowVisible,S=e.subtitle,O=e.success;return(0,u.jsxs)(f,{borderless:n,dark:s,fullHeight:h,fullWidth:b,maxHeight:_,maxWidth:P,minWidth:y,overflowVisible:I,ref:t,success:O,children:[(p||w)&&(0,u.jsxs)(m,{headerPaddingVertical:C,height:j,children:[p&&p,w&&(0,u.jsx)(o.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,u.jsxs)(o.ZP,{alignItems:"center",children:[Z&&Z,(0,u.jsx)(i.Z,{ml:Z?1:0,children:(0,u.jsx)(l.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,u.jsxs)(v,{maxHeight:_,noPadding:k,overflowVisible:I,ref:c,children:[S&&"string"===typeof S&&(0,u.jsx)(i.Z,{mb:2,children:(0,u.jsx)(l.ZP,{default:!0,children:S})}),S&&"string"!==typeof S&&S,r]}),d&&(0,u.jsx)(x,{children:d})]})}},90299:function(e,n,r){"use strict";r.d(n,{Z:function(){return p}});var t=r(82684),o=r(71180),i=r(55485),l=r(64888),c=r(38276),s=r(30160),d=r(8059),a=r(38626),u=r(44897),h=r(70515),f=r(47041),m=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],h.cd*h.iI,h.cd*h.iI,(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.allowScroll&&"\n overflow: auto;\n "}),f.w5),v=a.default.div.withConfig({displayName:"indexstyle__SelectedUnderlineStyle",componentId:"sc-segf7l-1"})(["border-radius:6px;height:","px;"," "," ",""],2,(function(e){return!e.selected&&"\n background-color: transparent;\n "}),(function(e){return e.selected&&!e.backgroundColor&&"\n background-color: ".concat((e.theme||u.Z).accent.blue,";\n ")}),(function(e){return e.selected&&e.backgroundColor&&"\n background-color: ".concat(e.backgroundColor,";\n ")})),x=r(95924),g=r(28598);function b(e,n){var r=e.allowScroll,a=e.compact,u=e.contained,f=e.noPadding,b=e.onClickTab,p=e.regularSizeText,j=e.selectedTabUUID,Z=e.small,C=e.tabs,w=e.underlineColor,_=e.underlineStyle,P=e.uppercase,y=void 0===P||P,k=(0,t.useMemo)((function(){var e=C.length,n=[];return C.forEach((function(r,t){var u=r.Icon,f=r.IconSelected,m=r.label,C=r.uuid,P=C===j,k=P&&f||u,I=m?m():C,S=(0,g.jsxs)(i.ZP,{alignItems:"center",children:[k&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(k,{default:!P,size:2*h.iI}),(0,g.jsx)(c.Z,{mr:1})]}),(0,g.jsx)(s.ZP,{bold:!0,default:!P,noWrapping:!0,small:!p,uppercase:y,children:I})]});t>=1&&e>=2&&n.push((0,g.jsx)("div",{style:{marginLeft:(p?2:1.5)*h.iI}},"spacing-".concat(C))),P&&!_?n.push((0,g.jsx)(l.Z,{backgroundGradient:d.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:a||Z,onClick:function(e){(0,x.j)(e),b(r)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:Z,children:S},C)):n.push((0,g.jsxs)(i.ZP,{flexDirection:"column",style:{paddingLeft:2,paddingRight:2,paddingBottom:_?0:2,paddingTop:_?0:2},children:[(0,g.jsxs)(o.ZP,{borderLess:!0,compact:a||Z,default:!0,noBackground:_,noPadding:_,onClick:function(e){(0,x.j)(e),b(r)},outline:!_,small:Z,children:[!_&&S,_&&(0,g.jsx)("div",{style:{paddingBottom:(a||Z?h.iI/2:h.iI)+2,paddingTop:(a||Z?h.iI/2:h.iI)+2+2},children:S})]}),_&&(0,g.jsx)(v,{backgroundColor:w,selected:P})]},"button-tab-".concat(C)))})),n}),[a,b,j,Z,C,_]),I=(0,g.jsx)(i.ZP,{alignItems:"center",children:k});return u?I:(0,g.jsx)(m,{allowScroll:r,noPadding:f,ref:n,children:I})}var p=t.forwardRef(b)},7828:function(e,n,r){"use strict";r.r(n),r.d(n,{default:function(){return Te}});var t=r(77837),o=r(38860),i=r.n(o),l=r(93808),c=r(82394),s=r(75582),d=r(54407),a=r.n(d),u=r(82684),h=r(69864),f=r(71180),m=r(15338),v=r(55485),x=r(85854),g=r(44085),b=r(38276),p=r(4190),j=r(30160),Z=r(35576),C=r(17488),w=r(12468),_=r(35686),P=r(72473),y="clone",k="delete",I="fetch",S="merge",O="pull",E="push",H="rebase",M="git_remote_name",B="git_repository_name",T={uuid:"Branches"},A={uuid:"Files"},N={uuid:"Push"},D={uuid:"Setup"},R=[D,T,A,N],V=r(70515),L=r(81728),F=r(72619),U=r(28598);var G=function(e){var n=e.actionRemoteName,r=e.branch,t=e.branches,o=e.fetchBranch,i=e.fetchBranches,l=e.remotes,d=e.setActionRemoteName,a=e.showError,y=(0,u.useState)(""),I=y[0],O=y[1],E=(0,u.useState)(null),M=E[0],B=E[1],T=(0,u.useState)(null),N=T[0],R=T[1],G=(0,u.useState)(null),W=G[0],q=G[1],z=(0,u.useState)(""),K=z[0],Q=z[1],X=(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===t||void 0===t?void 0:t.concat((null===X||void 0===X?void 0:X.refs)||[]))||[]}),[t,X]),J=(0,h.Db)(_.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){o(),i(),Q("")},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),$=(0,s.Z)(J,2),ee=$[0],ne=$[1].isLoading,re=(0,h.Db)(_.ZP.git_custom_branches.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){o()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),te=(0,s.Z)(re,2),oe=te[0],ie=te[1].isLoading,le=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.git_custom_branch.progress;o(),O(""),B(""),R(n),q("")},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),ce=(0,s.Z)(le,2),se=ce[0],de=ce[1].isLoading;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsxs)(x.Z,{children:["Branches",t?" (".concat(null===t||void 0===t?void 0:t.length,")"):""]}),(0,U.jsx)(b.Z,{mt:V.Mq,children:(0,U.jsxs)(v.ZP,{children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Remote"})}),(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(P.VW,{}),beforeIconSize:1.5*V.iI,monospace:!0,onChange:function(e){return d(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,U.jsx)("option",{value:n,children:n},n)}))})]}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsxs)("div",{children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(0,U.jsxs)(v.ZP,{alignItems:"center",children:[(0,U.jsx)(w.Z,{fullSize:!0,label:"Choose a different branch to switch branches",widthFitContent:!0,children:(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(P.I0,{muted:!1}),beforeIconSize:2*V.iI,monospace:!0,onChange:function(e){return oe({git_custom_branch:{name:e.target.value}})},value:null===r||void 0===r?void 0:r.name,children:(null===r||void 0===r?void 0:r.name)&&(null===t||void 0===t?void 0:t.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)})))})}),(0,U.jsx)(b.Z,{mr:V.cd}),ie&&(0,U.jsx)(p.Z,{inverted:!0})]})]})]})}),(0,U.jsx)(b.Z,{mt:V.Mq,children:(0,U.jsxs)(v.ZP,{alignItems:"center",children:[(0,U.jsx)(C.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:K||""}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsx)(f.ZP,{beforeIcon:(0,U.jsx)(P.mm,{size:2*V.iI}),disabled:!K,loading:ne,onClick:function(){ee({git_custom_branch:{name:K}})},primary:!0,children:"Create new branch"})]})})]}),(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(x.Z,{children:"Actions"}),(0,U.jsxs)(b.Z,{mt:V.Mq,children:[(0,U.jsxs)(b.Z,{mb:V.Mq,children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),(null===r||void 0===r?void 0:r.name)&&(0,U.jsx)(j.ZP,{monospace:!0,children:null===r||void 0===r?void 0:r.name})]}),(0,U.jsxs)(v.ZP,{alignItems:"center",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Base branch"})}),(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(P.I0,{}),beforeIconSize:1.5*V.iI,monospace:!0,onChange:function(e){return q(e.target.value)},placeholder:"Choose a branch",value:W,children:null===Y||void 0===Y?void 0:Y.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))})]}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsxs)("div",{children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Action"})}),(0,U.jsxs)(g.Z,{onChange:function(e){return B(e.target.value)},placeholder:"Choose action",value:M||"",children:[(0,U.jsx)("option",{value:S,children:(0,L.vg)(S)}),(0,U.jsx)("option",{value:H,children:(0,L.vg)(H)}),(0,U.jsx)("option",{value:k,children:(0,L.vg)(k)})]})]})]}),M&&[S,H].includes(M)&&(0,U.jsxs)(b.Z,{mt:V.cd,children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsxs)(j.ZP,{bold:!0,muted:!0,children:["Message for ",M]})}),(0,U.jsx)(Z.Z,{monospace:!0,onChange:function(e){return O(e.target.value)},value:I||""})]}),(0,U.jsxs)(b.Z,{mt:V.cd,children:[(0,U.jsx)(f.ZP,{beforeIcon:(0,U.jsx)(P.Bf,{size:2*V.iI}),disabled:!M||!W,loading:de,onClick:function(){(k!==M||"undefined"!==typeof location&&window.confirm("Are you sure you want to delete branch ".concat(W,"?")))&&se({git_custom_branch:(0,c.Z)({action_type:M,message:I},M,{base_branch:W})})},primary:!0,children:M?(0,L.vg)(M):"Execute action"}),N&&(0,U.jsx)(b.Z,{mt:V.cd,children:(0,U.jsx)(j.ZP,{default:!0,monospace:!0,preWrap:!0,children:N})})]})]})]}),(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(b.Z,{mb:V.HN,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsxs)(v.ZP,{children:[(0,U.jsx)(f.ZP,{beforeIcon:(0,U.jsx)(P.Hd,{}),linkProps:{href:"/version-control?tab=".concat(D.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:D.uuid}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsxs)(f.ZP,{afterIcon:(0,U.jsx)(P.Kw,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",A.uuid]})]})]})]})},W=r(90299),q=r(32013),z=r(98777),K=r(48670),Q=r(75499);function X(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function Y(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?X(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var J={base_branch:null,body:null,compare_branch:null,repository:null,title:null};var $=function(e){var n=e.actionRemoteName,r=e.branch,t=e.branches,o=e.fetchBranch,i=e.loading,l=e.remotes,d=e.repositories,a=e.repositoryName,w=e.setActionRemoteName,y=e.setRepositoryName,k=e.showError,I=(0,u.useState)((null===r||void 0===r?void 0:r.name)||""),S=I[0],O=I[1],H=(0,u.useState)(null),M=H[0],B=H[1],T=(0,u.useState)(null),N=T[0],D=T[1],R=(0,u.useState)(J),G=R[0],W=R[1],X=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.git_custom_branch,r=n.error,t=n.progress;r?(B(r),D(null)):(o(),B(null),D(t))},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),$=(0,s.Z)(X,2),ee=$[0],ne=$[1].isLoading,re=(0,u.useMemo)((function(){var e;return null===d||void 0===d||null===(e=d.find((function(e){return e.name===a})))||void 0===e?void 0:e.url}),[d,a]),te=_.ZP.pull_requests.list({remote_url:re,repository:a},{},{pauseFetch:!a}),oe=te.data,ie=te.mutate,le=(0,u.useMemo)((function(){return(null===oe||void 0===oe?void 0:oe.pull_requests)||[]}),[oe]),ce=(0,u.useMemo)((function(){return(0,U.jsx)(Q.Z,{columnFlex:[null,null,null,null],columns:[{uuid:"Title"},{uuid:"Author"},{uuid:"Created"},{uuid:"Last modified"}],onClickRow:function(e){var n,r=null===le||void 0===le||null===(n=le[e])||void 0===n?void 0:n.url;r&&window.open(r,"_blank")},rows:null===le||void 0===le?void 0:le.map((function(e){var n=e.created_at,r=e.last_modified,t=e.title,o=e.url,i=e.user;return[(0,U.jsx)(K.Z,{default:!0,href:o,monospace:!0,openNewWindow:!0,small:!0,children:t},"title"),(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:i},"user"),(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:n},"createdAt"),(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:r||"-"},"lastModified")]})),uuid:"pull-requests"})}),[le]),se=_.ZP.git_custom_branches.list({remote_url:re,repository:a},{},{pauseFetch:!a}).data,de=(0,u.useMemo)((function(){return(null===se||void 0===se?void 0:se.git_custom_branches)||[]}),[se]);(0,u.useEffect)((function(){null!==G&&void 0!==G&&G.compare_branch||null===de||void 0===de||!de.find((function(e){return e.name===(null===r||void 0===r?void 0:r.name)}))||W((function(e){return Y(Y({},e),{},{compare_branch:null===r||void 0===r?void 0:r.name})}))}),[r,de,G]);var ae=(0,h.Db)(_.ZP.pull_requests.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){ie(),W(J)},onErrorCallback:function(e,n){return k({errors:n,response:e})}})}}),ue=(0,s.Z)(ae,2),he=ue[0],fe=ue[1].isLoading;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(x.Z,{children:(0,L.vg)(E)})}),(0,U.jsxs)(b.Z,{mt:V.Mq,children:[(0,U.jsxs)(v.ZP,{children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Remote"})}),i&&(0,U.jsx)(p.Z,{inverted:!0}),!i&&(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(P.VW,{}),beforeIconSize:1.5*V.iI,monospace:!0,onChange:function(e){return w(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,U.jsx)("option",{value:n,children:n},n)}))})]}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsxs)("div",{children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Branch"})}),(0,U.jsxs)(g.Z,{beforeIcon:(0,U.jsx)(P.I0,{}),beforeIconSize:1.5*V.iI,monospace:!0,onChange:function(e){return O(e.target.value)},placeholder:"Choose branch",value:S||"",children:[(0,U.jsx)("option",{value:""}),null===t||void 0===t?void 0:t.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,U.jsx)(b.Z,{mt:V.cd,children:(0,U.jsxs)(f.ZP,{beforeIcon:(0,U.jsx)(P.Bf,{size:2*V.iI}),disabled:!n||!S,loading:ne,onClick:function(){D(null),ee({git_custom_branch:(0,c.Z)({action_type:E},E,{branch:S,remote:n})})},primary:!0,children:[(0,L.vg)(E)," ",n," ",n&&S]})}),(N||M)&&(0,U.jsx)(b.Z,{mt:V.cd,children:(0,U.jsx)(j.ZP,{danger:!!M,default:!!N,monospace:!0,preWrap:!0,children:N||M})})]})]}),(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(x.Z,{children:"Create pull request"})}),(0,U.jsxs)(b.Z,{mt:V.Mq,children:[i&&(0,U.jsx)(p.Z,{inverted:!0}),!i&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(v.ZP,{children:[(0,U.jsxs)("div",{children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Repository"})}),(0,U.jsx)(g.Z,{monospace:!0,onChange:function(e){return y(e.target.value)},placeholder:"Choose repository",value:a||"",children:null===d||void 0===d?void 0:d.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))})]}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsxs)("div",{children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Base branch"})}),a&&!se&&(0,U.jsx)(p.Z,{inverted:!0}),(!a||se)&&(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(P.I0,{}),beforeIconSize:1.5*V.iI,disabled:!a,monospace:!0,onChange:function(e){return W((function(n){return Y(Y({},n),{},{base_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===G||void 0===G?void 0:G.base_branch)||"",children:null===de||void 0===de?void 0:de.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))})]}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsxs)("div",{children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Compare branch"})}),a&&!se&&(0,U.jsx)(p.Z,{inverted:!0}),(!a||se||(null===G||void 0===G?void 0:G.compare_branch))&&(0,U.jsxs)(g.Z,{beforeIcon:(0,U.jsx)(P.I0,{}),beforeIconSize:1.5*V.iI,disabled:!a,monospace:!0,onChange:function(e){return W((function(n){return Y(Y({},n),{},{compare_branch:e.target.value})}))},placeholder:"Choose branch",value:(null===G||void 0===G?void 0:G.compare_branch)||"",children:[!(null!==de&&void 0!==de&&de.length)&&(null===G||void 0===G?void 0:G.compare_branch)&&(0,U.jsx)("option",{value:null===G||void 0===G?void 0:G.compare_branch,children:null===G||void 0===G?void 0:G.compare_branch}),null===de||void 0===de?void 0:de.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))]})]})]}),(0,U.jsx)(b.Z,{mt:1,children:(0,U.jsx)(C.Z,{label:"Title",monospace:!0,onChange:function(e){return W((function(n){return Y(Y({},n),{},{title:e.target.value})}))},value:(null===G||void 0===G?void 0:G.title)||""})}),(0,U.jsx)(b.Z,{mt:1,children:(0,U.jsx)(Z.Z,{label:"Description",monospace:!0,onChange:function(e){return W((function(n){return Y(Y({},n),{},{body:e.target.value})}))},value:(null===G||void 0===G?void 0:G.body)||""})}),(0,U.jsx)(b.Z,{mt:V.cd,children:(0,U.jsx)(f.ZP,{beforeIcon:(0,U.jsx)(P.Bf,{size:2*V.iI}),disabled:!a||!(null!==G&&void 0!==G&&G.title)||!(null!==G&&void 0!==G&&G.base_branch)||!(null!==G&&void 0!==G&&G.compare_branch),loading:fe,onClick:function(){he({pull_request:Y(Y({},G),{},{remote_url:re,repository:a})})},primary:!0,children:"Create new pull request"})})]})]}),(0,U.jsx)(b.Z,{mt:V.Mq,children:(0,U.jsx)(q.Z,{visibleMapping:{0:!a},children:(0,U.jsxs)(z.Z,{noPaddingContent:!0,title:oe?"Pull requests (".concat(null===le||void 0===le?void 0:le.length,")"):"Pull requests",children:[!a&&(0,U.jsx)(b.Z,{p:V.cd,children:(0,U.jsx)(j.ZP,{muted:!0,children:"Please select a repository to view open pull requests."})}),a&&(0,U.jsxs)(U.Fragment,{children:[!oe&&(0,U.jsx)(b.Z,{p:V.cd,children:(0,U.jsx)(p.Z,{inverted:!0})}),oe&&ce]})]})})})]}),(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(b.Z,{mb:V.HN,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsx)(v.ZP,{children:(0,U.jsx)(f.ZP,{beforeIcon:(0,U.jsx)(P.Hd,{}),linkProps:{href:"/version-control?tab=".concat(A.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:A.uuid})})]})]})},ee=r(94629),ne=r(85332),re=r(70652),te=r(97618),oe=r(38626),ie=oe.default.div.withConfig({displayName:"indexstyle__SpacingStyle",componentId:"sc-el09vr-0"})(["margin-top:","px;"],.5*V.iI),le=r(42122);function ce(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function se(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var de,ae=function(e){var n=e.branch,r=e.fetchBranch,t=e.modifiedFiles,o=e.setSelectedFilePath,i=e.showError,l=e.stagedFiles,c=e.untrackedFiles,d=(0,u.useRef)(null),a=(0,u.useState)(""),g=a[0],C=a[1],w=(0,u.useState)({}),y=w[0],k=w[1],I=(0,u.useState)({}),S=I[0],O=I[1],E=(0,u.useMemo)((function(){return Object.keys(t).concat(Object.keys(c)).sort()}),[t,c]),H=(0,u.useMemo)((function(){return Object.keys(l||{})}),[l]),M=(0,u.useMemo)((function(){return H.length}),[H]),B=(0,u.useMemo)((function(){return Object.keys(y).length===(null===E||void 0===E?void 0:E.length)}),[y,E]),A=(0,u.useMemo)((function(){return Object.keys(S).length===(null===H||void 0===H?void 0:H.length)}),[S,H]),D=(0,u.useMemo)((function(){return{onErrorCallback:function(e,n){return i({errors:n,response:e})}}}),[i]),R=(0,u.useMemo)((function(){return{onSuccess:function(e){return(0,F.wD)(e,se({callback:function(){r(),k({})}},D))}}}),[r,D]),G=(0,u.useMemo)((function(){return _.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name)}),[n]),W=(0,h.Db)(G,R),X=(0,s.Z)(W,2),Y=X[0],J=X[1].isLoading,$=(0,h.Db)(G,R),ee=(0,s.Z)($,2),ne=ee[0],oe=ee[1].isLoading,ce=(0,h.Db)(G,{onSuccess:function(e){return(0,F.wD)(e,se({callback:function(){r(),O({})}},D))}}),de=(0,s.Z)(ce,2),ae=de[0],ue=de[1].isLoading,he=(0,u.useCallback)((function(e,n,r,t,o){var i=(null===e||void 0===e?void 0:e.length)>=1;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(K.Z,{block:!0,noHoverUnderline:!0,onClick:function(){r(o?{}:t)},preventDefault:!0,children:(0,U.jsxs)(v.ZP,{alignItems:"center",flexDirection:"row",children:[(0,U.jsx)(re.Z,{checked:i&&o,disabled:!i}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsx)(j.ZP,{bold:!0,children:i&&o?"Unselect all":"Select all"})]})}),e.map((function(e){return(0,U.jsx)(ie,{children:(0,U.jsx)(K.Z,{block:!0,noHoverUnderline:!0,onClick:function(){return r((function(n){var r=se({},n);return!(null!==r&&void 0!==r&&r[e])?r[e]=!0:delete r[e],r}))},preventDefault:!0,children:(0,U.jsxs)(v.ZP,{alignItems:"center",flexDirection:"row",children:[(0,U.jsx)(re.Z,{checked:!(null===n||void 0===n||!n[e])}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsx)(j.ZP,{default:!0,monospace:!0,children:e})]})})},e)}))]})}),[]),fe=(0,u.useMemo)((function(){return(0,le.Qr)(y)}),[y]),me=_.ZP.git_custom_branches.detail("with_logs",{_format:"with_logs"}),ve=me.data,xe=me.mutate,ge=(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]),be=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===n||void 0===n?void 0:n.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){xe(),r(),C("")},onErrorCallback:function(e,n){return i({errors:n,response:e})}})}}),pe=(0,s.Z)(be,2),je=pe[0],Ze=pe[1].isLoading,Ce=(0,u.useMemo)((function(){return(0,U.jsx)(Q.Z,{columnFlex:[1,1,1],columns:[{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:ge.map((function(e){var n=e.author,r=e.date,t=e.message;return[(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===n||void 0===n?void 0:n.name},"author"),(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:r},"date"),(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:t},"message")]})),uuid:"git-branch-logs"})}),[ge]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b.Z,{mb:V.HN,children:(0,U.jsxs)(v.ZP,{children:[(0,U.jsxs)(te.Z,{flex:1,flexDirection:"column",children:[(0,U.jsxs)(x.Z,{children:["Not staged ",(null===E||void 0===E?void 0:E.length)>=1&&"(".concat(null===E||void 0===E?void 0:E.length,")")]}),(0,U.jsx)(b.Z,{my:V.cd,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsx)(b.Z,{mb:V.cd,children:(0,U.jsxs)(v.ZP,{flexDirection:"row",children:[(0,U.jsx)(f.ZP,{compact:!0,disabled:fe||ue||oe,loading:J,onClick:function(){Y({git_custom_branch:{action_type:"add",files:Object.keys(y)}}).then((function(e){var n,r=e.data;null!==r&&void 0!==r&&r.git_custom_branch&&(null===d||void 0===d||null===(n=d.current)||void 0===n||n.focus())}))},primary:!0,children:"Add files"}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsx)(f.ZP,{compact:!0,disabled:fe||J||ue,loading:oe,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to undo all changes in the selected files?")&&ne({git_custom_branch:{action_type:"checkout",files:Object.keys(y)}})},children:"Checkout files"})]})}),he(E,y,k,se(se({},t),c),B)]}),(0,U.jsx)(b.Z,{mr:V.cd}),(0,U.jsxs)(te.Z,{flex:1,flexDirection:"column",children:[(0,U.jsxs)(x.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,U.jsx)(b.Z,{my:V.cd,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsx)(b.Z,{mb:V.cd,children:(0,U.jsx)(v.ZP,{flexDirection:"row",children:(0,U.jsx)(f.ZP,{compact:!0,disabled:(0,le.Qr)(S)||J||oe,loading:ue,onClick:function(){ae({git_custom_branch:{action_type:"reset",files:Object.keys(S)}})},secondary:!0,children:"Reset files"})})}),he(H,S,O,l,A)]})]})}),(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(x.Z,{children:"Commit"})}),(0,U.jsx)(b.Z,{mb:V.cd,children:(0,U.jsx)(q.Z,{children:(0,U.jsx)(z.Z,{noPaddingContent:!0,title:M>=1?"Staged files (".concat(M,")"):"No staged files",children:null===H||void 0===H?void 0:H.map((function(e){return(0,U.jsx)(b.Z,{my:1,px:V.cd,children:(0,U.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,U.jsx)(K.Z,{default:!0,monospace:!0,onClick:function(){return o((function(n){return n===e?null:e}))},warning:null===t||void 0===t?void 0:t[e],children:e}),(0,U.jsx)(b.Z,{mr:1}),(null===t||void 0===t?void 0:t[e])&&(0,U.jsx)(j.ZP,{warning:!0,children:"Modified after staging"})]})},e)}))})})}),(0,U.jsx)(Z.Z,{label:"Commit message",monospace:!0,onChange:function(e){return C(e.target.value)},ref:d,value:g||""}),(0,U.jsx)(b.Z,{mt:V.cd,children:(0,U.jsxs)(v.ZP,{alignItems:"center",children:[(0,U.jsxs)(f.ZP,{disabled:0===M||!((null===g||void 0===g?void 0:g.length)>=1),loading:Ze,onClick:function(){je({git_custom_branch:{action_type:"commit",message:g}})},primary:!0,children:["Commit ",(0,L._6)("file",M,!0)," with message"]}),0===M&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b.Z,{mr:1}),(0,U.jsx)(j.ZP,{danger:!0,small:!0,children:"Please stage at least 1 file before committing."})]})]})})]}),(0,U.jsx)(b.Z,{mb:V.HN,children:(0,U.jsx)(q.Z,{children:(0,U.jsxs)(z.Z,{noPaddingContent:!0,title:"Logs",children:[!ve&&(0,U.jsx)(b.Z,{p:V.cd,children:(0,U.jsx)(p.Z,{inverted:!0})}),ve&&Ce]})})}),(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(b.Z,{mb:V.HN,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsxs)(v.ZP,{children:[(0,U.jsx)(f.ZP,{beforeIcon:(0,U.jsx)(P.Hd,{}),linkProps:{href:"/version-control?tab=".concat(T.uuid)},noBackground:!0,noHoverUnderline:!0,sameColorAsText:!0,children:T.uuid}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsxs)(f.ZP,{afterIcon:(0,U.jsx)(P.Kw,{}),linkProps:fe?{href:"/version-control?tab=".concat(N.uuid)}:null,noHoverUnderline:!0,primary:fe,sameColorAsText:!0,secondary:!fe,children:["Next: ",N.uuid]})]})]})]})},ue=r(12691),he=r.n(ue),fe=r(34376),me=r(63403),ve=oe.default.svg.withConfig({displayName:"BitbucketWithText__SVGStyle",componentId:"sc-wdje9z-0"})([""]),xe=function(e){var n=e.fill,r=e.opacity,t=e.size,o=void 0===t?me.C:t,i=e.style,l=e.viewBox,c=void 0===l?"0 0 299 42":l;return(0,U.jsxs)(ve,{fill:n,height:o,opacity:r,style:i,viewBox:c,width:o,children:[(0,U.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,U.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,U.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,U.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,U.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,U.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,U.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,U.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,U.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,U.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,U.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,U.jsx)("defs",{children:(0,U.jsxs)("linearGradient",{gradientUnits:"userSpaceOnUse",id:"paint0_linear_13549_1163",x1:"43.1513",x2:"22.7826",y1:"19.7256",y2:"36.1667",children:[(0,U.jsx)("stop",{offset:"0.176",stopColor:"#0052CC"}),(0,U.jsx)("stop",{offset:"1",stopColor:"#2684FF"})]})})]})},ge=r(40109),be=r(69419),pe=r(53808),je=(de={},(0,c.Z)(de,ge.h.GITHUB,P.Je),(0,c.Z)(de,ge.h.BITBUCKET,xe),de);function Ze(e){var n=e.isLoadingCreateOauth,r=e.oauth,t=e.provider,o=e.showError,i=(0,fe.useRouter)(),l=(0,h.Db)(_.ZP.oauths.useUpdate(t),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){return window.location.href=window.location.href.split("?")[0]},onErrorCallback:function(e,n){return o({errors:n,response:e})}})}}),c=(0,s.Z)(l,2),d=c[0],a=c[1].isLoading,u=je[t];return(0,U.jsxs)(v.ZP,{justifyContent:"space-between",children:[(0,U.jsx)(te.Z,{children:(0,U.jsx)(u,{size:12*V.iI})}),(0,U.jsx)(te.Z,{alignItems:"center",children:null!==r&&void 0!==r&&r.authenticated?(0,U.jsx)(f.ZP,{loading:a,onClick:function(){return d({oauth:{action_type:"reset"}})},warning:!0,children:"Reset"}):(0,U.jsx)(f.ZP,{loading:n,onClick:function(){var e=null===r||void 0===r?void 0:r.url,n=(0,be.iV)(e).state;(0,pe.t8)(n,(null===r||void 0===r?void 0:r.redirect_query_params)||{}),i.push(e)},primary:!0,children:"Authenticate"})})]})}var Ce=function(e){var n=e.branch,r=e.isLoadingCreateOauth,t=e.showError,o=_.ZP.oauths.list({type:"git",redirect_uri:encodeURIComponent(window.location.href)}),i=o.data,l=(o.mutate,_.ZP.oauths.detail(ge.h.GITHUB,{redirect_uri:encodeURIComponent(window.location.href)})),c=l.data,d=(l.mutate,(0,u.useMemo)((function(){return(null===c||void 0===c?void 0:c.oauth)||{}}),[c])),a=(0,u.useMemo)((function(){return null===n||void 0===n?void 0:n.access_token_exists}),[n]),h=(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 n[ge.h.GITHUB]=d,n}),[i,d]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(x.Z,{children:"Authentication"}),(0,U.jsxs)(b.Z,{mt:V.Mq,children:[a&&(0,U.jsxs)(b.Z,{mb:2,children:[(0,U.jsx)(f.ZP,{disabled:!0,children:"Using access token from Git Settings"}),(0,U.jsx)(b.Z,{mt:1,children:(0,U.jsx)(j.ZP,{muted:!0,children:"Some features may not work unless you authenticate with a Git client."})})]}),(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(b.Z,{mb:V.Mq,children:(0,U.jsx)(j.ZP,{muted:!0,children:"Authenticating with the apps below will allow you to easily pull, push, and create pull requests."})}),(0,U.jsxs)(b.Z,{mb:V.Mq,style:{maxWidth:"600px"},children:[(0,U.jsx)(m.Z,{muted:!0}),Object.entries(h||{}).map((function(e){var n=(0,s.Z)(e,2),o=n[0],i=n[1];return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Ze,{isLoadingCreateOauth:r,oauth:i,provider:o,showError:t},o),(0,U.jsx)(m.Z,{muted:!0})]})}))]})]})]})]})};var we=function(e){var n=e.actionRemoteName,r=e.branch,t=e.fetchBranch,o=e.loading,i=e.remotes,l=e.setActionRemoteName,d=e.showError,a=(0,fe.useRouter)(),Z=(0,u.useRef)(null),w=(0,u.useState)(null),k=w[0],S=w[1],E=(0,u.useState)(null),H=E[0],M=E[1],B=(0,u.useState)(null),A=B[0],N=B[1],D=(0,u.useState)(null),R=D[0],G=D[1],W=(0,u.useState)(!1),X=W[0],Y=W[1],J=(0,u.useState)(null),$=J[0],ee=J[1],ne=(0,u.useState)(""),re=ne[0],oe=ne[1],ie=(0,u.useState)(""),le=ie[0],ce=ie[1],se=(0,u.useState)(null),de=se[0],ae=se[1],ue=(0,u.useMemo)((function(){return!(null===r||void 0===r||!r.name)}),[r]);(0,u.useMemo)((function(){return null===r||void 0===r?void 0:r.access_token_exists}),[r]),(0,u.useEffect)((function(){var e,n;null!==r&&void 0!==r&&null!==(e=r.sync_config)&&void 0!==e&&e.repo_path&&null===de&&ae(null===r||void 0===r||null===(n=r.sync_config)||void 0===n?void 0:n.repo_path)}),[r,de]);var me=(0,u.useMemo)((function(){var e,r;return null===i||void 0===i||null===(e=i.find((function(e){return e.name===n})))||void 0===e||null===(r=e.refs)||void 0===r?void 0:r.map((function(e){var n=e.name.split("/");return{name:n[n.length-1]}}))}),[n,i]),ve=(0,h.Db)(_.ZP.syncs.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){t(),Y(!1)},onErrorCallback:function(e,n){return d({errors:n,response:e})}})}}),xe=(0,s.Z)(ve,2),pe=xe[0],je=xe[1].isLoading,Ze=(0,h.Db)(_.ZP.oauths.useUpdate("github"),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){return window.location.href=window.location.href.split("?")[0]},onErrorCallback:function(e,n){return d({errors:n,response:e})}})}}),we=(0,s.Z)(Ze,2),_e=(we[0],we[1].isLoading,(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(e){var n=e.git_custom_branch,r=n.error,o=n.progress;r?(M(r),G(null)):(t(),S(null),M(null),N(null),G(o))},onErrorCallback:function(e,n){return d({errors:n,response:e})}})}})),Pe=(0,s.Z)(_e,2),ye=Pe[0],ke=Pe[1].isLoading,Ie=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){t(),oe(""),ce("")},onErrorCallback:function(e,n){return d({errors:n,response:e})}})}}),Se=(0,s.Z)(Ie,2),Oe=Se[0],Ee=Se[1].isLoading,He=(0,h.Db)(_.ZP.git_custom_branches.useUpdate(null===r||void 0===r?void 0:r.name),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){t(),ee(null)},onErrorCallback:function(e,n){ee(null),d({errors:n,response:e})}})}}),Me=(0,s.Z)(He,2),Be=Me[0],Te=Me[1].isLoading,Ae=(0,h.Db)(_.ZP.oauths.useCreate(),{onSuccess:function(e){return(0,F.wD)(e,{callback:function(){return window.location.href="".concat(a.basePath,"/version-control")},onErrorCallback:function(e,n){d({errors:n,response:e})}})}}),Ne=(0,s.Z)(Ae,2),De=Ne[0],Re=Ne[1].isLoading,Ve=(0,be.iV)()||{},Le=Ve.access_token,Fe=Ve.provider;(0,u.useEffect)((function(){Le&&De({oauth:{provider:Fe||ge.h.GITHUB,token:Le}})}),[Le,De,Fe]);var Ue=(0,u.useMemo)((function(){return null===i||void 0===i?void 0:i.map((function(e){var r=e.name,t=e.refs,o=e.urls;return(0,U.jsxs)(b.Z,{mt:V.Mq,children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsxs)(v.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,U.jsxs)(te.Z,{alignItems:"center",children:[(0,U.jsx)(j.ZP,{bold:!0,children:r}),(0,U.jsx)(b.Z,{mx:1,children:(0,U.jsx)(P._Q,{muted:!0})}),null===o||void 0===o?void 0:o.map((function(e){return(0,U.jsx)(b.Z,{mr:1,children:(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:e})},e)}))]}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsx)(f.ZP,{compact:!0,disabled:Te&&$!==r,iconOnly:!0,loading:Te&&$===r,noBackground:!0,onClick:function(){"undefined"!==typeof location&&window.confirm("Are you sure you want to remove remote ".concat(r,"?"))&&(ee(r),Be({git_custom_branch:{action_type:"remove_remote",remote:{name:r}}}).then((function(){n===r&&l(null)})))},small:!0,title:"Remote remote ".concat(r),children:(0,U.jsx)(P.rF,{})})]})}),(0,U.jsx)(q.Z,{children:(0,U.jsxs)(z.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,U.jsx)(b.Z,{p:V.cd,children:(0,U.jsx)(j.ZP,{muted:!0,children:"This remote has no refs."})}),(null===t||void 0===t?void 0:t.length)>=1&&(0,U.jsx)(Q.Z,{columnFlex:[1,1,1],columns:[{uuid:"Ref"},{uuid:"Author"},{uuid:"Date"},{uuid:"Message"}],rows:t.map((function(e){var n,r=e.commit,t=e.name;return[(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:t},"ref-name"),(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r||null===(n=r.author)||void 0===n?void 0:n.name},"author"),(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.date},"date"),(0,U.jsx)(j.ZP,{default:!0,monospace:!0,small:!0,children:null===r||void 0===r?void 0:r.message},"message")]})),uuid:"git-branch-remotes-refs"})]})}),(0,U.jsx)(b.Z,{mt:V.Mq,children:(0,U.jsx)(m.Z,{light:!0})})]},r)}))}),[Te,$,i,Be]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(x.Z,{children:"Setup"}),(0,U.jsxs)(b.Z,{mt:V.Mq,children:[(0,U.jsxs)(b.Z,{mb:1,children:[(0,U.jsx)(j.ZP,{bold:!0,large:!0,children:ue?"Git init directory":"Initialize Git directory"}),!ue&&(0,U.jsxs)(j.ZP,{muted:!0,children:["Enter the directory you want to initialize git in. For example, ",(0,U.jsx)(j.ZP,{bold:!0,inline:!0,monospace:!0,muted:!0,children:"/home/src/default_repo"}),"."]}),ue&&(0,U.jsxs)(j.ZP,{muted:!0,children:["If the directory below is blank, then the current working directory will be used to initialize git.",(0,U.jsx)("br",{}),"If git hasn\u2019t been initialized in the directory below, Mage will automatically run git init for you."]})]}),(0,U.jsxs)(v.ZP,{alignItems:"center",children:[(0,U.jsx)(C.Z,{disabled:ue&&!X,fullWidth:!0,label:"Git directory",maxWidth:400,monospace:!0,onChange:function(e){return ae(e.target.value)},ref:Z,value:de||""}),(0,U.jsx)(b.Z,{mr:1}),(!ue||X)&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(f.ZP,{compact:!0,disabled:!ue&&!de,loading:je,onClick:function(){pe({sync:{repo_path:de}})},primary:!0,small:!0,children:"Save"}),ue&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b.Z,{mr:1}),(0,U.jsx)(K.Z,{onClick:function(){return Y(!1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Cancel"})]})]}),ue&&!X&&(0,U.jsx)(K.Z,{onClick:function(){Y(!0),setTimeout((function(){var e;return null===Z||void 0===Z||null===(e=Z.current)||void 0===e?void 0:e.focus()}),1)},preventDefault:!0,sameColorAsText:!0,small:!0,children:"Edit"})]})]})]}),(0,U.jsx)(b.Z,{mb:V.HN,children:(0,U.jsx)(Ce,{branch:r,isLoadingCreateOauth:Re,showError:d})}),ue&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsxs)(x.Z,{children:["Remotes",!o&&i?" (".concat(null===i||void 0===i?void 0:i.length,")"):""]}),o&&(0,U.jsx)(b.Z,{mt:V.Mq,children:(0,U.jsx)(p.Z,{inverted:!0})}),!o&&Ue,(0,U.jsx)(b.Z,{mt:V.Mq,children:(0,U.jsxs)(v.ZP,{alignItems:"flex-start",children:[(0,U.jsx)(C.Z,{label:"New remote name",monospace:!0,onChange:function(e){var n;return oe(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.value)},value:re||""}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsxs)(v.ZP,{flexDirection:"column",children:[(0,U.jsx)(C.Z,{label:"Remote URL",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:le||""}),(0,U.jsx)(b.Z,{mt:1,children:(0,U.jsxs)(j.ZP,{muted:!0,small:!0,children:["Use the https URL if you",(0,U.jsx)("br",{}),"authenticated with GitHub above."]})})]}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsx)(f.ZP,{beforeIcon:(0,U.jsx)(P.mm,{size:2*V.iI}),disabled:!re||!le,loading:Ee,onClick:function(){Oe({git_custom_branch:{action_type:"add_remote",remote:{name:re,url:le}}})},primary:!0,children:"Create new remote"})]})})]}),(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(x.Z,{children:"Actions"}),(0,U.jsxs)(b.Z,{mt:V.Mq,children:[(0,U.jsxs)(b.Z,{mb:V.Mq,children:[(0,U.jsx)(b.Z,{mb:1,children:(0,U.jsx)(j.ZP,{bold:!0,muted:!0,children:"Current branch"})}),(null===r||void 0===r?void 0:r.name)&&(0,U.jsxs)(v.ZP,{alignItems:"center",children:[(0,U.jsx)(j.ZP,{monospace:!0,children:null===r||void 0===r?void 0:r.name}),(0,U.jsx)(b.Z,{mr:V.cd}),(0,U.jsx)(he(),{href:"/version-control?tab=".concat(T.uuid),passHref:!0,children:(0,U.jsx)(K.Z,{small:!0,children:"Switch branch"})})]})]}),(0,U.jsxs)(v.ZP,{children:[(0,U.jsxs)(g.Z,{onChange:function(e){return N(e.target.value)},placeholder:"Action",value:A||"",children:[(0,U.jsx)("option",{value:I,children:(0,L.vg)(I)}),(0,U.jsx)("option",{value:O,children:(0,L.vg)(O)}),(0,U.jsx)("option",{value:"reset",children:(0,L.vg)("reset --hard")}),(0,U.jsx)("option",{value:y,children:(0,L.vg)(y)})]}),(0,U.jsx)(b.Z,{mr:1}),(0,U.jsx)(g.Z,{beforeIcon:(0,U.jsx)(P.VW,{}),beforeIconSize:1.5*V.iI,monospace:!0,onChange:function(e){return l(e.target.value)},placeholder:"Remote",value:n||"",children:null===i||void 0===i?void 0:i.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))}),![I,y].includes(A)&&(0,U.jsx)(b.Z,{ml:1,children:(0,U.jsxs)(g.Z,{beforeIcon:(0,U.jsx)(P.I0,{}),beforeIconSize:1.5*V.iI,monospace:!0,onChange:function(e){return S(e.target.value)},value:k||"",children:[(0,U.jsx)("option",{value:"",children:"All branches"}),null===me||void 0===me?void 0:me.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))]})})]}),(0,U.jsxs)(b.Z,{mt:V.cd,children:[(0,U.jsx)(f.ZP,{beforeIcon:(0,U.jsx)(P.Bf,{size:2*V.iI}),disabled:!A||!n,loading:ke,onClick:function(){G(null),(A!==y||"undefined"!==typeof location&&window.confirm("Are you sure you want to clone remote ".concat(n,"? 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."))&&ye({git_custom_branch:(0,c.Z)({action_type:A},A,{branch:k,remote:n})})},primary:!0,children:A?(0,L.vg)(A):"Execute action"}),(R||H)&&(0,U.jsx)(b.Z,{mt:V.cd,children:(0,U.jsx)(j.ZP,{danger:!!H,default:!!R,monospace:!0,preWrap:!0,children:R||H})})]})]})]}),(0,U.jsxs)(b.Z,{mb:V.HN,children:[(0,U.jsx)(b.Z,{mb:V.HN,children:(0,U.jsx)(m.Z,{light:!0})}),(0,U.jsx)(v.ZP,{children:(0,U.jsxs)(f.ZP,{afterIcon:(0,U.jsx)(P.Kw,{}),linkProps:{href:"/version-control?tab=".concat(T.uuid)},noHoverUnderline:!0,sameColorAsText:!0,secondary:!0,children:["Next: ",T.uuid]})})]})]})]})},_e=r(95363),Pe=oe.default.div.withConfig({displayName:"indexstyle__DiffContainerStyle",componentId:"sc-1fo4nus-0"})(["pre{font-family:",";}"],_e.Vp),ye={codeFoldGutter:{},content:{},contentText:{},diffAdded:{},diffContainer:{},diffRemoved:{},emptyGutter:{},emptyLine:{},gutter:{},highlightedGutter:{},highlightedLine:{},line:{},lineNumber:{},marker:{},splitView:{},titleBlock:{},variables:{dark:{addedBackground:"#044B53",addedColor:"white",addedGutterBackground:"#034148",addedGutterColor:"#8c8c8c",codeFoldBackground:"#262831",codeFoldContentColor:"#555a7b",codeFoldGutterBackground:"#21232b",diffViewerBackground:"#2e303c",diffViewerColor:"#FFF",diffViewerTitleBackground:"#2f323e",diffViewerTitleBorderColor:"#353846",diffViewerTitleColor:"#555a7b",emptyLineBackground:"#363946",gutterBackground:"#2c2f3a",gutterBackgroundDark:"#262933",gutterColor:"#464c67",highlightBackground:"#2a3967",highlightGutterBackground:"#2d4077",removedBackground:"#632F34",removedColor:"white",removedGutterBackground:"#632b30",removedGutterColor:"#8c8c8c",wordAddedBackground:"#055d67",wordRemovedBackground:"#7d383f"},light:{addedBackground:"#e6ffed",addedColor:"#24292e",addedGutterBackground:"#cdffd8",addedGutterColor:"#212529",codeFoldBackground:"#f1f8ff",codeFoldContentColor:"#212529",codeFoldGutterBackground:"#dbedff",diffViewerBackground:"#fff",diffViewerColor:"212529",diffViewerTitleBackground:"#fafbfc",diffViewerTitleBorderColor:"#eee",diffViewerTitleColor:"#212529",emptyLineBackground:"#fafbfc",gutterBackground:"#f7f7f7",gutterBackgroundDark:"#f3f1f1",gutterColor:"#212529",highlightBackground:"#fffbdd",highlightGutterBackground:"#fff5b1",removedBackground:"#ffeef0",removedColor:"#24292e",removedGutterBackground:"#ffdce0",removedGutterColor:"#212529",wordAddedBackground:"#acf2bd",wordRemovedBackground:"#fdb8c0"}},wordAdded:{},wordDiff:{},wordRemoved:{}},ke=r(53005),Ie=r(15610),Se=r(86735),Oe=r(23780);function Ee(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),r.push.apply(r,t)}return r}function He(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?Ee(Object(r),!0).forEach((function(n){(0,c.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ee(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}var Me=function(){var e=(0,u.useRef)(null),n=(0,u.useRef)(null),r=(0,Oe.VI)(null,{},[],{uuid:"VersionControlPage"}),t=(0,s.Z)(r,1)[0],o=(0,u.useState)(null),i=o[0],l=o[1],h=(0,u.useState)(null),f=h[0],v=h[1],x=(0,u.useState)(R[0]),Z=x[0],C=x[1],P=(0,be.iV)();(0,u.useEffect)((function(){null!==P&&void 0!==P&&P.tab&&C(R.find((function(e){return e.uuid===(null===P||void 0===P?void 0:P.tab)})))}),[P]);var y=_.ZP.git_custom_branches.list({include_remote_branches:1}),k=y.data,I=y.mutate,S=(0,u.useMemo)((function(){return null===k||void 0===k?void 0:k.git_custom_branches}),[k]),O=_.ZP.git_custom_branches.detail("current",{_format:"with_files"}),E=O.data,H=O.mutate,L=(0,u.useMemo)((function(){return(null===E||void 0===E?void 0:E.git_custom_branch)||{}}),[E]),F=(0,u.useMemo)((function(){return(null===L||void 0===L?void 0:L.files)||[]}),[L]),q=_.ZP.git_custom_branches.detail("with_remotes",{_format:"with_remotes"}),z=q.data,K=q.mutate,Q=(0,u.useMemo)((function(){return null===z||void 0===z?void 0:z.git_custom_branch}),[z]),X=(0,u.useMemo)((function(){return(null===Q||void 0===Q?void 0:Q.remotes)||[]}),[Q]),Y=(0,u.useState)(null),J=Y[0],re=Y[1],te=(0,u.useCallback)((function(e){(0,pe.t8)(M,e),re(e)}),[]);(0,u.useEffect)((function(){var e=(0,pe.U2)(M,null);if(z&&e){var n=null===X||void 0===X?void 0:X.find((function(n){return n.name===e}));te(n?null===n||void 0===n?void 0:n.name:null)}}),[z,X,te]);var oe=(0,u.useState)((0,pe.U2)(B,"")),ie=oe[0],ce=oe[1],se=(0,u.useCallback)((function(e){(0,pe.t8)(B,e),ce(e)}),[]),de=(0,u.useMemo)((function(){return(0,Se.Tw)(X.reduce((function(e,n){var r;return e.concat((null===n||void 0===n||null===(r=n.repository_names)||void 0===r?void 0:r.map((function(e){var r;return{name:e,url:null===n||void 0===n||null===(r=n.urls)||void 0===r?void 0:r[0]}})))||[])}),[]),(function(e){return e.name}))}),[X]);(0,u.useEffect)((function(){var e=(0,pe.U2)(B,null);if(z&&e){var n=null===de||void 0===de?void 0:de.find((function(n){return n.name===e}));se(n?null===n||void 0===n?void 0:n.name:null)}}),[z,de,se]);var ue=_.ZP.git_files.detail(f?encodeURIComponent(f):null,{base_branch:i}),he=ue.data,fe=ue.mutate,me=(0,u.useMemo)((function(){return null===he||void 0===he?void 0:he.git_file}),[he]);(0,u.useEffect)((function(){i&&fe()}),[i,fe]),(0,u.useEffect)((function(){null!==he&&void 0!==he&&he.error&&t({errors:null===he||void 0===he?void 0:he.error,response:he})}),[he,t]);var ve=(0,u.useMemo)((function(){var e,n,r;return{modifiedFiles:null===L||void 0===L||null===(e=L.modified_files)||void 0===e?void 0:e.reduce((function(e,n){return He(He({},e),{},(0,c.Z)({},n,!0))}),{}),stagedFiles:null===L||void 0===L||null===(n=L.staged_files)||void 0===n?void 0:n.reduce((function(e,n){return He(He({},e),{},(0,c.Z)({},n,!0))}),{}),untrackedFiles:null===L||void 0===L||null===(r=L.untracked_files)||void 0===r?void 0:r.reduce((function(e,n){return He(He({},e),{},(0,c.Z)({},n,!0))}),{})}}),[L]),xe=ve.modifiedFiles,ge=void 0===xe?{}:xe,je=ve.stagedFiles,Ze=void 0===je?{}:je,Ce=ve.untrackedFiles,_e=void 0===Ce?{}:Ce;(0,u.useEffect)((function(){f&&(0,le.Qr)(ge)&&(0,le.Qr)(Ze)&&(0,le.Qr)(_e)&&v(null)}),[ge,f,Ze,_e]);var Ee=(0,u.useMemo)((function(){return(null===F||void 0===F?void 0:F.length)>=1?(0,U.jsx)(ne.Z,{allowEmptyFolders:!0,disableContextMenu:!0,fetchFileTree:H,files:F,isFileDisabled:function(){return!1},onClickFile:function(e){v((function(r){if(!r||r!==e){var t;if(!i)null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus();return e}return null}))},ref:e,renderAfterContent:function(e){var n,r,t=e.children,o=(null===t||void 0===t?void 0:t.length)>=1,i=(0,ke.a9)(e);o&&(i="".concat(i,"/"));var l={};return null!==ge&&void 0!==ge&&ge[i]?(n="M",r="Modified",l.warning=!0):null!==_e&&void 0!==_e&&_e[i]?(n="U",r="Untracked",l.danger=!0):null!==Ze&&void 0!==Ze&&Ze[i]&&(n="S",r="Staged",l.success=!0),o&&!n?null:(0,U.jsx)(b.Z,{mx:1,children:(0,U.jsx)(w.Z,{appearBefore:!0,label:r,widthFitContent:!0,children:(0,U.jsx)(j.ZP,He(He({},l),{},{monospace:!0,rightAligned:!0,small:!0,children:n}))})})},useRootFolder:!0}):(0,U.jsx)(b.Z,{p:V.cd,children:(0,U.jsx)(j.ZP,{monospace:!0,muted:!0,children:"No files modified"})})}),[i,H,e,F,ge,n,v,Ze,_e]),Me=(0,u.useMemo)((function(){return!he||!me||f&&(null===me||void 0===me?void 0:me.filename)!==f}),[he,me,f]),Be=(0,u.useMemo)((function(){if(!f)return null;var e=me||{},n=e.content,r=e.content_from_base;return(0,U.jsxs)(Pe,{children:[!i&&(0,U.jsx)(b.Z,{p:V.cd,children:(0,U.jsx)(j.ZP,{muted:!0,children:"Please select a base branch to see the file diffs."})}),(null===me||void 0===me?void 0:me.error)&&(0,U.jsx)(b.Z,{p:V.cd,children:(0,U.jsx)(j.ZP,{danger:!0,monospace:!0,preWrap:!0,children:null===me||void 0===me?void 0:me.error})}),i&&!(null!==me&&void 0!==me&&me.error)&&(0,U.jsxs)(U.Fragment,{children:[Me&&(0,U.jsx)(b.Z,{p:V.cd,children:(0,U.jsx)(p.Z,{inverted:!0})}),!Me&&(0,U.jsx)(a(),{compareMethod:d.DiffMethod.WORDS,newValue:n||"",oldValue:r||"",renderContent:function(e){return(0,U.jsx)(j.ZP,{monospace:!0,children:e})},splitView:!0,styles:ye,useDarkTheme:!0})]})]})}),[i,me,Me,f]),Te=(0,u.useMemo)((function(){return E&&null!==L&&void 0!==L&&L.name?R:R.slice(0,1)}),[L,E]),Ae=(0,u.useMemo)((function(){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)("div",{style:{marginBottom:.5*V.iI,marginTop:.5*V.iI},children:(0,U.jsx)(W.Z,{compact:!0,onClickTab:function(e){var n=e.uuid;(0,Ie.u)({tab:n})},selectedTabUUID:null===Z||void 0===Z?void 0:Z.uuid,tabs:Te})}),(0,U.jsx)(m.Z,{light:!0})]})}),[Z,Te]),Ne=(0,u.useMemo)((function(){return(0,U.jsx)(we,{actionRemoteName:J,branch:L,fetchBranch:function(){H(),K()},loading:!z,remotes:X,setActionRemoteName:te,showError:t})}),[J,L,z,H,K,X,te,t]),De=(0,u.useMemo)((function(){return(0,U.jsx)(G,{actionRemoteName:J,branch:L,branches:S,fetchBranch:H,fetchBranches:I,remotes:X,setActionRemoteName:te,showError:t})}),[J,L,S,H,I,X,te,t]),Re=(0,u.useMemo)((function(){return(0,U.jsx)(ae,{branch:L,fetchBranch:H,modifiedFiles:ge,setSelectedFilePath:v,showError:t,stagedFiles:Ze,untrackedFiles:_e})}),[L,H,ge,v,t,Ze,_e]),Ve=(0,u.useMemo)((function(){return(0,U.jsx)($,{actionRemoteName:J,branch:L,branches:S,fetchBranch:H,loading:!z,modifiedFiles:ge,remotes:X,repositories:de,repositoryName:ie,setActionRemoteName:te,setRepositoryName:se,showError:t,stagedFiles:Ze})}),[J,L,S,z,H,ge,X,de,ie,te,se,t,Ze]);return(0,U.jsx)(ee.Z,{after:Be,afterHidden:!f,afterWidth:40*V.iI,before:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b.Z,{p:1,children:(0,U.jsx)(g.Z,{compact:!0,label:"Base branch",onChange:function(e){return l(e.target.value)},ref:n,small:!0,value:i||"",children:null===S||void 0===S?void 0:S.map((function(e){var n=e.name;return(0,U.jsx)("option",{value:n,children:n},n)}))})}),Ee]}),mainContainerHeader:Ae,title:"Version control",uuid:"Version control/index",children:(0,U.jsxs)(b.Z,{p:V.cd,children:[!E&&(0,U.jsx)(p.Z,{inverted:!0}),E&&(0,U.jsxs)(U.Fragment,{children:[D.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Ne,T.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&De,A.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Re,N.uuid===(null===Z||void 0===Z?void 0:Z.uuid)&&Ve]})]})})};function Be(){return(0,U.jsx)(Me,{})}Be.getInitialProps=(0,t.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 Te=(0,l.Z)(Be)},75302:function(e,n,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/version-control",function(){return r(7828)}])}},function(e){e.O(0,[2678,1154,844,7011,6965,874,9626,8264,7858,5499,5283,2646,5332,9774,2888,179],(function(){return n=75302,e(e.s=n);var n}));var n=e.O();_N_E=n}]);