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
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3437],{94629:function(e,n,t){t.d(n,{Z:function(){return O}});var o=t(82394),i=t(21831),r=t(82684),l=t(50724),c=t(82555),d=t(97618),a=t(70613),u=t(31557),s=t(68899),p=t(28598);function h(e,n){var t=e.children,o=e.noPadding;return(0,p.jsx)(s.HS,{noPadding:o,ref:n,children:t})}var f=r.forwardRef(h),v=t(62547),m=t(82571),g=t(98464),x=t(77417),j=t(46684),b=t(70515),y=t(53808),Z=t(19183);function _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function P(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function k(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var t=e.after,o=e.afterHeader,h=e.afterHidden,_=e.afterWidth,k=e.afterWidthOverride,O=e.appendBreadcrumbs,S=e.before,E=e.beforeWidth,I=e.breadcrumbs,w=e.children,C=e.contained,R=e.errors,A=e.headerMenuItems,T=e.headerOffset,N=e.hideAfterCompletely,D=e.mainContainerHeader,L=e.navigationItems,U=e.setAfterHidden,B=e.setErrors,H=e.subheaderChildren,M=e.subheaderNoPadding,F=e.title,W=e.uuid,G=(0,Z.i)().width,V="dashboard_after_width_".concat(W),Y="dashboard_before_width_".concat(W),Q=(0,r.useRef)(null),z=(0,r.useState)(k?_:(0,y.U2)(V,_)),K=z[0],q=z[1],X=(0,r.useState)(!1),J=X[0],$=X[1],ee=(0,r.useState)(S?Math.max((0,y.U2)(Y,E),13*b.iI):null),ne=ee[0],te=ee[1],oe=(0,r.useState)(!1),ie=oe[0],re=oe[1],le=(0,r.useState)(null)[1],ce=(0,x.Z)().project,de=[];I&&de.push.apply(de,(0,i.Z)(I)),null!==I&&void 0!==I&&I.length&&!O||!ce||null!==I&&void 0!==I&&I.length||de.unshift({bold:!O,label:function(){return F}}),(0,r.useEffect)((function(){null===Q||void 0===Q||!Q.current||J||ie||null===le||void 0===le||le(Q.current.getBoundingClientRect().width)}),[J,K,ie,ne,Q,le,G]),(0,r.useEffect)((function(){J||(0,y.t8)(V,K)}),[h,J,K,V]),(0,r.useEffect)((function(){ie||(0,y.t8)(Y,ne)}),[ie,ne,Y]);var ae=(0,g.Z)(_);return(0,r.useEffect)((function(){k&&ae!==_&&q(_)}),[k,_,ae]),(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(a.Z,{title:F}),(0,p.jsx)(u.Z,{breadcrumbs:de,menuItems:A}),(0,p.jsxs)(s.Nk,{ref:n,children:[0!==(null===L||void 0===L?void 0:L.length)&&(0,p.jsx)(s.lm,{showMore:!0,children:(0,p.jsx)(m.Z,{navigationItems:L,showMore:!0})}),(0,p.jsx)(d.Z,{flex:1,flexDirection:"column",children:(0,p.jsxs)(v.Z,{after:t,afterHeader:o,afterHeightOffset:j.Mz,afterHidden:h,afterMousedownActive:J,afterWidth:K,before:S,beforeHeightOffset:j.Mz,beforeMousedownActive:ie,beforeWidth:s.k1+(S?ne:0),contained:C,headerOffset:T,hideAfterCompletely:!U||N,leftOffset:S?s.k1:null,mainContainerHeader:D,mainContainerRef:Q,setAfterHidden:U,setAfterMousedownActive:$,setAfterWidth:q,setBeforeMousedownActive:re,setBeforeWidth:te,children:[H&&(0,p.jsx)(f,{noPadding:M,children:H}),w]})})]}),R&&(0,p.jsx)(l.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===B||void 0===B?void 0:B(null)},children:(0,p.jsx)(c.Z,P(P({},R),{},{onClose:function(){return null===B||void 0===B?void 0:B(null)}}))})]})}var O=r.forwardRef(k)},8569:function(e,n,t){t.d(n,{Z:function(){return ve}});var o=t(61049);function i(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,n,t){return r=i()?Reflect.construct:function(e,n,t){var i=[null];i.push.apply(i,n);var r=new(Function.bind.apply(e,i));return t&&(0,o.Z)(r,t.prototype),r},r.apply(null,arguments)}var l=t(21831),c=t(82394),d=t(75582),a=t(12691),u=t.n(a),s=t(38626),p=t(21764),h=t(82684),f=t(69864),v=t(34376),m=t(32013),g=t(98777),x=t(71180),j=t(31882),b=t(97618),y=t(55485),Z=t(14466),_=t(48670),P=t(88543),k=t(38276),O=t(30160),S=t(35686),E=t(72473),I=t(8193),w=t(70515),C=t(81728),R=t(3917),A=t(55283),T=t(50178),N=t(86735),D=t(72619),L=t(44085),U=t(17488),B=t(28598);function H(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function M(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?H(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):H(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var F="CUSTOM_VALUE_TYPE",W={compact:!0,monospace:!0,small:!0};var G=function(e){var n=e.leftKey,t=e.leftObjectKeys,o=e.leftObjectType,i=e.leftObjectTypeState,r=e.leftValue,l=e.leftValueType,d=e.rightAligned,a=e.setLeftKey,u=e.setLeftObjectTypeState,s=e.updatePredicate,p=(0,h.useRef)(null),f=(0,h.useState)(),v=f[0],m=f[1];(0,h.useEffect)((function(){var e,n;m(null===p||void 0===p||null===(e=p.current)||void 0===e||null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.width)}),[]),(0,h.useEffect)((function(){var e,n;m(null===p||void 0===p||null===(e=p.current)||void 0===e||null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.width)}),[o,i]);var g=(0,h.useMemo)((function(){return{alignItems:"center",justifyContent:d?"flex-start":"flex-end"}}),[d]),j=(0,h.useMemo)((function(){var e=(0,B.jsx)(O.ZP,{default:!0,small:!0,children:"Value data type"}),n=(0,B.jsx)(L.Z,{compact:!0,onChange:function(e){return s((0,c.Z)({},d?"right_value_type":"left_value_type",M(M({},l),{},{value_data_type:e.target.value})))},placeholder:"required",small:!0,value:null===l||void 0===l?void 0:l.value_data_type,children:Object.values(Z.t4).map((function(e){return(0,B.jsx)("option",{value:e,children:e.toLowerCase()},e)}))});return(0,B.jsxs)(y.ZP,M(M({},g),{},{children:[d?n:e,(0,B.jsx)(k.Z,{mr:1}),d?e:n]}))}),[l,d,g,s]),b=(0,h.useMemo)((function(){var e=(0,B.jsx)(O.ZP,{default:!0,small:!0,children:"Get value from"}),n=F===String(i)||!o&&r,t=(0,B.jsxs)(L.Z,M(M({},W),{},{onChange:function(e){var n,t,o=e.target.value;(u(o),F===o)?s((n={},(0,c.Z)(n,d?"right_object_keys":"left_object_keys",null),(0,c.Z)(n,d?"right_object_type":"left_object_type",null),n)):s((t={},(0,c.Z)(t,d?"right_object_type":"left_object_type",o),(0,c.Z)(t,d?"right_value":"left_value",null),t))},placeholder:"required",value:n?F:o,children:[(0,B.jsx)("option",{value:F,children:"Custom value"}),Object.values(Z.XG).map((function(e){return(0,B.jsx)("option",{value:e,children:e.toLowerCase()},e)}))]})),l=n&&(0,B.jsxs)(B.Fragment,{children:[!d&&(0,B.jsx)(k.Z,{mr:1}),(0,B.jsx)(U.Z,M(M({},W),{},{onChange:function(e){return s((0,c.Z)({},d?"right_value":"left_value",e.target.value))},value:r||""})),d&&(0,B.jsx)(k.Z,{mr:1})]});return(0,B.jsxs)(y.ZP,M(M({},g),{},{children:[!d&&e,d&&l,d&&t,(0,B.jsx)(k.Z,{mr:1}),!d&&t,!d&&l,d&&e]}))}),[o,i,r,u,g,s]),_=(0,h.useMemo)((function(){return(0,B.jsxs)(B.Fragment,{children:[d&&(0,B.jsx)("div",{style:{paddingRight:4}}),(0,B.jsx)(x.ZP,{compact:!0,disabled:!n,onClick:function(){s((0,c.Z)({},d?"right_object_keys":"left_object_keys",(t||[]).concat(n))),a(null)},padding:"2px 6px",ref:p,small:!0,children:"Add key"}),!d&&(0,B.jsx)("div",{style:{paddingRight:4}})]})}),[n,t,d,a,s]),P=(0,h.useMemo)((function(){var e=(0,B.jsx)(O.ZP,{default:!0,small:!0,children:"Value extraction keys"}),i=(0,B.jsx)(U.Z,M(M({},W),{},{buttonAfter:!d&&_,buttonAfterWidth:d||"undefined"===typeof v?null:v+10,buttonBefore:d&&_,buttonBeforeWidth:d&&"undefined"!==typeof v?v+10:null,onChange:function(e){a(e.target.value)},placeholder:"Enter key...",value:n||""}));B.Fragment,B.Fragment;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(y.ZP,M(M({},g),{},{children:[d?i:e,(0,B.jsx)(k.Z,{mr:1}),d?e:i]})),(null===t||void 0===t?void 0:t.length)>=1&&(0,B.jsx)(k.Z,{mt:1,children:(0,B.jsxs)(y.ZP,M(M({},g),{},{children:[(0,B.jsx)(O.ZP,{default:!0,monospace:!0,xsmall:!0,children:o}),!(null!==t&&void 0!==t&&t.length)&&(0,B.jsxs)(O.ZP,{monospace:!0,muted:!0,xsmall:!0,children:["['",(0,B.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,xsmall:!0,children:"..."}),"']"]}),null===t||void 0===t?void 0:t.map((function(e){return(0,B.jsxs)(O.ZP,{monospace:!0,muted:!0,xsmall:!0,children:["['",(0,B.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,xsmall:!0,children:e}),"']"]})})),(0,B.jsx)("div",{style:{marginRight:4}}),(0,B.jsx)(x.ZP,{noBackground:!0,noBorder:!0,noPadding:!0,onClick:function(){s((0,c.Z)({},d?"right_object_keys":"left_object_keys",(t||[]).slice(0,Math.max(0,(null===t||void 0===t?void 0:t.length)-1))))},children:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[(0,B.jsx)(E.x8,{danger:!0,size:1.25*w.iI}),(0,B.jsx)("div",{style:{marginRight:2}}),(0,B.jsx)(O.ZP,{default:!0,xsmall:!0,children:"Delete key"})]})})]}))})]})}),[v,_,n,t,o,d,g]);return(0,B.jsxs)(B.Fragment,{children:[j,(0,B.jsx)(k.Z,{mt:1}),b,(0,B.jsx)(k.Z,{mt:1}),o&&F!==String(i)&&P]})},V=t(65956),Y=t(44897),Q=t(61896),z=1.25*w.iI,K=1.5*w.iI,q=w.iI/4,X=.75*w.iI,J=w.iI/2,$=(0,s.css)([""," ",""],(function(e){return!e.default&&"\n background-color: ".concat((e.theme.accent||Y.Z.accent).purple,";\n ")}),(function(e){return e.default&&"\n background-color: ".concat((e.theme.content||Y.Z.content).muted,";\n ")})),ee=s.default.div.withConfig({displayName:"indexstyle__LabelStyle",componentId:"sc-1v7t9a0-0"})(["border-radius:100px;padding:","px ","px;",""],q,K,(function(e){return"\n background-color: ".concat((e.theme.background||Y.Z.background).chartBlock,";\n border: ").concat(1,"px solid ").concat((e.theme.interactive||Y.Z.interactive).defaultBorder,";\n ")})),ne=s.default.div.withConfig({displayName:"indexstyle__CircleStyle",componentId:"sc-1v7t9a0-1"})(["",";border-radius:","px;height:","px;width:","px;",""],$,1.25*w.iI,z,z,(function(e){return"\n border: 1px solid ".concat((e.theme.interactive||Y.Z.interactive).hoverBorder,";\n ")})),te=s.default.div.withConfig({displayName:"indexstyle__OperatorStyle",componentId:"sc-1v7t9a0-2"})(["",";min-width:","px;padding-bottom:","px;padding-left:","px;padding-right:","px;padding-top:","px;"],$,z+2*(1+K),w.iI/4,J,J,w.iI/4+1),oe=s.default.div.withConfig({displayName:"indexstyle__VerticalLineStyle",componentId:"sc-1v7t9a0-3"})(["",";width:","px;margin-right:","px;"," ",""],$,X,K+1+z/2-X/2,(function(e){return e.last&&"\n height: calc(50% - ".concat(q+1+Q.dN/2,"px);\n ")}),(function(e){return!e.last&&"\n height: 100%;\n "}));var ie=function(e){var n=e.andOrOperator,t=e.children,o=e.first,i=e.last,r=e.level,l=e.predicate,c=e.removePredicate,d=e.title,a=e.updatePredicate,u=(0,h.useRef)(null),s=(0,h.useState)(null),p=s[0],f=s[1],v=(0,h.useState)(null),m=v[0],g=v[1],j=(0,h.useState)(null),_=j[0],P=j[1],S=(0,h.useState)(null),I=S[0],C=S[1],R=(0,h.useState)(null),A=(R[0],R[1]),T=(l.and_or_operator,l.left_object_keys),N=l.left_object_type,D=l.left_value,U=l.left_value_type,H=l.operator,M=l.right_object_keys,F=l.right_object_type,W=l.right_value,Y=l.right_value_type;(0,h.useEffect)((function(){var e,n;A(null===u||void 0===u||null===(e=u.current)||void 0===e||null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.height)}),[]),(0,h.useEffect)((function(){var e,n;A(null===u||void 0===u||null===(e=u.current)||void 0===e||null===(n=e.getBoundingClientRect())||void 0===n?void 0:n.height)}),[N,F]);var Q=(0,h.useMemo)((function(){if(!n)return null;var e=(0,B.jsx)(O.ZP,{bold:!0,center:!0,monospace:!0,uppercase:!0,children:n});return(0,B.jsx)(te,{default:Z.YB.OR===n,children:e})}),[n,r]);return(0,B.jsxs)(y.ZP,{children:[(0,B.jsxs)(y.ZP,{alignItems:"flex-end",flexDirection:"column",children:[!o&&i&&(0,B.jsx)(oe,{default:Z.YB.OR===n,last:!0}),(0,B.jsx)(ee,{children:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[(0,B.jsx)(O.ZP,{monospace:!0,children:d}),(0,B.jsx)(k.Z,{mr:1}),(0,B.jsx)(ne,{default:Z.YB.OR===n})]})}),!i&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(oe,{default:Z.YB.OR===n}),Q,(0,B.jsx)(oe,{default:Z.YB.OR===n})]})]}),(0,B.jsx)(k.Z,{mr:w.cd}),(0,B.jsx)(b.Z,{flex:1,children:(0,B.jsxs)(y.ZP,{flexDirection:"column",fullWidth:!0,ref:u,children:[(0,B.jsxs)(V.Z,{dark:!!(r%2),children:[(0,B.jsxs)(y.ZP,{children:[(0,B.jsxs)(b.Z,{flex:1,flexDirection:"column",children:[(0,B.jsxs)(y.ZP,{justifyContent:"center",children:[(0,B.jsxs)(y.ZP,{alignItems:"center",justifyContent:"flex-end",children:[!N&&"undefined"===typeof D&&(0,B.jsx)(O.ZP,{monospace:!0,muted:!0,small:!0,children:"Left expression"}),!N&&D&&(0,B.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:Z.t4.STRING===(null===U||void 0===U?void 0:U.value_data_type)?"'".concat(D,"'"):D}),N&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:N}),!(null!==T&&void 0!==T&&T.length)&&(0,B.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,B.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"..."}),"']"]}),null===T||void 0===T?void 0:T.map((function(e){return(0,B.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,B.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:e}),"']"]})}))]})]}),(0,B.jsx)(k.Z,{mr:1}),(0,B.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:H?Z.N_[H]:"operator"}),(!H||!Z.i9.includes(H))&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(k.Z,{mr:1}),(0,B.jsxs)(y.ZP,{alignItems:"center",justifyContent:"flex-start",children:[!F&&"undefined"===typeof W&&(0,B.jsx)(O.ZP,{monospace:!0,muted:!0,small:!0,children:"Right expression"}),!F&&W&&(0,B.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:Z.t4.STRING===(null===Y||void 0===Y?void 0:Y.value_data_type)?"'".concat(W,"'"):W}),F&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(O.ZP,{default:!0,monospace:!0,small:!0,children:F}),!(null!==M&&void 0!==M&&M.length)&&(0,B.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,B.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:"..."}),"']"]}),null===M||void 0===M?void 0:M.map((function(e){return(0,B.jsxs)(O.ZP,{monospace:!0,muted:!0,small:!0,children:["['",(0,B.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:e}),"']"]})}))]})]})]})]}),(0,B.jsx)(k.Z,{mb:w.cd}),(0,B.jsxs)(y.ZP,{alignItems:"center",children:[(0,B.jsx)(b.Z,{flex:1,flexDirection:"column",children:(0,B.jsx)(G,{leftKey:m,leftObjectKeys:T,leftObjectType:N,leftObjectTypeState:p,leftValue:D,leftValueType:U,setLeftKey:g,setLeftObjectTypeState:f,updatePredicate:a})}),(0,B.jsx)(k.Z,{mr:w.cd}),(0,B.jsx)("div",{children:(0,B.jsx)(L.Z,{alignCenter:!0,compact:!0,onChange:function(e){return a({operator:e.target.value})},placeholder:"required",small:!0,value:H,children:Object.values(Z.W6).map((function(e){return(0,B.jsx)("option",{value:e,children:Z.N_[e]},e)}))})}),(0,B.jsx)(k.Z,{mr:w.cd}),(0,B.jsx)(b.Z,{flex:1,flexDirection:"column",children:(0,B.jsx)(G,{leftKey:I,leftObjectKeys:M,leftObjectType:F,leftObjectTypeState:_,leftValue:W,leftValueType:Y,rightAligned:!0,setLeftKey:C,setLeftObjectTypeState:P,updatePredicate:a})})]})]}),(0,B.jsx)("div",{children:(0,B.jsx)(x.ZP,{beforeIcon:(0,B.jsx)(E.rF,{muted:!0,size:1.25*w.iI}),compact:!0,onClick:function(){return c()},small:!0,children:(0,B.jsxs)(O.ZP,{default:!0,monospace:!0,small:!0,children:["Delete ",d]})})})]}),t]}),!i&&(0,B.jsx)(k.Z,{mb:w.cd})]})})]})};function re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?re(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):re(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ce={and_or_operator:Z.YB.AND,left_value_type:{value_data_type:Z.t4.STRING},operator:Z.W6.EQUALS,right_value_type:{value_data_type:Z.t4.STRING}};var de=function(e){var n=e.index,t=e.level,o=e.predicate,i=e.renderPredicate,r=e.setPredicate,c=(0,h.useMemo)((function(){return(null===o||void 0===o?void 0:o.predicates)||[]}),[o]),d=((0,h.useCallback)((function(e){r({predicates:e})}),[r]),(0,h.useCallback)((function(){r({predicates:(c||[]).concat(ce)})}),[c,r])),a=(0,h.useCallback)((function(e,n){var t=(0,l.Z)(c);t[n]=e,r({predicates:t})}),[c,r]),u=(0,h.useMemo)((function(){return(null===c||void 0===c?void 0:c.length)||0}),[c]),s=(0,h.useCallback)((function(e,n){if(!(e<0)){var t=(0,C.bH)()[n];return 0===e||(t=t.toLowerCase(),e>=2&&(t="".concat(t).concat(e-1))),t}}),[]),p=(0,h.useMemo)((function(){return s(t,n)}),[s,n,t]);return(0,B.jsxs)(B.Fragment,{children:[null===c||void 0===c?void 0:c.map((function(e,n){var l,d=function(t){return a(le(le({},e),t),n)};return(0,B.jsx)(ie,{andOrOperator:null===o||void 0===o?void 0:o.and_or_operator,first:0===n,last:n===u-1,level:t+1,predicate:e,removePredicate:function(){r(le(le({},e),{},{predicates:(0,N.oM)(c,n)}))},title:s(t+1,n),updatePredicate:d,children:(0,B.jsx)(k.Z,{mt:(null===e||void 0===e||null===(l=e.predicates)||void 0===l?void 0:l.length)>=1?w.cd:0,children:i({index:n,level:t+1,predicate:e,renderPredicate:i,setPredicate:d})})},"predicate-".concat(n))})),(0,B.jsx)(k.Z,{mt:w.cd,children:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[t>=0&&(null===c||void 0===c?void 0:c.length)>=2&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(L.Z,{compact:!0,monospace:!0,onChange:function(e){return r(le(le({},o),{},{and_or_operator:e.target.value}))},small:!0,paddingVertical:3,value:null===o||void 0===o?void 0:o.and_or_operator,children:Object.values(Z.YB).map((function(e){return(0,B.jsx)("option",{value:e,children:(Z.YB.OR===e?"".concat(e," "):e).toUpperCase()},e)}))}),(0,B.jsx)(k.Z,{mr:1})]}),(0,B.jsxs)(x.ZP,{compact:t>=0,beforeIcon:(0,B.jsx)(E.mm,{}),onClick:function(){return d()},secondary:!0,small:t>=0,children:["Add predicate",p&&" in ".concat(p)]})]})})]})};function ae(e){var n=e.index,t=e.level,o=e.predicate,i=e.renderPredicate,r=e.setPredicate;return(0,B.jsx)(de,{index:n,level:t,predicate:o,renderPredicate:i,setPredicate:r})}var ue=t(42122),se=t(70320),pe=t(23780);function he(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function fe(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?he(Object(t),!0).forEach((function(n){(0,c.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):he(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ve=function(e){var n,t,o,i,c,a,L,U,H,M,F,W,G,V,Y,Q,z,K,q,X,J,$,ee,ne,te,oe=e.isNew,ie=e.operationType,re=e.resourceType,le=e.rootProject,ce=e.uuid,de=(0,se.qB)(),he=(0,T.PR)(),ve=(0,v.useRouter)(),me="GlobalHookDetail/".concat(ce),ge=(0,h.useContext)(s.ThemeContext),xe=(0,h.useState)(null),je=xe[0],be=xe[1],ye=(0,h.useState)(!1),Ze=ye[0],_e=ye[1],Pe=(0,h.useState)(ie),ke=Pe[0],Oe=(Pe[1],(0,h.useState)(re)),Se=Oe[0],Ee=(Oe[1],(0,pe.VI)(null,{},[],{uuid:me})),Ie=(0,d.Z)(Ee,1)[0],we=(0,h.useMemo)((function(){return(0,ue.hB)(fe({include_operation_types:1,include_resource_types:1,include_snapshot_validation:1,operation_type:"undefined"===typeof ke?null:ke,resource_type:"undefined"===typeof Se?null:Se},le?{root_project:le}:{}))}),[ke,Se]),Ce=S.ZP.global_hooks.detail(oe?"__new__":ce,we).data,Re=(0,h.useMemo)((function(){return null===Ce||void 0===Ce?void 0:Ce.global_hook}),[Ce]),Ae=(0,h.useMemo)((function(){return{onErrorCallback:function(e){var n=e.error,t=n.errors,o=n.exception,i=n.message,r=n.type,l=e.response;return p.Am.error((null===t||void 0===t?void 0:t.error)||o||i,{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:r}),Ie({errors:t,response:l})}}}),[]),Te=(0,f.Db)(S.ZP.global_hooks.useCreate(),{onSuccess:function(e){return(0,D.wD)(e,fe({callback:function(e){var n=e.global_hook;ve.replace("/".concat(le?"platform/":"","global-hooks/").concat(n.uuid,"?operation_type=").concat(n.operation_type,"&resource_type=").concat(n.resource_type))}},Ae))}}),Ne=(0,d.Z)(Te,2),De=Ne[0],Le=Ne[1].isLoading,Ue=(0,f.Db)(S.ZP.global_hooks.useUpdate(null===Re||void 0===Re?void 0:Re.uuid,we),{onSuccess:function(e){return(0,D.wD)(e,fe({callback:function(e){var n=e.global_hook;$e((function(e){return fe(fe({},e),n)})),p.Am.success("Global hook changes successfully saved.",{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(n.uuid)})}},Ae))}}),Be=(0,d.Z)(Ue,2),He=Be[0],Me=Be[1].isLoading,Fe=(0,f.Db)((function(e){var n=e.pipeline;return S.ZP.global_hooks.useUpdate(null===Re||void 0===Re?void 0:Re.uuid,we)({global_hook:{pipeline:n,snapshot:1}})}),{onSuccess:function(e){return(0,D.wD)(e,fe({callback:function(e){var n=e.global_hook;$e((function(e){return fe(fe({},e),{},{metadata:fe(fe({},null===e||void 0===e?void 0:e.metadata),null===n||void 0===n?void 0:n.metadata),pipeline:fe(fe({},null===e||void 0===e?void 0:e.pipeline),null===n||void 0===n?void 0:n.pipeline)})})),p.Am.success("Snapshot successfully created.",{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-snapshot-success-".concat(n.uuid)})}},Ae))}}),We=(0,d.Z)(Fe,2),Ge=We[0],Ve=We[1].isLoading,Ye=(0,f.Db)(S.ZP.global_hooks.useDelete(null===Re||void 0===Re?void 0:Re.uuid,we),{onSuccess:function(e){return(0,D.wD)(e,fe({callback:function(e){var n=e.global_hook;p.Am.success("Global hook changes successfully saved.",{position:p.Am.POSITION.BOTTOM_RIGHT,toastId:"global-hooks-success-".concat(n.uuid)}),ve.replace("/".concat(le?"platform/":"","global-hooks"))}},Ae))}}),Qe=(0,d.Z)(Ye,2),ze=Qe[0],Ke=Qe[1].isLoading,qe=S.ZP.pipelines.list().data,Xe=(0,h.useMemo)((function(){return(0,N.YC)((null===qe||void 0===qe?void 0:qe.pipelines)||[],(function(e){return e.name}))}),[qe]),Je=(0,h.useMemo)((function(){return(0,N.HK)(Xe||[],(function(e){return e.uuid}))}),[Xe]),$e=(0,h.useCallback)((function(e){be(e),_e(!0)}),[be,_e]);(0,h.useEffect)((function(){Re&&!je&&be(Re)}),[je,Re,be]);var en=(0,h.useMemo)((function(){return null!==je&&void 0!==je&&je.operation_type&&null!==je&&void 0!==je&&je.resource_type?"".concat((0,C.vg)(null===je||void 0===je?void 0:je.operation_type)," ").concat(null===je||void 0===je?void 0:je.resource_type," operation"):null!==je&&void 0!==je&&je.resource_type?"".concat(null===je||void 0===je?void 0:je.resource_type," operation"):null!==je&&void 0!==je&&je.operation_type?"".concat(null===je||void 0===je?void 0:je.operation_type," operation"):"operation"}),[je]),nn=(0,h.useMemo)((function(){var e;return null===Je||void 0===Je?void 0:Je[null===je||void 0===je||null===(e=je.pipeline)||void 0===e?void 0:e.uuid]}),[je,Je]),tn=(0,h.useMemo)((function(){return(null===nn||void 0===nn?void 0:nn.blocks)||[]}),[nn]),on=(0,h.useMemo)((function(){return(0,N.HK)(tn||[],(function(e){return e.uuid}))}),[tn]),rn=(0,h.useMemo)((function(){return(null===je||void 0===je?void 0:je.outputs)||[]}),[je]),ln=(0,h.useCallback)((function(e,n){var t=(0,l.Z)(rn||[]);t[n]=e,$e((function(e){return fe(fe({},e),{},{outputs:t})}))}),[rn,$e]),cn=(0,h.useMemo)((function(){return(0,B.jsx)(x.ZP,{beforeIcon:(0,B.jsx)(E.mm,{}),compact:(null===rn||void 0===rn?void 0:rn.length)>=1,small:(null===rn||void 0===rn?void 0:rn.length)>=1,onClick:function(){return $e((function(e){return fe(fe({},e),{},{outputs:((null===e||void 0===e?void 0:e.outputs)||[]).concat({block:{uuid:null},key:Z.TT.PAYLOAD})})}))},secondary:!0,children:"Add block output"})}),[rn,$e]),dn=(0,h.useMemo)((function(){return null===rn||void 0===rn?void 0:rn.map((function(e,n){var t,o,i=e.block,r=e.key,l=e.keyMore,c=e.keys,d=null===on||void 0===on?void 0:on[null===i||void 0===i?void 0:i.uuid];return o=d?(0,B.jsx)(u(),{as:"/pipelines/".concat(null===nn||void 0===nn?void 0:nn.uuid,"/edit?block_uuid=").concat(null===d||void 0===d?void 0:d.uuid),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,B.jsx)(_.Z,{block:!0,openNewWindow:!0,children:(0,B.jsx)(O.ZP,{color:(0,A.qn)(null===d||void 0===d?void 0:d.type,{blockColor:null===d||void 0===d?void 0:d.color,theme:ge}).accent,monospace:!0,children:(null===d||void 0===d?void 0:d.uuid)||"[select a block]"})})}):(0,B.jsx)(O.ZP,{default:!0,monospace:!0,children:(null===d||void 0===d?void 0:d.uuid)||(null===i||void 0===i?void 0:i.uuid)||"[select a block]"}),(0,B.jsxs)(g.Z,{noBorderRadius:!0,noPaddingContent:!0,title:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[o,(0,B.jsx)(k.Z,{mr:1}),(0,B.jsx)(E.Kw,{muted:!0}),(0,B.jsx)(k.Z,{mr:1}),(0,B.jsxs)(O.ZP,{default:!0,monospace:!0,children:[r||"{object}",(null===c||void 0===c?void 0:c.length)>=1&&(null===c||void 0===c?void 0:c.map((function(e){return(0,B.jsxs)(O.ZP,{default:!0,inline:!0,monospace:!0,children:["['",e,"']"]})})))]})]}),titleXPadding:w.cd*w.iI,titleYPadding:w.cd*w.iI,children:[(0,B.jsx)(P.S,{title:"Block to extract data from",description:"The output data from this block will be merged into the ".concat(en,"\u2019s data."),selectInput:{monospace:!0,onChange:function(t){return ln(fe(fe({},e),{},{block:fe(fe({},d),{},{uuid:t.target.value})}),n)},options:null===tn||void 0===tn?void 0:tn.map((function(e){return{label:e.name,value:e.uuid}})),placeholder:"Select a block",value:null===d||void 0===d?void 0:d.uuid}},"block-uuid-".concat(n)),(0,B.jsx)(P.S,{title:"Object to merge block output data into",description:"Select the ".concat(en," object to merge the block output data into."),selectInput:{monospace:!0,onChange:function(t){return ln(fe(fe({},e),{},{key:t.target.value}),n)},options:null===(t=Object.values(Z.TT))||void 0===t?void 0:t.map((function(e){return{label:e,value:e}})),placeholder:"Select an object",value:r}},"key-".concat(n)),(0,B.jsxs)(P.S,{title:"Additional dictionary keys",description:(0,B.jsxs)(O.ZP,{muted:!0,small:!0,children:["If there is a nested object or value in the $",en," data that you want to merge the block output data into,",(0,B.jsx)("br",{}),"use these additional keys to instruct the hook on how nested you want to merge the block output data."]}),textInput:{fullWidth:!1,monospace:!0,placeholder:"optional",onChange:function(t){return ln(fe(fe({},e),{},{keyMore:t.target.value}),n)},value:l},children:[null===c||void 0===c?void 0:c.map((function(t){return(0,B.jsx)(k.Z,{ml:1,children:(0,B.jsx)(j.Z,{border:!0,label:t,monospace:!0,onClick:function(){ln(fe(fe({},e),{},{keys:(c||[]).filter((function(e){return e!==t}))}),n)}})},"keys-".concat(n,"-").concat(t))})),(null===c||void 0===c?void 0:c.length)>=1&&(0,B.jsx)(k.Z,{mr:w.cd}),l&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(x.ZP,{compact:!0,onClick:function(){ln(fe(fe({},e),{},{keyMore:"",keys:(c||[]).concat(l)}),n)},small:!0,children:["Add key ",l]}),(0,B.jsx)(k.Z,{mr:w.cd})]})]},"keys-".concat(n)),(0,B.jsx)(P.S,{title:"Remove block output",children:(0,B.jsx)(x.ZP,{compact:!0,onClick:function(){return $e((function(e){return fe(fe({},e),{},{outputs:(0,N.oM)((null===e||void 0===e?void 0:e.outputs)||[],n)})}))},small:!0,children:"Remove"})})]})}))}),[tn,on,rn,nn,ln]),an=(0,h.useMemo)((function(){return(0,ue.GL)(je||{},["conditions","operation_type","outputs","pipeline","predicate","resource_type","run_settings","stages","strategies"])}),[je]),un=(0,h.useMemo)((function(){return(null===je||void 0===je?void 0:je.metadata)||{created_at:null,snapshot_hash:null,snapshot_valid:!1,snapshotted_at:null,updated_at:null,user:{id:null}}}),[je]),sn=(0,h.useMemo)((function(){return null===je||void 0===je?void 0:je.predicate}),[je]),pn=(0,h.useMemo)((function(){return(0,B.jsx)(k.Z,{p:w.cd,children:ae({level:-1,predicate:sn,renderPredicate:ae,setPredicate:function(e){return $e((function(n){return fe(fe({},n),{},{predicate:fe(fe({},e),{},{and_or_operator:Z.YB.OR})})}))}})})}),[sn,$e]);return(0,B.jsxs)(k.Z,{mb:8,p:w.cd,children:[(0,B.jsxs)(P.Z,{title:"What to run hook for",children:[(0,B.jsx)(P.S,{description:"This hook\u2019s UUID must be unique across all hooks for the same resource type and operation type.",invalid:Ze&&!(null!==je&&void 0!==je&&je.uuid),textInput:oe?{monospace:!0,onChange:function(e){return $e((function(n){return fe(fe({},n),{},{uuid:e.target.value})}))},placeholder:"e.g. bootstrap pipeline blocks",value:null===je||void 0===je?void 0:je.uuid}:null,title:"Hook UUID",children:!oe&&(0,B.jsx)(k.Z,{px:w.cd,children:(0,B.jsx)(O.ZP,{large:!0,monospace:!0,children:ce})})}),(0,B.jsx)(P.S,{description:"Select the resource this hook should be attached to.",invalid:Ze&&!(null!==je&&void 0!==je&&je.resource_type),selectInput:{monospace:!0,onChange:function(e){return $e((function(n){return fe(fe({},n),{},{resource_type:e.target.value})}))},options:null===je||void 0===je||null===(n=je.resource_types)||void 0===n?void 0:n.map((function(e){return{label:(0,C.j3)(e),value:e}})),placeholder:"e.g. Pipeline",value:null===je||void 0===je?void 0:je.resource_type},title:"Resource type"}),(0,B.jsx)(P.S,{description:"When a specific operation occurs for a given resource, this hook will be invoked for that specific operation on the configured resource.",invalid:Ze&&!(null!==je&&void 0!==je&&je.operation_type),selectInput:{monospace:!0,onChange:function(e){return $e((function(n){return fe(fe({},n),{},{operation_type:e.target.value})}))},options:null===je||void 0===je||null===(t=je.operation_types)||void 0===t?void 0:t.map((function(e){return{label:(0,C.vg)(e),value:e}})),placeholder:"e.g. Update",value:null===je||void 0===je?void 0:je.operation_type},title:"Operation type"}),!oe&&(0,B.jsx)(m.Z,{noBorder:!0,noBoxShadow:!0,visibleMappingForced:{0:!0},children:(0,B.jsxs)(g.Z,{noBorderRadius:!0,noPaddingContent:!0,title:"Targeting",titleXPadding:w.cd*w.iI,titleYPadding:w.cd*w.iI,children:[(0,B.jsx)(k.Z,{p:w.cd,children:(0,B.jsxs)(O.ZP,{default:!0,children:["Add targeting conditions to determine what subset of ",null!==je&&void 0!==je&&je.resource_type?(0,C._6)((0,C.j3)(null===je||void 0===je?void 0:je.resource_type),2,null,!0):"resources"," this hook should run for."]})}),pn]})})]}),!oe&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(k.Z,{mb:w.cd}),(0,B.jsxs)(P.Z,{title:"When to run hook",children:[(0,B.jsx)(P.S,{title:"Before operation starts",description:"If enabled, this hook will be invoked before the ".concat(en," starts."),toggleSwitch:{checked:null===je||void 0===je||null===(o=je.stages)||void 0===o?void 0:o.includes(Z.SQ.BEFORE),onCheck:function(e){return $e((function(n){var t,o;return fe(fe({},n),{},{stages:e(null===n||void 0===n||null===(t=n.stages)||void 0===t?void 0:t.includes(Z.SQ.BEFORE))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.stages)||[]).concat(Z.SQ.BEFORE)])):(null===n||void 0===n||null===(o=n.stages)||void 0===o?void 0:o.filter((function(e){return e!==Z.SQ.BEFORE})))||[]})}))}}}),(0,B.jsx)(P.S,{title:"After operation completes",description:"If enabled, this hook will be invoked after the ".concat(en," ends."),toggleSwitch:{checked:null===je||void 0===je||null===(i=je.stages)||void 0===i?void 0:i.includes(Z.SQ.AFTER),onCheck:function(e){return $e((function(n){var t,o;return fe(fe({},n),{},{stages:e(null===n||void 0===n||null===(t=n.stages)||void 0===t?void 0:t.includes(Z.SQ.AFTER))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.stages)||[]).concat(Z.SQ.AFTER)])):(null===n||void 0===n||null===(o=n.stages)||void 0===o?void 0:o.filter((function(e){return e!==Z.SQ.AFTER})))||[]})}))}}}),(0,B.jsx)(P.S,{title:"Run if ".concat(en," succeeds"),description:"If enabled, this hook will be invoked if the ".concat(en," is successful and doesn\u2019t error."),toggleSwitch:{checked:null===je||void 0===je||null===(c=je.conditions)||void 0===c?void 0:c.includes(Z.sw.SUCCESS),onCheck:function(e){return $e((function(n){var t,o;return fe(fe({},n),{},{conditions:e(null===n||void 0===n||null===(t=n.conditions)||void 0===t?void 0:t.includes(Z.sw.SUCCESS))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.conditions)||[]).concat(Z.sw.SUCCESS)])):(null===n||void 0===n||null===(o=n.conditions)||void 0===o?void 0:o.filter((function(e){return e!==Z.sw.SUCCESS})))||[]})}))}}}),(0,B.jsx)(P.S,{title:"Run if ".concat(en," fails"),description:"If enabled, this hook will be invoked if the ".concat(en," fails with an error."),toggleSwitch:{checked:null===je||void 0===je||null===(a=je.conditions)||void 0===a?void 0:a.includes(Z.sw.FAILURE),onCheck:function(e){return $e((function(n){var t,o;return fe(fe({},n),{},{conditions:e(null===n||void 0===n||null===(t=n.conditions)||void 0===t?void 0:t.includes(Z.sw.FAILURE))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.conditions)||[]).concat(Z.sw.FAILURE)])):(null===n||void 0===n||null===(o=n.conditions)||void 0===o?void 0:o.filter((function(e){return e!==Z.sw.FAILURE})))||[]})}))}}})]}),(0,B.jsx)(k.Z,{mb:w.cd}),(0,B.jsxs)(P.Z,{title:"Code to run",description:"When the current hook gets triggered, it will execute the associated pipeline.",children:[(0,B.jsx)(P.S,{title:"Pipeline to execute",description:"Select a pipeline that will be executed every time this hook is triggered.",invalid:Ze&&!(null!==je&&void 0!==je&&null!==(L=je.pipeline)&&void 0!==L&&L.uuid),selectInput:{fullWidth:!1,monospace:!0,onChange:function(e){return $e((function(n){return fe(fe({},n),{},{pipeline:fe(fe({},null===n||void 0===n?void 0:n.pipeline),{},{uuid:e.target.value})})}))},options:null===Xe||void 0===Xe?void 0:Xe.map((function(e){var n=e.name,t=e.uuid;return{label:n||t,value:t}})),placeholder:"Select a pipeline",value:null===je||void 0===je||null===(U=je.pipeline)||void 0===U?void 0:U.uuid},children:(null===je||void 0===je||null===(H=je.pipeline)||void 0===H?void 0:H.uuid)&&(0,B.jsx)(k.Z,{mr:2,children:(0,B.jsx)(u(),{as:"/pipelines/".concat(null===je||void 0===je||null===(M=je.pipeline)||void 0===M?void 0:M.uuid,"/edit"),href:"/pipelines/[pipeline]/edit",passHref:!0,children:(0,B.jsx)(_.Z,{block:!0,openNewWindow:!0,children:"View pipeline"})})})}),(0,B.jsxs)(P.S,{title:null===je||void 0===je||null===(F=je.pipeline)||void 0===F||!F.uuid||null!==un&&void 0!==un&&un.snapshot_hash||null!==un&&void 0!==un&&un.snapshot_valid?"Valid code snapshot":"Code snapshot hasn\u2019t been created yet",description:(0,B.jsx)(B.Fragment,{children:(0,B.jsxs)(O.ZP,{muted:!0,small:!0,children:["Take a snapshot of ",null!==je&&void 0!==je&&null!==(W=je.pipeline)&&void 0!==W&&W.uuid?(0,B.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null===je||void 0===je||null===(G=je.pipeline)||void 0===G?void 0:G.uuid}):"the associated pipeline","\u2019s code. The snapshot is used to validate the hook before it runs.",(0,B.jsx)("br",{}),"A hook cannot run if ",null!==je&&void 0!==je&&null!==(V=je.pipeline)&&void 0!==V&&V.uuid?(0,B.jsx)(O.ZP,{default:!0,inline:!0,monospace:!0,small:!0,children:null===je||void 0===je||null===(Y=je.pipeline)||void 0===Y?void 0:Y.uuid}):"the associated pipeline","\u2019s code has changed after the most recent snapshot has been made.",(0,B.jsx)("br",{}),"If the code changes, a new snapshot must be created."]})}),invalid:(null===je||void 0===je||null===(Q=je.pipeline)||void 0===Q?void 0:Q.uuid)&&(null===un||void 0===un?void 0:un.snapshot_hash)&&!(null!==un&&void 0!==un&&un.snapshot_valid),warning:(null===je||void 0===je||null===(z=je.pipeline)||void 0===z?void 0:z.uuid)&&!(null!==un&&void 0!==un&&un.snapshot_hash)&&!(null!==un&&void 0!==un&&un.snapshot_valid),children:[!(null!==un&&void 0!==un&&un.snapshot_hash)&&(0,B.jsx)(O.ZP,{default:!0,large:!0,children:null!==je&&void 0!==je&&null!==(K=je.pipeline)&&void 0!==K&&K.uuid?"No snapshot has been created":"Select a pipeline before taking a snapshot"}),(null===un||void 0===un?void 0:un.snapshot_hash)&&(0,B.jsx)(y.ZP,{flexDirection:"column",children:(0,B.jsx)(O.ZP,{danger:!(null!==un&&void 0!==un&&un.snapshot_valid),large:!0,rightAligned:!0,success:null===un||void 0===un?void 0:un.snapshot_valid,children:null!==un&&void 0!==un&&un.snapshot_valid?"Snapshot valid":"Snapshot outdated"})})]}),(0,B.jsx)(k.Z,{p:w.cd,children:(0,B.jsx)(y.ZP,{alignItems:"center",justifyContent:"flex-end",children:(0,B.jsxs)(y.ZP,{alignItems:"center",children:[(null===un||void 0===un?void 0:un.snapshotted_at)&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(O.ZP,{muted:!0,rightAligned:!0,small:!0,children:["Last snapshot at ",(0,B.jsx)(O.ZP,{inline:!0,muted:!0,small:!0,monospace:!0,children:null===un||void 0===un?void 0:un.snapshotted_at})]}),(0,B.jsx)(k.Z,{mr:w.cd})]}),(0,B.jsx)(x.ZP,{disabled:!(null!==je&&void 0!==je&&null!==(q=je.pipeline)&&void 0!==q&&q.uuid),loading:Ve,onClick:function(){return Ge({pipeline:null===je||void 0===je?void 0:je.pipeline})},primary:!(null!==un&&void 0!==un&&un.snapshot_valid),secondary:null===un||void 0===un?void 0:un.snapshot_valid,children:null!==un&&void 0!==un&&un.snapshot_hash?null!==un&&void 0!==un&&un.snapshot_valid?"Update snapshot even though it\u2019s valid":"Update snapshot to make it valid":"Create snapshot of code"})]})})})]}),(0,B.jsx)(k.Z,{mb:w.cd}),(0,B.jsxs)(P.Z,{title:"How to run hook",children:[(0,B.jsx)(P.S,{title:"Stop operation if hook fails",description:"If enabled, the ".concat(en," will be cancelled and an error will be raised."),toggleSwitch:{checked:null===je||void 0===je||null===(X=je.strategies)||void 0===X?void 0:X.includes(Z.Ij.RAISE),onCheck:function(e){return $e((function(n){var t,o;return fe(fe({},n),{},{strategies:e(null===n||void 0===n||null===(t=n.strategies)||void 0===t?void 0:t.includes(Z.Ij.RAISE))?Array.from(r(Set,[((null===n||void 0===n?void 0:n.strategies)||[]).concat(Z.Ij.RAISE)])):(null===n||void 0===n||null===(o=n.strategies)||void 0===o?void 0:o.filter((function(e){return e!==Z.Ij.RAISE})))||[]})}))}}}),(0,B.jsx)(P.S,{title:"Execute hook with history and logging",description:(0,B.jsxs)(O.ZP,{muted:!0,small:!0,children:["If enabled, anytime this hook is executed an associated pipeline run and block runs will be created.",(0,B.jsx)("br",{}),"This will provide a history of the hook execution as well as logging for observability.",(0,B.jsx)("br",{}),"However, this will have a significant impact on the ",en," resolution time.",(0,B.jsx)("br",{}),"This may cause very delayed API responsed and a degraded devloper experience."]}),toggleSwitch:{checked:!(null===je||void 0===je||null===(J=je.run_settings)||void 0===J||!J.with_trigger),onCheck:function(e){return $e((function(n){var t;return fe(fe({},n),{},{run_settings:fe(fe({},null===n||void 0===n?void 0:n.run_settings),{},{with_trigger:e(null===n||void 0===n||null===(t=n.run_settings)||void 0===t?void 0:t.with_trigger)})})}))}}}),(0,B.jsx)(P.S,{title:"Run hook asynchronously",description:(0,B.jsxs)(O.ZP,{muted:!0,small:!0,children:["Hooks will execute the associated pipeline synchronously and prevent the current resource operation (e.g. API request) from resolving until all associated hooks for that resource operation are completed.",(0,B.jsx)("br",{}),"Hooks running synchronously can mutate the input data and output data. However, it can slow down the user experience in the application.",(0,B.jsx)("br",{}),"Enable this setting to run hooks asynchronously and not block the current resource operation from resolving.",(0,B.jsx)("br",{}),"However, asynchronous hooks cannot mutate the input data or output data. Use this asynchronous setting when hooks don\u2019t need to mutate data."]}),toggleSwitch:{checked:!(null===je||void 0===je||null===($=je.run_settings)||void 0===$||!$.asynchronous),onCheck:function(e){return $e((function(n){var t;return fe(fe({},n),{},{run_settings:fe(fe({},null===n||void 0===n?void 0:n.run_settings),{},{asynchronous:e(null===n||void 0===n||null===(t=n.run_settings)||void 0===t?void 0:t.asynchronous)})})}))}}})]}),(0,B.jsx)(k.Z,{mb:w.cd}),(0,B.jsxs)(P.Z,{title:"Block outputs ".concat((null===rn||void 0===rn?void 0:rn.length)>=1?"(".concat((null===rn||void 0===rn?void 0:rn.length)||0,")"):""),description:(0,B.jsx)(k.Z,{mt:1,children:(0,B.jsxs)(O.ZP,{muted:!0,children:["When a hook runs and executes a pipeline, the output from the pipeline\u2019s blocks",(0,B.jsx)("br",{}),"can optionally be used to mutate the ",en," input and output data."]})}),headerChildren:(null===rn||void 0===rn?void 0:rn.length)>=1&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(k.Z,{ml:w.cd}),cn]}),children:[!(null!==rn&&void 0!==rn&&rn.length)&&(0,B.jsx)(k.Z,{p:w.cd,children:cn}),(null===rn||void 0===rn?void 0:rn.length)>=1&&(0,B.jsx)(m.Z,{noBorder:!0,noBoxShadow:!0,children:dn})]}),(0,B.jsx)(k.Z,{mb:w.cd}),(0,B.jsxs)(P.Z,{title:"Metadata",children:[(0,B.jsx)(P.S,{title:"Last updated",children:(0,B.jsxs)(b.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!==un&&void 0!==un&&un.updated_at?(0,R.XG)(null===un||void 0===un?void 0:un.updated_at,de):"-"}),(0,B.jsx)(k.Z,{mr:w.cd}),(0,B.jsx)(E.Pf,{muted:!0,size:I.Z}),(0,B.jsx)(k.Z,{mr:1})]})}),(0,B.jsx)(P.S,{title:"Created at",children:(0,B.jsxs)(b.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!==un&&void 0!==un&&un.created_at?(0,R.XG)(null===un||void 0===un?void 0:un.created_at,de):"-"}),(0,B.jsx)(k.Z,{mr:w.cd}),(0,B.jsx)(E.Pf,{muted:!0,size:I.Z}),(0,B.jsx)(k.Z,{mr:1})]})}),(0,B.jsx)(P.S,{title:"Snapshotted at",children:(0,B.jsxs)(b.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!==un&&void 0!==un&&un.snapshotted_at?(0,R.XG)(null===un||void 0===un?void 0:un.snapshotted_at,de):"-"}),(0,B.jsx)(k.Z,{mr:w.cd}),(0,B.jsx)(E.Pf,{muted:!0,size:I.Z}),(0,B.jsx)(k.Z,{mr:1})]})}),(0,B.jsx)(P.S,{title:"Snapshot valid",children:(0,B.jsxs)(b.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(O.ZP,{large:!0,danger:!(null!==un&&void 0!==un&&un.snapshot_valid),muted:null===un||void 0===un?void 0:un.snapshot_valid,children:null!==un&&void 0!==un&&un.snapshot_valid?"Valid":"Hook won\u2019t run until snapshot is valid"}),(0,B.jsx)(k.Z,{mr:w.cd}),null!==un&&void 0!==un&&un.snapshot_valid?(0,B.jsx)(E.Jr,{size:I.Z,success:!0}):(0,B.jsx)(E.uy,{danger:!0,size:I.Z}),(0,B.jsx)(k.Z,{mr:1})]})}),(0,B.jsx)(P.S,{title:"Created by",children:(0,B.jsxs)(b.Z,{alignItems:"center",flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(O.ZP,{large:!0,monospace:!0,muted:!0,children:null!==un&&void 0!==un&&null!==(ee=un.user)&&void 0!==ee&&ee.id?String(null===un||void 0===un||null===(ne=un.user)||void 0===ne?void 0:ne.id)===String(null===he||void 0===he?void 0:he.id)?"You created this hook":"User ID ".concat(null===un||void 0===un||null===(te=un.user)||void 0===te?void 0:te.id):"-"}),(0,B.jsx)(k.Z,{mr:w.cd}),(0,B.jsx)(E.SC,{muted:!0,size:I.Z}),(0,B.jsx)(k.Z,{mr:1})]})})]})]}),(0,B.jsx)(k.Z,{mt:w.HN,children:(0,B.jsxs)(y.ZP,{alignItems:"center",justifyContent:"space-between",children:[!oe&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(x.ZP,{compact:!0,danger:!0,loading:Ke,onClick:function(){window.confirm("Are you sure you wantt to delete this hook?")&&ze()},small:!0,children:"Delete global hook"}),(0,B.jsx)(k.Z,{mr:w.cd})]}),(0,B.jsxs)(b.Z,{flex:1,justifyContent:"flex-end",children:[(0,B.jsx)(x.ZP,{beforeIcon:(0,B.jsx)(E.Hd,{}),disabled:Le||Me||Ke,onClick:function(){return ve.push("/".concat(le?"platform/":"","global-hooks"))},secondary:!0,children:Ze?"Cancel changes & go back":"Go back to all hooks"}),(0,B.jsx)(k.Z,{mr:w.cd}),(0,B.jsx)(x.ZP,{beforeIcon:(0,B.jsx)(E.vc,{}),disabled:Ke,loading:Le||Me,onClick:function(){return(oe?De:He)({global_hook:fe(fe(fe({},an),oe?{uuid:null===je||void 0===je?void 0:je.uuid}:{}),{},{root_project:le})})},primary:!0,children:oe?"Create new global hook":"Save changes"})]})]})})]})}},88543:function(e,n,t){t.d(n,{S:function(){return y},Z:function(){return Z}});var o=t(82684),i=t(15338),r=t(97618),l=t(55485),c=t(85854),d=t(65956),a=t(82394),u=t(44085),s=t(38276),p=t(30160),h=t(17488),f=t(69650),v=t(72473),m=t(8193),g=t(70515),x=t(28598);function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){(0,a.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var y=function(e){var n,t=e.children,o=e.description,i=e.invalid,c=e.large,d=void 0===c||c,a=e.selectInput,j=e.textInput,y=e.title,Z=e.toggleSwitch,_=e.warning;return(0,x.jsx)(s.Z,{p:g.cd,children:(0,x.jsxs)(l.ZP,{alignItems:"center",children:[(0,x.jsxs)(l.ZP,{flexDirection:"column",children:[(0,x.jsxs)(p.ZP,{danger:i,default:!0,large:d,warning:_,children:[y," ",i&&(0,x.jsx)(p.ZP,{danger:!0,inline:!0,large:d,children:"is required"})]}),o&&"string"===typeof o&&(0,x.jsx)(p.ZP,{muted:!0,small:!0,children:o}),o&&"string"!==typeof o&&o]}),(0,x.jsx)(s.Z,{mr:g.cd}),(0,x.jsxs)(r.Z,{flex:1,justifyContent:"flex-end",children:[t,j&&(0,x.jsx)(h.Z,b({afterIcon:(0,x.jsx)(v.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:d,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},j)),a&&(0,x.jsx)(u.Z,b(b({},a),{},{afterIcon:(0,x.jsx)(v._M,{}),afterIconSize:m.Z,alignRight:!0,autoComplete:"off",large:d,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===a||void 0===a||null===(n=a.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)(f.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,a=e.headerChildren,u=e.title;return(0,x.jsxs)(d.Z,{noPadding:!0,children:[(0,x.jsx)(s.Z,{p:g.cd,children:(0,x.jsxs)(l.ZP,{alignItems:"center",children:[(0,x.jsxs)(r.Z,{flex:1,flexDirection:"column",children:[(0,x.jsx)(c.Z,{level:4,children:u}),t&&"string"===typeof t&&(0,x.jsx)(s.Z,{mt:1,children:(0,x.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),a]})}),o.Children.map(n,(function(e,n){return(0,x.jsxs)("div",{children:[(0,x.jsx)(i.Z,{light:!0}),e]},"".concat(u,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return d},Z:function(){return c}});var o=t(38626),i=t(44897),r=t(42631),l=t(70515),c=2*l.iI,d=o.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-1ck7mzt-0"})(["border-radius:","px;padding:","px;",""],r.n_,l.cd*l.iI,(function(e){return"\n background-color: ".concat((e.theme.background||i.Z.background).codeArea,";\n ")}))},14466:function(e,n,t){t.d(n,{Ij:function(){return r},N_:function(){return v},SQ:function(){return l},TT:function(){return c},W6:function(){return p},XG:function(){return u},YB:function(){return a},i9:function(){return f},sw:function(){return d},t4:function(){return s}});var o,i,r,l,c,d,a,u,s,p,h=t(82394);!function(e){e.CREATE="create",e.DELETE="delete",e.DETAIL="detail",e.EXECUTE="execute",e.LIST="list",e.UPDATE="update",e.UPDATE_ANYWHERE="update_anywhere"}(i||(i={})),function(e){e.BREAK="break",e.CONTINUE="continue",e.RAISE="raise"}(r||(r={})),function(e){e.AFTER="after",e.BEFORE="before"}(l||(l={})),function(e){e.ERROR="error",e.META="meta",e.METADATA="metadata",e.PAYLOAD="payload",e.QUERY="query",e.RESOURCE="resource",e.RESOURCES="resources"}(c||(c={})),function(e){e.FAILURE="failure",e.SUCCESS="success"}(d||(d={})),function(e){e.AND="and",e.OR="or"}(a||(a={})),function(e){e.ERROR="error",e.HOOK="hook",e.META="meta",e.METADATA="metadata",e.OPERATION_RESOURCE="operation_resource",e.PAYLOAD="payload",e.QUERY="query",e.RESOURCE="resource",e.RESOURCES="resources",e.RESOURCE_ID="resource_id",e.RESOURCE_PARENT="resource_parent",e.RESOURCE_PARENT_ID="resource_parent_id",e.RESOURCE_PARENT_TYPE="resource_parent_type",e.USER="user"}(u||(u={})),function(e){e.BOOLEAN="BOOLEAN",e.DICTIONARY="DICTIONARY",e.FLOAT="FLOAT",e.INTEGER="INTEGER",e.LIST="LIST",e.STRING="STRING"}(s||(s={})),function(e){e.EQUALS="EQUALS",e.GREATER_THAN="GREATER_THAN",e.GREATER_THAN_OR_EQUALS="GREATER_THAN_OR_EQUALS",e.INCLUDES="INCLUDES",e.LESS_THAN="LESS_THAN",e.LESS_THAN_OR_EQUALS="LESS_THAN_OR_EQUALS",e.NOT_EQUALS="NOT_EQUALS",e.NOT_INCLUDES="NOT_INCLUDES",e.NOT_PRESENT="NOT_PRESENT",e.PRESENT="PRESENT"}(p||(p={}));var f=[p.NOT_PRESENT,p.PRESENT],v=(o={},(0,h.Z)(o,p.EQUALS,"=="),(0,h.Z)(o,p.GREATER_THAN,">"),(0,h.Z)(o,p.GREATER_THAN_OR_EQUALS,">="),(0,h.Z)(o,p.INCLUDES,"includes"),(0,h.Z)(o,p.LESS_THAN,"<"),(0,h.Z)(o,p.LESS_THAN_OR_EQUALS,"<="),(0,h.Z)(o,p.NOT_EQUALS,"!="),(0,h.Z)(o,p.NOT_INCLUDES,"not includes"),(0,h.Z)(o,p.NOT_PRESENT,"is not present"),(0,h.Z)(o,p.PRESENT,"is present"),o)},31882:function(e,n,t){var o=t(38626),i=t(71180),r=t(55485),l=t(30160),c=t(44897),d=t(72473),a=t(70515),u=t(61896),s=t(28598),p=o.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+u.Al)/2,"px;\n height: ").concat(1.5*a.iI+u.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+u.Al)/2,"px;\n height: ").concat(u.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+u.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,o=e.disabled,c=e.label,u=e.monospace,h=e.onClick,f=e.primary,v=e.small,m=e.xsmall;return(0,s.jsx)(p,{border:n,primary:f,small:v,xsmall:m,children:(0,s.jsx)(i.ZP,{basic:!0,disabled:o,noBackground:!0,noPadding:!0,onClick:h,transparent:!0,children:(0,s.jsxs)(r.ZP,{alignItems:"center",children:[t,c&&(0,s.jsx)(l.ZP,{monospace:u,small:v,xsmall:m,children:c}),!o&&h&&(0,s.jsx)("div",{style:{marginLeft:2}}),!o&&h&&(0,s.jsx)(d.x8,{default:f,muted:!f,size:v?a.iI:1.25*a.iI})]})})})}},65956:function(e,n,t){var o=t(38626),i=t(55485),r=t(38276),l=t(30160),c=t(44897),d=t(42631),a=t(47041),u=t(70515),s=t(28598),p=(0,o.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*u.iI,1.5*u.iI,1.5*u.iI),h=o.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.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 "})),f=o.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.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 ")}),p,(function(e){return e.headerPaddingVertical&&"\n padding-bottom: ".concat(e.headerPaddingVertical,"px;\n padding-top: ").concat(e.headerPaddingVertical,"px;\n ")})),v=o.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*u.iI,a.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*u.iI,"px);\n ")}),(function(e){return e.noPadding&&"\n padding: 0;\n "}),(function(e){return e.overflowVisible&&"\n overflow: visible;\n "})),m=o.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*u.iI);n.Z=function(e){var n=e.borderless,t=e.children,o=e.containerRef,c=e.contentContainerRef,d=e.dark,a=e.footer,u=e.fullHeight,p=void 0===u||u,g=e.fullWidth,x=void 0===g||g,j=e.header,b=e.headerHeight,y=e.headerIcon,Z=e.headerPaddingVertical,_=e.headerTitle,P=e.maxHeight,k=e.maxWidth,O=e.minWidth,S=e.noPadding,E=e.overflowVisible,I=e.subtitle,w=e.success;return(0,s.jsxs)(h,{borderless:n,dark:d,fullHeight:p,fullWidth:x,maxHeight:P,maxWidth:k,minWidth:O,overflowVisible:E,ref:o,success:w,children:[(j||_)&&(0,s.jsxs)(f,{headerPaddingVertical:Z,height:b,children:[j&&j,_&&(0,s.jsx)(i.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(i.ZP,{alignItems:"center",children:[y&&y,(0,s.jsx)(r.Z,{ml:y?1:0,children:(0,s.jsx)(l.ZP,{bold:!0,default:!0,children:_})})]})})]}),(0,s.jsxs)(v,{maxHeight:P,noPadding:S,overflowVisible:E,ref:c,children:[I&&"string"===typeof I&&(0,s.jsx)(r.Z,{mb:2,children:(0,s.jsx)(l.ZP,{default:!0,children:I})}),I&&"string"!==typeof I&&I,t]}),a&&(0,s.jsx)(m,{children:a})]})}},80022:function(e,n,t){function o(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 o}})},15544:function(e,n,t){function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}t.d(n,{Z:function(){return o}})},13692:function(e,n,t){t.d(n,{Z:function(){return i}});var o=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,o.Z)(e,n)}},93189:function(e,n,t){t.d(n,{Z:function(){return r}});var o=t(12539),i=t(80022);function r(e,n){if(n&&("object"===o(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){function o(e,n){return o=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e},o(e,n)}t.d(n,{Z:function(){return o}})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3540,5729],{60523:function(e,n,t){var i=t(21831),r=t(82394),o=t(82684),c=t(38626),l=t(34376),d=t(54750),u=t(71180),a=t(90299),s=t(44898),p=t(55485),h=t(88328),f=t(38276),m=t(4190),v=t(48381),g=t(5755),x=t(30160),j=t(35686),b=t(72473),y=t(84649),Z=t(32929),w=t(15610),O=t(19183),P=t(28598);function _(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 k(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?_(Object(t),!0).forEach((function(n){(0,r.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):_(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}n.Z=function(e){var n,t=e.contained,r=e.defaultLinkUUID,_=e.defaultTab,C=e.objectType,I=e.onClickCustomTemplate,S=e.pipelineUUID,B=e.showAddingNewTemplates,D=e.showBreadcrumbs,N=e.tabs,E=(0,l.useRouter)(),M=(0,o.useContext)(c.ThemeContext),T=(0,O.i)(),H=T.height,A=T.width,R=(0,o.useMemo)((function(){return N||Z.dP}),[N]),U=(0,o.useState)(B||!1),F=U[0],L=U[1],z=(0,o.useState)(r?Z.qy.find((function(e){return e.uuid===r})):Z.qy[0]),q=z[0],Y=z[1],V=(0,o.useState)(_?R.find((function(e){return e.uuid===(null===_||void 0===_?void 0:_.uuid)})):R[0]),G=V[0],W=V[1],X=(0,o.useState)(null),$=X[0],J=X[1],K=j.ZP.custom_templates.list({object_type:s.Z},{},{pauseFetch:Z.n9.uuid!==(null===G||void 0===G?void 0:G.uuid)}),Q=K.data,ee=K.mutate,ne=(0,o.useMemo)((function(){var e=(null===Q||void 0===Q?void 0:Q.custom_templates)||[];return null!==q&&void 0!==q&&q.filterTemplates?null===q||void 0===q?void 0:q.filterTemplates(e):e}),[Q,q]),te=j.ZP.custom_templates.list({object_type:s.R},{},{pauseFetch:Z.A2.uuid!==(null===G||void 0===G?void 0:G.uuid)}),ie=te.data,re=te.mutate,oe=(0,o.useMemo)((function(){var e=(null===ie||void 0===ie?void 0:ie.custom_templates)||[];return null!==q&&void 0!==q&&q.filterTemplates?null===q||void 0===q?void 0:q.filterTemplates(e):e}),[ie,q]),ce=(0,o.useMemo)((function(){return Z.qy.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,c=(null===q||void 0===q?void 0:q.uuid)===o,l=k({size:y.ZG},c&&r?r:{});return(0,P.jsx)(y.wj,{onClick:function(){return Y(e)},selected:c,children:(0,P.jsxs)(p.ZP,{alignItems:"center",children:[(0,P.jsx)(y.ze,{backgroundColor:c&&i?i(M):null,children:n?(0,P.jsx)(n,k({},l)):(0,P.jsx)(b.pd,k({},l))}),(0,P.jsx)(x.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[q,M]),le=(0,o.useMemo)((function(){return Z.hS.map((function(e){var n=e.Icon,t=e.label,i=e.selectedBackgroundColor,r=e.selectedIconProps,o=e.uuid,c=(null===q||void 0===q?void 0:q.uuid)===o,l=k({size:y.ZG},c&&r?r:{});return(0,P.jsx)(y.wj,{onClick:function(){return Y(e)},selected:c,children:(0,P.jsxs)(p.ZP,{alignItems:"center",children:[(0,P.jsx)(y.ze,{backgroundColor:c&&i?i(M):null,children:n?(0,P.jsx)(n,k({},l)):(0,P.jsx)(b.pd,k({},l))}),(0,P.jsx)(x.ZP,{bold:!0,large:!0,children:t?t():o})]})},o)}))}),[q,M]),de=(0,o.useMemo)((function(){return null===ne||void 0===ne?void 0:ne.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,c=e.user,l=[];return null!==r&&void 0!==r&&r.length?l.push.apply(l,(0,i.Z)(r)):null!==c&&void 0!==c&&c.username&&l.push(null===c||void 0===c?void 0:c.username),(0,P.jsxs)(y.UE,{onClick:function(){I?I(e):E.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o)))},children:[(0,P.jsx)(y.Tj,{children:(0,P.jsx)(x.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,P.jsx)(y.SL,{children:(0,P.jsx)(x.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,P.jsx)(y.EN,{children:(null===l||void 0===l?void 0:l.length)>=1&&(0,P.jsx)(v.Z,{tags:null===l||void 0===l?void 0:l.map((function(e){return{uuid:e}}))})})]},o)}))}),[ne,I,E]),ue=(0,o.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.map((function(e){var n=e.description,t=e.name,r=e.tags,o=e.template_uuid,c=e.user,l=[];return null!==r&&void 0!==r&&r.length?l.push.apply(l,(0,i.Z)(r)):null!==c&&void 0!==c&&c.username&&l.push(null===c||void 0===c?void 0:c.username),(0,P.jsxs)(y.UE,{onClick:function(){I?I(e):E.push("/templates/[...slug]","/templates/".concat(encodeURIComponent(o),"?object_type=").concat(s.R))},children:[(0,P.jsx)(y.Tj,{children:(0,P.jsx)(x.ZP,{bold:!0,monospace:!0,textOverflow:!0,children:t||o})}),(0,P.jsx)(y.SL,{children:(0,P.jsx)(x.ZP,{default:!!n,italic:!n,muted:!n,textOverflowLines:2,children:n||"No description"})}),(0,P.jsx)(y.EN,{children:(null===l||void 0===l?void 0:l.length)>=1&&(0,P.jsx)(v.Z,{tags:null===l||void 0===l?void 0:l.map((function(e){return{uuid:e}}))})})]},o)}))}),[oe,I,E]),ae=(0,o.useMemo)((function(){if(!D)return null;var e=[];return F?e.push.apply(e,[{label:function(){return"Templates"},onClick:function(){L(!1)}},{bold:!0,label:function(){return"New custom template"}}]):e.push({label:function(){return"Templates"}}),(0,P.jsx)(y.FX,{children:(0,P.jsx)(d.Z,{breadcrumbs:e})})}),[F,D]),se=(0,o.useMemo)((function(){return D?36:0}),[D]),pe=(0,o.useMemo)((function(){return H-se}),[H,se]);if(F)return n=s.R===C&&S?(0,P.jsx)(h.Z,{onMutateSuccess:re,pipelineUUID:S,templateAttributes:q&&(null===q||void 0===q?void 0:q.uuid)!==(null===Z.qy||void 0===Z.qy?void 0:Z.qy[0].uuid)?{pipeline_type:null===q||void 0===q?void 0:q.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}):(0,P.jsx)(g.Z,{contained:t,heightOffset:se,onCreateCustomTemplate:t?function(e){J(e)}:null,onMutateSuccess:ee,templateAttributes:q&&(null===q||void 0===q?void 0:q.uuid)!==(null===Z.qy||void 0===Z.qy?void 0:Z.qy[0].uuid)?{block_type:null===q||void 0===q?void 0:q.uuid}:null,templateUUID:null===$||void 0===$?void 0:$.template_uuid}),t?(0,P.jsxs)(P.Fragment,{children:[D&&ae,(0,P.jsx)(y.Rd,{height:pe,width:A,children:n})]}):n;var he=(0,P.jsxs)(y.Nk,{children:[(0,P.jsxs)(y.bC,{height:t?pe:null,children:[(0,P.jsx)(y.Yf,{children:(0,P.jsx)(a.Z,{noPadding:!0,onClickTab:function(e){t?W(e):(0,w.u)({object_type:Z.A2.uuid===e.uuid?s.R:s.Z})},selectedTabUUID:null===G||void 0===G?void 0:G.uuid,tabs:R})}),(0,P.jsxs)(y.wl,{contained:t,heightOffset:se,children:[Z.n9.uuid===(null===G||void 0===G?void 0:G.uuid)&&ce,Z.A2.uuid===(null===G||void 0===G?void 0:G.uuid)&&le]})]}),(0,P.jsxs)(y.w5,{children:[Z.n9.uuid===(null===G||void 0===G?void 0:G.uuid)&&(0,P.jsx)(y.HS,{children:(0,P.jsx)(u.ZP,{beforeIcon:(0,P.jsx)(b.mm,{size:y.ZG}),onClick:function(){L(!0)},primary:!0,children:"New block template"})}),Z.n9.uuid===(null===G||void 0===G?void 0:G.uuid)&&(0,P.jsxs)(P.Fragment,{children:[!Q&&(0,P.jsx)(f.Z,{p:2,children:(0,P.jsx)(m.Z,{inverted:!0})}),Q&&!(null!==de&&void 0!==de&&de.length)&&(0,P.jsxs)(f.Z,{p:2,children:[(0,P.jsx)(x.ZP,{children:"There are currently no templates matching your search."}),(0,P.jsx)("br",{}),(0,P.jsx)(x.ZP,{children:"Add a new template by clicking the button above."})]}),(null===de||void 0===de?void 0:de.length)>=1&&(0,P.jsx)(y.n8,{children:de})]}),Z.A2.uuid===(null===G||void 0===G?void 0:G.uuid)&&(0,P.jsxs)(P.Fragment,{children:[!ie&&(0,P.jsx)(f.Z,{p:2,children:(0,P.jsx)(m.Z,{inverted:!0})}),ie&&!(null!==ue&&void 0!==ue&&ue.length)&&(0,P.jsxs)(f.Z,{p:2,children:[(0,P.jsx)(x.ZP,{children:"There are currently no templates matching your search."}),(0,P.jsx)("br",{}),(0,P.jsx)(x.ZP,{children:'Add a new template by right-clicking a pipeline row from the Pipelines page and selecting "Create template".'})]}),(null===ue||void 0===ue?void 0:ue.length)>=1&&(0,P.jsx)(y.n8,{children:ue})]})]})]});return t?(0,P.jsxs)(P.Fragment,{children:[D&&ae,(0,P.jsx)(y.Rd,{height:pe,width:A,children:he})]}):he}},4015:function(e,n,t){t.d(n,{$b:function(){return a},I5:function(){return d},Nk:function(){return l},gI:function(){return u}});var i=t(38626),r=t(44897),o=t(42631),c=t(70515),l=i.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-h093u4-0"})([""," ",""],(function(e){return!e.width&&"\n width: ".concat(40*c.iI,"px;\n ")}),(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")})),d=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-h093u4-1"})(["padding:","px;",""],2.5*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top-left-radius: ").concat(o.n_,"px;\n border-top-right-radius: ").concat(o.n_,"px;\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")})),u=i.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-h093u4-2"})(["align-items:center;justify-content:space-between;",""],(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).dashboard,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-top: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n display: ").concat((null===e||void 0===e?void 0:e.display)||"flex",";\n padding-bottom: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n padding-left: ").concat(c.cd*c.iI,"px;\n padding-top: ").concat(1*c.iI+((null===e||void 0===e?void 0:e.paddingVerticalAddition)||0),"px;\n ")})),a=i.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-h093u4-3"})(["padding:","px ","px;",""],2.5*c.iI,2*c.iI,(function(e){return"\n background-color: ".concat((e.theme.background||r.Z.background).panel,";\n border-bottom-left-radius: ").concat(o.n_,"px;\n border-bottom-right-radius: ").concat(o.n_,"px;\n border-bottom: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-left: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n border-right: 1px solid ").concat((e.theme.interactive||r.Z.interactive).defaultBorder,";\n ")}))},48381:function(e,n,t){var i=t(82684),r=t(31882),o=t(55485),c=t(30160),l=t(86735),d=t(28598);n.Z=function(e){var n=e.onClickTag,t=e.tags,u=void 0===t?[]:t,a=(0,i.useMemo)((function(){return(null===u||void 0===u?void 0:u.length)||0}),[u]),s=(0,i.useMemo)((function(){return(0,l.YC)(u||[],"uuid")}),[u]);return(0,d.jsx)(o.ZP,{alignItems:"center",flexWrap:"wrap",children:null===s||void 0===s?void 0:s.reduce((function(e,t){return e.push((0,d.jsx)("div",{style:{marginBottom:2,marginRight:a>=2?4:0,marginTop:2},children:(0,d.jsx)(r.Z,{onClick:n?function(){return n(t)}:null,small:!0,children:(0,d.jsx)(c.ZP,{children:t.uuid})})},"tag-".concat(t.uuid))),e}),[])})}},55729:function(e,n,t){t.d(n,{Z:function(){return A}});var i=t(82394),r=t(75582),o=t(82684),c=t(69864),l=t(71180),d=t(15338),u=t(97618),a=t(55485),s=t(85854),p=t(48670),h=t(65956),f=t(82359),m=t(88543),v=t(38276),g=t(30160),x=t(17488),j=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 ")})),C=t(72473),I=t(72191),S=t(70320),B=t(81728),D=t(42122),N=t(72619),E=t(23780),M=t(28598);function T(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 H(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?T(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):T(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var A=function(e){var n,t,w,O=e.cancelButtonText,P=e.contained,T=e.header,A=e.onCancel,R=e.onSaveSuccess,U=e.rootProject,F=(0,E.VI)(null,{},[],{uuid:"settings/workspace/preferences"}),L=(0,r.Z)(F,1)[0],z=(0,o.useState)(null),q=z[0],Y=z[1],V=(0,o.useState)(!1),G=V[0],W=V[1],X=(0,Z.Z)(),$=X.fetchProjects,J=X.project,K=X.projectPlatformActivated,Q=X.rootProject,ee=(0,o.useMemo)((function(){return U?Q:J}),[J,Q,U]),ne=ee||{},te=ne.name,ie=ne.openai_api_key,re=ne.project_uuid,oe=(0,o.useMemo)((function(){return"demo.mage.ai"===window.location.hostname}),[]);(0,o.useEffect)((function(){q||Y(ee)}),[ee,q]);var ce=(0,c.Db)(y.ZP.projects.useUpdate(te),{onSuccess:function(e){return(0,N.wD)(e,{callback:function(e){var n,t=e.project;$(),Y(t),W(!1),(0,S.hY)(null===t||void 0===t||null===(n=t.features)||void 0===n?void 0:n[f.d.LOCAL_TIMEZONE]),R&&(null===R||void 0===R||R(t))},onErrorCallback:function(e,n){return L({errors:n,response:e})}})}}),le=(0,r.Z)(ce,2),de=le[0],ue=le[1].isLoading,ae=(0,o.useCallback)((function(e){return de({project:H(H({},e),{},{root_project:U})})}),[U,de]),se=(0,M.jsxs)(M.Fragment,{children:[T,(0,M.jsxs)(h.Z,{noPadding:!0,children:[(0,M.jsxs)(v.Z,{p:_.cd,children:[(0,M.jsx)(v.Z,{mb:1,children:(0,M.jsx)(s.Z,{level:5,children:"Project name"})}),(0,M.jsx)(g.ZP,{default:!0,monospace:!0,children:te})]}),(0,M.jsx)(d.Z,{light:!0}),(0,M.jsxs)(v.Z,{p:_.cd,children:[(0,M.jsx)(v.Z,{mb:1,children:(0,M.jsx)(s.Z,{level:5,children:"Project UUID"})}),(0,M.jsx)(g.ZP,{default:!!re,monospace:!0,muted:!re,children:re||"Not required"})]}),(0,M.jsx)(d.Z,{light:!0}),(0,M.jsx)(v.Z,{p:_.cd,children:(0,M.jsxs)(a.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,M.jsxs)(u.Z,{flexDirection:"column",children:[(0,M.jsx)(v.Z,{mb:1,children:(0,M.jsx)(s.Z,{level:5,children:"Help improve Mage"})}),(0,M.jsxs)(g.ZP,{default:!0,children:["Please contribute usage statistics to help improve the developer experience for you and everyone in the community. Learn more ",(0,M.jsx)(p.Z,{href:"https://docs.mage.ai/contributing/statistics/overview",openNewWindow:!0,children:"here"}),"."]})]}),(0,M.jsx)(v.Z,{mr:_.cd}),(0,M.jsx)(j.Z,{compact:!0,checked:null===q||void 0===q?void 0:q.help_improve_mage,onCheck:function(){return Y((function(e){return H(H({},e),{},{help_improve_mage:!(null!==q&&void 0!==q&&q.help_improve_mage)})}))}})]})})]}),(0,M.jsx)(v.Z,{mt:_.HN}),(0,M.jsx)(m.Z,{description:"Global settings that are applied to all pipelines in this project.",title:"Pipeline settings",children:(0,M.jsx)(m.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===q||void 0===q||null===(n=q.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 Y((function(n){var t,i,r,o,c,l;return H(H({},n),{},{pipelines:H(H({},null===n||void 0===n?void 0:n.pipelines),{},{settings:H(H({},null===n||void 0===n||null===(t=n.pipelines)||void 0===t?void 0:t.settings),{},{triggers:H(H({},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,M.jsx)(v.Z,{mt:_.HN}),(0,M.jsx)(h.Z,{noPadding:!0,overflowVisible:!0,children:(0,M.jsxs)(v.Z,{p:_.cd,children:[(0,M.jsx)(v.Z,{mb:1,children:(0,M.jsx)(s.Z,{level:5,children:"Features"})}),Object.entries((0,D.gR)(null===q||void 0===q?void 0:q.features,[{}])||{}).map((function(e,n){var t=(0,r.Z)(e,2),o=t[0],c=t[1],l=K&&!U&&(null===ee||void 0===ee?void 0:ee.features_override)&&o in(null===ee||void 0===ee?void 0:ee.features_override);return(0,M.jsx)(v.Z,{mt:0===n?0:1,children:(0,M.jsxs)(a.ZP,{alignItems:"center",children:[(0,M.jsxs)(u.Z,{flex:1,children:[(0,M.jsx)(j.Z,{disabled:l,checked:!!c,compact:!0,onCheck:function(){return Y((function(e){return H(H({},e),{},{features:H(H({},null===q||void 0===q?void 0:q.features),{},(0,i.Z)({},o,!c))})}))}}),(0,M.jsx)(v.Z,{mr:_.cd}),(0,M.jsxs)(u.Z,{children:[(0,M.jsx)(g.ZP,{default:!c,monospace:!0,children:(0,B.vg)(o)}),o===f.d.LOCAL_TIMEZONE&&(0,M.jsx)(v.Z,{ml:1,children:(0,M.jsx)(b.Z,H({},S.EB))})]})]}),l&&(0,M.jsx)(g.ZP,{monospace:!0,muted:!0,small:!0,children:"overridden"})]})},o)}))]})}),(0,M.jsx)(v.Z,{mt:_.HN}),(0,M.jsx)(h.Z,{noPadding:!0,children:(0,M.jsxs)(v.Z,{p:_.cd,children:[(0,M.jsx)(v.Z,{mb:1,children:(0,M.jsx)(s.Z,{level:5,children:"OpenAI"})}),ie&&!G?(0,M.jsxs)(a.ZP,H(H({},a.A0),{},{children:[(0,M.jsx)(g.ZP,{default:!0,monospace:!0,children:"API key: ********"}),(0,M.jsx)(l.ZP,{iconOnly:!0,onClick:function(){return W(!0)},secondary:!0,title:"Edit",children:(0,M.jsx)(C.I8,{size:I.bL})})]})):(0,M.jsx)(x.Z,{disabled:oe,label:oe?"Entering API key is disabled on demo":"API key",monospace:!0,onChange:function(e){return Y((function(n){return H(H({},n),{},{openai_api_key:e.target.value})}))},primary:!0,setContentOnMount:!0,value:(null===q||void 0===q?void 0:q.openai_api_key)||""})]})}),(0,M.jsx)(v.Z,{mt:_.HN}),(0,M.jsxs)(a.ZP,{alignItems:"center",children:[(0,M.jsx)(l.ZP,{loading:ue,onClick:function(){ae({features:null===q||void 0===q?void 0:q.features,help_improve_mage:null===q||void 0===q?void 0:q.help_improve_mage,openai_api_key:null===q||void 0===q?void 0:q.openai_api_key,pipelines:null===q||void 0===q?void 0:q.pipelines})},primary:!0,children:"Save project settings"}),A&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(v.Z,{mr:_.cd}),(0,M.jsx)(l.ZP,{onClick:A,secondary:!0,children:O||"Cancel"})]})]})]});return P?(0,M.jsx)(k,{children:se}):se}},46568:function(e,n,t){var i=t(82394),r=t(26304),o=(t(82684),t(33591)),c=t(28598),l=["children","fullHeight","gutter","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 u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,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.style,a=void 0===d?{}:d,s=(0,r.Z)(e,l),p=u({},a);return i&&(p.paddingLeft=i,p.paddingRight=p.paddingLeft),t&&(p.height="100%"),(0,c.jsx)(o.Col,u(u({},s),{},{style:p,children:n}))}},82682:function(e,n,t){var i=t(82394),r=t(26304),o=t(82684),c=t(33591),l=t(28598),d=["children","fullHeight","gutter","justifyContent","style"];function u(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 a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?u(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(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,u=e.justifyContent,s=e.style,p=void 0===s?{}:s,h=(0,r.Z)(e,d),f=a({},p);return i&&(f.marginLeft=-1*i,f.marginRight=f.marginLeft),t&&(f.height="100%"),(0,l.jsx)(c.Row,a(a({},h),{},{justifyContent:u,style:f,children:o.Children.map(n,(function(e,n){return e&&o.cloneElement(e,{gutter:i,key:n})}))}))}},88543:function(e,n,t){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),d=t(65956),u=t(82394),a=t(44085),s=t(38276),p=t(30160),h=t(17488),f=t(69650),m=t(72473),v=t(8193),g=t(70515),x=t(28598);function j(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?j(Object(t),!0).forEach((function(n){(0,u.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var y=function(e){var n,t=e.children,i=e.description,r=e.invalid,l=e.large,d=void 0===l||l,u=e.selectInput,j=e.textInput,y=e.title,Z=e.toggleSwitch,w=e.warning;return(0,x.jsx)(s.Z,{p:g.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:d,warning:w,children:[y," ",r&&(0,x.jsx)(p.ZP,{danger:!0,inline:!0,large:d,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)(s.Z,{mr:g.cd}),(0,x.jsxs)(o.Z,{flex:1,justifyContent:"flex-end",children:[t,j&&(0,x.jsx)(h.Z,b({afterIcon:(0,x.jsx)(m.I8,{}),afterIconClick:function(e,n){var t;null===n||void 0===n||null===(t=n.current)||void 0===t||t.focus()},afterIconSize:v.Z,alignRight:!0,autoComplete:"off",large:d,noBackground:!0,noBorder:!0,fullWidth:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0},j)),u&&(0,x.jsx)(a.Z,b(b({},u),{},{afterIcon:(0,x.jsx)(m._M,{}),afterIconSize:v.Z,alignRight:!0,autoComplete:"off",large:d,noBackground:!0,noBorder:!0,paddingHorizontal:0,paddingVertical:0,setContentOnMount:!0,children:null===u||void 0===u||null===(n=u.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)(f.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,u=e.headerChildren,a=e.title;return(0,x.jsxs)(d.Z,{noPadding:!0,children:[(0,x.jsx)(s.Z,{p:g.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:a}),t&&"string"===typeof t&&(0,x.jsx)(s.Z,{mt:1,children:(0,x.jsx)(p.ZP,{muted:!0,children:t})}),t&&"string"!==typeof t&&t]}),u]})}),i.Children.map(n,(function(e,n){return(0,x.jsxs)("div",{children:[(0,x.jsx)(r.Z,{light:!0}),e]},"".concat(a,"-").concat(n))}))]})}},8193:function(e,n,t){t.d(n,{N:function(){return d},Z:function(){return l}});var i=t(38626),r=t(44897),o=t(42631),c=t(70515),l=2*c.iI,d=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 ")}))},96348:function(e,n,t){t.d(n,{g:function(){return g},Z:function(){return x}});var i=t(82684),r=t(38626),o=t(44897),c=t(42631),l=t(47041),d=t(70515),u=1.5*d.iI,a=1.5*d.iI,s=r.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-13p7y8j-0"})(["border-radius:","px;overflow:hidden;width:100%;"," "," "," ",""],c.n_,(function(e){return e.width&&"\n width: ".concat(e.width,"px;\n ")}),(function(e){return"\n background-color: ".concat((e.theme||o.Z).background.page,";\n border: ").concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).interactive.defaultBorder,";\n box-shadow: ").concat((e.theme||o.Z).shadow.frame,";\n ")}),(function(e){return e.noBackground&&"\n background-color: transparent;\n "}),(function(e){return e.noBoxShadow&&"\n box-shadow: none;\n "})),p=r.default.div.withConfig({displayName:"indexstyle__RowContainerStyle",componentId:"sc-13p7y8j-1"})(["overflow:auto;border-bottom-left-radius:","px;border-bottom-right-radius:","px;"," "," "," ",""],c.n_,c.n_,l.w5,(function(e){return e.maxHeight>0&&"\n max-height: ".concat(e.maxHeight,"px;\n ")}),(function(e){return e.minHeight>0&&"\n min-height: ".concat(e.minHeight,"px;\n ")}),(function(e){return e.scrollable&&"\n margin-bottom: ".concat(d.iI,"px;\n overflow-y: auto;\n padding-top: ").concat(3,"px;\n padding-left: ").concat(3,"px;\n padding-right: ").concat(3,"px;\n ")})),h=r.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-13p7y8j-2"})(["border-top-left-radius:","px;border-top-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,u,2*d.iI,(function(e){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme.interactive||o.Z.interactive).defaultBorder,";\n ")})),f=r.default.div.withConfig({displayName:"indexstyle__RowStyle",componentId:"sc-13p7y8j-3"})(["padding:","px ","px;"," "," "," "," "," ",""],a,2*d.iI,(function(e){return"\n border-bottom: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).borders.medium2,";\n ")}),(function(e){return e.sameColorBorders&&"\n border-bottom-color: ".concat((e.theme||o.Z).interactive.defaultBorder,";\n ")}),(function(e){return e.noHorizontalPadding&&"\n padding-left: 0;\n padding-right: 0;\n "}),(function(e){return e.condensed&&"\n padding-top: ".concat(9,"px;\n padding-bottom: ").concat(9,"px;\n ")}),(function(e){return e.secondary&&"\n background-color: ".concat((e.theme.background||o.Z.background).row2,";\n ")}),(function(e){return e.last&&e.noBorder&&"\n border-bottom-left-radius: ".concat(c.n_,"px;\n border-bottom-right-radius: ").concat(c.n_,"px;\n border-bottom: none;\n ")})),m=r.default.div.withConfig({displayName:"indexstyle__FooterStyle",componentId:"sc-13p7y8j-4"})(["border-bottom-left-radius:","px;border-bottom-right-radius:","px;padding:","px ","px;",""],c.n_,c.n_,u,2*d.iI,(function(e){return"\n border-top: ".concat(c.YF,"px ").concat(c.M8," ").concat((e.theme||o.Z).borders.medium2,";\n ")})),v=t(28598),g=f;var x=function(e){var n=e.alternating,t=e.children,r=e.footer,o=e.header,c=e.maxHeight,l=e.minHeight,d=e.noBackground,u=e.noBoxShadow,a=e.sameColorBorders,f=e.scrollable,g=e.width,x=[].concat(t).filter((function(e){return null!==e}));return(0,v.jsxs)(s,{noBackground:d,noBoxShadow:u,width:g,children:[o&&(0,v.jsx)(h,{children:o}),(0,v.jsx)(p,{maxHeight:c,minHeight:l,scrollable:f,children:i.Children.map(x,(function(e,t){return e&&i.cloneElement(e,{last:t===x.length-1,sameColorBorders:a,secondary:n&&t%2===1})}))}),r&&(0,v.jsx)(m,{children:r})]})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3745],{61709:function(n,o,e){e.d(o,{IT:function(){return w},J8:function(){return g},MS:function(){return k},Ts:function(){return b},YW:function(){return C},_o:function(){return m},eY:function(){return p},fA:function(){return h},h5:function(){return x},oI:function(){return y}});var i=e(82394),t=e(44425),l=e(48339),r=e(57653),u=e(82359),d=e(85385),c=e(81728),a=e(55283),s=e(15610);function v(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function f(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?v(Object(e),!0).forEach((function(o){(0,i.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):v(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var p=function(n,o){var e=(null===o||void 0===o?void 0:o.upstream_blocks)||[];return t.iZ.includes(null===n||void 0===n?void 0:n.type)||t.iZ.includes(null===o||void 0===o?void 0:o.type)||t.tf.DATA_LOADER===(null===o||void 0===o?void 0:o.type)&&t.tf.SENSOR!==n.type||e.push(n.uuid),e},h=function(n,o,e){var i=[];return(null===n||void 0===n?void 0:n.type)!==r.qL.STREAMING||t.iZ.includes(null===o||void 0===o?void 0:o.type)||t.iZ.includes(null===e||void 0===e?void 0:e.type)||(i=i.concat((null===o||void 0===o?void 0:o.downstream_blocks)||[])),i},b=function(n,o,e,i){for(var l,r=[],u=o.findIndex((function(o){return o.uuid===n.uuid}));!l&&u>=0;){var d;l=o[u-1],t.tf.SCRATCHPAD===(null===(d=l)||void 0===d?void 0:d.type)&&(l=null),u-=1}return l&&r.push(l.uuid),t.Ut.map((function(o){return{label:function(){return"Convert to ".concat((0,c.wX)(t.V4[o]))},onClick:function(){return i({converted_from_type:o,converted_from_uuid:n.uuid,type:o,upstream_blocks:r})},uuid:"".concat(e,"/convert_to/").concat(o)}}))},g=function(n,o,e,i,l,r){var c,a,v=n||{},p=v.configuration,h=v.downstream_blocks,b=v.has_callback,g=v.language,k=v.metadata,m=v.replicated_block,x=v.type,y=v.upstream_blocks,C=v.uuid,w=p||{},S=w.dynamic,O=w.reduce_output,j=t.tf.DBT===x,B=[],I=!(null===r||void 0===r||null===(c=r.project)||void 0===c||null===(a=c.features)||void 0===a||!a[u.d.INTERACTIONS]);if(t.tf.SCRATCHPAD!==x&&![t.tf.CALLBACK,t.tf.EXTENSION,t.tf.MARKDOWN].includes(x)){B.push.apply(B,[{label:function(){return j?"Execute and run all upstream blocks":"Execute with all upstream blocks"},onClick:function(){return o({block:n,runUpstream:!0})},uuid:"execute_upstream"},{label:function(){return j?"Execute and run incomplete upstream blocks":"Execute with incomplete upstream blocks"},onClick:function(){return o({block:n,runIncompleteUpstream:!0})},uuid:"execute_incomplete_upstream"}]),j||t.tf.GLOBAL_DATA_PRODUCT===x||B.push({label:function(){return"Execute block and run tests"},onClick:function(){return o({block:n,runTests:!0})},uuid:"run_tests"});var E,T,_,Z,P,D=r||{},A=D.addNewBlock,R=D.blocksMapping,N=D.fetchFileTree,L=D.fetchPipeline,M=D.savePipelineContent,H=D.updatePipeline,U=[];if(null===h||void 0===h||h.forEach((function(n){var o=null===R||void 0===R?void 0:R[n];o&&o.upstream_blocks.forEach((function(n){var o,e;null!==R&&void 0!==R&&null!==(o=R[n])&&void 0!==o&&null!==(e=o.configuration)&&void 0!==e&&e.dynamic&&U.push(R[n])}))})),j&&t.t6.SQL===g)B.unshift.apply(B,[{label:function(){return"Test model"},onClick:function(){return o({block:n,runSettings:{test_model:!0}})},tooltip:function(){return"Execute command dbt test."},uuid:"test_model"},{label:function(){return"Build model"},onClick:function(){return o({block:n,runSettings:{build_model:!0}})},tooltip:function(){return"Execute command dbt build."},uuid:"build_model"},{label:function(){return"Add upstream models"},onClick:function(){H({pipeline:{add_upstream_for_block_uuid:null===n||void 0===n?void 0:n.uuid}})},tooltip:function(){return"Add upstream models for this model to the pipeline."},uuid:"add_upstream_models"}]),null!==k&&void 0!==k&&null!==(E=k.dbt)&&void 0!==E&&null!==(T=E.block)&&void 0!==T&&T.snapshot||B.unshift.apply(B,[{label:function(){return"Run model"},onClick:function(){return o({block:n,runSettings:{run_model:!0}})},tooltip:function(){return"Execute command dbt run."},uuid:"run_model"}]),null!==k&&void 0!==k&&null!==(_=k.dbt)&&void 0!==_&&null!==(Z=_.block)&&void 0!==Z&&Z.snapshot&&B.unshift.apply(B,[{label:function(){return"Run snapshot"},onClick:function(){return o({block:n,runSettings:{run_model:!0}})},tooltip:function(){return"Execute command dbt snapshot."},uuid:"run_model"}]);if(!j&&t.tf.GLOBAL_DATA_PRODUCT!==x&&M&&B.push({label:function(){return S?"Disable block as dynamic":"Set block as dynamic"},onClick:function(){return M({block:f(f({},n),{},{configuration:f(f({},p),{},{dynamic:!S})})})},uuid:"dynamic"}),R||null!==n&&void 0!==n&&n.tags)((null===y||void 0===y?void 0:y.find((function(n){var o,e;return null===R||void 0===R||null===(o=R[n])||void 0===o||null===(e=o.configuration)||void 0===e?void 0:e.dynamic})))||null!==n&&void 0!==n&&null!==(P=n.tags)&&void 0!==P&&P.includes(t.L8.DYNAMIC_CHILD))&&B.push({label:function(){return O?"Don\u2019t reduce output":"Reduce output"},onClick:function(){return M({block:f(f({},n),{},{configuration:f(f({},p),{},{reduce_output:!O})})})},uuid:"reduce_output"});B.push({label:function(){return b?"Remove callback":"Add callback"},onClick:function(){if(b)return M({block:f(f({},n),{},{has_callback:!b})}).then((function(){N(),L()}));(0,s.u)({addon:d.cH.CALLBACKS,sideview:d.cH.ADDON_BLOCKS})},uuid:"has_callback"}),j||B.push({disabled:!!m,label:function(){return"Replicate block"},onClick:function(){return A({replicated_block:C})},uuid:"Replicate block"})}return I&&B.push({label:function(){return"Add / Edit interactions"},onClick:function(){var n;null===r||void 0===r||null===(n=r.openSidekickView)||void 0===n||n.call(r,d.cH.INTERACTIONS)},uuid:"Add interactions"}),B.push({label:function(){return"Delete block"},onClick:function(){e(n),i(!1)},uuid:"delete_block"}),l?[B.pop()]:B};function k(n){var o=n.tags,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=[],l=e.conditionFailed;return null===o||void 0===o||o.forEach((function(n){t.L8.DBT_SNAPSHOT===n?i.push({description:"This is a dbt snapshot file.",title:(0,c.vg)(t.L8.DBT_SNAPSHOT)}):t.L8.DYNAMIC===n?i.push({description:"This block will create N blocks for each of its downstream blocks.",title:(0,c.vg)(t.L8.DYNAMIC)}):t.L8.DYNAMIC_CHILD===n?i.push({description:"This block is dynamically created by its upstream parent block that is dynamic.",title:(0,c.vg)(t.L8.DYNAMIC_CHILD)}):t.L8.REDUCE_OUTPUT===n?i.push({description:"Reduce output from all dynamically created blocks into a single array output.",title:(0,c.vg)(t.L8.REDUCE_OUTPUT)}):t.L8.REPLICA===n?i.push({description:"This block is a replica of another block in the current pipeline.",title:(0,c.vg)(t.L8.REPLICA)}):t.L8.CONDITION===n?l?i.push({description:"This block condition evaluated as false.",title:"Condition unmet"}):i.push({description:"This block has a condition that will be run before its execution.",title:(0,c.vg)(t.L8.CONDITION)}):i.push({title:n})})),i}function m(n){var o=n.block,e=n.dynamic,i=n.dynamicUpstreamBlock,t=n.hasError,l=(n.reduceOutput,n.reduceOutputUpstreamBlock),r=n.selected,u=i&&!l;return{borderColorShareProps:{blockColor:null===o||void 0===o?void 0:o.color,blockType:null===o||void 0===o?void 0:o.type,dynamicBlock:e,dynamicChildBlock:u,hasError:t,selected:r},tags:k(o)}}function x(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o&&(null===o||void 0===o?void 0:o.length)>=0?o.map((function(n){return{data:n,execution_state:l.uF.IDLE,type:l.Gi.TEXT_PLAIN}})):n.filter((function(n){return null===n||void 0===n?void 0:n.type}))}function y(n){return{hasError:!!n.find((function(n){return n.error})),hasOutput:n.length>=1}}var C=function(){return Object.values(t.Lq).reduce((function(n,o){return f(f({},n),{},(0,i.Z)({},o,(0,a.qn)(t.tf.CUSTOM,{blockColor:o}).accent))}),{})};function w(n,o,e){var i=null===n||void 0===n?void 0:n.reduce((function(n,o){return o?n.concat(o):n}),[]),t=(null===i||void 0===i?void 0:i[(null===i||void 0===i?void 0:i.length)-1])||0;return(.25*Math.min(t,e)||0)/o}},47001:function(n,o,e){e.d(o,{Gi:function(){return c},Go:function(){return p},I5:function(){return f},Pq:function(){return s},RJ:function(){return a},YF:function(){return d},ZG:function(){return u},ze:function(){return v}});var i=e(38626),t=e(44897),l=e(42631),r=e(70515),u=3*r.iI,d=2,c=i.default.div.withConfig({displayName:"indexstyle__NodeContainerStyle",componentId:"sc-kc7274-0"})(["min-width:fit-content;"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ",""],(function(n){return!n.isDragging&&"\n &:hover {\n cursor: pointer;\n }\n "}),(function(n){return n.isDragging&&"\n cursor: grab;\n "}),(function(n){return!n.active&&(n.isCancelled||n.disabled)&&"\n // opacity doesn\u2019t work on Safari\n border: ".concat(d,"px dotted ").concat((n.theme.content||t.Z.content).muted,";\n cursor: not-allowed;\n opacity: 0.5;\n ")}),(function(n){return(!n.selected||!n.backgroundGradient)&&!n.active&&n.borderColorBottom&&"\n border-bottom-color: ".concat(n.borderColorBottom,";\n border-width: ").concat(d,"px;\n ")}),(function(n){return(!n.selected||!n.backgroundGradient)&&!n.active&&n.borderColorLeft&&"\n border-left-color: ".concat(n.borderColorLeft,";\n border-width: ").concat(d,"px;\n ")}),(function(n){return(!n.selected||!n.backgroundGradient)&&!n.active&&n.borderColorRight&&"\n border-right-color: ".concat(n.borderColorRight,";\n border-width: ").concat(d,"px;\n ")}),(function(n){return(!n.selected||!n.backgroundGradient)&&!n.active&&n.borderColorTop&&"\n border-top-color: ".concat(n.borderColorTop,";\n border-width: ").concat(d,"px;\n ")}),(function(n){return n.selected&&!n.active&&n.backgroundGradient&&"\n background: ".concat(n.backgroundGradient,";\n padding: ").concat(d,"px;\n ")}),(function(n){return!n.borderDeemphasized&&"\n border-style: solid;\n "}),(function(n){return n.borderDeemphasized&&"\n border-style: double;\n "}),(function(n){return!n.borderRadiusLarge&&"\n border-radius: ".concat(l.n_,"px;\n ")}),(function(n){return n.borderRadiusLarge&&"\n border-radius: ".concat(l.Ro,"px;\n ")}),(function(n){return n.active&&(n.borderColorBottom||n.borderColorLeft||n.borderColorRight||n.borderColorTop)&&"\n animation: border-dance ".concat(null!==n&&void 0!==n&&n.activeSlow?"2s":".5s"," infinite linear;\n background: linear-gradient(90deg, ").concat(n.borderColorTop||n.borderColorBottom||n.borderColorLeft||n.borderColorRight," 50%, transparent 50%),\n linear-gradient(90deg, ").concat(n.borderColorRight||n.borderColorTop||n.borderColorBottom||n.borderColorLeft," 50%, transparent 50%),\n linear-gradient(0deg, ").concat(n.borderColorLeft||n.borderColorRight||n.borderColorTop||n.borderColorBottom," 50%, transparent 50%),\n linear-gradient(0deg, ").concat(n.borderColorBottom||n.borderColorLeft||n.borderColorRight||n.borderColorTop," 50%, transparent 50%);\n background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;\n padding: ").concat(d,"px;\n\n @keyframes border-dance {\n 0% {\n background-position: left top,\n right bottom,\n left bottom,\n right top;\n }\n 100% {\n background-position: left 15px top,\n right 15px bottom,\n left bottom 15px,\n right top 15px;\n }\n }\n ")}),(function(n){return n.active&&(n.borderColorBottom||n.borderColorLeft||n.borderColorRight||n.borderColorTop)&&!n.noBackground&&"\n background-size: 15px 4px, 15px 4px, 4px 15px, 4px 15px;\n "}),(function(n){return n.active&&(n.borderColorBottom||n.borderColorLeft||n.borderColorRight||n.borderColorTop)&&n.noBackground&&"\n background-size: 15px 1.5px, 15px 1.5px, 1.5px 15px, 1.5px 15px;\n "}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.opacity&&"\n opacity: ".concat(n.opacity,";\n ")})),a=i.default.div.withConfig({displayName:"indexstyle__NodeStyle",componentId:"sc-kc7274-1"})(["border-radius:","px;min-width:fit-content;overflow:hidden;"," "," "," "," ",""],l.n_,(function(n){return!n.noBackground&&"\n background-color: ".concat((n.theme.background||t.Z.background).codeTextarea,";\n ")}),(function(n){return n.isConditionFailed&&"\n background-color: ".concat((n.theme.content||t.Z.content).disabled,";\n cursor: not-allowed;\n ")}),(function(n){return n.isConditionFailed&&"\n background-color: ".concat((n.theme.content||t.Z.content).disabled,";\n cursor: not-allowed;\n ")}),(function(n){return n.disabled&&"\n &:hover {\n cursor: not-allowed;\n }\n "}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")})),s=i.default.div.withConfig({displayName:"indexstyle__StatusStyle",componentId:"sc-kc7274-2"})(["height:","px;width:","px;"],2*r.iI,2*r.iI),v=i.default.div.withConfig({displayName:"indexstyle__IconStyle",componentId:"sc-kc7274-3"})(["align-items:center;border-radius:","px;border:2px solid transparent;display:flex;height:","px;justify-content:center;width:","px;"," ",""],l.BG,5*r.iI,5*r.iI,(function(n){return n.backgroundColor&&"\n background-color: ".concat(n.backgroundColor,";\n border-color: ").concat(n.backgroundColor,";\n ")}),(function(n){return n.borderColor&&"\n border-color: ".concat(n.borderColor,";\n ")})),f=i.default.div.withConfig({displayName:"indexstyle__HeaderStyle",componentId:"sc-kc7274-4"})(["padding:","px;",""],1*r.iI,(function(n){return"\n background-color: ".concat((n.theme.background||t.Z.background).dashboard,";\n ")})),p=i.default.div.withConfig({displayName:"indexstyle__BodyStyle",componentId:"sc-kc7274-5"})(["padding-left:","px;padding-right:","px;"],1*r.iI,1*r.iI);i.default.div.withConfig({displayName:"indexstyle__RuntimeStyle",componentId:"sc-kc7274-6"})(["margin-right:","px;padding:12px 4px;height:100%;width:50px;background:rgba(0,0,0,0.2);background-blend-mode:soft-light;"],2*r.iI)},99543:function(n,o,e){e.d(o,{DS:function(){return s},HI:function(){return B},SX:function(){return f},YE:function(){return p},_7:function(){return w},p1:function(){return j},qj:function(){return S},rQ:function(){return y}});var i=e(21831),t=e(44425),l=e(57653),r=e(47001),u=e(70515),d=e(61709),c=e(44375),a=e(4804),s=u.cd,v=u.cd*u.iI,f=2*u.iI,p=8.62,h=7.43,b=2*r.YF,g=2*r.YF,k=2*u.iI+5*u.iI,m=2*u.iI+5*u.iI+v+v+f,x=30*u.iI;function y(n){var o=(0,d.MS)(n);if((null===o||void 0===o?void 0:o.length)>=1)return(null===o||void 0===o?void 0:o.map((function(n){return n.title})).join(", "))||"";if(t.tf.GLOBAL_DATA_PRODUCT===(null===n||void 0===n?void 0:n.type)){var e,i=null===n||void 0===n||null===(e=n.configuration)||void 0===e?void 0:e.global_data_product;if(null!==i&&void 0!==i&&i.uuid)return null===i||void 0===i?void 0:i.uuid}return t.dO[null===n||void 0===n?void 0:n.language]||""}function C(n,o){var e,i,r,u=n.description,d=n.name,s=n.type,v=u||(null===t.V4||void 0===t.V4?void 0:t.V4[s])||s;if(l.qL.INTEGRATION===(null===o||void 0===o?void 0:o.type)&&t.tf.TRANSFORMER!==n.type){var f,p,h={};if(t.t6.YAML===n.language&&(null===n||void 0===n||null===(f=n.content)||void 0===f?void 0:f.length)>=1&&(h=(0,a.Qc)(n.content)),t.tf.DATA_LOADER===n.type)r="".concat(n.uuid,": ").concat(null===(p=h)||void 0===p?void 0:p.source);else if(t.tf.DATA_EXPORTER===n.type){var b;r="".concat(n.uuid,": ").concat(null===(b=h)||void 0===b?void 0:b.destination)}}else if(t.tf.DBT===n.type&&t.t6.SQL===n.language){var g=(0,c.IU)(n),k=g.name,m=g.project;r=k,v="".concat(v,"/").concat(m)}return null!==n&&void 0!==n&&n.replicated_block&&(r=d&&u?d:null===n||void 0===n?void 0:n.uuid,u||(v=null===n||void 0===n?void 0:n.replicated_block)),(null===n||void 0===n||null===(e=n.uuid)||void 0===e||null===(i=e.split(":"))||void 0===i?void 0:i.length)>=2&&d&&(r=d),r||(r=n.uuid),{displayText:r,subtitle:v}}function w(n,o){return C(n,o).displayText||""}function S(n,o){return C(n,o).subtitle||""}function O(n){var o=0;return null===n||void 0===n||n.forEach((function(n,e){var i=n.uuid;o+=4+i.length*h,e>=1&&(o+=4)})),o}function j(n,o,e){var i,t=0,l=b+k,r=B(n,o,e)-(g+2*u.iI),d=y(n),c=(null===d||void 0===d?void 0:d.length)*h;if(c>=1){var a=1;c>r&&(a=Math.ceil(c/r)),t+=1,l+=18*a}var s=e||{},v=s.blockStatus;return[s.callbackBlocks,s.conditionalBlocks,s.extensionBlocks].forEach((function(n){if((null===n||void 0===n?void 0:n.length)>=1){var o=O(n),e=1;o>r&&(e=Math.ceil(o/r)),t+=1,l+=18.5*e+4*(e-1)}})),"undefined"!==typeof(null===v||void 0===v||null===(i=v[n.uuid])||void 0===i?void 0:i.runtime)&&(l+=18,t+=1),l+=(t+=1)*(1*u.iI)}function B(n,o,e){var t,l,r=Math.max((null===(t=w(n,o))||void 0===t?void 0:t.length)*p,(null===(l=S(n,o))||void 0===l?void 0:l.length)*h),u=y(n),d=(null===u||void 0===u?void 0:u.length)*h,c=e||{},a=c.callbackBlocks,s=c.conditionalBlocks,v=c.extensionBlocks,f=Math.max.apply(Math,(0,i.Z)([a,s,v].map((function(n){return O(n)})).concat(d)));return f>r&&(r=Math.min(x,f)),g+m+r}},21978:function(n,o,e){e.d(o,{Jo:function(){return l},WN:function(){return u},bJ:function(){return r},rl:function(){return i}});var i,t=e(44425),l=(e(70515).iI,1e4),r={height:10,width:10},u={height:6,width:6};t.tf.DATA_EXPORTER,t.tf.SENSOR,t.Lq.GREY,t.Lq.PINK,t.Lq.TEAL,t.Lq.YELLOW;!function(n){n.NORTH="NORTH",n.SOUTH="SOUTH"}(i||(i={}))},55187:function(n,o,e){e.d(o,{$4:function(){return v},dg:function(){return c},ki:function(){return a}});var i=e(75582),t=e(38626),l=e(44897),r=e(42631),u=e(47041),d=e(70515),c=2;function a(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.Z,o={};return[null===n||void 0===n?void 0:n.accent,null===n||void 0===n?void 0:n.content,null===n||void 0===n?void 0:n.monotone].forEach((function(n){Object.entries(n).forEach((function(n){var e=(0,i.Z)(n,2),t=e[0],l=e[1];o[l]=t}))})),o}var s=Object.entries(a()).reduce((function(n,o){var e=(0,i.Z)(o,2),t=e[0],l=e[1];return n.concat("\n .edge-rect-".concat(l," {\n rect {\n fill: ").concat(t,";\n }\n }\n\n .edge-line-").concat(l," {\n line {\n stroke: ").concat(t,";\n }\n }\n "))}),[]),v=t.default.div.withConfig({displayName:"indexstyle__GraphContainerStyle",componentId:"sc-bc2ei5-0"})(["position:relative;div{","}"," .edge{&.activeSlow{animation:dashdraw 2s linear infinite;stroke-dasharray:5;stroke-width:",";}&.active{animation:dashdraw .5s linear infinite;stroke-dasharray:5;stroke-width:",";}&.inactive{}&.selected-twice{stroke-dasharray:4 2 4 2 4 8;stroke-width:",";}&.selected-twice.group{stroke-dasharray:8 24;stroke-width:",";}}@keyframes dashdraw{0%{stroke-dashoffset:10;}}.edge-rect{rect{fill:none;}}.edge-line{line{stroke-width:","px;}}.edge-line-remove{line{","}}",""],u.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),c,c,c,c,d.iI/4,(function(n){return"\n stroke: ".concat((n.theme.accent||l.Z.accent).negative,";\n ")}),s.join("\n"));t.default.div.withConfig({displayName:"indexstyle__NodeStyle",componentId:"sc-bc2ei5-1"})(["border-radius:","px;border:1px solid transparent;min-width:fit-content;"," "," "," "," "," ",""],r.BG,(function(n){return n.selected&&"\n border-color: ".concat((n.theme.content||l.Z.content).active,";\n ")}),(function(n){return n.backgroundColor&&"\n background-color: ".concat(n.backgroundColor,";\n ")}),(function(n){return(n.isCancelled||n.disabled)&&"\n // opacity doesn\u2019t work on Safari\n border-color: ".concat((n.theme.content||l.Z.content).active,";\n border-style: dashed;\n cursor: not-allowed;\n ")}),(function(n){return n.isConditionFailed&&"\n background-color: ".concat((n.theme.content||l.Z.content).disabled,";\n cursor: not-allowed;\n ")}),(function(n){return n.disabled&&"\n &:hover {\n cursor: not-allowed;\n }\n "}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")})),t.default.div.withConfig({displayName:"indexstyle__RuntimeStyle",componentId:"sc-bc2ei5-2"})(["margin-right:","px;padding:12px 4px;height:100%;width:50px;background:rgba(0,0,0,0.2);background-blend-mode:soft-light;"],2*d.iI)},24138:function(n,o,e){e.d(o,{Xz:function(){return In},kS:function(){return Tn},NB:function(){return En},GR:function(){return _n},ZP:function(){return Zn}});var i=e(75582),t=e(21831),l=e(82394),r=e(26304),u=e(77837),d=e(38860),c=e.n(d),a=e(51774),s=e.n(a),v=e(38626),f=e(82684),p=e(69864),h=e(79757),b=e(44425),g=e(39867),k=e(97618),m=e(55485),x=e(38276),y=e(30160),C=e(72473),w=e(47001),S=e(99543),O=e(55283),j=e(21978),B=e(41143),I=e(70515),E=e(86735);var T=e(61709),_=e(81728);function Z(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function P(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?Z(Object(e),!0).forEach((function(o){(0,l.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Z(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var D=function(n){var o=n/1e3,e=4-Math.floor(o).toString().length,i=(0,_.QV)(o,e>=0?e:0),t="s";return i>1e3&&(i=(0,_.QV)(i/60,0),t="m"),"".concat(i).concat(t)};function A(n){return"parent\u2192".concat(n)}function R(n){return["parent"].concat((0,E.YC)(n,(function(n){return n}))).join("\u2192")}function N(n,o){return"".concat(o,"\u2192").concat(n)}function L(n,o){return{from:o,fromPort:"".concat(o,"\u2192").concat(n,":from"),id:N(n,o),to:n,toPort:"".concat(o,"\u2192").concat(n,":to")}}function M(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return[n,o,"from"].filter((function(n){return n})).join("\u2192")}function H(n,o,e){var i,t={},l=P(P({},j.WN),{},{disabled:!0});if(null!==e&&void 0!==e&&null!==(i=e.activeNodes)&&void 0!==i&&i[n]&&(l.height=0,l.width=0),(null===o||void 0===o?void 0:o.length)>=1)o.forEach((function(o){var e=M(n,o);t[e]=P(P({},l),{},{id:e,side:j.rl.SOUTH})}));else{var r=M(n);t[r]=P(P({},l),{},{id:r,side:j.rl.SOUTH})}return t}function U(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return[o,n,"to"].filter((function(n){return n})).join("\u2192")}function G(n,o,e){var i,t={},l=P(P({},j.WN),{},{disabled:!0});if(null!==e&&void 0!==e&&null!==(i=e.activeNodes)&&void 0!==i&&i[n]&&(l.height=0,l.width=0),(null===o||void 0===o?void 0:o.length)>=1)o.forEach((function(o){var e=U(n,o);t[e]=P(P({},l),{},{id:e,side:j.rl.NORTH})}));else{var r=U(n);t[r]=P(P({},l),{},{id:r,side:j.rl.NORTH})}return t}function W(n){var o,e=n.activeNodes,r=n.blockStatus,u=(n.blockUUIDMapping,n.blocks),d=n.callbackBlocksByBlockUUID,c=n.conditionalBlocksByBlockUUID,a=n.downstreamBlocksMapping,s=n.enablePorts,v=n.extensionBlocksByBlockUUID,f=n.nodeHovering,p=n.pipeline,h=n.selectedBlock,b=P({},e);f&&(b[null===f||void 0===f?void 0:f.id]=f);var g={},k={},m={},x=(0,E.HK)(u||[],(function(n){return n.uuid})),y={};null===u||void 0===u||u.forEach((function(n){var o;if((null===n||void 0===n||null===(o=n.upstream_blocks)||void 0===o?void 0:o.length)>=1){var e=(null===n||void 0===n?void 0:n.upstream_blocks)||[],i=(0,E.YC)((0,t.Z)(e),(function(n){return n})).join(",");i in y||(y[i]={downstreamBlocks:[],upstreamBlocks:null===e||void 0===e?void 0:e.reduce((function(n,o){var e=null===x||void 0===x?void 0:x[o];return e?n.concat(e):n}),[])}),y[i].downstreamBlocks.push(n)}}));var C={},w={};Object.values(y||{}).forEach((function(n){var o=n.downstreamBlocks,e=n.upstreamBlocks;if((null===o||void 0===o?void 0:o.length)>=2){var i={};null===o||void 0===o||o.forEach((function(n){var o=n.downstream_blocks;if((null===o||void 0===o?void 0:o.length)>=1){var e=(0,E.YC)(o||[],(function(n){return n})).join(",");e in i||(i[e]=0),i[e]+=1}}));var l=Object.values(i||{})||[],r=Math.max.apply(Math,(0,t.Z)(l));(null===l||void 0===l||!l.length||r>=2)&&(null===o||void 0===o||o.forEach((function(o){var e=null===o||void 0===o?void 0:o.uuid;e in C||(C[e]=[]),C[e].push(n)})),null===e||void 0===e||e.forEach((function(o){var e=null===o||void 0===o?void 0:o.uuid;e in w||(w[e]=[]),w[e].push(n)})))}})),null===u||void 0===u||u.forEach((function(n){n.tags;var o=n.upstream_blocks,e=void 0===o?[]:o,i=n.uuid,t=a[i];i in m||(m[i]={});var u=null===d||void 0===d?void 0:d[null===n||void 0===n?void 0:n.uuid],s=null===c||void 0===c?void 0:c[null===n||void 0===n?void 0:n.uuid],f=null===v||void 0===v?void 0:v[null===n||void 0===n?void 0:n.uuid];g[i]={data:{block:n},height:(0,S.p1)(n,p,{blockStatus:r,callbackBlocks:u,conditionalBlocks:s,extensionBlocks:f}),id:i,width:(0,S.HI)(n,p,{blockStatus:r,callbackBlocks:u,conditionalBlocks:s,extensionBlocks:f})};var h={height:null!==b&&void 0!==b&&b[i]?2*I.iI:0,width:null!==b&&void 0!==b&&b[i]?2*I.iI:0},x="".concat(i,"-upstream-add"),y=function(n){return"".concat(n,"-dowstream-add")}(i);if(m[i][x]=P(P({},h),{},{id:x,side:j.rl.NORTH}),m[i][y]=P(P({},h),{},{id:y,side:j.rl.SOUTH}),!(i in C)){(null===e||void 0===e?void 0:e.length)>=1&&(m[i]=P(P({},null===m||void 0===m?void 0:m[i]),G(i,e,{activeNodes:b})),null===e||void 0===e||e.forEach((function(n){var o=L(i,n);k[o.id]=o})));var O=(null===w||void 0===w?void 0:w[i])||[],B=null===O||void 0===O?void 0:O.reduce((function(n,o){var e;return P(P({},n),null===o||void 0===o||null===(e=o.downstreamBlocks)||void 0===e?void 0:e.reduce((function(n,o){return P(P({},n),{},(0,l.Z)({},null===o||void 0===o?void 0:o.uuid,o))}),{}))}),{});null===t||void 0===t||t.forEach((function(n){var o=n.uuid;o in B||(m[i]=P(P({},null===m||void 0===m?void 0:m[i]),H(i,[o],{activeNodes:b})))}))}}));var O={};null===(o=Object.entries(w||{}))||void 0===o||o.forEach((function(n){var o=(0,i.Z)(n,2),e=(o[0],o[1]);null===e||void 0===e||e.forEach((function(n){var o=n.downstreamBlocks,e=n.upstreamBlocks,i=R(null===e||void 0===e?void 0:e.reduce((function(n,o){return o&&null!==o&&void 0!==o&&o.uuid?n.concat(null===o||void 0===o?void 0:o.uuid):n}),[]));i in O||(O[i]={downstreamBlocks:o,upstreamBlocks:e})}))}));var B={};return Object.entries(O||{}).forEach((function(n){var o,e=(0,i.Z)(n,2),t=e[0],l=e[1],r=l.downstreamBlocks,u=l.upstreamBlocks,d={data:{block:null===u||void 0===u?void 0:u[0],blocks:u,children:r},id:t};g[t]=d;var c=function(n,o,e,t,l){(0,E.YC)((null===n||void 0===n?void 0:n.map((function(n){return n.uuid})))||[],(function(n){return n.uuid}));var r,u={};null===n||void 0===n||n.forEach((function(n){var e=n.uuid,i=null===o||void 0===o?void 0:o[e];null===i||void 0===i||i.forEach((function(o){o.downstreamBlocks;var e=o.upstreamBlocks,i=R((0,E.YC)((null===e||void 0===e?void 0:e.map((function(n){return n.uuid})))||[],(function(n){return n.uuid})));i in u||(u[i]=[]),u[i].push(n)}))}));var d={};if(Object.entries(u||{}).forEach((function(n){var o=(0,i.Z)(n,2),l=(o[0],o[1]),r=null===l||void 0===l?void 0:l.filter((function(n){var o=n.uuid;return null===e||void 0===e?void 0:e[o]})),u=R(null===r||void 0===r?void 0:r.map((function(n){return n.uuid})));if(u in t){var c=null===t||void 0===t?void 0:t[u];d[u]=c}})),(null===(r=Object.keys(d))||void 0===r?void 0:r.length)>=1)return d}(r,C,w,O);c&&(B[t]=c);var a=null===(o=Object.values(c||{}))||void 0===o?void 0:o.reduce((function(n,o){var e=o.upstreamBlocks;return n.concat(null===e||void 0===e?void 0:e.map((function(n){return n.uuid})))}),[]);null===r||void 0===r||r.forEach((function(n){var o=n.uuid;null!==a&&void 0!==a&&a.includes(o)||!(o in g)||(g[o].parent=t)})),null===u||void 0===u||u.forEach((function(n){var o=null===n||void 0===n?void 0:n.uuid;null===r||void 0===r||r.forEach((function(n){var e=n.uuid;if((null===h||void 0===h?void 0:h.uuid)===o||(null===h||void 0===h?void 0:h.uuid)===e){var i=L(e,o);k[i.id]=i,m[o]=P(P({},null===m||void 0===m?void 0:m[o]),H(o,[e],{activeNodes:b})),m[e]=P(P({},null===m||void 0===m?void 0:m[e]),G(e,[o],{activeNodes:b}))}}));var e=L(t,o);k[e.id]=e,m[o]=P(P({},null===m||void 0===m?void 0:m[o]),H(o,[t],{activeNodes:b})),m[t]=P(P({},null===m||void 0===m?void 0:m[t]),G(t,[o],{activeNodes:b}))}))})),Object.entries(B||{}).forEach((function(n){var o=(0,i.Z)(n,2),e=o[0],t=o[1];Object.entries(t||{}).forEach((function(n){var o=(0,i.Z)(n,2),t=o[0],l=o[1],r=l.downstreamBlocks,u=l.upstreamBlocks,d=R([e,t]),c={data:{block:null===u||void 0===u?void 0:u[0],blocks:u,children:r},id:d,parent:e};g[d]=c,null===u||void 0===u||u.forEach((function(n){var o=n.uuid;o in g&&(g[o].parent=d);var e=N(t,o);if(e in k&&delete k[e],o in m){var i=M(o,t);i in(null===m||void 0===m?void 0:m[o])&&delete m[o][i]}if(t in m){var l=U(t,o);l in(null===m||void 0===m?void 0:m[t])&&delete m[t][l]}}));var a=L(t,d);k[a.id]=a,m[d]=P(P({},null===m||void 0===m?void 0:m[d]),H(d,[t],{activeNodes:b})),m[t]=P(P({},null===m||void 0===m?void 0:m[t]),G(t,[d],{activeNodes:b}))}))})),s&&Object.entries(m).forEach((function(n){var o=(0,i.Z)(n,2),e=o[0],t=o[1],l=null===g||void 0===g?void 0:g[e];l&&(l.ports=Object.values(t))})),{blocksWithDownstreamBlockSet:w,edges:Object.values(k||{}),nodes:Object.values(g||{}),ports:m}}function F(n){var o=n.block,e=n.blockStatus,i=n.messages,t=n.noStatus,l=n.runningBlocks,r=n.runningBlocksMapping;if(t||!o)return{};if(e){var u=(null===e||void 0===e?void 0:e[function(n){var o=n.uuid,e=n.replicated_block;return e?"".concat(o,":").concat(e):o}(o)])||{},d=u.status,c=u.runtime;return{hasFailed:B.V.FAILED===d,isCancelled:B.V.CANCELLED===d,isConditionFailed:B.V.CONDITION_FAILED===d,isInProgress:B.V.RUNNING===d,isQueued:B.V.INITIAL===d,isSuccessful:B.V.COMPLETED===d,runtime:c}}var a,s=(0,T.h5)((null===i||void 0===i?void 0:i[null===o||void 0===o?void 0:o.uuid])||[]),v=(0,T.oI)(s),f=v.hasError,p=v.hasOutput,h=!(null===r||void 0===r||!r[null===o||void 0===o?void 0:o.uuid]);return{hasFailed:!h&&(f||b.DA.FAILED===o.status),isInProgress:h,isQueued:h&&(null===(a=l[0])||void 0===a?void 0:a.uuid)!==o.uuid,isSuccessful:!h&&(!f&&p||b.DA.EXECUTED===o.status)}}var V,Y=e(28598);function z(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function X(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?z(Object(e),!0).forEach((function(o){(0,l.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):z(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var q=(V={},(0,l.Z)(V,b.tf.DATA_EXPORTER,C.zS),(0,l.Z)(V,b.tf.DATA_LOADER,C.rH),(0,l.Z)(V,b.tf.DBT,C.xE),(0,l.Z)(V,b.tf.GLOBAL_DATA_PRODUCT,C.ie),(0,l.Z)(V,b.tf.SENSOR,C.LM),(0,l.Z)(V,b.tf.TRANSFORMER,C.Sv),V);var K=function(n){var o=n.anotherBlockSelected,e=n.block,i=n.blocksWithSameDownstreamBlocks,r=n.callbackBlocks,u=n.children,d=n.conditionalBlocks,c=n.disabled,a=n.downstreamBlocks,s=n.extensionBlocks,p=n.hasFailed,j=n.height,B=n.hideNoStatus,I=n.hideStatus,T=n.isCancelled,_=n.isConditionFailed,Z=n.isDragging,P=n.isInProgress,A=n.isQueued,R=n.isSuccessful,N=n.opacity,L=n.pipeline,M=n.runtime,H=n.selected,U=n.selectedBlock,G=(0,f.useContext)(v.ThemeContext),W=!(P||A||p||R||T||_),F=p&&!(P||A),V=!F&&R&&!(P||A),z="";W?z="No status":V?z="Successful execution":F?z="Failed execution":P?z="Currently executiing":T&&(z="Cancelled execution");var K=e.color,Q=e.runtime,J=e.type,$=(0,O.qn)(J,{blockColor:K,theme:G}),nn=$.accent,on=$.accentLight,en=(0,f.useMemo)((function(){return(0,S.rQ)(e)}),[e]),tn=(0,f.useMemo)((function(){var n,o,e=q[J]||C.EJ,i=!1;return[b.tf.CALLBACK,b.tf.CHART,b.tf.CONDITIONAL,b.tf.CUSTOM,b.tf.DATA_EXPORTER,b.tf.DATA_LOADER,b.tf.EXTENSION,b.tf.SCRATCHPAD,b.tf.SENSOR,b.tf.MARKDOWN,b.tf.TRANSFORMER].includes(J)?n=nn:[b.tf.DBT].includes(J)&&(o=nn),[b.tf.DATA_EXPORTER].includes(J)&&(i=!0),(0,Y.jsx)(w.ze,{backgroundColor:n,borderColor:o,children:(0,Y.jsx)("div",{style:{height:w.ZG,width:w.ZG},children:(0,Y.jsx)(e,{inverted:i,size:w.ZG})})})}),[nn,J]),ln=(0,f.useMemo)((function(){var n=[],e=[];if(A)(0,E.w6)(4).forEach((function(){var o,i;n.push(null===G||void 0===G||null===(o=G.content)||void 0===o?void 0:o.muted),e.push(null===G||void 0===G||null===(i=G.content)||void 0===i?void 0:i.muted)}));else if((null===i||void 0===i?void 0:i.length)>=2&&(null===a||void 0===a?void 0:a.length)>=1){var r,u=[];null!==i&&void 0!==i&&i.find((function(n){var o=n.uuid;return(null===U||void 0===U?void 0:U.uuid)===o}))?u.push(U):u.push.apply(u,(0,t.Z)(i)),null===u||void 0===u||null===(r=u.slice(0,4))||void 0===r||r.forEach((function(o){var i=(0,O.qn)(null===o||void 0===o?void 0:o.type,{blockColor:null===o||void 0===o?void 0:o.color,theme:G}),t=i.accent,l=i.accentLight;n.push(l),e.push(t)}))}else n.push.apply(n,[on,on,on,on]),e.push.apply(e,[nn,nn,nn,nn]);if((null===n||void 0===n?void 0:n.length)<4)for(var d=0,c=(null===n||void 0===n?void 0:n.length)||0;(null===n||void 0===n?void 0:n.length)<4;)n.push(null===n||void 0===n?void 0:n[d]),(d+=1)===c&&(d=0);if((null===e||void 0===e?void 0:e.length)<4)for(var s=0,v=(null===e||void 0===e?void 0:e.length)||0;(null===e||void 0===e?void 0:e.length)<4;)e.push(null===e||void 0===e?void 0:e[s]),(s+=1)===v&&(s=0);return["borderColorBottom","borderColorLeft","borderColorRight","borderColorTop"].reduce((function(i,t,r){return X(X({},i),{},(0,l.Z)({},t,!H&&o?null===n||void 0===n?void 0:n[r]:null===e||void 0===e?void 0:e[r]))}),{})}),[nn,on,o,i,a,A,H,U,G]),rn=ln.borderColorBottom,un=ln.borderColorLeft,dn=ln.borderColorRight,cn=ln.borderColorTop;return(0,Y.jsx)(w.Gi,{active:P,activeSlow:A,backgroundGradient:!(null!==a&&void 0!==a&&a.length)&&(0,O.u2)(J),borderColorBottom:rn,borderColorLeft:un,borderColorRight:dn,borderColorTop:cn,borderDeemphasized:(null===a||void 0===a?void 0:a.length)>=1,borderRadiusLarge:(null===a||void 0===a?void 0:a.length)>=1,disabled:c,height:j,isCancelled:T,isDragging:Z,noBackground:(null===a||void 0===a?void 0:a.length)>=1,opacity:N,selected:H,children:(0,Y.jsxs)(w.RJ,{disabled:c,height:j-2*w.YF,isConditionFailed:_,noBackground:(null===a||void 0===a?void 0:a.length)>=1,children:[!(null!==a&&void 0!==a&&a.length)&&(0,Y.jsx)(w.I5,{children:(0,Y.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",children:[(0,Y.jsxs)(k.Z,{flex:1,children:[tn,(0,Y.jsx)(x.Z,{mr:S.DS}),(0,Y.jsxs)(k.Z,{flexDirection:"column",children:[(0,Y.jsx)(y.ZP,{bold:!0,monospace:!0,children:(0,S._7)(e,L)}),(0,Y.jsx)(y.ZP,{default:!0,monospace:!0,small:!0,children:(0,S.qj)(e,L)})]})]}),(0,Y.jsx)(x.Z,{mr:"15px"}),(0,Y.jsx)(w.Pq,{title:z,children:!I&&(0,Y.jsxs)(Y.Fragment,{children:[V&&(0,Y.jsx)(C.Jr,{size:S.SX,success:!0}),F&&(0,Y.jsx)(C.x8,{danger:!0,size:S.SX}),W&&!B&&(0,Y.jsx)(g.Z,{borderSize:1,muted:!0,size:S.SX})]})})]})}),(0,Y.jsxs)(w.Go,{children:[!(null!==a&&void 0!==a&&a.length)&&(0,Y.jsxs)(Y.Fragment,{children:[(null===en||void 0===en?void 0:en.length)>=1&&(0,Y.jsx)(x.Z,{mt:1,children:(0,Y.jsx)(y.ZP,{default:!0,monospace:!0,small:!0,children:en})}),[d,r,s].map((function(n,o){if((null===n||void 0===n?void 0:n.length)>=1)return(0,Y.jsx)("div",{style:{marginTop:4},children:(0,Y.jsx)(m.ZP,{alignItems:"center",flexWrap:"wrap",children:n.reduce((function(n,o,e){return e>=1&&n.push((0,Y.jsx)("div",{style:{width:4}},"space-".concat(o.uuid))),n.push((0,Y.jsx)("div",{style:{marginTop:4},children:(0,Y.jsx)(h.Z,{color:(0,O.qn)(o.type,{blockColor:o.color,theme:G}).accentLight,monospace:!0,small:!0,children:o.uuid})},"badge-".concat(o.uuid))),n}),[])})},"badge-blocks-".concat(o))})),(Q||M)&&(0,Y.jsx)(x.Z,{mt:1,children:(0,Y.jsx)(y.ZP,{monospace:!0,muted:!0,small:!0,children:D(Q||M)})})]}),u]})]})})},Q=e(50724),J=e(15338),$=e(93369),nn=e(48670),on=e(65956),en=e(57653),tn=e(71180),ln=e(12468),rn=e(42631),un=e(72191),dn=e(44897),cn=v.default.div.withConfig({displayName:"indexstyle__ZoomControlsStyle",componentId:"sc-1usy46j-0"})(["position:absolute;bottom:","px;left:50%;transform:translateX(-50%);display:flex;justify-content:center;background-color:",";border:1px solid ",";border-radius:","px;box-shadow:",";"],3*I.iI,(function(n){return(n.theme.background||dn.Z.background).panel}),(function(n){return(n.theme.borders||dn.Z.borders).darkLight}),rn.g5,(function(n){return(n.theme.shadow||dn.Z.shadow).frame})),an=v.default.div.withConfig({displayName:"indexstyle__ZoomDisplayStyle",componentId:"sc-1usy46j-1"})(["padding:","px ","px ","px ","px;border-radius:0 ","px ","px 0;cursor:default;",""],1.5*I.iI,3.25*I.iI,1.5*I.iI,1.875*I.iI,rn.g5,rn.g5,(function(n){return n.minimizeControls&&"\n padding: ".concat(1.5*I.iI,"px ").concat(1.875*I.iI,"px;\n border-radius: ").concat(rn.g5,"px;\n ")}));function sn(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function vn(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?sn(Object(e),!0).forEach((function(o){(0,l.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):sn(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var fn=35*I.iI,pn={bottomOffset:6.5*I.iI,size:null,widthFitContent:!0},hn={highlightOnHoverAlt:!0,iconOnly:!0,noBorder:!0,padding:"".concat(1.5*I.iI,"px ").concat(1.875*I.iI,"px"),transparent:!0},bn={size:un._k};function gn(n){var o=n.canvasRef,e=n.containerRef,i=n.zoomLevel,t=(0,f.useState)(!1),l=t[0],r=t[1];return(0,f.useEffect)((function(){if(null!==e&&void 0!==e&&e.current){var n=new ResizeObserver((function(){var n,o=null===e||void 0===e||null===(n=e.current)||void 0===n?void 0:n.offsetWidth;r(o<fn)}));return n.observe(e.current),function(){return n.disconnect()}}}),[e]),(0,Y.jsxs)(cn,{onDoubleClick:function(n){n.stopPropagation()},children:[!l&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ln.Z,vn(vn({},pn),{},{label:"Reset (shortcut: double-click canvas)",children:(0,Y.jsx)(tn.ZP,vn(vn({},hn),{},{borderRadius:"".concat(rn.g5,"px 0 0 ").concat(rn.g5,"px"),onClick:function(){var n,e;return null===o||void 0===o||null===(n=o.current)||void 0===n||null===(e=n.fitCanvas)||void 0===e?void 0:e.call(n)},padding:"".concat(1.5*I.iI,"px ").concat(1.875*I.iI,"px ").concat(1.5*I.iI,"px ").concat(3.25*I.iI,"px"),children:(0,Y.jsx)(C.Qc,vn({},bn))}))})),(0,Y.jsx)(ln.Z,vn(vn({},pn),{},{label:"Zoom in",children:(0,Y.jsx)(tn.ZP,vn(vn({},hn),{},{onClick:function(){var n,e;return null===o||void 0===o||null===(n=o.current)||void 0===n||null===(e=n.setZoom)||void 0===e?void 0:e.call(n,i-1+.5)},children:(0,Y.jsx)(C.DY,vn({},bn))}))})),(0,Y.jsx)(ln.Z,vn(vn({},pn),{},{label:"Zoom out",children:(0,Y.jsx)(tn.ZP,vn(vn({},hn),{},{onClick:function(){var n,e;return null===o||void 0===o||null===(n=o.current)||void 0===n||null===(e=n.setZoom)||void 0===e?void 0:e.call(n,i-1-.5)},children:(0,Y.jsx)(C.H9,vn({},bn))}))}))]}),(0,Y.jsx)(ln.Z,vn(vn({},pn),{},{label:"Zoom level",children:(0,Y.jsx)(an,{minimizeControls:l,children:(0,Y.jsx)(y.ZP,{center:!0,large:!0,minWidth:5*I.iI,children:"".concat(Math.round(100*i),"%")})})}))]})}var kn=(0,f.memo)(gn),mn=e(35686),xn=e(77417),yn=e(55187),Cn=e(85385),wn=e(72619),Sn=e(95924),On=["forwardedRef"];function jn(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function Bn(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?jn(Object(e),!0).forEach((function(o){(0,l.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):jn(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var In=s()((0,u.Z)(c().mark((function n(){var o,i;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,i=o.Canvas,n.abrupt("return",(function(n){var o=n.forwardedRef,e=(0,r.Z)(n,On);return(0,Y.jsx)(i,Bn({ref:o},e))}));case 5:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),En=s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Node);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),Tn=s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Edge);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),_n=s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Port);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}});s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Add);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.Remove);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}}),s()((0,u.Z)(c().mark((function n(){var o;return c().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.all([e.e(4434),e.e(5987),e.e(2920)]).then(e.t.bind(e,74529,23));case 2:return o=n.sent,n.abrupt("return",o.MarkerArrow);case 4:case"end":return n.stop()}}),n)}))),{ssr:!1,loadableGenerated:{webpack:function(){return[74529]}}});var Zn=function(n){var o=n.addNewBlockAtIndex,e=n.blockRefs,r=n.blockStatus,u=n.blocksOverride,d=n.blocks,c=n.contentByBlockUUID,a=n.contextMenuEnabled,s=n.deleteBlock,h=n.disabled,g=n.dragEnabled,k=n.editingBlock,C=n.enablePorts,w=void 0!==C&&C,B=n.fetchPipeline,T=n.height,_=n.heightOffset,Z=void 0===_?10*I.iI:_,P=n.messages,D=n.noStatus,N=n.onClickNode,L=n.runBlock,H=n.pannable,U=void 0===H||H,G=n.pipeline,V=n.runningBlocks,z=void 0===V?[]:V,X=n.selectedBlock,q=n.setActiveSidekickView,tn=n.setEditingBlock,ln=n.setErrors,rn=n.setSelectedBlock,un=n.setZoom,dn=n.showDynamicBlocks,cn=void 0!==dn&&dn,an=n.showUpdateBlockModal,sn=n.treeRef,vn=n.zoomable,fn=void 0===vn||vn,pn=(0,xn.Z)(),hn=pn.featureEnabled,bn=pn.featureUUIDs,gn=(0,f.useContext)(v.ThemeContext),On=((0,f.useMemo)((function(){return(0,yn.ki)(gn)}),[gn]),(0,f.useRef)(null)),jn=((0,f.useRef)({}),(0,f.useRef)({})),Zn=(0,f.useRef)({}),Pn=(0,f.useRef)(null),Dn=sn||Pn,An=(0,f.useState)(1),Rn=An[0],Nn=An[1],Ln=(0,f.useState)(null),Mn=Ln[0],Hn=Ln[1],Un=(0,f.useState)({}),Gn=Un[0],Wn=Un[1],Fn=(0,f.useState)({}),Vn=Fn[0],Yn=Fn[1],zn=(0,f.useState)(null),Xn=zn[0],qn=zn[1],Kn=(0,f.useState)(!1),Qn=Kn[0],Jn=Kn[1],$n=(0,f.useState)(null),no=$n[0],oo=$n[1],eo=(0,f.useState)(null),io=eo[0],to=eo[1],lo=(0,f.useState)(null),ro=lo[0],uo=lo[1];(0,f.useEffect)((function(){var n=function(n){Qn&&no&&oo((function(o){return Bn(Bn({},o),{},{event:n})}))},o=function(n){Qn&&no&&(Jn(!1),setTimeout((function(){return oo(null)}),1))};return window.addEventListener("mousemove",n),window.addEventListener("mouseup",o),function(){window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",o)}}),[Qn,no]);var co=(0,f.useState)(null),ao=co[0],so=co[1],vo=(0,f.useState)([]),fo=vo[0],po=vo[1],ho=(0,f.useState)(!1),bo=(ho[0],ho[1],(null===k||void 0===k?void 0:k.upstreamBlocks)||{}),go=bo.block,ko=bo.values,mo=void 0===ko?[]:ko,xo=(0,f.useMemo)((function(){return mo.length}),[mo]),yo=(0,f.useMemo)((function(){var n;return(null===(n=u||(null===G||void 0===G?void 0:G.blocks))||void 0===n?void 0:n.filter((function(n){var o=n.type;return!b.iZ.includes(o)})))||[]}),[u,null===G||void 0===G?void 0:G.blocks]),Co=(0,f.useMemo)((function(){return yo}),[yo,cn]),wo=(0,f.useMemo)((function(){if(u)return u;if(d)return d;if(G){var n={},o=[];return o.push.apply(o,(0,t.Z)(null===G||void 0===G?void 0:G.blocks)),o.push.apply(o,(0,t.Z)(null===G||void 0===G?void 0:G.callbacks)),o.push.apply(o,(0,t.Z)(null===G||void 0===G?void 0:G.conditionals)),Object.values(null===G||void 0===G?void 0:G.extensions).forEach((function(n){var e=n.blocks;o.push.apply(o,(0,t.Z)(e))})),o.reduce((function(o,e){return n[e.uuid]||o.push(e),o}),[])}return[]}),[d,u,G]),So=(0,f.useMemo)((function(){return(0,E.HK)(wo||[],(function(n){return n.uuid}))}),[wo]),Oo=(0,f.useMemo)((function(){var n={};return null===Co||void 0===Co||Co.map((function(o){var e;n[o.uuid]=null===o||void 0===o||null===(e=o.callback_blocks)||void 0===e?void 0:e.reduce((function(n,o){var e=null===So||void 0===So?void 0:So[o];return e?n.concat(e):n}),[])})),n}),[Co,So]),jo=(0,f.useMemo)((function(){var n={};return null===Co||void 0===Co||Co.map((function(o){var e;n[o.uuid]=null===o||void 0===o||null===(e=o.conditional_blocks)||void 0===e?void 0:e.reduce((function(n,o){var e=null===So||void 0===So?void 0:So[o];return e?n.concat(e):n}),[])})),n}),[Co,So]),Bo=(0,f.useMemo)((function(){var n={};return null===Co||void 0===Co||Co.map((function(o){var e,t=[];null===(e=Object.entries((null===G||void 0===G?void 0:G.extensions)||{}))||void 0===e||e.forEach((function(n){var e=(0,i.Z)(n,2),l=e[0],r=e[1].blocks;null===r||void 0===r||r.forEach((function(n){var e=n.upstream_blocks,i=n.uuid;if(null!==e&&void 0!==e&&e.includes(null===o||void 0===o?void 0:o.uuid)){var r=null===So||void 0===So?void 0:So[i];r&&t.push(Bn(Bn({},r),{},{extension_uuid:l}))}}))})),n[o.uuid]=t})),n}),[Co,So,G]),Io=(0,f.useMemo)((function(){return(0,E.HK)(z,(function(n){return n.uuid}))}),[z]);(0,f.useEffect)((function(){setTimeout((function(){var n,o,e,i,t;0===(null===Dn||void 0===Dn||null===(n=Dn.current)||void 0===n||null===(o=n.containerRef)||void 0===o||null===(e=o.current)||void 0===e?void 0:e.scrollTop)&&(null===Dn||void 0===Dn||null===(i=Dn.current)||void 0===i||null===(t=i.fitCanvas)||void 0===t||t.call(i))}),1e3)}),[Dn]);var Eo=(0,p.Db)(mn.ZP.blocks.pipelines.useUpdate(null===G||void 0===G?void 0:G.uuid,encodeURIComponent(null===go||void 0===go?void 0:go.uuid)),{onSuccess:function(n){return(0,wn.wD)(n,{callback:function(){tn({upstreamBlocks:null}),null===B||void 0===B||B()},onErrorCallback:function(n,o){return null===ln||void 0===ln?void 0:ln({errors:o,response:n})}})}}),To=(0,i.Z)(Eo,2),_o=To[0],Zo=To[1].isLoading,Po=(0,p.Db)((function(n){var o=n.block,e=n.downstreamBlocks,i=n.upstreamBlocks,t=Bn({},o);return"undefined"!==typeof e&&(t.downstream_blocks=e),"undefined"!==typeof i&&(t.upstream_blocks=i),mn.ZP.blocks.pipelines.useUpdate(encodeURIComponent(null===G||void 0===G?void 0:G.uuid),encodeURIComponent(null===o||void 0===o?void 0:o.uuid))({block:t})}),{onSuccess:function(n){return(0,wn.wD)(n,{callback:function(){null===B||void 0===B||B()},onErrorCallback:function(n,o){return null===ln||void 0===ln?void 0:ln({errors:o,response:n})}})}}),Do=(0,i.Z)(Po,1)[0],Ao=(0,f.useCallback)((function(n){var o=n.type,i=n.uuid;if(null===rn||void 0===rn||rn(n),po([]),null!==e&&void 0!==e&&e.current){var t,l=e.current["".concat(o,"s/").concat(i,".py")];null===l||void 0===l||null===(t=l.current)||void 0===t||t.scrollIntoView()}}),[e,rn]),Ro=(0,f.useCallback)((function(n){po([]),tn((function(o){var e=o.upstreamBlocks.values||[],i=e.findIndex((function(o){var e=o.uuid;return n.uuid===e}));return Bn(Bn({},o),{},{upstreamBlocks:Bn(Bn({},o.upstreamBlocks),{},{values:i>=0?(0,E.oM)(e,i):e.concat(n)})})}))}),[tn]),No=(0,f.useMemo)((function(){var n={};return Co.forEach((function(o){o.upstream_blocks.forEach((function(e){n[e]||(n[e]=[]),n[e].push(o)}))})),n}),[Co]),Lo=(0,f.useMemo)((function(){return W({activeNodes:Gn,blockStatus:r,blockUUIDMapping:So,blocks:Co,callbackBlocksByBlockUUID:Oo,conditionalBlocksByBlockUUID:jo,downstreamBlocksMapping:No,enablePorts:w,extensionBlocksByBlockUUID:Bo,nodeHovering:io,pipeline:G,selectedBlock:ao})}),[Gn,r,So,Co,Oo,jo,No,w,Bo,io,G,ao]),Mo=Lo.edges,Ho=Lo.nodes,Uo=(Lo.ports,Lo.blocksWithDownstreamBlockSet),Go=(0,f.useMemo)((function(){var n=0;return T&&(n+=T),Z&&(n-=Z),Math.max(0,n)}),[T,Z]),Wo=(0,f.useCallback)((function(n,o){(0,Sn.j)(n);var e,i,t,l,r,u=o.data,d=u.block,c=u.blocks,a=d;if((null===c||void 0===c?void 0:c.length)>=2&&X){var s=null===c||void 0===c?void 0:c.findIndex((function(n){var o=n.uuid;return(null===X||void 0===X?void 0:X.uuid)===o}));a=s<(null===c||void 0===c?void 0:c.length)-1?null===c||void 0===c?void 0:c[s+1]:null===c||void 0===c?void 0:c[0]}if(!((null===go||void 0===go?void 0:go.uuid)===a.uuid))if(go)Ro(a);else if(null===N||void 0===N||N({block:a}),X&&(null===X||void 0===X?void 0:X.uuid)===(null===(e=a)||void 0===e?void 0:e.uuid)&&(((null===(i=a)||void 0===i||null===(t=i.downstream_blocks)||void 0===t?void 0:t.length)||0)<=1&&(null===(l=a)||void 0===l||null===(r=l.upstream_blocks)||void 0===r||!r.length)||ao&&(null===ao||void 0===ao?void 0:ao.uuid)===(null===X||void 0===X?void 0:X.uuid)))null===rn||void 0===rn||rn(null),so(null);else{var v;if(X)(null===X||void 0===X?void 0:X.uuid)===(null===(v=a)||void 0===v?void 0:v.uuid)?so(a):so(null);setTimeout((function(){Ao(a)}),1)}}),[go,Ao,N,Ro,X,ao,so]),Fo=(0,f.useCallback)((function(n){var o,e=null===n||void 0===n?void 0:n.id;e in jn.current&&clearTimeout(null===jn||void 0===jn||null===(o=jn.current)||void 0===o?void 0:o[e])}),[Gn]),Vo=(0,f.useCallback)((function(n){var o=null===n||void 0===n?void 0:n.id;jn.current[o]=setTimeout((function(){Wn((function(n){var e=Bn({},n);return null===e||void 0===e||delete e[o],e}))}),1e3)}),[Wn]),Yo=(0,f.useCallback)((function(n,o,e){var i;if((0,Sn.j)(n),!Qn&&no){var t,r,u,d,c,a,s,v,f,p=null===o||void 0===o||null===(t=o.data)||void 0===t?void 0:t.block,h=null===no||void 0===no||null===(r=no.node)||void 0===r||null===(u=r.data)||void 0===u?void 0:u.block;if(!((null===G||void 0===G?void 0:G.type)===en.qL.INTEGRATION&&((null===p||void 0===p?void 0:p.type)===b.tf.DATA_EXPORTER||(null===p||void 0===p?void 0:p.type)===b.tf.DATA_LOADER&&(null===h||void 0===h?void 0:h.type)===b.tf.DATA_EXPORTER))&&(null===p||void 0===p||null===(d=p.upstream_blocks)||void 0===d||!d.includes(null===h||void 0===h?void 0:h.uuid))&&(null===p||void 0===p?void 0:p.uuid)!==(null===h||void 0===h?void 0:h.uuid))if((null===o||void 0===o||null===(c=o.data)||void 0===c||null===(a=c.children)||void 0===a?void 0:a.length)>=1){var g,m=null===p||void 0===p||null===(g=p.downstream_blocks)||void 0===g?void 0:g.filter((function(n){var o;return!(null!==h&&void 0!==h&&null!==(o=h.upstream_blocks)&&void 0!==o&&o.includes(n))}));Do({block:h,upstreamBlocks:m})}else if((null===no||void 0===no||null===(s=no.node)||void 0===s||null===(v=s.data)||void 0===v||null===(f=v.children)||void 0===f?void 0:f.length)>=1){var x,y=null===h||void 0===h||null===(x=h.downstream_blocks)||void 0===x?void 0:x.filter((function(n){var o;return!(null!==p&&void 0!==p&&null!==(o=p.downstream_blocks)&&void 0!==o&&o.includes(n))}));Do({block:p,downstreamBlocks:y})}else Do({block:h,upstreamBlocks:((null===h||void 0===h?void 0:h.upstream_blocks)||[]).concat(null===p||void 0===p?void 0:p.uuid)})}if(null===k||void 0===k||!k.upstreamBlocks){Fo(o),to(o);var C=null===o||void 0===o?void 0:o.id;null===(i=Object.keys(Vn||{}))||void 0===i||!i.length||C in Vn?Wn((function(n){return Object.values(n||{}).forEach((function(n){Vo(n)})),Bn(Bn({},n),{},(0,l.Z)({},C,o))})):uo(o)}}),[Vn,Fo,k,Qn,no,G,Wn,to,uo,Vo]),zo=(0,f.useCallback)((function(n,o,e){(0,Sn.j)(n),to(null),Vo(o)}),[to,Vo]),Xo=(0,f.useCallback)((function(n,o,e){if((0,Sn.j)(n),!Xn){var i=null===o||void 0===o?void 0:o.id;Zn.current[i]=setTimeout((function(){Xn||(Hn(null),Wn({}),Jn(!0),oo({data:e,event:n,node:o}))}),500)}}),[Xn,Wn,Hn,Jn,oo]),qo=(0,f.useCallback)((function(n,o,e){(0,Sn.j)(n);var i,t=null===o||void 0===o?void 0:o.id;t in Zn.current&&clearTimeout(null===Zn||void 0===Zn||null===(i=Zn.current)||void 0===i?void 0:i[t])}),[]),Ko=(0,f.useCallback)((function(n,o,e){var i;(0,Sn.j)(n);var t=null===o||void 0===o?void 0:o.id;clearTimeout(null===(i=Zn.current)||void 0===i?void 0:i[t]),qn({data:e,event:n,node:o}),Hn(null)}),[Hn,qn]),Qo=(0,f.useCallback)((function(n){var o=n.event,e=n.node;n.port;(0,Sn.j)(o),Fo(e),to(e)}),[Fo,to]),Jo=(0,f.useCallback)((function(n){var o=n.event,e=n.node;n.port;(0,Sn.j)(o),to(null),Vo(e)}),[to,Vo]),$o=(0,f.useCallback)((function(n){var o=n.event,e=n.node,i=n.port;Yn((function(n){return Bn(Bn({},n),{},(0,l.Z)({},null===e||void 0===e?void 0:e.id,{event:o,node:e,port:i}))}))}),[Yn]),ne=(0,f.useCallback)((function(n){n.event;var o=n.node,e=n.port,i=null===o||void 0===o?void 0:o.id;null===e||void 0===e||e.side;if(ro){var t,l,r,u,d=null===o||void 0===o||null===(t=o.properties)||void 0===t||null===(l=t.data)||void 0===l?void 0:l.block,c=null===ro||void 0===ro||null===(r=ro.data)||void 0===r?void 0:r.block;if(!((null===G||void 0===G?void 0:G.type)===en.qL.INTEGRATION&&((null===d||void 0===d?void 0:d.type)===b.tf.DATA_EXPORTER||(null===d||void 0===d?void 0:d.type)===b.tf.DATA_LOADER&&(null===c||void 0===c?void 0:c.type)===b.tf.DATA_EXPORTER))&&(null===d||void 0===d||null===(u=d.upstream_blocks)||void 0===u||!u.includes(c.uuid))&&(null===o||void 0===o?void 0:o.id)!==(null===ro||void 0===ro?void 0:ro.id)){var a={};j.rl.SOUTH===(null===e||void 0===e?void 0:e.side)?a.upstreamBlocks=((null===c||void 0===c?void 0:c.upstream_blocks)||[]).concat(null===d||void 0===d?void 0:d.uuid):a.downstreamBlocks=((null===c||void 0===c?void 0:c.downstream_blocks)||[]).concat(null===d||void 0===d?void 0:d.uuid),Do(Bn({block:c},a))}}Yn((function(n){var o=Bn({},n);return null===o||void 0===o||delete o[i],o})),Vo(o)}),[G,Yn,Vo,ro]),oe=(0,f.useCallback)((function(n,o,e){var i,t;if(no)return{anotherBlockSelected:!0,selected:!1};var l=(null===(i=Object.values(Vn||{}))||void 0===i?void 0:i.length)>=1,r=null===Vn||void 0===Vn?void 0:Vn[null===n||void 0===n?void 0:n.id],u=!1;if(go)u=!!(0,E.sE)(mo,(function(n){return n.uuid===(null===o||void 0===o?void 0:o.uuid)}));else if(l)u=!!r;else if((null===e||void 0===e||null===(t=e.blocksWithSameDownstreamBlocks)||void 0===t?void 0:t.length)>=2){var d,c;u=null===e||void 0===e||null===(d=e.blocksWithSameDownstreamBlocks)||void 0===d||null===(c=d.map((function(n){return n.uuid})))||void 0===c?void 0:c.includes(null===X||void 0===X?void 0:X.uuid)}else u=(null===X||void 0===X?void 0:X.uuid)===(null===o||void 0===o?void 0:o.uuid);return{anotherBlockSelected:l?!r:!!X,selected:u}}),[Vn,go,no,X,mo]),ee=(0,f.useCallback)((function(n,o,e){var i,t=e.isDragging,l=e.nodeHeight,u=e.nodeWidth,d=e.opacity,c=n.data,a=c.blocks,s=c.children;if((null===s||void 0===s?void 0:s.length)>=1){var v=[];null===s||void 0===s||s.forEach((function(o){var e=oe(n,o),i=e.anotherBlockSelected,l=e.selected,u=F({block:o,blockStatus:r,messages:P,noStatus:D,runningBlocks:z,runningBlocksMapping:Io}),c=u.hasFailed,a=u.isInProgress,s=u.isQueued,f=u.isSuccessful,p=null===Oo||void 0===Oo?void 0:Oo[null===o||void 0===o?void 0:o.uuid],b=null===jo||void 0===jo?void 0:jo[null===o||void 0===o?void 0:o.uuid],g=null===Bo||void 0===Bo?void 0:Bo[null===o||void 0===o?void 0:o.uuid];v.push((0,Y.jsx)(K,{anotherBlockSelected:i,block:o,callbackBlocks:null===Oo||void 0===Oo?void 0:Oo[null===o||void 0===o?void 0:o.uuid],conditionalBlocks:null===jo||void 0===jo?void 0:jo[null===o||void 0===o?void 0:o.uuid],disabled:(null===go||void 0===go?void 0:go.uuid)===(null===o||void 0===o?void 0:o.uuid),extensionBlocks:null===Bo||void 0===Bo?void 0:Bo[null===o||void 0===o?void 0:o.uuid],hasFailed:c,height:(0,S.p1)(o,G,{blockStatus:r,callbackBlocks:p,conditionalBlocks:b,extensionBlocks:g}),hideNoStatus:!0,hideStatus:h||D,isDragging:t,isInProgress:a,isQueued:s,isSuccessful:f,opacity:d,pipeline:G,selected:l},null===o||void 0===o?void 0:o.uuid))})),i=(0,Y.jsxs)(m.ZP,{alignItems:"center",justifyContent:"space-between",style:{height:l,width:u},children:[(0,Y.jsx)(x.Z,{pr:I.cd}),v,(0,Y.jsx)(x.Z,{pr:I.cd})]})}var f,p=oe(n,o,{blocksWithSameDownstreamBlocks:a}),b=p.anotherBlockSelected,g=p.selected,k=F({block:o,blockStatus:r,messages:P,noStatus:D,runningBlocks:z,runningBlocksMapping:Io}),y=k.hasFailed,C=k.isInProgress,w=k.isQueued,O=k.isSuccessful;return f=(null===s||void 0===s?void 0:s.length)>=1?null===s||void 0===s?void 0:s.some((function(n){var e;return n&&(null===(e=F({block:o,blockStatus:r,messages:P,noStatus:D,runningBlocks:z,runningBlocksMapping:Io}))||void 0===e?void 0:e.isInProgress)})):C,(0,Y.jsx)(K,{anotherBlockSelected:b,block:o,blocksWithSameDownstreamBlocks:a,callbackBlocks:null===Oo||void 0===Oo?void 0:Oo[null===o||void 0===o?void 0:o.uuid],conditionalBlocks:null===jo||void 0===jo?void 0:jo[null===o||void 0===o?void 0:o.uuid],disabled:(null===go||void 0===go?void 0:go.uuid)===(null===o||void 0===o?void 0:o.uuid),downstreamBlocks:s,extensionBlocks:null===Bo||void 0===Bo?void 0:Bo[null===o||void 0===o?void 0:o.uuid],hasFailed:y,height:l,hideNoStatus:!0,hideStatus:h||D,isDragging:t,isInProgress:f,isQueued:w,isSuccessful:O,opacity:d,pipeline:G,selected:g,children:i},null===o||void 0===o?void 0:o.uuid)}),[go,r,Oo,jo,h,Bo,P,D,G,z,Io]),ie=(0,f.useMemo)((function(){var n,o;if(Qn&&no){var e=no.event,i=no.node,t=no.data,l=e.clientX,u=e.clientY,d=(null===On||void 0===On||null===(n=On.current)||void 0===n?void 0:n.getBoundingClientRect())||{},c=d.x,a=d.y,s=null===i||void 0===i||null===(o=i.data)||void 0===o?void 0:o.block;if(s){var v=F({block:s,blockStatus:r,messages:P,noStatus:D,runningBlocks:z,runningBlocksMapping:Io}),f=(v.hasFailed,v.isInProgress,v.isQueued,v.isSuccessful,null===Oo||void 0===Oo?void 0:Oo[null===s||void 0===s?void 0:s.uuid]),p=null===jo||void 0===jo?void 0:jo[null===s||void 0===s?void 0:s.uuid],h=null===Bo||void 0===Bo?void 0:Bo[null===s||void 0===s?void 0:s.uuid],b={blockStatus:r,callbackBlocks:f,conditionalBlocks:p,extensionBlocks:h},g=(0,S.p1)(s,G,b),k=(0,S.HI)(s,G,b),m=ee(i,s,{isDragging:!0,nodeHeight:null===t||void 0===t?void 0:t.nodeHeight,nodeWidth:null===t||void 0===t?void 0:t.nodeWidth,opacity:.5});return(0,Y.jsx)("div",{style:{left:l-c-k/2,position:"absolute",top:u-a-g/2},children:m})}}}),[r,ee,Oo,jo,Bo,Qn,P,D,no,G,z,Io]),te=(0,f.useMemo)((function(){var n,e,i,t;if(Mn){var l,r=Mn.edge,u=So[null===r||void 0===r?void 0:r.from],d=So[null===r||void 0===r?void 0:r.to],c=null===(n=event)||void 0===n?void 0:n.clientX,a=null===(e=event)||void 0===e?void 0:e.clientY,s=(null===On||void 0===On||null===(i=On.current)||void 0===i?void 0:i.getBoundingClientRect())||{},v=s.x,f=s.y;u&&!d?l=null===Uo||void 0===Uo?void 0:Uo[null===u||void 0===u?void 0:u.uuid]:!u&&d&&(l=null===Uo||void 0===Uo?void 0:Uo[null===d||void 0===d?void 0:d.uuid]);var p,h=function(){Do({block:d,upstreamBlocks:((null===d||void 0===d?void 0:d.upstream_blocks)||[]).filter((function(n){return n!==(null===u||void 0===u?void 0:u.uuid)}))})};if((null===(t=l)||void 0===t?void 0:t.length)>=1)null===(p=l)||void 0===p||p.forEach((function(n){var o=n.downstreamBlocks,e=n.upstreamBlocks,i=R(null===e||void 0===e?void 0:e.map((function(n){return n.uuid})));if(u&&!d&&(null===r||void 0===r?void 0:r.to)===i){var t=(0,E.HK)(o||[],(function(n){return n.uuid}));h=function(){Do({block:u,downstreamBlocks:((null===u||void 0===u?void 0:u.downstream_blocks)||[]).filter((function(n){return!(n in t)}))})}}else if(!u&&d&&(null===r||void 0===r?void 0:r.from)===i){var l=(0,E.HK)(e||[],(function(n){return n.uuid}));h=function(){Do({block:d,upstreamBlocks:((null===d||void 0===d?void 0:d.upstream_blocks)||[]).filter((function(n){return!(n in l)}))})}}}));else if(!u&&!d){var g,k,m=[];null===r||void 0===r||null===(g=r.to)||void 0===g||null===(k=g.split(":"))||void 0===k||k.forEach((function(n){if((null===n||void 0===n?void 0:n.length)>=1&&"parent"!==n){var o=null===So||void 0===So?void 0:So[n];o&&m.push(o)}})),h=function(){null===m||void 0===m||m.forEach((function(n){return Do({block:n,downstreamBlocks:[]})}))}}return(0,Y.jsx)("div",{style:{left:c-v,position:"absolute",top:a-f},children:(0,Y.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return Hn(null)},open:!0,children:(0,Y.jsxs)(on.Z,{noPadding:!0,children:[(0,Y.jsx)(x.Z,{px:I.cd,py:1,children:(0,Y.jsx)(nn.Z,{block:!0,onClick:function(){var n=null===Co||void 0===Co?void 0:Co.findIndex((function(n){return n.uuid===(null===d||void 0===d?void 0:d.uuid)}));null===o||void 0===o||o({downstream_blocks:d?[null===d||void 0===d?void 0:d.uuid]:null,language:null===d||void 0===d?void 0:d.language,type:b.tf.CUSTOM,upstream_blocks:u?[null===u||void 0===u?void 0:u.uuid]:null},n,(function(){Hn(null)}))},preventDefault:!0,sameColorAsText:!0,children:"Add new block between"})}),(0,Y.jsx)(J.Z,{light:!0}),(0,Y.jsx)(x.Z,{px:I.cd,py:1,children:(0,Y.jsx)(nn.Z,{block:!0,onClick:function(){var n;null===(n=h)||void 0===n||n(),Hn(null)},preventDefault:!0,sameColorAsText:!0,children:"Remove connection"})})]})})})}}),[Mn,Co,Hn,Do]),le=(0,f.useMemo)((function(){return null===hn||void 0===hn?void 0:hn(bn.INTERACTIONS)}),[hn,bn]),re=(0,f.useMemo)((function(){var n;if(Xn){var e,i,t,l,r=Xn.event,u=Xn.node,d=(Xn.data,u.data),a=d.block,v=d.blocks,f=(d.children,r.clientX),p=r.clientY,h=(null===On||void 0===On||null===(n=On.current)||void 0===n?void 0:n.getBoundingClientRect())||{},g=h.x,k=h.y,m=X&&(null===X||void 0===X?void 0:X.uuid)===(null===a||void 0===a?void 0:a.uuid)&&ao&&(null===ao||void 0===ao?void 0:ao.uuid)===(null===a||void 0===a?void 0:a.uuid),y=null===v||void 0===v?void 0:v.findIndex((function(n){return n.uuid===(null===a||void 0===a?void 0:a.uuid)})),C=en.qL.INTEGRATION===(null===G||void 0===G?void 0:G.type),w=[];if(C||w.push({onClick:function(){var n,o;null===L||void 0===L||L({block:a,code:null===c||void 0===c||null===(n=c.current)||void 0===n||null===(o=n[null===a||void 0===a?void 0:a.type])||void 0===o?void 0:o[null===a||void 0===a?void 0:a.uuid]})},uuid:"Run block"}),w.push.apply(w,[{onClick:function(){an(a,null===a||void 0===a?void 0:a.name)},uuid:"Rename block"}]),!C)w.push.apply(w,[{disabled:((null===a||void 0===a||null===(e=a.downstream_blocks)||void 0===e?void 0:e.length)||0)<=1&&!(null!==a&&void 0!==a&&null!==(i=a.upstream_blocks)&&void 0!==i&&i.length),onClick:function(){null===rn||void 0===rn||rn(m?null:a),so(m?null:a)},uuid:m?"Hide all dependencies":"Show all dependencies"},{onClick:function(){null===o||void 0===o||o({downstream_blocks:a?[null===a||void 0===a?void 0:a.uuid]:null,language:b.t6.YAML===(null===a||void 0===a?void 0:a.language)?b.t6.PYTHON:null===a||void 0===a?void 0:a.language,type:b.tf.CUSTOM},Math.max(0,y-1))},uuid:"Add upstream block"},{onClick:function(){null===o||void 0===o||o({language:b.t6.YAML===(null===a||void 0===a?void 0:a.language)?b.t6.PYTHON:null===a||void 0===a?void 0:a.language,type:b.tf.CUSTOM,upstream_blocks:a?[null===a||void 0===a?void 0:a.uuid]:null},y+1)},uuid:"Add downstream block"},{disabled:!(null!==a&&void 0!==a&&null!==(t=a.upstream_blocks)&&void 0!==t&&t.length),onClick:function(){Do({block:a,upstreamBlocks:[]})},uuid:"Remove upstream dependencies"},{disabled:!(null!==a&&void 0!==a&&null!==(l=a.downstream_blocks)&&void 0!==l&&l.length),onClick:function(){Do({block:a,downstreamBlocks:[]})},uuid:"Remove downstream dependencies"}]);return le&&w.push({onClick:function(){null===Ao||void 0===Ao||Ao(a),null===q||void 0===q||q(Cn.cH.INTERACTIONS)},uuid:"Add / Edit interactions"}),w.push.apply(w,[{onClick:function(){null===s||void 0===s||s(a)},uuid:"Delete block"},{onClick:function(){null===s||void 0===s||s(Bn(Bn({},a),{},{force:!0}))},uuid:"Delete block (ignore dependencies)"},{onClick:function(){null===Ao||void 0===Ao||Ao(a),null===q||void 0===q||q(Cn.cH.FILE_VERSIONS)},uuid:"View file versions"}]),(0,Y.jsx)("div",{style:{left:f-g,position:"absolute",top:p-k},children:(0,Y.jsx)(Q.Z,{disableEscape:!0,onClickOutside:function(){return qn(null)},open:!0,children:(0,Y.jsx)(on.Z,{noPadding:!0,children:w.map((function(n){var o=n.disabled,e=n.onClick,i=n.uuid;return(0,Y.jsx)(x.Z,{px:I.cd,py:1,children:(0,Y.jsx)(nn.Z,{block:!0,disabled:o,onClick:function(){e(),qn(null)},preventDefault:!0,sameColorAsText:!0,children:i})},i)}))})})})}}),[o,Co,c,Xn,s,le,Ao,G,L,q,qn,rn,so]);return(0,Y.jsxs)("div",{ref:On,style:{position:"relative"},children:[go&&(0,Y.jsxs)(x.Z,{my:3,px:I.cd,children:[(0,Y.jsxs)(x.Z,{mb:I.cd,children:[(0,Y.jsxs)(y.ZP,{children:["Select parent block(s) for ",(0,Y.jsx)(y.ZP,{color:(0,O.qn)(go.type,{blockColor:go.color,theme:gn}).accent,inline:!0,monospace:!0,children:go.uuid}),":"]}),(0,Y.jsx)(x.Z,{mt:1,children:mo.map((function(n,o){var e,i,t=n.uuid;return(0,Y.jsxs)(y.ZP,{color:(0,O.qn)(null===(e=So[t])||void 0===e?void 0:e.type,{blockColor:null===(i=So[t])||void 0===i?void 0:i.type,theme:gn}).accent,inline:!0,monospace:!0,children:[t,xo>=2&&o<=xo-2?(0,Y.jsx)(y.ZP,{inline:!0,children:",\xa0"}):null]},t)}))})]}),(0,Y.jsxs)(m.ZP,{alignItems:"center",children:[(0,Y.jsx)($.ZP,{compact:!0,inline:!0,loading:Zo,onClick:function(){return _o({block:Bn(Bn({},go),{},{upstream_blocks:mo.map((function(n){return n.uuid}))})})},uuid:"DependencyGraph/save_parents",children:"Save dependencies"}),(0,Y.jsx)(x.Z,{ml:1}),(0,Y.jsx)($.ZP,{compact:!0,inline:!0,noBackground:!0,onClick:function(){po([]),tn({upstreamBlocks:null})},uuid:"DependencyGraph/cancel_save_parents",children:"Cancel"})]})]}),(0,Y.jsxs)(yn.$4,{height:Go,onDoubleClick:function(){var n,o;return null===Dn||void 0===Dn||null===(n=Dn.current)||void 0===n||null===(o=n.fitCanvas)||void 0===o?void 0:o.call(n)},children:[(0,Y.jsx)(kn,{canvasRef:Dn,containerRef:On,zoomLevel:Rn}),(0,Y.jsx)(In,{arrow:null,disabled:h,edge:function(n){var o,e,i,l,u,d,c,s=So[null===n||void 0===n?void 0:n.source],v=[];s||(null===n||void 0===n||null===(u=n.id)||void 0===u||null===(d=u.replace(null===n||void 0===n?void 0:n.source,""))||void 0===d||null===(c=d.split(":"))||void 0===c||c.forEach((function(n){if((null===n||void 0===n?void 0:n.length)>=1&&"parent"!==n){var o=null===So||void 0===So?void 0:So[n];o&&v.push(o)}})),null!==v&&void 0!==v&&v.length&&(s=v[0]));var f,p,h,b=null===(o=s)||void 0===o?void 0:o.uuid,g=[];if(b in(Uo||{})){var k=null===Uo||void 0===Uo?void 0:Uo[b];null===k||void 0===k||k.map((function(o){var e=o.downstreamBlocks,i=o.upstreamBlocks;R((0,E.YC)((null===i||void 0===i?void 0:i.map((function(n){return n.uuid})))||[],(function(n){return n})))===(null===n||void 0===n?void 0:n.target)&&(g.push.apply(g,(0,t.Z)(e)),f=i)}))}if(null===g||void 0===g||!g.length)if(A(b)===(null===n||void 0===n?void 0:n.target)){var m,x;g.push.apply(g,(0,t.Z)(null===(m=s)||void 0===m||null===(x=m.downstream_blocks)||void 0===x?void 0:x.map((function(n){return null===So||void 0===So?void 0:So[n]}))))}else{var y,C,w=null===(y=s)||void 0===y||null===(C=y.downstream_blocks)||void 0===C?void 0:C.find((function(o){return M(b,o)===(null===n||void 0===n?void 0:n.sourcePort)||A(b)===n.target})),S=null===So||void 0===So?void 0:So[w];g.push(S)}null===g||void 0===g||g.forEach((function(n){if(!p&&!h&&n){var o=F({block:n,blockStatus:r,messages:P,noStatus:D,runningBlocks:z,runningBlocksMapping:Io});null!==o&&void 0!==o&&o.isInProgress&&(p=null===o||void 0===o?void 0:o.isInProgress),null!==o&&void 0!==o&&o.isQueued&&(h=null===o||void 0===o?void 0:o.isQueued)}}));var j,B=oe({id:b},s,{blocksWithSameDownstreamBlocks:f}),I=B.anotherBlockSelected,T=B.selected,_=(0,O.qn)(null===(e=s)||void 0===e?void 0:e.type,{blockColor:null===(i=s)||void 0===i?void 0:i.color,theme:gn}),Z=["edge",p?h?"activeSlow":"active":"inactive"],N=v.map((function(n){return n.uuid}));ao&&(((null===ao||void 0===ao?void 0:ao.uuid)===b||null!==N&&void 0!==N&&N.includes(null===ao||void 0===ao?void 0:ao.uuid)||null!==g&&void 0!==g&&null!==(j=g.map((function(n){return null===n||void 0===n?void 0:n.uuid})))&&void 0!==j&&j.includes(null===ao||void 0===ao?void 0:ao.uuid))&&Z.push("selected-twice"));return null!==n&&void 0!==n&&null!==(l=n.target)&&void 0!==l&&l.startsWith("parent")&&Z.push("group"),(0,Y.jsx)(Tn,Bn(Bn({},n),{},{className:Z.join(" "),onClick:a?function(n,o){Hn((function(e){var i;return(null===e||void 0===e||null===(i=e.edge)||void 0===i?void 0:i.id)===(null===o||void 0===o?void 0:o.id)?null:{block:s,edge:o,event:n}})),qn(null)}:null,style:{stroke:I&&!T?null===_||void 0===_?void 0:_.accentLight:null===_||void 0===_?void 0:_.accent,strokeWidth:yn.dg}}))},edges:Mo,fit:!0,forwardedRef:Dn,layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN"},maxHeight:j.Jo,maxWidth:j.Jo,maxZoom:1,minZoom:-.7,node:function(n){null===n||void 0===n||n.id;var o,e=(null===n||void 0===n||null===(o=n.properties)||void 0===o?void 0:o.data)||{},i=e.block,t=e.blocks,l=null===i||void 0===i?void 0:i.uuid,u=(0,O.qn)(null===i||void 0===i?void 0:i.type,{blockColor:null===i||void 0===i?void 0:i.color,theme:gn}),d=(null===io||void 0===io?void 0:io.id)===(null===n||void 0===n?void 0:n.id)||!(null===Gn||void 0===Gn||!Gn[l]),c=oe(n,i,{blocksWithSameDownstreamBlocks:t}),s=c.anotherBlockSelected,v=c.selected;return(0,Y.jsx)(En,Bn(Bn({},n),{},{dragType:"port",linkable:!0,port:(0,Y.jsx)(_n,{onDrag:function(){Hn(null),Fo(n)},onDragEnd:function(o,e,i){ne({event:o,node:n,port:i})},onDragStart:function(o,e,i){$o({event:o,node:n,port:i})},onEnter:function(o,e){Qo({event:o,node:n,port:e})},onLeave:function(o,e){Jo({event:o,node:n,port:e})},rx:d?10:0,ry:d?10:0,style:{fill:null===u||void 0===u?void 0:u.accentLight,stroke:s&&!v?null===u||void 0===u?void 0:u.accentLight:null===u||void 0===u?void 0:u.accent,strokeWidth:1}}),style:{fill:"transparent",stroke:"transparent",strokeWidth:0},children:function(n){var o,e=n.height,i=n.node,t=n.width,l=i.data,u=l.block,d=l.blocks,c=l.children,s=oe(i,u,{blocksWithSameDownstreamBlocks:d}),v=s.anotherBlockSelected,f=s.selected,p=F({block:u,blockStatus:r,messages:P,noStatus:D,runningBlocks:z,runningBlocksMapping:Io}),b=p.hasFailed,k=p.isInProgress,m=p.isQueued,x=p.isSuccessful;return o=(null===c||void 0===c?void 0:c.length)>=1?null===c||void 0===c?void 0:c.some((function(n){var o;return n&&(null===(o=F({block:n,blockStatus:r,messages:P,noStatus:D,runningBlocks:z,runningBlocksMapping:Io}))||void 0===o?void 0:o.isInProgress)})):k,(0,Y.jsx)("foreignObject",{height:e,onClick:function(n){return null===Wo||void 0===Wo?void 0:Wo(n,i)},onContextMenu:a?function(n){return Ko(n,i,{nodeHeight:e,nodeWidth:t})}:null,onMouseDown:g?function(n){return Xo(n,i,{nodeHeight:e,nodeWidth:t})}:null,onMouseEnter:function(n){return Yo(n,i,{nodeHeight:e,nodeWidth:t})},onMouseLeave:function(n){return zo(n,i,{nodeHeight:e,nodeWidth:t})},onMouseUp:g?function(n){return qo(n,i,{nodeHeight:e,nodeWidth:t})}:null,style:{},width:n.width,x:0,y:0,children:(0,Y.jsx)(K,{anotherBlockSelected:v,block:u,blocksWithSameDownstreamBlocks:d,callbackBlocks:null===Oo||void 0===Oo?void 0:Oo[null===u||void 0===u?void 0:u.uuid],conditionalBlocks:null===jo||void 0===jo?void 0:jo[null===u||void 0===u?void 0:u.uuid],disabled:(null===go||void 0===go?void 0:go.uuid)===u.uuid,downstreamBlocks:c,extensionBlocks:null===Bo||void 0===Bo?void 0:Bo[null===u||void 0===u?void 0:u.uuid],hasFailed:b,height:e,hideNoStatus:!0,hideStatus:h||D,isInProgress:o,isQueued:m,isSuccessful:x,pipeline:G,selected:f,selectedBlock:X},u.uuid)})}}))},nodes:Ho,onNodeLinkCheck:function(n,o,e){return!Mo.some((function(n){return n.from===o.id&&n.to===e.id}))},onZoomChange:function(n){null===un||void 0===un||un(n),Nn(n)},pannable:U,selections:fo,zoomable:fn})]}),te,re,ie]})}},85385:function(n,o,e){e.d(o,{Qq:function(){return p},Z7:function(){return h},cH:function(){return t},du:function(){return v},fp:function(){return s},j5:function(){return f},uM:function(){return a}});var i,t,l=e(82394),r=e(57653),u=e(82359),d=e(72473),c=e(86735),a="sideview",s=90;!function(n){n.ADDON_BLOCKS="addon_blocks",n.BLOCK_SETTINGS="block_settings",n.CALLBACKS="callbacks",n.CHARTS="charts",n.DATA="data",n.EXTENSIONS="power_ups",n.FILES="files",n.FILE_VERSIONS="file_versions",n.GRAPHS="graphs",n.INTERACTIONS="interactions",n.REPORTS="reports",n.SECRETS="secrets",n.SETTINGS="settings",n.TERMINAL="terminal",n.TREE="tree",n.VARIABLES="variables"}(t||(t={}));t.BLOCK_SETTINGS,t.CALLBACKS,t.CHARTS,t.DATA,t.EXTENSIONS,t.TREE;var v=[t.DATA];function f(n){var o,e,i,l=[{key:t.TREE,label:"Tree"},{buildLabel:function(n){var o=(n.pipeline||{}).widgets,e=void 0===o?[]:o;return(null===e||void 0===e?void 0:e.length)>=1?"Charts (".concat(e.length,")"):"Charts"},key:t.CHARTS},{buildLabel:function(n){var o=n.variables;return(null===o||void 0===o?void 0:o.length)>=1?"Variables (".concat(o.length,")"):"Variables"},key:t.VARIABLES},{buildLabel:function(n){var o=n.secrets;return(null===o||void 0===o?void 0:o.length)>=1?"Secrets (".concat(o.length,")"):"Secrets"},key:t.SECRETS}];return r.qL.PYSPARK!==(null===n||void 0===n||null===(o=n.pipeline)||void 0===o?void 0:o.type)&&l.push.apply(l,[{buildLabel:function(n){n.pipeline;return"Add-on blocks"},key:t.ADDON_BLOCKS},{buildLabel:function(n){var o=(n.pipeline||{}).extensions,e=void 0===o?{}:o,i=0;return Object.values(e).forEach((function(n){var o=n.blocks;i+=(null===o||void 0===o?void 0:o.length)||0})),i>=1?"Power ups (".concat(i,")"):"Power ups"},key:t.EXTENSIONS}]),l.push.apply(l,[{key:t.DATA,label:"Data"},{key:t.TERMINAL,label:"Terminal"},{key:t.BLOCK_SETTINGS,label:"Block settings"}]),null!==n&&void 0!==n&&null!==(e=n.project)&&void 0!==e&&null!==(i=e.features)&&void 0!==i&&i[u.d.INTERACTIONS]&&l.push({key:t.INTERACTIONS,label:"Interactions"}),l}function p(n){return(0,c.HK)(f(n),(function(n){return n.key}))}var h=(i={},(0,l.Z)(i,t.ADDON_BLOCKS,d.EJ),(0,l.Z)(i,t.BLOCK_SETTINGS,d.JG),(0,l.Z)(i,t.CALLBACKS,d.AQ),(0,l.Z)(i,t.CHARTS,d.GQ),(0,l.Z)(i,t.DATA,d.iA),(0,l.Z)(i,t.EXTENSIONS,d.Bf),(0,l.Z)(i,t.INTERACTIONS,d.yd),(0,l.Z)(i,t.SECRETS,d.Yo),(0,l.Z)(i,t.SETTINGS,d.Zr),(0,l.Z)(i,t.TERMINAL,d.oI),(0,l.Z)(i,t.TREE,d.mp),(0,l.Z)(i,t.VARIABLES,d.LO),i)},79757:function(n,o,e){var i=e(82394),t=e(26304),l=(e(82684),e(38626)),r=e(44897),u=e(42631),d=e(95363),c=e(70515),a=e(61896),s=e(28598),v=["children"];function f(n,o){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);o&&(i=i.filter((function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable}))),e.push.apply(e,i)}return e}function p(n){for(var o=1;o<arguments.length;o++){var e=null!=arguments[o]?arguments[o]:{};o%2?f(Object(e),!0).forEach((function(o){(0,i.Z)(n,o,e[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):f(Object(e)).forEach((function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(e,o))}))}return n}var h=l.default.p.withConfig({displayName:"Badge__BadgeStyle",componentId:"sc-tfqsp0-0"})(["border-radius:","px;display:inline;font-family:",";margin:0;white-space:nowrap;",";"," "," ",";",";"," "," "," "," "," "," "," ",""],u.BG,d.ry,a.iD,(function(n){return n.small&&"\n ".concat(a.HC,";\n ")}),(function(n){return n.xxsmall&&"\n font-size: ".concat(a.VK,"px;\n line-height: ").concat(a.VK,"px;\n ")}),(function(n){return!n.regular&&"\n padding: 2px 4px;\n "}),(function(n){return n.regular&&"\n padding: ".concat(1*c.iI,"px ").concat(1.25*c.iI,"px;\n ")}),(function(n){return n.noVerticalPadding&&"\n padding-bottom: 0;\n padding-top: 0;\n "}),(function(n){return!n.disabled&&!n.inverted&&"\n background-color: ".concat((n.theme||r.Z).background.row,";\n color: ").concat((n.theme||r.Z).content.default,";\n ")}),(function(n){return!n.disabled&&n.inverted&&"\n background-color: ".concat((n.theme||r.Z).background.dark,";\n color: ").concat((n.theme||r.Z).content.inverted,";\n ")}),(function(n){return n.cyan&&"\n background-color: ".concat((n.theme||r.Z).accent.cyan,";\n color: ").concat((n.theme||r.Z).monotone.black,";\n ")}),(function(n){return n.disabled&&"\n background-color: ".concat((n.theme||r.Z).feature.disabled,";\n color: ").concat((n.theme||r.Z).content.disabled,";\n ")}),(function(n){return n.color&&"\n background-color: ".concat(n.color," !important;\n color: ").concat((n.theme||r.Z).content.active,";\n ")}),(function(n){return n.quantifier&&"\n border-radius: 34px;\n line-height: 10px;\n padding: 4px 6px;\n "}),(function(n){return n.monospace&&"\n font-family: ".concat(d.Vp,";\n word-break: break-all;\n ")}));o.Z=function(n){var o=n.children,e=(0,t.Z)(n,v);return(0,s.jsx)(h,p(p({},e),{},{children:o}))}},65956:function(n,o,e){var i=e(38626),t=e(55485),l=e(38276),r=e(30160),u=e(44897),d=e(42631),c=e(47041),a=e(70515),s=e(28598),v=(0,i.css)(["padding:","px;padding-bottom:","px;padding-top:","px;"],2*a.iI,1.5*a.iI,1.5*a.iI),f=i.default.div.withConfig({displayName:"Panel__PanelStyle",componentId:"sc-1ct8cgl-0"})(["border-radius:","px;overflow:hidden;"," "," "," "," "," "," "," "," "," "," "," ",""],d.n_,(function(n){return n.fullWidth&&"\n width: 100%;\n "}),(function(n){return!n.borderless&&"\n border: 1px solid ".concat((n.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.success&&"\n background-color: ".concat((n.theme.background||u.Z.background).successLight,";\n ")}),(function(n){return n.success&&!n.borderless&&"\n border: 1px solid ".concat((n.theme.background||u.Z.background).success,";\n ")}),(function(n){return!n.dark&&!n.success&&"\n background-color: ".concat((n.theme.background||u.Z.background).panel,";\n ")}),(function(n){return n.dark&&"\n background-color: ".concat((n.theme.background||u.Z.background).content,";\n ")}),(function(n){return!n.fullHeight&&"\n height: fit-content;\n "}),(function(n){return n.maxHeight&&"\n max-height: ".concat(n.maxHeight,";\n ")}),(function(n){return n.maxWidth&&"\n max-width: ".concat(n.maxWidth,"px;\n ")}),(function(n){return n.minWidth&&"\n min-width: ".concat(n.minWidth,"px;\n\n @media (max-width: ").concat(n.minWidth,"px) {\n min-width: 0;\n }\n ")}),(function(n){return n.borderless&&"\n border: none;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),p=i.default.div.withConfig({displayName:"Panel__HeaderStyle",componentId:"sc-1ct8cgl-1"})(["border-top-left-radius:","px;border-top-right-radius:","px;"," "," "," ",""],d.n_,d.n_,(function(n){return"\n background-color: ".concat((n.theme.background||u.Z.background).chartBlock,";\n border-bottom: 1px solid ").concat((n.theme.interactive||u.Z.interactive).defaultBorder,";\n ")}),(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),v,(function(n){return n.headerPaddingVertical&&"\n padding-bottom: ".concat(n.headerPaddingVertical,"px;\n padding-top: ").concat(n.headerPaddingVertical,"px;\n ")})),h=i.default.div.withConfig({displayName:"Panel__ContentStyle",componentId:"sc-1ct8cgl-2"})(["overflow-y:auto;padding:","px;height:100%;"," "," "," "," ",""],1.75*a.iI,c.w5,(function(n){return n.height&&"\n height: ".concat(n.height,"px;\n ")}),(function(n){return n.maxHeight&&"\n max-height: calc(".concat(n.maxHeight," - ").concat(15*a.iI,"px);\n ")}),(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.overflowVisible&&"\n overflow: visible;\n "})),b=i.default.div.withConfig({displayName:"Panel__FooterStyle",componentId:"sc-1ct8cgl-3"})(["border-style:",";border-top-width:","px;padding:","px;"],d.M8,d.YF,1.75*a.iI);o.Z=function(n){var o=n.borderless,e=n.children,i=n.containerRef,u=n.contentContainerRef,d=n.dark,c=n.footer,a=n.fullHeight,v=void 0===a||a,g=n.fullWidth,k=void 0===g||g,m=n.header,x=n.headerHeight,y=n.headerIcon,C=n.headerPaddingVertical,w=n.headerTitle,S=n.maxHeight,O=n.maxWidth,j=n.minWidth,B=n.noPadding,I=n.overflowVisible,E=n.subtitle,T=n.success;return(0,s.jsxs)(f,{borderless:o,dark:d,fullHeight:v,fullWidth:k,maxHeight:S,maxWidth:O,minWidth:j,overflowVisible:I,ref:i,success:T,children:[(m||w)&&(0,s.jsxs)(p,{headerPaddingVertical:C,height:x,children:[m&&m,w&&(0,s.jsx)(t.ZP,{alignItems:"center",justifyContent:"space-between",children:(0,s.jsxs)(t.ZP,{alignItems:"center",children:[y&&y,(0,s.jsx)(l.Z,{ml:y?1:0,children:(0,s.jsx)(r.ZP,{bold:!0,default:!0,children:w})})]})})]}),(0,s.jsxs)(h,{maxHeight:S,noPadding:B,overflowVisible:I,ref:u,children:[E&&"string"===typeof E&&(0,s.jsx)(l.Z,{mb:2,children:(0,s.jsx)(r.ZP,{default:!0,children:E})}),E&&"string"!==typeof E&&E,e]}),c&&(0,s.jsx)(b,{children:c})]})}},90299:function(n,o,e){e.d(o,{Z:function(){return m}});var i=e(82684),t=e(71180),l=e(55485),r=e(64888),u=e(38276),d=e(30160),c=e(8059),a=e(38626),s=e(44897),v=e(70515),f=e(47041),p=a.default.div.withConfig({displayName:"indexstyle__TabsContainerStyle",componentId:"sc-segf7l-0"})(["padding-left:","px;padding-right:","px;"," "," ",""],v.cd*v.iI,v.cd*v.iI,(function(n){return n.noPadding&&"\n padding: 0;\n "}),(function(n){return n.allowScroll&&"\n overflow: auto;\n "}),f.w5),h=a.default.div.withConfig({displayName:"indexstyle__SelectedUnderlineStyle",componentId:"sc-segf7l-1"})(["border-radius:6px;height:","px;"," "," ",""],2,(function(n){return!n.selected&&"\n background-color: transparent;\n "}),(function(n){return n.selected&&!n.backgroundColor&&"\n background-color: ".concat((n.theme||s.Z).accent.blue,";\n ")}),(function(n){return n.selected&&n.backgroundColor&&"\n background-color: ".concat(n.backgroundColor,";\n ")})),b=e(95924),g=e(28598);function k(n,o){var e=n.allowScroll,a=n.compact,s=n.contained,f=n.noPadding,k=n.onClickTab,m=n.regularSizeText,x=n.selectedTabUUID,y=n.small,C=n.tabs,w=n.underlineColor,S=n.underlineStyle,O=n.uppercase,j=void 0===O||O,B=(0,i.useMemo)((function(){var n=C.length,o=[];return C.forEach((function(e,i){var s=e.Icon,f=e.IconSelected,p=e.label,C=e.uuid,O=C===x,B=O&&f||s,I=p?p():C,E=(0,g.jsxs)(l.ZP,{alignItems:"center",children:[B&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(B,{default:!O,size:2*v.iI}),(0,g.jsx)(u.Z,{mr:1})]}),(0,g.jsx)(d.ZP,{bold:!0,default:!O,noWrapping:!0,small:!m,uppercase:j,children:I})]});i>=1&&n>=2&&o.push((0,g.jsx)("div",{style:{marginLeft:(m?2:1.5)*v.iI}},"spacing-".concat(C))),O&&!S?o.push((0,g.jsx)(r.Z,{backgroundGradient:c.yr,backgroundPanel:!0,borderLess:!0,borderWidth:2,compact:a||y,onClick:function(n){(0,b.j)(n),k(e)},paddingUnitsHorizontal:1.75,paddingUnitsVertical:1.25,small:y,children:E},C)):o.push((0,g.jsxs)(l.ZP,{flexDirection:"column",style:{paddingLeft:2,paddingRight:2,paddingBottom:S?0:2,paddingTop:S?0:2},children:[(0,g.jsxs)(t.ZP,{borderLess:!0,compact:a||y,default:!0,noBackground:S,noPadding:S,onClick:function(n){(0,b.j)(n),k(e)},outline:!S,small:y,children:[!S&&E,S&&(0,g.jsx)("div",{style:{paddingBottom:(a||y?v.iI/2:v.iI)+2,paddingTop:(a||y?v.iI/2:v.iI)+2+2},children:E})]}),S&&(0,g.jsx)(h,{backgroundColor:w,selected:O})]},"button-tab-".concat(C)))})),o}),[a,k,x,y,C,S]),I=(0,g.jsx)(l.ZP,{alignItems:"center",children:B});return s?I:(0,g.jsx)(p,{allowScroll:e,noPadding:f,ref:o,children:I})}var m=i.forwardRef(k)},44375:function(n,o,e){e.d(o,{$1:function(){return l},Dy:function(){return t},IU:function(){return r}});var i=e(17717),t="--full-refresh";function l(n,o){var e,t=null===o||void 0===o?void 0:o.fullPath,l=null===n||void 0===n||null===(e=n.configuration)||void 0===e?void 0:e.file_path;if(t)return null===n||void 0===n?void 0:n.uuid;if(l){var r=l.split(i.sep),u=r[r.length-1].split(".");return u.pop(),u.join(".")}}function r(n){var o,e=null===n||void 0===n||null===(o=n.configuration)||void 0===o?void 0:o.file_path;if(e){var t=e.split(i.sep),l=t[0],r=t[t.length-1].split(".");return r.pop(),{directory:t.slice(1,t.length-1).join(i.sep),filePath:e,name:r.join("."),project:l}}return{filePath:e}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5729],{15729:function(o){o.exports=JSON.parse('{"base":"vs-dark","inherit":true,"rules":[{"background":"222C28","token":""},{"foreground":"666c68","background":"151c19","token":"comment"},{"foreground":"c23b00","token":"storage"},{"foreground":"c23b00","token":"support.type"},{"foreground":"ffffff","background":"151c19","token":"string.unquoted.embedded"},{"foreground":"ffffff","background":"151c19","token":"text source"},{"foreground":"ffffff","background":"151c19","token":"string.unquoted"},{"foreground":"e9470000","background":"1a0700","token":"constant.character.escaped"},{"foreground":"e9470000","background":"1a0700","token":"string source - string.unquoted.embedded"},{"foreground":"e9470000","background":"1a0700","token":"string string source"},{"foreground":"c23800","background":"1a0700","token":"string - string source"},{"foreground":"c23800","background":"1a0700","token":"string source string"},{"foreground":"c23800","background":"1a0700","token":"meta.scope.heredoc"},{"foreground":"e98800","token":"constant.numeric"},{"foreground":"648bd2","token":"variable.language"},{"foreground":"648bd2","token":"variable.other"},{"foreground":"e98800","token":"constant"},{"foreground":"a8b3ab","background":"161d1a","token":"other.preprocessor"},{"foreground":"a8b3ab","background":"161d1a","token":"entity.name.preprocessor"},{"foreground":"a8b3ab","token":"entity.name.function"},{"foreground":"a8b3ab","token":"keyword.operator"},{"foreground":"a8b3ab","token":"keyword.other.name-of-parameter"},{"foreground":"9a2f00","token":"entity.name.class"},{"foreground":"648bd2","token":"variable.parameter"},{"foreground":"666c68","token":"storage.type.method"},{"foreground":"a39e64","token":"keyword"},{"foreground":"a39e64","token":"storage.type.function.php"},{"foreground":"ffffff","background":"990000ad","token":"invalid"},{"foreground":"000000","background":"ffd0d0","token":"invalid.trailing-whitespace"},{"foreground":"588e60","token":"support.function"},{"foreground":"5778b6","token":"support.class"},{"foreground":"5778b6","token":"support.type"},{"foreground":"5778b6","token":"entity.name"},{"foreground":"c87500","token":"support.constant"},{"foreground":"5879b7","token":"support.other.variable"},{"foreground":"68685b","token":"declaration.xml-processing"},{"foreground":"888888","token":"declaration.doctype"},{"foreground":"888888","token":"declaration.doctype.DTD"},{"foreground":"a65eff","token":"declaration.tag"},{"foreground":"a65eff","token":"entity.name.tag"},{"foreground":"909993","token":"entity.other.attribute-name"},{"foreground":"90999380","token":"punctuation"},{"foreground":"7642b7","token":"entity.other.inherited-class"},{"foreground":"ffffff","background":"00000059","token":"meta.scope.changed-files.svn"},{"foreground":"ffffff","background":"00000059","token":"markup.inserted.svn"},{"foreground":"ffffff","background":"00000059","token":"markup.changed.svn"},{"foreground":"ffffff","background":"00000059","token":"markup.deleted.svn"},{"background":"78807b0a","token":"meta.section"},{"background":"78807b0a","token":"meta.section meta.section"},{"background":"78807b0a","token":"meta.section meta.section meta.section"}],"colors":{"editor.foreground":"#FFFFFF","editor.background":"#222C28","editor.selectionBackground":"#91999466","editor.lineHighlightBackground":"#0C0D0C40","editorCursor.foreground":"#FFFFFF","editorWhitespace.foreground":"#666C6880"}}')}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5189],{15729:function(o){o.exports=JSON.parse('{"base":"vs-dark","inherit":true,"rules":[{"background":"222C28","token":""},{"foreground":"666c68","background":"151c19","token":"comment"},{"foreground":"c23b00","token":"storage"},{"foreground":"c23b00","token":"support.type"},{"foreground":"ffffff","background":"151c19","token":"string.unquoted.embedded"},{"foreground":"ffffff","background":"151c19","token":"text source"},{"foreground":"ffffff","background":"151c19","token":"string.unquoted"},{"foreground":"e9470000","background":"1a0700","token":"constant.character.escaped"},{"foreground":"e9470000","background":"1a0700","token":"string source - string.unquoted.embedded"},{"foreground":"e9470000","background":"1a0700","token":"string string source"},{"foreground":"c23800","background":"1a0700","token":"string - string source"},{"foreground":"c23800","background":"1a0700","token":"string source string"},{"foreground":"c23800","background":"1a0700","token":"meta.scope.heredoc"},{"foreground":"e98800","token":"constant.numeric"},{"foreground":"648bd2","token":"variable.language"},{"foreground":"648bd2","token":"variable.other"},{"foreground":"e98800","token":"constant"},{"foreground":"a8b3ab","background":"161d1a","token":"other.preprocessor"},{"foreground":"a8b3ab","background":"161d1a","token":"entity.name.preprocessor"},{"foreground":"a8b3ab","token":"entity.name.function"},{"foreground":"a8b3ab","token":"keyword.operator"},{"foreground":"a8b3ab","token":"keyword.other.name-of-parameter"},{"foreground":"9a2f00","token":"entity.name.class"},{"foreground":"648bd2","token":"variable.parameter"},{"foreground":"666c68","token":"storage.type.method"},{"foreground":"a39e64","token":"keyword"},{"foreground":"a39e64","token":"storage.type.function.php"},{"foreground":"ffffff","background":"990000ad","token":"invalid"},{"foreground":"000000","background":"ffd0d0","token":"invalid.trailing-whitespace"},{"foreground":"588e60","token":"support.function"},{"foreground":"5778b6","token":"support.class"},{"foreground":"5778b6","token":"support.type"},{"foreground":"5778b6","token":"entity.name"},{"foreground":"c87500","token":"support.constant"},{"foreground":"5879b7","token":"support.other.variable"},{"foreground":"68685b","token":"declaration.xml-processing"},{"foreground":"888888","token":"declaration.doctype"},{"foreground":"888888","token":"declaration.doctype.DTD"},{"foreground":"a65eff","token":"declaration.tag"},{"foreground":"a65eff","token":"entity.name.tag"},{"foreground":"909993","token":"entity.other.attribute-name"},{"foreground":"90999380","token":"punctuation"},{"foreground":"7642b7","token":"entity.other.inherited-class"},{"foreground":"ffffff","background":"00000059","token":"meta.scope.changed-files.svn"},{"foreground":"ffffff","background":"00000059","token":"markup.inserted.svn"},{"foreground":"ffffff","background":"00000059","token":"markup.changed.svn"},{"foreground":"ffffff","background":"00000059","token":"markup.deleted.svn"},{"background":"78807b0a","token":"meta.section"},{"background":"78807b0a","token":"meta.section meta.section"},{"background":"78807b0a","token":"meta.section meta.section meta.section"}],"colors":{"editor.foreground":"#FFFFFF","editor.background":"#222C28","editor.selectionBackground":"#91999466","editor.lineHighlightBackground":"#0C0D0C40","editorCursor.foreground":"#FFFFFF","editorWhitespace.foreground":"#666C6880"}}')}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5457],{94629:function(e,n,r){r.d(n,{Z:function(){return T}});var t=r(82394),i=r(21831),o=r(82684),u=r(50724),c=r(82555),s=r(97618),l=r(70613),a=r(31557),d=r(68899),f=r(28598);function p(e,n){var r=e.children,t=e.noPadding;return(0,f.jsx)(d.HS,{noPadding:t,ref:n,children:r})}var b=o.forwardRef(p),h=r(62547),O=r(82571),g=r(98464),P=r(77417),S=r(46684),I=r(70515),v=r(53808),m=r(19183);function y(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(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?y(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function j(e,n){e.addProjectBreadcrumbToCustomBreadcrumbs;var r=e.after,t=e.afterHeader,p=e.afterHidden,y=e.afterWidth,j=e.afterWidthOverride,T=e.appendBreadcrumbs,N=e.before,k=e.beforeWidth,R=e.breadcrumbs,A=e.children,M=e.contained,Z=e.errors,_=e.headerMenuItems,w=e.headerOffset,C=e.hideAfterCompletely,x=e.mainContainerHeader,H=e.navigationItems,G=e.setAfterHidden,D=e.setErrors,Y=e.subheaderChildren,L=e.subheaderNoPadding,B=e.title,U=e.uuid,K=(0,m.i)().width,W="dashboard_after_width_".concat(U),F="dashboard_before_width_".concat(U),q=(0,o.useRef)(null),z=(0,o.useState)(j?y:(0,v.U2)(W,y)),V=z[0],J=z[1],Q=(0,o.useState)(!1),$=Q[0],X=Q[1],ee=(0,o.useState)(N?Math.max((0,v.U2)(F,k),13*I.iI):null),ne=ee[0],re=ee[1],te=(0,o.useState)(!1),ie=te[0],oe=te[1],ue=(0,o.useState)(null)[1],ce=(0,P.Z)().project,se=[];R&&se.push.apply(se,(0,i.Z)(R)),null!==R&&void 0!==R&&R.length&&!T||!ce||null!==R&&void 0!==R&&R.length||se.unshift({bold:!T,label:function(){return B}}),(0,o.useEffect)((function(){null===q||void 0===q||!q.current||$||ie||null===ue||void 0===ue||ue(q.current.getBoundingClientRect().width)}),[$,V,ie,ne,q,ue,K]),(0,o.useEffect)((function(){$||(0,v.t8)(W,V)}),[p,$,V,W]),(0,o.useEffect)((function(){ie||(0,v.t8)(F,ne)}),[ie,ne,F]);var le=(0,g.Z)(y);return(0,o.useEffect)((function(){j&&le!==y&&J(y)}),[j,y,le]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(l.Z,{title:B}),(0,f.jsx)(a.Z,{breadcrumbs:se,menuItems:_}),(0,f.jsxs)(d.Nk,{ref:n,children:[0!==(null===H||void 0===H?void 0:H.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(O.Z,{navigationItems:H,showMore:!0})}),(0,f.jsx)(s.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(h.Z,{after:r,afterHeader:t,afterHeightOffset:S.Mz,afterHidden:p,afterMousedownActive:$,afterWidth:V,before:N,beforeHeightOffset:S.Mz,beforeMousedownActive:ie,beforeWidth:d.k1+(N?ne:0),contained:M,headerOffset:w,hideAfterCompletely:!G||C,leftOffset:N?d.k1:null,mainContainerHeader:x,mainContainerRef:q,setAfterHidden:G,setAfterMousedownActive:X,setAfterWidth:J,setBeforeMousedownActive:oe,setBeforeWidth:re,children:[Y&&(0,f.jsx)(b,{noPadding:L,children:Y}),A]})})]}),Z&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===D||void 0===D?void 0:D(null)},children:(0,f.jsx)(c.Z,E(E({},Z),{},{onClose:function(){return null===D||void 0===D?void 0:D(null)}}))})]})}var T=o.forwardRef(j)},28795:function(e,n,r){var t;r.d(n,{B:function(){return i},M:function(){return t}}),function(e){e.BACKFILLS="backfills",e.BLOCK_RUNS="block_runs",e.DASHBOARD="dashboard",e.EDIT="edit",e.MONITOR="monitor",e.PIPELINE_LOGS="pipeline_logs",e.PIPELINE_RUNS="pipeline_runs",e.RUNS="runs",e.SETTINGS="settings",e.SYNCS="syncs",e.TRIGGERS="triggers"}(t||(t={}));var i="cancel_all_running_pipeline_runs"},75457:function(e,n,r){r.d(n,{Z:function(){return k}});var t=r(82394),i=r(21831),o=r(82684),u=r(34376),c=r(50724),s=r(94629),l=r(15338),a=r(82555),d=r(55485),f=r(85854),p=r(38276),b=r(35686),h=r(38626),O=r(44897),g=r(42631),P=r(70515),S=h.default.div.withConfig({displayName:"indexstyle__BannerStyle",componentId:"sc-1te3pmf-0"})(["border-radius:","px;padding:","px;"," "," ",""],g.n_,3*P.iI,(function(e){return"\n box-shadow: ".concat((e.theme.shadow||O.Z.shadow).small,";\n ")}),(function(e){return e.background&&"\n background: ".concat(e.background,";\n ")}),(function(e){return e.backgroundImage&&'\n background-image: url("'.concat(e.backgroundImage,'");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n ')})),I=r(46684),v=r(85010),m=r(72619),y=r(19183),E=r(28598);function j(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 T(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?j(Object(r),!0).forEach((function(n){(0,t.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}function N(e,n){var r=e.after,t=e.afterHidden,h=e.afterWidth,O=e.before,g=e.beforeWidth,j=e.breadcrumbs,N=e.buildSidekick,k=e.children,R=e.errors,A=e.headline,M=e.pageName,Z=e.pipeline,_=e.setErrors,w=e.subheader,C=e.subheaderBackground,x=e.subheaderBackgroundImage,H=e.subheaderButton,G=e.subheaderNoPadding,D=e.subheaderText,Y=e.title,L=e.uuid,B=(0,y.i)().height,U=(0,u.useRouter)().query.pipeline,K=null===Z||void 0===Z?void 0:Z.uuid,W=b.ZP.pipelines.detail(K,{includes_outputs:!1},{revalidateOnFocus:!1}).data,F=null===W||void 0===W?void 0:W.pipeline;(0,o.useEffect)((function(){(0,m.bB)(W,_)}),[W,_]);var q=(0,o.useMemo)((function(){return r||(N?N({height:B,heightOffset:I.Mz,pipeline:F}):null)}),[r,N,B,F]),z=h||(q?50*P.iI:null),V=(0,o.useMemo)((function(){var e=[];return F?(e.push.apply(e,[{label:function(){return"Pipelines"},linkProps:{href:"/pipelines"}}]),j?(e.push({label:function(){return F.uuid},linkProps:{as:"/pipelines/".concat(K,"/triggers"),href:"/pipelines/[pipeline]/triggers"}}),e.push.apply(e,(0,i.Z)(j)),e[e.length-1].bold=!0):e.push({bold:!0,label:function(){return F.name}})):null!==W&&void 0!==W&&W.error&&e.push({bold:!0,danger:!0,label:function(){return"Error loading pipeline"}}),e}),[j,null===W||void 0===W?void 0:W.error,F,K]);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(s.Z,{after:q,afterHidden:t,afterWidth:z,before:O,beforeWidth:g,breadcrumbs:V,navigationItems:(0,v.H)(M,F,U),ref:n,subheaderChildren:"undefined"!==typeof w&&w,subheaderNoPadding:G,title:F?Y?Y(F):F.name:null,uuid:L,children:[(H||D)&&(0,E.jsx)(p.Z,{mb:P.Mq,mt:P.cd,mx:P.cd,children:(0,E.jsx)(S,{background:C,backgroundImage:x,children:(0,E.jsxs)(d.ZP,{alignItems:"center",children:[H,D&&(0,E.jsx)(p.Z,{ml:3}),D]})})}),A&&(0,E.jsx)(p.Z,{p:P.cd,children:(0,E.jsxs)(p.Z,{mt:P.cd,px:P.cd,children:[(0,E.jsx)(f.Z,{level:5,children:A}),(0,E.jsx)(l.Z,{light:!0,mt:P.cd,short:!0})]})}),k]}),R&&(0,E.jsx)(c.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===_||void 0===_?void 0:_(null)},children:(0,E.jsx)(a.Z,T(T({},R),{},{onClose:function(){return null===_||void 0===_?void 0:_(null)}}))})]})}var k=o.forwardRef(N)},85010:function(e,n,r){r.d(n,{H:function(){return c}});var t=r(57653),i=r(72473),o=r(28795),u=r(50178);function c(e,n,r){var c=(n||{}).uuid||r,s=[{Icon:i.Bf,id:o.M.TRIGGERS,isSelected:function(){return o.M.TRIGGERS===e},label:function(){return"Triggers"},linkProps:{as:"/pipelines/".concat(c,"/triggers"),href:"/pipelines/[pipeline]/triggers"}},{Icon:i.Pf,id:o.M.RUNS,isSelected:function(){return o.M.RUNS===e},label:function(){return"Runs"},linkProps:{as:"/pipelines/".concat(c,"/runs"),href:"/pipelines/[pipeline]/runs"}},{Icon:i.UL,id:o.M.PIPELINE_LOGS,isSelected:function(){return o.M.PIPELINE_LOGS===e},label:function(){return"Logs"},linkProps:{as:"/pipelines/".concat(c,"/logs"),href:"/pipelines/[pipeline]/logs"}},{Icon:i.ug,id:o.M.MONITOR,isSelected:function(){return o.M.MONITOR===e},label:function(){return"Monitor"},linkProps:{as:"/pipelines/".concat(c,"/monitors"),href:"/pipelines/[pipeline]/monitors"}}];return t.qL.PYTHON===(null===n||void 0===n?void 0:n.type)&&s.splice(2,0,{Icon:i.dE,id:o.M.BACKFILLS,isSelected:function(){return o.M.BACKFILLS===e},label:function(){return"Backfills"},linkProps:{as:"/pipelines/".concat(c,"/backfills"),href:"/pipelines/[pipeline]/backfills"}}),t.qL.INTEGRATION===(null===n||void 0===n?void 0:n.type)&&s.unshift({Icon:i.Nt,id:o.M.SYNCS,isSelected:function(){return o.M.SYNCS===e},label:function(){return"Syncs"},linkProps:{as:"/pipelines/".concat(c,"/syncs"),href:"/pipelines/[pipeline]/syncs"}}),(0,u.Ct)()||(s.unshift({Icon:i.EK,disabled:!c,id:o.M.EDIT,isSelected:function(){return o.M.EDIT===e},label:function(){return"Edit pipeline"},linkProps:{as:"/pipelines/".concat(c,"/edit"),href:"/pipelines/[pipeline]/edit"}}),s.push({Icon:i.JG,id:o.M.SETTINGS,isSelected:function(){return o.M.SETTINGS===e},label:function(){return"Pipeline settings"},linkProps:{as:"/pipelines/".concat(c,"/settings"),href:"/pipelines/[pipeline]/settings"}})),s.unshift({Icon:i.G6,id:o.M.DASHBOARD,isSelected:function(){return o.M.DASHBOARD===e},label:function(){return"Dashboard"},linkProps:{as:"/pipelines/".concat(c,"/dashboard"),href:"/pipelines/[pipeline]/dashboard"}}),s}},72098:function(e,n,r){var t;r.d(n,{U:function(){return t}}),function(e){e.PYSPARK="pysparkkernel",e.PYTHON3="python3"}(t||(t={}))},57653:function(e,n,r){r.d(n,{$1:function(){return h},G7:function(){return P},LM:function(){return S},Mj:function(){return I},QK:function(){return b},RH:function(){return g},a_:function(){return m},fj:function(){return y},kA:function(){return v},qL:function(){return c},r0:function(){return O}});var t,i,o,u,c,s=r(75582),l=r(82394),a=r(72473),d=r(72098);function f(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 p(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?f(Object(r),!0).forEach((function(n){(0,l.Z)(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))}))}return e}!function(e){e.INTEGRATION="integration",e.PYTHON="python",e.PYSPARK="pyspark",e.STREAMING="streaming"}(c||(c={}));var b,h,O,g=(t={},(0,l.Z)(t,c.INTEGRATION,"Integration"),(0,l.Z)(t,c.PYTHON,"Python"),(0,l.Z)(t,c.PYSPARK,"PySpark"),(0,l.Z)(t,c.STREAMING,"Streaming"),t),P=(i={},(0,l.Z)(i,c.INTEGRATION,"Integration"),(0,l.Z)(i,c.PYTHON,"Standard"),(0,l.Z)(i,c.PYSPARK,"PySpark"),(0,l.Z)(i,c.STREAMING,"Streaming"),i),S="all",I=(c.PYTHON,c.INTEGRATION,c.STREAMING,o={},(0,l.Z)(o,S,a.ie),(0,l.Z)(o,c.INTEGRATION,a.YC),(0,l.Z)(o,c.PYTHON,a.El),(0,l.Z)(o,c.STREAMING,a.dB),o);!function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.NO_SCHEDULES="no_schedules",e.RETRY="retry",e.RETRY_INCOMPLETE_BLOCK_RUNS="retry_incomplete_block_runs"}(b||(b={})),function(e){e.GROUP="group_by",e.HISTORY_DAYS="from_history_days",e.NO_TAGS="no_tags",e.SEARCH="search",e.STATUS="status[]",e.TAG="tag[]",e.TYPE="type[]"}(h||(h={})),function(e){e.STATUS="status",e.TAG="tag",e.TYPE="type"}(O||(O={}));var v=[b.ACTIVE,b.INACTIVE,b.NO_SCHEDULES],m=(u={},(0,l.Z)(u,c.PYTHON,d.U.PYTHON3),(0,l.Z)(u,c.PYSPARK,d.U.PYSPARK),u),y=Object.entries(m).reduce((function(e,n){var r=(0,s.Z)(n,2),t=r[0],i=r[1];return p(p({},e),{},(0,l.Z)({},i,t))}),{})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5533],{29120:function(e,n,o){o.d(n,{Z:function(){return b}});var t,i,r=o(82684),l=o(39867),u=o(89706),c=o(44425),d=o(32929),a=o(72473),s=o(82394),f=(t={},(0,s.Z)(t,u.Lu.CSV,a.iA),(0,s.Z)(t,u.Lu.JSON,a.EK),(0,s.Z)(t,u.Lu.MD,a.$B),(0,s.Z)(t,u.Lu.PY,a.Bf),(0,s.Z)(t,u.Lu.R,a.u$),(0,s.Z)(t,u.Lu.SH,a.oI),(0,s.Z)(t,u.Lu.SQL,a.vo),(0,s.Z)(t,u.Lu.TXT,a.KJ),(0,s.Z)(t,u.Lu.YAML,a.aV),(0,s.Z)(t,u.Lu.YML,a.aV),t),v=(i={},(0,s.Z)(i,u.Lu.CSV,"#C7CDDA"),(0,s.Z)(i,u.Lu.JSON,"#6B50D7"),(0,s.Z)(i,u.Lu.MD,"#9B6CA7"),(0,s.Z)(i,u.Lu.PY,"#FFE873"),(0,s.Z)(i,u.Lu.R,"#FF144D"),(0,s.Z)(i,u.Lu.SH,"#CBFE00"),(0,s.Z)(i,u.Lu.SQL,"#00758F"),(0,s.Z)(i,u.Lu.TXT,"#C7CDDA"),(0,s.Z)(i,u.Lu.YAML,"#95ECE2"),(0,s.Z)(i,u.Lu.YML,"#95ECE2"),i),p=o(55283),h=o(53005),m=o(81728);function b(e){var n=e.allowEmptyFolders,o=e.children,t=e.disabled,i=e.file,s=e.filePath,b=e.isInPipelinesFolder,g=e.isFileDisabled,C=e.isNotFolder,j=e.level,y=e.name,w=e.theme,k=e.useRootFolder,x=e.uuid,F=(0,r.useMemo)((function(){return s||(k?(0,h.a9)(i):(0,h.jN)(i))}),[i,s,k,,]),Z=(0,r.useMemo)((function(){return!!o&&!C}),[o,C]),D=(0,r.useMemo)((function(){var e,n,o;return null===x||void 0===x||null===(e=x.split)||void 0===e||null===(n=e.call(x,"/"))||void 0===n||null===(o=n.find)||void 0===o?void 0:o.call(n,(function(e){return(0,m.C5)(e)in c.GJ}))}),[x]),E=(0,r.useMemo)((function(){return D?(0,m.C5)(D):null}),[D]),O=(0,r.useMemo)((function(){return Z&&D&&D===y}),[D,Z,y]),P=(0,r.useMemo)((function(){return D&&!Z&&(0,h.y)(y)&&(0,h.o$)(y,E)}),[E,D,Z,y]),_=(0,r.useMemo)((function(){return D?(0,p.qn)(E,{theme:w}).accent:null}),[E,D]),L=y===u.oy,I=(0,r.useMemo)((function(){return g?g(F,o):t||b&&"__init__.py"===y||D&&"__init__.py"===y}),[o,t,,F,D,g,b,y]),S=(0,r.useMemo)((function(){var e,o=a.iU;if(!Z&&C)o=a.mH;else if(L)o=a.vd;else if(y===u.PF)o=a.GQ;else if(Z)o=O&&(null===d.iK||void 0===d.iK?void 0:d.iK[E])||a.Bu;else if(!y&&n)o=a.mH;else if(b&&!Z&&"metadata.yaml"===y)o=a.B_;else if(null!==y&&void 0!==y&&y.includes(".log"))o=a.UL;else if(!Z){var t=(0,h.mD)(y);t&&t in f&&(o=f[t],e=v[t])}return{Icon:o,iconColor:e}}),[n,E,O,Z,b,C,j,y]),R=S.Icon,N=S.iconColor;return{BlockIcon:(0,r.useMemo)((function(){var e=l.Z;return c.tf.CHART===E&&(e=a.GQ),e}),[E]),Icon:R,blockType:E,color:_,disabled:I,filePathToUse:F,folderNameForBlock:D,iconColor:N,isBlockFile:P,isFirstParentFolderForBlock:O,isFolder:Z,isPipelineFolder:L}}},46978:function(e,n,o){o.d(n,{Cl:function(){return u},Nk:function(){return c},ZG:function(){return l}});var t=o(38626),i=o(44897),r=o(70515),l=1.5*r.iI,u=1*l+r.iI/2,c=t.default.div.withConfig({displayName:"indexstyle__ContainerStyle",componentId:"sc-uvd91-0"})([".row:hover{","}"],(function(e){return"\n background-color: ".concat((e.theme.interactive||i.Z.interactive).hoverBackground,";\n ")}))},85533:function(e,n,o){o.d(n,{Z:function(){return je}});var t=o(82394),i=o(75582),r=o(82684),l=o(38626),u=o(69864),c=o(44425),d=o(70374),a=o(78050),s=o(89706),f=o(97618),v=o(30160),p=o(29120),h=o(72473),m="CUSTOM_EVENT_NAME_FOLDER_EXPAND",b=o(46978),g=o(70515),C=o(85385),j=o(53808),y=o(53005),w=o(86735),k=o(28598);function x(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function F(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?x(Object(o),!0).forEach((function(n){(0,t.Z)(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):x(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var Z="default_repo",D=l.default.div.withConfig({displayName:"Folder__ChildrenStyle",componentId:"sc-1gsjts-0"})([".expanded_children{display:block;}.collapsed_children{display:none;}"]),E=l.default.div.withConfig({displayName:"Folder__ChevronStyle",componentId:"sc-1gsjts-1"})([".expanded{.down{display:block;position:relative;}.right{display:none;position:absolute;}}.collapsed{.down{display:none;position:absolute;}.right{display:block;position:relative;}}"]);function O(e){var n=e.children,o=e.idleTimeout,t=(0,r.useState)(!1),i=t[0],l=t[1];return(0,r.useEffect)((function(){i&&l(!1);var e=requestIdleCallback((function(){return l(!0)}),{timeout:o});return function(){return cancelIdleCallback(e)}}),[o]),i?n:null}var P=function e(n){var o=n.allowEmptyFolders,i=n.allowSelectingFolders,l=n.containerRef,u=n.disableContextMenu,c=n.file,d=n.isFileDisabled,x=n.isInPipelinesFolder,P=n.isNotFolder,_=n.level,L=n.onClickFile,I=n.onClickFolder,S=n.onSelectBlockFile,R=n.onlyShowChildren,N=n.openFile,T=n.openSidekickView,M=n.reloadCount,A=n.renderAfterContent,B=n.selectFile,U=n.setContextItem,Y=n.setCoordinates,Q=n.setDraggingFile,V=n.setSelectedFile,z=n.theme,G=n.timeout,$=n.useRootFolder,q=n.uuidCombined,H=n.uuidContainer,W=(0,r.useRef)(null),X=c.children,K=c.disabled,J=c.name,ee=c.parent,ne=(0,r.useMemo)((function(){return X?(0,w.YC)(X,(function(e){return e.children?0:1})):X}),[X]),oe=(0,r.useMemo)((function(){return[].concat(q||[]).concat(J||Z)}),[J,q,,]),te=(0,r.useMemo)((function(){return null===oe||void 0===oe?void 0:oe.join("/")}),[oe]),ie=(0,j.U2)(j.lQ,{}),re=(0,r.useRef)(null),le=(0,r.useRef)(null),ue=(0,r.useRef)(te in ie?ie[te]:0===_),ce=(0,r.useRef)(0),de=ue.current;J||o||(c.name=Z);var ae=(0,p.Z)({allowEmptyFolders:o,children:ne,disabled:K,file:c,isInPipelinesFolder:x,isFileDisabled:d,isNotFolder:P,level:_,name:J,theme:z,useRootFolder:$,uuid:te}),se=ae.BlockIcon,fe=ae.Icon,ve=(ae.blockType,ae.color),pe=ae.disabled,he=ae.filePathToUse,me=ae.folderNameForBlock,be=ae.iconColor,ge=ae.isBlockFile,Ce=ae.isFirstParentFolderForBlock,je=ae.isFolder,ye=ae.isPipelineFolder,we=(0,r.useCallback)((function(n){return null===n||void 0===n?void 0:n.map((function(n){return(0,k.jsx)(e,{allowEmptyFolders:o,allowSelectingFolders:i,containerRef:l,disableContextMenu:u,file:F(F({},n),{},{parent:c}),isFileDisabled:d,isNotFolder:null===n||void 0===n?void 0:n.isNotFolder,isInPipelinesFolder:x||ye,level:R?_:_+1,onClickFile:L,onClickFolder:I,onSelectBlockFile:S,openFile:N,openSidekickView:T,reloadCount:M,renderAfterContent:A,selectFile:B,setContextItem:U,setCoordinates:Y,setDraggingFile:Q,setSelectedFile:V,theme:z,timeout:G,useRootFolder:$,uuidCombined:oe,uuidContainer:H},"".concat(te,"/").concat((null===n||void 0===n?void 0:n.name)||Z,"-").concat(M))}))}),[o,i,ne,u,c,d,x,ye,_,L,I,S,R,N,T,M,A,B,U,Y,Q,V,$,te,oe,H]),ke=(0,r.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(ue.current="undefined"===typeof e||null===e?!ue.current:e,re.current.className=ue.current?"expanded_children":"collapsed_children",le.current.className=ue.current?"expanded":"collapsed",0===ce.current){var o;if(null===W||void 0===W||!W.current){var i=document.getElementById(re.current.id);W.current=(0,a.createRoot)(i)}null===W||void 0===W||null===(o=W.current)||void 0===o||o.render((null===ne||void 0===ne?void 0:ne.length)>=1?(0,k.jsx)(O,{idleTimeout:n||1,children:we(ne)}):je?we(xe):(0,k.jsx)("div",{}))}(0,j.rQ)(j.lQ,(0,t.Z)({},te,ue.current)),ce.current+=1}),[ne,je,te]);(0,r.useEffect)((function(){var e=function(e){var n=e.detail,o=n.expand,i=(n.file,n.folder);je&&i&&null!==te&&void 0!==te&&te.startsWith(null===i||void 0===i?void 0:i.uuid)&&((0,j.rQ)(j.lQ,(0,t.Z)({},te,o)),ke(o,100*_))};return window.addEventListener(m,e),function(){window.removeEventListener(m,e)}}),[je,_,ke,te]);var xe=(0,r.useMemo)((function(){return[{disabled:!0,name:"Empty",parent:c,isNotFolder:!0,uuid:oe}]}),[c,oe]),Fe=(0,r.useMemo)((function(){var e=[];return(0,w.w6)(_).forEach((function(n,o){var t,i=b.Cl-1;e.push((0,k.jsx)("div",{style:{borderLeft:"1px solid ".concat(null===z||void 0===z||null===(t=z.content)||void 0===t?void 0:t.disabled),height:22,marginLeft:i/2-2,paddingLeft:i/2+2}},"line-".concat(te,"-").concat(o)))})),e}),[_,z,te]);return(0,r.useEffect)((function(){setTimeout((function(){var e;if(de&&0===(null===ce||void 0===ce?void 0:ce.current)&&null!==re&&void 0!==re&&null!==(e=re.current)&&void 0!==e&&e.id){ce.current=1;try{var n;if(null===W||void 0===W||!W.current){var o,t=document.getElementById(null===re||void 0===re||null===(o=re.current)||void 0===o?void 0:o.id);W.current=(0,a.createRoot)(t)}null===W||void 0===W||null===(n=W.current)||void 0===n||n.render((null===ne||void 0===ne?void 0:ne.length)>=1?(0,k.jsx)(O,{idleTimeout:100*_,children:we(ne)}):null!==ne&&void 0!==ne&&ne.length?null:je?we(xe):(0,k.jsx)("div",{}))}catch(i){console.log(i)}}}),1)}),[]),(0,k.jsxs)(k.Fragment,{children:[!R&&(0,k.jsxs)("div",{className:"row",onClick:function(e){if(e.preventDefault(),!pe){if((null===ee||void 0===ee?void 0:ee.name)===s.PF){null===T||void 0===T||T(C.cH.CHARTS);var n=(0,y.lr)(c);n&&(null===S||void 0===S||S(n.uuid,n.type,(0,y.jN)(c)))}var o=(0,y.V3)(c);if(ne)i?B(he):ke(),null===I||void 0===I||I(he);else if(L)L(he);else if(o)null===S||void 0===S||S(o.uuid,o.type,(0,y.jN)(c),{file:c,path:he});else if(J.match(s.xF))null===N||void 0===N||N(he);else{var t=(0,y.lr)(c);t&&(null===S||void 0===S||S(t.uuid,t.type,(0,y.jN)(c)))}}},onContextMenu:function(e){var n;clearTimeout(G.current),null!==l&&void 0!==l&&null!==(n=l.current)&&void 0!==n&&n.contains(e.target)&&!u&&(e.preventDefault(),Y({x:e.pageX,y:e.pageY}),Q(null),V(F(F({},c),{},{uuid:te})))},onMouseDown:function(e){var n,o=c?(0,y.lr)(c,null,!0):null;null===l||void 0===l||null===(n=l.current)||void 0===n||!n.contains(e.target)||!o||(null===ne||void 0===ne?void 0:ne.length)>=1||u||pe||x||(e.preventDefault(),clearTimeout(G.current),G.current=setTimeout((function(){Y({x:e.pageX,y:e.pageY}),Q(c),V(null)}),300))},style:{alignItems:"center",cursor:"default",display:"flex",minWidth:_*b.Cl+c.name.length*g.Fo+2*g.iI,paddingRight:g.iI/4},children:[(0,k.jsxs)(f.Z,{alignItems:"center",flex:1,children:[Fe,(0,k.jsxs)(E,{children:[ne&&(0,k.jsxs)("div",{className:de?"expanded":"collapsed",ref:le,children:[(0,k.jsx)("div",{className:"down",children:(0,k.jsx)(h._M,{muted:!0,size:b.ZG})}),(0,k.jsx)("div",{className:"right",children:(0,k.jsx)(h._Q,{muted:!0,size:b.ZG})})]}),!ne&&(0,k.jsx)("div",{style:{width:b.ZG}})]}),(0,k.jsx)("div",{style:{marginLeft:g.iI/2,marginRight:g.iI/2},children:me&&!je&&ge?(0,k.jsx)(se,{color:ve,size:me&&!je?.7*b.ZG:b.ZG,square:!0}):(0,k.jsx)(fe,{fill:be||(Ce?ve:null),disabled:pe,size:b.ZG})}),(0,k.jsx)(v.ZP,{default:!pe,disabled:pe,monospace:!0,small:!0,children:J})]}),A&&A(c)]}),(0,k.jsx)(D,{children:(0,k.jsx)("div",{className:de?"expanded_children":"collapsed_children",id:"".concat(H,"-").concat(te),ref:re})})]})},_=o(65186),L=o(71180),I=o(55485),S=o(93369),R=o(65956),N=o(38276),T=o(17488),M=o(35686),A=o(42122),B=o(72619);var U=function(e){var n=e.fetchFileTree,o=e.file,t=e.moveFile,l=e.onCancel,c=e.onCreateFile,d=e.selectedFolder,a=e.showError,s=(0,r.useRef)(null),f=(0,A.Qr)(o)?null:o,v=(0,r.useState)(f?(0,y.jN)(f,null,!0):""),p=v[0],h=v[1],m=(0,r.useState)(f?null===f||void 0===f?void 0:f.name:""),b=m[0],C=m[1];(0,r.useEffect)((function(){var e;null===s||void 0===s||null===(e=s.current)||void 0===e||e.focus()}),[]),(0,r.useEffect)((function(){d&&h((0,y.eV)(null===d||void 0===d?void 0:d.uuid))}),[d]);var j=(0,u.Db)(M.ZP.files.useCreate(),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(e){var o=e.file;null===n||void 0===n||n(),l(),null===c||void 0===c||c(o)},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),w=(0,i.Z)(j,1)[0],x=(0,u.Db)(M.ZP.files.useUpdate(f&&encodeURIComponent((0,y.jN)(f))),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){null===n||void 0===n||n(),l()},onErrorCallback:function(e,n){return a({errors:n,response:e})}})}}),F=(0,i.Z)(x,1)[0];return(0,k.jsxs)(R.Z,{footer:(0,k.jsxs)(I.ZP,{children:[(0,k.jsxs)(S.ZP,{bold:!0,disabled:!b,inline:!0,onClick:function(){return f?F({file:{dir_path:p,name:b},file_json_only:!0}):w({file:{dir_path:p,name:b,overwrite:!1},file_json_only:!0})},primary:!0,tabIndex:0,uuid:"NewFile/create_file",children:[f?t?"Move":"Rename":"Create"," file"]}),(0,k.jsx)(N.Z,{ml:1,children:(0,k.jsx)(L.ZP,{onClick:function(){return l()},tabIndex:0,children:"Cancel"})})]}),headerTitle:f?t?"Move file":"Rename file":"New file",minWidth:50*g.iI,children:[(0,k.jsx)(T.Z,{disabled:!!f&&!t,label:"Directory",monospace:!0,onChange:function(e){return h(e.target.value)},setContentOnMount:!0,value:p}),(0,k.jsx)(N.Z,{mt:2,children:(0,k.jsx)(T.Z,{disabled:!!t,label:"Filename",monospace:!0,onChange:function(e){return C(e.target.value)},ref:s,required:!0,value:b})})]})},Y=o(82359);var Q=function(e){var n=e.fetchFileTree,o=e.file,t=e.moveFile,l=e.onCancel,c=e.onCreateFile,d=e.projectType,a=e.selectedFolder,s=e.setErrors,f=e.showError,v=(0,r.useRef)(null),p=(0,A.Qr)(o)?null:o,h=(0,r.useState)(p?(0,y.jN)(p,null,!0):""),m=h[0],b=h[1],C=(0,r.useState)(p?null===p||void 0===p?void 0:p.name:""),j=C[0],w=C[1];(0,r.useEffect)((function(){var e;null===v||void 0===v||null===(e=v.current)||void 0===e||e.focus()}),[]),(0,r.useEffect)((function(){a&&b((0,y.eV)(null===a||void 0===a?void 0:a.uuid))}),[a]);var x=(0,u.Db)(M.ZP.folders.useCreate(),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(e){var o=e.file;null===n||void 0===n||n(),l(),null===c||void 0===c||c(o)},onErrorCallback:function(e,n){return s?s({errors:n,response:e}):f({errors:n,response:e})}})}}),F=(0,i.Z)(x,1)[0],Z=(0,u.Db)(M.ZP.folders.useUpdate(p&&encodeURIComponent((0,y.jN)(p))),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){null===n||void 0===n||n(),l()},onErrorCallback:function(e,n){return s?s({errors:n,response:e}):f({errors:n,response:e})}})}}),D=(0,i.Z)(Z,1)[0],E=(0,u.Db)(M.ZP.projects.useCreate(),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){null===n||void 0===n||n(),l()},onErrorCallback:function(e,n){return s?s({errors:n,response:e}):f({errors:n,response:e})}})}}),O=(0,i.Z)(E,2),P=O[0],_=O[1].isLoading;return(0,k.jsxs)(R.Z,{footer:(0,k.jsxs)(I.ZP,{children:[(0,k.jsxs)(S.ZP,{bold:!0,disabled:!j,inline:!0,loading:_,onClick:function(){return p?D({folder:{name:j,path:m}}):d?P({project:{repo_path:m,type:d,uuid:j}}):F({folder:{name:j,overwrite:!1,path:m}})},primary:!0,tabIndex:0,uuid:"NewFolder/create_folder",children:[d&&"Create project",!d&&(0,k.jsxs)(k.Fragment,{children:[p?t?"Move":"Rename":"Create"," folder"]})]}),(0,k.jsx)(N.Z,{ml:1,children:(0,k.jsx)(L.ZP,{onClick:function(){return l()},tabIndex:0,children:"Cancel"})})]}),headerTitle:p?t?"Move folder":"Rename folder":d?Y.k.STANDALONE===d?"New Mage project":Y.k.DBT===d?"New dbt project":"New project":"New folder",minWidth:50*g.iI,children:[(0,k.jsx)(T.Z,{disabled:!!p&&!t,label:d?"Project directory":"Directory",monospace:!0,onChange:function(e){return b(e.target.value)},setContentOnMount:!0,value:m}),(0,k.jsx)(N.Z,{mt:2,children:(0,k.jsx)(T.Z,{disabled:!!t,label:d?"Project name":"Folder name",monospace:!0,onChange:function(e){return w(e.target.value)},ref:v,required:!0,value:j})})]})},V=o(57653),z=o(89515),G=o(17717),$=o(77011);function q(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function H(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?q(Object(o),!0).forEach((function(n){(0,t.Z)(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var W=l.default.div.withConfig({displayName:"MultiFileInput__DropzoneStyle",componentId:"sc-1l6yd2y-0"})(["&:hover{cursor:pointer;}"]);var X=function(e){var n=e.children,o=e.inputOnChange,t=e.inputProps,i=e.onDragActiveChange,l=e.setFiles,u=(0,r.useCallback)((function(e){l(e)}),[l]),c=(0,$.uI)({onDrop:u}),d=c.getInputProps,a=c.getRootProps,s=c.isDragActive,f=d(),v=f.accept,p=f.autoComplete,h=f.multiple,m=f.onChange,b=f.onClick,g=f.ref,C=f.style,j=f.tabIndex,y=f.type,w=H(H({},t),{},{accept:v,autoComplete:p,multiple:h,onChange:function(e){null===o||void 0===o||o(e),null===t||void 0===t||t.onChange(e),m(e)},onClick:b,ref:g,style:C,tabIndex:j,type:y});return(0,r.useEffect)((function(){null===i||void 0===i||i(s)}),[s,i]),(0,k.jsxs)(W,H(H({},a()),{},{children:[(0,k.jsx)("input",H(H({},w),{},{directory:"",webkitdirectory:""})),n]}))};function K(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function J(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?K(Object(o),!0).forEach((function(n){(0,t.Z)(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var ee=function(e){var n=e.children,o=e.directoryPath,l=e.onDragActiveChange,c=e.setFileUploadProgress,d=e.setUploadedFiles,a=(0,u.Db)(M.ZP.files.useCreate({onUploadProgress:function(e,n){var o,i=n.body,r=[null===i||void 0===i?void 0:i.dir_path,null===i||void 0===i||null===(o=i.file)||void 0===o?void 0:o.name].filter((function(e){return(null===e||void 0===e?void 0:e.length)>=1})).join(G.sep);null===c||void 0===c||c((function(n){return J(J({},n),{},(0,t.Z)({},r,e.loaded/e.total))}))}})),s=(0,i.Z)(a,1)[0],f=(0,r.useCallback)((function(e){e.forEach((function(e){var n=e.name,i=e.path,r=[o],l=i.split(G.sep).filter((function(e){return e&&e!==n})).join(G.sep);l&&r.push(l);var u=[],a=r.join(G.sep);(null===a||void 0===a?void 0:a.length)>=1&&r.push(a),u.push(n);var f=u.join(G.sep);s({dir_path:a,file:e,overwrite:!1}).then((function(e){var n=e.data,o=n.error,i=n.file;d((function(e){return J(J({},e),{},(0,t.Z)({},f,i||o))}))})),c((function(e){return J(J({},e),{},(0,t.Z)({},f,0))}))}))}),[s,o,c,d]);return(0,k.jsx)(X,{onDragActiveChange:l,setFiles:f,children:n})},ne=o(35185),oe=o(75499),te=o(44897),ie=o(42631),re=(g.iI,l.default.div.withConfig({displayName:"indexstyle__DropZoneStyle",componentId:"sc-1g3zz7z-0"})(["border-radius:","px;padding:","px;max-width:","px;min-width:","px;",""],ie.n_,8*g.iI,100*g.iI,55*g.iI,(function(e){return"\n border: 1px dashed ".concat((e.theme.borders||te.Z.borders).contrast,";\n ")}))),le=l.default.div.withConfig({displayName:"indexstyle__TableStyle",componentId:"sc-1g3zz7z-1"})(["max-width:","px;min-width:","px;"],100*g.iI,55*g.iI);var ue=function(e){var n=e.fetchFileTree,o=e.onCancel,t=e.selectedFolder,l=(0,r.useState)(!1),u=l[0],c=l[1],d=(0,r.useState)({}),a=d[0],s=d[1],f=(0,r.useState)({}),p=f[0],h=f[1],m=!(0,A.Qr)(a),b=(0,r.useMemo)((function(){var e=[];return(0,w.YC)(Object.entries(a),(function(e){var n=(0,i.Z)(e,2),o=n[0];n[1];return o})).forEach((function(n){var o=(0,i.Z)(n,2),t=o[0],r=o[1],l=p[t],u=null===l||void 0===l?void 0:l.message;e.push([(0,k.jsxs)("div",{children:[(0,k.jsx)(v.ZP,{overflowWrap:!0,preWrap:!0,children:t}),u&&(0,k.jsx)(N.Z,{mt:1,children:(0,k.jsx)(v.ZP,{danger:!0,small:!0,children:u})})]},"name-".concat(t)),(0,k.jsx)(ne.Z,{danger:!!u,progress:100*r},"progress-".concat(t))])})),(0,k.jsx)(oe.Z,{columnFlex:[1,4],columns:[{uuid:"Filename"},{uuid:"Upload progress"}],rows:e,uuid:"block-runs"})}),[a,p]);return(0,k.jsxs)(R.Z,{footer:(0,k.jsxs)(I.ZP,{fullWidth:!0,children:[(0,k.jsx)(L.ZP,{onClick:function(){return o()},children:"Close"}),m&&(0,k.jsx)(N.Z,{ml:1,children:(0,k.jsx)(L.ZP,{onClick:function(){s({}),h({})},children:"Clear files and retry"})})]}),headerTitle:"Upload files",children:[m&&(0,k.jsx)(le,{children:b}),!m&&(0,k.jsx)(ee,{directoryPath:t?(0,y.jN)(t):"",onDragActiveChange:c,setFileUploadProgress:s,setUploadedFiles:function(e){h(e),null===n||void 0===n||n()},children:(0,k.jsx)(re,{children:(0,k.jsxs)(v.ZP,{center:!0,children:[u&&"Drop to upload",!u&&"Click or drop files and folders to upload"]})})})]})},ce=o(77417),de=o(19698),ae=o(31353),se=o(80330),fe=o(85202),ve=o(44952),pe=o(89538);function he(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function me(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?he(Object(o),!0).forEach((function(n){(0,t.Z)(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):he(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}var be,ge=20*g.iI;function Ce(e,n){var o=e.addNewBlock,t=(e.blocks,e.deleteWidget),a=e.disableContextMenu,s=(e.fetchAutocompleteItems,e.fetchFiles),f=e.fetchPipeline,p=e.files,C=e.onClickFile,j=e.onClickFolder,x=e.onSelectBlockFile,F=e.openFile,Z=(e.openSidekickView,e.pipeline),D=e.showError,E=e.setSelectedBlock,O=e.uuid,L=(e.widgets,(0,r.useRef)(null)),I=(0,r.useContext)(l.ThemeContext),S=(0,r.useState)(null),R=S[0],N=S[1],T=(0,r.useState)(null),A=T[0],G=T[1],$=(0,r.useState)(null),q=$[0],H=$[1],W=(0,r.useState)(0),X=W[0],K=W[1];(0,r.useEffect)((function(){K((function(e){return e+1}))}),[p]);var J=(0,r.useMemo)((function(){return q&&"undefined"!==typeof(null===q||void 0===q?void 0:q.children)&&q}),[q]),ee=(0,ce.Z)(),ne=ee.featureEnabled,oe=ee.featureUUIDs,te=ee.project,ie=(0,de.Z)().status,re=(0,u.Db)((function(e){return M.ZP.downloads.files.useCreate(e)()}),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){var n=e.data.download.token;(0,ve.K)(n)},onErrorCallback:function(e,n){return D({errors:n,response:e})}})}}),le=(0,i.Z)(re,1)[0],he=(0,u.Db)((function(e){return M.ZP.files.useDelete(e)()}),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){null===s||void 0===s||s()},onErrorCallback:function(e,n){return D({errors:n,response:e})}})}}),be=(0,i.Z)(he,1)[0],Ce=(0,u.Db)((function(e){return M.ZP.folders.useDelete(e)()}),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){null===s||void 0===s||s()},onErrorCallback:function(e,n){return D({errors:n,response:e})}})}}),je=(0,i.Z)(Ce,1)[0],ye=(0,u.Db)((function(e){var n=e.block,o=(n.language,n.type,n.uuid),t=e.file,i=e.force,r=void 0!==i&&i;return M.ZP.blocks.useDelete(encodeURIComponent(o),{file_path:t?encodeURIComponent((0,y.jN)(t)):null,force:r})()}),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){null===s||void 0===s||s()},onErrorCallback:function(e,n){var o=e.error,t=o.exception;if(!o.message.includes("raise HasDownstreamDependencies"))return D({errors:n,response:e});Fe({block:Le,file:q,exception:t})}})}}),we=(0,i.Z)(ye,1)[0],ke=(0,pe.dd)((function(e){var n=e.block,o=e.file;return(0,k.jsx)(z.Z,{centerOnScreen:!0,danger:!0,onCancel:Ze,onClick:function(){return we({block:n,file:o,force:!0}).then((function(){return Ze()}))},subtitle:"Deleting this block file is dangerous. This block may have dependencies in active pipelines. Press confirm to delete this block anyway and remove it as a dependency from downstream blocks.",title:"Delete ".concat(n.uuid," anyway?"),width:34*g.iI})})),xe=(0,i.Z)(ke,2),Fe=xe[0],Ze=xe[1],De=(0,w.sE)(null===Z||void 0===Z?void 0:Z.blocks,(function(e){var n=e.type;return c.tf.DATA_EXPORTER===n})),Ee=(0,u.Db)(M.ZP.blocks.pipelines.useUpdate(encodeURIComponent(null===Z||void 0===Z?void 0:Z.uuid),encodeURIComponent(null===De||void 0===De?void 0:De.uuid)),{onSuccess:function(e){return(0,B.wD)(e,{callback:function(){null===f||void 0===f||f()},onErrorCallback:function(e,n){return D({errors:n,response:e})}})}}),Oe=(0,i.Z)(Ee,1)[0],Pe=(0,r.useCallback)((function(){return H(null)}),[H]);(0,r.useEffect)((function(){var e,t,i,r=function(e){if(clearTimeout(L.current),G(null),A&&Z&&o){var t,i,r=(null===n||void 0===n||null===(t=n.current)||void 0===t||null===(i=t.getBoundingClientRect)||void 0===i?void 0:i.call(t))||{},l=r.width,u=r.x;if(e.pageX>u+l){var c=(null===Z||void 0===Z?void 0:Z.type)===V.qL.INTEGRATION,d=(0,se.TU)(me(me({},A),{},{path:(0,y.jN)(A)}),ie.repo_path,Z);null===o||void 0===o||o(me(me({},d),{},{require_unique_name:!1}),(function(e){c&&De&&Oe({block:me(me({},De),{},{upstream_blocks:[e.uuid]})}),null===E||void 0===E||E(e)}),{disableFetchingFiles:!0})}}},l=function(e){A&&N({x:e.pageX,y:e.pageY})};return null===(e=document)||void 0===e||e.addEventListener("click",Pe),null===(t=document)||void 0===t||t.addEventListener("mousemove",l),null===(i=document)||void 0===i||i.addEventListener("mouseup",r),function(){var e,n,o;null===(e=document)||void 0===e||e.removeEventListener("click",Pe),null===(n=document)||void 0===n||n.removeEventListener("mousemove",l),null===(o=document)||void 0===o||o.removeEventListener("mouseup",r)}}),[o,De,A,Pe,Z,n,E,ie,L,Oe]);var _e=(0,r.useMemo)((function(){return null===p||void 0===p?void 0:p.map((function(e){return(0,k.jsx)(P,{containerRef:n,disableContextMenu:a,file:e,level:0,onClickFile:C,onClickFolder:j,onSelectBlockFile:x,openFile:F,reloadCount:X,setCoordinates:N,setDraggingFile:G,setSelectedFile:H,theme:I,timeout:L,uuidContainer:O},"".concat(e.name,"-").concat(X))}))}),[a,p,C,j,F,x,X,O]),Le=(0,r.useMemo)((function(){return q&&(0,y.lr)(q)}),[q]),Ie=(0,r.useMemo)((function(){return A&&(0,y.lr)(A)}),[A]),Se=(0,pe.dd)((function(){return(0,k.jsx)(ue,{fetchFileTree:s,onCancel:Te,selectedFolder:J})}),{},[s,J],{background:!0,uuid:"upload_files"}),Re=(0,i.Z)(Se,2),Ne=Re[0],Te=Re[1],Me=(0,pe.dd)((function(e){return(0,k.jsx)(U,{fetchFileTree:s,file:null===e||void 0===e?void 0:e.file,moveFile:null===e||void 0===e?void 0:e.moveFile,onCancel:Ue,selectedFolder:J,showError:D})}),{},[s,J,D],{background:!0,disableClickOutside:!0,uuid:"new_file"}),Ae=(0,i.Z)(Me,2),Be=Ae[0],Ue=Ae[1],Ye=(0,pe.dd)((function(e){return(0,k.jsx)(Q,{fetchFileTree:s,file:null===e||void 0===e?void 0:e.file,moveFile:null===e||void 0===e?void 0:e.moveFile,onCancel:ze,projectType:null===e||void 0===e?void 0:e.projectType,selectedFolder:J,showError:D})}),{},[s,J,D,D],{background:!0,disableClickOutside:!0,uuid:"new_folder"}),Qe=(0,i.Z)(Ye,2),Ve=Qe[0],ze=Qe[1],Ge=(0,r.useMemo)((function(){var e;if(!Le&&!q&&!J)return(0,k.jsx)("div",{});var o=(null===n||void 0===n||null===(e=n.current)||void 0===e?void 0:e.getBoundingClientRect())||{},i=o.x,r=o.width,l=R||{},u=l.x,a=void 0===u?0:u,s=l.y,f=void 0===s?0:s,v=a+g.iI;a+ge>=i+r&&(v=i+r-(ge+g.iI)),v<0&&(v=0);var p=[];J?(p.push.apply(p,[{label:function(){return"New folder"},onClick:function(){Ve()},uuid:"new_folder"},{label:function(){return"Rename folder"},onClick:function(){Ve({file:J})},uuid:"rename_folder"},{label:function(){return"Move folder"},onClick:function(){Ve({file:J,moveFile:!0})},uuid:"Move_folder"},{label:function(){return"Delete folder"},onClick:function(){var e=(0,y.jN)(J);window.confirm("Are you sure you want to delete folder ".concat(e," and all its subfolders and files?"))&&je(encodeURIComponent(e))},uuid:"Delete_folder"},{label:function(){return"New file"},onClick:function(){Be({file:{}})},uuid:"new_file"},{label:function(){return"Upload files"},onClick:function(){Ne()},uuid:"upload_files"},{label:function(){return"Expand all subfolders"},onClick:function(){var e=new CustomEvent(m,{detail:{expand:!0,file:q,folder:J}});window.dispatchEvent(e)},uuid:"Expand all subfolders"},{label:function(){return"Collapse all subfolders"},onClick:function(){var e=new CustomEvent(m,{detail:{expand:!1,file:q,folder:J}});window.dispatchEvent(e)},uuid:"Collapse all subfolders"}]),null!==ne&&void 0!==ne&&ne(null===oe||void 0===oe?void 0:oe.PROJECT_PLATFORM)&&p.push({beforeIcon:(0,k.jsx)(_.Z,{width:1.5*g.iI}),onClick:function(){Ve({projectType:Y.k.STANDALONE})},uuid:"New Mage project"}),null!==ne&&void 0!==ne&&ne(null===oe||void 0===oe?void 0:oe.DBT_V2)&&p.push({beforeIcon:(0,k.jsx)(h.xE,{}),onClick:function(){Ve({projectType:Y.k.DBT})},uuid:"New dbt project"})):q&&(p.push.apply(p,[{label:function(){return"Rename file"},onClick:function(){Be({file:q})},uuid:"rename_file"},{label:function(){return"Move file"},onClick:function(){Be({file:q,moveFile:!0})},uuid:"move_file"},{label:function(){return"Download file"},onClick:function(){var e=(0,y.jN)(q);le(encodeURIComponent(e))},uuid:"download_file"}]),Le?p.push({label:function(){return"Delete file"},onClick:function(){Le.type===c.tf.CHART?window.confirm("Are you sure you want to delete widget ".concat(Le.uuid,"?"))&&t(Le):window.confirm("Are you sure you want to delete block ".concat(Le.uuid,"?"))&&we({block:Le,file:q})},uuid:"delete_block_file"}):p.push({label:function(){return"Delete file"},onClick:function(){var e=(0,y.jN)(q);window.confirm("Are you sure you want to delete file ".concat(e,"?"))&&be(encodeURIComponent(e))},uuid:"delete_file"}));var b=f+g.iI/2,C=36*p.length;return f+C>=window.innerHeight&&(b=f-C),(0,fe.createPortal)((0,k.jsx)("div",{style:{left:v,position:"fixed",top:b,zIndex:ae.bf+100},children:(0,k.jsx)(d.Z,{items:p,open:!0,parentRef:void 0,uuid:"FileBrowser/ContextMenu",width:ge})}),document.body)}),[R,we,be,je,t,le,ne,oe,te,n,Ne,Be,Ve,Le,q,J]);return(0,k.jsxs)(b.Nk,{ref:n,children:[_e,(Le||q||J)&&Ge,Ie&&(0,k.jsx)("div",{style:{left:(null===R||void 0===R?void 0:R.x)-g.iI,position:"fixed",top:(null===R||void 0===R?void 0:R.y)-g.iI,zIndex:ae.bf+100},children:(0,k.jsx)(v.ZP,{cursor:"grabbing",monospace:!0,children:null===Ie||void 0===Ie?void 0:Ie.uuid})})]})}!function(e){e.BLOCK_FILE="block_file",e.DISABLED="disabled",e.FILE="file",e.FOLDER="folder",e.PIPELINE="pipeline"}(be||(be={}));var je=r.forwardRef(Ce)},53005:function(e,n,o){o.d(n,{IO:function(){return m},V3:function(){return h},a9:function(){return c},eV:function(){return d},jN:function(){return a},lr:function(){return p},mD:function(){return s},o$:function(){return v},u$:function(){return b},y:function(){return f}});var t=o(17717),i=o(44425),r=o(89706),l=o(81728),u=o(80330);function c(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=n||(o?null:null===e||void 0===e?void 0:e.name);if(null!==e&&void 0!==e&&e.parent){var r=[e.parent.name];return(null===i||void 0===i?void 0:i.length)>=1&&r.push(i),c(e.parent,r.join(t.sep))}return i}function d(e){return null===e||void 0===e?void 0:e.split(t.sep).slice(1).join(t.sep)}function a(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=c(e,n,o);return d(t)}function s(e){var n=null===e||void 0===e?void 0:e.match(r.d2);return(null===n||void 0===n?void 0:n.length)>=1?n[0].replace(".",""):null}function f(e){var n=["\\.".concat(r.Lu.PY),"\\.".concat(r.Lu.R),"\\.".concat(r.Lu.SQL),"\\.".concat(r.Lu.YAML),"\\.".concat(r.Lu.YML)].join("|"),o=new RegExp("".concat(n,"$")),t=e.match(o);return(null===t||void 0===t?void 0:t.length)>=1?t[0].replace(".",""):null}function v(e,n){var o=f(e);return!["__init__.py"].includes(e)&&(i.tf.DBT!==n||![r.Lu.YAML,r.Lu.YML].includes(o))}function p(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=c(e,n).split(t.sep);if(!l)return null;var d=(0,u.ck)(l);if(!l)return null;var a="";a=l.length>=3?l.slice(2,l.length).join(t.sep):l[l.length-1];var s=o?i.Q3:i.$W;if(s.concat(i.tf.DBT).includes(d)&&f(a)){var v=a.lastIndexOf("."),p=a.slice(v+1);return{language:r.nB[p],type:d,uuid:a.slice(0,v)}}}function h(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=c(e,n).split(t.sep);if(o[1]){var u=(0,l.C5)(o[n?0:1]);o[1]===i.tf.DBT&&(u=i.tf.DBT);var d=o[o.length-1],a=new RegExp(".".concat(r.Lu.YAML,"$")),s=new RegExp(".".concat(r.Lu.R,"$")),f=new RegExp(".".concat(r.Lu.SQL,"$")),v=new RegExp(".".concat(r.Lu.MD,"$"));if(d.match(a)&&i.VZ.includes(u))return{type:u,uuid:d.replace(a,"")};if(d.match(s)&&i.J8.includes(u))return{type:u,uuid:d.replace(s,"")};if(d.match(f)&&i.HX.includes(u)){var p=d.replace(/[.]/g,"_"),h=u===i.tf.DBT?o.slice(2,-1).join("_").concat("_".concat(p)):d.replace(f,"");return{type:u,uuid:h}}return d.match(v)&&u===i.tf.MARKDOWN?{type:u,uuid:d.replace(v,"")}:void 0}}function m(e,n){var o=e.split("."),i=o[o.length-1];r.n6.includes(i)&&o.pop();var l=o.join("").split(t.sep),u=l.slice(1,l.length).join("");return n.find((function(e){return e.uuid===u}))}function b(e){var n=e||{},o=n.language,t=n.name,u=n.type;if(t&&o&&u){var c=u===i.tf.CUSTOM?u:"".concat(u,"s"),d=r.JD[o],a=(0,l.kE)(t);return"".concat(c,"/").concat(a,".").concat(d)}}},80330:function(e,n,o){o.d(n,{TU:function(){return p},lU:function(){return v},ck:function(){return f}});var t=o(21831),i=o(17717),r=o(44425),l=o(57653),u=o(89706),c=o(86735);function d(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=n||(o?null:null===e||void 0===e?void 0:e.name);if(null!==e&&void 0!==e&&e.parent){var r=[e.parent.name];return(null===t||void 0===t?void 0:t.length)>=1&&r.push(t),d(e.parent,r.join(i.sep))}return null!==e&&void 0!==e&&e.path?null===e||void 0===e?void 0:e.path:t}var a=o(81728),s=o(42122),f=function(e){var n;if(null===e||void 0===e||e.forEach((function(e){if((null===e||void 0===e?void 0:e.length)>=1){var o=null===e||void 0===e?void 0:e.toLowerCase();(o in r.qC||(o=(0,a.C5)(o))in r.GJ)&&(n=o)}})),!n){var o=["\\.".concat(u.Lu.SQL),"\\.".concat(u.Lu.YAML),"\\.".concat(u.Lu.YML)].join("|"),t=new RegExp("".concat(o,"$"));if(e.join(i.sep).match(t))return r.tf.DBT}return n};function v(){return new RegExp(Object.keys(u.nB).map((function(e){return".(".concat(e,")$")})).join("|"))}function p(e,n,o){var p,h,m=null===e||void 0===e||null===(p=e.path.match(v())[0])||void 0===p?void 0:p.split(".")[1],b=o.type===l.qL.INTEGRATION,g=(0,c.sE)(null===o||void 0===o?void 0:o.blocks,(function(e){var n=e.type;return r.tf.DATA_EXPORTER===n})),C=e.path.replace(n,"").split(i.sep),j=f(e.path.split(i.sep)),y=r.tf.DBT===j,w=(h=C)[0]===r.tf.DBT?h.slice(1).join(i.sep):function(e){return e.at(-1)}(h).split(".")[0];if(C.length>=3&&!y){var k=C.slice(1,C.length-1).join(i.sep);w="".concat(k,"/").concat(w)}var x=u.nB[m],F={configuration:(0,s.hB)({file_path:y&&r.t6.SQL===x?w:null,file_source:{path:d(e)}}),language:x,name:(0,a.wE)(w),type:j};if(j===r.tf.CUSTOM&&(F.color=r.Lq.TEAL),b){var Z=(0,c.sE)(o.blocks,(function(e){var n=e.type;return r.tf.DATA_LOADER===n})),D=(0,c.sE)(o.blocks,(function(e){var n=e.type;return r.tf.TRANSFORMER===n})),E=[];D?E.push(D.uuid):null!==g&&void 0!==g&&g.upstream_blocks?E.push.apply(E,(0,t.Z)(g.upstream_blocks)):Z&&E.push(Z.uuid),F.upstream_blocks=E}return F}},44952:function(e,n,o){o.d(n,{K:function(){return i}});var t=o(4383);function i(e){var n=(0,t.ZP)("downloads",e),o=document.createElement("a");o.href=n,document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(n),document.body.removeChild(o)}},19698:function(e,n,o){var t=o(82684),i=o(35686);n.Z=function(){var e=i.ZP.statuses.list().data;return{status:(0,t.useMemo)((function(){var n;return null===e||void 0===e||null===(n=e.statuses)||void 0===n?void 0:n[0]}),[e])}}}}]);